Home Product Directory Topics Note Pad MTT-S Video Coverage Back Issues RF Blogs Military Electronics Subscribe News Online News Design Features Web Seminars PartFinder Whitepapers Microwave Legends Newsletter EuMW 2007 WebConnect RF Design  RSS


PART SEARCH :
GlobalSpec - The Engineering Search Engine


Related Resources

  
Reprints   Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Components]
Design Finite Impulse Response Digital Filters
Precise FIR digital filters can be designed with the help of a popular mathematical modeling program and an understanding of basic performance trade-offs.

Ricardo A. Losada  |  ED Online ID #7229 |  January 2004
RECOMMENDED READING:
  •  Design Finite Impulse Response Digital Filters
  •  Design Finite Impulse Response Digital Filters
  •  Design Finite Impulse Response Digital Filters


Digital filters have enabled much of modern communications and the measurements that support them. While most high-frequency design engineers may be familiar with the use of the MATLAB mathematical modeling tool from The MathWorks (Natick, MA) for the design of advanced antennas, the software also features powerful algorithms and toolboxes for the design of finite-impulse-response (FIR) digital filters. This four-part article series on designing FIR digital filters with MATLAB will open with a review of key FIR filter specifications and examples of optimal linear- and nonlinear-phase FIR filter designs. Although many lowpass filters will be shown, the design techniques apply to other filter types as well.

An ideal lowpass filter passes all frequency components of a signal below a designated cutoff frequency, ωc, and rejects all frequency components of a signal above ωc, according to:

The impulse response of an ideal lowpass filter in Eq. 1 can be found from1:

Because the impulse response required to implement the ideal lowpass filter is infinitely long, it is not possible to design an ideal FIR lowpass filter. Finite-length approximations of the ideal impulse response lead to ripples in both the passband and the stopband, as well as a nonzero transition width between the passband and the stopband (Fig. 1).

Although it would be ideal to eliminate the transition width as well as the passband and stopband ripples, they are unavoidable deviations from the response of an ideal lowpass filter when using an FIR approximation. Practical FIR designs typically consist of filters meeting certain design specifications. For example, a practical FIR filter design has a given transition width and passband and stopband ripples set at some maximum value(s). The filter is also defined by its order, or equivalently, the length of the truncated impulse response.

The trade-offs among key filter specifications can be represented in the form of a triangle (Fig. 2). The triangle shows the degrees of freedom available when designating design specifications. Because the sum of the angles is fixed, values can only be selected for two of the specifications; the third will be dictated by the selection of the other two. As with the triangle, if one of the specifications is made larger or smaller, it will impact one or both of the other two specifications.

For example, consider the design of an FIR filter that meets the following specifications: a cutoff frequency of 0.4π rads/sample, a transition width of 0.06π rads/sample, and maximum passband and stopband ripple of 0.05 dB. The filter can easily be designed with the truncated-and-windowed impulse response algorithm implemented in the "firl" function within MATLAB's Filter Design Toolbox (or by using the "fdatool" graphical user interface) provided that a Kaiser-window filter design is used. Figure 3 shows the zero-phase response of a filter designed according to these specifications. Since the transition width and peak-ripple performance are fixed, the filter order has been determined by these other two parameters.

Examination at the stopband-edge frequency ωs = 0.43π shows that the peak passband/stopband ripples are within the allowable specifications. Usually, the specifications are exceeded because the order is rounded to the next integer greater than the actual value required.

While the truncated-and-windowed impulse response design algorithm is simple and reliable, it is not optimal. It yields designs that are generally inferior to those produced by algorithms employing optimization criteria; the nonoptimized designs will have greater order, greater transition width, or greater passband/stopband ripples than an optimized design. Since improved performance is usually desirable, the usefulness of more sophisticated algorithms (with optimization) is obvious.

Optimal designs are computed by minimizing some measure of the deviations between an ideal filter and a filter to be designed. The most common optimal FIR design algorithms are based on fixing the transition width and the order of the filter, and minimizing the ideal/practical deviations of the passband/stopband ripples. This deviation or error can be expressed mathematically as (ref. 2):

