Design FIR or IIR highpass filter
DSP System Toolbox / Filtering / Filter Designs
The Highpass Filter block independently filters each channel of the input signal over time using the given design specifications. You can control whether the block implements an IIR or FIR highpass filter using the Filter type parameter.
This block supports ARM® Cortex® code generation. Under specific conditions, this block also supports SIMD code generation. For details, see Code Generation.
Port_1 — Input signal to filter
column vector | matrix
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.
Complex Number Support: Yes
Port_1 — Filtered signal
vector | matrix
Filtered signal, specified as a vector or matrix. The output has the same size and complexity characteristics as the input. If the output has a fixed-point data type, it is always signed.
Complex Number Support: Yes
Filter type — FIR or IIR filter
FIR (default) |
Specify whether the block implements an FIR highpass filter or an IIR highpass filter.
Design minimum order filter — Design filter with minimum order
on (default) |
When you select this check box, the block designs a filter with minimum order. When you clear this check box, you can specify the Filter order as a positive integer.
Filter order — Order of highpass filter
50 (default) | positive integer
Filter order of highpass filter, specified as a positive scalar integer.
To enable this parameter, clear the Design minimum order filter check box.
Stopband edge frequency (Hz) — Stopband edge frequency
8e3 (default) | real positive scalar
Stopband edge frequency of the highpass filter, specified as a real positive scalar in Hz. The value of the stopband edge frequency in Hz must be less than the passband frequency.
To enable this parameter, select the Design minimum order filter check box.
Passband edge frequency (Hz) — Passband edge frequency
12e3 (default) | real positive scalar
Passband edge frequency of the highpass 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).
Minimum stopband attenuation (dB) — Minimum stopband attenuation
80 (default) | real positive scalar
Minimum attenuation in the stopband, specified as a real positive scalar in dB.
Maximum passband ripple (dB) — Maximum passband ripple
0.1 (default) | real positive scalar
Maximum ripple of the filter response in the passband, specified as a real positive scalar in dB.
Inherit sample rate from input — Inherit sample rate from input
off (default) |
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 (Hz) — Input sample rate
44100 (default) | scalar
Input sample rate, specified as a scalar in Hz.
Simulate using — Type of simulation to run
execution (default) |
Type of simulation to run:
Simulate model using the MATLAB® interpreter. This option shortens startup time but has slower simulation speed than
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
View Filter Response — Open Filter Visualization Tool
Opens the Filter Visualization Tool (
fvtool) and displays the
magnitude/phase response of the highpass filter. The response is based
on the block dialog box parameters. Changes made to these parameters
To update the magnitude response while FVTool is running, modify the dialog box parameters and click Apply.
Rounding mode — Rounding method
Floor (default) |
Rounding method for the output fixed-point operations.
Coefficients — Coefficient data type
fixdt(1,16) (default) |
<data type expression>
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
16and 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 (
15)). Specify the sign mode of this data type as
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).
This block brings the capabilities of the
System object™ to the Simulink environment.
For information on the algorithms used by this block, see the Algorithms section of
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
The Highpass Filter block supports ARM Cortex code generation. To learn more about ARM Cortex code generation, see Code Generation for ARM Cortex-M and ARM Cortex-A Processors.
The Highpass Filter block also supports SIMD code generation using Intel AVX2 technology under these conditions:
Filter type is set to
Input signal has a data type of
The SIMD technology significantly improves the performance of the generated code.
Design and simulate fixed-point systems using Fixed-Point Designer™.
Introduced in R2015b