摘要
模糊PID的温度控制系统具有真正的智能化和灵活性,越来越多的温度控制系统都基于模糊PID算法而设计。随着控制对象变得复杂,应用常规PID温度控制精度和鲁棒性降低。当控制对象很复杂的情况下,常规PID温度控制器已经不再适用了,为了提高对复杂系统的控制性能,要使用模糊PID温度控制器。一种将PID控制与模糊控制的简便性、灵活性、以及鲁棒性融为一体,构造了一个模糊PID温度控制器。
本文设计了一种基于模糊PID的温度控制系统,以AT89C51单片机为核心,主要做了如下几方面的工作:首先介绍了模糊PID控制理论基础,其次进行系统的硬件设计以及硬件选择,最后进行系统的软件设计以及仿真。 关键词:模糊PID;AT89C51单片机;温度控制;仿真
Abstract
Fuzzy PID temperature control system with real intelligence and flexibility, more and more temperature control systems are designed based on fuzzy PID algorithm.With the control object becomes complicated, using conventional PID temperature control accuracy and robustness of the lower.When the control object is a complex situation, conventional PID temperature controller is no longer applied, in order to improve the control performance of complex systems, to use the fuzzy PID temperature controller.A way to PID control and fuzzy control of simplicity, flexibility, and robustness of the integration, we constructed a fuzzy PID temperature controller.
This design presents a fuzzy-based PID temperature control system to AT89C51 SCM,made the following main areas of work:first introduce the theory of fuzzy PID control,second for the hardware design and hardware design,and finally to the system software design and simulation.
Keywords: Fuzzy PID; AT89C51 SCM; temperature control; simulation
目 录
第一章 绪论........................................................ 1
1.1选题背景及其意义............................................. 1 1.2概述......................................................... 1 1.3温度测控技术的发展与现状..................................... 1
1.3.1定值开关控温法 ......................................... 2 1.3.2 PID线性控温法 ......................................... 2 1.3.3智能温度控制法 ......................................... 2
第二章 模糊PID控制理论............................................ 4
2.1PID控制器.................................................... 4
2.1.1 PID控制的发展 ......................................... 4 2.1.2 PID控制理论 ........................................... 4 2.1.3 PID控制算法 ........................................... 5 2.2模糊控制原理................................................. 7
2.2.1模糊控制系统的基本概念 ................................. 7 2.2.2模糊控制系统的组成 ..................................... 7 2.2.3模糊控制的基本原理 ..................................... 8 2.3模糊PID复合控制算法......................................... 9
2.3.1模糊PID复合算法 ....................................... 9 2.3.2模糊PID算法运用 ...................................... 10
第三章 模糊PID温度控制系统硬件设计............................... 14
3.1系统硬件电路构成............................................ 14 3.2系统设计原则及系统总电路图.................................. 14
3.2.1系统设计原则 .......................................... 14 3.2.2系统总电路图 .......................................... 15 3.3 单片机的选择 ............................................... 15 3.4温度传感器的选择............................................ 19
3.4.1 DS18B20简介 .......................................... 19
3.4.2 DS18B20的性能特点 .................................... 20 3.4.3 DS18B20的管脚排列 .................................... 21 3.4.4 DS18B20的内部结构 .................................... 21 3.4.5 DS18B20的测温原理 .................................... 22 3.5数码管输出.................................................. 22 3.6键盘接口电路................................................ 23 3.7蜂鸣电路.................................................... 24 3.8外部存储模块................................................ 24 3.9电机驱动模块................................................ 25 第四章 系统软件设计............................................... 27
4.1主程序模块.................................................. 27 4.2温度传感器DS18B20模块...................................... 27 4.3LED显示模块................................................. 29 4.4键盘控制模块................................................ 29 第五章 系统的仿真................................................. 31
5.1仿真工具.................................................... 31 5.2 MATLAB及其模糊逻辑工具箱和仿真环境......................... 31
5.2.1MATLAB概况 ............................................ 31 5.2.2模糊逻辑工具箱 ........................................ 31 5.3模糊PID的仿真.............................................. 32
5.3.1控制对象模型 .......................................... 32 5.3.2MATLAB仿真 ............................................ 33 5.4仿真结果与分析.............................................. 35 结论............................................................... 37 参考文献........................................................... 38 附 录............................................................. 39
附件一:部分源程序 .............................................. 39
1.DS18B20相关子程序 ........................................ 39 2.LED相关子程序 ............................................ 39