摘 要
陀螺仪是舰船上的重要组成部分,其性能的稳定对于舰船的控制至关重要。将模糊算法应用于陀螺仪温度控制系统 ,以C8051F017单片机作为温度控制系统的核心部件,采用模糊算法以及其他的软硬件设计,实现了一套温度采集和控制的设计方案。 本论文介绍了“陀螺温度控制系统”的硬件设计,以及一些相关的知识。作为一个典型的温度控制系统的实验设计,陀螺温度控制系统综合运用了模拟电子技术、自动控制原理、传感器原理、模拟量处理技术、键盘显示技术等诸多方面的知识,是对所学知识的一次综合检测。 陀螺温度控制系统硬件电路设计主要是由电桥电路、信号放大的比例电路、加法器、U/I转换电路、起开关特性的供放管及一些滤波电路组成。 经过不断的实验,严格的对各种元器件的选最终达到了控制精度要求,控制陀螺温度在56 ℃,精度要求也达到了±0.1℃。成功的得到了PWM现象。 关键词:陀螺仪;温控电路;模糊;C8051 ABSTRACT The gyroscope is an important component of ships. And its stability is very important to the control of ships. The temperature is so important a factor that it can affect the precision of the gyroscope, and it is a important parameter to the stability of the gyroscope. So it is so necessary to control the temperature of the gyroscope. This circuit makes up of a sensor, a microcomputer, a V/A transforming circuit and other peripheral circuits. The core of this circuit is C8051F017 microcomputer. The target under control is the temperature of the liquid that is in the gyroscope. The executive organization is the photo-Darling tons. The component of the controller adopts the fuzzy control, and makes the microcomputer output the PWM pulse, and control the electric current of the executive organization. And finally we achieve a design program of the temperature-collect and control. The practical operation has shown that this system can achieve quite good control performance. Key word: gyroscope; temperature control; fuzzy control; C8051 目 录 第1章 绪论………………………………………………………… 1 1.1课题分析……………………………………………………… 1 1.2设计思路……………………………………………………… 1 1.3本章小结……………………………………………………… 4 第2章单片机外围硬件电路…………………………………… 5 2.1前通道电路………………………………………………… … 5 2.1.1电桥电路………………………………………………… 5 2.1.2差放电路………………………………………………… 6 2.1.3前通道电路………………………………………………… 7 2.2后通道电路…………………………………………………… 8 2.2.1加减运算电路……………………………………………… 8 2.2.2电压-电流(U/I)转换电路………………………………… 13 2.2.3达林顿管………………………………………………… 15 2.2.4后通道电路………………………………………………… 17 2.3本章小结……………………………………………………… 18 第3章C8051F01x系列单片机………………………………… 19 3.1概述…………………………………………………………… 19 3.2存储器组织…………………………………………………… 22 3.3中断源和中断向量…………………………………………… 22 3.4断口输入输出………………………………………………… 24 3.4.1优先交*开关译码器……………………………………… 26 3.4.2端口I/O初始化…………………………………………… 26 3.4.3配置无对应引脚端口……………………………………… 27 3.5总体支流电气特性…………………………………………… 27 3.6极限参数……………………………………………………… 28 3.7本章小结……………………………………………………… 29 第4章模糊控制的基本原理…………………………………… 30 4.1模糊控制的引入与实现……………………………………… 30 4.2模糊控制方法………………………………………………… 32 4.3解模糊方法…………………………………………………… 33 4.4模糊控制规则及模糊控制算法………………………………… 36 4.4.1模糊控制规则的表示及特性……………………………… 36 4.4.2模糊控制规则的生成……………………………………… 37 4.4.3模糊控制算法…………………………………………… 38 4.5本章小结……………………………………………………… 41 第5章系统编程………………………………………………… 42 5.1C语言的特点………………………………………………… 42 5.2程序介绍…………………………………………………… 42 5.2.1软件流程………………………………………………… 42 5.2.2程序初始化……………………………………………… 43 5.3本章小结……………………………………………………… 45 结论……………………………………………………………… 46 参考文献………………………………………………………… 47 致谢……………………………………………………………… 48 附录……………………………………………………………… 49 第1章 绪论 1.1课题分析 在舰船中,陀螺仪是关键的部件,陀螺球体与陀螺壳体之间内充满悬浮液体。陀螺球体质量和悬浮液体比重的选择,应确保在悬浮液体加热到工作温度以后,陀螺球体可以拥有中性浮力。所以温度控制系统的设计应保证加热和保持充入陀螺部件的液体的常值工作温度为56±0.2℃,因此在这个温度上陀螺球体具有中性浮力。 传统控制方法(包括经典控制和现代控制)在处理具有非线形或不精确特性的被控对象时十分困难。而温度系统为大滞后系统,较大的纯滞后可引起系统不稳定。大量的应用实践表明,采用传统的PID控制稳态响应特性较好,但是难以得到满意的动态响应特性。模糊控制的优点是能够得到较好的动态响应特性,并且无需知道被控对象的数学模型,适应性强,上升时间快,鲁棒性好。但是模糊控制也存在固有的缺点,容易受模糊规则有限等级的限制而引起误差。本设计中采用C8051F017单片机作为控制内核,并采用了Fuzzy-PID复合控制,弥补了单纯采用PID算法的不足。对PID参数的模糊自适应整定进一步完善了PID控制的自适应性能,在实际应用中取得了很好的效果。 |