基于单片机的步进电机电路控制设计英文文献及翻译.docx
TheSteppermotorcontrolcircuitbebasedonSinglechipmicrocomputerTheAT89C51isalow-power,high-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmeshigh-densitynonvolatilememorytechnologyandiscompatiblewiththeindustrystandardMCS-51instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89C51isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.FunctioncharacteristicTheAT89C51providesthefollowingstandardfeatures:4KbytesofFlash,128bytesofRAM,32I/Olines,two16-bittimer/counters,afivevectortwo-levelinterruptarchitecture,afullduplexserialport,on-chiposcillatorandclockcircuitry.Inaddition,theAT89C51isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialportandinterruptsystemtocontinuefunctioning.ThePower-downModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset.PinDescriptionVCC:Supplyvoltage.GND:Ground.Port0:PortOisan8-bitopen-drainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.WhenIsarewrittentoportOpins,thepinscanbeusedasHighimpedanceinuts.PortOmayalsobeconfiguredtobethemultiplexedIoworderaddress/databusduringaccessestoexternalprogramanddatamemory.InthismodePOhasinternalpullups.PortOalsoreceivesthecodebytesduringFlashprogramming,andoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.PortlPort1isan8-bitbi-directionalI/Oportwithinternalpullups.ThePOrt1outputbufferscansink/sourcefourTTLinputs.WhenIsarewrittentoPort1pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.Port2Port2isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinuts.When1sarewrittentoPort2pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs>Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent,becauseoftheinternalpullups.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses.Inthisapplication,itusesstronginternalpullupswhenemittingIs.Duringaccessestoexternaldatamemorythatuse8-bitaddresses,Port2emitsthecontentsoftheP2SpecialFunctionRegistenPort2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.Port3Port3isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.WhenIsarewrittentoPort3pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51aslistedbelow:Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.RSTResetinput<Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.ALE/PROGAddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogrammingJnnormaloperationALEisemittedataconstantrateof1/6theoscillatorfrequency,andmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternalDataMemory.Ifdesired,ALEoperationcanbedisabledbysettingbitOofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.PSENProgramStoreEnableisthereadstrobetoexternalprogrammemory.WhentheAT89C51isexecutingcodefromexternalprogrammemory,PSENisactivatedtwiceeachmachinecycle,exceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory.EA/VPPExternalAccessEnable.EAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingatOOOOHuptoFFFFH.Note,however,thatiflockbit1isprogrammed,EAwillbeinternallylatchedonreset.EAshouldbestrappedtoVCCforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(VPP)duringFlashprogramming,forpartsthatrequire12-voltVPP.XTALlInputtotheinvertingoscillatoramplifierandinputtotheinternalclockoperatingcircuit.XTAL2OutputfromtheinvertingoscillatoramplifierOscillatorCharacteristicsXTALlandXTAL2aretheinputandoutput,respectively,ofaninvertingamplifierwhichcanbeconfiguredforuseasanon-chiposcillator,asshowninFigureLEitheraquartzcrystalorceramicresonatormaybeused.Todrivethedevicefromanexternalclocksource,XTAL2shouldbeleftunconnectedwhileXTALlisdrivenasshowninFigure2.Therearenorequirementsonthedutycycleoftheexternalclocksignal,sincetheinputtotheinternalclockingcircuitryisthroughadivide-by-twoflip-flop,butminimumandmaximumvoltagehighandlowtimespecificationsmustbeobserved.Figure1.OscillatorConnectionsFigure2.ExternalClockDriveConfigurationIdleModeInidlemode,theCPUputsitselftosleepwhilealltheonchipperipheralsremainactive.Themodeisinvokedbysoftware.Thecontentoftheon-chipRAMandallthespecialfunctionsregistersremainunchangedduringthismode.Theidlemodecanbeterminatedbyanyenabledinterruptorbyahardwarereset.ltshouldbenotedthatwhenidleisterminatedbyahardwarereset,thedevicenormallyresumesprogramexecution,fromwhereitleftoff,uptotwomachinecyclesbeforetheinternalresetalgorithmtakescontrol.On-chiphardwareinhibitsaccesstointernalRAMinthisevent,butaccesstotheportpinsisnotinhibited.ToeliminatethepossibilityofanunexpectedwritetoaportpinwhenIdleisterminatedbyreset,theinstructionfollowingtheonethatinvokesIdleshouldnotbeonethatwritestoaportpinortoexternalmemory.Power-downModeInthepower-downmode,theoscillatorisstopped,andtheinstructionthatinvokespowerdownisthelastinstructionexecuted.Theon-chipRAMandSpecialFunctionRegistersretaintheirvaluesuntilthepower-downmodeisterminated.Theonlyexitfrompower-downisahardwarereset.ResetredefinestheSFRsbutdoesnotchangetheon-chipRAM.TheresetshouldnotbeactivatedbeforeVCCisrestoredtoitsnormaloperatinglevelandmustbeheldactivelongenoughtoallowtheoscillatortorestartandstabilize.ProgramMemoryLockBitsOnthechiparethreelockbitswhichcanbeleftunprogrammed(U)orcanbeprogrammed(P)toobtaintheadditionalfeatureslistedinthetablebelow.Whenlockbit1isprogrammed,thelogiclevelattheEApinissampledandlatchedduringreset.Ifthedeviceispoweredupwithoutareset,thelatchinitializestoarandomvalue,andholdsthatvalueuntilresetisactivated.ItisnecessarythatthelatchedvalueofEAbeinagreementwiththecurrentlogiclevelatthatpininorderforthedevicetofunctionproperly.IntroductionSteppermotorsareelectromagneticincremental-motiondeviceswhichconvertdigitalpulseinputstoanalogangleoutputs.Theirinherentsteppingabilityallowsforaccuratepositioncontrolwithoutfeedback.Thatis,theycantrackanysteppositioninopen-loopmode,ConsequentlynofeedbackisneededtoimplementpositioncontrolSteppermotorsdeliverhighereaktorqueperunitweightthanDCmotors;inaddition,theyarebrushlessmachinesandtherefbrerequirelessmaintenance.AllofthesepropertieshavemadesteppermotorsaVeryattractiveselectioninmanypositionandspeedcontrolsystems,suchasincomputerharddiskdriversandprinters,XY-tables,robotmanipulators,etc.Althoughsteppermotorshavemanysalientproperties,theysufferfromanoscillationOrunstablephenomenon.Thisphenomenonseverelyrestrictstheiropen-loopdynamicerformanceandapplicableareawherehighspeedoperationisneeded.TheoscillationUsuallyoccursatsteppingrateslowerthan100Opulse/s,andhasbeenrecognizedasamid-frequencyinstabilityorlocalinstability1,oradynamicinstability2.Inaddition,thereisanotherkindofunstablephenomenoninsteppermotors,thatis,themotorsusuallyloseSynchronismathighersteppingrates,eventhoughloadtorqueislessthantheirpull-outtorque.Thisphenomenonisidentifiedashigh-frequencyinstabilityinthispaper,becauseitappearsatmuchhigherfrequenciesthanthefrequenciesatwhichthemid-frequencyoscillationoccurs.Thehigh-frequencyinstabilityhasnotbeenrecognizedaswidelyasmid-frequencyinstability,andthereisnotyetamethodtoevaluateit.Mid-frequencyoscillationhasbeenrecognizedwidelyforaverylongtime,however,acompleteunderstandingofithasnotbeenwellestablished.ThiscanbeattributedtoIhenonlinearitythatdominatestheoscillationphenomenonandisquitedifficulttodealwith.384L.CaoandH.M.SchwartzMostresearchershaveanalyzeditbasedonalinearizedmodel1.Althoughinmanycases,thiskindoftreatmentsisvalidoruseful,atreatmentbasedonnonlineartheoryisneededinordertogiveabetterdescriptiononthiscomplexphenomenon.Forexample,basedonalinearizedmodelonecanonlyseethatthemotorsturntobelocallyunstableatsomesupplyfrequencies,whichdoesnotgivemuchinsightintotheobservedoscillatoryphenomenon.Infact,theoscillationcannotbeassessedunlessoneusesnonlineartheory.Therefore,itissignificanttousedevelopedmathematicaltheoryonnonlineardynamicsIohandletheoscillationorinstability.ItisworthnotingthatTaftandGauthier3,andTaftandHamed4usedmathematicalconceptssuchaslimitcyclesandSeparatricesintheanalysisOfoscillatoryandunstablephenomena,andobtainedsomeveryinstructiveinsightsintotheSocalledlossofsynchronousphenomenon.Nevertheless,thereisstillalackofaComprehensivemathematicalanalysisinthiskindofstudies.Inthispaperanovelmathematicalanalysisisdeveloedtoanalyzetheoscillationsandinstabilityinsteppermotors.Thefirstpartofthispaperdiscussesthestabilityanalysisofsteppermotors.ItisShownthatthemid-frequencyoscillationcanbecharacterizedasabifurcationphenomenon(Hopfbifurcation)ofnonlinearsystems.OneofcontributionsofthispaperistorelatethemidfrequencyoscillationtoHopfbifurcation,thereby,theexistenceoftheoscillationisprovedtheoreticallybyHopftheory.High-frequencyinstabilityisalsodiscussedindetail,andanovelquantityisintroducedtoevaluatehigh-frequencystability.Thisquantityisveryeasytocalculate,andcanbeusedasacriteriatopredicttheonsetofthehigh-frequencyinstability.Experimentalresultsonarealmotorshowtheefficiencyofthisanalyticaltool.ThesecondpartofthispaperdiscussesstabilizingcontrolofsteppermotorsIhroughfeedback.Severalauthorshaveshownthatbymodulatingthesupplyfrequency5,themidfrequencyinstabilitycanbeimproved.Inparticular,PickupandRussell6,7havepresentedadetailedanalysisonthefrequencymodulationmethod.Intheiranalysis,Jacobiserieswasusedtosolveaordinarydifferentialequation,andasetofnonlinearalgebraicequationshadtobesolvednumerically.Inaddition,theiranalysisisundertakenforatwo-phasemotor,andtherefore,theirconclusionscannotapplieddirectlytooursituation,whereathree-phasemotorwillbeconsidered.Here,wegiveamoreelegantanalysisforstabilizingsteppermotors,wherenocomplexmathematicalmanipulationisneeded.Inthisanalysis,ad-qmodelofsteppermotorsisused.Becausetwo-phasemotorsandthree-phasemotorshavethesameq-dmodelandtherefore,theanalysisisvalidforbothtwo-phaseandthree-phasemotors.Uptodate,itisonlyrecognizedthatthemodulationmethodisneededtosuppressthemidfrequencyoscillation.Inthispaper,itisshownthatthismethodisnotonlyvalidtoimprovemid-frequencystability,butalsoeffectivetoimprovehigh-frequencystability.2. DynamicModelofStepperMotorsThesteppermotorconsideredinthispaperconsistsofasalientstatorwithtwo-phaseorIhreephasewindings,andapermanent-magnetrotor.Asimplifiedschematicofathree-phasemotorwithonepole-pairisshowninFigure1.Thesteppermotorisusuallyfedbyavoltagesourceinverter,whichiscontrolledbyasequenceofpulsesandproducessquare-wavevoltages.Thismotoroperatesessentiallyonthesameprincipleasthatofsynchronousmotors.Oneofmajoroperatingmannerforsteppermotorsisthatsupplyingvoltageiskeptconstantandfrequencyofpulsesischangedataverywiderange.Underthisoperatingcondition,oscillationandinstabilityproblemsusuallyarise.Figure 1. Schematicmodelofathree-phasesteppermotorAmathematicalmodelforathree-phasesteppermotorisestablishedusingq-dframereferencetransformation.Thevoltageequationsforthree-phasewindingsaregivenbyVa=Ria+L*diadt-M*dibdt-M*dicdt+dpmadt,Vb=Rih+L*dibdt-M*diadt-M*dicdt+dpmbdt,Vc=Ric÷L*dicdLM*diadt-M*dibdt+dpmcdt,whereRandLaretheresistanceandinductanceofthephasewindings,andMisthemutualinductancebetweenthephasewindings,_pm,_pmhand_pmoaretheflux-linkagesofthephasesduetothepermanentmagnet,andcanbeassumedtobesinusoidfunctionsofrotorposition_asfollowpma-lsi(N),pmb=sin(N-23),pr11c-si(N-23),whereNisnumberofrotorteeth.Thenonlinearityemphasizedinthispaperisrepresentedbytheaboveequations,thatis,theflux-linkagesarenonlinearfunctionsoftherotorposition.Byusingtheq;dtransformation,theframeofreferenceischangedfromthefixedphaseaxestotheaxesmovingwiththerotor(refertoFigure2).Transformationmatrixfromthea;b;Cframetotheq;dframeisgivenby8Forexample,voltagesintheq;JreferencearegivenbyInthea;b;Creference,onlytwovariablesareindependent(iaC历CicD0);therefore,theabovetransformationfromthreevariablestotwovariablesisallowable.Applyingtheabovetransformationtothevoltageequations(1),thetransferredvoltageequationintheq;dframecanbeobtainedasVq=Riq÷L*diqdt+NLid+N,Vd=Rid+L*diddt-NLiq,(5)Figure 2. a,b,candd,qreferenceframewhereLIDLCMand/isthespeedoftherotor.Itcanbeshownthatthemotor,storquehasthefollowingform2T=32NiqTheequationofmotionoftherotoriswrittenasJ*ddt=32*Niq-Bko-Tl,where旦/isthecoefficientofviscousfriction,andTlrepresentsloadtorque,whichisassumedtobeaconstantinthispaper.Inordertoconstitutethecompletestateequationofthemotor,weneedanotherstatevariablethatrepresentsthepositionoftherotor.Forthispurposethesocalledloadangle_8isusuallyused,whichsatisfiesthefollowingequationDdt=o,where/Oissteady-statespeedofthemotor.Equations(5),(7),and(8)constitutethestatespacemodelofthemotor,forwhichtheinputvariablesarethevoltagesIqandvd.Asmentionedbefore,steppermotorsarefedbyaninverter,whoseoutputvoltagesarenotsinusoidalbutinsteadaresquarewaves.However,becausethenon-sinusoidalvoltagesdonotchangetheoscillationfeatureandinstabilityverymuchifcomparedtothesinusoidalcase(aswillbeshowninSection3,theoscillationisduetothenonlinearityofthemotor),forthepurposesofthispaperwecanassumethesupplyvoltagesaresinusoidal.Underthisassumption,wecanget叫andIdasfollowsVq=VmCOS(N),Vd=VmSin(N3),whereVmisthemaximumofthesinewave.Withtheaboveequation,wehavechangedtheinputvoltagesfromafunctionoftimetoafunctionofstate,andinthiswaywecanrepresentthedynamicsofthemotorbyaautonomoussystem,asshownbelow.Thiswillsimplifythemathematicalanalysis.FromEquations(5),(7),and(8),thestate-spacemodelofthemotorcanbewritteninamatrixformasfollowsX=F(X,u)=AX+Fn(X)+Bu,(10)whereXDTigid/_UT,UDT/l77UTisdefinedastheinput,and/1DMOisthesupplyfrequency.TheinputmatrixisdefinedbyThematrixAisthelinearpartofF.J.andisgivenbyFn.XrepresentsthenonlinearpartofEJandisgivenbyTheinputtermuisindependentoftime,andthereforeEquation(10)isau