基于DSP的直流电机控制系统设计摘要:直流电机由于励磁磁场和电枢磁场完全解耦,可以独立控制,因此具备良好的调速性能,出力大、调速范围宽和易于控制,广泛应用于电力拖动系统中。而随着对电机控制要求的不断提高,普通的单片机越来越不能满足对电机控制的要求,DSP技术的发展正好为先进控制理论以及复杂控制算法的实现提供了有力的支持。本设计采用美国TI公司专门为电机数字化控制设计的16位定点DSP控制器TMS320LF2407作为微控制器。该芯片集DSP信号高速处理能力及适用于电机控制优化的外围电路于一体,可以为高性能传动控制技术提供可靠高效的信号处理与控制硬件。电机的控制系统是由检测装置、主控制器、功率驱动器以及上位机组成,其中DSP控制器是电机控制系统的关键部分,负责对电机的反馈信号进行处理并输出控制信号来控制电机的转动。关键词:直流电机;DSP;PID控制器;PWMTheDesignofDCMotorControlSystemBasedonDSPAbstract:TheDCmotorarmaturemagneticfieldandtheexcitationcompletelydecoupled,itcanbeindependentlycontrolled,soithasagoodspeedperformance,contributetoalargepower,widelyspeedrange,andeasytocontrol,soitiswidelyusedinelectricdrivesystems.Withthemotorcontrolrequiredforcontinuousimprovement,commonsingleMCUcan'tmeetrequirementsofthemotorcontrolwell,DSPtechnologyjustfortheadvancedcontroltheoryandcomplexcontrolalgorithmimplementationprovidesastrongsupport.ThisdesignusestheAmericanTIcompanyspeciallyformotorcontroldesignofdigital16fixed-pointDSPcontrollerTMS320LF2407asthecontroller.ThechipsetDSPsignalthehighprocessingcapacityandusedinmotorcontroloptimizationtheperipheryofthecircuitinabody,highperformancedrivingcontroltechnologytoprovidereliableandefficientsignalprocessingandcontrolhardware.Motorcontrolsystemiscomposedofdetectiondevices,themaincontroller,powerdriverandPCcomponents,whichDSPcontrollerisakeypartofthemotorcontrolsystem,responsibleforthemotorfeedbacksignalprocessingandoutputcontrolsignaltocontroltherotationofthemotor.Keywords:DCmotor,DSP,PIDcontroller,PWM目录第1章绪论...............................................................................................................11.1课题概述......................................................................................................11.1.1课题研究的背景.............................................................................11.1.2课题研究的目的及意义.................................................................21.2课题研究的现状..........................................................................................21.3课题研究的内容..........................................................................................5第2章系统总体设计...............................................................................................62.1系统的组成..................................................................................................62.2DSP芯片选择.............................................................................................62.3TMS320LF2407DSP控制器介绍.............................................................72.4硬件方案论证............................................................................................102.4.1测速传感器的选择.......................................................................102.4.2功率驱动单元方案论证...............................................................112.4.3键盘显示方案论证.......................................................................112.4.4PWM实现方案论证.....................................................................122.5本章小节....................................................................................................12第3章系统硬件设计.............................................................................................133.1电源电路的设计........................................................................................133.2功率驱动单元的设计................................................................................133.2.1PWM调速原理.............................................................................143.2.2电机驱动电路...............................................................................153.3速度检测单元的设计................................................................................163.3.1速度检测的方法...........................................................................163.3.2速度检测电路设计.......................................................................173.4按键控制单元的设计................................................................................183.5显示单元的设计........................................................................................203.5.11602液晶介绍..............................................................................203.5.2显示单元接口电路设计...............................................................203.6通信单元的设计........................................................................................213.7本章小节....................................................................................................22第4章系统软件设计.............................................................................................234.1主程序的设计............................................................................................234.1.1主程序...........................................................................................234.1.2初始化子程序...............................................................................244.1.3显示程序.......................................................................................244.2中断服务程序的设计................................................................................244.2.1PWM波发生程序......................