基于虚拟仪器的电阻炉温度控制系统设计毕业设计论文
- 格式:doc
- 大小:1.29 MB
- 文档页数:58
毕业设计(论文)-基于PLC电阻炉温度控制系统设计基于PLC的电阻炉温度控制系统设计【摘要】温度是各种工业生产和科学实验中最普遍、也是最重要的热工参数之一。
温度控制的精度对产品或实验结果会产生重大的影响。
温度控制的模式多样,而PLC可靠性高,抗干扰能力强,易学易用,采用PLC控制是其中一种比较优越的控制。
基于PLC的电阻炉温度控制系统设计,硬件方面PLC采用了CPU型号为226的S7-200、K型热电偶和温度模块EM235。
热电偶作为温度的采集元件,采集的信号经过EM235的处理后就可把数据送入PLC中进行处理。
PLC的程序中采用了位置式PID算法,脉宽调制PWM方式,运用了粗调和细调的思想,程序在不同的温度段使用不同的PID参数,实现温度的自动控制。
人机界面采用的是国内的一个比较流行的组态王软件。
组态王可以实现在线监控。
组态项目中制作了曲线画面、报表画面、报警画面和参数监控画面,用户可方便地查询PLC的运行情况、数据采集和在线控制。
实验结果表明,采用了粗调和细调思想的程序的PLC系统,具有反应速度快,超调量小,调节迅速,精度高等特点。
组态王功能强大,操作方便,有助于系统的监视与控制,表明了组态软件的具有很好的发展前景。
【关键词】温度控制可编程控制器 PID 组态王I目录1 引言 (4)1.1 课题研究背景 ...................................................... 41.2 电阻炉温度控制系统的发展状况 ...................................... 4 2 PLC的概述 .......................................................... 5 2.1 PLC的介绍 ........................................................ 5 2.2 PLC的基本组成 .................................................... 6 3硬件配置和软件环境 (6)3.1 实验配置 ..........................................................6 3.1.1 西门子S7-200 .................................................... 6 3.1.2 传感器 .......................................................... 6 3.1.3 EM 235模拟量输入模块 ........................................... 6 3.2 STEP 7 Micro/WIN32软件介绍 ........................................ 7 4 控制算法描述 .. (7)4.1 PWM技术 (7)4.2 PID控制程序设计 ...................................................7 4.2.1 PID控制算法 ..................................................... 8 4.2.2 PID在PLC中的回路指令 .......................................... 9 4.2.3 PID参数整定 .................................................... 11 5 程序设计 ........................................................... 12 5.1 方案设计思路 .. (12)5.2 程序流程图 .......................................................14 5.3 梯形图(见附录) .................................................15 6 组态画面设计 .......................................................15 6.1 组态软件概述 .....................................................15 6.2 组态王的介绍 .....................................................15 6.3 组态画面的建立 ...................................................16 6.3.1 创建项目 .......................................................16 6.3.2 建立主画面 .....................................................18 6.3.3 建立趋势曲线画面 ...............................................19 6.3.4 建立数据报表 ...................................................20 6.3.5 建立报警窗口 ...................................................22 6.3.6 建立参数监控画面 ...............................................23 7 系统测试 ...........................................................23II7.1 启动组态王 ....................................................... 23 7.2 参数监控和设定 ................................................... 25 7.3 报警信息提示 ..................................................... 25 7.4 报表系统查询 ..................................................... 26 7.5 趋势曲线监控 .. (26)7.5.1 实时趋势曲线 ...................................................26 7.5 趋势曲线监控 .....................................................27 7.5.1 实时趋势曲线 ...................................................27 7.5.2 分析历史趋势曲线 ...............................................27 结论 .................................................................29 参考文献 .............................................................31 附录梯形图 ........................................ 错误~未定义书签。
摘要在现代工业生产中,人们需要对各类加热炉、反应炉和锅炉中的温度进行检测和控制。
为适应这一需要有必要设计一个性能良好、操作方便的温度控制系统。
课题主要设计一个水温测控系统,控制锅炉中水的温度,选择合适的控制规律,使锅炉中水的温度按预定规律变化,并且能够进行越限报警。
可通过键盘,显示电路设定目标温度和参数。
控制系统按功能分主要包括温度传感器模块、温度显示设定模块、温度控制模块、单片机与上位机通信模块。
系统可通过键盘对电阻炉水温以及恒温时间长短进行预设,单片机根据当前炉内温度和预设温度,根据设定的算法计算出控制量,根据控制量通过PWM控制固态继电器的导通和关闭从而控制电阻丝的导通时间,以实现对炉温的控制。
另外通过单片机的串口与上位机通信,通过上位机软件实时显示当前温度和历史温度并且绘制出温度曲线,让系统的可读性更强,实现了远程监测的功能[2]。
关键词:电阻炉,温度曲线,PWM,上位机AbstractThe project is mainly about designing a water temperature monitoring system to control the water temperature in the boiler, and choosing proper control rules to make water temperature in the boiler change within the predetermined path, with the function of alerting temperature rising limit. Through the keyboard and display, we can set the goal temp. and other parameters. Control system, according to the functions, includes temperature sensor module, the temperature display setting module, a temperature control module, MCU and module. System can preset the resistance furnace temperature and and off so as to control the resistance wire conduction time in order to achieve temperature control. In addition through the serial port of MCU and , through the PC software, the device can fulfill the real-time display of current temperature and temperature .Key words: STC89C52, DS18B20, PWM, PC目录摘要.............................................................. ..I Abstract . (II)目录 (III)1 绪论 (1)1.1 选题意义 (1)1.2 国内外发展趋势 (1)1.3 系统的主要性能指标 (2)1.4 主要工作任务 (2)2 系统方案选择和工作原理 (2)2.1 系统综述 (2)2.2各模块电路的方案选择及论证 (3)2.2.1 系统硬件总框图 (3)2.2.2主机控制模块 (4)2.2.3温度控制模块 (4)2.2.4温度采集模块 (5)2.2.5显示模块 (5)2.2.6上位机软件 (6)2.3系统各模块的最终方案 (6)3 系统硬件设计 (7)3.1 STC89C52构成的最小系统 (7)3.1.1 晶振回路 (7)3.1.2 复位电路 (8)3.2温度采集模块的硬件设计 (8)3.2.1温度传感器DS18B20概述 (8)3.2.2温度采集模块的硬件设计 (10)3.3 报警电路设计 (10)3.4 电源电路设计 (11)3.5 按键电路设计 (12)3.5.1矩阵式键盘的结构与工作原理 (12)3.5.2矩阵键盘两种扫描方式 (13)3.6 显示电路设计 (13)3.6.1 LCD1602简介 (13)3.6.2 LCD1602管脚功能介绍 (14)3.6.3温度显示模块电路图 (17)3.7 时钟电路设计 (17)3.7.1 DS1302简介 (17)3.7.2 DS1302的结构及工作原理 (18)3.7.3 DS1302的控制字节 (18)3.7.4数据输入输出(IO) (18)3.7.5 DS1302的寄存器 (19)3.7.6 DS1302硬件连接图 (19)3.8电平转换电路设计 (19)3.8.1 RS-232标准介绍 (19)3.8.2 DB-9连接器 (20)3.8.3 MAX232芯片介绍 (22)3.8.4 串口硬件连接图 (22)3.9 继电器驱动电路设计 (22)3.9.1 固态继电器的分类与工作原理 (22)3.9.2固态继电器的硬件连接图 (24)4 系统的软件设计 (24)4.1 主程序的设计 (25)4.2 液晶显示模块 (26)4.3温度模块软件设计 (27)4.3.1 DS18B20测温数据的读取程序设计 (27)4.3.2 DS18B20温度读取流程 (32)4.4中断服务函数 (33)4.5上位机软件设计 (34)5 系统抗干扰措施 (37)5.1软件抗干扰措施 (37)结论 (39)致谢 (40)参考文献 (41)附录A 系统原理图 (42)附录B 系统总程序 (43)1 绪论1.1 选题意义随着现代科学技术的迅猛发展,各个领域对温度控制系统的精度、稳定性等的要求越来越高,控制系统也千变万化。
基于模糊PID的电阻炉温度控制器的设计与仿真研究摘要电阻炉是一种具有纯滞后的大惯性系统,开关炉门、加热材料、环境温度以及电网电压等都影响控制过程,传统的加热炉控制系统大多建立在一定的模型基础上,难以保证加热工艺要求。
因此本文将模糊控制算法引入传统的加热炉控制系统构成智能模糊控制系统,利用模糊控制规则自适应地在线对PID参数进行修改,借此提高其控制效果。
本文首先采用机理分析法对电阻炉正常工作时的温度对象进行分析,从理论上建立电阻炉被控对象的数学模型。
其次文中设计了三种控制系统。
一种是PID控制系统,一种是纯模糊控制系统,还有一种是模糊PID控制系统。
本文分析研究了常规PID控制方案、模糊控制方案,并分别对电阻炉PID控制系统、纯模糊控制系统进行仿真分析。
结果表明PID控制系统超调量太大,模糊控制系统虽然能有效减少超调量,但稳态误差较大。
针对PID控制和模糊控制的优缺点,设计了基于模糊自适应PID的电阻炉温度控制器。
模糊自整定PID控制是在一般PID控制系统的基础上,加上一个模糊控制规则环节,利用模糊控制规则在线对PID参数进行修改的一种自适应控制系统。
对电阻炉的模糊自适应PID 控制系统进行仿真分析,结果表明模糊自适应PID控制可实现调节时问短、超凋量小、稳态误差在±l℃内的性能指标,并对该控制方案的抗干扰性,鲁棒性进行了仿真分析,进一步验证了该控制方案是一种较为理想的智能型控制方案。
关键词:电阻炉,仿真,PID控制,模糊控制,模糊自适应PID控制Based on Fuzzy PID Resistance Furnace Temperature Controller Design and SimulationABSTRACTResistance furnace has pure lag and larger inertia. There are many factors which affect controlling process, such as opening and closing furnace door, heated metal material, surrounding temperature and wire power. In tradition, heating furnace controlling system is most based on some model, which can’t achieve heating process request. So this paper try in draught fuzzy controlling arithmetic into traditional heating furnace controlling system to form brainpower fuzzy control system. It makes using of fuzzy control rule to self-tuning PID parameters on line, and improving its control effect.This paper adopted the main research contents of resistance furnace mechanism analysis on the normal temperature object when analyzed theoretically establish resistance furnace, the mathematical model of the controlled object. This paper designs the three control system. One is the PID control system; One is pure fuzzy control system, the other is the fuzzy PID control system. The paper studies the conventional PID control scheme, the fuzzy control scheme, and to resistance furnace respectively the PID control system, pure fuzzy control system simulation analysis. Results show that the PID control system overshoots too big, fuzzy control system, while can effectively reduce overshoot meal, but the steady-state error is bigger. Aimed at the PID control and fuzzy control, design the advantages and disadvantages of based on fuzzy adaptive PID resistance furnace temperature controller. to the resistance furnace fuzzy adaptive PID control system simulation analysis, and the results show that the fuzzy adaptive PID control can be realized when asked short, ultra adjust remains in small amount and steady-state error of plus or minus l within±l℃, and the performance of the control scheme, anti-jamming robustness simulation analysis, further verified this control scheme is an ideal intelligent control scheme.KEY WORDS: resistance furnace,stimulation,PID control,fuzzy control,fuzzy self-tuning PID control目录摘要 (I)ABSTRACT (II)目录 (III)1绪论 (1)1.1课题背景及意义 (1)1.2国内外研究现状 (2)1.3本文的研究内容 (2)2自动控制技术的发展及电阻炉温的数学模型 (3)2.1自动控制技术的发展 (3)2.1.1自动控制技术及应用 (3)2.1.2过程控制的发展 (4)2.1.3传统控制方法 (4)2.1.4智能控制 (5)2.2电阻炉温的数学模型 (6)3 PID控制系统 (8)3.1 PID控制的基本理论 (8)3.2 各个参数对PID控制效果的影响 (8)3.3 PID控制器的仿真研究 (9)4 模糊控制系统 (11)4.1模糊控制的起源 (11)4.2 模糊控制的基本理论 (11)4.3 模糊控制器的设计 (12)4.3.1模糊控制器的结构选择 (13)4.3.2 精确量的模糊化 (14)4.3.3 建立模糊控制规则或控制算法 (15)4.3.4 模糊推理 (15)4.3.5 反模糊化 (16)4.3.6 模糊控制表的制定 (16)4.4 模糊控制器的仿真研究 (17)5 模糊PID控制系统 (21)5.1模糊PID控制器的原理 (21)IV5.2 电阻炉温度的模糊PID控制器的设计 (22)5.3模糊自适应PID控制器的仿真研究 (25)5.4与传统PID控制和模糊控制的仿真比较 (28)结论 (30)致谢 (31)参考文献 (32)基于模糊PID的电阻炉温度控制器的设计与仿真研究 11绪论1.1课题背景及意义从20世纪20年代开始,随着科学技术的发展和工业生产水平的提高,电阻炉已经得到了广泛的应用,并且在国民经济中占有举足轻重的地位。
毕业设计(论文)原创性声明和使用授权说明原创性声明本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。
尽我所知,除文中特别加以标注和致谢的地方外,不包含其他人或组织已经发表或公布过的研究成果,也不包含我为获得及其它教育机构的学位或学历而使用过的材料。
对本研究提供过帮助和做出过贡献的个人或集体,均已在文中作了明确的说明并表示了谢意。
作者签名:日期:指导教师签名:日期:使用授权说明本人完全了解大学关于收集、保存、使用毕业设计(论文)的规定,即:按照学校要求提交毕业设计(论文)的印刷本和电子版本;学校有权保存毕业设计(论文)的印刷本和电子版,并提供目录检索与阅览服务;学校可以采用影印、缩印、数字化或其它复制手段保存论文;在不以赢利为目的前提下,学校可以公布论文的部分或全部内容。
作者签名:日期:学位论文原创性声明本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。
除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。
对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。
本人完全意识到本声明的法律后果由本人承担。
作者签名:日期:年月日学位论文版权使用授权书本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。
本人授权大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。
涉密论文按学校规定处理。
作者签名:日期:年月日导师签名:日期:年月日注意事项1.设计(论文)的内容包括:1)封面(按教务处制定的标准封面格式制作)2)原创性声明3)中文摘要(300字左右)、关键词4)外文摘要、关键词5)目次页(附件不统一编入)6)论文主体部分:引言(或绪论)、正文、结论7)参考文献8)致谢9)附录(对论文支持必要时)2.论文字数要求:理工类设计(论文)正文字数不少于1万字(不包括图纸、程序清单等),文科类论文正文字数不少于1.2万字。
中文摘要摘要本论文要做的课题是基于虚拟仪器的加热炉温控系统设计,要求加热炉温度稳定在80℃,允许有±1℃的误差。
本论文采用美国NI公司虚拟仪器开发软件LabVIEW8.5开发出一套低温电加热炉温度控制系统。
系统具体设计方案如下:由传感器测得的炉温信号经过变送环节送给数据采集卡,采集卡对信号进行A/D转换后传输至虚拟仪器,虚拟仪器中的PID算法对信号处理后产生控制信号,再经过采集卡D/A转换后输出控制PWM波产生电路,改变PWM波占空比,产生的PWM波经过光耦MOC3041控制双向可控硅的通断,以此改变加在电阻上的电压,达到温控目的。
本论文首先按照上述设计方案设计了硬件电路,接着进行系统软件的设计。
经过简单的实验,系统可以正常采集数据并显示。
关键词:虚拟仪器,LabVIEW,温控系统,过零调功,PWMIAbstractThe task of this paper is to design a temperature control system based on virtual instrument of the furnace.And the requirements of the furnace temperature is stable at 80℃, allowed error of ± 1℃.This paper adopted LabVIEW8.5, a software to develop the virtual instrument of NI company in America,developed a set of temperature control system of low-power electric heating. The system design are showed as follows: the temperature sensors send the signal of temperature change to the data acquisition card by transmitter, then the signal will be convert to digital signal and be send to the virtual instrument by the data acquisition card , and then the virtual instrument will output control signal after be processed by PID algorithm, and the control signal will be convert to analog signal by the data acquisition card and output to control PWM waves produce circuit to change the duty cycle of PWM waves, then the PWM waves will control the bidirectional thyristor through opticalcoupler MOC3041 to change the voltage in resistance so that the temperature will be changed.This paper designed the hardware circuit in accordance with the above design scheme, followed by the design of the system software. After a simple experiment, the system can acquire and display the datas normally.Key words: virtual instrument, LabVIEW, temperature control system,zero-crossing power adjustment,PWMII目录摘要 (I)ABSTRACT (英文摘要) (Ⅱ)目录 (Ⅲ)第一章绪论 (1)1.1课题的研究的目的和意义 (1)1.2国内外发展状况 (1)1.3本设计要做的工作 (3)第二章虚拟仪器及LabVIEW简介 (4)2.1虚拟仪器的基本概念 (4)2.2虚拟仪器的特点及应用 (4)2.3LabVIEW的含义 (5)2.4LabVIEW的发展 (6)2.5 LabVIEW的结构 (6)2.6LabVIEW的优势 (6)第三章系统总体方案及硬件电路设计 (7)3.1系统总体方案 (7)3.2硬件电路设计 (7)3.2.1 传感器的选型 (7)3.2.2 数据采集卡的选型 (9)3.2.3 PWM波产生电路的设计 (11)3.2.4 交流过零触发PWM脉宽调功原理 (12)第四章温控系统软件设计 (14)4.1登录系统设计 (14)4.2数据采集及处理控制模块的设计 (17)4.2.1 温度信号的采集 (17)4.2.2 采集数据的处理 (19)III4.2.3 PID控制信号的产生 (22)4.3数据存储模块 (24)4.3.1 数据存入文本文件 (24)4.3.2 数据存入TDMS文件 (25)4.4 历史数据查看模块 (26)4.4.1 文本文件查看方式 (26)4.4.2 TDMS文件查看方式 (28)4.5 打印模块 (39)4.6 网络通信模块 (30)4.6.1 DataSocket的数据传输 (31)4.6.2 在Web上发布程序 (33)4.7 加热炉温控系统的集成 (34)总结 (37)参考文献 (38)致谢 (39)IV第一章绪论1.1 课题研究的目的和意义电加热炉被广泛应用于工业生产和科学研究中。
本科毕业论文(设计)( 2014届)基于模糊PID控制电阻炉的温度系统设计与仿真院系电子信息工程学院专业电子信息工程姓名王静指导教师吴剑威副教授2014年4月摘要很多工业生产过程都需要用到电阻炉温度控制设备,电阻炉的温度控制系统存在很多问题,比如超调量比较大,超调时间比较长等问题。
本文以电阻炉温度控制作为研究对象,通过对模糊控制和模糊PID控制方法的分析与研究,使用MTALAB中的Simulink和Fuzzy工具箱,进行仿真研究。
通过将模糊PID控制方法应用在电阻炉温度控制系统中,可以克服温度控制系统中存在的超调量比较大,超调时间比较长等问题,并且提高系统的稳定性。
关键词:温度控制系统;电阻炉炉;模糊控制;MATLAB;PID控制AbstractNow, a lot of industrial production process requires the use of boiler equipment,temperature control system of boiler is serious, it is difficult to establish accurate mathematical model. I performed simulation studies, taking the electric fuzzy control method, using MATLAB in the Simulink and the Fuzzy toolbox simulation analysis. Through the fuzzy control method is applied in the boiler temperature control system,we can overcome the serious lag phenomenonthe in the temperature control system, and can improve the stability of the system.The following is the chapter division:The first chapter introduces the research background and significance, the development status of the domestic and foreign boiler temperature control system, the significance of this topic and the main work of this paperThe second chapter introduces the development design of temperature control system for electric boiler characteristics, the fuzzy controller and the temperature control system.The fifth chapter is a brief summary of the whole thesis.Keywords: temperature-control system; electric boiler; fuzzy control; MATLAB1 绪论1.1 课题的提出和意义温度是人类在生产过程和科学实验中非常普遍而又非常重要的参数。
长春工业大学毕业设计、毕业论文题目电阻加热炉温度控制系统学院人文信息学院专业班级电气工程及其自动化070922班指导教师王霆姓名刘塞北2011年6月3日摘要如今电阻炉被广泛应用于各大工业领域,通过单片机的实时控温来提高劳动生产效率和产品质量,同时对节能环保也有着重大意义。
本此设计的核心处理器为AT89C2051单片机,用其对电阻炉温度进行检测和控制。
选择了K型热电偶作为金属传感器,其优点是精度高成本低,并选择串行E²PROM 24C01来存储测量数据和调控参数,这样就确保断电后数据仍能被保存。
检测信号经运算放大器放大后进入多路开关,多路开关轮流检测3个通道的温度信号后轮流输出给A/D转换器,最后将电压信号转变为频率信号传输给单片机进行处理。
控制方式则为调功控制,通过使用光耦合双向可控硅对双向导通晶闸管的导通百分比进行控制,进而对电阻丝的功率进行调节。
在键盘上输入预设温度后,单片机通过控制双向导通晶闸管的导通百分比对电阻丝的功率进行调节,使温度控制在预设值,同时在LED显示屏上显示当前炉内温度。
关键词:AT89C2051 频率转换调整AbstractNow resistance heater is widely used in each industrial fields. Microcontroller is used to control temperature to improve production efficiency and product quality,and it is important to the energy conservation and environmental protection.The design of the core processor as AT89C2051 microcontroller,with its to there sistance furnace temperature testing and control.Choose K type thermocouple as metal sensor,its advantage is low cost, high precision and choose 24C01 E²PROM serial to storage measurement data and control parameters,thus ensure after power failure data can still be saved. Detection signal amplifier amplification by entering multiple switch after, multi-channel switch turns detection three channels temperature signal after take turns output to A/D converter, finally the voltage signal into frequency signal transmission give microcontroller to undertake handling. Control mode is adjustable power control, through the use of optical coupling bidirectional thyristor of double guide the thyristor controlled conduction percentage, and the power of resistance wire adjusted. On the keyboard input preset temperature, SCM through control double guide the thyristor conduction percentage of power of resistance wire on the adjustment, make temperature control in default, while in the LED display on display the current inside-heater temperature.Keywords:AT89C2051 frequency convert adjust目录第1章概述 (1)1.1 电阻加热炉自动控温系统的研究背景及意义 (1)1.2 目前国内外研究现状 (1)1.3 论文研究的主要内容 (2)第2章方案论证 (3)2.1 系统设计要求 (3)2.2 系统方案论证 (3)2.2.1 模数转换器的选择论证 (4)2.2.2 温度检测的选择论证 (5)2.2.3 存储器扩展电路的选择论证 (6)2.2.4 键盘的选择论证 (8)2.2.5 输出控制电路的选择论证 (8)2.2.6 显示器的选择论证 (9)第3章系统硬件设计 (11)3.1 控制单元的设计 (11)3.2 模数转换电路的设计 (12)3.3 温度检测电路的设计 (14)3.4 存储器扩展电路的设计 (15)3.5 显示电路的设计 (16)3.6 键盘电路的设计 (18)3.7 输出控制电路的设计 (19)3.8 电源电路的设计 (21)第4章系统软件设计 (23)4.1 温度检测流程图 (23)4.2 软件的主程序流程图 (24)4.3 输入输出程序流程图 (25)4.4 调功程序流程图 (25)4.5 温度显示流程图 (26)第5章控制算法及滤波 (27)5.1 数学建模与控制算法 (27)5.1.1 数学建模 (27)5.1.2 控制算法 (28)5.2 数字滤波 (30)5.2.1 数字滤波的介绍 (30)5.2.2 数字滤波的设计 (30)总结 (32)致谢 (33)参考文献 (34)附录1:电阻式锅炉的自动控温系统原理图 (35)附录2:电阻式锅炉的自动控温系统程序清单 (36)第1章概述1.1 电阻加热炉自动控温系统的研究背景及意义温度是科学实验和生产过程中十分普遍但又非常重要的物理参数。
目录摘要 (1)关键词 (1)Abstract (1)Keywords (1)引言 (1)1炉温控制系统结构及工作原理 (2)2模糊控制器的设计 (3)2.1输入、输出的模糊化 (3)2.2模糊控制规则 (4)2.3模糊推理 (5)2.4模糊判决 (5)2.5数字PID算法 (5)3利用MATLAB模糊逻辑工具箱设计模糊控制器过程 (6)3.1利用MATLAB模糊推理工具箱编辑模糊控制器过程 (6)3.1.1编辑模糊变量及变量的隶属度函数 (6)3.1.2编辑输入、输出变量的隶属函数 (6)3.1.3编辑模糊控制规则 (6)3.1.4模糊控制的生成 (7)3.2仿真模型的建立 (7)3.2.1对仿真结构图进行说明 (7)3.2.2注意仿真前,先进行部分设置 (8)3.3仿真结果 (8)4MATLAB与VC++的混合编程介绍 (9)5温控制系统软件的介绍 (11)5.1软件实现功能 (11)5.2界面简介 (11)6模糊PID控制ActiveX控件的编制 (12)致谢 (13)参考文献 (13)附录A (13)基于模糊PID控制的电阻炉温度控制系统摘要:电阻炉是一个特性参数随炉温变化而变化的被控对象,炉温控制具有大惯性、大滞后、时变性的特点。
传统PID难以达到较高要求,故本文应用一种参数自适应模糊PID 控制方法,根据系统误差E和误差变化率EC对参数的要求在线整定PID参数KP、KI、KD。
在用SIMULINK仿真过程中,该控制器比常规PID具有良好的动、静态特性。
简介了Matlab与Visual C++联合编程技术,采用Matlab与Visual C++联合编程和ActivcX技术将模糊PID控制ActivcX控件嵌入VC控制系统中,可使炉温准确快速地跟随设定值。
另外,该系统可实时直观显示温度值和炉内加热电压值。
关键词:电阻炉温度控制系统 ; 自适应 ; 混合编程 ; ActiveXThe Application of Fuzzy-PID inTemperature Control of Electric Resistance FurnaceStudent majoring in Automation Zhao LiTutor Shi XunwenAbstract:As the model parameters of resistance furnace vary with temperature , it show some character of big inertial,pure delay and inconstancy. The traditional method can't meet the higher technological requirements. Therefore,this paper applies a Parameter Self-tuning Fuzzy PID Controller's method to rectify the parameters of PID controller online to meet the command in the case with variational error and its variance ratio .Based on the simulink, a powerful simulation platform, the practice proves that the method has better steady accuracy and tracking performance than the traditional.The ActivcX along with the union programming technology of Matlab and Visual C++ was introduced and be used to realized the Fuzzy-PID controller, which can make the initial temperature of electric resistance furnace followed by current temperature quickly and exactly. Therefore, the temperature and voltage are also applied in the control system pane.Key words:Temperature Control system of Electric Resistance Furnace; self-adaptation; union programming ; ActiveX引言PID控制具有结构简单、稳定性能好、可靠性高等优点,尤其适用于可建立精确数学模型的确定性控制系统。
毕业设计(论文)-基于单片机的电阻炉温度控制系统设计内蒙古科技大学本科生毕业设计说明书(毕业论文)题目:基于单片机的电阻炉温度控制系统设计学生姓名:学号:0605112307专业:测控技术与仪器班级:测控06-3班指导教师:基于单片机的电阻炉温度控制系统设计摘要电阻炉作为工业炉窑中的一种常用加热设备被广泛应用于工业生产中。
对电阻炉温度控制精确与否将直接影响到产品的质量和生产效率。
电阻炉是一种具有纯滞后的大惯性系统,开关炉门、加热材料、环境温度以及电网电压等都影响控制过程,传统的电阻炉控制系统大多建立在一定的模型基础上,难以保证加热工艺要求。
本文将PID控制算法引入到传统的电阻炉控制系统中,借此提高其控制效果。
设计一个控制精度高、运行稳定的电阻炉温度控制系统是很有必要的。
本设计是以电阻炉为被控对象,单片机为核心设计的一种控制系统。
其中以K型热电偶作为温度传感器,STC89C52单片机为控制核心,PID运算规律作为控制算法。
文中详细介绍了该控制系统的硬件电路设计、软件设计及PID控制算法。
在对电阻炉温度控制系统的研究之后,本设计主要完成温度控制系统的总体方案设计、硬件原理图的绘制、信号调理电路的设计、固态继电器的应用及温度控制电路的设计同时也完成了系统程序设计,并通过软件完成了对温度的控制功能。
关键词:电阻炉;温度控制;PID算法;单片机The design of resistor furnace temperature control systembased on singlechipAbstractResistance furnace was widely used in industrial production, the effect of the temperature control of Resistance furnace has a direct impact on product quality and productivity.Therefore, the design of a high-precision control and stable operation of the resistance furnace temperature control system has a high application value.In this design , the resistance furnace as a controlled object, singlechip as the design of a control unit.Which type of thermocouple temperature sensor as K, STC89C51 microcontroller as control core and PID control algorithm for operation rule. This paper introduces the control system of the hardware circuit design, software design and the PID control algorithm.On the resistance furnace temperature control system, the design of the main completed the overall scheme of the temperature control system design, hardware circuit principle diagram, the signal of circuit, the application of solid state relays and temperature control circuit design of the system,meanwhile finish the program design, through the software control to complete the function of temperature control.Key words: resistance furnace; temperature control; PID control;single-chip microcomputer目录摘要 (I)Abstract .................................................................................................................................... I I 目录 . (III)第一章绪论 (1)1.1课题研究的背景及意义 (1)1.2国内外研究概况及发展趋势 (2)1.3智能温度控制技术的发展 (2)1.3.1 PID控制 (2)1.3.2 模糊控制 (4)1.3.3 模糊自整定PID控制 (5)1.3.4 神经网络控制系统 (5)1.3.5 专家控制系统 (6)第二章电阻炉温度控制系统总体方案设计 (8)2.1基于虚拟仪器的电阻炉温度控制 (8)2.2基于PLC的电阻炉温度控制 (8)2.3单片机与FPGA综合实现电阻炉的温度控制 (10)2.4基于单片机的电阻炉温度控制系统 (10)第三章硬件电路设计 (13)3.1温度检测电路 (13)3.1.1 温度传感器 (13)3.1.2 冷端温度补偿 (14)3.2 放大电路 (15)3.3 ADC0832简介 (16)3.3.1ADC0832引脚如图 (16)3.3.2单片机对ADC0832 的控制原理 (17)3.4 STC89C52单片机 (19)3.4.1单片机简介 (19)3.4.2管脚说明 (20)3.4.3单片机的复位电路 (22)3.4.4单片机的晶振电路 (23)3.5人机接口电路 (23)3.5.1 LCD液晶显示 (23)3.5.2 键盘 (29)3.6温度控制电路固态继电器及应用 (30)3.7报警电路 (32)第四章软件设计 (34)4.1主程序设计 (34)4.2 子程序设计 (35)4.2.1 A/D采样子程序 (35)4.2.2线性化 (35)4.2.3标度变换 (37)4.2.4键盘子程序 (38)4.2.5显示子程序 (38)4.2.6 PID子程序 (39)4.2.7 PWM控制子程序 (43)第五章系统调试 (45)总结 (48)参考文献 (49)附录A 硬件原理图 (51)附录B 源程序 (52)致谢 (64)第一章绪论1.1课题研究的背景及意义随着社会的发展,自动控制越来越成受到人们关注,自动调节电阻炉温度系统得到了广泛的应用。
毕业设计论文基于虚拟仪器的电阻炉温度控制系统摘要电阻炉被广泛地应用在工业生产中,它的温度控制效果直接影响到生产效率和产品质量,因而对温度控制系统的要求很高。
目前工业电阻炉通常采用常规PID控制,PID 控制器是最早发展起来的控制策略之一,具有结构简单、容易实现、控制效果好、鲁棒性强等特点,被广泛应用于工业过程控制,尤其适用于可建立精确数学模型的确定性控制系统,在工业过程控制中至今仍得到广泛应用。
但是工业电阻炉的温度控制具有非线性、大惯性、大滞后等特点,难以对其建立精确的数学模型,因而常规PID控制难以取得良好的控制效果;本文采用增量式PID控制算法来进行PID参数的自动整定。
作为计算机技术和现代仪器技术相结合的产物,虚拟仪器实现了在传统测试理论和控制方法上的革命性突破。
与传统仪器相比,虚拟仪器具有功能更丰富、处理速度更快、测量效率更高、可扩充性更好的优点。
本文把虚拟仪器与智能温度控制相结合,用LabVIEW开发了一套自整定的PID控制算法的温度控制系统。
论文概述了智能温度控制的发展与现状,介绍了虚拟仪器的发展及其突出特点。
详细地论述了系统的设计与实现方法,其中包括数据采集、数据处理、数字滤波等功能模块的设计与实现。
关键词:虚拟仪器;PID控制器;自整定Resistance Furnace Temperature Control SystemBased on Virtual InstrumentAbstractResistance furnace was widely used in industrial production, whose effect of the temperature control productivity and product quality, thus a structure, easy to implement, effective to control;it also industrial process control, in particular to establish a precise mathematical model, and industrial process control is still widely used. However, the industry's Resistance furnace with temperature control of nonlinear, large inertia, the characteristics of large time delay, it is difficult to establish its precise mathematical model of conventional PID control , thus it is difficult to achieve good control effect; In this paper, we use incremental PID control algorithm for auto-tuning parameters.As product of combination of the computer technology and modern equipment technology,it make a revolutionary breakthrough from traditional test and measurement methods pared with traditional instruments, virtual instrument this paper, the virtual instrument and intelligent temperature control is combined, we use LabVIEW to develop a set of self-tuning PID control algorithm of the temperature control system. Paper provides an overview of the development of intelligent temperature control and the status , describes the development of virtual instrumentation and its salient features. Detailing the system design and implementation, including data acquisition, data processing, digital filtering and other functions of the Design and Implementation of modules.Keywords: virtual instrument; PID controller; self-tuning目录摘要 (I)Abstract .................................................................................................................................... I I1.1 本课题的背景及意义 (1)1.2论文研究的主要内容 (3)1.3文研究的重点和难点 (3)第二章虚拟仪器及应用简介 (4)2.1虚拟仪器的概念 (4)2.2虚拟仪器的特点 (5)2.3虚拟仪器的组成 (5)2.4虚拟仪器的开发平台—LabVIEW (6)2.5 LabVIEW的程序构成 (8)2.6虚拟仪器与传统仪器的比较 (8)2.7虚拟仪器的应用 (9)第三章温度传感器的分类及温度信号的检测 (13)3.1炉温度特性及其对象建模 (13)3.2 温度传感器的选用 (14)3.3炉热电偶测温 (17)3.4偶测温误差分析 (18)第四章PID控制算法简介 (20)4.1 PID控制和智能控制的介绍 (20)4.2数字PID控制算式 (23)4.3数字PID控制算式的改进 (26)4.4增量式PID 控制器的程序流程图 (30)第五章电阻炉温度控制系统的硬件设计 (32)5.1控制系统的功能及结构 (32)5.2数据采集卡 (33)5.3系统设计原则 (35)第六章电阻炉温度控制系统的软件设计 (36)6.1软件模块化设计方法概述 (36)6.2电阻炉温度控制系统软件总体设计 (37)6.3密码验证模块 (37)6.4.1 AD和DA转换 (38)6.4.2数据采集 (39)6.5信号处理模块 (40)6.6 PID控制器模块 (42)第七章系统调试 (44)参考文献 (47)附录A: (49)附录B: (52)致谢 (53)第一章引言1.1 本课题的背景及意义随着工业的发展,对金属材料的性能提出了更多更高的要求,因而热处理技术也向着优质、高效、节能、无公害方向发展。
摘要随着社会的发展,自动控制越来越成为人们关注的焦点,自动调节电阻炉温度系统也备受关注--。
其中微机及其应用已经成为高、新科学技术的重要内容和标志之一,它在国民经济的各个领域正在发挥着引人注目的作用。
微机控制的电阻炉温度控制系统实际上就是一个智能控制系统,是一种能耗相对来说比较低的温度控制系统。
本人采用AT89C51单片微机对电阻炉的加热过程进行控制。
使用热电偶作为温度传感器把热信号转变成电信号,电信号再经过放大,经过模数转换再输入到CPU。
控制器采用PID控制算法,温度控制的原理是通过调整晶闸管的导通时间来调节加热主回路的有效电压,从而达到温度控制的目的。
系统由AT89C51单片微机、温度传感器、A/D转换器、键盘及显示电路、晶闸管触发电路等组成的控制器和被控对象电阻炉构成一个闭环控制系统[1]。
系统控制程序采用模块化设计结构,主要包括主程序、中断服务子程序、控制算法子程序等。
系统采用过零触发等技术,省去了传统的D/A转换元件,简化了电路,并且提高了系统的可靠性。
同时,系统可以实时控制电阻炉的实际温度。
关键词:AT89C51;热电偶;晶闸管; PIDABSTRACTWith the development of the society,the autocontrol becomes more and more important.The autocontrol of the resistance furnace is highly anticipated.Microcomputer and its application has become one of the most important contents and signs in the field of High-scientific technology and new scientific technology, which plays an attractive role in every field in our national economy.As a matter of fact, Resistance Temperature Control System which is operated by microcomputer is an Intellectual Control System.In other words,it is a Temperature Control System which consumes less than others.The AT89C51 single microcomputer is adopted to control the heating process of resistance,use as a temperature transducer to turn the heating single into electing single,enlarge the electrical single,transformed through simulate numbers,then input CPU.Controllers use PID control calculation.The principle of temperature control is to adjust and heat the effective voltage of the main circuit through regulate the diversified time of transistor,therefore,it carries out the purpose of controlling the temperature.System as controlled resistance makes up an cycle control system.Control procedure of system adopts the structure of designing module,including main procedure,subsiding of suspending serves and subsidiary of control calculation etc.System adopt A.C、passes through zero etc technologies,omit traditional D/A transform components,simplify the circuit,and improve the dependability of system.Meanwhile,system also can control the real temperature of resistance at the right moment.Keywords:AT89C51;thermocouple;thyristor;PIDII目录第一章绪论 (1)1.1课题研究的背景及意义 ............................................................. - 1 -1.2 国内外研究现状 ........................................................................ - 2 -1.3 本文的主要内容 ........................................................................ - 3 - 第二章电阻炉温度控制系统总体设计方案 .......................................... - 4 -2.1系统原理 ..................................................................................... - 4 -2.2方案比较 ..................................................................................... - 6 -2.3系统方案的论证 (6)第三章系统硬件设计 (8)3.1 温度检测电路 (8)3.1.1 热电偶冷端温度补偿 (9)3.1.2 测量放大电路 (9)3.1.3 保护电路 (10)3.2 单片机的选型 .......................................................................... - 10 -3.3 EEPROM存储器的扩展设计 ..................................................... - 11 -3.4 A/D转换电路设计 (13)3.4.1隔离放大器的设计 ....................................................... - 14 -3.4.2 DAC7521数模转换接口 ............................................... - 16 -3.5 键盘及显示电路设计 (16)3.5.1 键盘接口电路设计 (16)3.5.2 显示电路设计 .............................................................. - 18 -3.6 可控硅调功控温 ...................................................................... - 18 -3.6.1 过零触发调功器的组成 .............................................. - 19 -3.6.2 可控硅调功主要电路介绍 .......................................... - 19 -3.7 与上位机通信模块 .................................................................. - 21 -3.7.1 通信接口MAX485 ......................................................... - 21 -Ⅲ3.7.2 下位机通信接口电路 .................................................. - 22 -3.8 掉电检测与保护电路 .............................................................. - 23 -3.9 晶闸管过零检测与触发电路…………………………………….23-24 -3.10 看门狗电路的设计 (24)第四章控制算法研究 (27)4.1 传统的PID算法 ...................................................................... - 28 -4.2 积分分离PID算法 .................................................................. - 29 -4.3 系统仿真分析 .......................................................................... - 30 - 第五章系统软件设计 (31)5.1 系统主程序设计 ...................................................................... - 32 -5.2 系统的控制程序 (33)5.3 积分分离PID控制 (34)5.4 采样子程序 .......................................................................... - 36 -35 结论 .......................................................................................................... - 38 - 致谢 (38)参考文献 .................................................................................................. - 40 - 附录 (40)Ⅲ第一章绪论热处理是提高金属材料及其制品质量的重要手段。
毕业设计论文基于虚拟仪器的电阻炉温度控制系统摘要电阻炉被广泛地应用在工业生产中,它的温度控制效果直接影响到生产效率和产品质量,因而对温度控制系统的要求很高。
目前工业电阻炉通常采用常规PID控制,PID 控制器是最早发展起来的控制策略之一,具有结构简单、容易实现、控制效果好、鲁棒性强等特点,被广泛应用于工业过程控制,尤其适用于可建立精确数学模型的确定性控制系统,在工业过程控制中至今仍得到广泛应用。
但是工业电阻炉的温度控制具有非线性、大惯性、大滞后等特点,难以对其建立精确的数学模型,因而常规PID控制难以取得良好的控制效果;本文采用增量式PID控制算法来进行PID参数的自动整定。
作为计算机技术和现代仪器技术相结合的产物,虚拟仪器实现了在传统测试理论和控制方法上的革命性突破。
与传统仪器相比,虚拟仪器具有功能更丰富、处理速度更快、测量效率更高、可扩充性更好的优点。
本文把虚拟仪器与智能温度控制相结合,用LabVIEW开发了一套自整定的PID控制算法的温度控制系统。
论文概述了智能温度控制的发展与现状,介绍了虚拟仪器的发展及其突出特点。
详细地论述了系统的设计与实现方法,其中包括数据采集、数据处理、数字滤波等功能模块的设计与实现。
关键词:虚拟仪器;PID控制器;自整定Resistance Furnace Temperature Control SystemBased on Virtual InstrumentAbstractResistance furnace was widely used in industrial production, whose effect of the temperature control has a direct impact on productivity and product quality, thus a high quality of temperature control system is demanded. Industry Resistance furnace used to use conventional PID control, PID controller is one of the earliest control strategies and it is simple in structure, easy to implement, effective to control;it also has the characteristics of robustness.So it is widely used in industrial process control, in particular to establish a precise mathematical model, and industrial process control is still widely used. However, the industry's Resistance furnace with temperature control of nonlinear, large inertia, the characteristics of large time delay, it is difficult to establish its precise mathematical model of conventional PID control , thus it is difficult to achieve good control effect; In this paper, we use incremental PID control algorithm for auto-tuning parameters.As product of combination of the computer technology and modern equipment technology,it make a revolutionary breakthrough from traditional test and measurement methods .Compared with traditional instruments, virtual instrument has a more feature-rich, faster processing speed, more effective measurement, the advantage of better scalability.In this paper, the virtual instrument and intelligent temperature control is combined, we use LabVIEW to develop a set of self-tuning PID control algorithm of the temperature control system. Paper provides an overview of the development of intelligent temperature control and the status , describes the development of virtual instrumentation and its salient features. Detailing the system design and implementation, including data acquisition, data processing, digital filtering and other functions of the Design and Implementation of modules.Keywords: virtual instrument; PID controller; self-tuning目录摘要 (I)Abstract (II)第一章引言 (1)1.1 本课题的背景及意义 (1)1.2论文研究的主要内容 (3)1.3文研究的重点和难点 (3)第二章虚拟仪器及应用简介 (4)2.1虚拟仪器的概念 (4)2.2虚拟仪器的特点 (5)2.3虚拟仪器的组成 (5)2.4虚拟仪器的开发平台—LabVIEW (6)2.5 LabVIEW的程序构成 (7)2.6虚拟仪器与传统仪器的比较 (8)2.7虚拟仪器的应用 (9)第三章温度传感器的分类及温度信号的检测 (12)3.1炉温度特性及其对象建模 (12)3.2 温度传感器的选用 (14)3.3炉热电偶测温 (17)3.4偶测温误差分析 (18)第四章PID控制算法简介 (20)4.1 PID控制和智能控制的介绍 (20)4.2数字PID控制算式 (23)4.3数字PID控制算式的改进 (26)4.4增量式PID 控制器的程序流程图 (30)第五章电阻炉温度控制系统的硬件设计 (32)5.1控制系统的功能及结构 (32)5.2数据采集卡 (33)5.3系统设计原则 (35)第六章电阻炉温度控制系统的软件设计 (36)6.1软件模块化设计方法概述 (36)6.2电阻炉温度控制系统软件总体设计 (37)6.3密码验证模块 (37)6.4数据采集模块 (38)6.4.1 A/D和D/A转换 (38)6.4.2数据采集 (39)6.5信号处理模块 (40)6.6 PID控制器模块 (42)第七章系统调试 (44)参考文献 (47)附录A: (49)附录B: (52)致谢 (53)第一章引言1.1 本课题的背景及意义随着工业的发展,对金属材料的性能提出了更多更高的要求,因而热处理技术也向着优质、高效、节能、无公害方向发展。
在钢铁、机械、石油化工、电力、工业炉窑等工业生产中,温度是极为普遍又极为重要的热工参数之一,随着工业过程对控温精度要求的提高,测温范围也随之变广,因此温度控制技术的研究是一个重要的研究课题。
在工业电炉控制中温度的控制是十分重要的“温控过程要严格按照事先设定的温度曲线运行,如果意外掉电导致加热终止或控温精度低,都会导致工业加热的失败”,因此研究以工业电阻炉为控制对象,以智能仪表为控制工具的温控系统具有一定的实际应用价值。
随着计算机、通讯技术在工业自动化系统的广泛应用,工业仪表的功能越来越强大,在高新技术的推动下,作为工业主要技术工具的控制仪表正跨入真正的数字化、智能化、网络化时代。
不仅各类测控设备是数字化的,而且可通过网络将分散的控制装置和各类智能仪表连接起来,实现工业生产过程的集散监控管理。
电阻炉是一种具有纯滞后的大惯性系统,开关炉门、加热材料、环境温度以及电网电压等都影响控制过程,传统的电阻炉控制系统大多建立在一定的数学模型基础上,对被控对象中的非线性、时变性及随机干扰无能为力。
电阻炉是热处理生产中应用最广的加热设备,这样加热时均温过程的测量与控制就成为关键性的技术。
首先,控温精度要高。
其次,当生产环境发生变化而影响到控温精度时,要有合适的手段进行调整以达到精度要求。
而且,为了方便进行工艺的研究,需要能保存温度数据。
最后,根据生产中的实际情况,电热烧结和控制设备要求操作方便,易于维护,成本较低等等。
电阻炉是利用电流通过电热体元件将电能转化为热能来加热或熔化工件物料的热加工设备。
电阻炉和火焰比,热效率高,可达50%-80%,热工制度容易控制,劳动条件好,炉体寿命长,适用于要求较严的工件的加热,但耗电费用高。
按传热方式,电阻炉分为辐射式电阻炉和对流式电阻炉。
辐射式电阻炉以辐射传热为主,对流传热作用较小;对流式电阻炉以对流传热为主,通常称为空气循环电阻炉,靠热空气进行加热,炉温多低于650℃。
按电热产生方式,电阻炉分为直接加热和间接加热两种。
在直接加热电阻炉中,电流直接通过物料,因电热功率集中在物料本身,所以物料加热很快,适用于要求快速加热的工艺,例如锻造坯料的加热。
这种电阻炉可以把物料加热到很高的温度,例如碳素材料石墨化电炉,能把物料加热到超过2500℃。
直接加热电阻炉可作成真空电阻加热炉或保护气体电阻加热炉,在粉末冶金中,常用于烧结钨、钽、铌等制品。
采用这种炉子加热时应注意:(1)物料加热均匀,要求物料各部位的导电截面和电导率一致;(2)由于物料自身电阻相当小,为达到所需的电热功率,工作电流相当大,因此送电电极和物料接触要好,以免起电弧烧损物料,而且送电母线的电阻要小,以减少电路损失;(3)在供交流电时,要合理配置短网,以免感抗过大而使功率因数过低。