You are on page 1of 7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasing
PublishDate:jul12,2016

Overview

Learnaboutacquiringananalogsignal,includingtopicssuchasbandwidth,amplitudeerror,risetime,samplerate,the
NyquistSamplingTheorem,aliasing,andresolution.ThistutorialispartoftheInstrumentFundamentalsseries.
TableofContents

1.WhatIsaDigitizer?
2.Bandwidth
3.SampleRate
4.Resolution
5.Summary
6.AdditionalInstrumentationResources
1.WhatIsaDigitizer?

Scientistsandengineersoftenuseadigitizertocaptureanalogdataintherealworldandconvertitintodigitalsignalsfor
analysis.Adigitizerisanydeviceusedtoconvertanalogsignalsintodigitalsignals.Oneofthemostcommondigitizersisa
cellphone,whichconvertsavoice,ananalogsignal,intoadigitalsignaltosendtoanotherphone.However,intestand
measurementapplications,adigitizermostoftenreferstoanoscilloscopeoradigitalmultimeter(DMM).Thisarticlefocuses
onoscilloscopes,butmosttopicsarealsoapplicabletootherdigitizers.
Regardlessofthetype,thedigitizerisvitalforthesystemtoaccuratelyreconstructawaveform.Toensureyouselectthe
correctoscilloscopeforyourapplication,considerthebandwidth,samplingrate,andresolutionoftheoscilloscope.

2.Bandwidth

Thefrontendofanoscilloscopeconsistsoftwocomponents:ananaloginputpathandananalogtodigitalconverter(ADC).
Theanaloginputpathattenuates,amplifies,filters,and/orcouplesthesignaltooptimizeitinpreparationfordigitizationbythe
ADC.TheADCsamplestheconditionedwaveformandconvertstheanaloginputsignaltodigitalvaluesthatrepresentthe
analoginputwaveform.Thefrequencyresponseoftheinputpathcausesaninherentlossofamplitudeandphaseinformation.

Figure1.Bandwidthdescribesthefrequencyrangeinwhichtheinputsignalcanpassthroughtheoscilloscopefrontend,
whichismadeoftwocomponents:ananaloginputpathandanADC.

BandwidthdescribestheanalogfrontendsabilitytogetasignalfromtheoutsideworldtotheADCwithminimalamplitude
lossfromthetipoftheprobeortestfixturetotheinputoftheADC.Inotherwords,thebandwidthdescribestherangeof
frequenciesanoscilloscopecanaccuratelymeasure.

Itisdefinedasthefrequencyatwhichasinusoidalinputsignalisattenuatedto70.7percentofitsoriginalamplitude,whichis
alsoknownasthe3dBpoint.Figures2and3showthetypicalinputresponsefora100MHzoscilloscope.

Figure2.Bandwidthiswhentheinputsignalisattenuatedto70.7percentofitsoriginalamplitude.

http://www.ni.com/whitepaper/2709/en/

1/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Figure3.Thisgraphindicatesthatat100MHz,theinputsignalhitsthe3dBpoint.

Bandwidthismeasuredbetweenthelowerandupperfrequencypointswherethesignalamplitudefallsto3dBbelowthe
passbandfrequency.Thissoundscomplicated,butwhenyoubreakitdownitisactuallyrelativelyeasy.

First,youwanttocalculateyour3dBvalue.

Equation1.Calculatingthe3dBPoint

Vin,ppisthepeaktopeakvoltageoftheinputsignalandVout,ppisthepeaktopeakvoltageoftheoutputsignal.Forexample,
ifyouinputa1Vsinewave,theoutputvoltagecanbecalculatedas

so

Becausetheinputsignalisasinewave,therearetwofrequenciesatwhichtheoutputsignalhitsthisvoltagethesearecalled
thecornerfrequenciesf1andf2.Thesetwofrequenciesgobymanydifferentnamessuchascornerfrequency,cutoff
frequency,crossoverfrequency,halfpowerfrequency,3dBfrequency,andbreakfrequency.However,allthesetermsreferto
thesamevalues.Thecenterfrequency,f0,ofthesignalisthegeometricmeanoff1andf2.

Equation2.CalculatingtheCenterFrequency

Youcancalculatethebandwidth(BW)bysubtractingthetwocornerfrequencies.

