摘 要
传统PID控制是经典控制理论中的一种比例微分积分控制,是工业中应用最广泛的控制方法。但是随着社会和生产的发展,对自动控制的响应速度,系统稳定性和适应能力有了更高的要求。
要对温度进行控制,有很多方案可选。PID控制简单且容易实现,在大多数情况下能满足性能要求。模糊控制的鲁棒性好,无需知道被控对象的数学模型,且在快速性方面有着自己的优势。研究分析了PID控制和模糊控制的优缺点,把两者相互结合,采用了用模糊规则整定PK、IK两个参数的模糊自整定PID控制方法。本研究用MATLAB软件对PID控制、模糊控制和参数模糊自整定PID控制的控制性能分别进行了仿真研究。仿真结果表明PID对于对象模型复杂和模型难以确定的控制系统具有很大的局限性,不能满足调节时间短、超调小的技术要求。由于模糊控制的理论(如量化因子和比例因子的确定问题)并不完善,其可能获得的控制性能无法把握,而且模糊控制易受模糊规则有限等级的限制而引起稳态误差。参数模糊自整定PID控制吸收前两种方法的长处,满足了调节时间短、超调量为零且稳态误差较小的控制要求。因此本论文最终确定采用参数模糊自整定PID控制方案。
本文设计了一种基于模糊PID的温度控制系统,以AT89C51单片机为核心,主要做了如下几方面的工作:首先介绍了模糊PID控制理论基础,其次进行系统的硬件设计以及硬件选择,最后进行系统的软件设计以及仿真。
关键词:模糊PID;AT89C51单片机;温度控制;仿真
Title: simulation Analysis of temperature Fuzzy Control system based on matlab
Abstract
Traditional PID control is a kind of proportional differential integral control in classical control theory. It is the most widely used control method in industry. However, with the development of society and production, the response speed to automatic control, System stability and adaptability have higher requirements.
In order to control the temperature, there are many options. Pid control is simple and easy to realize. In most cases, it can meet the performance requirements. The fuzzy control has good robustness, no need to know the mathematical model of the controlled object. And has its own advantages in terms of rapidity. This paper analyzes the advantages and disadvantages of PID control and fuzzy control, and combines them with each other. The fuzzy self-tuning PID control method with two parameters is adopted in this paper. The control performance of PID control, fuzzy control and parameter fuzzy self-tuning PID control are simulated by MATLAB software.The results show that PID has great limitation for the control system with complex object model and uncertain model, and can not meet the requirements of short adjusting time. Because the theory of fuzzy control (such as the determination of quantization factor and proportion factor) is not perfect, the possible control performance can not be grasped. Moreover, the fuzzy control is easy to be restricted by the finite class of fuzzy rules, which leads to the steady-state error. The advantages of the first two methods of parameter fuzzy self-tuning PID control are satisfied with the short adjustment time. The control requirement of zero overshoot and small steady-state error. Therefore, the fuzzy self-tuning PID controller is adopted in this paper.Case.
In this paper, a temperature control system based on fuzzy PID is designed. The main work is as follows: firstly, the basic theory of fuzzy PID control is introduced; secondly, the hardware design and hardware selection of the system are carried out. Finally, the system software design and simulation.
Keywords: fuzzy PID-AT89C51 single chip microcomputer; temperature control; simulation
目 录
摘 要 I
Abstract II
1绪论 1
1.1选题背景及其意义 1
1.2温度测控技术的发展与现状 1
1.2.1定值开关控温法 2
1.2.2 PID线性控温法 2
1.2.3智能温度控制法 3
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
3模糊PID温度控制系统硬件设计 14
3.1系统硬件电路构成 14
3.2系统设计原则及系统总电路图 14
3.2.1系统设计原则 14
3.2.2系统总电路图 15
3.3 单片机的选择 16
3.4温度传感器的选择 19
3.4.1 DS18B20简介 19
3.4.2 DS18B20的性能特点 20
3.4.3 DS18B20的管脚排列 20
3.4.4 DS18B20的内部结构 21
3.4.5 DS18B20的测温原理 21
3.5数码管输出 22
3.6键盘接口电路 23
3.7蜂鸣电路 24
3.8外部存储模块 24
3.9电机驱动模块 25
4系统软件设计 26
4.1主程序模块 26
4.2温度传感器DS18B20模块 26
4.3 LED显示模块 28
4.4键盘控制模块 29
5系统的仿真 30
5.1仿真工具 30
5.2 MATLAB及其模糊逻辑工具箱和仿真环境 30
5.2.1MATLAB概况 30
5.2.2模糊逻辑工具箱 30
5.3模糊PID的仿真 31
5.3.1控制对象模型 31
5.3.2 MATLAB控制过程的仿真分析 32
5.3.3动态性能跟踪 34
5.4仿真结果与分析 40
结 语 42
参考文献 43
致 谢 44
附 录 45
附件一:部分源程序 45
1.DS18B20相关子程序 45
2.LED相关子程序 45
3.按键相关子程序 46
附件二:英文文献 49
附件三:系统总电路图 57