Lowpass Filter

Design FIR or IIR lowpass filter

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

  • Lowpass Filter block

Description

The Lowpass Filter block independently filters each channel of the input signal over time using the filter design specified by the block parameters. You can control whether the block implements an IIR or FIR lowpass filter using the Filter type parameter.

Ports

Input

expand all

Input signal, specified as a real- or complex-valued column vector or matrix. If the input signal is a matrix, each column of the matrix is treated as an independent channel. The number of rows in the input signal denotes the channel length.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point
Complex Number Support: Yes

Output

expand all

Filtered signal, specified as a vector or matrix. The output has the same size, data type, and complexity characteristics as the input.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point
Complex Number Support: Yes

Parameters

expand all

Main

Specify whether the block implements an FIR lowpass filter or an IIR lowpass filter.

When you select this check box, the block designs a filter with the minimum order and the specified passband, stopband frequency, passband ripple, and stopband attenuation.

When you clear this check box, you can specify the Filter order as a positive integer.

Filter order of lowpass filter, specified as a positive scalar integer.

Dependencies

To enable this parameter, clear the Design minimum order filter check box.

Passband edge frequency of the lowpass filter, specified as a real positive scalar in Hz. The passband edge frequency must be less than half the value of the Input sample rate (Hz).

Stopband edge frequency of the lowpass filter, specified as a real positive scalar in Hz. The stopband edge frequency must be less than half the value of the Input sample rate (Hz).

Dependencies

To enable this parameter, select the Design minimum order filter check box.

Maximum ripple of the filter response in the passband, specified as a real positive scalar in dB.

Minimum attenuation in the stopband, specified as a real positive scalar in dB.

When you select this check box, the block inherits its sample rate from the input signal. When you clear this check box, you specify the sample rate using the Input sample rate (Hz) parameter.

Input sample rate, specified as a scalar in Hz.

Dependencies

To enable this parameter, clear the Inherit sample rate from input check box.

Type of simulation to run:

  • Interpreted execution (default)

    Simulate model using the MATLAB® interpreter. This option shortens startup time but has slower simulation speed than Code generation.

  • 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 simulation speed than Interpreted execution.

Opens the Filter Visualization Tool (fvtool) and displays the magnitude/phase response of the Lowpass Filter. The response is based on the block dialog box parameters. Changes made to these parameters update FVTool.

To update the magnitude response while FVTool is running, modify the dialog box parameters and click Apply.

Data Types

Rounding method for the output fixed-point operations.

Fixed-point data type of the coefficients, specified as one of the following:

  • fixdt(1,16) — Signed fixed-point data type of word length 16, with binary point scaling. The block determines the fraction length automatically from the coefficient values in such a way that the coefficients occupy maximum representable range without overflowing.

  • fixdt(1,16,0) — Signed fixed-point data type of word length 16 and fraction length 0. You can change the fraction length to any other integer value.

  • <data type expression> — Specify the data type using an expression that evaluates to a data type object, for example, numeric type (fixdt([ ],16, 15)). Specify the sign mode of this data type as [ ] or true.

  • Refresh Data Type — Refresh to the default data type.

Click the Show data type assistant button to display the data type assistant, which helps you set the data type. For more information, see Specify Data Types Using Data Type Assistant (Simulink).

Block Characteristics

Data Types

double | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

yes

Zero-Crossing Detection

no

Algorithms

This block brings the capabilities of the dsp.LowpassFilter System object™ to the Simulink environment.

For information on the algorithms used by this block, see the Algorithms section of the dsp.LowpassFilter System object.

Extended Capabilities

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced in R2015b