Comparison and application of IIR digital filter design methods based on Matlab

Publisher:耿高良Latest update time:2010-08-16 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

A digital filter is a device that changes the relative proportion of frequency components contained in the input signal or filters out certain frequency components through a certain operation relationship, with both input and output being discrete time signals. Digital filters play a very important role in digital signal processing and are the most widely used linear system in terms of signal filtering, detection and parameter estimation.

There are two ways to implement digital filters. One is to use computer software, that is, to let the computer do the work through the program; the other is to design dedicated digital processing hardware. This place mainly uses the first method, that is, to use the signal processing toolbox provided by Mafiab to implement digital filters.

Matlab signal processing toolbox provides a wealth of design methods, which can simplify tedious program design into function calls. As long as the function is called with the correct indicator parameters, the design results can be obtained correctly and quickly.

1 Comparison of IIR digital filter design methods

1.1 Overview

The most common method of IIR digital filter is to use the design method of analog filter. Analog filter design has quite mature technology and methods, complete design formulas, and relatively complete charts can be consulted, so the design of digital filter can make full use of these rich resources.

The specific steps for designing IIR digital filters are as follows:

(1) According to certain rules, the technical indicators of the given digital filter are converted into the technical indicators of the analog low-pass filter.

(2) Design an analog low-pass filter G(s) based on the converted technical indicators (G(s) is the transfer function of the low-pass filter).

(3) Then, according to certain rules, convert G(s) into H(z) (H(z) is the transfer function of the digital filter). If the designed digital filter is a low-pass filter, the above process can be completed. If the designed digital filter is a high-pass filter, a band-pass filter, or a band-stop filter, the following steps are required:

Convert the technical specifications of high-pass, band-pass or band-stop digital filters into those of low-pass analog filters, then design the low-pass G(s), and then convert G(s) into H(z).

Matlab signal toolbox provides several functions for directly designing IIR digital filters. By calling these functions directly, you can easily design the filter. Here we select Butterworth method, Chebyshev I, Chebyshev II, and elliptic method for comparison. The functions for designing digital filters using the above methods are given as follows:

program

Where: Wp represents the passband cutoff frequency; Ws represents the stopband cutoff frequency; Rp represents the passband ripple coefficient; Rs represents the stopband ripple coefficient; N represents the minimum filter order; Wn represents the cutoff frequency. b, a represent the numerator and denominator polynomial coefficient vectors of the transfer function of the digital filter system with an order of N+1; Fs represents the sampling frequency; n represents the number of frequency points selected in the frequency range of the interval [O Fs]; f represents the number of frequency points. n is a power of 2, which can increase the speed of the operation, because the freqz function uses a base 2 FFT algorithm. When ftype=high, it is a high-pass filter; when ftype=bandpass, it is a band-pass filter; when ftype=stop, it is a band-stop filter.

program

1.2 Comparison of four design methods

(1) Comparison in low-pass filters

Assume: Wp=20 Hz, Ws=50 Hz, Fs=200, Rp=1 dB, Rs=30 dB, use Butterworth low-pass filter, Chebyshev I low-pass filter, Chebyshev II low-pass filter, elliptic low-pass filter to design, as shown in Figure 1.

Amplitude-frequency response curve of low-pass digital filter

(2) Comparison in high-pass filters

Assume: Wp=50 Hz, Ws=20 Hz, Fs=200, Rp=1 dB, Rs=30 dB, use Butterworth high-pass filter, Chebyshev I high-pass filter, Chebyshev II high-pass filter, elliptic high-pass filter to design, as shown in Figure 2.

High-pass digital filter amplitude-frequency response curve

(3) Comparison in bandpass filters

Assume: Wp=[100, 200], Ws=[50, 250], Rp=3 dB, Rs=30 dB, Fs=1 000, use Butterworth bandpass filter, Chebyshev I bandpass filter, Chebyshev II bandpass filter, elliptical bandpass filter to design, as shown in Figure 3.