Equation3.CalculatingtheBandwidth

Figure4.Thebandwidth,thecornerfrequency,thecenterfrequency,andthe3dBpointareallconnected.

CalculatingAmplitudeError

http://www.ni.com/whitepaper/2709/en/

2/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Anotherequationthatisoftenhelpfulisforamplitudeerror.

Equation4.CalculatingtheAmplitudeError

Theamplitudeerrorisexpressedasapercentage,andRistheratiooftheoscilloscopesbandwidthtotheinputsignal
frequency(fin).

Usingtheexampleabove,youhavea100MHzoscilloscopewitha100MHzsinewaveinputsignalat1V,andBW=100
MHzandfin=100MHz.ThismeansR=1.Thenyoujusthavetosolvetheequation:

Theamplitudeerroris29.3percent.Youcanthendeterminetheoutputvoltageforthe1Vsignal:

Itisrecommendedthatthebandwidthofyouroscilloscopebethreetofivetimesthehighestfrequencycomponentof
interestinthemeasuredsignaltocapturethesignalwithminimalamplitudeerror.Forinstance,forthe1Vsinewaveat
100MHz,youshoulduseanoscilloscopewith300MHzto500MHzbandwidth.Theamplitudeerrorofa100MHzsignal
atthesebandwidthsare:

CalculatingRiseTime

Anoscilloscopemusthavetheappropriatebandwidthtoaccuratelymeasurethesignal,butitmustalsohavesufficient
risetimetoaccuratelycapturethedetailsofrapidtransitions.Thisismostapplicableifmeasuringdigitalsignalssuchas
pulsesandsteps.Therisetimeofaninputsignalisthetimeforasignaltotransitionfrom10percentto90percentofthe
maximumsignalamplitude.Someoscilloscopesmayuse20percentto80percent,sobesuretocheckyouruser
manual.

Figure5.Therisetimeofaninputsignalisthetimeforasignaltotransitionfrom10percentto90percentofthe
maximumsignalamplitude.

Therisetime(Tr)canbecalculatedasfollows:

Equation5.CalculatingtheRiseTime

Theconstantkisdependentontheoscilloscope.Mostoscilloscopeswithabandwidthlessthan1GHztypicallyhavek=
0.35,whileoscilloscopeswithabandwidthgreaterthan1GHzusuallyhaveavalueofkbetween0.4and0.45.

http://www.ni.com/whitepaper/2709/en/

3/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Thetheoreticalrisetimemeasured
timeoftheinputsignal

canbecalculatedfromtherisetimeoftheoscilloscope

andtheactualrise

Equation6.CalculatingtheTheoreticalRiseTimeMeasured

Itisrecommendedthattherisetimeoftheoscilloscopebeonethirdtoonefifththerisetimeofthemeasuredsignalto
capturethesignalwithminimalrisetimeerror.

3.SampleRate

Thesamplerate,alsoreferredtoassamplingrate,isnotdirectlyrelatedtothebandwidthspecification.Samplerateisthe
frequencyatwhichtheADCconvertstheanaloginputwaveformtodigitaldata.Theoscilloscopesamplesthesignalafterany
attenuation,gain,and/orfilteringhasbeenappliedtotheanaloginputpathandconvertstheresultingwaveformtodigital
representation.Itdoessoinsnapshots,similartotheframesofamovie.Thefastertheoscilloscopesamples,thegreaterthe
resolutionanddetailthatcanbeseeninthewaveform.

NyquistSamplingTheorem

TheNyquistSamplingTheoremexplainstherelationshipbetweenthesamplerateandthefrequencyofthemeasured
signal.Itstatesthatthesampleratefsmustbegreaterthantwicethehighestfrequencycomponentofinterestinthe
measuredsignal.ThisfrequencyisoftenreferredtoastheNyquistfrequency,fN.

Equation7.ThesamplerateshouldbegreaterthantwicetheNyquistfrequency.

