


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 新解读《CB-T 3884-1999小艇 厕所污水的处理集存和再循环系统》新解读
- 儿童创意美术课件《水墨画参考作品图10例》
- Brand KPIs for health insurance:Seguros Banorte in Mexico-英文培训课件2025.4
- 航道工程施工组织设计
- 初中英语七年级下册统编教案 第二单元
- 物理中考二轮复习教案 1作图专题2(力学)
- 仓储管理活动方案
- 【NishithDesai】全球能力中心-法律、监管和税务问题-2025.5
- 安徽省合肥市包河区校联考2023-2024学年四年级下学期数学期末试卷(含答案)
- 代管班中午活动方案
- 2025年社区工作者职业能力考试试卷及答案
- 2025辽宁永安建设发展限公司招聘30人易考易错模拟试题(共500题)试卷后附参考答案
- 原材料采购应急预案
- 长沙市直事业单位招聘工作人员考试真题2024
- 人工智能驱动的动态权限管理与访问控制-洞察阐释
- 材料力学(山东科技大学)知到智慧树期末考试答案题库2025年山东科技大学
- DBJD25-67-2019甘肃省建筑与装饰工程预算定额地区基价不含税中册
- 工业互联网驱动的军工企业智能化改造路径研究-洞察阐释
- 江西省2025年初中学业水平考试样卷(四)数学模拟试题 (含部分答案)
- 2024北京西城区五年级(下)期末英语试题及答案
- 2025年CCAA《管理体系认证基础》考前必练题库500题(含真题、重点题)
评论
0/150
提交评论