DOC

Attitude Controller Design on Variable Rolling Velocity Aerocraft Based on ATmega16

By Mike Robertson,2014-06-20 05:36
9 views 0
Attitude Controller Design on Variable Rolling Velocity Aerocraft Based on ATmega16

    Attitude Controller Design on Variable

    Rolling Velocity Aerocraft Based on

    ATmega16

    单片机开发与应用

    文章编号:10o8_o57O(2OO6)O72-01O304

    AttitudeControllerDesigonVariableRollingVelocityAerocraftBasedonATmega16 Shi,GuoxingSu,ZhongLi,QingChen.Yingshu

    Abstract:Owingtotheeffectofcrosswind,initialdisturbanceandthedeviationofengineparameters.

    eteintheinitialaviation.vari.

    ablerollingvelocityaerocraftwillproduceattitudeangledeviationintheidealorientations.I11ispaperadop~AVRmicrocontroller

    atmega16andrelevantsignalprocesscircuittodesigntheattitudecontrollerandtakethemethodof~equencydiscriminationandaln

    plitudediscriminationtoprocessattitudeangledeviationofaeroeraft.Accordingly,itamendsattitudeanglede~ationofaerocraftef-

    fectandimplementstheselfadaptingattitudecontrolofaerocraft'srollingvelocity. Keywords:RollingVelocity,Aerocraft,AttitudeControHer

    1Introduction

    Owingtotheeffectofcrosswind.initialdisturbance

    andthedeviationofengineparameters.etcintheinitial

    aviation,variablerollingvelocityaerocraftwillproduce

    attitudeangledeviationfAAD)intheidealorientations.

    Itmustcontroltheattitudeoftheaerocraft,accordingly,

    AADofaerocraftcanbeamended.

    Fig.1ThePrincipleotanglestabilizationcontr0lsystem

    Anglestabilizationcontrolsystemisusedforthe attitudecontrolofrollingaerocraftbythispaper.This controlsystemisgenerallylocatedinthecontrolcabin ofaerocraft.Itismainlycomposedofpositiongyro- scopes,attitudecontroller(AC),attitudecontrolengine (ACE).Here,positiongyroscopesarethemeasurecom- ponent,theyareusedtoacquiretheAADinformation abouttheaviationaxisofaerocraftrelativetoinitialdi

    rection,whileACisusedforconvertingtheoutputsig- nalofgyroscopesintocontrolsignalthatdrivesACE. ACE,theactuatorofthisattitudecontrolsystem,isused tofollowthecontrolsignaltoproducethecontrolpower inthedoubleanglestabilizationchannelsthatarepe

    pendicular.Theprincipleofanglestabilizationcontrol systemcanbeseeninFig.1.Thissystemisaclosed- ShiGuoXing:graduatestudents

    Thisitemissponsoredbyscienceandtechnology developmentprojectofBeijingeducationcommit- teeNO:KM200510772012

    loopcontrolsystem.

    Inordertoamendflighttrackofthevariablerolling velocityaerocraft,thispaperdesignedACtoachieve functionsasfollows:

    1)ACsamplestheAADsignalthatsensecLbygyro- scopesandcalculatesthisdeviationsignalinstantaneous- ly.

    2)ACusesthealgorithmofamplitudediscrimina- tionwhichbasesonAADsignaltocompletethetransla- tionbetweentheControlstatesofcontrolsystemautomat-

    ically.

    3)ACdetectsautomaticallyanduploadsmeasured electricalparameterstotestequipmentintheground testing.

    2Thefunction

    Controiler

    analysesofAttitude

    2.1Theattitudeangleoutputandattitudealgorithm ofpositiongyroscopes

    Positiongyroscopescansensetheattitudeanglepo

    sitionofrollingaerocraftdirectly.Theoutput AADareasfollows:

    y)=A+ACos(OJ(t)t+)

    ,,()=A0+ASin(og(t)t+)

    FromEqs.(1)(2):

    fy(x)istheyawoutputsignal,

    signal,?(t)istherollingvelocity

    signalsof

    (1)

    (2)

    fr(x)isthepitchoutput

    ofaerocraftwhichfol

    lowswitht.A0.,Aoyarethenullpositionofyawandpitch signa1.

    Owingtotheeffectofinitialdisturbanceandthe deviationofengineparametersintheinitialaviationof rollingaerocraft,thenullpositionoutputoftheactiva- tiongyroscopesisvariable.Thispapermustguarantee theoutputaccuracyofnullpositionofgyroscopesbe- 罾自控罔邮局订阅号:82-946360,年一103