Tounderstandwhy,takealookatasinewavemeasuredatdifferentrates.IncaseA,thesinewaveoffrequencyfis
sampledatthatsamefrequency.Thosesamplesaremarkedontheoriginalsignalontheleftand,whenconstructedon
theright,thesignalincorrectlyappearsasaconstantDCvoltage.IncaseB,thesamplerateistwicethefrequencyofthe
signal.Itnowappearsasatrianglewaveform.Inthiscase,fisequaltotheNyquistfrequency,whichisthehighest
frequencycomponentallowedtoavoidaliasingforagivensamplingfrequency.IncaseC,thesamplingrateisat4f/3.
TheNyquistfrequencyinthiscaseis:

BecausefislargerthantheNyquistfrequency(

),thissampleratereproducesanaliaswaveformofincorrect

frequencyandshape.

http://www.ni.com/whitepaper/2709/en/

4/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Figure6.Toolowasampleratecancauseinaccuratereconstructionofthewaveform.

Thus,toaccuratelyreconstructthewaveform,thesampleratefsmustbegreaterthantwicethehighestfrequency
componentofinterestinthemeasuredsignal.Usually,youwanttosamplearoundfivetimesgreaterthanthesignal
frequency.

Aliasing

Ifyouneedtosampleatacertainratetoavoidaliasing,thenwhatexactlyisaliasing?Ifasignalissampledatasampling
ratesmallerthantwicetheNyquistfrequency,falselowerfrequencycomponentsappearinthesampleddata.This
phenomenonisreferredtoasaliasing.Thefollowingfigureshowsan800kHzsinewavesampledat1MS/s.Thedotted
lineindicatesthealiasedsignalrecordedatthatsamplerate.The800kHzfrequencyaliasesbackinthepassband,
falselyappearingasa200kHzsinewave.

Figure7.Aliasingoccurswhenasamplerateistoolowandreproducesaninaccuratewaveformrepresentation.

ThealiasfrequencyfacanbecalculatedtodeterminehowaninputsignalatafrequencyovertheNyquistfrequency
appears.Itistheabsolutevalueoftheclosestintegermultipleofthesamplefrequencyminusthefrequencyoftheinput
signal.

Equation8.CalculatingtheAliasFrequency

Forexample,considerasignalwithasamplefrequencyof100Hz,andtheinputsignalcontainsthefollowing
frequencies:25Hz,70Hz,160Hz,and510Hz.FrequenciesbelowtheNyquistfrequencyof50Hzaresampled
correctlythoseover50Hzappearasalias.

Figure8.Differentfrequencyvaluesaremeasured,someofwhicharealiasfrequenciesandsomeofwhichareactual
frequenciesfromthewaveform.

Herearethecalculationsforthealiasfrequencies:

http://www.ni.com/whitepaper/2709/en/

5/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Inadditiontoincreasingthesamplerate,aliasingcanalsobepreventedbyusinganantialiasingfilter.Thisisalowpass
filterthatattenuatesanyfrequenciesintheinputsignalthataregreaterthantheNyquistfrequency,andmustbe
introducedbeforetheADCtorestrictthebandwidthoftheinputsignaltomeetthesamplingcriteria.Analoginput
channelscanhavebothanaloganddigitalfiltersimplementedinhardwaretoassistwithaliasingprevention.

4.Resolution

Anotherfactortoconsiderwhenselectinganoscilloscopeforanapplicationistheresolution.Bitsofresolutionreferstothe
numberofuniqueverticallevelsthatanoscilloscopecanusetorepresentasignal.Onewaytounderstandtheconceptof
resolutionisbycomparisonwithayardstick.Divideameteryardstickintomillimeterswhatistheresolution?Thesmallesttick
ontheyardstickistheresolutionor1outof1,000.

TheresolutionofanADCisafunctionofhowmanypartsthemaximumsignalcanbedividedinto.Theamplituderesolutionis
limitedbythenumberofdiscreteoutputlevelsanADChas.Abinarycoderepresentseachdivisionassuch,thenumberof
levelscanbecalculatedasfollows:

Equation9.CalculatingtheDiscreteOutputLevelsofanADC

Forexample,a3bitoscilloscopehas23oreightlevels.A16bitoscilloscopeontheotherhandhas216or65,536levels.The
minimumdetectablevoltagechangeorcodewidthcanbecalculatedasfollows:

Equation10.CalculatingtheCodeWidth

Thecodewidthisalsoreferredtoastheleastsignificantbit(LSB).Ifthedeviceinputrangeis0to10V,thena3bit
oscilloscopehasacodewidthof10/8=1.25Vwhilea16bitoscilloscopehasacodewidthof10/65,536=305V.Thiscan
meanabigdifferenceinhowthesignalisdisplayed.

