1、摘 要本设计完成基于单片机的模糊温度控制器的软硬件设计。本设计完成了将模糊控制与PID控制相结合方法用于工业温度控制领域,实现了对大滞后、慢时变、非线性的复杂系统的控制。在硬件方面,Fuzzy-PID温控器采用单片机作为控制核心,采用Pt100作为温度传感器,设计了温度测量转换电路,模/数转换器TLC2543实现温度数据采集。HD7279构成良好的人机接口模块,完成温度设定值的输入和温度数据实时显示。输出通道由D/A转换器和AD694芯片组成,将控制量转换为现场总线标准的电流信号420mA。在软件方面,本设计完成了并行Fuzzy-PID复合控制器的主流程图和各子流程图。编写的软件程序经过编译连
2、接无误。在设计过程中,采用Multisim软件对Pt100的测温电路进行了仿真,实现了温度采集精度的设计要求。本设计中的模糊PID控制器,既具有模糊控制灵活、适应性强的优点,不依赖于控制对象有精确的数学模型,同时又具有控温精度高,动态性能好、受系统参数变化影响小的优点。关键词:Pt100;温度控制;单片机;模糊-PID控制;Multisim ABSTRACTThis design has completed the design of software and hardware of the Fuzzy-PID temperature controller based on MCU. It h
3、as made the combination method of Fuzzy control and the PID control used in the industry temperature control domain, which has realized the control of complex system of long-time delay, slow time-variable, and the non-linear. In the hardware design, Fuzzy-PID temperature controller takes SMC as the
4、core of the control, adopts Pt100 as the temperature sensor, and has designed the temperature signal measurement and convert circuit; ADC TLC2543 is used to finishi the temperature data gathering. The friendly man-machine interface module is composed of HD7279, which can carry on the functions of th
5、e input of the temperature setting value and the real time display of temperature data. The output channel is composed of DAC and AD694, which can convert the control quantity into fieldbus standard current signal 420mA. In the software design, this design has completed the main flow chart of the pa
6、rallel Fuzzy-PID compound controller and each sub-flow chart. The procedure of software is unmistakable after compilation and link.In the design process, it adopts Multisim software to carry on the simulation of the Pt100 temperature signal measurement and convert circuit, and the design has met the
7、 requests of temperature measurement precision. The Fuzzy-PID controller in this design, not only has the characterics of flexibility and adaptability of Fuzzy control, which does not depend on the controlled object that has the precise mathematical model, but also has advantages of high precision t
8、emperature control, and the good dynamic performance, which is affected little by the change of system parameters.Key words: Pt100; Temperature Control; SMC; Fuzzy-PID Control; MultisimII 目 录Abstract 第1章 引言11.1 序言11.2 模糊控制的现状研究11.3 选题的目的、意义和主要内容21.3.1 本课题研究的目的、意义21.3.2本设计的主要内容和结构3第2章 模糊控制的理论研究42.1 模
9、糊控制的理论根底42.1.1 模糊集合42.1.2 模糊集合的运算52.1.3 模糊关系52.1.4 模糊关系的合成62.1.5 模糊算子72.2 模糊控制系统72.2.1 模糊控制的起源72.2.2 模糊控制系统的组成82.2.3 模糊控制器82.2.4 模糊控制器结构102.3 模糊控制器的设计102.3.1 确定模糊控制器的结构112.3.2 建立模糊控制规那么112.3.3 确定模糊变量的赋值表122.3.4 精确量的模糊化132.3.5 根本模糊查询表的建立142.4 本章小结15第3章 硬件结构163.1 AT89S52单片机163.1.1 定时器/计数器的结构173.1.2 MC
10、S-51中断系统的结构183.2 热电阻Pt100测温原理和测温电路的设计183.3 A/D通道电路的设计203.4 D/A通道电路的设计213.5 电源设计223.6 按键及显示驱动芯片HD7279A电路的设计233.7 420mA电流输出接口电路243.8 本章小结25第4章 系统软件架构264.1 模糊PID控制的软件实现264.2 模糊-PID复合控制的运算和输出274.2.1 模糊控制的程序流程图和算法根底274.2.2 经典PID控制:274.3 按键、显示运算子程序314.4 信号采集子程序324.5 本章小结33第5章 电路仿真345.1 Multisim软件的生产和开展345.1.1 Multisim软件的起源345.1.2 Multisim系列软件的形成:345.1.3 Multisim10仿真特点345.2 Multisim10仿真分析过程355.3 硬件调试及仿真355.3.1 仿真根本参数设置355.3.2 仿真原理图:365.3.3 仿真结果及分析375.4 本章小结38结束语39参考文献40致谢41附录A42附录B43 第1章 引 言1.1 序言1965年美国的伯克利加州大学教授扎德发表了著名的论文FuzzySets,提出了模糊性问