Low-Pass Filter (Discrete or Continuous)
A low-pass filter of discrete or continuous time.
blockType: SubSystem
Path in the library:
|
Description
Block Low-Pass Filter (Discrete or Continuous) Implements a low-pass filter in accordance with IEEE 421.5-2016 [1]. According to the standard, the filter is called a simple time constant.
You can switch between continuous and discrete filter implementations using the parameter Sample time (-1 for inherited).
The equations
notable mode
To set the filter for continuous operation, set the parameter Sample time (-1 for inherited) meaning 0. This representation is equivalent to a continuous transfer function.:
where
-
— filter gain factor;
-
— the time constant of the filter.
From the above transfer function, the equations defining the filter have the form:
where
-
— simulation time;
-
— filter input signal;
-
— filter output signal;
-
— filter status;
-
— the initial input signal of the block.
discret mode
To set the filter to work in discrete mode, set the parameter Sample time (-1 for inherited) a positive non-zero value or a value −1 to inherit the sampling period from the upstream block. The discrete representation is equivalent to the transfer function:
where
-
— filter gain factor;
-
— filter time constant;
-
— the sampling period of the filter.
Based on the discrete transfer function, the filter equations are determined using the direct Euler method:
where
-
— time step of the simulation;
-
— filter input signal;
-
— filter output signal;
-
— filter status;
-
— the initial input signal of the block.
Determining the initial conditions
The initial conditions of the block can be set using the parameter Initialization. Set the value:
-
Inherited from block input— the unit will set the initial conditions of the status and output signal equal to the initial input value; -
Specify as parameter— the block will set the initial condition of the state equal to the value of the parameter Initial state.
Limitation of the integral
To limit the output signal of the integral, set the parameters Upper saturation limit and Lower saturation limit to use the saturation method with protection against oversaturation.
The anti-windup method limits the state of the integrator the range between the lower saturation limit and the upper limit of saturation :
Since the state is limited, the output signal can immediately respond to a change in the sign of the input signal when the integral is saturated. The following flowchart illustrates the implementation of the saturation method with protection against oversaturation in the filter.

This block does not provide an integral saturation (windup) method. To use the integral saturation method, set the parameter Upper saturation limit meaning Inf, and for the parameter Lower saturation limit meaning −Inf and connect the unit Saturation to the output signal.
Bypassing the filter dynamics
Set the time constant to a value less than or equal to the sampling period to ignore the filter dynamics. When bypassing the block, the gain-calibrated input signal is applied directly to the output.:
In continuous mode, the sampling period and the time constant must be zero.
Ports
Input
#
u
—
filter input
vector
Details
The input signal of the low-pass filter. The block uses the initial value of the input signal to determine the initial value of the state.
| Data types |
|
| Complex numbers support |
I don’t |
Output
#
y
—
filter output signal
vector
Details
The output signal of the low-pass filter.
| Data types |
|
| Complex numbers support |
I don’t |
Parameters
Main group
# Gain — filter gain factor
Details
The gain of the low-pass filter.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Time constant — filter time constant
Details
The time constant of the low-pass filter. In the discrete implementation, set this parameter to a value less than the parameter value. Sample time (-1 for inherited) to bypass the filter dynamics.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Upper saturation limit — upper limit of the condition
Details
The upper limit of the low-pass filter state. Set the value Inf for an unsaturated upper limit or a finite value to prevent overflow of the upper limit of the filter integrator.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Lower saturation limit — the lower limit of the condition
Details
The lower limit of the low-pass filter state. Set the value −Inf for an unsaturated lower limit or a finite value to prevent overflow of the lower limit of the filter integrator.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Initialization —
the method of setting the initial state
Inherited from block input | Specify as parameter
Details
Select the initial state for this block. For more information, see Determining the initial conditions.
| Values |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Initial state — initial state
Details
The initial state of the block.
Dependencies
To use this parameter, set for the parameter Initialization meaning Specify as parameter.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Sample time (-1 for inherited) — block sampling period
Details
The time between consecutive block executions. During execution, the block generates output signals and, if necessary, updates its internal state.
For the inherited discrete time mode, set this parameter to −1. For discrete mode, set this parameter to a positive integer. For continuous mode, set this parameter to 0.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |