Using Simulink | ![]() ![]() |
Library
Description
The Integrator block integrates its input. The output of the integrator is simply its state, the integral. The Integrator block allows you to:
Use the Discrete-Time Integrator block, when constructing a purely discrete system.
Defining Initial Conditions
You can define the initial conditions as a parameter on the block dialog box or input them from an external signal:
Using the State Port
In two known situations, you must use the state port instead of the output port:
bounce
model.clutch
model.You can correct these problems by passing the state through the state port rather than the output port. Although the values are the same, Simulink generates them at slightly different times, which protects your model from these problems.You output the block state by selecting the Show state port check box. By default, the state port appears on the top of the block, as shown in this figure.
Limiting the Integral
To prevent the output from exceeding specifiable levels, select the Limit output check box and enter the limits in the appropriate parameter fields. Doing so causes the block to function as a limited integrator. When the output reaches the limits, the integral action is turned off to prevent integral wind up. During a simulation, you can change the limits but you cannot change whether the output is limited. The output is determined as follows:
To generate a signal that indicates when the state is being limited, select the Show saturation port check box. A saturation port appears below the block output port, as shown on this figure.
The signal has one of three values:
When this option is selected, the block has three zero crossings: one to detect when it enters the upper saturation limit, one to detect when it enters the lower saturation limit, and one to detect when it leaves saturation.
Resetting the State
The block can reset its state to the specified initial condition based on an external signal. To cause the block to reset its state, select one of the External reset choices. A trigger port appears below the block's input port and indicates the trigger type, as shown in this figure.
rising
to trigger the state reset when the reset signal has a rising edge.falling
to trigger the state reset when the reset signal has a falling edge.either
to trigger the reset when either a rising or falling signal occurs.level
to trigger the reset and hold the output to the initial condition while the reset signal is nonzero.The reset port has direct feedthrough. If the block output is fed back into this port, either directly or through a series of blocks with direct feedthrough, an algebraic loop results. To resolve this loop, feed the block state into the reset port instead. To access the block's state, select the Show state port check box.
Specifying the Absolute Tolerance for the Block State
When your model contains states having vastly different magnitudes, defining the absolute tolerance for the model might not provide sufficient error control. To define the absolute tolerance for an Integrator block's state, provide a value for the Absolute tolerance parameter. If the block has more than one state, the same value is applied to all states.
For more information about error control, see Error Tolerances.
Choosing All Options
When all options are selected, the icon looks like this.
Data Type Support
An Integrator block accepts and outputs signals of type double
on its data ports. Its external reset port accepts signals of type double
or boolean
.
Parameters and Dialog Box
rising
, falling
, either
, or level
) occurs in the reset signal.internal
) or from an external block (if set to external
).internal
.inf
.-inf
.Characteristics
![]() | Inport | Interpolation (n-D) Using PreLook-Up | ![]() |