Sei sulla pagina 1di 6

TheScientistandEngineer'sGuideto

DigitalSignalProcessing
ByStevenW.Smith,Ph.D.
Home

TheBookbyChapters

BookSearch

AbouttheBook

StevenW.Smith

Blog

Contact

Chapter3ADCandDAC/AnalogFiltersforDataConversion

Chapter3:ADCandDAC
Downloadthischapterin
PDFformat

AnalogFiltersforDataConversion

Chapter3.pdf

Figure 37 shows a block diagram of a DSP system, as the sampling


theoremdictatesitshouldbe.Beforeencounteringtheanalogtodigital
converter,

Tableofcontents
1:TheBreadthandDepthofDSP
2:Statistics,ProbabilityandNoise
3:ADCandDAC
Quantization
TheSamplingTheorem
DigitaltoAnalogConversion
AnalogFiltersforDataConversion
SelectingTheAntialiasFilter
MultirateDataConversion
SingleBitDataConversion
4:DSPSoftware
5:LinearSystems
6:Convolution
7:PropertiesofConvolution
8:TheDiscreteFourierTransform
9:ApplicationsoftheDFT
10:FourierTransformProperties
11:FourierTransformPairs
12:TheFastFourierTransform
13:ContinuousSignalProcessing
14:IntroductiontoDigitalFilters
15:MovingAverageFilters
16:WindowedSincFilters
17:CustomFilters
18:FFTConvolution
19:RecursiveFilters
20:ChebyshevFilters
21:FilterComparison
22:AudioProcessing
23:ImageFormation&Display
24:LinearImageProcessing
25:SpecialImagingTechniques
26:NeuralNetworks(andmore!)
27:DataCompression
28:DigitalSignalProcessors
29:GettingStartedwithDSPs
30:ComplexNumbers
31:TheComplexFourierTransform

theinputsignalisprocessedwithanelectroniclowpassfiltertoremoveallfrequenciesabovetheNyquistfrequency(onehalfthe
samplingrate).Thisisdonetopreventaliasingduringsampling,andiscorrespondinglycalledanantialiasfilter.Ontheotherend,
thedigitizedsignalispassedthroughadigitaltoanalogconverterandanotherlowpassfiltersettotheNyquistfrequency.Thisoutput
filteriscalledareconstructionfilter, and may include the previously described frequency boost. Unfortunately, there is a serious
problemwiththissimplemodel:thelimitationsofelectronicfilterscanbeasbadastheproblemstheyaretryingtoprevent.
Ifyourmaininterestisinsoftware,youareprobablythinkingthatyoudon'tneedtoreadthissection.Wrong!Evenifyouhavevowed
never to touch an oscilloscope, an understanding of the properties of analog filters is important for successful DSP. First, the
characteristicsofeverydigitizedsignalyouencounterwilldependonwhattypeofantialiasfilterwasusedwhenitwasacquired.Ifyou
don'tunderstandthenatureoftheantialiasfilter,youcannotunderstandthenatureofthedigitalsignal.Second,thefutureofDSPisto
replacehardwarewithsoftware.Forexample,themultiratetechniquespresentedlaterinthischapterreducetheneedforantialias
andreconstructionfiltersbyfancysoftwaretricks.Ifyoudon'tunderstandthehardware,youcannotdesignsoftwaretoreplaceit.Third,
muchofDSPisrelatedtodigitalfilterdesign.Acommonstrategyistostartwithanequivalentanalogfilter,andconvertitintosoftware.
Laterchaptersassumeyouhaveabasicknowledgeofanalogfiltertechniques.

32:TheLaplaceTransform
33:ThezTransform
34:ExplainingBenford'sLaw

Howtoorderyourown

Threetypesofanalogfiltersarecommonlyused:Chebyshev,Butterworth,andBessel(alsocalledaThompsonfilter).Eachofthese
isdesignedtooptimizeadifferentperformanceparameter.Thecomplexityofeachfiltercanbeadjustedbyselectingthenumberof
poles,amathematicaltermthatwillbediscussedinlaterchapters.Themorepolesinafilter,themoreelectronicsitrequires,andthe
betteritperforms.Eachofthesenamesdescribewhatthefilterdoes, not a particular arrangement of resistors and capacitors. For

hardcovercopy
Wouldn'tyouratherhaveabound
bookinsteadof640loosepages?
Yourlaserprinterwillthankyou!
OrderfromAmazon.com.

