Discrete or continuous-time low-pass filter
Expand All on Page
Libraries:
Simscape / Electrical / Controls / General Controls
Description
IsLow-pass filter (discrete or continuous)block implements a low-pass filter according to IEEE 421.5-2016[1]. In the standard, the filter is referred to as a simple time constant.
You can switch between continuous and discrete implementation of the integrator using thesample timeParameter.
equations
Continually
To set the continuous time filter, set thesample timeproperty to0
. This representation corresponds to the continuous transfer function:
Wo:
kis the gain of the filter.
Tis the time constant of the filter.
From the previous transfer function, the equations that define the filter are:
Wo:
Tuis filter input.
Xis the condition of the filter.
jis the output of the filter.
Tis the simulation time.
Tu0is the initial input for the block.
Discreet
To configure the discrete time filter, configure thesample time-Property to a positive non-zero value or on-1
to inherit the sample time from a previous block. The discrete representation corresponds to the transfer function:
Wo:
kis the gain of the filter.
Tis the time constant of the filter.
TSis the filter sampling time.
Starting from the discrete transfer function, the filter equations are defined by the direct Euler method:
Wo:
Tuis the input of the filter.
Xis the condition of the filter.
jis the output of the filter.
Norteis the simulation time step.
Tu0is the initial input for the block.
initial conditions
To specify the initial conditions for this block, setinitializationA:
Inherited from block input
— The block sets the initial output state and conditions to the initial input.Specify as a parameter
— The block sets the initial condition of the state to the value ofinitial state.
Limitation of the integral
ChooseUpper limit of saturationjLower limit of saturationParameter to use anti-windup saturation method.
The anti-windup technique limits the state of the integrator between the lower saturation limitAand upper saturation limitB:
Because the state is clipped, the output can respond immediately to an input sign reversal when the integral saturates. This block diagram shows the implementation of the anti-windup saturation method in the filter.
This block does not provide a saturation accounting method. To use the windup saturation method, set theUpper limit of saturationParameter ainf
, IsLower limit of saturationParameter a-inf
and append asaturationblock at the exit.
Bypass filter dynamics
Set the time constant to a value less than or equal to the sample time to ignore filter dynamics. If omitted, the block feeds the gain-scaled input directly to the output:
In the continuous case, the sampling time and the time constant must be zero.
examples
open model
open model
open model
ports
Entry
expand all
Tu—filter input
Vector
Low-pass filter input signal. The block uses the initial input value to determine the initial value of the state.
Type of data:einzel
|double
Production
expand all
j—filter output
Vector
low pass filter output.
Type of data:einzel
|double
Parameter
expand all
Win—filter gain
1
(Default) | positive number
Gain of the low-pass filter.
constant time—filter time constant
1
(Default) | positive number
Time constant of the low-pass filter. Set this value to less than in the discrete implementationsample timeto bypass the dynamics of the filter.
Upper limit of saturation—state cap
inf
(Default) | Real number
Upper state limit of the low-pass filter. Set thisinf
for an unsaturated upper limit or to a finite value to avoid upper unwinding of the filter's integrator.
Lower limit of saturation—lower state border
-inf
(Default) | Real number
Lower state limit of the low-pass filter. Set this-inf
for an unsaturated lower bound, or to a finite value to avoid a slight reduction in the filter integrator.
initialization—Specification of the initial state
Inherited from block input
(Standard) |Specify as a parameter
Give the initial state condition for this block. For more information, seeinitial conditions.
initial state—initial state
0
(Default) | Real number
initial state of the block.
dependencies
To enable this parameter, setinitializationASpecify as a parameter
.
Sample Time (-1 for Legacy)—block sampling time
-1
(Standard) |0
| positive Skala
Time between consecutive executions of blocks. During execution, the block generates output and updates its internal state as necessary. For more information, seeWhat is trial period?jSpecify probationary period.
For legacy discrete-time operation, set this parameter to-1
. Set this parameter to a positive integer for discrete-time operation. Set this parameter to for continuous timed operation0
.
If this block is in a masked subsystem or subsystem variant that supports switching between continuous and discrete operation, promote this parameter to ensure correct switching between continuous and discrete implementation of the block. For more information, seeFoster block parameters in a skin.
references
[1]IEEE Recommended Practice for Excitation System Models for Power System Stability Studies.IEEE-Standard 421.5-2016. Piscataway, NJ: IEEE-SA, 2016.
advanced skills
C/C++ code generation
Generate C and C++ code with Simulink® CoderTM.
history
Introduced in R2017b
See also
blocks
- Filtered derivative (discrete or continuous)|Lead lag (discrete or continuous)|Washed (discreetly or continuously)|Integrator (discrete or continuous)|Wrapped-state integrator (discrete or continuous)
ComandoMATLAB
You clicked a link that corresponds to this MATLAB command:
Run the command by typing it in the MATLAB command window. Web browsers do not support MATLAB commands.
Select a site to get translated content where available and view local events and offers. Depending on your location, we recommend you select the following:.
You can also select a website from the list below:
America
- Latin America(Spanish)
- You have(English)
- USA(English)
Europa
- Belgium(English)
- Denmark(English)
- Deutschland(Deutsch)
- Spain(Spanish)
- Finland(English)
- France(French)
- Ireland(English)
- Italy(Italian)
- Luxemburg(English)
- Netherlands(English)
- Norway(English)
- Austria(Deutsch)
- Portugal(English)
- Sweden(English)
- Swiss
- Deutsch
- English
- French
- Great Britain(English)
Pacific Asia
- Australia(English)
- If(English)
- New Zealand(English)
- porcelain
- Japan(Japanese)
- Korea(Korean)
Contact your local office