Professional Documents
Culture Documents
AcquiringanAnalogSignal:Bandwidth,Nyquist
SamplingTheorem,andAliasing
PublishDate:May04,2015|1Ratings|5.00outof5|
Overview
Learnaboutacquiringananalogsignal,includingtopicssuchasbandwidth,amplitudeerror,risetime,
samplerate,theNyquistSamplingTheorem,aliasing,andresolution.Thistutorialispartofthe
InstrumentFundamentalsseries.
1.WhatIsaDigitizer?
Scientistsandengineersoftenuseadigitizertocaptureanalogdataintherealworldandconvertitinto
digitalsignalsforanalysis.Adigitizerisanydeviceusedtoconvertanalogsignalsintodigitalsignals.
Oneofthemostcommondigitizersisacellphone,whichconvertsavoice,ananalogsignal,intoa
digitalsignaltosendtoanotherphone.However,intestandmeasurementapplications,adigitizermost
oftenreferstoanoscilloscopeoradigitalmultimeter(DMM).Thisarticlefocusesonoscilloscopes,but
mosttopicsarealsoapplicabletootherdigitizers.
Regardlessofthetype,thedigitizerisvitalforthesystemtoaccuratelyreconstructawaveform.To
ensureyouselectthecorrectoscilloscopeforyourapplication,considerthebandwidth,samplingrate,
andresolutionoftheoscilloscope.
2.Bandwidth
Thefrontendofanoscilloscopeconsistsoftwocomponents:ananaloginputpathandananalogto
digitalconverter(ADC).Theanaloginputpathattenuates,amplifies,filters,and/orcouplesthesignalto
optimizeitinpreparationfordigitizationbytheADC.TheADCsamplestheconditionedwaveformand
convertstheanaloginputsignaltodigitalvaluesthatrepresenttheanaloginputwaveform.The
frequencyresponseoftheinputpathcausesaninherentlossofamplitudeandphaseinformation.
http://www.ni.com/white-paper/2709/en/
1/13
5/14/2016
Figure1.Bandwidthdescribesthefrequencyrangeinwhichtheinputsignalcanpassthroughthe
oscilloscopefrontend,whichismadeoftwocomponents:ananaloginputpathandanADC.
BandwidthdescribestheanalogfrontendsabilitytogetasignalfromtheoutsideworldtotheADCwith
minimalamplitudelossfromthetipoftheprobeortestfixturetotheinputoftheADC.Inotherwords,
thebandwidthdescribestherangeoffrequenciesanoscilloscopecanaccuratelymeasure.
Itisdefinedasthefrequencyatwhichasinusoidalinputsignalisattenuatedto70.7percentofits
originalamplitude,whichisalsoknownasthe3dBpoint.Figures2and3showthetypicalinput
responsefora100MHzoscilloscope.
Figure2.Bandwidthiswhentheinputsignalisattenuatedto70.7percentofitsoriginalamplitude.
http://www.ni.com/white-paper/2709/en/
2/13
5/14/2016
Figure3.Thisgraphindicatesthatat100MHz,theinputsignalhitsthe3dBpoint.
Bandwidthismeasuredbetweenthelowerandupperfrequencypointswherethesignalamplitudefalls
to3dBbelowthepassbandfrequency.Thissoundscomplicated,butwhenyoubreakitdownitis
actuallyrelativelyeasy.
First,youwanttocalculateyour3dBvalue.
Equation1.Calculatingthe3dBPoint
Vin,ppisthepeaktopeakvoltageoftheinputsignalandVout,ppisthepeaktopeakvoltageofthe
outputsignal.Forexample,ifyouinputa1Vsinewave,theoutputvoltagecanbecalculatedas
so
.
Becausetheinputsignalisasinewave,therearetwofrequenciesatwhichtheoutputsignalhitsthis
voltagethesearecalledthecornerfrequenciesf1andf2.Thesetwofrequenciesgobymanydifferent
namessuchascornerfrequency,cutofffrequency,crossoverfrequency,halfpowerfrequency,3dB
frequency,andbreakfrequency.However,allthesetermsrefertothesamevalues.Thecenter
frequency,f0,ofthesignalisthegeometricmeanoff1andf2.
Equation2.CalculatingtheCenterFrequency
http://www.ni.com/white-paper/2709/en/
3/13
5/14/2016
Youcancalculatethebandwidth(BW)bysubtractingthetwocornerfrequencies.
Equation3.CalculatingtheBandwidth
Figure4.Thebandwidth,thecornerfrequency,thecenterfrequency,andthe3dBpointareall
connected.
CalculatingAmplitudeError
Anotherequationthatisoftenhelpfulisforamplitudeerror.
Equation4.CalculatingtheAmplitudeError
Theamplitudeerrorisexpressedasapercentage,andRistheratiooftheoscilloscopesbandwidthto
theinputsignalfrequency(fin).
Usingtheexampleabove,youhavea100MHzoscilloscopewitha100MHssinewaveinputsignalat
1V,andBW=100MHzandfin=100MHz.ThismeansR=1.Thenyoujusthavetosolvethe
http://www.ni.com/white-paper/2709/en/
4/13
5/14/2016
equation:
Theamplitudeerroris29.3percent.Youcanthendeterminetheoutputvoltageforthe1Vsignal:
Itisrecommendedthatthebandwidthofyouroscilloscopebethreetofivetimesthehighestfrequency
componentofinterestinthemeasuredsignaltocapturethesignalwithminimalamplitudeerror.For
instance,forthe1Vsinewaveat100MHz,youshoulduseanoscilloscopewith300MHzto500MHz
bandwidth.Theamplitudeerrorofa100MHzsignalatthesebandwidthsare:
CalculatingRiseTime
Anoscilloscopemusthavetheappropriatebandwidthtoaccuratelymeasurethesignal,butitmustalso
havesufficientrisetimetoaccuratelycapturethedetailsofrapidtransitions.Thisismostapplicableif
measuringdigitalsignalssuchaspulsesandsteps.Therisetimeofaninputsignalisthetimefora
signaltotransitionfrom10percentto90percentofthemaximumsignalamplitude.Someoscilloscopes
mayuse20percentto80percent,sobesuretocheckyourusermanual.
http://www.ni.com/white-paper/2709/en/
5/13
5/14/2016
Figure5.Therisetimeofaninputsignalisthetimeforasignaltotransitionfrom10percentto90
percentofthemaximumsignalamplitude.
Therisetime(Tr)canbecalculatedasfollows:
Equation5.CalculatingtheRiseTime
Theconstantkisdependentontheoscilloscope.Mostoscilloscopeswithabandwidthlessthan1GHz
typicallyhavek=0.35,whileoscilloscopeswithabandwidthgreaterthan1GHzusuallyhaveavalue
ofkbetween0.4and0.45.
Thetheoreticalrisetimemeasured
canbecalculatedfromtherisetimeoftheoscilloscope
andtheactualrisetimeoftheinputsignal
http://www.ni.com/white-paper/2709/en/
6/13
5/14/2016
Equation6.CalculatingtheTheoreticalRiseTimeMeasured
Itisrecommendedthattherisetimeoftheoscilloscopebeonethirdtoonefifththerisetimeofthe
measuredsignaltocapturethesignalwithminimalrisetimeerror.
3.SampleRate
Thesamplerate,alsoreferredtoassamplingrate,isnotdirectlyrelatedtothebandwidthspecification.
SamplerateisthefrequencyatwhichtheADCconvertstheanaloginputwaveformtodigitaldata.The
oscilloscopesamplesthesignalafteranyattenuation,gain,and/orfilteringhasbeenappliedtothe
analoginputpathandconvertstheresultingwaveformtodigitalrepresentation.Itdoessoinsnapshots,
similartotheframesofamovie.Thefastertheoscilloscopesamples,thegreatertheresolutionand
detailthatcanbeseeninthewaveform.
NyquistSamplingTheorem
TheNyquistSamplingTheoremexplainstherelationshipbetweenthesamplerateandthefrequencyof
themeasuredsignal.Itstatesthatthesampleratefsmustbegreaterthantwicethehighestfrequency
componentofinterestinthemeasuredsignal.ThisfrequencyisoftenreferredtoastheNyquist
frequency,fN.
Equation7.ThesamplerateshouldbegreaterthantwicetheNyquistfrequency.
Tounderstandwhy,takealookatasinewavemeasuredatdifferentrates.IncaseA,thesinewaveof
frequencyfissampledatthatsamefrequency.Thosesamplesaremarkedontheoriginalsignalonthe
leftand,whenconstructedontheright,thesignalincorrectlyappearsasaconstantDCvoltage.Incase
B,thesamplerateistwicethefrequencyofthesignal.Itnowappearsasatrianglewaveform.Inthis
case,fisequaltotheNyquistfrequency,whichisthehighestfrequencycomponentallowedtoavoid
aliasingforagivensamplingfrequency.IncaseC,thesamplingrateisat4f/3.TheNyquistfrequency
inthiscaseis:
BecausefislargerthantheNyquistfrequency(
),thissampleratereproducesanaliaswaveformofincorrectfrequencyandshape.
http://www.ni.com/white-paper/2709/en/
7/13
5/14/2016
Figure6.Toolowasampleratecancauseinaccuratereconstructionofthewaveform.
Thus,toaccuratelyreconstructthewaveform,thesampleratefsmustbegreaterthantwicethehighest
frequencycomponentofinterestinthemeasuredsignal.Usually,youwanttosamplearoundfivetimes
greaterthanthesignalfrequency.
Aliasing
Ifyouneedtosampleatacertainratetoavoidaliasing,thenwhatexactlyisaliasing?Ifasignalis
sampledatasamplingratesmallerthantwicetheNyquistfrequency,falselowerfrequency
componentsappearinthesampleddata.Thisphenomenonisreferredtoasaliasing.Thefollowing
figureshowsan800kHzsinewavesampledat1MS/s.Thedottedlineindicatesthealiasedsignal
recordedatthatsamplerate.The800kHzfrequencyaliasesbackinthepassband,falselyappearing
asa200kHzsinewave.
http://www.ni.com/white-paper/2709/en/
8/13
5/14/2016
Figure7.Aliasingoccurswhenasamplerateistoolowandreproducesaninaccuratewaveform
representation.
Thealiasfrequencyfacanbecalculatedtodeterminehowaninputsignalatafrequencyoverthe
Nyquistfrequencyappears.Itistheabsolutevalueoftheclosestintegermultipleofthesample
frequencyminusthefrequencyoftheinputsignal.
Equation8.CalculatingtheAliasFrequency
Forexample,considerasignalwithasamplefrequencyof100Hz,andtheinputsignalcontainsthe
followingfrequencies:25Hz,70Hz,160Hz,and510Hz.FrequenciesbelowtheNyquistfrequencyof
50Hzaresampledcorrectlythoseover50Hzappearasalias.
Figure8.Differentfrequencyvaluesaremeasured,someofwhicharealiasfrequenciesandsomeof
whichareactualfrequenciesfromthewaveform.
http://www.ni.com/white-paper/2709/en/
9/13
5/14/2016
Herearethecalculationsforthealiasfrequencies:
Inadditiontoincreasingthesamplerate,aliasingcanalsobepreventedbyusinganantialiasingfilter.
Thisisalowpassfilterthatattenuatesanyfrequenciesintheinputsignalthataregreaterthanthe
Nyquistfrequency,andmustbeintroducedbeforetheADCtorestrictthebandwidthoftheinputsignal
tomeetthesamplingcriteria.Analoginputchannelscanhavebothanaloganddigitalfilters
implementedinhardwaretoassistwithaliasingprevention.
4.Resolution
Anotherfactortoconsiderwhenselectinganoscilloscopeforanapplicationistheresolution.Bitsof
resolutionreferstothenumberofuniqueverticallevelsthatanoscilloscopecanusetorepresenta
signal.Onewaytounderstandtheconceptofresolutionisbycomparisonwithayardstick.Dividea
meteryardstickintomillimeterswhatistheresolution?Thesmallesttickontheyardstickisthe
resolutionor1outof1,000.
TheresolutionofanADCisafunctionofhowmanypartsthemaximumsignalcanbedividedinto.The
amplituderesolutionislimitedbythenumberofdiscreteoutputlevelsanADChas.Abinarycode
representseachdivisionassuch,thenumberoflevelscanbecalculatedasfollows:
Equation9.CalculatingtheDiscreteOutputLevelsofanADC
Forexample,a3bitoscilloscopehas23oreightlevels.A16bitoscilloscopeontheotherhandhas216
or65,536levels.Theminimumdetectablevoltagechangeorcodewidthcanbecalculatedasfollows:
Equation10.CalculatingtheCodeWidth
Thecodewidthisalsoreferredtoastheleastsignificantbit(LSB).Ifthedeviceinputrangeis0to10V,
thena3bitoscilloscopehasacodewidthof10/8=1.25Vwhilea16bitoscilloscopehasacodewidth
of10/65,536=305V.Thiscanmeanabigdifferenceinhowthesignalisdisplayed.
http://www.ni.com/white-paper/2709/en/
10/13
5/14/2016
Figure9.DifferenceofaWaveformBetween16Bitsand3BitsofResolution
Theresolutionyouneeddependsonyourapplicationthehighertheresolution,themorethe
oscilloscopecosts.Keepinmindthatanoscilloscopewithhighresolutiondoesntnecessarilymean
thatithashighaccuracy.However,theachievableaccuracyofaninstrumentislimitedbythe
resolution.Resolutionlimitstheprecisionofameasurementthehighertheresolution(numberofbits),
themoreprecisethemeasurement.
Someoscilloscopesuseamethodcalledditheringtohelpsmoothoutsignalstogettheappearanceof
ahigherresolution.Ditheringinvolvesthedeliberateadditionofnoisetotheinputsignal.Ithelpsby
smearingoutthelittledifferencesinamplituderesolution.Thekeyistoaddrandomnoiseinawaythat
makesthesignalbouncebackandforthbetweensuccessivelevels.Ofcourse,thisinitselfjustmakes
thesignalnoisier.But,thesignalsmoothesoutbyaveragingthisnoisedigitallyoncethesignalis
acquired.
http://www.ni.com/white-paper/2709/en/
11/13
5/14/2016
Figure10.Ditheringcanhelpsmoothoutasignal.
5.Summary
Bandwidthdescribestherangeoffrequenciesanoscilloscopecanaccuratelymeasure.Itisdefined
asthefrequencyatwhichasinusoidalinputsignalisattenuatedto70.7percentofitsoriginal
amplitude,whichisalsoknownasthe3dBpoint.
Bandwidthisthedifferencebetweenthecornerfrequencies.
Amplitudeerrorisapercentagethatistheratioofthebandwidthtotheinputsignalfrequencies
thatassistswithdeterminingthenoiseinasystem.
Itisrecommendedthatthebandwidthofyouroscilloscopebethreetofivetimesthehighest
frequencycomponentofinterestinthemeasuredsignaltocapturethesignalwithminimalamplitude
error.
Therisetimeofaninputsignalisthetimeforasignaltotransitionfrom10percentto90percentof
themaximumsignalamplitude.
Itisrecommendedthattherisetimeoftheoscilloscopebeonethirdtoonefifththerisetimeofthe
measuredsignaltocapturethesignalwithminimalrisetimeerror.
SamplerateisthefrequencyatwhichtheADCconvertstheanaloginputwaveformtodigitaldata.
Thesamplerateshouldbeatleasttwicethehighestfrequencyofinterestinthesignal,butmostof
thetimeshouldbearoundfivetimesgreater.
Aliasingiswhenfalsefrequencycomponentsappearinsampleddata.
Bitsofresolutionreferstothenumberofuniqueverticallevelsthatanoscilloscopecanuseto
representasignal.
Thehighertheresolutionofaninstrument,thegreatertheprecision.
http://www.ni.com/white-paper/2709/en/
12/13
5/14/2016
6.AdditionalInstrumentationResources
MultifunctioninstrumentsIntegratedbenchtopinstrumentsintoasingle,fixedfunctiondevice.
Learnaboutanallinoneinstrumentthatcombinesamixedsignaloscilloscope,afunctiongenerator,a
digitalmultimeter,aprogrammableDCpowersupply,anddigitalI/Ointoonedeviceandworkswith
yourPCoriPadforefficientcircuitdesigndebuggingandvalidation.
ExploreOscilloscopesBuiltforTest
Oscilloscopesareessentialinstrumentsatthecoreofavarietyofapplications,makingthema
necessityforautomatedtestsystems.Consideramodularsolutionifyourapplicationrequires
measuring,analyzing,orprocessingdatademandsfastthroughputorrequiresasmallformfactorwith
minimalpowerconsumption.
Forthecompletelistoftutorials,returntotheInstrumentFundamentalsmainpage.
http://www.ni.com/white-paper/2709/en/
13/13