Decimate signal using polyphase FIR halfband filter
The FIR Halfband Decimator block performs polyphase decimation of the input signal by a factor of two. The block uses an FIR equiripple design to construct the halfband filters. The implementation takes advantage of the zero-valued coefficients of the FIR halfband filter, making one of the polyphase branches a delay. You can also use the block to implement the analysis portion of a two-band filter bank to separate a signal into lowpass and highpass subbands.
The input signal can be 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 must be a multiple of 2. The block supports fixed-point operations and ARM® Cortex® code generation. For more information on ARM Cortex code generation, refer ARM Cortex-M and ARM Cortex-A Optimization.
Parameters used to design the FIR halfband filter. Because the filter design has only two degrees of freedom, you can specify only two of three parameters:
Transition width and stopband attenuation
(default) — Design the filter using Transition width
(Hz) and Stopband attenuation (dB).
This design is the minimum order design.
Filter order and transition width —
Design the filter using Filter order and Transition
Filter order and stopband attenuation —
Design the filter using Filter order and Stopband
Transition width, specified as a real positive scalar in Hz.
The transition width must be less than half the input sample rate.
You can specify the transition width when Filter specification is
Filter order and transition width or
width and stopband attenuation. The default is
Filter order, specified as an even positive integer. You can
specify the filter order when Filter specification is
Filter order and transition width or
order and stopband attenuation. The default is
Stopband attenuation, specified as a real positive scalar in
dB. You can specify the stopband attenuation when Filter
specification is set to
Filter order and stopband
Transition width and stopband
attenuation. The default is
When you select this check box, the block acts as a synthesis filter bank and synthesizes a signal from the highpass and lowpass subbands. When you clear this check box, the block acts as an FIR halfband decimator and accepts a single vector– or matrix–valued input.
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 in Input sample rate (Hz).
Input sample rate, specified as a scalar in Hz. The default
Opens the Filter Visualization Tool FVTool and displays the magnitude/phase response of the FIR Halfband Decimator. 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.
Type of simulation to run. You can set this parameter to:
Code generation (default)
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
Simulate model using the MATLAB® interpreter. This
option shortens startup time but has slower simulation speed than
Rounding method for the output fixed-point operations. The rounding
Zero. The default is
Fixed-point data type of the coefficients, specified as one of the following:
— Signed fixed-point data type of word length
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.
Signed fixed-point data type of word 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 (
the sign mode of this data type as
[ ] or
Refresh Data Type — Refreshes
to the default data type.
Click the Show data type assistant button to display the data type assistant, which helps you set the stage input parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
|Port||Supported Data Types|
This block brings the capabilities of the
the Simulink environment.
For information on the algorithms used by this block, see the Algorithms section