温度监控系统的设计(软件设计)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

毕业设计(论文)第1页共27页温度监控系统的设计——系统的软件设计指导老师:**老师摘要随着科技的发展,相较于很多年以前人们对于自己生活的需求也发生了戏剧性的改变。而监控系统恰恰迎合了人们的这一需要。在众多先进测量控制技术中,由于单片微处理器的性能日益提高、价格又不断降低,使其性能价格比的优势非常明显并且我们知道利用MATLAB可以方便地进行仿真整定PID参数。本文介绍一个以单片机为核心的温度监控系统,主要包括控制算法的仿真分析(用MATLAB)和软件编程(用C51),它是利用传感器采集温度信号,温度信号经放大电路放大、A/D转换后送到单片机中,并将温度值显示在数码管上,单片机把它同由键盘实现的给定温度进行比较,再由单片机根据控制策略给出控制量,然后将控制量送驱动电路驱动加热装置和报警装置,从而构成了实时闭环系统。本人主要负责系统的软件设计,在软件设计过程中,我们尽可能使其功能化、模块化、尽量采用子程序调用的方法。【关键字】单片机;温度监控系统;PID控制算法;MATLAB;软件设计(C51)。AbstractWiththeincreasingpaceofscienceandtechnology,perhapsnochangehascharacteristicthepastdecadesmoredramaticthanthatofpeople’sdemandsoftheirownlife.Supervisionandmonitoringsystemmeettherequirementsofthem.Inthesenumerousadvancedmeasurementandcontroltechnology,becauseoftheenhancedperformanceandreducedpriceofMCU,makingtheadvantagethatitsratioofperformancetopricebeenobviousandasweknowMATLABiseasytosimulatethesettingofPIDparameter.Thistext,whichcomprisedbythesimulationandanalysisofcontrolalgorithms(usingMATLAB)andtheprogramofsoftware(usingC51),introducesatemperaturemonitorwhosecoreisaMCU.Itgathersthetemperaturesignalandamplifiesitbyanamplifiercircuitmicrocomputer.SimultaneitysendsitintotheMCUafterA/Dconversion.ThenshowitonintheLED.Thesinglechipcomparesitwiththetemperature,whichrealizesbythekeyboard毕业设计(论文)第2页共27页andgivecontrolmeasureaccordingtothecontrolstrategy.Intheend,theMCUsendscontrolmeasuretodrivecircuitinordertodrivetheheatinginstallationandwarningdevice.Andaclosedsystemisformed.Iammainlyresponsibleforthesoftwaredesignofthesystem.Inprocessofthesoftwaredesign;wemakeitsfunction,modularizationandusesubroutineasfaraspossible.KEYWORDS:MCU;temperaturemonitorsystem;ThecontrolalgorithmofPID;MATLAB;softwaredesign(C51).毕业设计(论文)第3页共27页目录引言----------------------------------------------------------------------------------------------41系统概述----------------------------------------------------------------------------------------41.1系统功能描述------------------------------------------------------------------------------------------41.2系统的框图---------------------------------------------------------------------------------------------52、PID控制与MATLAB仿真--------------------------------------------------------------52.1PID控制-------------------------------------------------------------------------------------------------52.1.1PID控制的优点------------------------------------------------------------------------------52.1.2数字PID-----------------------------------------------------------------------------------62.1.3凑试法确定PID参数-----------------------------------------------------------------------62.1.4电炉传递函数--------------------------------------------------------------------------------72.1.5PID控制框图-----------------------------------------------------------------------------72.2MATLAB仿真--------------------------------------------------------------------------------------------72.2.1Simulink模型的建立----------------------------------------------------------------------82.2.2PID的MATLAB编程实现------------------------------------------------------------------93、硬件概述-----------------------------------------------------------------------------------103.1硬件电路概述----------------------------------------------------------------------------------------103.2AT89C51端口定义----------------------------------------------------------------------------------113.3模数转换模块----------------------------------------------------------------------------------------123.4键盘模块------------------------------------------------------------------------------------------------133.5显示模块------------------------------------------------------------------------------------------------144、软件设计-----------------------------------------------------------------------------------154.1单片机编程语言的选择----------------------------------------------------------------------------154.1.1汇编语言-------------------------------------------------------------------------------------154.1.2C语言----------------------------------------------------------------------------------------154.2软件总体结构图-------------------------------------------------------------------------------------164.2.1系统初始化-----------------------------------------------------------------------------------164.2.2主程序模块软件设计----------------------------------------------------------------------164.3A/D模块软件设计-----------------------------------------------------------------------------------174.4键盘模块软件设计----------------------------------------------------------------------------------174.5报警模块软件设计----------------------------------------------------------------------------------194.6采样、PID校正及PWM输出模块软件设计---------------------------------------------204.7显示模块软件设计----------------------------------------------------------------------------------215、系统调试与总结-------------------------------------------------------------------------225.1系统调试-----------------------------------------------------------------------------------------------225.2程序链接--------------------------------------------------------------------------------------

1 / 27
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功