| Using Simulink | Search  Help Desk |
| Discrete-Time Integrator |
Perform discrete-time integration of a signal.
Library
DiscreteDescription
Integration Methods
The block can integrate using these methods: Forward Euler, Backward Euler, and Trapezoidal. For a given stepk, 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, x(0)=IC (clipped if necessary):
1/s is approximated by T/(z-1). This gives us y(k) = y(k-1) + T * u(k-1).
Let x(k) = y(k), then we have:
x(k+1) = x(k) + T*u(k) (clip if necessary)y(k) = x(k)
With this method, input port 1 does not have direct feedthrough.
1/s is approximated by T*z/(z-1). This gives us y(k) = y(k-1) + T * u(k).
Let x(k) = y(k-1), then we have:
x(k+1) = y(k)
y(k) = x(k) + T * u(k) (clip if necessary)
With this method, input port 1 has direct feedthrough.
1/s is approximated by T/2*(z+1)/(z-1). This gives us y(k) = y(k-1) + T/2 * (u(k) + u(k-1)).
When T is fixed (equal to the sampling period), let x(k) = y(k-1) + T/2 * u(k-1), then we have:
x(k+1) = y(k) + T/2*u(k) (clip if necessary) y(k) = x(k) + T/2*u(k) (clip if necessary)
Here, x(k+1) is the best estimate of the next output. It isn't quite the state, in the sense that x(k) != y(k).
When T is variable (that is, obtained from the triggering times), we have:
x(k+1) = y(k)
y(k) = x(k) + T/2 * (u(k) + u(k-1)) (clip if necessary)
With this method, input port 1 has direct feedthrough.
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 known situations, you must use the state port instead of the output port:bounce model.
clutch model.

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 is outside 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:
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.
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 typedouble.
Parameters and Dialog Box

ForwardEuler.inf.-inf.1.Characteristics