Design of a fully digital servo system based on a three-phase asynchronous motor
2026-04-06 07:22:45··#1
In servo systems widely used in CNC lathes, textile machinery, and other fields, the adoption of fully digital control is an inevitable trend. Compared with analog control, digital control not only has advantages such as convenient control, stable performance, and low cost, but also opens up development space for networked and intelligent control of servo systems. Fully digital servo systems can not only easily realize motor control, but also realize a variety of additional functions through software programming, making the servo system more user-friendly and intelligent, which is something that analog control cannot achieve. Currently, a large number of literatures [1-5] have reported on the research of servo systems. This paper establishes a fully digital servo system, ThRSV-1, based on the TI F2407A DSP control chip. This system can work in five modes: positioning, pulse tracking, analog tracking, torque setting, and speed regulation. When using a photoelectric encoder disk with 1024 pulses/revolution, the positioning accuracy of the motor can reach 1/4096 of each revolution. When working in pulse tracking mode, its speed changes with the pulse frequency, and the angle rotated is proportional to the total number of input pulses. In analog tracking, it can achieve various speed curves such as S-curves, step curves, and sine curves, truly realizing the tracking of arbitrary speed curves. The torque mode ensures constant motor output torque, suitable for multi-unit联动 (interlocking) applications. Finally, the basic speed regulation method meets the most commonly used control requirements; when the motor operates above its rated speed, field weakening speed-up technology is employed. Field-Oriented Control Principle For ease of analysis, the following idealized assumptions are made for the three-phase asynchronous motor: the stator and rotor windings are completely symmetrical; the stator and rotor surfaces are smooth with no cogging effect; the air gap magnetomotive force of each phase of the stator and rotor exhibits a sinusoidal distribution in space; magnetic saturation, eddy currents, and core losses are negligible. [align=center]Figure 1. Coordinate system of an asynchronous motor α-β and d-q[/align] Figure 1 is a coordinate diagram of a three-phase asynchronous motor, where a, b, and c are the three-phase stator windings, α-β are the two-phase stator coordinates, dq are the coordinates of the two phases rotating at an angular velocity of ωo, and isd, isq, isα, and isβ are the components of the stator current vector is on the d, q, α, and β axes, respectively. For a general motor speed control system, the conversion from torque to speed is approximately an integral element, whose integral time constant is determined by the mechanical inertia of the motor and load, and is an uncontrollable quantity. Therefore, the quality of torque control performance directly affects the dynamic and static characteristics of a speed control system. From the torque expression, it can be seen that the torque of an asynchronous motor is generally related to the stator current vector, the rotor magnetic field, and the included angle. Therefore, to control the torque, the magnetic flux must first be detected and controlled. In magnetic field oriented vector control, the dq coordinate system is generally placed on the synchronous rotating magnetic field, and the AC quantities in the stationary coordinate system are converted into DC quantities in the rotating coordinate system. The d-axis and the rotor magnetic field direction are made to coincide. At this time, the q-axis component of the rotor flux is zero (ψrg=0). The following equations are given: Equations (1)-(5) are the rotor magnetic field oriented control equations. The leakage coefficient = 1-lm2/lslr, τr=lr/rr is the rotor time constant, ωs is the slip angular velocity, ω0 is the angular velocity of the rotor rotating magnetic field, and ωr is the rotor rotation angular velocity. Equations (3)-(6) are the current model formulas for rotor magnetic field oriented control, which are used to calculate the amplitude and angle of the rotor rotating magnetic field. It is not difficult to find from equation (3) that the rotor flux amplitude can be observed by detecting the d-axis component of the stator current. It can be seen from equation (7) that when ψrd is constant, the electromagnetic torque is proportional to the q-axis component or slip of the current, and there is no maximum value limit. The electromagnetic torque can be controlled by controlling the q-axis component of the stator current. Therefore, the d-axis component of the stator current is called the excitation component, and the q-axis component of the stator current is called the torque component. Thus, the rotor flux can be controlled by the d-axis component of the stator current, and the torque can be controlled by the q-axis component, thereby achieving decoupled control of flux and torque. [align=center] Figure 2 Servo System Model[/align] Figure 2 is a block diagram of the entire rotor field-oriented control principle. The entire system consists of three loops, from the outside to the inside: position loop, speed loop, and current loop. The position loop performs closed-loop control in positioning mode; in other operating modes, it does not control the motor shaft position. System Hardware and Software Design Hardware Design: DSP and Peripheral Resources The servo system hardware with the DSP as its core is shown in Figure 4. The control circuit of the entire system consists of DSP + GAL. GAL is mainly used for the selection signal of the system's I/O space and the output control of the switch drive signal. The DSP, as the control core, receives external information, determines the operating mode of the servo system, and converts it into the inverter's switch signal output. This signal, after being isolated by a circuit, directly drives the IPM module to supply power to the motor. Additionally, the EEPROM is used for parameter storage and user information storage. The main power circuit first undergoes uncontrolled rectification, then a full-bridge inverter output. The inverter uses an IGBT intelligent module. This module employs 10A, 600V power transistors, integrates the drive circuit, and is designed with overvoltage, overcurrent, overheat, and undervoltage fault detection and protection circuits. The system's auxiliary power supply uses a linear regulated power supply, mainly powering the six-channel switching transistor drive power supply, the DSP and GAL, the I/O port control chip power supply, the sampling ELM, and the photoelectric encoder power supply. The current sampling circuit requires sampling at least two phases of current; due to the load's symmetry, it samples the Ia and Ic phases. The sampling circuit uses Hall effect sensors, which are processed by analog circuitry to a voltage range of 3.3V before being sent to the DSP's AD converter. The rotor position detection circuit uses an incremental photoelectric encoder for motor feedback. This encoder has a resolution of 1024 pulses/revolution, and the output signal includes A, B, and Z pulse signals, where A and B signals differ by 90° (electrical angle). The DSP determines the motor's direction of rotation and speed by judging the phase and number of A and B signals. The Z signal appears once per revolution and is used to reset the position signal. After the photoelectric encoder pulse signal is sent to the DSP, it is quadrupled by the internal QEP circuit, resulting in 4096 pulses per motor revolution. The protection circuit system is configured with overvoltage, undervoltage, IGBT fault, motor overheating, and encoder fault protection in the main circuit. Fault signals can be directly blocked from switching pulses after passing through logic circuits. Simultaneously, the system protection is achieved through software detection via DSP I/O port input. The software design of the DSP servo control program consists of three parts: main program initialization, PWM timer interrupt program, and DSP data exchange program with peripheral resources. The main program first completes system initialization, I/O port control signal management, and the setting of registers for various control modules within the DSP. Then, it enters the loop program, where system data saving and alarm updates are performed. The PWM timer interrupt program is the core of the entire servo control program. Here, sampling control of the current loop, speed loop, and position loop, as well as vector control, PWM signal generation, selection of various operating modes, and cyclic scanning of I/O are implemented. The interrupt control program has a cycle of 50μs, corresponding to an IPM switching frequency of 20kHz. Each cycle completes current loop sampling and switching signal output, while speed and position loop control are performed every 10 switching cycles. The PWM control signal is generated using SVPWM modulation, and a PID algorithm is applied to each phase current in each sampling cycle to determine the duty cycle for that cycle. The data exchange program mainly includes communication with the host computer, parameter storage in the EEPROM, reading keyboard values from the controller, and digital tube display. Communication uses an RS232 interface, accepting commands from the host computer according to a specific communication protocol and transmitting parameters as required. EEPROM data exchange is completed through the DSP's SPI port. The keyboard and digital tube display are scanned and updated every 1200 cycles. [align=center]Figure 3 Servo System Hardware Configuration Figure 4 DSP System Hardware Diagram[/align] Experimental Results [/align][align=center]Figure 5 Servo System Speed Step Response Curve Figure 6 Phase Current Waveform When Speed Command is Reversed Figure 7 Position Waveform During Servo Positioning Figure 8 Magnetic Linkage Circle of Motor at 1200 r/min[/align] The above servo system uses a three-phase asynchronous motor: rated power 180W, rated current 0.65A, rated speed 1400 r/min, rated torque 1.1 Nm, stator inductance 42 mH, stator resistance 28 Ω. The current loop sampling period is 50 μs, the speed loop sampling period is 500 μs, and the position loop sampling period is 500 μs. Figure 5 is the speed step response curve. By adjusting the speed loop PID parameter, the overshoot and response time of the speed waveform can be changed. Figure 6 is the phase current waveform when the speed is switched between forward and reverse. It can be clearly seen that when the motor direction changes, its phase current waveform is reversed. Figure 7 shows the position waveform of the servo system after two rotations. The motor position is determined by the optical encoder, with each rotation consisting of 4096 pulses. Figure 8 shows the rotor flux circular trajectory of the servo system at 1200 r/min. Conclusion In this paper, the system hardware adopts a DSP plus GA control structure. The circuit design is simple and compact, meeting the real-time requirements of vector control. Simultaneously, the fully digital control significantly improves the system's control accuracy, functionality, and anti-interference capability. Furthermore, the fully digital servo system controlled by the F2407A can achieve various operating modes such as positioning, analog quantity, and torque setting through software programming, and its performance is stable. Experimental results show that the servo system presented in this paper has high control accuracy when performing positioning and speed adjustment, meeting the application requirements of high-performance positioning systems and also suitable for teaching servo systems. Author Biography Jiang Zhongming (1976-) Male, Engineer at Zhejiang Tianhuang Technology Industry Co., Ltd., mainly engaged in the research and development of electrical drive control and DSP control technology products.