文献翻译——基于C51兼容微处理器单片机的PWM控制器设计_第1页
文献翻译——基于C51兼容微处理器单片机的PWM控制器设计_第2页
文献翻译——基于C51兼容微处理器单片机的PWM控制器设计_第3页
文献翻译——基于C51兼容微处理器单片机的PWM控制器设计_第4页
文献翻译——基于C51兼容微处理器单片机的PWM控制器设计_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第1页外文文献资料DesignofPWMControllerinaMCS-51CompatibleMCUDCmotor(direct-currentmotor)istheelectricalmachinerytorealizeconversionbetweenDCelectricenergyandmechanicalenergy.DCmotorhasawidespeedrange,smoothsteplessfeature.Oftenusedintheoccasionofthehigherrequirementsonstartingandspeedcontrol,suchashotelofhighspeedelevator,longmenplaner,locomotive,largeprecisionmachinetoolandheavyliftandothermanufacturingmachine.Thispaperintroducedasystemofusingtheinputvoltagechangestocontrolmotorspeed.Inresentyears,theDCmotoriswidelyused,foritssomanyadvantages,suchasitsspeedcanbeadjustconveniently.TherearemanymethodsofDCmotorspeedcontrolandPWMisthemostwidelyusedmethodforadjustingfoetheDCmotor.Herebychangingtheinputvoltagemagnitude,toregulatethespeedofthemotor.TheuseofPWM(PulseWidthModulation)thedutyratioofthepulsesignaldecidedthesizeofaveragevoltageoutputtotheDCmotor.dutyratioBythewayofchangethedutyratioofvoltageontheDCmotorarmaturetochangethesizeoftheaveragevoltagesoastocontrolthespeedofthemotor.Thisarticledescribesthemethodofcombiningtheuseofhardwareandsoftwareofthemotorspeedmeasurementandspeedregulation.ThehardwarewithSTC89C51asthecore,withthedrivecircuit,speedmeasurementcircuit,thekeyboardandLCDdisplaymodulecomposeaminimumsystem.TheLCDusesadynamicdisplaymode,thekeyboardusingquerymodetorealize.ThesoftwareoutputPWMsignalisgeneratedbytheuseofClanguageprogramming,bythewayofadjustthedutyratio,canachievethepurposeofregulatingtheoutputvoltage.Throughtheabovedesign,realizethemicrocontrolleroutputPWMpulsesignalandadjustthespeedofmotor.ThroughthespeedmeasuringcircuitfeedbacktoMCU(MicroControlUnit),anddisplaythespeedontheLCDdisplay.Accordingtothedisplayedspeed,peoplecanoperatethekeyboardtoreachthedesiredsettingspeed.Conditioningsystemischaracterizedinthatoutputpowertomaintainstability.第2页Differentspeedcontrolsystemcanuseadifferentbrakesystem,highstartingandbrakingtorque,quickresponseandquickadjustmentrangeofdegreerequirementsofDCdrivesystem,theuseoftheelectricbrakingmode.DependsonthespeedcontrolofDCmotorarmaturevoltageandflux.Tozerospeed,orU=0or=.Thelatterisimpossible,itonlychangesthroughthearmaturevoltagetoreducespeed.TospeedtoahighervaluecanincreaseordecreasetheU.Aregulatorsystemisonewhichnormallyprovidesoutputpowerinitssteady-stateoperation.Forexample,amotorspeedregulatormaintainsthemotorspeedataconstantvaluedespitevariationsinloadtorque.Eveniftheloadtorqueisremoved,themotormustprovidesufficienttorquetoovercometheviscousfrictioneffectofthebearings.Otherformsofregulatoralsoprovideoutputpower;Atemperatureregulatormustmaintainthetemperatureof,say,anovenconstantdespitetheheatlossintheoven.Avoltageregulatormustalsomaintaintheoutputvoltageconstantdespitevariationintheloadcurrent.Foranysystemtoprovideanoutput,e.g.,speed,temperature,voltage,etc.,anerrorsignalmustexistundersteady-stateconditions.Inmanyspeedcontrolsystems,e.g.,rollingmills,minewinders,etc.,theloadhastobefrequentlybroughttoastandstillandreversed.Therateatwhichthespeedreducesfollowingareducedspeeddemandisdependentonthestoredenergyandthebrakingsystemused.Asmallspeedcontrolsystem(sometimesknownasavelodyne)canemploymechanicalbraking,butthisisnotfeasiblewithlargespeedcontrollerssinceitisdifficultandcostlytoremovetheheatgenerated.Thevariousmethodsofelectricalbrakingavailableare:(1)Regenerativebraking.(2)Eddycurrentbraking.(3)Dynamicbraking.(4)Reversecurrentbraking(plugging)Regenerativebrakingisthebestmethod,thoughnotnecessarilythemosteconomic.Thestoredenergyintheloadisconvertedintoelectricalenergybytheworkmotor(actingtemporarilyasagenerator)andisreturnedtothepowersupplysystem.Thesupplysystemthusactsasa”sink”intowhichtheunwantedenergyisdelivered.Providingthesupplysystemhasadequatecapacity,theconsequent第3页riseinterminalvoltagewillbesmallduringtheshortperiodsofregeneration.IntheWard-LeonardmethodofspeedcontrolofDCmotors,regenerativebrakingisinherent,butthyristordriveshavetobearrangedtoinverttoregenerate.Inductionmotordrivescanregenerateiftherotorshaftisdrivenfasterthanspeedoftherotatingfield.Theadventoflow-costvariable-frequencysuppliesfromthyristorinvertershavebroughtaboutconsiderablechangesintheuseofinductionmotorsinvariablespeeddrives.Eddycurrentbrakingcanbeappliedtoanymachine,simplybymountingacopperoraluminumdiscontheshaftandrotatingitinamagneticfield.Theproblemofremovingtheheatgeneratedissevereinlargesystemasthetemperatureoftheshaft,bearings,andmotorwillberaisedifprolongedbrakingisapplied.Indynamicbraking,thestoredenergyisdissipatedinaresistorinthecircuit.WhenappliedtosmallDCmachines,thearmaturesupplyisdisconnectedandaresistorisconnectedacrossthearmature(usuallybyarelay,contactor,orthyristor).Thefieldvoltageismaintained,andbrakingisapplieddowntothelowestspeed.Inductionmotorsrequireasomewhatmorecomplexarrangement,thestatorwindingsbeingdisconnectedfromtheACsupplyandreconnectedtoaDCsupply.Theelectricalenergygeneratedisthendissipatedintherotorcircuit.DynamicbrakingisappliedtomanylargeAChoistsystemswherethebrakingdutyisbothsevereandprolonged.IntroductionPWMtechnologyisakindofvoltageregulationmethodbycontrollingtheswitchfrequencyofDCpowerwithfixedvoltagetomodifythetwo-endvoltageofload.Thistechnologycanbeusedforavarietyofapplicationsincludingmotorcontrol,temperaturecontrolandpressurecontrolandsoon.InthemotorcontrolsystemshownasFig.1,throughadjustingthedutycycleofpowerswitch,thespeedofmotorcanbecontrolled.AsshowninFig.2,underthecontrolofPWMsignal,theaverageofvoltagethatcontrolsthespeedofmotorchangeswithDuty-cycle(D=t1/TinthisFigure),thusthemotorspeedcanbeincreasedwhenmotorpowerturnon,decreasedwhenpowerturnoff.第4页Figure1:TheRelationshipbetweenVoltageofArmatureandFigure2:ArchitectureofPWMModuleTherefore,themotorspeedcanbecontrolledwithregularlyadjustingthetimeofturn-onandturn-off.Therearethreemethodscouldachievetheadjustmentofdutycycle:(1)Adjustfrequencywithfixedpulse-width.(2)Adjustbothfrequencyandpulse-width.(3)Adjustpulse-widthwithfixedfrequency.Generally,therearefourmethodstogeneratethePWMsignalsasthefollowing:(1)Generatedbythedevicecomposedofseparatelogiccomponents.Thismethodistheoriginalmethodwhichnowhasbeendiscarded.(2)Generatedbysoftware.ThismethodneedCPUtocontinuouslyoperateinstructionstocontrolI/OpinsforgeneratingPWMoutputsignals,sothatCPUcannotdoanythingother.Therefore,themethodalsohasbeendiscardedgradually.(3)GeneratedbyASIC.TheASICmakesadecreaseofCPUburdenandsteadyworkgenerallyhasseveralfunctionssuchasover-currentprotection,dead-timeadjustmentandsoon.Thenthemethodhasbeenwidelyusedinmanykindsofoccasionnow.(4)GeneratedbyPWMfunctionmoduleofMCU.ThroughembeddingPWMfunctionmoduleinMCUandinitializingthefunction,PWMpinsofMCUcanalsoautomaticallygeneratePWMoutsignalswithoutCPUcontrollingonlywhenneedtochangeduty-cycle.Itisthemethodthatwillbeimplementedinthispaper.Inthispaper,weproposeaPWMmoduleembeddedina8051microcontroller.ThePWMmodulecansupportPWMpulsesignalsbyinitializingthecontrolregisterandduty-cycleregisterwiththreemethodsjustmentioned第5页abovetoadjustthedutycycleandseveraloperationmodestoaddflexibilityforuser.ThefollowingsectionexplainsthearchitectureofthePWMmoduleandthearchitecturesofbasicfunctionalblocks.Section3describestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.ImplementationofPWMmoduleinMCUOverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig.3.Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwosections:PWMsignalgeneratoranddead-timegeneratorwithchannelselectlogic.ThePWMfunctioncanbestartedbytheuserthroughimplementingsomeinstructionsforinitializingthePWMmodule.Inparticular,thefollowingpowerandmotioncontrolapplicationsaresupported:DCMotorUninterruptablelPowerSupply(UPS)ThePWMmodulealsohasthefollowingfeatures:TwoPWMsignaloutputswithcomplementaryorindependentoperationHardwaredead-timegeneratorsforcomplementarymodeDutycycleupdatesareconfigurabletobeimmediatedorsynchronizedtothePWMFig.3ArchitectureofPWMModule第6页DetailsofthearchitecturePMWgeneratorThearchitectureofthe2-outputPWMgeneratorshowninFig.4isbasedona16-bitresolutioncounterwhichcreatesapulse-widthmodulatedsignal.Thesystemissynthesizedbyasystemclocksignalwhosefrequencycanbedividedby4timesor12timesthroughsettingthevalueofT3MforPWM0orT4MforPWM1inthespecialregisterPWMCONasshowninFig.4.ToPWM0generator,theclockto16-bitcounterwillbepre-dividedby4timesbydefaultwhenT3Missettozero.Andtheclockwillbedividedby12timeswhenT3Missetto1.ThisisalsotrueforPWM1.TheotherbitsinPWMCONareexplainedindetailinTable1.Fig.4BitMappingofPWMCONTable1:TheBitDefinitioninPWMCONChannel-selectlogicThefollowFig.5showsthechannel-selectlogicwhichisusefulinComplementaryMode.Fromthisdiagram,itiscleartoknowthatsignalCPandCPWMcontrolthesourceofPWMHandPWML.Andthedetailsaboutthetwocontrolsignalswillbediscussedinthesection3,andthearchitectureofdead-timegeneratorwillalsobediscussedinsection5forthecontinuityofComplementaryMode.第7页Fig.5DiagramofChannel-selectLogicOperationModeandSimulationResultsThedesignhastwooperationmodes:IndependentModeandComplimentaryMode.BysettingthecorrespondingbitCPWMinregisterPWMCONshowninFig.6usercanselectoneofthetwooperationmodes.WhenCPWMissettozero,PWMmodulewillworkinIndependentMode,whereas,PWMmodulewillworkinComplimentaryMode.Inthefollowingofthissection,thetwooperationmodewillbeexplainedrespectivelyindetailandthesimulationresultsofthePWMmodulefromtheSynoposysVCSEDAplatformwhichverifythedesignwillalsobeshown.IndependentPWMOutputModeAnIndependentPWMOutputmodeisusefulfordrivingloadssuchastheoneshowninFigure6.AparticularPWMoutputisintheIndependentOutputmodewhenthecorrespondingCPbitinthePWMCONregisterissettozero.Inthiscase,two-channelPWMoutputsareindependentofeachother.ThesignalonpinPWM0/PWMHisfromPWM0generator,andthesignalonpinPWM1/PWMLisfromPWM0generator.Theseparatecaseisachievedbythechannel-selectlogicshowninFig.6.ThePWMI/Opinsaresettoindependentmodebydefaultuponadvicereset.Thedead-timegeneratorisdisabledintheIndependentmode.ThesimulationresultisshowninFigure6asthefollowingFig.6Tr4andtr3arerunbitstoPWM0andPWM1,respectively.Actually,fromthisdiagram,PinP15/P14ofMCUisusedforPWMH/PWMLornormalI/O,alternatively.第8页Fig6theWaveformofPWMOutputsinIndependentModeComplementaryPWMOutputModeTheComplementaryOutputmodeisusedtodriveinverterloadssimilartotheoneshowninFigure7.ThisinvertertopologyistypicalforDCapplications.InComplementaryOutputMode,thepairofPWMoutputscannotbeactivesimultaneously.ThePWMchannelandoutputpinpairareinternallyconfiguredthroughchannel-selectlogicasshowninFigure7.Adead-timemaybeoptionallyinsertedduringdeviceswitchingwherebothoutputsareinactiveforashortperiod.Fig7:TypicalLoadforComplementaryPWMOutputsTheComplementarymodeisselectedforPWMI/OpinpairbysettingtheappropriateCPWMbitinPWMCON.Inthiscase,PSELisineffect.PWMHandPWMLwillcomefromPWM0generatorwhenPSELissettozero,whenthesignalsfromPWM1generatorisuseless,whereasPWMHandPWMLwillcomefromPWM1generatorwhenPSELissetto1,whenthesignalsfromPWM0generatorisuseless.IntheprocessofproducingthePWMoutputsinComplementaryMode,thedead-timewillbeinsertedtobediscussedinthefollowingsection.Dead-timeControl第9页Dead-timegenerationisautomaticallyenabledwhenPWMI/OpinpairisoperatingintheComplementaryOutputmode.Becausethepoweroutputdevicescannotswitchinstantaneously,someamountoftimemustbeprovidedbetweentheturn-offeventofonePWMoutputinacomplementarypairandtheturn-oneventoftheothertransistor.The2-outputPWMmodulehasoneprogrammabledead-timewith8-bitregister.ThecomplementaryoutputpairforthePWMmodulehasan8-bitdowncounterthatisusedtoproducethedead-timeinsertion.AsshowninFigure8,thedeadtimeunithasarisingandfallingedgedetectorconnectedtoPWMsignalfromoneofPWMgenerator.ThedeadtimesisloadedintothetimeronthedetectedPWMedgeevent.Dependingonwhethertheedgeisrisingorfalling,oneofthetransitionsonthecomplementaryoutputsisdelayeduntilthetimercountsdowntozero.AtimingdiagramindicatingthedeadtimeinsertionforthepairofPWMoutputsisshowninFigure8a.Fig8aDead-timeUnitBlockDiagramFig.8btheWaveformsofPWMOutputsinComplementaryMode第10页ConclusionsInthispaper,wehavedesignedPWMmodulebasedonan8-bitMCUcompatiblewith8051family.Thedesigncangenerate2-channelprogrammableperiodicPWMsignalswithtwooperationmode,IndependentModeandComplementaryModeinwhichdead-timewillbeinserted.ThesimulationresultsontheEDAplatformhaveprovenitscorrectnessandusefulness.第11页中文翻译稿基于C51兼容微处理器单片机的PWM控制器设计直流电机是实现直流电能与机械能之间相互转换的电力机械,直流电动机具有宽广的调速范围,平滑的无级调速特性2。常应用于对启动和调速有较高要求的场合,如宾馆高速电梯、龙门刨床、机车、大型精密机床和大型起重机等生产机械中。本文系统介绍了利用输入电压的改变来控制电机的转速。当前,直流电机因其速度可调等种种优点,在实际生产中得到了广泛的应用。直流电机调速的方法有很多,直流电机的脉宽调制方法是直流电机调速方法中比较常见的。在这用改变输入电压的大小,来调节电机的转速。利用PWM脉冲信号的占空比决定输出到直流电机的平均电压的大小。通过改变直流电机电枢上电压的“占空比”来改变平均电压的大小,从而控制电动机的转速。本文阐述了利用硬件和软件相结合的方法来进行对电机的测速和调速,硬件方面以STC89C51型号的单片机为核心,与驱动电路,测速电路,键盘和LCD显示模块构成最小系统。其中LCD采用动态显示方式,键盘采用查询方式实现。软件上通过用C语言编程产生PWM信号的输出,通过调节占空比,可以实现调节输出电压的目的。通过以上的设计,就实现了由单片机输出PWM脉冲信号,调节电机速度。通过测速电路把转速反馈给MCU,并把转速显示在LCD显示器上。人员可根据显示速度操作键盘,最终达到想要设定的转速。调节系统的特征在于能保持输出功率的稳定。不同的速度控制系统可以使用不同的制动系统,在有高起、制动转矩,快速响应和快速度调节范围要求的直流调速系统中,采用的是电气制动的方式。直流电机的速度控制取决于电枢电压和磁通。要将转速降为零,或者U=0或=。后者是不可能的,因此只可通过电枢电压的变化来降低转速。要将转速增加到较高值,可以增大U或减小。调节系统是一类通常能提供稳定输出功率的系统。例如,电机速度调节器要能在负载转矩变化时仍能保持电机转速为恒定值。即使负载转矩为零,电机也必须提供足够的转矩来克服轴承的粘滞摩擦影响。其他类型的调节器也提供输出功率,温度调节器必须保持炉内的温度恒定,也就是说,即使炉内的温度散失也必须保持炉温不变。一个电压调节其也必须保持负载电流值变化时输出电压值恒定。对于任何一个提供一个输出,例如,速度、温度、电压等的系统,在稳态下必须存在一个误差信号。第12页在许多速度控制系统中,例如轧钢机、矿坑卷扬机等这些负载要求频繁地停顿和反向运动的系统。随着减速要求,速度减小的比率取决于存储的能量和所使用的制动系统。一个小型速度控制系统(例如所知的伺服积分器)可以采用机械制动,但这对大型速度控制器并不可行,因为散热很难而且很昂贵。可行的各种电气制动方法有:(1)回馈制动(2)涡流制动(3)能耗制动(4)反接制动回馈制动虽然并不一定是最经济的方式,但却是最好的方式。负载中存储的能量通过工作电机(暂时以发电机模式运行)被转化成电能并返回到电源系统中。这样电源就充当了一个收容不想要的能量的角色。假如电源系统具有足够的容量,在短时回馈过程中最终引起的端电压升高会很少。在直流电机速度控制渥特-勒奥那多法中,回馈制动是固有的,但可控硅传动装置必须被排布的可以反馈。如果转轴速度快于旋转磁场的速度,感应电机传动装置可以反馈。由晶闸管换流器而来的廉价变频电源的出现在变速装置感应电机应用中引起了巨大的变化。涡流制动可用于任何机器,只要在轴上安装一个铜条或铝盘并在磁场中旋转它即可。在大型系统中,散热问题是很重要的,因为如果长时间制动,轴、轴承和电机的温度就会升高。在能耗制动中,存储的能量消耗在回路电阻器上。用在小型直流电机上时,电枢供电被断开,接入一个电阻器(通常是一个继电器、接触器或晶闸管)。保持磁场电压,施加制动降到最低速。感应电机要求稍微复杂一点的排布,定子绕组被从交流电源上断开,接到直流电源上。产生的电能继而消耗在转子回路中。能耗制动应用在许多大型交流升降系统中,制动的职责是反向和延长。任何电机都可以通过突然反接电源以提供反向的旋转方向(反接制动)来停机。在可控情况下,这种制动方法对所传动装置都是使用的。它主要的缺点就是当制动等于负载存储的能量时,电能被机器消耗了。这在大型装置中就大大增加了运行成本。导言PWM技术,是一种电压调节方法,通过控制具有固定电压的直流电源的开关频率来调整两端负荷电压。这种技术能用于各种应用包括电机、温度、和压力的控制,等等。在电机系统中的应用,如图1所示,通过调整电源开关的占空比,来控制电机的速度,如图2所示,平均电压通过改变占空比来控制电机的速度(在图中D=t1/T),这样当电机的电源打开时,它的速度加快,相反,当电源关闭时,速度下降。第13页图1PWM控制框图图2电压的电枢和占空比之间的关系所以,通过定期地调整时间的开通和关断来控制电机的转速:这儿有三种方法可以完成占空比的调整(1)通过脉宽来调整频率;(2)通过同时调整频率和脉宽;(3)通过频率来调整脉宽。一般情况下,有四中方法可以产生PWM信号,正如以下:(1)由独立逻辑元件组成的装置产生,这种是原始的方法,现在已被淘汰;(2)通过软件产生,这种方法需要CPU持续操作代码来控制I/O口,以致于CPU不能做其他任何事。所以,这种方法也渐渐被淘汰;(3)通过ASIC产生,ASIC减少了CPU的负担,并获得了稳定的工作,一般有几个功能,如电流保护、死区时间调整等等;然而这种方法现在已被广泛用于许多场合;(4)通过单片机的PWM功能模块产生,只有当需要改变占空比的时候CPU失控,这样就不能产生PWM信号,否则通过在单片机里嵌入PWM功能模块,并使这功能初始化,单片机的PWM口也能自动产生PWM信号。这种方法将在文章中讲述。在本文中,我们建议在8051单片机里嵌入一个PWM模块。该PWM模块,通过初始化控制寄存器和寄存器的占空比,可以支持PWM脉冲信号,用刚才提到的上述三种方法调整占空比和几个操作模式,以增加用户弹性。以下这部分解释PWM模块和基本功能模块的结构。第三部分描述两种操作模式。这部分还讲述了实验和仿真的结果验证了合适的系统操作。通过操作模式,PWM模块产生一个或更多的脉宽模块信号,它们的比率可以自主调整。在单片机上执行PWM模块PWM模块的概述PWM模块如图3所示,从图中,可以很清楚得看到整个模块有两部分组成:PWM信号产生器和带有频道选择逻辑的死区时间产生器。用户可以通过执行一些代码使PWM模块初始化,从而启动其功能。在特殊情况下,支持以下电源和运动控制应用:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论