Chapter10FIRDigitalFilterDesign•10.1PreliminaryConsiderations•10.2FIRFilterDesignBasedonWindowedFourierSeries•10.5FIRDigitalFilterDesignUsingMatlabChapter10FIRDigitalFilterDesign10.1.1BasicApproachestoFIRDigitalFilterDesignFIR(Finitedurationimpulseresponse)filter:linearphase,nonrecursivestructure(intrinsicallystable),fastnumericalalgorithmIIR(Infinitedurationimpulseresponse)filter:lowerorder(moreefficientthanFIRfilter)recursivestructureInthischapter,wewilllearn:idealfrequencyresponsecharacteristicsofcommonlyusedFIRfilters,aswellastheircorrespondingimpulseresponse.windowmethodforapproximatingFIRfilter.characterizethebehavioroffilters1()()()()2()()()()()njjnnjjnnHzhnzhnHeedjHehneHehnHzcoefficientsofthestructurefilterimplementation10.1.1BasicApproachestoFIRDigitalFilterDesign()()(ideal)()()(noncausal,infinite-duration)approximationjjtDapproximationtDHeHehnhnFIRfilterapproximation:Designacausalsystemwhichhasafinite-lengthimpulseresponse().thninfrequecy:frequencysampling(Problems10.31-10.33)methodsintime:windowfunctionIngeneral,considerthelinearphasefilters.10.1.1BasicApproachestoFIRDigitalFilterDesignFIRDigitalfilterspecification(e.g.lowpassfilter)10.1.2EstimationoftheFilterOrder:passbandedgefrequencyp:stopbandedgefrequencyr:rippleinthepassbandp:rippleinthestopband=20lg(1):gaininthepassband(dB)=spppG:attenuationinthepassband(dB)=20lg:gaininthestopband(dB)=:attenuationinthestopband(dB)pssssGGGKaiser’sFormula10.1.2EstimationoftheFilterOrder1020log()1314.6()/2psspNBellanger’sFormula102log(10)13()/2psspN10.1.2EstimationoftheFilterOrderHermann’sFormula2(,)(,)[()/2]()/2pspsspspDFN211021031024105106,(,)[(log)(log)]log[(log)(log)]psppsppwhereDaaaaaa121010(,)[loglog]pspsFbb123456120.005309,0.07114,0.4761,0.00266,0.5941,0.4278,11.01217,0.51244aaaaaabb10.1.2EstimationoftheFilterOrderTable10.1:ComparisonofFIRfilterordersFilterNo.ActualorderKaiser’sFormulaBellanger’sFormulaHermann’sFormula1159158163151238343737314121312•10.1PreliminaryConsiderations•10.2FIRFilterDesignBasedonWindowedFourierSeries•10.5FIRDigitalFilterDesignUsingMatlabChapter10FIRDigitalFilterDesign1,()0,cjLPcforHefor()01.lowpassfiltersidealmagnituderesponse10.2.1ImpulseResponsesofIdealFilitersphaseresponse1.lowpassfilters11()()()2sin()1,2ccjjjnLPLPLPjnchnFHeHeednednnimpulseresponse-20-15-10-505101520-0.100.10.20.3impulseresponseofideallowpassfilter(wc=pi/4)nh(n)ImpulseResponsesofIdealFiliters2.highpassfilters11()()()21,0sin(),0jjjnHPHPHPcchnFHeHeedfornnfornnimpulseresponseidealmagnituderesponseImpulseResponsesofIdealFiliters3.bandpassfilters1211()()[sin()sin()],jBPBPcchnFHennnnimpulseresponseidealmagnituderesponseImpulseResponsesofIdealFiliters4.bandstopfilters211121,0()()1[sin()sin()],0ccjBSBSccfornhnFHennfornnimpulseresponseidealmagnituderesponse11221,0()0,01,cjBScccforHeforforImpulseResponsesofIdealFiliters10.2.2truncation(),()0,dthnfornMhnfornMassumingthatMiseven.Theresultingtransferfunctioniswrittenas1()(0)(()())MnnttttnHzhhnzhnzmakecausal()()tMthnMzHz10.2.3§5.3FIRfilterapproximationbyfrequencysamplingmainlobesecondarylobe1secondarylobe221M41Mripplec8.95%Principle:FIRfilterapproximationwithwindowfunctionsForallidealfilters,theimpulseresponseshaveinfiniteduration,whichleadstonon-realizableFIRfilters.Astraightforwardwaytoovercomethislimitationistodefineafinite-lengthauxiliarysequenceh’(n),yieldingafilteroforderM,as(),()truncation0,dthnfornMhnfornMassumingthatMiseven.Theresultingtransferfunctioniswrittenas1()(0)(()())MnnttttnHzhhnzhnzmakecausal()()tMthnMzHzFIRfilterapproximationwithwindowfunctionsTherippleseenintheabovefigureclosetothebandedgesisduetotheslowconvergenceoftheFourierserieshd(n)whenapproximatingfunctionspresentingdiscontinuities,suchastheidealresponses.Thisimpliesthatlarge-amplituderipplesinthemagnituderesponseappearclosetotheedgeswheneveraninfinite-lengthhd(n)istruncatetogenerateafinite-lengthfilter.TheseripplesarecommonlyreferredtoasGibbs’soscillations.Wecanobtainafinite-lengthimpulseresponseht(n)bymultiplyingtheinfinite-lengthimpulseresponsehd(n)byawindowfunctionw(n).()()()tdhnhnwn10.2.4FIRfilterapproximationwithFixedWindowFunctionsThesimpletruncationoftheFourierseries,canbeinterpretedastheproductbetweentheidealhd(n)andarectangularwindowdefinedby1,for()0,forRnMwnnMRectangularwindowFIRfilterapproximationwithwindowfunctionsthefrequencyresponseoftherectangularwindow:222211()()222()11sin[()][]21sin()2MMMjjjjjnRjMnMMjjjjeeeeeeMeeee''()'()()()1()()()2tdrjjjtdrhnhnwnHeHeWedProductintimePeriodicconvolutioninfrequency§5.3FIRfilterapproximationbyfrequencysamplingmainlobesecondarylobe1secondarylobe221M41Mripplec8.95%FIRfilterapproxima