Discrete-time Integrator saturation port data type issues

3 visualizaciones (últimos 30 días)
Daniel Humke
Daniel Humke el 13 de Mzo. de 2024
Comentada: Paul el 14 de Mzo. de 2024
I am working on a system model that utilizes discrete time integrators for timer functionality. I often will utilize the saturation & saturation port functionality in order to indicate when my timers have completed/expired. I also set up my model using Alias Types (and now exploring Value Types as well) in order to have a reduced set of artifacts to adjust if I want/need to adjust data types. However, when I attempt to use Alias Types on either a SignalObject on the DTI state or signal properties, the saturation port defaults to an 'int8' data type, and I get an error stating that type doesn't align with either the input, state, or output data types (which are Alias Types, but all resolving to 'single'). My current approach to working around this is to "hardcode" the data type of the signal to 'single'. For how I usually utilize the saturation port, actually having it always be an 'int8' would be preferable, regardless of the data type of the input/state/output, as it allows for direct equality compares (something not recommended for floating point data types) against 1, -1, or 0 for upper saturated, lower saturated, or not saturated. Could I get more information on the background of why these data types are linked (input, state, output vs saturation port), and what other options I have to be able to use Alias Types with the DTI block & either 'auto' setting or an AliasType setting for the signal data type?
  1 comentario
Paul
Paul el 14 de Mzo. de 2024
That is strange that the saturation port data type is determined by Simulink with no ability of the user to change it (AFAICT), and it's determined incorrectly when using an Alias type. If you don't get any help here, you might want to consider contacting Tech Support. If you go down that path, would you mind posting their response/solution/etc. back here?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by