Simulink Reference    
Discrete-Time Integrator

Perform discrete-time integration of a signal

Library

Discrete

Description


The Discrete-Time Integrator block can be used in place of the Integrator block to create a purely discrete system.

The Discrete-Time Integrator block allows you to

These features are described below.

Integration Methods

The block can integrate using these methods: Forward Euler, Backward Euler, and Trapezoidal. For a given step k, Simulink updates y(k) and x(k+1). T is the sampling period (delta T in the case of triggered sampling time). Values are clipped according to upper or lower limits. In all cases, y(0)=x(0)=IC (clipped if necessary), i.e., the initial output of the block is always the initial condition.

The block icon reflects the selected integration method, as this figure shows.

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 situations, you must use the state port instead of the output port:

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 in this figure.

The signal has one of three values:

When the Limit output 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.

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 output of the block's state port into the reset port instead. To access the block's state, select the Show state port check box.

Choosing All Options

When all options are selected, the icon looks like this.

Data Type Support

A Discrete-Time Integrator block accepts and outputs real signals of type double.

Parameters and Dialog Box

Integrator method
The integration method. The default is ForwardEuler.
External reset
Resets the states to their initial conditions when a trigger event (rising, falling, either, level) occurs in the reset signal.
Initial condition source
Gets the states' initial conditions from the Initial condition parameter (if set to internal) or from an external block (if set to external).
Initial condition
The states' initial conditions. Set the Initial condition source parameter value to internal.
Limit output
If selected, limits the block's output to a value between the Lower saturation limit and Upper saturation limit parameters.
Upper saturation limit
The upper limit for the integral. The default is inf.
Lower saturation limit
The lower limit for the integral. The default is -inf.
Show saturation port
If selected, adds a saturation output port to the block.
Show state port
If selected, adds an output port to the block for the block's state.
Sample time
The time interval between samples. The default is 1. See Specifying Sample Time in the online documentation for more information.

Characteristics

Direct Feedthrough
Yes, of the reset and external initial condition source ports
Sample Time
Discrete
Scalar Expansion
Of parameters
States
Inherited from driving block and parameter
Dimensionalized
Yes
Zero Crossing
One for detecting reset, one each to detect upper and lower saturation limits, one when leaving saturation


  Discrete State-Space Discrete Transfer Fcn