Stair Generator
Discrete-time or continuous-time stair signal generator
Libraries:
Simscape /
Electrical /
Control /
General Control
Description
The Stair Generator block generates a stair signal based on the values specified in the Time (s) and Amplitude parameters.
The block can output a repeating stair pattern or execute the pattern only once by keeping the last amplitude active for all subsequent times.
Ports
Output
Stair signal, returned as a Simulink output signal.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
Parameters
Main
Transition times at which the output changes to the value specified in the Amplitude parameter, in seconds. The value of this parameter must be strictly ascending.
Amplitudes of the stair signal at the time specified by the Time (s) parameter. This vector must have the same number of elements as the Time (s) parameter.
Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.
For inherited discrete-time operation, set this parameter to -1.
For discrete-time operation, set this parameter to a positive integer. For
continuous-time operation, set this parameter to 0.
If this block is in a masked subsystem or a variant subsystem that supports switching between continuous operation and discrete operation, promote this parameter to ensure correct switching between the continuous and discrete implementations of the block. For more information, see Promote Block Parameters on a Mask.
Whether to indefinitely repeat the stair pattern. If you select this parameter, the output repeats the stair pattern defined by the Time (s) and Amplitude parameters indefinitely.
If you clear this parameter, the output executes the stair pattern only once and then keeps the last amplitude active for all subsequent times.
Signal Attributes
Data type for the output. The type can be inherited, specified
directly, or expressed as a data type object such as
Simulink.NumericType.
When you select an inherited option, the block exhibits these behaviors:
Inherit: Inherit via internal rule— Simulink chooses a data type to balance numerical accuracy, performance, and generated code size, while taking into account the properties of the embedded target hardware. If you change the embedded target settings, the data type selected by the internal rule might change. It is not always possible for the software to optimize efficiency and numerical accuracy at the same time.Inherit: Inherit via back propagation— Simulink automatically determines the output data type of the block during data type propagation (see Data Type Propagation). In this case, the block uses the data type of a downstream block or signal object.Inherit: auto— Use a rule that inherits a data type.
For more information, see Control Data Types of Signals.
Programmatic Use
Block Parameter:
OutDataTypeStr |
| Type: character vector |
Values: 'Inherit:
auto' | 'Inherit: Inherit via internal
rule'| 'Inherit: Inherit via back
propagation' | 'single' |
'double' | 'int8' |
'uint8' | 'int16' |
'uint16' | 'int32' |
'uint32'|'int64'|'uint64'|
'<data type expression>' |
Default: 'Inherit:
Inherit via internal rule' |
Version History
Introduced in R2020a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
