Research on the speed loop of DSP permanent magnet synchronous servo system
2026-04-06 02:41:53··#1
To obtain a high-performance AC permanent magnet synchronous servo drive, a high-performance control system is required. Since the 1980s, with the rapid development of various related technologies, research results on vector control systems for permanent magnet synchronous motors have emerged continuously, laying the foundation for the research and application of high-performance permanent magnet synchronous servo systems. With the rapid development of microcomputer technology, especially DSP technology, the digitization of permanent magnet synchronous servo systems is in full swing. The application of digital control technology not only enables the system to obtain high precision and high reliability, but also provides a foundation for the application of new control theories and methods. The application of DSP and single-chip microcomputers has greatly simplified the system structure, improved the system performance, and significantly improved the reliability, flexibility and dynamic performance of permanent magnet synchronous servo systems. This high-precision and fast-response AC servo drive system is widely used in high-precision CNC machine tools, robots, special processing equipment and precision feed systems [1]. The AC servo system is a three-closed-loop control system of current, speed and position. It needs to rely on sensors to accurately detect the instantaneous information of the controlled object and perform error correction. The three-loop structure of the AC servo system is shown in Figure 1. [align=center]Figure 1 Three-loop structure of an AC servo system[/align] Optimizing the performance of each link is the foundation for improving the overall performance of the servo system. The performance of the outer loop depends on the high performance of the inner loop, especially the current loop and speed loop, which are fundamental to the high-performance servo system. The speed loop is a crucial link in the dynamic tracking realization of the servo system. The system needs the speed loop to have good dynamic response speed, a wide speed range, and excellent anti-disturbance characteristics, thus providing the foundation and conditions for the servo system to quickly and accurately position and track. A high-performance AC servo system must not only respond quickly to commands, but also maintain good response performance when large external disturbances occur or the characteristics of the object change. The system must have strong anti-interference performance so that its dynamic characteristics do not change with changes in external parameters. Below, we will study the structural design of the speed link of a permanent magnet synchronous servo system based on the composition and debugging of an actual experimental system. Principle of Permanent Magnet Synchronous Servo System Currently, there are two main schemes for current control of permanent magnet synchronous motors: direct torque control and vector control. Using vector control, the current loop handles the motor armature current response problem well. Within the actual system operating range, as long as the system provides the current waveform required at the speed, the motor current can respond well. The obtained current quadrature axis component is the torque component required for motor rotation, and the motor response performance is excellent [2]. Moreover, in field-oriented vector control, the motor armature magnetic field and the rotor excitation magnetic field are 90 degrees constant (quadrature and direct axis decoupling), which has the linear characteristics of torque control, high current utilization, and easy implementation of regulator design. The coordinate transformation is shown in equation (1): Since the quadrature and direct axis inductances of the surface-mounted permanent magnet synchronous motor are equal, the control mode with id=0 is more suitable [3]. (1) Design of the current loop of the servo system The general principle for designing a multi-loop control system is: from the inner loop to the outer loop, gradually expand outwards one loop at a time. Therefore, start with the current loop, first design the current regulator, then regard the entire current loop as a link of the speed regulation system, and then design the speed regulator. When the motor speed is low, the back EMF of the motor is also relatively small. Therefore, when designing the current loop, the back EMF can be ignored first. This results in the current loop transfer function structure diagram shown in Figure 2. [align=center] Figure 2 Current Loop Transfer Function Structure Diagram[/align] The meanings of the parameters in Figure 2 are as follows: kv is the inverter voltage amplification factor, representing the ratio of the inverter DC side voltage to the triangular carrier amplitude; τv is the inverter time constant, which is related to the switching frequency; rs is the armature winding resistance; lq is the quadrature axis inductance; tσi is the feedback filter time constant; and gacr is the current regulator. The current control of the permanent magnet synchronous servo system is implemented using hardware circuitry. Using a hardware current controller has the advantages of not occupying computer processing time, fast dynamic response speed, reliable operation, and simple and stable protection circuit implementation. The current loop control objects include PWM signal formation, delay, isolation drive and inverter, motor armature circuit, current sampling and filtering circuit. In the servo system, the three current loops are independent. When the servo system implements rotor field-oriented control, it strictly follows the vector control method with id=0 to provide the three-phase motor current. Under the action of the current loop, the actual motor current is the given torque current. Considering that the current loop generally prioritizes its following performance requirements and its anti-interference effect on the grid voltage is a secondary factor, the current loop is corrected into a typical Type I system according to the regulator engineering design method. The current regulator gacr is selected as a PI regulator, and the hardware structure is shown in Figure 3. [align=center] Figure 3 Current Loop Hardware Structure[/align] Figure 3 includes signal conditioning, PI regulation, PWM signal generation, leading and trailing edge delay processing, and protection parts. Among them, i*a is the current command signal from the DSP, and iaf is the motor current sampling signal. After being conditioned by operational amplifiers, they are sent to the regulator, and the output error signal is generated after regulation. This error signal is compared with the triangular carrier signal to form a PWM signal to control the switching state of the corresponding bridge arm switch of the inverter bridge. The two tubes in the same bridge arm conduct complementaryly. To prevent the device from being damaged by direct conduction during the switching process, it is necessary to delay the leading and trailing edges of the PWM signal appropriately. Resistors R12 and R13, capacitors C1 and C2, and gate circuits form an interlocked delay circuit to realize the leading and trailing edge delay of the PWM signal. The protection signal is introduced so that all switching devices can be turned off when the system needs it or when the main switching device fails. In the actual circuit, gal (gal16v8d) is used to complete the leading and trailing edge delay of the PWM signal. The open-loop transfer function of the current loop is obtained as: (2) where km=1/rs, tli =lq/rs are the time constants of the motor armature circuit, ti=tσi+τv is the time constant of the equivalent small inertial element, and τi is the integral time constant of the current regulator. In order to make the current loop have a faster response speed and the overshoot is not too large, the cutoff frequency of the speed loop is generally relatively low, so gik can be reduced in order and is equivalent to the first-order inertial element shown in equation (3), where, (3) Design of the speed loop of the servo system When setting up the speed regulator, the designed current loop can be regarded as a link of the speed regulator, and the closed-loop transfer function shown in Figure 4 is obtained. In this case, gasr is the current regulator, kφ is the motor electromotive force coefficient, tm is the motor electromechanical time constant, and ton is the speed feedback filter time constant. Therefore, the transfer function of the speed regulator control object is: (4) The small inertial link is approximated. The small time constants tl and ton are merged into an inertial link with a time constant of tσn=tl+ton. The speed loop control object is an inertial link and an integral link connected in series. There is already an integral link after the load disturbance point. Based on the requirement of no steady-state error, an integral link must be set before the disturbance point. Therefore, a type II system is required. From the perspective of dynamic performance, the speed regulation system first needs to have good anti-disturbance performance. The typical type II system meets this requirement. The speed regulator is a PI regulator, and its transfer function is: This system requires two unknown parameters. For ease of analysis, a variable h is introduced, defined as h = τn/tσn, where h is the bandwidth in the Type II system. When the object parameter tσn is constant, changing τn changes the mid-frequency bandwidth. After τn is determined, kn is changed to shift the amplitude-frequency response vertically, thereby changing the cutoff frequency ωcn. Therefore, in the design, choosing h and ωcn means choosing τn and kn, as shown in Figure 5 [4,5]. [align=center] Figure 4 Speed loop transfer function structure diagram Figure 5 Typical Type II system Bode diagram[/align] After determining h and ωcn, τn and τn can be obtained. Generally, when the mid-frequency bandwidth h = 5~6, the Type II system has good tracking and disturbance rejection performance. The speed regulator in this system is implemented by a DSP microcontroller, and we use the algorithm of "discrete PI regulation + PI time-division regulation" to achieve this. The speed pi regulation operation expression is: (7) where t, e(k), and un(k) are the sampling period, the deviation value of the kth sampling, and the output at the kth sampling time, respectively. The speed loop regulation is a pi regulator, but in order to improve the step response speed of the speed loop and suppress the saturation of the pi regulator, a bang-bang control mechanism is introduced in the speed regulation control. The speed regulator is designed in this form, and different proportional-integral coefficients are set according to the speed range when the speed change is small or only during the load disturbance. When the speed change exceeds the specified value, the system accelerates or decelerates according to the maximum or minimum armature current, which fully utilizes the potential of the motor. Its control algorithm is: (9) where kp and ki are the proportional-integral coefficients of the speed loop, em is the speed error threshold, and um is the given limit of the bang-bang control output current. After adopting the above bang-bang control method, the dynamic response performance of the speed loop of the system has undoubtedly been greatly improved. However, due to the role of the pi regulator, speed overshoot is inevitable. A simple and effective way to solve this problem is to introduce speed differential negative feedback on the speed regulator, so that the desaturation time of the speed regulator is advanced. The pi regulator with differential negative feedback conforms to the "optimal control of full-state feedback" in modern control theory in terms of structure, and thus can obtain the optimal dynamic performance that is actually feasible. System software design The main control circuit adopts the high-performance DSP controller TMS320LF2407A from TI as the control core. It integrates a high-performance DSP core, a large-capacity on-chip memory, a dedicated motion control peripheral circuit, and other peripheral circuits on a single chip. It has the advantages of programmability, high integration, flexibility, good adaptability, and convenient upgrade [6]. The software of the permanent magnet synchronous motor speed controller includes the DSP main program and the DSP servo control program. The main program mainly completes the initialization of the control register, enables the interrupt function, and sets the initial values of the relevant parameter variables. The DSP servo control program consists of four parts: a timer interrupt program, a photoelectric encoder zero-pulse capture interrupt program, a power drive protection interrupt program, and a communication interrupt program. The interrupt program includes subroutines for position calculation, speed calculation, and speed adjustment. The use of a high-performance DSP device ensures the execution of complex vector control calculations and improves system response time. Current detection is achieved using a Hall current sensor and the DSP's integrated A/D conversion module. Only two phases of the motor stator three-phase winding need to be detected; the third phase can be calculated from the three-phase balance. The rotor position angle and speed can be calculated from two A/D samples. Rotor position detection uses an incremental photoelectric encoder. The photoelectric encoder detects two orthogonal pulse signals (A) and (B), one zero-position pulse signal (Z), and three initial position pulse signals (U, V, W) with a 120-degree phase difference, thus achieving initial position positioning. a, b, z, u, v, and w are all differential signals, first converted into single-channel signals by a 4-wire receiver AM26LS32, and then sent to the DSP's capture port (a, b, z) and general-purpose I/O port (u, v, w), respectively. The interrupt period is set to 0.1 ms to complete one speed loop and position loop control cycle, and the controller's PWM frequency is set to 18 kHz. The communication interrupt routine is mainly used to receive and refresh control parameters, and simultaneously set the operating mode; the power drive protection interrupt routine is used to detect fault outputs of the intelligent power module. When a fault occurs, the DSP's output channel will be blocked, thus making the output a high-impedance state. The structure of the control software is shown in Figure 6. [align=center]Figure 6 Interrupt Service Routine[/align] Conclusion This paper explores the control strategy of a permanent magnet servo system. The TMS32of24o7, which has good control performance and is relatively inexpensive, is used to design the system's speed control. The designed permanent magnet synchronous motor AC servo system has a wide speed ratio and excellent dynamic response characteristics. It is easy to control, has good static and dynamic performance, and is suitable for small and medium power servo systems, showing great application potential.