单片机开发与应用中文核心期刊《微计算机信息》(嵌入式与SOC)2006年第22

    卷第7-2

    causetheaccuracyofnullpositioniskeytoattitudeal

    gorithmandtranslationbetweenthecontrolstates. Accordingtotheprincipleofgyroscopicinertia, oncethegyroscopesareactivatedbeforeaerocrafiis launched,theaerocraftcanfinishinitialalignmentofthe gyroscopes,consequently,theaccuracyandstabilityof nullpositionofgyroscopescanbeimproved.

    Asfig2.Attitudealgorithmistoconverttheout

    putsignalofthegyroscopesintothecontrolsignalof ACE,itskeyisfrequencydiscrimination,andthisis kernelproblemofsignalprocessor.Analogmultiplierim

    plementsfrequencydiscriminationingenera1.Thispaper implementsfrequencydiscriminationbysoftware. 2.2Thetranslationbetweenthecontrolstatesof rollingaerocraft

    ACproducescontrolsignalthatself-adaptsthe rollingvelocitybaseontheoutputofgyroscopesinthe existstateofAAD.Butwhenrollingaerocraftflightsin theidealtrack,ACcannotproduceanycontrolsigna1. Inaccordancewithcontrolrequirementofgeneral attitudecontrolsystem,ifthevalueofattitudedeviation islessthanspecifiedcontrolvalue,controlstatecanbe translatedintouncontrolstateautomatically.Viceversa. Thekeyofthetranslationbetweenthecontrol statesisamplitudediscriminationoftheoutputdataof gyroscopesinstantaneously.Amplitudediscrimination computestheamplitudeofsignalinanytimeaccording

tothecurrentoutputdataofgyroscopes.ACusessoft

    waretoamplitudediscriminationbecausecontrollercan sampletwoAADsignaldirectly.Theprincipleofampli

    ,tudediscriminationisasfollows:FromEqs.(1)(2): A=()A.)+)-Ao)(3)

    FromEqs.(3),Ifcontrollercansamplethedigital signalofyawandpitchinsometime,itcandiscriminate theamplitudeofsignalinstantaneously.

    2.3Uploadthemeasuredelectricalparameters ACsendssomemeasuredelectricalparametersto equipmentwhentestequipmentmeasurescontrolsystem, itisimplementedbyRS485serialcommunication. RS485serialcommunicationmakesuseofdoublepoint——

    ed(differentia1)signaltogetridofcommonmodeinter

    ferenceeffectivelywhetherdataissentandreceived. Accordingly.Thevelocityanddistanceofdatacommu

    nicationareincreased.Testequipmentcutbackonthe costandinterfaceofmeasureinrespectthatR$485uses themodeofconnectionwith2lines.

    3TheHardwareDesignofAttitude

    Controller

    Atmegal6isthekernelcomponentofAC.Itisone lowpower8bitAVRRISCMicrocontrollerandembed 8channels10bitADC.ThekeydesignofACisthe ADCcircuit,theoutputcircuitofcontrolsignaland R$485serl'alportcircuit.

    1)DesignoftheADCcircuit

    TheADCcircuitsamplesAADsignalthatsensed bygyroscopesandconvertsitintodigitalsignalforatti——

    tudealgorithm.Theconverterprincipleisshowninfig3.

    TheADCcircuitiscomposedofampli~ingcircuit, circuit,andsecondButterworthfiltercircuit.When bias

    the

    areocraftexistsAAD,Biasandamplifyingcircuitpro

    cesstheAADsignalsandthesesignalsarepassed throughsecondButterworthfiltercircuit,accordingly, thesesignalsareconvertedintoanalogquantityinthe rangevalueofADC.

    OwingtothereferencevoltageofA/Dis5V,the rangeofanalogquantitymustbe0-5V.Inordertopre

    ventfromhighfrequencynoiseatthesalnetime,the cut-offfrequencyofsecondButterworthlow——passfilter

    shouldbelowerassoonaspossible,thissystemdesigns itto500Hz.Thusallparametersofcomponentoughtto bedesignedaccordingtoabove-mentionedrequirement atthetimeofdesigningcircuit.

    1×R7(R3+R4)一×

    【×

    Fromfig-3:

    DefineR4=R7,R3=

    s.=:××丽R2(4)

    FromEqs.f4)-Ab0vementi0nedinputandthe

    rangeofcorrespondingoutputcallgiveallparametersof component.

    2)Designofthecontrolsignaloutputcircuit ThiscircuitimplementscontrolresultsofADCthat arecalculatedbythemicrocontroller.Fromfig4,the

104360~L,年邮局订阅号:82.948

