1、 1 摘要 在运动控制系统中,电机转速控制占有至关重要的作用,其控制算法和手段有很多,模拟 PID 控制是最早发展起来的控制策略之一,长期以来形成了典型的结构,并且参数整定方便,能够满足一般控制的要求,但由于在模拟 PID 控制系统 中,参数一旦整定好后,在整个控制过程中都是固定不变的,而在实际中,由于现场的系统参数、温度等条件发生变化,使系统很难达到最佳的控制效果,因此采用模拟 PID控制器难以获得满意的控制效果。随着计算机技术与智能控制理论的发展,数字 PID技术渐渐发展起来,它不仅能够实现模拟 PID 所完成的控制任务,而 且具备控制算法灵活、可靠性高等优点,应用面越来越广。 本设计以上
2、面提到的数字 PID 为基本控制算法,以 AT89S51 单片机为控制核心,产生占空比受数字 PID 算法控制的 PWM 脉冲实现对直流电机转速的控制。同时利用光电传感器将电机速度转换成 脉冲频率 反馈到单片机中,实现转速闭环控制,达到转速无静差调节的目的。在系统中采 12864LCD 显示器作为显示部件,通过44 键盘设置 P、 I、 D、 V 四个参数和正反转控制,启动后可以通过显示部件了解电机当前的转速和运行时间。该系统控制精度高,具有很强的抗干扰能力。 关键词: 数字 PID; PWM 脉冲;占空比;无静差调节 2 Abstract In the motion control syst
3、em,the control of electromotors rotate speed is of great importance,there are a lot of speed control arithmetics and methods ,the analog PID control is one of the earliest developed control policies which has formed typical structure ,its parametric setting is convenient and its easy to meet normal
4、controls demand,but as the whole control process is fixed once the parameter has been set while practically the changes of those conditions like the system parameters and temperature of the environment prohibit the system from reaching its best control effect,so the analog PID controller barely has
5、satisfied effect.With the development of computer technology and intelligent control theory ,the digital PID technology is thriving which can achieve the analog PIDs control tasks and consists of many advantages like flexible control arithmetics and high reliability,it is widely used now. This desig
6、n is based on the digital PID mentioned above as basic control arithmetic and AT89S51 SCM as control core,the system produces PWM impulse whose duty ratio is controlled by digital PID arithmetic to make sure the running of direct current machines rotate speed.Meanwhile,the design uses photoelectric
7、sensor to transduce the electromotor speed into impulse frequency and feed it back to SCM,this process implements rotate speeds closed loop control to attain the purpose of rotate speeds astatic modulation.In this system, the 12864LCD is used as display unit , the 44 keyboard sets those four parameters P、 I、 D、 V and obverse and reverse control,after starting up,the display unit shows the electromotors current rotate speed and runtime.The system has great control precision and anti-jamming capability. Keywords: digital PID; PWM impulse; dutyfactor; astatic modulation