Design high-pass filters using MATLAB
A high-pass filter attenuates signals below a cutoff frequency (the stopband) and allows signals above the cutoff frequency (the passband). The amount of attenuation depends on the design of the filter.
High-pass filters are often used to clean up low-frequency noise, remove humming sounds in audio signals, redirect higher frequency signals to appropriate speakers in sound systems, and remove low-frequency trends from time-series data, thereby highlighting the high-frequency trends.
You can use MATLAB® to design finite impulse response (FIR)-based and infinite impulse response (IIR)-based filters, two common high-pass filter methods.
FIR filters are very attractive because they are inherently stable. They can be designed to have linear phase that introduces a delay in the filtered signal while maintaining the waveform shape. Nonetheless, these filters can have long transient responses and might prove computationally expensive in certain applications. FIR filters are useful in audio, biomedical, radar, and other applications where the waveform shape provides useful information. Common design methods for low-pass FIR-based filters include Kaiser window, least squares, and equiripple.
IIR filters are useful when computational resources are at a premium. However, stable, causal IIR filters do not have perfectly linear phase. IIR filters are commonly used in audio equalization, biomedical sensor signal processing, IoT/IIoT smart sensors, and high-speed telecommunication/RF applications. Design methods for IIR-based filters include Butterworth, Chebyshev (Type-I and Type-II), and elliptic.
highpass function in Signal Processing Toolbox™ is particularly useful to quickly filter signals. You can use designfilt and other algorithm-specific (
butter, fir1) functions when more control is required on parameters such as filter type, filter order, and attenuation. For more information on filter design, see Signal Processing Toolbox™ .