Bandpass digital filter amplitude-frequency response curve

[page]

(4) Comparison in band-stop filters

Assume: Wp=[100, 200], Ws=[50, 250], Rp=3 dB, Rs=30 dB, Fs=1 000, use Butterworth band-stop filter, Chebyshev I band-stop filter, Chebyshev II band-stop filter, elliptic band-stop filter to design, as shown in Figure 4.

Band-stop digital filter amplitude-frequency response curve

1.3 Comparative results analysis

By designing various types of filters using different methods, some conclusions can be verified. Low-pass, high-pass, band-pass, and band-stop filters can be designed using Butterworth filters, Chebysheve I filters, Che-bysheve II filters, and elliptical filters, but each has its own characteristics. The amplitude-frequency response curve within the passband of the Butterworth filter can be smoothed to the maximum extent, but the slope of the cutoff frequency is sacrificed.

The Chebysheve I filter has equal ripples in the passband and is monotonic in the stopband; the Chebysheve II filter is monotonic in the passband but has equal ripples in the stopband; the elliptical filter has equal ripples in both the stopband and the passband, but the slope of descent is greater, and the same performance indicators as the other two types of filters can be achieved with a lower order.

2 IIR digital filter application

Assuming that the sampling frequency of the signal is 600 Hz and the frequency of the input signal is 100 Hz, the synthetic sinusoidal signal of 180 Hz and 250 Hz f(t)=sin(200πt)+sin(360πt)+sin(500πt) passes through a Butterworth low-pass filter with a cutoff frequency of 120 Hz. By comparing the spectrum before and after filtering, it can be found that after the signal passes through the filter, the two high-frequency signals 180 Hz and 250 Hz sinusoidal signals are filtered out, achieving the filtering effect.

Figures 5 and 6 show the spectrum before and after filtering by the Butterworth low-pass filter.

Spectrum diagram before Butterworth low-pass filter filtering

Spectrum after Butterworth low-pass filter filtering

Still under the above conditions, if you want to retain the high-frequency signal 250 Hz sinusoidal signal, you can pass it through a Butterworth high-pass filter. The cutoff frequency of this high-pass filter is 220 Hz. The spectrum after filtering is shown in Figure 7. The two low-frequency signals 100 Hz and 180 Hz sinusoidal signals are filtered out; after pre-retaining the 100 Hz and 250 Hz signals, the 180 Hz sinusoidal signal can be filtered out through a band-stop filter, as shown in Figure 8; similarly, if only the 180 Hz sinusoidal signal is retained, it can be passed through a band-pass filter, while the other two signals are filtered out, as shown in Figure 9.

Spectrum after filtering

The 180 Hz sinusoidal signal is filtered out by a band-stop filter.

Only the 180 Hz sinusoidal signal can pass through the bandpass filter

3 Conclusion

Filtering is the basis of signal processing, and filtering operation is the basic operation in signal processing. The design of filters has become one of the most basic problems in digital signal processing. The signal carries noise or useless signals. The function of the filter is to filter out these interference components, that is, to allow signals in a specific frequency band to pass through to achieve the effect of signal screening. In the classic filter, through the design and research of IIR digital filters, the four forms of Butterworth filter, Chebysheve I filter, Chebysheve II filter and elliptic filter are used to compare and simulate the four filter forms of low pass, high pass, band pass and band stop, and obtain their different simulation characteristics; three synthetic sine wave signals with different frequencies of 100 Hz, 180 Hz and 250 Hz are selected:

f(t)=sin(200πt)+sin(360πt)+sin(5007πt)

The mixed signal is superimposed and the Butterworth filter is used to separate the spectrum of the mixed signal, achieving good simulation results.

Reference address:Comparison and application of IIR digital filter design methods based on Matlab

Previous article:ispPAC and its filter design
Next article:Application of Grey Prediction Control in Active Power Filter

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号