Analog to Digital Conversion.docx
- 文档编号:24279153
- 上传时间:2023-05-26
- 格式:DOCX
- 页数:9
- 大小:40.80KB
Analog to Digital Conversion.docx
《Analog to Digital Conversion.docx》由会员分享,可在线阅读,更多相关《Analog to Digital Conversion.docx(9页珍藏版)》请在冰豆网上搜索。
AnalogtoDigitalConversion
AnalogtoDigitalConversion
SamerEl-Haj-Mahmoud
ElectronicsEngineeringTechnologyProgram
TexasA&MUniversity
Instructor’sPortion
Summary
ThepurposeofthislabistoprovidethestudentswithhandonexperienceinusingtheanaloginputsofaNationalInstrumentsdataacquisitioncard.ThelabassumesthatthestudentshavepriorexposuretoLabVIEW,andthattheyknowthebasicsofwritinganddebuggingLabVIEWVIs(VirtualInstruments).TheexperimentwillteachthemhowtoapplytheirLabVIEWknowledgetoacquireananalogsignalfromthefunctiongenerator.TheywilldisplayitinLabVIEWandcalculateitsRMSandaveragevalues.ThestudentsshouldhavestudiedAnalogtoDigitalconversiontheoryinclassbeforecomingtothelab.
TheobjectiveforthisexperimentisforthestudentstowritetheneededLabVIEWVItosampleananalogsignalanddisplayitonawaveformchartinLabVIEW.Theinstructionsprovidedinthestudent’ssectiondescribeastep-by-stepapproachtowritethebasicstructureoftheVI.Therestoftheimplementationislefttothestudents.TheVIprovidedisasampleimplementationandisintendedfortheinstructor’sreferenceuseandnotforthestudents.ThediagramcanbepasswordprotectedincasethestudentswanttolookatthefrontpanelandseehowtheVItheyarewritingshouldbehave.
Uses
Thisexperimentappliestogeneralinstrumentationandelectronicssystemsinterfacingcoursesinelectricalengineeringorengineeringtechnologyprograms.TheexperimentcanalsobeusefulinbasicLabVIEWcourses,teachingtheconceptsofanaloginputthroughdataacquisitioncards,inadditiontootherLabVIEWtechniquessuchastheuseofWaveformChartsandtheuseofstatisticalfunctionssuchasRMSandMean.
EquipmentList
∙PCrunningMSWindows(visit forrequirementsspecifictoyouroperatingsystem)
∙LabVIEWFullDevelopmentSystem
∙PCI1200DAQfromNationalInstruments(partnumber777386-01)
∙CB-50LPI/OConnectorBlockfromNationalInstruments(partnumber777101-01)
∙NBIRibbonCablefromNationalInstruments(partnumber180624-10)
∙TektronixTAS475FourChannelOscilloscope,oranygenerallabscopewith2ormorechannels.
∙HP3312AFunctionGenerator,oranygeneralfunctiongeneratorwithsinusoidalandsqaureoutputsignalsofvariablefrequency.
Setup
Followthestepslistedbelowtopreparetheworkstationforthisexperiment.Theinstructionsassumeyouareusingtheequipmentlistshownpreviously.
Note:
MostofthemanualsthatarereferredtoshipwithNationalInstrumentshardwareandsoftware.Ifyoucan’tfindyourhardcopyofthemanuals,youcangetthemonlineatIf youencounterproblemsduringsetup,contacttechnicalsupportat
BeforetheDayoftheLab
1.InstallLabVIEW(seetheLabVIEWReleaseNotesforyourversionofLabVIEW).
2.InstallyourPCI-1200board(seethePCI1200UserManual,oronlineat:
3.ConnecttheribboncabletothePCI1200cardandtotheI/Oconnectorblock.
OntheDayoftheLab
4.Powerupthecomputer.
5.StartLabVIEW.
6.Powerupthefunctiongenerator.
References
∙NI’swebsite:
∙Schweber,William.ElectronicCommunicationSystems.UpperSaddleRiver:
Prentice-Hall,1999;p292-3.
∙Burns,MarkandRoberts.AnIntroductiontoMixed-SignalICTestandMeasurement.TexasInstruments,2000;p.174.
Student’sPortion
Introduction
Inthisexperiment,youwillwriteaLabVIEWVItoacquireananalogsignalfromtheanaloginputpinsofthePCI1200DataAcquisitionCard(DAQ),displayitinLabVIEW,andcalculateitsRMSandaveragevalues.Youwillalsoshowtherelationshipofamplitudetonumberofaverages.ThislabrequiresbackgroundinanalogtodigitalconversionandtheconceptsofsamplingandNyquisttheorem.TheseconceptsaresummarizedintheTheorysectionofthisexperiment.
Objective
TolearnhowtouseLabVIEWforanaloginputthroughaDAQcard.
TolearnaboutAnalogtoDigitalconversionandhowtoacquireasignalanddisplayitinLabVIEW.
Tostudytheeffectofthesamplingfrequencyinanalogtodigitalconversion.
Theory
In1928,H.Nyquistshowedthatananalogsignalcouldbeperfectlyreconstructedsolelyfromitssamplevalues.Thiscouldbedonewithoutanylossofitsoriginalinformationifthesamplingrateisatleasttwicethebandwidthofthesignal,thusthefamousrule:
Nyquistsamplingrate=2xsignalbandwidth
Forexample,asignalwithabandwidthof1000Hzmustbesampledat2000ormoresamples/secondwithoutanylossofinformation.
Figure1.Sineandcosinewavessampledattwicethesignalfrequency
(Source:
Burns,MarkandRoberts.AnIntroductiontoMixed-SignalICTestandMeasurement)
Samplingatexactlytwicethesignalfrequencyisnotenoughinmostpracticalsituations.Figure1illustratesthisproblem:
“Asisevident,allthesamplesfromthesinewavearezerowhereasthosefromthecosinesignalarenot.Clearly,anyinformationcontainedinthesinewavesuchasitsamplitudewouldbelostandunobtainablefromthesamples.WecanthereforeconcludethatoneshouldnotattempttosampleatexactlytwicetheNyquistrate”
(Source:
Burns,MarkandRoberts.AnIntroductiontoMixed-SignalICTestandMeasurement,P.174)
Thisiswhyasamplingrateasmuchas10timesthesignalbandwidthisusedwhendoingananologtodigitalconversion.
QuantizationErrors
Thetermquantizationerror(orquantizationnoise)isusedtodescribethefactthatadigitalvaluecancorrespondtoadistinctspanofanalogsignals.AnyanalogsignalwithinthezoneofoneLSBwillhavethesamedigitalvalueandthereforelookidenticaltoallothersaftertheanalog-to-digitalprocess.Itisthissmalldegreeoferrorinmisrepresentationthatisknownasquantizationerror.Inordertocloselyreconstructtheoriginalanalogsignal,theanalogtodigitalconversionprocessneedstominimizethequantizationerrorasmuchaspossible.Toreducethequantizationerror,moredivisions(higherresolution)shouldbeusedtorepresenttheanalogvalue.Forthisexperiment,thistypeoferrorisminimizedbythefactthatthePCI1200boardsuseadevicewithrelativelygoodresolution(12-bits).
Figure2.QuantizationError
(Source:
Schweber,William.ElectronicCommunicationSystems.p287)
Figure2,presentstheideathattheoriginalanalogsignal(a)canberepresentedinvaryingdegreesofresolutiontherebydeterminingtheamountofquantizationerrorincluded.Atwo-bitrepresentationasin(b)hasmorequantizationerrorthanthethree-bitrepresentationin(c).Infact,witheveryincreasingbitofresolution,quantizationerroriscutinhalf.
Pre-LabPreparation
Readthisexperimentbeforecomingtothelab.YoushouldunderstandtheconceptsofsamplingandquantizationerrorsandstudytheNyquisttheorem.
Bringthefollowingtolabwithyou:
∙Thisexperiment.
∙Yourlabnotebookandpencil.
∙2virus-freeformatted3.5-inchfloppydisks(alwaysmakeabackupcopyofyourcodeontheseconddisk).
Answerthefollowingquestionsinthedatasheetprovidedattheendofthisexperimentbeforecomingtothelab.Remembertoincludetheseanswersinyourlabreporttoo.
1.WhatarethepinnumbersforanalogoutputandanaloginputonthePCI1200DAQcard?
Howmanychannelsarethereforanaloginputandanalogoutput?
2.WhichVIisusedtoreadtheanalogsignalfromtheanaloginputpin?
3.WhichVIscalculatetheRMSandmeanvaluesofasignal?
WorkstationDetails
Yourworkstationshouldhavethefollowingitems:
∙ComputerwithNationalInstrumentsLabVIEWsoftware
∙NationalInstrumentsDAQboard(insidethecomputer)
∙NationalInstrumentsDAQboardterminalblock
∙TektronixOscilloscope.
∙HP3312AFunctionGenerator.
LabProcedure
1.StartanewVIinLabVIEW.Youshouldthenaddthefollowingcontrolsandindicatorstothefrontpanel:
a.Start/StopSwitch:
ThisisthemainOn/OffswitchfortheVI.
b.NumberofReadingsDigitalControl:
ThisvaluewillbeusedtocontrolthemainloopoftheVI.
c.NumberofSamplesperReadingDigitalControl:
ThisVIwilldeterminethenumberofbufferedsamplesforeachreadingfromtheanaloginput.
d.SampleRateDigitalControl:
ThisvaluewillconfigurethesamplingrateoftheanaloginputontheDAQ.
e.WaveformoftheAcquiredSignal:
Thischartwilldisplaytheacquiredanalogsignal.Itshouldmatchthesignalobtainedontheoscilloscopewhenmeasuredfromthefunctiongenerator.
f.RMSvalueDigitalIndicator:
YouwilldisplaytheRMSvalueofeachbufferedinputoftheacquiredsignal.
g.MeanvalueDigitalIndicator:
Youwilldisplaythemeanvalueofeachbufferedinputfromtheacquiredsignal.
h.AverageDCValueDigitalIndicator:
YouwilldisplaytherunningaverageDCvalue(averageofthemeanvalues)fortheentireacquiredsignal.
2.TheVIissupposedtoworkasfollows:
itreadsananalogsignalbyacquiringanumberof“samples”atacertain“samplingrate”(bufferedinput).Theacquiredsignal,alongwiththemeanandRMSvaluesofthosesamplesaredisplayedonthefrontpanel.Then,theprocessrepeats.Eachiterationoftheloopiscalledone“reading”.ItisalsorequiredtodisplaytheaverageDCvalue(averageofmeansforallreadings).
3.Afteraddingthosecontrols,startwiringtheVIdiagramswiththecontrolstoimplementthefunctionalityofyourprogram.YoumightfindthefollowingVIsusefulinyourcode:
a.Amainloop,bestimplementedasaForLoopstructure,whichwillbecontrolledbytheStart/Stopswitchandthenumberofreadingsdigitalcontrol.
b.AnAnalogInp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Analog to Digital Conversion