单片机开发与应用

    outputofmicrocontrollercontrolshighvoltagetodrive ACEbysolidstaterelay.OncetheoutputofIOishigh level,theoutputofrelayis28V,orelseOV.TwoZener diodesmakeupofclampingcircuittokeepACEfrom theeffectofvoltageovershootinthefig.4. Atthepracticalcircuitdesign,foursimilarbefore- mentionedcircuitsseparatelycontrolfourspoutsofACE whiletwoofthespoutscontroloneaxialdirectionofthe rollingaerocraft.E.g.whiletheattitudeofrollingaero

    craftexistsyawdeviation,themicrocontrollerwillCalCU-- latepropervaluebasedonthedeviationsignalofyaw angletocontrolACEcreatingrelativethrustandde

    creasingthedeviationofaerocraftattitude. Fig.3ADCcircuit

    Fig.5serialcommunicatecircuit

    3)DesignoftheRS485serialcommunication

    circuit

    RS485communicationcircuitprimarilyimplements thatmicrocontrollercommunicateswithtestequipment. Infig5.MAX487includingonedriverandone

    transmitterinthiscommunicationcircuitiSusedfora low——powertransceiverinRS485communication.Design oflimitingslopeisusedforthedrivetominimizeEMI aswellasdecreasetheeffectfrommismatchofthe terminalcable,thusthedatacouldbetransferredata highspeedof250kb/s.MAX487onlyneedasingle5V supplyand1201xA.MatchedresistancesasR37,R38

    andR39areusedformatchingtestequipment. 4TheSoftwareDesignofAttitude

    Controller

    Thedesignofcontrolalgorithmisthekeyofthesoftware designofAC.Atmegal6canexecuteoneinstructionin oneclockcycleanditstopspeedcanachieve1MIPS/ MHz.Thekeydesignofrealtimesystemneeds

    interrupt.SothisattitudecontrolsystemadoptsADC interrupt,serialreceiveandsendinterrupt,timer interruptetc.Thisisflowchartofmainprogramof attitudecontrolinfig6,thesubprogramofserial interruptandADinterruptperformsimportantdesign. InitializeAtmegal6(AD,IO)

    Activategyroscopesanddelayls

    lsapling16nuup0sm.nvaluesandseekmearI emistestingornot?

    ?N

    Gotoserialinterruptlstart-upaemc,ae-s

    ?

    Samplingtheoutputsignal,gotoADinterrupt ?

    Ih-ementsremecontro-

    Fig.6flowchartofmainprogramofAC

    Fig.7flowchartofamplitudediscrimination ?

    @嗽焉邮局订82360~/_105

单片机开发与应用中文核心期刊《微计算机信息》(嵌入式与SOC)2006年第22

    卷第7-2

    1)Thesubprogramofserialinterrupt

Thesubprogramofserialinterruptmadeupof

    receivinginterruptandsendinginterruptattainsdata communicationbetweenACandtestequipment.The functionofreceiveinterruptiswaitingforcommandfrom testequipmenttogetdata,settingupreceiveregister anddeterminingwhetherserialportisreadyfor receivingornotsimultaneously.Oncereceiveregister getsready,datacanbereceivedandthenthe

    microcontrolleranalyzesthereceivedcommanddataand checksparityautomatically.Iftheanalysisresultis fight,themicrocontrollerwillsendbackcorresponding electricalparameterstotestequipment.E.g.test equipmentsendscommand44HofgettingdatatoAC. thenACconsidersitascommandwordofgettingthe nullpositionofgyroscopes,thecontrollersendsbackthe nullpositionotgyroscopestotestequipment. ofADinterrupt

    Thissubprogramimplementsprimarilyattitude algorithmandtranslationbetweencontrolstates.Viz.the frequencyandamplitudeoftheoutputsignalsof gyroscopesarediscriminated.Thealgorithmoffrequency discriminationcountstheperiodsofsinesignalby samplingthezeropointofthesignal,thusfrequencyof thesignalcanbegained.Thealgorithmofamplitude discriminationcomputestheamplitudeofcurrentsignal bytwoorthogonalsignals.Thealgorithmofamplitude canbeseeninfig.7.Thisalgorithmusespower algorithmtoimprovesystemreal-timequalityinthe algorithmoptimizationbecausetheconsumetimeof poweralgorithmislessthanthatofradicationalgorithm

5Conclusion

    ForthesoftwareandhardwaredesignofACof

    variablerollingvelocityaerocraft.Thedesigned controllercanimplementrollingvelocityself——adapting

    realtimecontroloftheflightattitudeofaerocraft.detect automaticallyanduploadmeasuredelectricalparameters totestequipmentinthegroundtesting.

    Thecreativeviewofthispaperisthattheattitude angledeviationofvariablerollingvelocityaerocraftare amendedbythealgorithmoffrequencydiscrimination andamplitudediscrimination,andattitudecontroller implementsrollingvelocityself-adaptingreal-time controloftheflightattitudeofaerocraft.

    Reference

    1WangKuangbiaoGuidanceTechnologyandItsApplications ofRollingMissilesJ,JournalofProjectiles,Rockets,Missilesand Guidance,Beijing,2002.3.26,Vo1.22No.3

    [212DingHuacheng.TheappliedtechniqueofAVRSCMIM1, BeiHanguniversitypress,Beijing,2000

    [3ShiGuoXing,SuZhong,LiQingYawControlofVariable RollingVelocityAerocraft[JConferenceProceedingsofthe

    SeventhInternationalConferenceonElectronicMeasurement& InstrumentsVo1.32005.7

    4ZhanWeiqian,GengdegenavrSCMappledinthemeasuring rotationrateofdieselengine,Control&Automation,Beijin 2001.5.2OVo1.17N04

    Biography:Shiguoxing:male(1980)Postgraduatestudent.

    Major:Signaldetection,AttitudeContro1.Suzhong:male(19621

    Doctor,Tutor,andAssociateProfessor.Major:SignalDetection andProcessing,AttitudeControl,ProcessContro1.Liqing:female

Report this document

For any questions or suggestions please email
cust-service@docsford.com