安徽工程大学毕业设计(论文)
基于DSP的直流伺服电机的控制
摘 要
在现代工业生产中,为了实现过程自动化的要求,机电传动和控制系统越来越广泛的应用于各个领域和行业当中。尤其是直流电机和伺服系统在控制系统中的应用,更是促进了现代化工业的高速发展。直流伺服电动机以其优秀的线性机械特性、宽调速、大转距以及简单的控制电路等优点,经过长期的发展,已经成为各自动化系统中应用最多的电机。而随着DSP 的出现,以它处理能力强、内置较大的存储器、芯片功耗低及配置资源灵活等特点使直流伺服电机的控制更广泛地应用于各种驱动装置和伺服系统。可见,机电一体化产品质量和技术水平的高低,已经是当今世界衡量一个国家实力和国际地位的重要标志。
本论文的研究内容是设计并实现一个基于DSP的直流伺服电机转速控制系统。本设计完成的主要工作不仅要设计调速系统硬件总体结构,对系统各主要部件设计进行详细的分析,对所设计的控制方法进行仿真,而且还要求转速控制达到一般工业要求的标准,并在控制电机启动时控制其启动的电流大小,防止启动过程中的过压和过流。
关键词:DSP;直流伺服电机;PWM;PID
I
张健:基于DSP的直流伺服电机的控制
DC servo electromotor controlling based on DSP
Abstract
Produce in the modern industry, for carrying out the request of process automation, the machine fax moves and controls system more and more extensive apply in each realm and profession. Particularly direct current electrical engineering and servo system are controlling the application in the system, it is also promote the high speed development of modern industry. The direct current servo electric motor is adjusted with it’s excellent line machine characteristic, breadth speed’s control and greatly turn to be apart from and simple control electric circuit etc advantage, process long-term of development, have been already became applied most electrical engineering in each automation. But with the DSP emergence, Because it’s strongly processing ability and it’s inside place bigger saving machine, chip achievement consume low and allocation the resources vivid etc characteristics make the control of the direct current servo electrical engineering more broadly applied in various drive equipment and servo system. It is thus clear that, the height of machine electricity product and the level of technique, it’s already become the important sign of measure national real strength and international position nowadays.
The research contents of this thesis is design and carry out an according to DSP of the direct current servo electrical engineering turn speed control system. The main work of this design not only needs to design to adjust the system hardware total structure, carries on detailed analysis to system each main parts design, carries on imitating to the control method designed really, but also carry out turning of electrical engineering control attain the standard of generally industrial request, and control the electric current size when starting of control it’s start, prevent from lead press and lead flow in start process.
Keywords: DSP ;the direct current servo electrical engineering;PWM; PID
II
安徽工程大学毕业设计(论文)
目 录
引 言 .................................................................................................................................................... - 1 -
1.1 课题背景 .................................................................................................................................... - 2 - 1.2 主要研究内容............................................................................................................................. - 2 - 1.3 研究意义 .................................................................................................................................... - 2 - 1.4 实现的主要思路......................................................................................................................... - 3 - 1.5论文后续内容的组织和安排 ...................................................................................................... - 3 - 第2章 总体技术方案 .............................................................................................................................. - 4 -
2.1总体技术方案.............................................................................................................................. - 4 - 2.2方案的确定 ................................................................................................................................. - 4 - 2.3本章小结 ..................................................................................................................................... - 5 - 第3章 系统硬件设计 .............................................................................................................................. - 6 -
3.1硬件组成 ..................................................................................................................................... - 6 - 3.2硬件分析 ..................................................................................................................................... - 7 -
3.2.1 三角波发生器 ................................................................................................................. - 7 - 3.2.2电压-脉冲变化器 ............................................................................................................ - 9 - 3.2.3 脉冲分配器及功率放大电路 ....................................................................................... - 10 - 3.2.4驱动芯片的选择 ............................................................................................................ - 11 - 3.2.5 H型功率驱动电路设计 ................................................................................................ - 13 - 3.2.6 电源部分的设计 ........................................................................................................... - 15 - 3.2.7 上电复位电路的设计 ................................................................................................... - 16 - 3.2.8 时钟电路设计 ............................................................................................................... - 16 - 3.2.9 JATG接口 ...................................................................................................................... - 17 - 3.2.10 串行通信接口(SCI) ............................................................................................... - 19 - 3.2.11 TMS320LF2407A与D/A转换器接口 .......................................................................... - 20 - 3.2.12过流保护 ...................................................................................................................... - 21 - 3.2.13 过压和欠压保护 ......................................................................................................... - 22 - 3.2.14 键盘输入接口电路和LED显示电路设计 ............................................................... - 22 - 3.2.15 PID调节器的实现 ...................................................................................................... - 23 - 3.3本章小结 ................................................................................................................................... - 26 - 第4章 系统软件设计 .......................................................................................................................... - 27 -
4.1软件组成 ................................................................................................................................... - 27 - 4.2各子功能实现............................................................................................................................ - 27 -
4.2.1 系统初始化模块 ........................................................................................................... - 27 - 4.2.2 电机起停控制模块 ....................................................................................................... - 28 - 4.2.3中断服务模块 ................................................................................................................ - 29 - 4.3实现举例 ................................................................................................................................... - 30 - 4.4 本章小结 .................................................................................................................................. - 31 - 第5章 仿真 ............................................................................................................................................ - 32 -
5.1 电机的启动,调速与制动 ....................................................................................................... - 32 - 5.2 电机控制系统仿真模型的建立 ............................................................................................... - 33 - 5.3 结果分析 .................................................................................................................................. - 35 - 5.4 本章小结 .................................................................................................................................. - 40 -
III
张健:基于DSP的直流伺服电机的控制
第6章 结论与展望 ................................................................................................................................ - 41 -
6.1 结论 .......................................................................................................................................... - 41 - 6.2 展望 ........................................................................................................................................... - 41 - 致 谢 .................................................................................................................................................. - 42 - 参考文献 .................................................................................................................................................. - 43 - 附录A 外文文献及翻译 ........................................................................................................................ - 45 - 附录B 主要参考文献及摘要 ................................................................................................................. - 52 -
IV
安徽工程大学毕业设计(论文)
插图清单
图2-1系统的整体方案图 …………………………………………………………………4 图3-1硬件组成框图…………………………………………………………………………6 图3-2 DSP最小控制系统……………………………………………………………………6 图3-3电路保护部分…………………………………………………………………………7 图3-4三角波发生器…………………………………………………………………………7 图3-5电压脉冲变器………………………………………………………………………10 图3-6脉冲分配器及功率放大路…………………………………………………………11 图3-7IR2133S引脚图………………………………………………………………………12 图3-8 H型功率驱动电路图…………………………………………………………………13 图3-9电源转换路…………………………………………………………………………15 图3-10 上电复位电路………………………………………………………………………16 图3-11 外接晶体与DSP连接示意图………………………………………………………17 图3-12时钟电路图…………………………………………………………………………17 图3-13 JTAG接口……………………………………………………………………………18 图3-14 JATG端口插针定义………………………………………………………………18 图3-15串行通信接口………………………………………………………………………19 图3-16外扩存储器接口……………………………………………………………………20 图3-17 TMS320LF2407A与D/A转换器口…………………………………………………21 图3-18过流保护电路………………………………………………………………………22 图3-19 键盘输入接口电路…………………………………………………………………23 图3-20 LED显示电路………………………………………………………………………23 图3-21 模拟PID控制系统原理图…………………………………………………………24 图4-1 系统软件总体主程序流程图………………………………………………………27 图4-2 系统初始化模块流程图……………………………………………………………28 图4-3 电机起停控制模块…………………………………………………………………29 图4-4 中断服务程序………………………………………………………………………30 图5-1 电机速度控制器……………………………………………………………………33 图5-2 基于DSP的PID调节双闭环仿真结果……………………………………………38 图5-3 速度阶跃响应………………………………………………………………………38 图5-4 电流阶跃响应………………………………………………………………………39 图5-5 理想电机双闭环运行结果…………………………………………………………39
V