


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1-4244-1253-6/07/$25.002007IEEEProceedingsofHDP07DesignofPWMControllerinaMCS-51CompatibleMCUYue-LiHu,WeiWangMicroelectronicResearch&DevelopmentCenter,KeyLaboratoryofAdvancedDisplayandSystemApplications(ShanghaiUniversity),MinistryofEducationCampusP.O.B.221,149YanchangRd,Shanghai200072,ChinaE-mail:AbstractThispaperpresentsadesignofPulse-WidthModulated(PWM)controllermoduleinaMCUbasedonMCS-51structure.Thedesigncangenerate2-channelprogrammableperiodicPWMsignals.TheseoutputPWMsignalsfromMCUcanbeusedforavarietyofapplicationsincludingmotorcontrol.Thefunctionofthedesignallowsuserstoselectindependentorcomplementaryinversiontimingrelationshipsbetween2PWMwaveforms.ThelattermodeselectionalsoincludesoptionaldeadtimefunctiontosupportdrivingH-bridgesandinverters.Therefore,userscancontroltheoutputPWMsignalsthroughsettingtheduty-cycleregisters.Afterthesuccessfulsimulationatthefrontend,practicalexperimentsmadeonaNIOSdevelopmentboardverifythedesign.1.IntroductionPWMtechnologyisakindofvoltageregulationmethodbycontrollingtheswitchfrequencyofDCpowerwithfixedvoltagetomodifythetwo-endvoltageofload.Thistechnologycanbeusedforavarietyofapplicationsincludingmotorcontrol,temperaturecontrolandpressurecontrolandsoon.InthemotorcontrolsystemshownasFig.1,throughadjustingthedutycycleofpowerswitch,thespeedofmotorcanbecontrolled.AsshowninFig.2,underthecontrolofPWMsignal,theaverageofvoltagethatcontrolsthespeedofmotorchangeswithDuty-cycle(D=t1/TinthisFigure),thusthemotorspeedcanbeincreasedwhenmotorpowerturnon,decreasedwhenpowerturnoff.Fig.1PWMcontrolblockdiagramFig.2:TheRelationshipbetweenVoltageofArmatureandDuty-cycleTherefore,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-cycleregisterwiththreemethodsjustmentionedabovetoadjustthedutycycleandseveraloperationmodestoaddflexibilityforuser.ThefollowingsectionexplainsthearchitectureofthePWMmoduleandthearchitecturesofbasicfunctionalblocks.Section3describestwooperationmodes.Experimentalandsimulationresultsverifyingpropersystemoperationarealsoshowninthatsection.Dependingonmodeofoperation,thePWMmodulecreatesoneormorepulse-widthmodulatedsignals,whosedutyratioscanbeindependentlyadjusted.2.ImplementationofPWMmoduleinMCU2.1OverviewofthePWMmoduleAblockdiagramofPWMmoduleisshowninFig.3.Itisclearlyfromthediagramthatthewholemoduleiscomposedoftwosections:PWMsignalgeneratoranddead-timegeneratorwithchannelselectlogic.ThePWMfunctioncanbestartedbytheuserthroughimplementingsomeinstructionsforinitializingthePWMmodule.Inparticular,thefollowingpowerandmotioncontrolapplicationsaresupported:DCMotorUninterruptablelPowerSupply(UPS)ProceedingsofHDP07Fig.3ArchitectureofPWMModuleThePWMmodulealsohasthefollowingfeatures:TwoPWMsignaloutputswithcomplementaryorindependentoperationHardwaredead-timegeneratorsforcomplementarymodeDutycycleupdatesareconfigurabletobeimmediatedorsynchronizedtothePWM2.2Detailsofthearchitecture2.2.1PMWgeneratorThearchitectureofthe2-outputPWMgeneratorshowninFig.3isbasedona16-bitresolutioncounterwhichcreatesapulse-widthmodulatedsignal.Thesystemissynthesizedbyasystemclocksignalwhosefrequencycanbedividedby4timesor12timesthroughsettingthevalueofT3MforPWM0orT4MforPWM1inthespecialregisterPWMCONasshowninFig.4.ToPWM0generator,theclockto16-bitcounterwillbepre-dividedby4timesbydefaultwhenT3Missettozero.Andtheclockwillbedividedby12timeswhenT3Missetto1.ThisisalsotrueforPWM1.TheotherbitsinPWMCONareexplainedindetailinTable1.Fig.4BitMappingofPWMCONTable1:TheBitDefinitioninPWMCONBITDescriptionTF4InterruptRequestforPWM0TR4RUNbitforPWM0TF3InterruptRequestforPWM1TR3RUNbitforPWM1PSELChannelSelectinComplementaryModeCPWMModeSelectT4MClockPrescalerforPWM1T3MClockPrescalerforPWM02.2.2Channel-selectlogicThefollowFig.5showsthechannel-selectlogicwhichisusefulinComplementaryMode.Fromthisdiagram,itiscleartoknowthatsignalCPandCPWMcontrolthesourceofPWMHandPWML.Andthedetailsaboutthetwocontrolsignalswillbediscussedinthesection3,andthearchitectureofdead-timegeneratorwillalsobediscussedinsection3.1forthecontinuityofComplementaryMode.Fig.5DiagramofChannel-selectLogic3.OperationModeandSimulationResultsThedesignhastwooperationmodes:IndependentModeandComplimentaryMode.BysettingthecorrespondingbitCPWMinregisterPWMCONshowninFig.4,usercanselectoneofthetwooperationmodes.WhenCPWMissettozero,PWMmodulewillworkinIndependentMode,whereas,PWMmodulewillworkinComplimentaryMode.Inthefollowingofthissection,thetwooperationmodewillbeexplainedrespectivelyindetailandthesimulationresultsofthePWMmodulefromtheSynoposysVCSEDAplatformwhichverifythedesignwillalsobeshown.3.1IndependentPWMOutputModeAnIndependentPWMOutputmodeisusefulfordrivingloadssuchastheoneshowninFigure1.AparticularPWMoutputisintheIndependentOutputmodewhenthecorrespondingCPbitinthePWMCONregisterissettozero.Inthiscase,two-channelPWMoutputsareindependentofeachother.ThesignalonpinPWM0/PWMHisfromPWM0generator,andthesignalonpinPWM1/PWMLisfromPWM0generator.Theseparatecaseisachievedbythechannel-selectlogicshowninFig.6.ThePWMI/Opinsaresettoindependentmodebydefaultuponadvicereset.Thedead-timegeneratorisdisabledintheIndependentmode.ThesimulationresultisshowninFigure4asthefollowingFig.5.Tr4andtr3arerunbitstoPWM0andPWM1,respectively.Actually,fromthisdiagram,PinP15/P14ofMCUisusedforPWMH/PWMLornormalI/O,alternatively.Fig.6theWaveformofPWMOutputsinIndependentMode3.2ComplementaryPWMOutputModeTheComplementaryOutputmodeisusedtodriveinverterloadssimilartotheoneshowninFigure7.ThisinvertertopologyistypicalforDCapplications.InComplementaryOutputMode,thepairofPWMoutputscannotbeactivesimultaneously.ThePWMchannelandoutputpinpairareinternallyconfiguredthroughchannel-selectlogicasshowninFigure5.Adead-timemaybeoptionallyinsertedduringdeviceswitchingwherebothoutputsareinactiveforashortperiod.ProceedingsofHDP07Fig7:TypicalLoadforComplementaryPWMOutputsTheComplementarymodeisselectedforPWMI/OpinpairbysettingtheappropriateCPWMbitinPWMCON.Inthiscase,PSELisineffect.PWMHandPWMLwillcomefromPWM0generatorwhenPSELissettozero,whenthesignalsfromPWM1generatorisuseless,whereasPWMHandPWMLwillcomefromPWM1generatorwhenPSELissetto1,whenthesignalsfromPWM0generatorisuseless.IntheprocessofproducingthePWMoutputsinComplementaryMode,thedead-timewillbeinsertedtobediscussedinthefollowingsection.3.3Dead-timeControlDead-timegenerationisautomaticallyenabledwhenPWMI/OpinpairisoperatingintheComplementaryOutputmode.Becausethepoweroutputdevicescannotswitchinstantaneously,someamountoftimemustbeprovidedbetweentheturn-offeventofonePWMoutputinacomplementarypairandtheturn-oneventoftheothertransistor.The2-outputPWMmodulehasoneprogrammabledead-timewith8-bitregister.ThecomplementaryoutputpairforthePWMmodulehasan8-bitdowncounterthatisusedtoproducethedead-timeinsertion.AsshowninFigure8,thedeadtimeunithasarisingandfallingedgedetectorconnectedtoPWMsignalfromoneofPWMgenerator.ThedeadtimesisloadedintothetimeronthedetectedPWMedgeevent.Dependingonwhethertheedgeisrisingorfalling,oneofthetransitionsonthecomplementaryoutputsisdelayeduntilthetimercountsdowntozero.AtimingdiagramindicatingthedeadtimeinsertionforthepairofPWMoutputsisshowninFigure8.Fig.8Dead-timeUnitBlockDiagramFig.9theWaveformsofPWMOutputsinComplementaryModeConclusionsInthispaper,wehavedesignedPWMmodulebasedonan8-bitMCUcompatiblewith8051family.Thedesigncangenerate2-channelprogrammableperiodicPWMsignalswithtwooperationmode,IndependentModeandComplementaryModeinwhichdead-timewillbeinserted.ThesimulationresultsontheEDAplatformhaveprovenitscorrectnessandusefulness.AcknowledgmentsTheauthorswouldliketothankShanghaiLeadingAcademicDisciplineProject(ProjectNumber:T0103)forthefinancialsupport.References1.Xianghui-fangandHuyue-li,Computermeasurementandcontrol,14(7)p.942(2006)2.Huyue-lia
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 国际贸易实务模拟试题(附答案)
- 养殖业废弃物处理服务合同
- 社区合作社种植产品收购与销售协议
- 企业年度销售代理协议
- 家用电器购买安装合同
- 2025陕西西凤露酒有限公司招聘(38人)笔试参考题库附带答案详解
- 2025年山东土地资本投资集团有限公司春季社会招聘(10人)笔试参考题库附带答案详解
- 2025年中石化芜湖石油分公司招聘8人笔试参考题库附带答案详解
- 2025中储粮集团黑龙江分公司招聘165人查看职位笔试参考题库附带答案详解
- 纺织品设计师证书考试解析及试题
- 铸就数字坚盾网络安全技术知到课后答案智慧树章节测试答案2025年春青岛工学院
- (高清版)JTGT 3650-01-2022 公路桥梁施工监控技术规程
- 中国历史地理智慧树知到期末考试答案章节答案2024年北京大学
- MOOC 跨文化交际通识通论-扬州大学 中国大学慕课答案
- API520-安全阀计算PART1(中文版)
- 八年级期末质量分析-课件
- 10000中国普通人名大全
- 费森4008s常见故障排除
- 积极心态与消极心态
- 特种设备检查记录
- 《土地宝忏》2019版定稿
评论
0/150
提交评论