where:

Ha(ω) = the zero-phase response of the designed filter and

It is still necessary to define a measurement to determine "the size" of E(ω), the quantity to be minimized as a result of the optimization. The most often used measures are L(infinity)-norm (||E(w)||(infinity) minimum-maximum designs) and L2-norm (||E(w)||2 least-squares designs).

To allow for different peak ripples in the passband and stopband, a weighting function [W(ω)] is usually introduced:

A filter with linear-phase response is desirable in many applications, notably image processing and data transmission. One of the desirable characteristics of FIR filters is that they can be designed very easily to have linear phase. It is well known3 that linear-phase FIR filters will have impulse responses that are either symmetric or antisymmetric. For these types of filters, the zero-phase response can be determined analytically,3 and the filter design problem becomes a well-behaved approximation theory problem.4 The approximation involves determining the best solution for a given function (the response of an ideal lowpass filter) by means of a polynomial (the FIR filter) of given order. The "best" solution is one that minimizes the differences for a given performance parameter between an ideal filter and the filter to be designed.

The "remez" function in MATLAB implements an algorithm developed in ref. 5 that computes a solution to the design problem for linear-phase filters in the L(infinity)-norm case. The design problem is essentially to find a filter that minimizes the maximum error between the ideal and the actual filters. This type of design leads to so-called equiripple filters, i.e., filters in which the peak deviations from the ideal response are all equal.

The software's "firls" function implements an algorithm to compute solution for linear-phase FIR filters in the L2-norm case. The design problem is to find a filter that minimizes the energy of the error between ideal and actual filters.


<-- prev. page     [1] 2 3     next page -->




Reprints   Printer-Friendly    Email this Article    RSS        Font Size     What's This?




Reader Comments

You should use the Matlab Toolbox.It is easier. For coding use DSP reference book having MATLAB programs. I don't know book name and auther. But I think it's Tata McGraw Hill publication.

Anonymous -July 12, 2008

sir.iam working on my msc project about ANC. i wana know how could i design a FIR filter in matlab. i dont want use matlab's toolbox. please guide me. best regards. laleh

laleh -June 08, 2008   (Article Rating: )

Dear Sir

Would you kindly send me the design methods and main steps for design and simulation of a Low Pass FIR Digital Filter. I need it urgently for my Digital Signal Processing course work.

Kind Regards

Kamran

Kamran -May 15, 2008

Can anybody help me to complete the project " Design of DIR filter using Hamming window technique"?

Samiran Sarkar -May 06, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

can u give me the matlab code for implementing adptive minimum bit error rate equalizer

Anonymous -February 21, 2008   (Article Rating: )

Sir, i am doing my final year project. I want matlab coding for 8PSK signal. it wll useful to me sir. i wil b grateful to u... thanx.....

Thiru -February 05, 2008   (Article Rating: )

Sir, i am doing my final year project. I want matlab coding for 8PSK signal. it wll useful to me sir. i wil b grateful to u... thanx.....

Thiru -February 05, 2008

i am join this group

ANIL KUMAR -September 13, 2007

sir, i am doing project in FIR filter desing for image. i want what algorithm is better to use and give related links to this, please sir. thank you,;

R.Jegan -August 17, 2007   (Article Rating: )

Sir i want to design a FIR filter in C Code .... now i am design the filter coefficient by window function ( hamming window ) But filtering program not working please help me .. the poblem is that memory leakage ... if u hav any stable algorithm in c plse send me best regards bijun

nbiju -July 23, 2007   (Article Rating: )

Sir i want to design a FIR filter in C Code .... now i am design the filter coefficient by window function ( hamming window ) But filtering program not working please help me .. the poblem is that memory leakage ... if u hav any stable algorithm in c plse send me best regards bijun

Biju n -July 23, 2007   (Article Rating: )

can you pls send me a sample design of digital filter.we were ask to have our own design of digital filter using our MATLAB..

dan -July 23, 2007   (Article Rating: )

sir iwant codes in matlab for design method of fir filters.i shall be thankful to you for this

