Main Content

Second-Order Filter

Implement second-order filter

  • Second-Order Filter block

Libraries:
Simscape / Electrical / Specialized Power Systems / Control / Filters

Description

Based on the Filter type selected in the block menu, the Second-Order Filter block implements the following transfer function:

Low-pass filter:

H(s)=ωn2s2+2ζωns+ωn2

High-pass filter:

H(s)=s2s2+2ζωns+ωn2

Band-pass filter:

H(s)=2ζωnss2+2ζωns+ωn2

Band-stop (notch) filter:

H(s)=s2+ωn2s2+2ζωns+ωn2

s=Laplace operatorωn=natural frequency; ωn=2πfnζ=damping ratio (called Zeta in the block menu)

The key characteristics of the Second-Order Filter block are:

  • Input accepts a vectorized input of N signals, implementing N filters. This feature is particularly useful for designing controllers in three-phase systems (N = 3).

  • Filter states can be initialized for specified DC and AC inputs.

  • It enables you to compute and plot filter response.

Characteristics

Direct FeedthroughYes
Sample TimeSpecified in the Sample Time parameter
Continuous if Sample Time = 0
Scalar ExpansionYes, of the parameters
StatesTwo states per filter
DimensionalizedYes

Examples

The power_SecondOrderFilter example shows the Second-Order Filter block using two Filter type parameter settings (Lowpass and Bandstop).

The model sample time is parameterized with variable Ts (default value Ts = 50e-6). To simulate continuous filters, specify Ts = 0 in the MATLAB® Command Window before starting the simulation.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Specify the type of filter: Lowpass, Highpass, Bandpass (default), or Bandstop (notch).

Nnatural frequency of the filter, in hertz.

Damping ratio of the filter. The damping ratio is typically a value between 0 and 1.

The damping ratio is related to the filter quality factor Q:

Q=12ζ

For a bandpass or a bandstop filter, the 3 dB bandwidth is given by

BW=fnQ=2ζfn

Sample time of the block, in seconds. Set to 0 to implement a continuous block.

Select this parameter to initialize the filter states according to the AC initial input and DC initial input parameters.

Magnitude of the initial AC component of the input signal, its phase, in degrees, and its frequency, in hertz.

When the input is vectorized (N signals), specify an N-by-3 matrix, where each row of the matrix corresponds to a particular input.

Dependencies

To enable this parameter, select the Initialize filter states parameter.

Initial DC component of the input signal. When the input signal is vectorized, specify a 1-by-N vector, where each value corresponds to a particular input.

The DC initial input parameter is visible only when the Initialize filter states parameter is selected.

Dependencies

To enable this parameter, select the Initialize filter states parameter.

Select this parameter to plot the filter step response and its Bode diagram (magnitude and phase of transfer function as a function of frequency) in a figure.

Frequency range for plotting the filter Bode diagram. Specify a vector containing the starting frequency, the end frequency, and the incremental frequency, in hertz.

Dependencies

To enable this parameter, select the Plot filter response parameter.

Version History

Introduced in R2013a