Discrete-time Integrator saturation port data type issues
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Paul
2024-3-14
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?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!