Design of IIR digital filter based on Maflab and its implementation on DSP

Publisher:精灵宠儿Latest update time:2014-03-30 Source: OFweek半导体照明网 Keywords:Maflab Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The 21st century is the era of digitalization. As more and more electronic products use digital signal processing (DSP) as the core technology, DSP has become the driving force for the digitalization process. In digital signal processing, digital filtering plays an extremely important role. In classical filtering, commonly used digital filters are FIR filters and IIR filters. Among them, IIR digital filters have been widely used because of their simple structure, small storage space, fast operation speed, high calculation accuracy, ability to be implemented with lower order, and good frequency selection characteristics.

  1 Basic theory and design method of IIR digital filter

  The function of a digital filter is to transform the input sequence x(n) into the output sequence y(n) through certain operations. Different operation processing methods determine the different filter implementation structures. The unit sampling response h(n) of the IIR digital filter is infinitely long, and its differential equation is shown in equation (1). It is recursive, that is, there is feedback from the output signal to the input signal in the structure. Its system function is shown in equation (2), so there are poles in the finite interval of the z plane (0<|z|<∞).

System functions

  At present, the most common method for IIR digital filter design is to use the design method of analog filter. Analog filter design already has a fairly mature method, which not only has complete design formulas, but also has relatively complete charts for query. Therefore, making full use of these existing resources will greatly facilitate the design of digital filters. The design steps of IIR digital filters are:

  1) Convert the given digital filter technical indicators into analog filter technical indicators according to certain rules;

  2) Design an analog low-pass filter H(s) based on the converted technical indicators;

  3) Convert H(s) to H(z) according to certain rules;

  If the designed digital filter is a low-pass filter, then the above design work can be completed. If the designed digital filter is a high-pass filter, a band-pass filter or a band-stop filter, then there is also step 4);

  4) Convert the technical indicators of the high-pass, band-pass or band-stop digital filter into the technical indicators of the low-pass filter, then design the analog low-pass filter H(s) according to the above step 2), and then convert H(s) into the required H(z) by the impulse response invariance method or bilinear transformation.

  2 Matlab Design of IIR Digital Filter

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

Function of designing digital filter using elliptic method

  This paper designs a third-order Chebyshev I-type high-pass digital filter with a sampling frequency of 1,200 Hz, a cutoff frequency of 200 Hz, and a maximum passband attenuation Rp of 0.5 dB. The input signal is a composite signal of 100 Hz and 300 Hz. The purpose is to filter out the 100 Hz signal through the designed filter, leaving the 300 Hz signal component to achieve the filtering effect. The simulation results of the high-pass filter are shown in Figure 1, and the simulation results of filtering with the high-pass filter are shown in Figures 2 to 4. It can be seen from the figure that the IIR digital filter is designed correctly and achieves the expected effect.

High-pass filter simulation results

High-pass filter filtering simulation results

  Before writing the assembly language program, first determine the parameters of the filter. From the design of the filter above, the parameters of the filter are as follows:

Numemtor: 0.323557 -0.970672 0.970672 -0323557
Denominator: 1.000000 -0.921478 0.642247 -0024733

  If the design parameters have data greater than 1, such data greater than 1 needs to be used directly in DSP, which requires floating-point operations in data format, which will increase the complexity of programming and reduce the speed of DSP program running. Generally, it is not used in this way, but the data is compressed at a certain ratio before calculation. For example, compress the above data 8 times (that is, divide the above data by 8), and the new data is:

Numerator: 0.040 45 -0.121 334 0.121 334 -0.040 45
Denominator:1.000 000 -0.115 185 0.080 28 -0.003 092    3 IIR digital filter implementation

TMS320VC5416 is a new generation of 16-bit fixed-point digital signal processor  produced by TI . When implementing IIR digital filter programming on TMS320VC5416  DSP , four buffers are opened to store input, output variables and filter coefficients, and the coefficients A and B of the filter designed by Matlab are stored in the filter buffer. And IIR filtering is successfully implemented on TMS320VC5416 DSP. The experimental simulation results are shown in Figures 5 to 8. A mixed signal of 100 Hz and 300 Hz is input on TMS320VC5416DSP, and the filtering effect is achieved through the designed IIR digital filter. The experimental results show that the IIR filter has high accuracy and good stability, and the design results meet the performance index requirements.

Experimental simulation results

Experimental simulation results

  4 Conclusion

  This paper first introduces the theory of IIR digital filters and their commonly used Matlab design functions, and then describes the Matlab simulation design and the implementation process and results on DSP based on the design of a high-pass filter for TI's TMS320VC5416 DSP. According to its implementation ideas, it is very convenient to design a filter that meets the requirements. This method is very practical and has a good reference value for other digital filter designs and DSP implementations.

Keywords:Maflab Reference address:Design of IIR digital filter based on Maflab and its implementation on DSP

Previous article:Transplantation of Embedded Real-time Operating System μC/OS-Ⅱ on DSP
Next article:Ultra-low power non-touch gesture control is possible with the help of audio DSP platform

Latest Embedded 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号