Figure9.DifferenceofaWaveformBetween16Bitsand3BitsofResolution

Theresolutionyouneeddependsonyourapplicationthehighertheresolution,themoretheoscilloscopecosts.Keepinmind
thatanoscilloscopewithhighresolutiondoesntnecessarilymeanthatithashighaccuracy.However,theachievableaccuracy
ofaninstrumentislimitedbytheresolution.Resolutionlimitstheprecisionofameasurementthehighertheresolution
(numberofbits),themoreprecisethemeasurement.

Someoscilloscopesuseamethodcalledditheringtohelpsmoothoutsignalstogettheappearanceofahigherresolution.
Ditheringinvolvesthedeliberateadditionofnoisetotheinputsignal.Ithelpsbysmearingoutthelittledifferencesinamplitude
resolution.Thekeyistoaddrandomnoiseinawaythatmakesthesignalbouncebackandforthbetweensuccessivelevels.
Ofcourse,thisinitselfjustmakesthesignalnoisier.But,thesignalsmoothesoutbyaveragingthisnoisedigitallyoncethe
signalisacquired.

http://www.ni.com/whitepaper/2709/en/

6/7

7/10/2016

AcquiringanAnalogSignal:Bandwidth,NyquistSamplingTheorem,andAliasingNationalInstruments

Figure10.Ditheringcanhelpsmoothoutasignal.

5.Summary

Bandwidthdescribestherangeoffrequenciesanoscilloscopecanaccuratelymeasure.Itisdefinedasthefrequencyat
whichasinusoidalinputsignalisattenuatedto70.7percentofitsoriginalamplitude,whichisalsoknownasthe3dB
point.
Bandwidthisthedifferencebetweenthecornerfrequencies.
Amplitudeerrorisapercentagethatistheratioofthebandwidthtotheinputsignalfrequenciesthatassistswith
determiningthenoiseinasystem.
Itisrecommendedthatthebandwidthofyouroscilloscopebethreetofivetimesthehighestfrequencycomponentof
interestinthemeasuredsignaltocapturethesignalwithminimalamplitudeerror.
Therisetimeofaninputsignalisthetimeforasignaltotransitionfrom10percentto90percentofthemaximumsignal
amplitude.
Itisrecommendedthattherisetimeoftheoscilloscopebeonethirdtoonefifththerisetimeofthemeasuredsignalto
capturethesignalwithminimalrisetimeerror.
SamplerateisthefrequencyatwhichtheADCconvertstheanaloginputwaveformtodigitaldata.
Thesamplerateshouldbeatleasttwicethehighestfrequencyofinterestinthesignal,butmostofthetimeshouldbe
aroundfivetimesgreater.
Aliasingiswhenfalsefrequencycomponentsappearinsampleddata.
Bitsofresolutionreferstothenumberofuniqueverticallevelsthatanoscilloscopecanusetorepresentasignal.
Thehighertheresolutionofaninstrument,thegreatertheprecision.

6.AdditionalInstrumentationResources

MultifunctioninstrumentsIntegratedbenchtopinstrumentsintoasingle,fixedfunctiondevice.
(http://www.ni.com/virtualbench/whatis/)
Learnaboutanallinoneinstrumentthatcombinesamixedsignaloscilloscope,afunctiongenerator,adigitalmultimeter,a
programmableDCpowersupply,anddigitalI/OintoonedeviceandworkswithyourPCoriPadforefficientcircuitdesign
debuggingandvalidation.

ExploreOscilloscopesBuiltforTest(http://www.ni.com/whitepaper/51981/en/)
Oscilloscopesareessentialinstrumentsatthecoreofavarietyofapplications,makingthemanecessityforautomatedtest
systems.Consideramodularsolutionifyourapplicationrequiresmeasuring,analyzing,orprocessingdatademandsfast
throughputorrequiresasmallformfactorwithminimalpowerconsumption.
Forthecompletelistoftutorials,returntotheInstrumentFundamentalsmainpage(http://www.ni.com/tutorial/3214/en/).

http://www.ni.com/whitepaper/2709/en/

7/7

You might also like