基于ARM交通监测设计英语.docx
《基于ARM交通监测设计英语.docx》由会员分享,可在线阅读,更多相关《基于ARM交通监测设计英语.docx(9页珍藏版)》请在冰豆网上搜索。
基于ARM交通监测设计英语
DesignofControlUnitofTrafficDetectionSystembasedonARM
DuRongyiYeQingLiXue
CollegeofElectricalandInformationEngineering,ChangshaUniversityofScience&
Technology,Changsha410076,ChinaE-mail:
Abstract
Accordingtothesystemrequirements,vehicle
detectionsystembasedondoubleinductionloopshas
beendesigned.Controlunitoftrafficdetectionsystem
designedwiththecoreofLPC2138hasbeendescribed
indetail.Andthefunctionofeachhardwaremodule
hasbeenanalyzed.Forbadexperimentenvironment
andvariousinterferencefactors,anti-interference
measureshavebeenconsideredandintroducedinto
softwareandhardwaredesign.Hardwareimplementationandsoftwareflowofcontrolunithave
beendescribedindetail.Theresultofthesystem
applicationshowsthat,comparedtotraditionalcontrolunitswiththecoreofsinglechip,thecontrolunithavecharacteristicsofbetterinformationhandlingability,fasterspeed,andbettercommunicationabilityetc.Themainfunctionofthetrafficdetectionsystemistoexaminethespeed,theflow,thevehicletypeandthelaneoccupancyofthemotorvehicles.ThemethodbasedonARMembedded
systeminthispaperprovidesanewmeansforthe
trafficdetectionsystemresearch.Finallytheprospectforfurtherresearchispresented.
1.Introduction
Alongwithglobaleconomicdevelopment,theresearchofthetrafficintelligentmonitoringbecomes
oneoftheresearchfocusesofcountries.Throughthe
real-timecollection,transmissionandprocessingoftherelatedtrafficinformation,thecurrenttrafficoperation
statusisgraspedandfuturetrafficconditionisforecast.
Andwiththeaidofvariousequipmentandmeans,differenttrafficconditionsaredealtwith.Alsothrough
powerfulinformationcommunicationmeans,the
trafficinformationwillbelearntbyusersrapidly.Thus,trafficefficiencyandsafetyareeffectively
improved,trafficfacilitiesarefullyutilized,andthe
trafficintensivedevelopmentisrealized.Roadtraffic
detectionsystem,speciallyitscontrolunitisthekey
linkoftheresearchoftheintelligencetransportationsystem(ITS.TheARMembeddedprocessor[2]asakindof32bitsRISCchipwithhighperformanceandlowpowerhasthecharacteristicsofsupportingmulti-operationsystem,highmainfrequency,andstrongoperationandprocessingabilityetc.ItalsohasmassandlowpriceSDRMdatamemory.ThisarticletakesARMratherthantraditionalsinglechipasthedetectionsignaltransmissionprocessingmoduletodesignroadtrafficdetectionsystem.Itprovidesabetterthinkingforthe
furtherresearchandawiderapplicationspace.2.DetectionAlgorithmTheconventionalsingle-coildetectorcandetectthevehicleflowandthelaneoccupancyinaperiodoftime.Toeachlaneburiedcoil,thedefinitionsofthetwobasicparametersareasfollows[3],TN
Q=(1∑
∑====Njj
i
NjjvlTtTO1111(2Where,Qisvehicleflow;OislaneoccupancyinsamplingperiodT;Nisthesumofvehiclespassingthroughinthesamplingperiod;jtistheusedtimeofthejthvehiclepassingthroughthecoil;jliseffectivevehiclelengthofthejthvehicleorthesumofthelooplengthandthevehiclelength;andjvisthejthvehicle’sspeed.Tothetrafficmanagementandthecontrol,thevehiclespeedisakeyparametertorespondroad
conditionsandquestionsappearsintraffic.Buttheconventionalsingle-coildetectorcannotmeasurevehiclespeed.Thereforedoubleloopsareusedtomeasurevehiclespeed.Italsocanmeasurevehicle2008InternationalConferenceonIntelligentComputationTechnologyandAutomation
lengthetc.tobeappliedinfuzzyrecognitionofvehicletypes.
Theprincipleofmeasuringthevehicle’sspeedand
lengthbasedondoubleloopsisasshowninFig.1.
Fig.1Principlegraphofmeasuringthevehicle’sspeedand
length
Measurethetimeinterval0tforvehiclefromtheloop1toloop2,andthetime1tfromenteringtoleavingtheloop2.Fortheloop’swidthis0landtheloopspaceis1l,sothevehiclespeedis[6]
010/(tllv+=(3
Andthevehiclelengthis
2((1010llttvL+−+⋅=(4
3.HardwareDesign
Themainfunctionofthecoiltrafficdetectionsystemistoexaminethespeed,theflow,thevehicletypeandthelaneoccupancyofthemotorvehicles.Italsocancontrolthefunctionsofinformationdisplay,systemdetectionandschedulingofthevariableinformationboardinmonitoringsystemthroughdetectionsignal[1].Thus,itiswidelyappliedinthesituationsofexpresswaytoll-gate,expresswaysecuritybayonet,expresswayrampcontrol,urbanintersectionred-light-runningmonitoringandurbanintersectiontrafficsignalcontrol[5]etc.Thecoiltrafficdetectionsystemselectedforthisstudyiscomposedofloop-coilvehicledetectorsystemandhostcomputercontrol
system.ThesystemdiagramisasshowninFig.2.
Fig.2Trafficdetectionsystemdiagram
Theloop-coilisusuallyrealizedbyseveralcablelinesenwinding.Itssizeis2×1.5meters.Theloop-coilisconnectedtothevehicledetectormodulethroughwiringterminal.ItconstitutestheLCoscillationcircuittodetectvehiclespassingcondition.A5Vpowersourceanddouble-lanesloop-coilvehicledetectionmoduleisincludedinthevehicledetector.ThecommunicationbetweenthevehicledetectorandPCapplytheRS232orRS485accordingtoactualsystemsituation.Themainfunctionofthevehicledetectoristomonitoreachtrafficlane'strafficcondition,carryoutdataacquisitionandprocessing,aswellasfailuredetectionetc.Themajorfunctionofthehostcomputercontrolsystemistorealizethefieldsetofthevehiclesdetector’sworkingparameters.Simultaneously,itcaninquireandreceivethetrafficdatafromthelowercomputer.
Accordingtothedemandandapplicationenvironmentofthetrafficdetectionsystem,andcomprehensivelyconsideringthefactorsofperformancepriceratioandchipresources,thehigh-performance32bitsLPC2138ischosen.LPC2138isamicrocontrollerofPHILIPSCorporation.Itisbasedona16/32bitARM7TDMI-STMCPU[2]andhasa152KBhighspeedembeddedflashmemory.TheARM7TDMI-STMCPUcancarryoutreal-timesimulationandembeddedtrace.128bitsmemoryinterfaceandtheuniqueacceleratingstructureenable32bitscodestorununderthemaximumclockrate.Totheapplicationwithstrictdemandofcodesize,the16bitsThumbpatterncanbeusedtoreducethecodesizeabove30%,buttheperformancelossisalittle.
ThehardwareconstitutionofthecontrolunitofthetrafficdetectionsystemisshowninFig.3.Human-machineinterfacemoduleiscomposedofLEDdisplay,dialswitchinputandresetbuttoninput.8bitsLEDlampisusedtodisplaythedetectionparametersandvariouslanes’workingstates.Thedialswitchisusedtosetupdetectionparameters,andtheresetbuttonrealizesthemanualchipresetfunction.
DigitalI/Omoduleisconstitutedwith4-pathoptical-isolationinputs.Theoptical-isolationchipis
appliedwith4piecesofdipTPL521.ApieceofLM393isusedtotransferthesinecalibratesignalproducedbyoscillationcircuitintothe3.5Vsquare-wavesignal.ThenthesignalissenttoCPLD.The5VDCpowerisinputfromtheinterfacePlug1.ThediodeIN1isusedtolimitthetransientcurrentandfilter.Thenthepowerwillbeconstantto3.3VthroughtheLM1117/3.3.Thevoltageamplitudeofthewavereshapedisabout3.3V,whichmeetsourrequirement.LDOchipisoftheseriesM1117.Itsoutputcurrentmayreach800mAandtheprecisionofitsoutputvoltagemaylessthan1%.Italsohasthefunctionofcurrentlimitationandhotprotection.Inapplication,atantalumcapacitorabove10Fμisusuallynecessarytoconnectwiththeoutputend.Itcanimprovethetransientresponseandstability[6].
Totransplantembeddedreal-timeoperationsysteminARMcanmakethedetectorconvenientlyrealizeMulti-laneinformationcollectionandprocessingsimultaneously.Italsocanimprovethesystemreliabilityandgivefullplaytomulti-missionpotentialofthe32bitsCPU.
Fig.3Hardwarediagramofcontrolunit
4.SoftwaredesignforARM
ThemainfunctionsofARMaretoreadthecounter’svalueoftheCPLDandcalculatethetimeofvehicles’passingthroughtheloop.Thenitwillcarryontheprocessingtothevaluesofshiftandcharactertranslationetc.Andsendthevaluesprocessedtothehostcomputerbyserialport.
ThetimingprocessofARMisthat,(1whenvehiclearrivesatloop1,aactivatesignalpresentsanegativepulsetomaketheARMtimerstarttiming;(2anothersignalpresentsanegativepulsetomakeARMtimerstoptiming.ThenthetimevaluesobtainedwillbesenttoPCthroughtheserialport.
TheprocessreadingCPLDcounter’svaluesforARMisthat,whentheCPLDcountingfinished(DatebusOk=0,ARMreadstheCPLDcounter’s
valuesthroughits8-bitdatalines.Thedatawillbecarriedoutclassificationprocessingandstoredinthebufferarea.Whenthedatanumberinthebufferreachedthesettingmaximum,thedatawillbetransmittedtoPCthroughtheserialportbyARM.
TheentireworkingprocessofARMshowsinFig.4.
Fig.4Programflowchart.
Inthesoftwareanti-interferencedesign,theinternalwatch-dogoftheLPC2138isusedandinitializingprogramofthewatch-dogisasfollows,WDTC=0x10000;WDMOD=0x03;VoidWdFeed(void{
WDFEED=0xAA;WDFEED=0x55;}
Theanti-huntingprogramisintroducedinthejudgmentoftheinputpinsconditionforARM.Itistopreventthemisreadingcausedbythesignalshaking.Anti-huntingprogramisthat,voidWaitSignal(void{uint32i;While(1{
while((IO0PIN&DateOK!
=0;
for(i=0;i<5000;i++;//softdelay,anti-huntingif((IO0PIN&DateOK!
==0break;}
while((IO0PIN&DateOK!
==0;}