您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > 基于单片机的伺服电机转速控制系统
题目:基于单片机的伺服电机转速控制系统I基于单片机的伺服电机转速控制系统摘要传统的晶闸管直流调速系统,其控制回路都是采用模拟电子线路构成的,晶闸管触发器多数还是采用分立元件组成的,这使得控制回路的硬件设备极其复杂,安装调试困难,相对故障率较高。针对传统的晶闸管直流调速系统的一些不足,提出了一种基于单片机的伺服电机转速控制系统的设计方法,并介绍了PID控制算法的设计。本设计使用AT89C52作为控制芯片,以PI(比例-积分)调节控制算法为基础,采用软件编程产生脉宽比可控的脉宽调制信号,再通过功率放大电路H桥驱动电路来控制伺服电机电枢电压,从而完成对伺服电机转速的调节,达到了较好的控制性能。同时通过4*4小键盘输入设定的伺服电机转速,用光电编码器来测定伺服电机转速,显示在4位LED上。关键词:直流调速;PID控制算法;AT89C52;脉宽调制;伺服电机IITheServoMotorSpeedControlSystemBasedOnMCUAbstractTheconventionalDCdrivesystemofSCR,whichControlloopisconsistingofsimulateelectroniccircuits,andtheSCRtriggerismostlymadeupofthediscretecomponent,sothehardwaredevicesareextremelycomplexintheControlloop,theinstallationandtrialrundifficultly,therelativefailurerateishigh.Tosolvetheproblems,thispaperpresentsonekinddesignmethodoftheservomotorspeedcontrolsystembasedonMCU,andintroducesthedesignofthePIDcontrolalgorithm.ThisdesignusesAT89C52asthecontrollerchip,takesPI(proportion-integral)regulationcontrolalgorithmtobethefoundation,adoptssoftwareprogrammingtogetthesignalforPulse-Width-Modulation,andcontrolsthearmaturevoltageofservomotorthroughHbridgedrivingcircuitinpoweramplificationelectriccircuit,thusitcompletestoadjusttheservomotorrotational-speed,andachievesthegoodcontrolperformance.Meanwhileitsetstheservomotorrotational-speedthroughthe4*4smallkeyboard,andminutesthespeedoftheservomotorbytheopticalencoder,thenshowsthespeedoftheservomotoronthe4LED.Keyword:Direct-currentspeedregulation;PIDcontrolalgorithm;AT89C52;Pulse-Width-Modulation;ServomotorIII目录摘要.........................................................................................................................................IAbstract......................................................................................................................................II第一章引言............................................................................................................................11.1课题的研究背景及意义.............................................................................................11.2转速控制系统设计目标及技术要求.........................................................................3第二章伺服电机转速控制系统设计......................................................................................42.1系统硬件组成原理.....................................................................................................42.2PID控制算法简介.......................................................................................................42.2.1位置式PID控制算法......................................................................................62.2.2增量式PID算法..............................................................................................8第三章硬件部分的设计........................................................................................................123.1直流电机调速原理...................................................................................................123.2PWM波形发生电路..................................................................................................133.2.1PWM基本原理...............................................................................................133.2.2PWM信号的产生...........................................................................................143.3PWM功率放大电路..................................................................................................153.3.1H桥驱动电路原理.........................................................................................153.3.2PWM驱动电路原理图...................................................................................173.4测速电路...................................................................................................................183.5键盘电路...................................................................................................................193.6LED显示电路...........................................................................................................213.7AT89C52的时钟电路...............................................................................................23IV3.8AT89C52的复位电路...............................................................................................24第四章软件部分的设计........................................................................................................264.1主程序流程...............................................................................................................274.2PID控制算法程序流程.............................................................................................284.2.1PID控制算法选择..........................................................................................284.2.2PID运算控制模块子程序..............................................................................294.3按键处理子程序.......................................................................................................304.4键盘扫描程序...........................................................................................................314.5转速采集子程序.......................................................................................................3
本文标题:基于单片机的伺服电机转速控制系统
链接地址:https://www.777doc.com/doc-5401089 .html