DSP-based AC synchronous motor servo control system
2026-04-06 08:49:51··#1
Abstract: Bus-based architecture is a development direction for industrial control systems. Servo systems based on CAN (Controller Area Network) bus have significant advantages in terms of applicability, scalability, maintainability, and fault tolerance. This paper presents the hardware design of a servo controller, using the TMS320LF2407 DSP controller from TI (Texas Instruments) specifically designed for digital motion and motor control to implement an AC servo system. A complete closed-loop software implementation scheme for the AC servo system is also presented. Keywords: Servo control, DSP, Motor, CAN 1 Introduction Servo systems are developing towards full digitalization, and the emergence of high-performance DSP devices has laid a solid foundation for this. Looking at the latest developments both domestically and internationally, many foreign companies have launched mature, fully digital AC servo products based on DSPs, such as the AC servo systems from Panasonic and Yaskawa, which have been widely introduced in China. Currently, the domestic control industry has also seen a surge in the use of DSPs to implement AC servo systems. Furthermore, control systems employing high-performance control strategies have excellent adaptive and anti-interference capabilities, ensuring good dynamic and steady-state performance under harsh conditions such as time-varying parameters and interference. This paper overcomes the defects and shortcomings of motor control systems designed based on conventional control theory. The main task of this paper is to design a high-performance, fully digital servo system based on DSP and CAN bus technology. A dual closed-loop control method using current and speed is employed to control the speed and position of a permanent magnet synchronous motor. 2. Overall Hardware Structure of the Control System The hardware design provided in this system can meet various control algorithms and the control requirements of this system. It is designed with the TI TMS320LF2407 as the control core. The TMS320LF2407 chip is a fixed-point DSP chip with a high performance-price ratio under the TMS320C2000TM platform. Its low cost, low power consumption, and high-performance processing capabilities are very effective for the digital control of motors and can be applied to various control strategies. We used IGBT CPV363M4K modules to form an inverter bridge to realize the DC-to-AC inversion of the main power circuit. The hardware structure of the control system is shown in Figure 1. The main components include: a TMS320LF2407 microprocessor and its peripheral circuits, primarily responsible for implementing control strategies and algorithms, generating PWM signals, and providing response speed feedback; a CAN module responsible for communicating with the host computer and receiving motor control information via the bus; a JTAG interface circuit serving as the interface between the simulator and the microcomputer, facilitating online system debugging. This port is directly accessed by the simulator and provides simulation functionality; the detection circuit employs two sets of circuits: a lower-cost resistor and a higher-cost but higher-performance electromagnetically isolated Hall sensor, to detect the phase current of the permanent magnet synchronous motor, which is then fed into an A/D converter for processing to implement the control algorithm; the PWM output is transmitted via an optocoupler, isolating the control circuit from the power circuit when transmitting PWM control signals; and the power supply module converts the +5V voltage provided by the switching power supply to +3.3V to power the system. [align=center] Figure 1 System Hardware Structure Diagram[/align] 3 Control System Hardware Design 3.1 Current Detection In the AC control system of the permanent magnet synchronous motor, the controller needs to know the actual current in the windings in a timely and accurate manner to realize the design of current control and current protection circuits. Current sampling must be real-time, accurate, and reliable, which is essential for achieving control performance. There are many methods for current measurement. One method is to use a simple and inexpensive resistor, although this method is relatively complex. However, under certain conditions, this method becomes very difficult, or even impossible due to hardware limitations. For example, when using an intelligent power module (IPM) to form an inverter bridge, it is impossible to use a resistor to measure the phase current. In this system, an electromagnetically isolated Hall element is used for current detection. The detection circuit is shown in Figure 2: [align=center] Figure 2 Current Detection Circuit[/align] 3.2 Power Main Circuit Design The power main circuit is a high-voltage circuit that performs energy conversion and drives the servo motor. It mainly consists of three parts: a rectifier circuit, an intermediate DC circuit, and an inverter, as shown in Figure 3. [align=center] Figure 3 Power Main Circuit Diagram[/align] 3.3 Control Drive Circuit Design The D6 Q6 control drive circuit mainly performs power amplification of the PWM (Pulse Width Modulation) signal and drives the inverter power transistors. This paper employs SPWM and SVPWM technologies to implement power inversion. The PWM signals generated by the TMS320LF2407 DSP chip are amplified by the power drive module IR2132 and then drive the six power transistors of the three-phase inverter. The power drive circuit of the servo controller mainly consists of a three-phase inverter composed of the power drive module IR2132 and the IGBT CPV363M4K. The six PWM signals generated by the DSP chip are directly input to the power drive module IR2132 for amplification and then drive the six power transistors of the three-phase inverter. Since the DSP itself can directly generate SPWM and SVPWM signals to drive the three-phase inverter through software programming, the peripheral hardware circuit structure of the system is greatly simplified, and the system reliability is improved. 3.4 CAN Controller Module Design This system uses a CAN bus to receive control information for the motor and send status information to the host. The DSP controls the motor speed, braking, forward and reverse rotation according to the information requirements. The interface between the CAN bus controller of the TMS320LF2407 DSP chip and the CAN physical bus uses an 82C250 driver chip. The 82C250 uses a 120Ω twisted-pair cable as the communication medium, employing differential transmission and reception, providing strong anti-interference capabilities and a maximum communication rate of 1Mbps. By connecting different pins 8 (Rs) of the 82C250, three different operating modes can be achieved: high-speed, slope control, and standby. This system uses slope control to reduce radio frequency interference. To enhance anti-interference capabilities and protect the CAN controller, a high-speed optical isolator is added between the TMS320LF2407 and the 82C250. The optical isolator uses the HP HCPL-2630 chip, with a speed of 10MHz. The circuit is shown in Figure 4. [align=center] Figure 4 CAN Driver Interface Circuit[/align] 4 System Software Design In the design of servo systems, under the premise of real-time performance, software resources are generally used to replace hardware resources as much as possible to reduce costs, simplify the hardware system structure, and improve the system's cost-effectiveness. The TMS320LF2407, through software, can flexibly implement functions such as vector PWM output, speed detection, and current detection. Servo drive control involves two software components: the DSP control program and the host computer software. The DSP program consists of two modules: the main program module and the interrupt service routine module. The main program module primarily handles interrupt vector declarations, memory variable definitions, and the initialization of various functional modules. The interrupt module mainly processes the speed and current loops and exchanges data with the host computer. The main program initializes the system, sets I/O interface control signals, and configures the registers of various control modules within the DSP, then enters the loop program. Initialization tasks mainly include: DSP core initialization; current and speed loop period settings; PWM initialization, including PWM period setting, dead-time setting, and PWM startup; ADC initialization and startup; QEP initialization; CAN controller initialization; initial position initialization of the permanent magnet synchronous motor rotor; multiple servo motor phase current samplings to calculate the zero offset of the phase current; current PI regulation initialization; and speed PI regulation initialization. After all initialization work is completed, the main program enters the waiting state to wait for the interrupt to occur and adjust the current loop and speed loop. The main program flowchart is shown in Figure 5. [align=center] Figure 5 Main program flowchart[/align] The innovation of this paper: This paper develops a high-performance AC synchronous motor servo control system based on DSP. The system uses TI's dedicated DSP-TMS320LF2407 for motor control as the control core, realizes high-precision current and speed dual closed-loop control, realizes the digitization of speed regulator, current regulator and voltage space vector, and realizes the upper computer for parameter setting and real-time monitoring of the system, achieving good control effect. References: [1] Cai Chunwei, Research and Development of All-Digital Servo Controller Using USB and DSP Technology [D], Master's Thesis of Shandong University, 2004.5. [2] Jiang Simin et al., TMS320LF240x DSP Hardware Development Tutorial [M], Machinery Industry Press, 2003. [3] Wang Jijun, Liu Xianxing, Wang Deming, Wang Limin, et al. Application of neuron controller in vector control of induction motor [J]. Journal of Jiangsu University (Natural Science Edition), March 2003, Vol. 24, No. 2. [4] Zhang Heng, Zhu Jihong, Jiang Zhihong. Design of dual-channel servo control system [J]. Microcomputer Information, 2007, 2-1: 110-111