aisha -June 22, 2007   (Article Rating: )

sir, i want the solution to the problem 3.11 in the book 'system identification' by T.Söderström & P.Stoica. It would be of great help as its a part of my Masters project in System Identification.

suraj -April 23, 2007

sir, i want the solution to the problem 3.11 in the book 'system identification' by T.Söderström & P.Stoica. It would be of great help as its a part of my Masters project in System Identification.

suraj -April 23, 2007

sir, i want the solution to the problem 3.11 in the book 'system identification' by T.Söderström & P.Stoica. It would be of great help as its a part of my Masters project in System Identification.

suraj -April 23, 2007

sir,i am designing a narrowband digital filter to be used for low frequency application.specification;centre frequency 60hz,bandwidth20hz.please assist me.

steve -February 27, 2007

sir im a final year B.E. student.we r doing d project regarding low pass fir filter designusing pipelining n direct forms, i need some materials regarding fir filter design n also suitable websites it should be helpful for our project the specification of our project are as follows 11 taps filter, cutt off frequency=2Mhz, input word length= 4 bits, coefficient word length =4bits, output word length=8 bits using 2's compelement

sandeep -January 30, 2007   (Article Rating: )

sir i hav to design a filter meeting the folowing specification passband =0hz -- 20hz stopband =25 hz--64hz sapling frequency= 128hz passband ripple= 0.01db stopband attanuation= 90db plz give complete detail and how can we implement it through software

arjun -January 09, 2007

dear sir, i'm doing my final year b.tech project in "design of digital filters using VHDL" in NSIC(National small scale inductries corporation). Can you assist me of how to go on the project step wise. we are starting the project fron jan 3rd. we'ld give a brief seminar about the introduction and about the topic in the second week of january. can you help me sir.

Swathi Rekha -December 27, 2006

sir i hav to design a filter meeting the folowing specification passband =0hz -- 20hz stopband =25 hz--64hz sapling frequency= 128hz passband ripple= 0.01db stopband attanuation= 90db plz give complete detail and how can we implement it through software

qaisarzab -December 26, 2006   (Article Rating: )

sir im a final year B.E. student.we r doing d project regarding fir filter designusing pipelining n folding techniques, i need some materials regarding fir filter design n also suitable websites it should be helpful for our project

rahul -December 07, 2006

