




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
附錄AEmbeddedLinux-basedacquisitionsystemWiththerapiddevelopmentofinformationtechnology,peopleneedtoaccurate,fastandconvenientaccesstolargeamountsofdataandbeabletoquicklyextractusefulinformation.EmbeddedSystemsistheITnetworktechnologyandanewdirectionoftechnologydevelopment.AmericanfuturistTimorpredictedduringhisvisittoChinain1999:4~5yearsafterthetoolwillbeembeddedPCandtheInternetisthesecondgreatestinventionafter.20thcentury90's,theapplicationofembeddedtechnologyinfullswing,hasbecomethecommunicationsandconsumertechnologyproducts,themainplatform.Inthefieldofautomaticcontrol,notonlycanbeusedinATMmachines,vendingmachines,industrialcontrolandotherspecialequipmentandmobilecommunicationsequipment,GPS,acombinationofentertainment,embeddedsystemsplayahugeroleinthesame.Thedevelopmentofembeddedtechnologymakesiteasytodevelopembeddedsystems,reducingdevelopmentcosts,genericproductsincreasedtoreplacement.Combinationofthetraditionalembeddedsystemsaresmall,energy-less,anti-interferenceability,stablecharacteristics,thedevelopmentofembeddeddataacquisitionsystemproducts,whetherasastand-aloneproduct,orafunctionofasystemofmodules,allItisverymeaningful.DataAcquisitionSystemisacomputer,communicationsandelectronictechnology,industrialcontrolforanintegrateddetectionsystem.ThispaperintroducesembeddedLinux-baseddataacquisitionsystemhardwarearchitectureandsoftwaredesign.Toenhancethesystemtorespondtothereal-timeperformanceandmulti-taskprocessingcapabilityofhardwareusedintheARM9microprocessortechnology,atthesametimeLinuxoperatingsystemmigration,systemreliabilityandscalabilitycanbeimproved.DesignedtomakefulluseofthecharacteristicsofembeddedLinux.Systemsoftwaremoduleshaveadataacquisitionmodule,dataprocessingmodule,datamodulesanddatacommunicationsdiagnosticmodule.EmbeddedLinuxoperatingsystemwillintroduceadataacquisitionsystemdesignandacceleratethedevelopmentofthesystemtofacilitatethefunctionsofthefutureexpansionoftheobservationaldatatoimprovethetimelinessandaccuracyofobservationtoachievetheautomation.Embeddedsystemisapplication-centric,basedoncomputertechnology,software,hardwarecanbetailoredtomeettheapplicationsystemfunctions,reliability,cost,size,powerconsumption,therearestrictrequirementsofadedicatedcomputersystems,operatingsystemsandfeatureswillintegratedsoftwaresystemsincomputerhardware,inanutshellisthesystemsoftwareandhardwareintegration,theworkissimilartothewayBIOSwithsoftwarecodeinsmall,highlyautomated,fastresponseandsoon.Particularlysuitedtotherequirementsofreal-timeandmulti-taskingsystem.Embeddedsystemsareadvancedcomputertechnology,semiconductortechnology,electronictechnologyandthepracticalapplicationofthevarioussectorsoftheproductofthecombination.EmbedThestructureofsystemscomposedbytwomodules:thehardwareplatformandsoftwareplatform.AcquisitionDataAcquisitionSystematthescenetocompletethetask.Acquisitionsystemdesignedfordistributedcontrolsystems,PCsystemsandon-sitetestingofthecommunicationbetweendigitalserialbased.Normalrun-time,on-sitedetectionofthecontrollertocompletethenext-bitdataacquisition,dataprocessing,datastorage,datadistributionandothertasks.Systemhasacertaindegreeofself-detection,self-tuningcapabilities,tounusualcircumstancestothePC,inordertomaintain.Inordertoadapttoavarietyofdifferentcircumstancesautomaticdetectionofweldrequirements,theentiredetectionsystemismodulardesign,differentmodulescanbecombinedintodifferentapplications.Micro-computer'sstoragespacesmaller,whilethestandardLinuxisaPC,andtheneedfortheprocessofreducingtheLinuxkernel.Forsomeaddedorremovedindependentlyofthefunctionblockcanberetainedonlythekernelembeddedsystemthefunctionalityrequiredtosupportthemodule,removeunwantedfeatures.Inordertomeetcertainreal-timerequirementandshouldnotshieldthekernelvirtualmemorymanagementmechanismforenhancedreal-timeLinux.ComputersystemsareX86motherboardarchitecture,compatibledesktopPCversionofLinuxi386.Inthisway,wecandirectlyusetheX86system,thecoreofthecompileronLinuxtocompilethesourcecodedirectlyandcutting,andtoavoidthecoreoftheLinuxsourcecodepartofinvolvingCPUmoduleandmemorymanagementmodulechanges.IncreaseinfilesystemandGUIbasedonsystemneeds,thefilesystemshouldinclude:thebasicfilesystemstructure,thebasicapplication,thebasicconfigurationfile,thebasicequipment/dev/hd*and/dev/tty*,thebasicproceduresrequiredtorunthefunctionlibrary.GUIisavisualdesignsoftwareindispensable,butalsoforthefuturemaintenanceofon-sitevisualinspectionoftheinterface.GuidethepreparationofLinuxcode,thesystemwillstartasdiskonchipequipment,guidanceonthecodeondiskonchip.Powersystemafterthebootcodefromthebasichardwareinitialization,andthenthekernelimageintomemorybytherun.Embeddedsystemsisusuallyacompacthardwareplatform,adedicatedandstrongatthecoreoftheprocessor,whileasmallnumberofperipheralscombinedwiththeapplicationofrelevance,thecharacteristicsofdiversity;embeddedsystemstypicallyincludeembeddedsoftwareapplicationsandembeddedoperatingsystem.Embeddedoperatingsystemsrangingfromhardwareandapplicationprocedures,isresponsiblefortaskschedulingandmanagementofreal-timeapplications,completecontrolofthehardwareandoperation.Real-timeapplicationsarebasedonreal-timeembeddedoperatingsystem,theuseofreal-timeoperatingsystemmechanismsforthecompletionofthespecificfunctionofaspecificembeddedsystemapplications.Embeddedsystemsisdifferentfromthegeneralcomputersystem,ithasotherapplicationsdonothaveanumberofcharacteristics.EmbeddedLinux-baseddataacquisitionsystemboarddesign,mainlybyamotherboardandaplug-9motherboard.Alltheplug-3Ustructure,themoduledual-socketconnectionbetweenthemodulesystemmotherboardlinkedtoimprovethereliabilityoftheentiredevice.Oneplug-inboardsforsignalacquisitionandprocessing;additionalplug-insforthe8-channelsignalconditioningboard(athree-wayon-boardprocessingcircuit,atotalof24road,youcanapproachthebasisofsensorsignals,changesinsignalconditioningchannelplate).Compactsystem,theentirepaneldesign,elegantappearance.Systemconsistsofsignalconditioningsystemsandsignalacquisition,processingsystemconstitutedoftwoparts.Signalconditioningsystemfromthechargetoenlarge,zoominorcurrent-voltageamplifiercircuit(dependingonsensortypesetting),program-controlledzoom,programmablelow-passfiltering,amplification,suchasabuffercircuitcomposedoffourlevels,includingsingle-chipcontrolofPCbytherequesttoenlargetheprogram,program-controlledparameterssuchaslow-passfilter.Signalacquisition,processingsystemtobeadoptedARM+FPGAstructures.Thebenefitsofsuchastructureare:thedifficultyofthesmallerhardwaredevelopmentplatform,systemsoftwareupgradeseasytoimplement.Fromfielddevicesthroughavarietyofsensorsignalsintolow-noisecablechannelsignalconditioningboard,eachchannelsignalconditioningboardthatcontainsthethree-channelsignalconditioning.Accordingtodifferenttypesofsensorswithdifferentchannelsignalconditioningboard,avarietyofsignalsaftersignalconditioningforthesameafterthetransformationofthevoltagesignalspecifications.Signalprocessingflowisasfollows:thesensoroutputsignalvoltageamplification,currentamplification,suchaszoominorcharge(asthesensortypesetting)istransformedintovoltagesignal,thevoltagesignalamplificationbytheprogram,program-controlledlow-passfilter,andfinallytoenlargethebufferafterprocessing,theoutputvoltagesignaltothesignalacquisition,processingboard.EmbeddedLinuxsystemfromtheperspectiveofsoftwaregenerallycanbedividedintofourlevels.(1)bootloader.Includingthecuringofthefirmwarebootcode(optional)andtwomajorBootloader.
(2)core.Board-specificcustomizationofembeddedcores,aswellascontrolofkernelbootparameters.
(3)filesystem.IncludingtherootfilesystemandtheestablishmentoftheFlashmemorydevicesonthefilesystem.Itisamanagementsystemtoprovideavarietyofconfigurationfilesandsystemimplementationofuserapplicationstorunagoodcarrieroftheenvironment.
(4)userapplicationsanddrivers.User-specificapplicationsanddrivers.Sometimes,theuserapplications,andbetweentheinnernuclearlayermayalsoincludeabuilt-ingraphicaluserinterface.Systembeginningin2004inthecompany'sthermalpowerplant,BOFsteelplant,powerplantsandotherindustrialapplicationsite.PracticeshowsthattheembeddedLinux-baseddataacquisitionsystemtorunstableandreliable.附錄B基于Linux的嵌入式采集系統(tǒng)隨著信息技術(shù)的飛速發(fā)展,人們需要能夠準確、快速和便捷地獲得大量數(shù)據(jù)并能從中迅速提取出有用的信息。嵌入式系統(tǒng)是繼IT網(wǎng)絡(luò)技術(shù)之后,又一個新的技術(shù)發(fā)展方向。美國著名未來學家葛洛龐帝1999年訪華時預言:4~5年后嵌入式能工具將是繼PC和因特網(wǎng)之后最偉大的發(fā)明。進入20世紀90年代,嵌入式技術(shù)的應用全面展開,目前已成為通信和消費類產(chǎn)品的主要平臺技術(shù)。在自動控制領(lǐng)域,不僅可以用于ATM機、自動售貨機、工業(yè)控制等專用設(shè)備和移動通信設(shè)備、GPS、娛樂等相結(jié)合,嵌入式系統(tǒng)同樣發(fā)揮巨大的作用。嵌入式技術(shù)的發(fā)展使得開發(fā)嵌入式系統(tǒng)變得容易,開發(fā)成本降低,產(chǎn)品通用性提高,可更新?lián)Q代。結(jié)合傳統(tǒng)嵌入式系統(tǒng)體積小、耗能少、抗干擾能力強、穩(wěn)定的特點,開發(fā)嵌入式數(shù)據(jù)采集系統(tǒng)的應用產(chǎn)品,不管是作為一個獨立的產(chǎn)品,還是某一系統(tǒng)的某個功能模塊,都是十分有意義的。數(shù)據(jù)采集系統(tǒng)是集計算機、通信及電子技術(shù)、工業(yè)控制為一體的綜合探測系統(tǒng)。本文介紹了基于嵌入式Linux的數(shù)據(jù)采集系統(tǒng)的硬件結(jié)構(gòu)和軟件設(shè)計。為提高系統(tǒng)的實時響應性能和多任務處理能力,在硬件上采用ARM9微處理器技術(shù),同時移植Linux操作系統(tǒng),使系統(tǒng)的可靠性和可擴展性得以提高。設(shè)計中充分利用了嵌入式Linux的特點。系統(tǒng)軟件模塊有數(shù)據(jù)采集模塊、數(shù)據(jù)處理模塊、數(shù)據(jù)通信模塊和數(shù)據(jù)診斷模塊。將嵌入式Linux操作系統(tǒng)引入數(shù)據(jù)采集系統(tǒng)的設(shè)計中,加速了系統(tǒng)的開發(fā),方便了將來的功能擴展,提高了觀測數(shù)據(jù)的及時性和準確性,實現(xiàn)了觀測的自動化。嵌入式系統(tǒng)是以應用為中心、以計算機技術(shù)為基礎(chǔ)、軟件硬件可裁剪、適應應用系統(tǒng),對功能、可靠性、成本、體積、功耗有嚴格要求的專用計算機系統(tǒng),它將操作系統(tǒng)和功能軟件集成于計算機硬件系統(tǒng)之中,簡而言之就是系統(tǒng)的應用軟件與系統(tǒng)的硬件一體化,類似于BIOS的工作方式,具有軟件代碼小,高度自動化,響應速度快等特點。特別適合于要求實時和多任務的體系。嵌入式系統(tǒng)是將先進的計算機技術(shù)、半導體技術(shù)、電子技術(shù)和各個行業(yè)實際應用相結(jié)合的產(chǎn)物。嵌入式系統(tǒng)的結(jié)構(gòu)由兩大模塊組成:硬件平臺和軟件平臺。嵌入式系統(tǒng)是以應用為中心、以計算機技術(shù)為基礎(chǔ)、軟件硬件可裁剪、適應應用系統(tǒng),對功能、可靠性、成本、體積、功耗有嚴格要求的專用計算機系統(tǒng),它將操作系統(tǒng)和功能軟件集成于計算機硬件系統(tǒng)之中,簡而言之就是系統(tǒng)的應用軟件與系統(tǒng)的硬件一體化,類似于BIOS的工作方式,具有軟件代碼小,高度自動化,響應速度快等特點。特別適合于要求實時和多任務的體系。嵌入式系統(tǒng)是將先進的計算機技術(shù)、半導體技術(shù)、電子技術(shù)和各個行業(yè)實際應用相結(jié)合的產(chǎn)物。數(shù)據(jù)采集系統(tǒng)的采集任務在現(xiàn)場完成。采集系統(tǒng)設(shè)計為分布式的控制系統(tǒng),系統(tǒng)上位機與現(xiàn)場檢測下位機之間的通信基于串口。正常運行時,現(xiàn)場下位檢測控制器完成數(shù)據(jù)采集、數(shù)據(jù)處理、數(shù)據(jù)存儲、數(shù)據(jù)發(fā)送等多種任務。系統(tǒng)具有一定的自檢測、自校正能力,能將異常情況傳給PC機,以便維護。為了適應各種不同情況對焊縫自動檢測的要求,整個檢測系統(tǒng)采用模塊化結(jié)構(gòu)設(shè)計,可應用不同的模塊組合成不同的應用系統(tǒng)。微型計算機的存儲空間較小,而標準Linux是面向PC的,需要對Linux內(nèi)核進行裁減。對一些可獨立加上或卸下的功能塊,可在編譯內(nèi)核時僅保留嵌入式系統(tǒng)所需的功能支持模塊,刪除不需要的功能。為了滿足一定的實時性要求,需屏蔽內(nèi)核的虛擬內(nèi)存管理機制來增強的Linux實時性。系統(tǒng)中微機主板屬于X86體系結(jié)構(gòu),兼容一般桌面PC的Linuxi386版本。這樣,我們可以直接使用X86體系的編譯器對Linux核心源代碼直接進行編譯及裁剪,并避免了對Linux核心源代碼中涉及CPU的部分模塊以及內(nèi)存管理模式模塊的修改。增加了文件系統(tǒng)和GUI根據(jù)系統(tǒng)需要,文件系統(tǒng)應包括:基本文件系統(tǒng)結(jié)構(gòu)、基本應用程序、基本配置文件、基本設(shè)備/dev/hd*和/dev/tty*、基本程序運行所需的函數(shù)庫。GUI是軟件可視化設(shè)計不可缺少的,也為將來的現(xiàn)場檢修維護提供可視化的界面。編寫Linux的引導代碼,將diskonchip作為系統(tǒng)的啟動設(shè)備,引導代碼放在diskonchip上。系統(tǒng)加電后,由引導代碼進行基本的硬件初始化,然后把內(nèi)核經(jīng)映像裝入內(nèi)存運行。嵌入式系統(tǒng)的硬件平臺通常以緊湊、專用性強的處理器為核心,同時結(jié)合少量的外圍設(shè)備,具有應用相關(guān)性、多樣性的特點;嵌入式系統(tǒng)軟件通常包含嵌入式應用程序和嵌入式操作系統(tǒng)。嵌入式操作系統(tǒng)介于硬件和應用程序之間,負責任務調(diào)度并管理實時應用程序,完成對硬件的控制和操作。實時應用程序是基于嵌入式實時操作系統(tǒng)、利用操作系統(tǒng)提供的實時機制完成特定嵌入式系統(tǒng)具體功能的應用程序。嵌入式系統(tǒng)不同于一般計算機系統(tǒng),它具有其他應用系統(tǒng)所沒有的一些特性。(1)體積小:在嵌入式系統(tǒng)的主體應用場合,如手持設(shè)備,智能儀器儀表,家用電器等均對體積有較高限制,要求盡量少占用空間。(2)存儲容量小:嵌入式系統(tǒng)一般以ROM,FLASHMEMORY、RAM等作為存儲介質(zhì),由于價格及嵌入式系統(tǒng)體積等因素限制,因而不可能有太大的存儲容量。(3)良好的性能價格比:很多嵌入式設(shè)備是嵌入于宿主設(shè)備以輔助宿主設(shè)備高效地完成其功能,因而性價比要求較高,以防止過分提高宿主設(shè)備成本?;贚inux的嵌入式數(shù)據(jù)采集系統(tǒng)采用板卡式設(shè)計,主要由一塊母板個插件和一個母板。各插件全部采用3U背插式結(jié)構(gòu),各模件采用雙插座連接方式,各模件之間通過系統(tǒng)內(nèi)部母板相聯(lián)系,提高了整個裝置的可靠性。其中一個插件為信號采集處理板;另外的8個插件為信號調(diào)理通道板(一塊板上三路調(diào)理電路,總共24路,可以根據(jù)傳感器的信號路數(shù),增減信號調(diào)理通道板)。系統(tǒng)的結(jié)構(gòu)緊湊,整面板設(shè)計,外形美觀大方。系統(tǒng)由信號調(diào)理系統(tǒng)和信號采集、處理系統(tǒng)兩部分構(gòu)成。信號調(diào)理系統(tǒng)由電荷放大、電壓放大或電流放大電路(視傳感器類型定)、程控放大、程控低通濾波、緩沖放大等四級電路組成,其中由單片機控制上位機要求的程控放大、程控低通濾波等參數(shù)。信號采集、處理系統(tǒng)擬采用ARM+FPGA結(jié)構(gòu)來實現(xiàn)。此種結(jié)構(gòu)的好處是:硬件開發(fā)平臺難度較小,系統(tǒng)軟件升級容易實現(xiàn)。取自現(xiàn)場設(shè)備的各種傳感器信號通過低噪音電纜送入信號調(diào)理通道板,每個信號調(diào)理通道板上包含三個信號調(diào)理通道。根據(jù)不同的傳感器類型配備不同的信號調(diào)理通道板,各種信號經(jīng)過信號調(diào)理后都變換為同一規(guī)格的電壓信號。信號處理流程如下:傳感器輸出的信號經(jīng)過電壓放大、電流放大或電荷放大等(視傳感器類型定)變換為電壓信號,該電壓信號經(jīng)程控放大、程控低通濾波,最后再經(jīng)過緩沖放大處理,輸出電壓信號送給信號采集、處理板。嵌入式Linux系統(tǒng)從軟件的角度看通??梢苑譃?個層次。(1)引導加載程序。包括固化在固件中的啟動代碼(可選)和Bootloader兩大部分。(2)內(nèi)核。特定于嵌入式板子的定制內(nèi)核以及控制內(nèi)核引導系統(tǒng)的參數(shù)。(3)文件系統(tǒng)。包括根文件系統(tǒng)和建立于Flash內(nèi)存設(shè)備之上的文件系統(tǒng)。它是提供管理系統(tǒng)的各種配置文件以及系統(tǒng)執(zhí)行用戶應用程序良好運行環(huán)境的載體。(4)用戶應用程序和驅(qū)動。特定于用戶的應用程序和驅(qū)動程序。有時在用戶應用程序和內(nèi)核層之間可能還會包括一個嵌入式圖形用戶界面。系統(tǒng)從2004年開始在公司下屬的的熱電廠、轉(zhuǎn)爐煉鋼廠、動力廠等工業(yè)現(xiàn)場得到應用。實踐表明,基于Linux的嵌入式數(shù)據(jù)采集系統(tǒng)運行穩(wěn)定可靠。附錄AResearchofParameterAdjustableHarmonicSignalGeneratorBasedonDDSLIWeiCollegeofComputerandInformationChangzhou,213022,Chinaliwei_2142@163.comZHANGJinboCollegeofComputerandInformationEngineeringHohaiUniversityChangzhou,213022,Chinazhangjb@AbstractHarmonicsignalgeneratorwhosefrequency,phaseandharmonicproportionareadjustableisdesignedforthedetectingequipmentofpowersystem.TheprincipleofDDSandthedesignrequirementareintroduced.ThenthealgorithmofROMcompressionbasedonthesymmetryofsinewaveisexpounded.Finally,usingAlteraFPGA,thedetaildesignofthewholesystemispresentedandtestwaveformsaregiven.Testresultsindicatethatthesystemfulfilsthedesignrequirements.1.IntroductionAnidealpowersystemsuppliespowerwithsinewave,butthepracticalwaveformofpowersupplyoftenhasmanyharmoniccomponents.Thebasicreasonofharmonicisthatthepowersystemsuppliespowertotheelectricalequipmentwithnonlinearcharacteristic.Thesenonlinearloadsfeedhigherharmonicbacktothepowersupply,andmakethewaveformofcurrentandvoltageinpowersystemproduceseriousdistortion.Inthedetectionfieldofpowersystem,standardsignalgeneratorswhichcansimulatethepowerharmonicarehighlyneededtocalibratethepowerdetectingequipment,suchasphasedetector,PDdetector,andsoon.Sotheresearchofparameteradjustableharmonicsignalgeneratorprovidestheexactbasisforthestableoperationofpowerdetectingequipment,andhasgreateconomicbenefitandsocialvalue.2.PrincipleofdirectdigitalsynthesisDirectdigitalsynthesis(DDS)isanewfrequencysynthesistechnologywhichdirectlysynthesizeswaveformonthebasisofphase.Usingtherelationshipbetweenphaseandamplitude,thephaseofwaveformissegmentedandassignedrelevantaddresses.Ineachclockperiod,theseaddressesareextractedandtherelevantamplitudesaresampled.Theenvelopeofthesesampledamplitudesistheexpectedwaveform.Iftheclockfrequencyisconstant,thefrequencyofoutputsignalisadjustablewithdifferentextractedstepsofaddresses.DDSiscomposedofphaseaccumulator,ROMtable,DACandLPF.Ineachclockperiod,theoutputofphaseaccumulatorisaccumulatedwithfrequencycontrolword,andhighL-bitoftheoutputareusedasaddresstoquerytheROMtable.IntheROM,theseaddressesareconvertedtothesampledamplitudesoftheexpectedwaveform.ThenDACconvertsthesampledamplitudestoladderwave.IntheLPF,theladderwaveissmoothed,andtheoutputisthecontinuousanalogwaveform.Supposethattheclockfrequencyisfc,frequencycontrolwordisK,phaseaccumulatorisN-bit,thenoutputfrequencyisfout=(K/2N)fc,frequencyresolutionisΔfmin=fc/2N.AccordingtotheNyquistSampleCriterion,outputfrequencyupperlimitisfmax<0.5fc.Becauseofthenon-idealcharacteristicofLPF,outputfrequencyupperlimitofDDSisfmax=0.4fc.3.Schemedesign3.1.DesignrequirementsThegoalofthesystemistodesignaharmonicsignalgenerator,whosefrequency,phaseandharmonicproportionareadjustable.Theoutputwaveformiscomposedoffundamentalwave,3thharmonic,5thharmonicand7thharmonic.Frequencyresolutionis1Hz.Theadjustablerangeofinitialphaseis0~2πanditsresolutionis1o.Theadjustablerangeofharmonicproportionis0~50%anditsresolutionis1%.Accordingtothedesignrequirements,systemclockfrequencyis15MHzandphaseaccumulatoris24-bit.InordertomakethemostofEAB,211×8bitsROMtableisadopted.11-bitphasecontrolwordisusedtomeettherequirementofinitialphaseresolution.7-bitproportioncontrolwordisadoptedtorealizethesettingofharmonicproportion.3.2.AlgorithmofROMcompressionAsisknown,phasetruncationerroristhemainfactorofoutputwaveformdistortion.Toavoidthis,theROMsizemustbeexponentiallyincreased,howevertheEABofFPGAislimited.SothealgorithmofROMcompressionbasedonthesymmetryofsinewaveisadoptedinthesystem.Sinewaveofoneperiodisdividedinto4sections:[0~π/2]、[π/2~π]、[π~3π/2]、[3π/2~2π].Usingthesymmetryofsinewave,sampledamplitudesofthefirstsectionarestoredintheROMtable.Byaddressconversionandamplitudeconversion,sampledamplitudesofoneperiodsinewavecanbegenerated.Bythismeans,theROMsizeisaquarteroftheprevioussize.InthesameROM,samplingpointscanbeincreasedby4timeswiththismethod.SampledamplitudesofquarterwavearestoredintheROMtable.Theoutputaddressofphaseaccumulatoris(L+2)-bit.ThelowL-bitareusedtoquerytheROMtablewhilethehigh2-bitareusedtoidentifyphasesections.Whenthehighestbitis1,theoutputofROMtableshouldbesymmetricallyconvertedbytheamplitudeconvertor.Whenthesecondhighestbitis1,theL-bitaddressshouldbesymmetricallyconvertedbytheaddressconvertor.4.SystemdesignbasedonFPGAThesystemcanbedividedintotwofunctionmodules:sinewavegenerationmoduleandharmonicsynthesismodule.Sinewavegenerationmoduleisthekeypartofthesystem.ItcanbedividedintophaseaccumulatormoduleandROMcompressionmodule.AlteraFPGAEP2C5Q208C8isadoptedasthecorecomponentofthesystem.VHDLisusedtoprogramthewholesystem.CompilationandsimulationareimplementedinQuartusⅡ.4.1.Sinewavegenerationmodulephaseaccumulatormoduleiscomposedof24-bitaccumulatorand11-bitadder.Underthecontrolofsystemclock,theoutputof24-bitaccumulatorisaccumulatedwith9-bitfrequencycontrolword.Then11-bitadderadds11-bitphasecontrolwordtotheoutputofaccumulator.High13-bitofthefinalresultareusedasaddresstoquerytheROMcompressionmodule.ROMcompressionmoduleiscomposedofaddressconvertor,amplitudeconvertorandROMtable.13-bitaddressofphaseaccumulatormoduleisdividedintothreeparts.Thehighestbitisusedastriggersignaloftheamplitudeconvertor.Thesecondhighestbitisusedastriggersignaloftheaddressconvertor.Thelow11-bitareusedtoquerytheROMtable.Thensampledamplitudesofsinewavearegenerated.SimulationresultofsinewavegenerationmoduleisshowninFig.4.Frequencycontrolwordissetas50whilephasecontrolwordissetas180.Whentheenablesignalisturnedintolowlevel,thefirstoutputvalueisthewaveformdataofaddress180intheROMtable.Witheachrisingedgeofsystemclock,thewaveformdataofaddress180,181,182,183aresentout.Theoutputvaluesarerespectively76,76,77,77.4.2.HarmonicsynthesismoduleHarmonicsynthesismoduleimplementsthesynthesisoffundamentalwave,3thharmonic,5thharmonicand7thharmonic.The3th,5thand7thharmonicdataarerespectivelymultipliedbytheirproportioncontrolwords.Thentheresultsofmultiplicationareaddedtothefundamentalwavedata.Therealizationofmultiplicationistheemphasisofthemodule.Becauseitisdifficulttoimplementthemultiplicationoffloating-pointformatonFPGA,harmonicproportionisdividedintonumeratoranddenominator.Thenumeratorisdefinedasproportioncontrolwordwhilethedenominatoris100.Firstly,harmonicdataismultipliedbytheproportioncontrolwordinthemultiplier.Then,theproductofmultiplierisdividedby100inthedivider.Finally,theremainderisexcludedandthequotientispreserved.UsingAlteraIPtools,themultiplierandthedividerofharmonicsynthesismodulearerealized.Blockdiagramofharmonicsynthesismoduleisshown.Simulationresultofharmonicsynthesismoduleis.Controlwordsaresetbefore2.0ms.Fundamentalwavefrequencyis50Hz,anditsinitialphaseis0o.The3thharmonicfrequencyis150Hz,initialphaseis45oandproportionis50%.The5thharmonicfrequencyis250Hz,initialphaseis90oandproportionis25%.The7thharmonicfrequencyis350Hz,initialphaseis135oandproportionis17%.Whenenablesignalisturnedintolowlevel,harmonicsynthesismodulebeginstogeneratetheharmonicsynthesisdata.5.TestresultsFigure7.Two-channelsinewaves(frequencyis50Hzandphasedifferenceis180o)Figure8.Two-channelsinewaves(frequencyis50Hzandphasedifferenceis120o)Figure9.HarmonicsynthesiswaveformAfterthedesignofthesystem,thewholefunctionistested.Fig.7showstwo-channelsinewaveswhosefrequencyis50Hzandphasedifferenceis180o.Fig.8showstwo-channelsinewaveswhosefrequencyis50Hzandphasedifferenceis120o.Fig.9showstheharmonicsynthesiswaveform,whosefundamentalwaveproportionis100%,3thharmonicproportionis25%,and5thharmonicproportionis10%.Testwaveformsindicatethattheparameteradjustableharmonicsignalgeneratorfulfilsthedesignrequirements.6.ConclusionInthedetectionfieldofpowersystem,standardsignalgeneratorswhichcansimulatethepowerharmonicarehighlyneededtocalibratethepowerdetectingequipment.Tosolvethisproblem,aharmonicsignalgeneratorwhosefrequency,phaseandharmonicproportionareadjustableispresented.UsingAlteraFPGA,thewholesystemisimplemented.Testresultsindicatethattheadjustmentandstabilizationprecisionofparametersmeetthedesignrequirements.Thissubjectprovidestheexactbasisforthestableoperationofpowerdetectingequipment,andhasgreateconomicbenefitandsocialvalue.References[1]LiXiaomingandQuxiujie,“ApplicationofDDS/FPGAinSignalGeneratorSystems”,ModernElectronicsTechnique,2006:78-79.[2]YuYongandZhengXiaolin,“DesignandImplementationofDirectDigitalFrequencySynthesisSineWaveGeneratorBasedonFPGA”,JournalofElectronDevices,2005:596-599.[3]M.A.Taslakow,“DirectDigitalSynthesizerwithimprovedspectrumatlowfrequencies”,2000IEEE/EIAInternationalFrequencyControlSymposiumandExhibition,2000:280-284.[4]YangLiandLiZhen,“Multi-waveshapeSignalGeneratorBasedonFPGA”,RadioEngineering,2005:46-48.[5]D.J.BetowskiandV.Beiu,“ConsiderationsforphaseaccumulatordesignforDirectDigitalFrequencySynthesizers”,IEEEInternationalConferenceonNeuralNetworksandSignalProcessing,2003:176-179.[6]J.Vankka,“MethodsofmappingfromphasetosineinDirectDigitalSynthesis”,1996IEEEInternationalFrequencyControlSymposium,1996:942-950.[7]K.A.EssenwangerandV.S.Reinhardt,“SineoutputDDSsAsurveyofthestateoftheart”,1998IEEEInternationalFrequencyControlSymposium,1998:370-376.附錄B基于DDS參數(shù)可調(diào)諧波信號發(fā)生器的研究李煒學院計算機與信息工程河海大學常州,213022,中國liwei_2142@163.com張金波學院計算機與信息工程河海大學常州,213022,中國zhangjb@摘要諧波信號發(fā)生器的頻率,相位和諧波比例可調(diào)的目的是為檢測設(shè)備的電源系統(tǒng)。介紹了DDS的原理和設(shè)計要求。然后在ROM的壓縮算法的基礎(chǔ)上闡述了正弦波的對稱性。最后,利用Altera的FPGA詳細的設(shè)計了整個系統(tǒng),并給出了測試波形。實驗結(jié)果表明,該系統(tǒng)滿足了設(shè)計要求。1簡介一個理想的電力系統(tǒng)是正弦波供電,但實際波形電源往往有許多諧波成分。產(chǎn)生諧波的基本原因是電力系統(tǒng)供電的電氣設(shè)備的非線性特性。這些非線性負載依靠高次諧波回到電源,使波形的電流和電壓的電力系統(tǒng)產(chǎn)生嚴重的失真。在電力系統(tǒng)的檢測領(lǐng)域,標準信號發(fā)生器可以模擬電力諧波非常需要標定功率檢測設(shè)備,如相位檢測器,局部放電檢測儀,等等。因此,為參數(shù)可調(diào)諧波信號發(fā)生器的研究提供準確的依據(jù)和穩(wěn)定運行的電力檢測設(shè)備,并具有很大的經(jīng)濟利益和社會價值。2直接數(shù)字頻率合成的原理直接數(shù)字合成(DDS)是一種在相位的基礎(chǔ)上直接合成波形的新的頻率合成技術(shù),利用相位和振幅之間的關(guān)系,對相位的波形分割和分配有關(guān)的地址。在每一個時鐘周期,提取這些地址和有關(guān)振幅采樣。系統(tǒng)中這些被抽樣幅度是預期的波形。如果時鐘頻率是恒定的,頻率可調(diào)輸出信號的地址可有不同提取步驟。直接數(shù)字頻率合成器由累加器,存儲器,DAC和低通濾波器組成。在每一個時鐘周期,輸出相位累加器是由頻率控制字累計,高左旋位輸出作為地址查詢存儲器。在ROM中,這些地址被轉(zhuǎn)換
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025湖北省安全員考試題庫及答案
- 包租廠房合同范本
- 倉庫招聘合同范本
- 加工車庫門窗合同范本
- 勞務合同租賃合同范本
- 個人單位用人合同范本
- 單位購車職工使用合同范本
- 刮瓷墻面修補合同范本
- 冷庫搬運服務合同范本
- 業(yè)主瓷磚采購合同范本
- 新疆所有煤礦基本信息
- 2024-2025學年上學期上海初中英語七年級期末模擬試卷2
- 神經(jīng)外科患者臥位管理
- 部編人教版三年級下冊語文教案(表格版)
- 民航服務心理學教案
- 成人重癥患者人工氣道濕化護理專家共識解讀教學課件
- 英語課件音標教學課件
- 2024年湖北省中考語文真題(學生版+解析版)
- 起重作業(yè)安全教育培訓
- 水果店入職培訓
- DB35T 1832-2019 工業(yè)企業(yè)能耗在線監(jiān)測數(shù)據(jù)質(zhì)量評價技術(shù)規(guī)范
評論
0/150
提交評論