# Fourth-Order Section Filter

Implement cascade of fourth-order section filters

• Library:
• DSP System Toolbox / Filtering / Filter Implementations

## Description

The Fourth-Order Section Filter block implements a cascade of fourth-order section filters in Simulink®. You can specify the numerator and denominator coefficients of the filter in the block parameters dialog box or through input ports.

## Ports

### Input

expand all

Input signal, specified as a vector or a matrix. The input can be a variable size signal. That is, the frame size of the signal can change during simulation but the number of channels cannot.

This port is unnamed until you select the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

Specify the numerator coefficients of the fourth-order section filter as a P-by-5 matrix, where P is the number of filter sections. For more details on this input port, see Numerator coefficients of filter.

You cannot change the size of this parameter during simulation, but you can change its value.

#### Dependencies

This port appears only when you select the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

Specify the denominator coefficients of the fourth-order section filter as a P-by-5 matrix or a P-by-4 matrix, where P is the number of filter sections. For more details on this input port, see Denominator coefficients of filter.

You cannot change the size of this parameter during simulation, but you can change its value.

#### Dependencies

This port appears only when you select the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

### Output

expand all

Filtered output, returned as a vector or a matrix. The output has the same size and data type as the input. The output signal is complex if either the input signal, numerator coefficients, or the denominator coefficients are complex.

This port is unnamed until you select the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

## Parameters

expand all

When you select this parameter, you can input the fourth-order section filter coefficients through the input ports Num and Den. Clear this parameter to specify the coefficients in the block parameters dialog box through the Numerator coefficients of filter and the Denominator coefficients of filter parameters.

To view the filter response, clear this parameter, specify the coefficients in the block dialog box, and click the button.

Specify the numerator coefficients b of the fourth-order section filter as a P-by-5 matrix, where P is the number of filter sections.

`$b=\left[\begin{array}{ccccc}{b}_{01}& {b}_{11}& {b}_{21}& {b}_{31}& {b}_{41}\\ {b}_{02}& {b}_{12}& {b}_{22}& {b}_{32}& {b}_{42}\\ ⋮& ⋮& ⋮& \ddots & ⋮\\ {b}_{0P}& {b}_{1P}& {b}_{2P}& {b}_{3P}& {b}_{4P}\end{array}\right]$`

In the transfer function form, the fourth-order section filter can be represented using the following equation:

`$H\left(z\right)=\prod _{k=1}^{P}{H}_{k}\left(z\right)=\prod _{k=1}^{P}\frac{{b}_{0k}+{b}_{1k}{z}^{-1}+{b}_{2k}{z}^{-2}+{b}_{3k}{z}^{-3}+{b}_{4k}{z}^{-4}}{{a}_{0k}+{a}_{1k}{z}^{-1}+{a}_{2k}{z}^{-2}+{a}_{3k}{z}^{-3}+{a}_{4k}{z}^{-4}}$`

where,

• a –– Denominator coefficients matrix. For more details on how to specify this matrix, see Denominator coefficients of filter.

• k –– Row index.

You cannot change the size of this parameter during simulation, but you can change its value.

Tunable: Yes

#### Dependencies

To enable this parameter, clear the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

Specify the denominator coefficients a of the fourth-order section filter as a P-by-5 matrix or a P-by-4 matrix, where P is the number of filter sections.

`$a=\left[\begin{array}{ccccc}{a}_{01}& {a}_{11}& {a}_{21}& {a}_{31}& {a}_{41}\\ {a}_{02}& {a}_{12}& {a}_{22}& {a}_{32}& {a}_{42}\\ ⋮& ⋮& ⋮& \ddots & ⋮\\ {a}_{0P}& {a}_{1P}& {a}_{2P}& {a}_{3P}& {a}_{4P}\end{array}\right]$`

The block algorithm assumes that the value of the leading coefficients is always 1. If the denominator is of size P-by-4, the block algorithm places 1s in the first column to make the denominator size P-by-5. If the denominator is of size P-by-5 and the elements in the first column do not equal 1, the algorithm ignores the values in the first column and appends them with 1s.

In the transfer function form, the fourth-order section filter can be represented using the following equation:

`$H\left(z\right)=\prod _{k=1}^{P}{H}_{k}\left(z\right)=\prod _{k=1}^{P}\frac{{b}_{0k}+{b}_{1k}{z}^{-1}+{b}_{2k}{z}^{-2}+{b}_{3k}{z}^{-3}+{b}_{4k}{z}^{-4}}{{a}_{0k}+{a}_{1k}{z}^{-1}+{a}_{2k}{z}^{-2}+{a}_{3k}{z}^{-3}+{a}_{4k}{z}^{-4}}$`

where,

• b –– Numerator coefficients matrix. For more details on how to specify this matrix, see Numerator coefficients of filter.

• k –– Row index.

You cannot change the size of this parameter during simulation, but you can change its value.

Tunable: Yes

#### Dependencies

To enable this parameter, clear the Specify filter coefficients from input port parameter.

Data Types: `single` | `double`
Complex Number Support: Yes

Click on this button to open the dynamic filter visualizer and display the magnitude response of the fourth-order section filter. The response is based on the coefficients that you specify in the block dialog box. If you select the Specify filter coefficients from input port parameter and specify the coefficients through the input port, you cannot view the magnitude response using this button. To view the response in the dynamic filter visualizer, you must specify the filter coefficients through the block dialog box.

To update the magnitude response while the dynamic filter visualizer is running, modify the coefficients in the block dialog box and click .

You can configure the plot settings and the signal measurements from the user interface of the visualizer.

Use the Configuration section on the Plot tab to modify the plot settings.

Use the Measurements tab to measure the signal statistics, place data cursors, and display the peak values of the selected signal.

For more details on the dynamic filter visualizer user interface and its tools, see `dsp.DynamicFilterVisualizer`.

Type of simulation to run. You can set this parameter to:

• `Interpreted execution`: Simulate model using the MATLAB® interpreter. This option shortens startup time.

• `Code generation`: Simulate model using generated C code. The first time you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time but provides faster subsequent simulations.

## Block Characteristics

 Data Types `double` | `integer` | `single` Direct Feedthrough `no` Multidimensional Signals `no` Variable-Size Signals `yes` Zero-Crossing Detection `no`

## Version History

Introduced in R2022a