当前位置:首页 > 直流电机转速分段pid控制的单片机实现 大学毕业设计
沈阳航空航天大学北方科技学院毕业设计(论文)
摘 要
本设计采用微控制器AT89S52完成小型直流电机转速的采集、计算、显示、键盘设定等功能。并将非均匀采样情况下的增量式积分分离PID控制算法应用于直流电机的PWM调速,实现了对电机转速的测量和分段控制,解决了通常低采样周期时系统的超调问题。在设计过程中主要包括了以下两个方面的内容:一是直流电动机调速理论的研究及其控制器的理论设计,二是控制电路的仿真和硬件设计。设计结果表明采用分段PID控制具有算法简单快速性能好动态恢复特性快的特点。对调速系统的研究及以后同类系统的设计开发提供了一定的参考。 关键词:直流调速系统;PID控制;AT89S52;PWM
I
沈阳航空航天大学北方科技学院毕业设计(论文)
Abstract
This design uses microcontroller AT89S52 to complete performances such as sampling, calculating, displaying, and keyboard setting of rotational speed for small DC electromotor. Under situation of non-uniform sampling, the increment type integral separation PID control algorithm has been applied in the PWM speed regulation for DC electromotor, which can realize measuring and sectional controlling of the electromotor rotational speed, and has solved the general overshoot problem with low sampling period. The paper mainly includes two aspects. The first aspect is the principle research in the speed regulation system of DC electromotor and design of it. The second aspect is simulation of circuit and hardware design. The results of design have indicated that, with sectional PID controller, the system has features including simple algorithm, good rapidity, fast dynamic recovery performances. The paper offers some consults for researching system of speed regulation and design of similiar system.
Key words DC speed regulation system; PID control; AT89S52; PWM
II
沈阳航空航天大学北方科技学院毕业设计(论文)
目 录
1 绪 论 ............................................................................................................................... 1 1.1 课题来源及研究背景 .............................................................................................. 1 1.2 直流电动机的发展与现状 ...................................................................................... 2 1.3 直流电机调速系统 .................................................................................................. 3 1.4 数字PID技术概述 .................................................................................................. 4 1.5 本文内容及章节安排 .............................................................................................. 5 2 直流电机转速分段PID控制的单片机实现方案 ........................................................... 6 2.1 整体方案设计 .......................................................................................................... 6
2.1.1 系统结构方案 ............................................................................................... 6 2.1.2 转速测量方案 ............................................................................................... 6 2.1.3 电机驱动方案 ............................................................................................... 7 2.1.4 键盘显示方案 ............................................................................................... 7 2.1.5 PWM软件实现方案 ...................................................................................... 8 2.2 系统原理框图设计 .................................................................................................. 8 2.3 本章小结 .................................................................................................................. 9 3 硬件系统模块组成与电路分析 ..................................................................................... 10 3.1 速度测量电 路设计 .............................................................................................. 10
3.1.1 转速/频率转换电路的设计 ........................................................................ 10 3.1.2 脉冲滤波整形电路的设计 ......................................................................... 11 3.2 电机驱动电路的设计 ............................................................................................ 11 3.3 LCD显示电路与单片机的接口设计 .................................................................... 12 3.4 按钮控制电路设计 ................................................................................................ 13 3.5 本章小结 ................................................................................................................ 14 4 系统程序设计及实现 ..................................................................................................... 15 4.1 系统总程序框图设计 ............................................................................................ 15 4.2 系统各部分子功能程序设计 ................................................................................ 16
4.2.1 电机转速测量程序设计 ............................................................................. 16 4.2.2 键盘程序设计 ............................................................................................. 18 4.2.3 LCD显示子程序的设计 ............................................................................. 19 4.3 PWM信号的单片程序实现 ................................................................................... 21 4.4 本章小结 ................................................................................................................ 21 5 数字PID及其算法的改进 ............................................................................................. 22
III
沈阳航空工业学院北方科技学院毕业设计(论文)
5.1 PID控制基本原理 .................................................................................................. 22 5.2 三个基本参数Kp,Ti,Td在实际控制中作用研究 ......................................... 27 5.3 PID算法的改进“饱和”作用的抑制 ...................................................................... 28 5.4 PID控制算法的单片机程序实现 .......................................................................... 31 5.5 本章小结 ................................................................................................................ 31 6 系统的调试过程与测试 ................................................................................................. 32 6.1 转速度测量部分调试 ............................................................................................ 32 6.2 PID各项系数赋初值 .............................................................................................. 33 6.3 实验调试和确定PID算法各项系数 .................................................................... 34
6.3.1 赋初值调试分析 ......................................................................................... 34 6.3.2 修改PID各项系数值调试分析 ................................................................. 35 6.3.3 PID各项系数值的确定 ............................................................................... 35 6.4 本章小结 ................................................................................................................ 35 结论 ..................................................................................................................................... 36 社会经济效益分析 ............................................................................................................. 37 参考文献 ............................................................................................................................. 38 致谢 ..................................................................................................................................... 39 附录Ⅰ符号表 ..................................................................................................................... 40 附录II 元器件清单 ........................................................................................................... 41 附录Ⅲ 单片机程序 ........................................................................................................... 42 附录Ⅳ 硬件原理图 ........................................................................................................... 52 附录Ⅴ PCB图 .................................................................................................................... 53
IV
共分享92篇相关文档