基于DDS和单片机数字控制信号发生器的设计外文翻译文献文档格式.docx
《基于DDS和单片机数字控制信号发生器的设计外文翻译文献文档格式.docx》由会员分享,可在线阅读,更多相关《基于DDS和单片机数字控制信号发生器的设计外文翻译文献文档格式.docx(17页珍藏版)》请在冰点文库上搜索。
Signalgenerator;
PhaseAccumulator;
DAC
Abstract.ItsadvantagetouseDDSchipisoutputsignalfrequencybigger,andprecisionhigher,Butuserscan'
tchangetheoutputsignalwaveforms.TheMCUcanproducetherequiredarbitrarywaveforms,butitsprogramexecutionoftheorderlimitthespeed.SoweusetheirSynergytodesignthedigitalcontrolledsignalgenerator.TheSystemhastheadvantageofoutputgoodqualitywaveform,frequencyofprecisionandstability,andhighfrequency,empty,amplitudeandphaseistostepintotheneed.
Introduction
Thedigitallysynthesizedsinewaveform(DirectDigitalSynthesis,DDS)isawell-knownmethodandhasbeenappliedtomanyembeddedapplications[1].Thistechniquecanbeusedtocreateapositivedigitalsinewaveform.Comparedtootherfrequencycomposingmethod,DirectDigitalFrequencySynthesis(DDS)hasbeenthemostpopulartrendinmodernfrequencysynthetictechniqueforitsexcellentcharacteristics.ThesignalsourcethattheDDStechnologyrealizescancarryoutaccuratecontrollingonDDSfrequency,extent,phaseexportingwaveform'
setc.bynumericalcontrolcircuit,thesystemmakinguseofthismethodhasmanymeritssuchasstability,reliablyandaccuracy.
ThecommercialDDSchipcanonlyexportasinewaveforthedataintheROMformalreadyhasbeensolidified.Ifneedingtocomeintobeinganywaveform,itmaycometruebythewaythatFPGAadoptsDDSIPcoreorhardwaredescribelanguageetc,however,thecostofThiswaycostishigh;
ontheotherhand,anywaveformcanbeachievedbymakinguseofmicrocontrollerunit(MCU)tocarryoutfigurefrequencycombiningandDAconverting.TheexperimentandapplyingtestinghaveshownthatthenumericalcontrolsignalsourcecomposedofSTM32microcontrollerandDDSchipcanworkwell.
DDSandwaveformprogrammingpattern
ThecoreofDDSsystemisphaseaccumulatorcarriage,anditiscomposedofaADRandone
unitphaseregister.Whenanyclockcomes,thephaseregisterincreasesbywiththesteplength,phaseregisteroutputandphasecontrolwordaddtogether,andthentheoutputisimportedtosineinquiryformaddress.
Thesineinquiringformincludesthenumeralextentinformationofone-periodsinewave,eachaddresscorrespondstothephasedotof0~360degreesofthesinewave.ThemappingdigitalsignaldrivesDACandoutputsanalogvalue.Theoutputsinecircleandfrequencyare
Thephaseregisterwillreturntotheoriginalstatewhenthe2N/Mfcclockisfinished.
Accordingly,theDDSsystemoutputasinewavewhenthesineinquiringformfinishacircle.TheoutputsinecircleandfrequencyisTO--outputsinewavecircle,unit:
s;
TC--externalreferencedclockcircle,unit:
M--accumulatedsteplengthofphaseregister,constant;
fout--outputsinewavefrequency,unit:
Hz;
fc--externalreferencedclockfrequency,unit:
N--phaseaccumulatordigit,constant.
Therelationshipamongthefrequencycontrolword,andtheoutputsignalfrequencyandthereferencedclockfrequencyare:
Frequencycontrolwordisdirectlyproportionaltotheoutputsignalfrequency.Inordertodescribeclearly,thesinewaveformisasonevectorturnsaroundphasecircle,thephasecirclematchesalongwithacyclesinewave.Everysamplingpotsinwaveformcorrespondstoaphasedotofthephasecircle.
Tosynthesistherequiredfrequencysignal,itneedstoaccomplishthefollowingsteps
1.Controllingeverysamplingincrementofphaseandaccumulatingthem(frequencycontrolwordK),output2picumulatedphase(usingphaseaccumulator).
2.Converting2piaccumulatingphaseintothecorrespondingsineamplitude,useROMtostorethecorrespondingphase-extentformofsinefunctioningeneral.
3.UseDACtochangeextentcodeintothesignalsimulatingvoltage.
4.ThevoltagesignalthatDACexportsisladderwaveform,therequiredsimulationvoltageoutisachievedafterLPFsmoothing.
NumericalcontrolDDSsignalsourcesystemdesignsanalysis
SystemusestheSTM32ascontrolcoreandtheAD9850asgenerator.STM32is32-bitARM-basedmicrocontrollerwith128Kbyteflashmemory.
ThetwosignaloutputofSTM32canbeachievedbycontrollingAD9850andDAC0832outputsimultaneously.ThesystemdesignsblockdiagramisshowninFig.1.Onesignaloutputcangenerate30MHzsinewaveandrectangularwavebycontrollingAD9850,theotheroutputgenerateanywaveformwithitsfrequencylessthan10KHzbynumericalfrequencymixtureofDAC0832.
Fig.1Systemdesignsblockdiagram
Hardwaredesign
AD9850module
AD9850containstheDDSsystemandhigh-speedcomparator.TheAD9850canrealizetheentirenumericalfrequencycombining.ThecoreoftheprogrammableDDSisthephaseaccumulator,itiscomposedofaADRandaNbitphaseregister,Nisfor24~32.
Afterconnectingtotheaccurateclocksourceandwritingthefrequencyphasecontrolword,AD9850cangeneratethefrequency-programmableandphase-programmableoutputofanalogsinewave,whichcanbeusedasthedirectfrequencysignalsourceorbetransferredintorectangularwavethroughhigh-speedcomparator.
Withthe125MHzclock,32-bitfrequencycontrolwordcancarryouttheoutputfrequencyresolutionratioofAD9850with0.0291Hz[4].
DAC0832module
ThecircuitexportsthephasedatasheettoDAC0832fromSTM32andgetscorrespondingwaveformbyDAconverting.Thestep-by-stepadjustingphaseamountscancreatearbitraryfrequency,thePWMsignalfromtheSTM32transfersintothecorrespondingvoltagebylow-passfilter,therefore,thereferencedvoltageofDAC0832iscontrolled,furthermore,theoutputwaveformextentistunedappropriately.ThedigitaltoanalogconversioncircuitisshowninFig.2
Fig.2DACcircuit
PWMconvertingDAcircuit
Thelow-passfilteredPWMsignalfromSTM32isthenstableusingthevoltagefollower,whichwillyieldastableoutputvoltage;
thevoltagecanbeadjustedbytuningthePWMdutyfactor.ThesystemoutputthreePWMsignals,whichcontrolsAD9850outputextent,dutyfactorandtheoutputextentofDAC0832,respectively,.Fig.3showsthePWMcontrolsDAtransferringcircuit.
Fig.3PWMcontrolledDAconvertingcircuit
Fig.4Exportamplificationandthewavefilteringcircuit.(a)amplificationcircuit;
(b)filteringcircuit
Amplificationandwavefilteringcircuit
Theamplificationcircuitwillexportamplifiedwaveformandmodifythefactorofamplification.Anexcellentsmoothoutputwaveformcanbeachievedbyusingthelow-passactivepowerfiltering.TheamplificationcircuitandthefilteringcircuitisshowedinFig.4.
Softwaredesign
AndthesystemsoftwaremainlyincludeAD9850drivingmodule,DAC0832drivingmodule,thestep-by-stepautomationmodule,PWM-converting-DAmoduleanduC/GUIfiguresupportingsystemimplantedinprocedure.Theoperationinterfaceisfullofhumanizationforthe
multi-windowpatternisadopted.ThedesignprocessofthesystemsoftwareisshowninFig.5.
ImplanteduC/GUI
ThenumericalcontrolsignalsourcehasusedtheuC/GUIsoftwaresufficientlytoestablishmanywindowsandcontrolbuttons.Bymeansofinvokingthecorrespondingwindowsandcontrolwiththefeedbackinformation,theperipheralequipmentoperatedunderthecontrolofthesystem.
Theexternalequipmentismainlyseparatedintotwodrivers,thedrivebeinganAD9850moduleandDAC0832moduledrive,respectively.Thetwomodulescanbecontrolledbymeansoftheoutsideinterruptionandtiminginterruption.
AD9850Drive
AD9850has40controlwords,amongthem,32-bitisusedforfrequencycontrol,5-bitisusedforthephasecontrol,1-bitisusedforthepowersourcedormancycontrol,2-bitisusedtochooseoperationpattern.
Fig.5Systematicprocedureflowchart
This40controlwordsmayarriveatAD9850byconcurrencewayorserialway,intheconcurrenceway,8datahighwaygeneralscantransferthedatatoaregister.
Afterrepeating5times,the40-bitdataisloadedintothefrequency/phasedataregister(forrefreshingDDSoutputfrequencyandphase)attheFQ-UDrisingedge,meanwhile,theaddresspointerisresettothefirstinputregister
Thenthe8-bitdataisloadedattheW-CLKrisingedge,andthepointerissettothenextinputregister.Afterrepeating5timesofW-CLKrisingedge,theW-CLKrisingedgewillworknolongeruntiltheresetsignalcomesortheaddresspointerisresettothefirstinputregisterbytheFQ-UDrisingedge.
TheprocedureoperateAD9850modulethroughthebottomfunction,asvoidad9850(
doublefrequency,//frequencyunsignedcharphase,//phaseunsignedcharmode,//patternunsignedcharpower//source
)
TheDAC0832drivenmodule
Inthedesignofthenumericalcontrolsignalsource,DAC0832isdefinedassinglebufferedpattern,whenthe8bitParalleldataD0~D7isinput,theDAwilltransferdataintheCS.
ThebottomfunctionofvoidDA0832(u8value)caninvokeOut_To_DDS0832(doubleFrequency,u8type)functionandcontrolthedefinedwaveformandfrequency.
Thisfunctionisbasedonfigurefrequencycomposesprinciple,ittransferstheinputfrequencyintocorrespondingcontrolword,andthencombingphasestep-by-stepexpect,outputwaveformdatasheetinmemory.
TheextentanddutyfactorcanbetunedthroughinvokingAdjust_Vpp()andAdjustDuty()Step-by-stepautomationproced