example, a six pole Bessel filter can be implemented by many different types of circuits, all of which have the same overall
characteristics.ForDSPpurposes,thecharacteristicsofthesefiltersaremoreimportantthanhowtheyareconstructed.Nevertheless,
wewillstartwithashortsegmentontheelectronicdesignofthesefilterstoprovideanoverallframework.
Figure38showsacommonbuildingblockforanalogfilterdesign,themodifiedSallenKeycircuit.Thisisnamedaftertheauthorsofa
1950spaperdescribingthetechnique.Thecircuitshownisatwopolelowpassfilterthatcanbeconfiguredasanyofthethreebasic
types.Table31providesthenecessaryinformationtoselecttheappropriateresistorsandcapacitors.Forexample,todesigna1kHz,
2poleButterworthfilter,Table31providestheparameters:k1 =0.1592andk2 =0.586.ArbitrarilyselectingR1 =10KandC=0.01uF
(commonvaluesforopampcircuits),RandRfcanbecalculatedas15.95Kand5.86K,respectively.Roundingtheselasttwovalues
tothenearest1%standardresistors,resultsinR=15.8KandRf=5.90KAllofthecomponentsshouldbe1%precisionorbetter.

Theparticularopampuseisn'tcritical,aslongastheunitygainfrequencyismorethan30to100timeshigherthanthefilter'scutoff
frequency.Thisisaneasyrequirementaslongasthefilter'scutofffrequencyisbelowabout100kHz.
Four,six,andeightpolefiltersareformedbycascading2,3,and4ofthesecircuits,respectively.For example, Fig. 39 shows the
schematicofa6pole

Besselfiltercreatedbycascadingthreestages.Eachstagehasdifferentvaluesfork1 andk2 asprovidedbyTable31,resultingin


differentresistorsandcapacitorsbeingused.Needahighpassfilter?SimplyswaptheRandCcomponentsinthecircuits(leavingRf
andR1 alone).
ThistypeofcircuitisverycommonforsmallquantitymanufacturingandR&Dapplicationshowever,seriousproductionrequiresthe
filtertobemadeasanintegratedcircuit.Theproblemis,itisdifficulttomakeresistorsdirectlyinsilicon.Theansweristheswitched

capacitorfilter.Figure310illustratesitsoperationbycomparingittoasimpleRCnetwork.IfastepfunctionisfedintoanRClow
pass filter, the output rises exponentially until it matches the input. The voltage on the capacitor doesn't change instantaneously,
becausetheresistorrestrictstheflowofelectricalcharge.
Theswitchedcapacitorfilteroperatesbyreplacingthebasicresistorcapacitornetworkwithtwocapacitorsandanelectronicswitch.
Thenewlyaddedcapacitorismuchsmallerinvaluethanthealreadyexistingcapacitor,say,1%ofitsvalue.Theswitchalternately
connects the small capacitor between the input and the output at a very high frequency, typically 100 times faster than the cutoff
frequencyofthefilter.Whentheswitchisconnectedtotheinput,thesmallcapacitorrapidlychargestowhatevervoltageispresently
ontheinput.Whentheswitchisconnectedtotheoutput,thechargeonthesmallcapacitoristransferredtothelargecapacitor.Ina
resistor, the rate of charge transfer is determined by its resistance. In a switched capacitor circuit, the rate of charge transfer is
determined by the value of the small capacitor and by the switching frequency. This results in a very useful feature of switched
capacitor

