Main Content

First-Order Filter

Implement first-order filter

  • First-Order Filter block

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

Description

The First-Order Filter block implements one of the following transfer functions based on the Filter type selected in the block parameters window.

Low-pass filter:

H(s)=11+Ts

High-pass filter:

H(s)=Ts1+Tss=Laplace operatorT=time constant

Characteristics

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

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

  • You can initialize filter states for specified DC and AC inputs.

  • The block enables you to compute and plot filter response.

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

Examples

expand all

The power_FirstOrderFilter example shows various uses of the First-Order Filter block using two Filter type parameter settings (Lowpass and Highpass).

The model sample time is parameterized with variable Ts (default value Ts = 50e-6). To simulate continuous filters, specify Ts = 0 at the MATLAB® command prompt before you start.

Ports

Input

expand all

First-order filter input signal, specified as a scalar or a vector.

Output

expand all

First-order filter output signal, returned as a scalar or vector.

Parameters

expand all

Determine the type of first-order filter. Set to Lowpass to implement a low-pass filter, set to Highpass to implement a high-pass filter.

First-order filter time constant, specified in seconds.

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

When selected, the filter states are initialized according to the AC initial input: [ Mag, Phase (degrees), Freq (Hz) ] and DC initial input parameters.

Specify the 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. Phase can be any value. Mag and Freq must be positive.

Dependencies

To enable this parameter, select Initialize filter states.

Specify the value of the 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.

Dependencies

To enable this parameter, select Initialize filter states.

When selected, the filter step response and its Bode diagram (magnitude and phase of transfer function as a function of frequency) are plotted in a figure.

The frequency range used 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 Plot filter response.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a