资源描述:
《基于单片机的温度控制系统的软件设计.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、基于单片机的温度控制系统的软件设计摘要随着现代信息技术的飞速发展,温度测量控制系统在工业、农业及人们的日常生活中扮演着一个越来越重要的角色,它对人们的生活具有很大的影响,所以温度控制系统的设计与研究有十分重要的意义。本系统的设计以AT89C51单片机为基础,结合温度传感变送器、A/D转换器、LED显示器、固态继电器等,组成一个基于AT89C51单片机的温度控制系统。在此系统中,通过键盘设定给定温度值,同时送LED显示。温度传感变送器获得温度的感应电压,转变成1-5V的标准电压信号,再由A/D转换器转换成数字信号送入单片
2、机内部,同时将采样回来的温度值送LED显示。单片机将给定的温度与测量温度的相比较后,进行史密斯预估补偿运算和PID运算后,得出控制量。执行器由开关频率较高的固态继电器开关担任,采用模拟的PWM控制方法,改变同一个周期中电子开关的闭合时间,达到控制的温度的目的,使实际的输出温度跟随设定温度。本文详细阐述了基于单片机的温度控制系统的软件设计,简要的介绍了硬件电路及相关的接口电路的设计。并且充分考虑了系统的可靠性,采取了相应的措施予以保证。针对控制对象的特点,在MATLABE的基础上对系统的控制算法进行了仿真研究,并在单片机
3、系统中实现了控制算法。最后用PROTEUS软件对温度控制系统进行与硬件电路的联调仿真,通过对仿真结论的分析表明本文所述的基于单片机的温度控制系统的设计的合理性和有效性。关键词:AT89C51单片机,纯滞后,史密斯预估器ThesoftwaredesignoftemperaturecontrolsystembasedonSCMABSTRACTAlongwiththepresentinformationtechnology'sswiftdevelopment,thetemperaturesurveycontrolsystem
4、intheindustry,agriculturalandinpeople'sdailylifeisplayingamoreandmoreimportantrole,ithastheverytremendousinfluencetopeople'slife,thereforetemperaturecontrolsystem'sdesignandtheresearchhavetheveryvitalsignificance.Thissystem'sdesigntakeat89C51monolithicintegrated
5、circuitasthefoundation,theuniontemperaturesensingtransmittinginstrument,a/Dswitch,theLEDmonitor,thesolidstaterelayandsoon,composesonebasedonAT89C51monolithicintegratedcircuit'stemperaturecontrolsystem.Inthissystem,assignsthetemperaturevaluethroughthekeyboardhypo
6、thesis,simultaneouslydeliverstheLEDdemonstration.Thetemperaturesensingtransmittinginstrumentobtainsthetemperaturetheinducedtension,transforms1-5Vthestandardvoltagesignal,transformsthedigitalsignalbya/Dswitchtosendinagainthemonolithicintegratedcircuit,simultaneou
7、slythetemperaturevaluewhichcomesbackthesamplingdeliverstheLEDdemonstration.Themonolithicintegratedcircuitwillassignafterthetemperatureandthesurveytemperaturecompare,carriesonSmithtoestimateaftercompensationoperationandPIDoperation,obtainsthecontrolquantity.Theac
8、tuatorholdsthepostbytheturn-onfrequencyhighsolidstaterelayswitch,usesthesimulationthePWMcontrolmethod,thechangeidenticalcycleneutronswitch'sclosingtime,achievesthecon