FPGA在直流电机位置控制中的应用
2009-08-13吴凡金建勋戴志坚
吴 凡 金建勋 戴志坚
摘 要:由于直流电机具有速度易控制,精度和效率高,能在宽范围内实现平滑调速等特点而在冶金、机械加工制造等行业中得到广泛应用。该设计采用FPGA作为直流电机的控制器件,负责信号处理,速度快、可靠性高。介绍直流电机进行位置控制的方法,给出位置控制模块的设计和实现,使用VHDL语言进行编程完成了FPGA对直流电机的各种控制。
关键词:位置控制;直流电机;FPGA;VHDL
中图分类号:TP274文献标识码:B
文章编号:1004-373X(2009)10-013-03
Application of FPGA in Position Control of Direct Current Motor
WU Fan,JIN Jianxun,DAI Zhijian
(School of Automation Engineering,University of Electronic Science & Technology of China,Chengdu,610054,China)
Abstract: Direct current motor has characters of excellent controlling performance,high precise and great efficiency,smooth timing in wide range,so it′s widely used in metallurgy,enginery and other industry.In this design,FPGA is used as control device of direct current smotor,that charge signal processing.The method of realizing position control of direct current motor by using FPGA is introduced.It describes the design and realization of block of position control of motor and uses VHDL language to program FPGA to complete all kinds of control of direct current motor.
Keywords:position control;direct current motor;FPGA;VHDL
在直流电机控制系统中,被控制量一般都是电机的转速,控制的目的是保持电机的转速在所需要的定值上。但在实际生产过程中,电机带动生产机械或者其他负载运动的表现不一定都是转速,也可能是使生产机械或其机构产生一定的位置变化,这时需要的控制量就不再是电机的转速,而是控制对象的直线位移,因此需将电机的转速输出转换为电机的位移输出。
1 电机位置控制模块的设计
1.1 直流电机位置控制的方法
在此,使用maxon直流电机,通过与其配套的行星齿轮箱和磁编码器,能够实现从转速到位移的转换。其工作原理如下:电机转动时,编码器开始输出反馈脉冲,反馈脉冲的频率与电机的转速成正比,最高可达20 kHz。电机轴每旋转一圈,编码器就输出16个反馈脉冲,通过计算得出每个脉冲代表电机所带负载产生0.006 14 mm的位移。这样就可以把要控制的位移量用反馈脉冲的个数来表示,作为FPGA中位置控制模块给定值,当电机转动时,FPGA中的计数器会把反馈脉冲计数并保存,位置控制模块不断读取计数器里的计数值,并与位置控制模块中的给定值比较。……