filters: the cutoff frequency of the filter is directly proportional to the clock frequency used to drive the switches. This makes the
switched capacitor filter ideal for data acquisition systems that operate with more than one sampling rate. These are easytouse
devicespaytenbucksandhavetheperformanceofaneightpolefilterinsideasingle8pinIC.
Nowfortheimportantpart:thecharacteristicsofthethreeclassicfiltertypes.Thefirstperformanceparameterwewanttoexploreis
cutofffrequencysharpness.Alowpassfilterisdesignedtoblockallfrequenciesabovethecutofffrequency(thestopband),while
passingallfrequenciesbelow(thepassband).Figure311showsthefrequencyresponseofthesethreefiltersonalogarithmic(dB)
scale.Thesegraphsareshownforfilterswithaonehertzcutofffrequency,buttheycanbedirectlyscaledtowhatevercutofffrequency
youneedtouse.Howdothesefiltersrate?TheChebyshevisclearlythebest,theButterworthisworse,andtheBesselisabsolutely
ghastly!Asyouprobablysurmised,thisiswhattheChebyshevisdesignedtodo,rolloff(dropinamplitude)asrapidlyaspossible.
Unfortunately,evenan8poleChebyshevisn'tasgoodasyouwouldlikeforanantialiasfilter.Forexample,imaginea12bitsystem
samplingat10,000samplespersecond.Thesamplingtheoremdictatesthatanyfrequencyabove5kHzwillbealiased,something
youwanttoavoid.Withalittleguesswork,youdecidethatallfrequenciesabove5kHzmustbereducedinamplitudebyafactorof
100,insuringthatanyaliasedfrequencieswillhaveanamplitudeoflessthanonepercent.LookingatFig.311c,youfindthatan8
poleChebyshevfilter,withacutofffrequencyof1hertz,doesn'treachanattenuation(signalreduction)of100untilabout1.35hertz.
Scalingthistotheexample,thefilter'scutofffrequencymustbesetto3.7kHzsothateverythingabove5kHzwillhavetherequired
attenuation.Thisresultsinthefrequencybandbetween3.7kHzand5kHzbeingwastedontheinadequaterolloffoftheanalogfilter.
Asubtlepoint:theattenuationfactorof100inthisexampleisprobablysufficienteventhoughthere4096stepsin12bit.FromFig.34,
5100hertzwillaliasto4900hertz,6000hertzwillaliasto4000hertz,etc.Youdon'tcarewhattheamplitudesofthesignalsbetween
5000and6300hertzare,becausetheyaliasintotheunusableregionbetween3700hertzand5000hertz.Inorderforafrequencyto
aliasintothefilter'spassband(0to3.7kHz),itmustbegreaterthan6300hertz,or1.7timesthefilter'scutofffrequencyof3700hertz.
AsshowninFig.311c,theattenuationprovidedbyan8poleChebyshevfilterat1.7timesthecutofffrequencyisabout1300,much
moreadequatethanthe100westartedtheanalysiswith.Themoraltothisstory:Inmostsystems,thefrequencybandbetweenabout
0.4 and 0.5 of the sampling frequency is an unusable wasteland of filter rolloff and aliased signals. This is a direct result of the
limitationsofanalogfilters.
Thefrequencyresponseoftheperfectlowpassfilterisflatacrosstheentirepassband.AllofthefilterslookgreatinthisrespectinFig.
311,butonlybecausetheverticalaxisisdisplayedonalogarithmicscale.Anotherstoryistoldwhenthegraphsareconvertedtoa
linearverticalscale,asisshown

inFig.312.PassbandripplecannowbeseenintheChebyshevfilter(wavyvariationsintheamplitudeofthepassedfrequencies).In
fact,theChebyshevfilterobtainsitsexcellentrolloffbyallowingthispassbandripple.Whenmorepassbandrippleisallowedina
filter,afasterrolloffcanbeachieved.AlltheChebyshevfiltersdesignedbyusingTable31haveapassbandrippleofabout6%(0.5
dB), a good compromise, and a common choice. A similar design, the elliptic filter, allows ripple in both the passband and the
stopband.Althoughhardertodesign,ellipticfilterscanachieveanevenbettertradeoffbetweenrolloffandpassbandripple.
Incomparison,theButterworthfilterisoptimizedtoprovidethesharpestrolloffpossiblewithoutallowingrippleinthepassband.Itis
commonlycalledthemaximallyflatfilter,andisidenticaltoaChebyshevdesignedforzeropassbandripple.TheBesselfilterhasno
rippleinthepassband,buttherollofffarworsethantheButterworth.
The last parameter to evaluate is the step response, how the filter responds when the input rapidly changes from one value to
another.Figure313showsthestepresponseofeachofthethreefilters.Thehorizontalaxisisshownforfilterswitha1hertzcutoff
frequency,butcanbescaled(inversely)forhighercutofffrequencies.Forexample,a1000hertzcutofffrequencywouldshowastep
responseinmilliseconds,ratherthanseconds.TheButterworthandChebyshevfiltersovershootandshowringing(oscillationsthat
slowlydecreasinginamplitude).Incomparison,theBesselfilterhasneitherofthesenastyproblems.

Figure314furtherillustratesthisveryfavorablecharacteristicoftheBesselfilter.Figure(a)showsapulsewaveform,whichcanbe
viewedasarisingstepfollowedbyafallingstep.Figures(b)and(c)showhowthiswaveform
wouldappearafterBesselandChebyshevfilters,respectively.Ifthiswereavideosignal,forinstance,thedistortionintroducedbythe
Chebyshevfilterwouldbedevastating!Theovershootwouldchangethebrightnessoftheedgesofobjectscomparedtotheircenters.
Worseyet,theleftsideofobjectswouldlookbright,whiletherightsideofobjectswouldlookdark.Manyapplicationscannottolerate
poorperformanceinthestepresponse.ThisiswheretheBesselfiltershinesnoovershootandsymmetricaledges.
NextSection:SelectingTheAntialiasFilter

Home | TheBookbyChapters | AbouttheBook | StevenW.Smith | Blog | Contact


Copyright19972011byCaliforniaTechnicalPublishing

Potrebbero piacerti anche