Sir, in this article, have the formula to calculate the coefficients for the lowpass filter. Have some formula to calculate the highpass filter?? I don`t find it. Can you help me? I am making the system for filtering cardiac signals, and I need to implement some filters, like, lowpass, highpass, bandpass and stopband. Can you help me? Please. Tks a lot. Ricardo Vieira.

Ricardo G Vieira -October 03, 2006

Sir, i am an M.Sc student. my project is to design RF filter for UMTS(3G). Basically i ve to design a RF filters Used in basestation circuits(Node B's circuit). i am having difficulty with how to choose the filter that what kind of filter it should be.i mean should it be lowpass or bandpass, FIR or IIR.what would be best choice for me.please email me ur suggestion.thanks

Haider Khan -September 24, 2006

Hello sir, I am trying to implement Lattice fir filter with vhdl. for verification i need to design a refrence filter in matlab. i want a simple FIR filter with lattice structure of 8 tap. which should give refelection coefficient in the form of 32 bit binary form. please help me out. waiting for your help.

Shivkaran -August 25, 2006

sir, iam doing an msc project on desgin of digital filters on a multiple frequncy vibration disk. this project invovlves designing of several digital filtes and i have to do this in matlab. iam new to matlab and also to filter designing. can u please help me regarding this.

narasimha reddy -July 21, 2006

does FIR filters appear in the form of real word components like resietor,capacitor. can we see the appearance of filter after implemnting it

kiran -July 14, 2006

I want the basic material of FIR filter and the design process of an FIR filter in general with all the equations properly explained. Thank you, kiran

kiran -July 04, 2006

Dear Sirs: The information provided by Mr.Losasa is absolutely worthless in so far as designing a filter is concerned. Anyone can run a simulation software program, the real question is, can they turn all this hand-wavy mathematics into component values in a circuit. The sad truth is that they can't. If you want some useful real world information read a book entitled "Handbook of Filter Synthesis" by Anatol Zvrev. That is the only book that I used in my 25+ years of designing electric wave filters. A friend of mine once said modern day engineers are just "Appliance Operators" and this is a perfect illustration.

J. Barton -July 02, 2006   (Article Rating: )

Sir, I need basic theory and calculations of capacitors using as a filter,bypass cap.and coupling cap.

Suba -March 30, 2006   (Article Rating: )

Sir,i need details and circuits of a transistor Biasing with clear caculations of current and voltages

Suba -March 30, 2006   (Article Rating: )

sir i need the code for fir filter using matlab please forward me the same or any related links

adi -March 27, 2006

sir,i am making a project on designing a fir filter using matlab.i am considering haming window and rectangular window techniques to do so.After design the FIR filters, i have to apply this filter to my sample signal.can you please give me the matlab code for designing of such a filter and the matlab code about applied the designed FIR filters to sample signals? please send me related links also...

siddhartha -March 24, 2006

Sir i am designing a decimating low pass FIR filter can u please send me code or any related link which can help me in designing.I am new to this subject so i am facing problem in understanding Filter design.Thankyou.

anshu -March 20, 2006   (Article Rating: )

sir,i am making a project on differentiatin male and female voice using matlab,on the basis of the difference in thr fundamental frequency.i am considering hamming window and rectangular window techniques to make my band pass filter,sir can u plz mail me the matlab code for the same and method of how to use .wav files with the filter. plz send me the related links also.. i will be greatful to u..thnx

avinash -March 11, 2006

i appriciate ur work i am a final year student and want me project to be around this title what is ur adevise for me

yalew -February 18, 2006

sir,I an trying to design MATLAB codeto read sound cards can you tellme the coding and related links

punit -February 07, 2006   (Article Rating: )

sir,i am making a project on designing a fir filter using matlab.i am considering haming window and rectangular window techniques to do so.After design the FIR filters, i have to apply this filter to my sampel signal.can you please give me the matlab code for designing of such a filter and the matlab code about applied the designed FIR filters to sampel signals? please send me related links also... Thanks

Jess -January 30, 2006   (Article Rating: )

sir,i am making a project on designing a fir low pass filter using matlab.i am considering haming window technique to do so.can you please give me the matlab code for designing of such a filter.........? please send me related links also...

abhishek -January 19, 2006   (Article Rating: )

dear sir can you tell me the matlab coding for DESIGN OF DIGITAL FIR FILTER USING LEAST SQUARE TECHNIQUE please....

kalaiarasan -January 18, 2006   (Article Rating: )

can tell me the coding( in matlab) to apply blackman window to a signal and what the coding to design a filter using the coefficient calculate by the blackman window? give me the related link as well..t q.

wainam -December 27, 2005   (Article Rating: )

i'm requesting specification on the gsm jammers design,please would you send me.

masuke -October 25, 2005

please email nme info about optimizing transition band response of fir filters using the frequency sampling method.i mean the algorithms using which we can optimize the transition band response.give me info matlab commands to this effect.thank you.its required urgently for my assignment. devs_17@rediffmail.com, rdevesh@emirates.net.ae

devesh -October 22, 2005

sir we are doing a project on implementation of ssbif filter using dsp techniques for the given specifications if frequency=450khz,usb=2.5khz,fsb=1dbat3khz and attenuation should be 60db how tofind the order of the filter and transfer function using fir filter designing

sreevani -September 25, 2005   (Article Rating: )

dear sirs, we are doing our final year B.E. while designing fir filter we have some doubts 1.practically how many taps are used, 2.what are the effects of sampling frequency

we have taken symmetric fir filter

thank you

karthik,balaji -September 02, 2005

i want material on basic filterdesigning as i am a student or please give me the sites which are helpfull to me

siva -May 20, 2005

POST YOUR COMMENTS HERE
Name:

Email:
Rate this article:

 less useful more useful 
1
2
3
4
5

Your Comments: