Discrete-time Integrator saturation port data type issues

조회 수: 5 (최근 30일)
Daniel Humke
Daniel Humke 2024년 3월 13일
댓글: Paul 2024년 3월 14일
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
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 CenterFile Exchange에서 Discontinuities에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by