Documentation Home Page ◇ RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
RTE Integrator
Library
RT-EVENTS Discrete
Block
Description
The RTE Integrator block integrates the input signal and compensates for the discrete-time error that takes place because of the occurrences of discrete reset events between the sampling points. The output of the integrator is the result of the integration.
The integrator block also allows you to:
- Select the integration methods.
- Reset the integrator depending on a reset input.
- Define the initial conditions and the source of the initial conditions in the block dialog box.
- Define upper and lower limits on the integral.
Selecting the integration methods
The block can integrate using these methods: Trapezoidal or RT-EVENTS. For a given step k, Simulink updates its output y(k) and state x(k+1). Ts is the sampling period. Values are clipped according to upper or lower limits. In all cases, the initial output of the block is always the initial condition.
- Trapezoidal method. For this method, the integration 1/s is approximated by Ts/2*(z+1)/(z-1) and the input ports have direct feedthrough.
- RT-EVENTS method. For this method, the integration 1/s is approximated using a proprietary relation. With this method, input ports have non-direct feedthrough. This method allows the block to directly connect its outputs to inputs without using another block that has non-direct feedthrough in the loop.
Resetting the State
The block can reset its state to zero (or to initial condition) based on an RTE Boolean reset signal. To cause the block to reset its state, select one of the reset choices available in the block dialog box.
Select rising to trigger the state reset when the reset signal has a rising edge. Select falling to trigger the state reset when the reset signal has a falling edge. Select either to trigger the reset when either a rising or a falling signal occurs.
Defining Initial Conditions
You can define initial conditions as a parameter in the block's mask or you can input them as an external signal. To define the initial conditions as a block parameter, specify the Initial condition source parameter as internal and enter the value in the Initial condition parameter field. To provide the initial conditions from an external source, specify the Initial condition source parameter as external. An additional input port appears under the block input.
Limiting the Integral
To prevent the output from exceeding specific levels, select the Limit output checkbox 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 windup.
Mask
Parameters
Integrator Method | The integration method. The default is Trapezoidal |
---|---|
External Reset | Resets the states to zero or to their initial conditions when a trigger event (rising, falling, either, level) occurs in the RTE Boolean 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 checked, 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. |
Sample time | The time interval between samples. |
Input
Input (Double) | Signal to integrate. |
---|---|
Reset (RTE Boolean) | RTE Boolean signal used to reset the state of the integrator. |
Initial Condition (Double) | The states' initial condition. Set the Initial condition source parameter value to external |
Output
Output (Double) | Integral of the input. |
---|
Characteristics
Direct Feedthrough | Yes for trapezoidal method. No for RT-EVENTS method. |
---|---|
Sample Time | Fixed discrete. |
Work offline | Yes |
Dimensionalized | Yes |
Example
The rte_resetwalk.mdl model shows the difference between a compensated event-based discrete system, an uncompensated simulated event-based discrete system and a continuous system and demonstrates the accuracy of the RTE blocks compared to the equivalent discrete block.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter