Abstract: This paper discusses the establishment of a simulation model for a permanent magnet synchronous servo system and simulates the three closed-loop system in the Simulink simulation environment. The differences between the engineering design results and actual analysis results of the current loop, speed loop, and position loop of the servo system are analyzed. The influencing factors of the three closed loops are investigated, along with the methods for adjusting the regulator parameters to achieve excellent response performance when these factors change, and the introduction of current differential negative feedback and speed differential negative feedback control strategies. Through the adjustment of regulator parameters and the introduction of differential feedback, the servo system can achieve excellent response performance.
Keywords: permanent magnet synchronous motor, servo system, simulation, differential negative feedback
0 Introduction
Simulation is a crucial tool in system analysis and research. Through simulation, the correctness of theoretical analysis and design can be verified, the operation of actual systems can be simulated, the variation of system characteristics with parameters can be analyzed, the state and characteristics of the system can be described, and whether the design results meet practical requirements can be explored. System stability can also be discussed, the impact of system control parameters and load changes on system dynamic performance can be studied, and the improvement and enhancement of system performance through control methods and techniques can be investigated. Therefore, simulation serves the same purpose as experimentation, while avoiding the complexity of actual experimental operations, and enabling the simulation of systems or processes that cannot be experimentally performed. For servo systems, many factors influence system operation. Finding optimal control parameters and adopting appropriate control methods in complex environmental conditions is a problem that needs in-depth exploration in servo system design and operation. These factors will affect the operation of the actual system and its adaptability to the environment.
The following discussion focuses on the creation of a simulation model based on Matlab software, based on the actual configuration of a permanent magnet synchronous servo system. The system is then simulated in the Simulink environment, and the simulation results are analyzed to identify the system's control laws, optimize the control method, and analyze the system's operating characteristics, thus facilitating the system's design, adjustment, and operation.
1. Establishment of Simulation Model for Permanent Magnet Synchronous Servo System
The servo system in Figure 1 is a typical three-loop regulation system of current, speed, and position. All regulators, comparators, filters, etc. in the system can be found in the corresponding toolboxes in Simulink; there is a permanent magnet synchronous motor model in PSB, and its parameters are set in the model properties; the motor current and voltage measurement modules are in the Measurements toolkit of PSB; the comprehensive measurement module Machine Measurement Demux of the motor can simultaneously measure the motor angular velocity, armature current, quadrature and direct axis current, electromagnetic torque, and rotor position angle; the 3/2 and 2/3 coordinate transformation of the system is established with the help of the Fcn function; the PWM inverter in the system is established with the help of the physical model, and the current regulator output is compared with the triangular wave to form a PWM signal, which outputs the three-phase voltage of the motor port through the controlled voltage source; the current setpoint and feedback are filtered by the first-order stage to eliminate high-order harmonics in the signal and ensure the stable operation of the system; the parameters required by the system are obtained through an oscilloscope. For specific model establishment, please refer to relevant literature [1]. Thus, the simulation structure of the servo system is shown in Figure 1.
Figure 1. Simulation structure diagram of AC permanent magnet synchronous servo systemIn Figure 1, the PWM inverter is a key component of the servo system, which completes the control of the motor input power from the control signal. Its internal structure is shown in Figure 2. (a) shows the internal structure of the PWM inverter, and (b) shows the conversion between the dq rotating coordinate and the abc three-phase coordinate.
Figure 2. Internal structure diagram of the inverter of the AC permanent magnet synchronous servo system.
In Figure 2(a), the current input and feedback are filtered and sent to the current regulator for adjustment. The output saturation stage indicates that the regulator has forward and reverse output limits. The regulator output control signal is compared with the triangular wave to generate a PWM signal, which is applied to the motor port through the controlled voltage source (inverter). In actual operation of the inverter, in order to prevent shoot-through short circuit, the upper and lower transistor switches have a control dead zone, but this is not considered in the simulation, so it is different from the actual operation. In Figure 1, the dq/abc unit represents the conversion between three-phase coordinates and synchronous rotating coordinates, that is, the realization of formula (1), and its internal structure is shown in Figure 2(b).
(1)
2. Servo System Simulation Results and Analysis
2.1 Simulation and Analysis of Current Loop
This system implements rotor field-oriented vector control. The speed loop output is the torque current, representing the torque current requirement under a specific load. After a 2/3 transformation, the torque current provides the three-phase current of the motor, which is then adjusted without error by a current regulator. Therefore, the parameters of the current regulator have a decisive influence on the dynamic current response.
A dynamic simulation topology for the current loop was constructed based on the actual connection of the servo system, and simulations were performed on various operating conditions of the system. Simulation results show that the larger the amplification factor of the current regulator, the faster the current response and the smaller the current tracking error during dynamic processes, but the more severe the overshoot. The larger the zero point of the current regulator, the faster the current response, but the more oscillations the current response has, and the more the overshoot increases. For this system, when the regulator proportional coefficient is between 20 and 30 and the zero point is between 500 and 2500, the current loop can meet the step tracking response requirements, and the regulator parameters can be taken within this range. Generally speaking, the parameters of the current loop designed according to the regulator engineering design method are conservative. Moreover, for simplicity, the influence of back EMF on the current loop is ignored during the design, resulting in a slow dynamic response for current tracking due to the influence of back EMF and a large deviation. If the motor current cannot quickly and accurately track the given value during dynamic processes, the system cannot obtain decoupled control with id=0. Therefore, it is necessary to make appropriate adjustments to the current regulator parameters based on the simulation results.
However, when the current regulator parameters are in this range, the response will oscillate and overshoot. The larger the regulator zero point, the more severe the overshoot. This is an inevitable phenomenon when using a PI regulator and ensuring a fast current response. To suppress response overshoot, differential negative feedback is added to the current feedback loop. For this system, when the differential feedback control gain is between 0.0006 and 0.001, the current step response is good, the current response speed is fast, and there is no oscillation overshoot. This can be applied in actual systems. The simulation results of the current loop are shown in Table 1 [2].
Table 1. Simulation-obtained current regulator parameter range
2.2 Simulation and Analysis of the Velocity Loop
To study the parameter settings of the speed regulator, the speed loop was simulated according to Figure 1. With the system under no-load, the amplification factor and integral factor of the speed regulator were adjusted, and simulations were performed for each case. To save space, Figure 3 only shows the speed step response for proportional amplification factors of 0.1 (Figure a) and 0.5 (Figure b), with integral factors from left to right representing 0.01, 0.05, 0.1, and 0.5. Simulation results show that under no-load conditions, the system exhibits a relatively good speed step response when the proportional factor of the speed regulator is between 0.1 and 1, and the integral factor is between 0.01 and 0.1. When the proportional factor approaches 1, the speed step response exhibits oscillation and overshoot. The simulation also revealed that under no-load conditions, the integral factor of the speed regulator can be further reduced to still meet the speed step response requirements. However, if the integral factor is too small, the integral will not function, and the regulator will become a single proportional control.
Figure 3. Speed step response under no-load conditions with varying speed regulator parameters.
The actual system speed regulator parameters are designed according to a linear Type II system. During speed step transitions, the regulator will saturate, and the actual operating conditions of the system differ significantly from the linear system used in the design. Furthermore, the initial conditions for the regulator design differ greatly from the initial conditions when the regulator participates in regulation after desaturation in the actual system. Therefore, the design results based on the engineering design method require significant adjustments to meet the actual system requirements. Thus, the regulator engineering design method is not suitable for the design of the speed loop in a servo system, although it remains applicable regarding the selection of the regulator type.
When a sudden step load is applied to the system, the system will experience both dynamic and steady-state speed drops under the load. Simulations of the actual system were conducted using various combinations of regulator parameters. The simulation results show that the speed loop exhibits good speed step and disturbance rejection response performance when the proportional gain is around 0.5 and the integral gain is around 0.1. Figure 4 only shows the response when the proportional gain is 0.5 and the integral gain is 0.001, 0.01, 0.1, and 0.5. Comparing these responses, it can be seen that the speed response performance is better and the steady-state error from the given speed is smaller when the proportional gain is 0.5 and the integral gain is 0.1.
Figure 4. Response of speed regulator parameters under sudden load conditions.
Simulation results show that, in actual system operation, to obtain a relatively fast speed step response and ensure good response performance of the speed loop under any load, the proportional coefficient of the speed regulator can be taken to be around 0.5, and the integral coefficient can be taken to be around 0.1. However, with the selected regulator parameters, oscillations and overshoot will occur during the speed step response, which is detrimental to the positioning process of the servo system.
Speed overshoot is an inevitable consequence of using a PI controller and requiring a fast response, because the controller needs to exit saturation and participate in regulation. Furthermore, observing the current, electromagnetic torque, and voltage waveforms in the speed oscillation section reveals varying degrees of oscillation, indicating a trade-off between system response speed and stability. The proportional-integral (PI) coefficient of the controller has a crucial impact on the system's speed response. Therefore, in actual adjustment, a trade-off must be struck between speed and stability. Simulation results show that as the proportional gain of the controller increases, the speed response accelerates, but the overshoot increases; conversely, as the proportional gain decreases, the overshoot decreases, even becoming an overdamped response, resulting in a slower response. The integral coefficient of the controller affects the accuracy of the speed response. Under no-load conditions, the integral coefficient can meet the speed regulation accuracy within a wide range. Under load disturbances, as the integral coefficient of the controller increases, the steady-state error of the speed response decreases, and the speed stability of the motor improves.
To avoid speed response oscillations and overshoot during dynamic processes, speed differential negative feedback is applied to the speed feedback loop. This feedback, along with the speed negative feedback, works together to dynamically adjust the motor speed. Figure 5 shows the speed step response when the proportional-integral coefficients of the regulator remain constant (proportional coefficient 0.5, integral coefficient 0.1) and the speed differential feedback coefficients are 0, 0.002, 0.004, and 0.008. As can be seen from the figure, when the differential feedback coefficient is in the range of 0.002 to 0.004, the speed step response is fast and there is no speed overshoot. The introduction of speed differential negative feedback can predict the trend of motor speed changes, conforms to the full-state feedback control of modern control, and can effectively suppress speed overshoot.
Furthermore, after adding speed differential negative feedback to the system, the range of variation of the proportional-integral coefficient of the speed regulator can be expanded. For example, when the differential coefficient is 0.004, the proportional coefficient of the speed regulator can be increased to twice the original value without speed response oscillation or overshoot. By increasing the proportional coefficient, the system can have better speed stabilization accuracy.
Figure 5. Speed step response when speed regulator parameters remain constant but speed differential feedback coefficient changes.
Keeping the regulator parameters constant (proportional coefficient 0.5, integral coefficient 0.1), and the derivative feedback coefficient 0.002, the speed response during motor speed jumps and sudden load increases when the object's moment of inertia changes from one, two, to three times the motor's moment of inertia is shown in Figure 6. This indicates that under these regulator parameters and derivative feedback coefficient, the speed response to changes in the object's moment of inertia can meet practical requirements. Simulations also show that with these parameter values, the speed response exhibits good performance when the object's moment of inertia changes from 1 to 10 times the motor rotor's moment of inertia. Considering that the moment of inertia of the controlled object in actual servo systems generally does not exceed ten times the motor's moment of inertia, the selected parameters can meet practical requirements. In reality, as the object's moment of inertia increases, its corresponding electromechanical time constant increases, the open-loop amplification factor of the speed closed-loop system decreases, and the system speed response slows down. However, because the proportional coefficient of the regulator selected in this system is relatively large, the speed response exhibits overshoot and oscillation without derivative feedback. Under differential feedback, the system can cover a wide range of object parameter changes, meaning that under the selected parameters, the system can adapt to changes in the object's moment of inertia.
Figure 6. Velocity step response when the velocity regulator parameters remain constant but the object's moment of inertia changes.
Furthermore, the speed loop output limiting value also affects the motor's speed response, as shown in Figure 7. In the figure, the proportional-integral coefficients of the speed regulator remain constant (proportional coefficient 0.5, integral coefficient 0.2), and the speed regulator output limits are the speed step responses at 60%, 100%, and 150% of the rated torque. It can be seen that as the regulator output limit increases, the speed response accelerates, and the oscillation degree at the specified speed increases. The output limiting value determines the magnitude of the motor's acceleration torque during dynamic processes, affecting the motor's acceleration during acceleration and deceleration, and thus the system's speed response. Its value needs to be set appropriately, fully utilizing the motor's overload capacity to improve its speed response performance. Simultaneously, speed differential feedback should be set to suppress speed response overshoot. Simulation results show that when the speed differential feedback coefficient is 0.004, speed response overshoot can be effectively suppressed within the motor's limiting torque range. Based on the simulation results, the speed loop parameters can be taken from the values shown in Table 2.
Figure 7. Speed step response when the speed regulator parameters remain constant but the output limit value changes.
Table 2. Range of speed regulator parameters obtained from simulation.
2.3 Simulation and Analysis of Position Loop
The system position loop is designed according to a typical Type I system, with parameters satisfied to avoid position response overshoot. Based on the position loop design analysis, the position regulator is a proportional regulator. When the position is given, the position regulator output has a limit, which corresponds to the speed limit allowed by the system motor. The position loop response is shown in Figure 8 when the speed limit is 2000 r/min.
Figure 8 shows the position response of a single motor under no-load conditions. The left figure shows the position response when running according to the design parameters (KPW=0.743), and it can be seen that the response process is not optimal at this time. When the proportional coefficient of the regulator is adjusted to 0.9, the position response (middle figure) is better, and the positioning and position following speed is fast and accurate. The right figure shows the response when the proportional coefficient is too large (1.0), at which point position response overshoot occurs.
Figure 8 Position response during position adjuster parameter adjustment
In Figure 8, the two upper curves represent the motor speed and position response, while the lower curve represents the motor quadrature-axis current waveform.
When the motor's moment of inertia doubles, the position response is optimal when the regulator's proportional gain is approximately 0.45. This proportional gain is approximately half of the optimal proportional gain shown in Figure 8. When the motor's moment of inertia triples, the position response is optimal when the regulator's proportional gain is approximately 0.3. When the motor's moment of inertia quadruples, the position response is optimal when the regulator's proportional gain is approximately 0.225. When the motor's moment of inertia quintuples, the position response is optimal when the regulator's proportional gain is approximately 0.18.
As can be seen, with the increase of the motor shaft coupling moment of inertia, the proportional coefficient of the regulator will decrease proportionally to obtain the optimal position response. The simulated regulator proportional coefficient value is quite close to the calculated value, as shown in Figure 9. However, the figure also shows some differences between the design and simulated values. This is because the amplification factor of the equivalent inertial element of the speed loop used in the calculation was too large.
In the engineering design, the velocity closed loop is replaced by an equivalent first-order inertial element, thereby realizing the engineering design of the position loop. From the engineering design to the simulation analysis, it can be seen that this simplified equivalence can meet the actual engineering needs, and its engineering design parameters are close to the simulation results, indicating that the engineering design method of the regulator can be applied to the engineering design of the position loop.
With a constant moment of inertia, the system's position loop can achieve excellent response performance by adjusting the regulator's proportional gain. The final positioning of the system, achieving optimal position response, is achieved during the motor's braking process. The positioning process is completed simultaneously when the motor braking ends. Therefore, a good match between the regulator parameters and the object's parameters is necessary.
Figure 9. Simulation and calculation results of position regulator parameter values.
In Figure 8, the regulator parameters are too large, resulting in overshoot in both position and speed responses. This indicates a necessary correlation between position overshoot and speed overshoot during motor braking in the final positioning process of the servo system. When the regulator proportional gain is too small, although there is no overshoot in the position response, the motor speed response is slow, prolonging the system positioning time. Therefore, the amplification factor of the position regulator affects the system response process; whether large or small, it will increase the system response time. Only by appropriately selecting the regulator parameters can the system achieve both fast position response and no overshoot.
When the motor's moment of inertia increases, to avoid overshoot in the position response process and ensure both fast and accurate position response, the proportional gain of the regulator must be reduced accordingly. Otherwise, the system's response process will be delayed due to the reduction of the closed-loop dominant pole, and the system's time to reach stability will be prolonged. To obtain the optimal position response, the regulator parameters must be adjusted in a timely manner according to the moment of inertia.
The previous simulations were obtained under no-load conditions. If there is a load disturbance, the regulator parameters need to be adjusted to ensure a faster system response, as shown in Figure 10. In the figure, the left graph shows the position response of the motor under no-load conditions with a regulator proportional coefficient of 0.9 and the moment of inertia of a single motor; the middle graph shows the position response with the rated load applied after 0.1 seconds, with the regulator parameters unchanged, showing a slower position response; the right graph shows the position response after adjusting the regulator parameters (KPW=1.33).
Simulation results in Figure 10 show that, with a constant moment of inertia, increasing the proportional gain of the regulator in real time as the motor load increases allows the system to adapt to load changes and ensures good position response performance. Physically, when the motor load increases, the load torque is opposite to the direction of motor motion. The combined effect of the load torque and the motor's electromagnetic torque should brake the motor, which should theoretically be beneficial. However, during servo positioning, the motor speed decreases rapidly, resulting in a lower speed at the final positioning stage and a longer time to reach the designated position (positioning). To enable rapid positioning by the servo system, the positioning speed needs to be increased. Increasing the proportional gain of the regulator can improve the positioning speed under the same position error, achieving rapid positioning.
Figure 10 Position response of the servo system under load
To achieve optimal position response, the proportional gain of the position regulator should be adjusted accordingly to accommodate changes in the object's moment of inertia, load, position regulator output limit, and position setpoint. For brevity, Figure 11 shows the curves of the regulator parameters as a function of these parameters when the position loop achieves its optimal response.
Figure 11 Relationship between position loop parameters and system operating conditions
In Figure 11, (a) shows the relationship between the position regulator parameters and the moment of inertia of the motor shaft when the position response is optimal; (b) shows the relationship between the position regulator parameters and the load torque; (c) shows the relationship between the position regulator parameters and the regulator output limit value; and (d) shows the relationship between the regulator parameters and the position setting when the position regulator output limit is constant (2000 r/min). It is evident that many factors influence the position loop response process. It is necessary to consider various possible situations in the actual system, appropriately limit certain parameters, such as speed limits, and adjust the position regulator parameters in a timely manner to obtain excellent position response performance.
3. Stability Analysis of Each Component of the Permanent Magnet Synchronous Servo System
If the influence of electromotive force (EMF) is ignored, the system current loop is shown in the left figure of Figure 12. If the influence of EMF on the current loop is not ignored, the current loop is shown in the right figure of Figure 12. From this, the amplitude-phase frequency characteristics of the current loop with and without EMF can be obtained. The frequency characteristics show that ignoring EMF has no impact on the dynamic stability of the current loop; its presence only affects the amplitude-phase frequency characteristics in the low-frequency range, not the high-frequency characteristics, and the phase angle stability margin is basically equal. The current loop cutoff frequency satisfies the condition of ignoring the motor back EMF and also satisfies the equivalent condition of small inertia elements. Therefore, in practical design, the influence of EMF can be ignored, and the regulator engineering design method can be directly used to design the current loop. With a fixed integral coefficient of the current regulator, the larger the proportional coefficient, the higher the cutoff frequency of the open-loop amplitude-phase frequency characteristic of the current loop, the faster the current response, and the smaller the system stability phase angle margin. The system aims for rapid current tracking; therefore, the proportional gain of the regulator should be increased as much as possible, where permissible. With a fixed proportional gain, the smaller the integral gain, the smaller the gain of the open-loop frequency response of the current loop in the low-frequency range, and the larger the steady-state error of the system. Therefore, the integral gain of the current regulator should be increased as much as possible while ensuring system stability.
The current loop is simplified and equivalent to a first-order inertial element, which is used as part of the speed loop control object to form the closed-loop dynamic structure of the speed loop, as shown below.
Figure 12 shows the dynamic structure of the current loop without considering the effect of back EMF (left) and with considering the effect of back EMF (right).
Figure 13 shows the open-loop frequency characteristics of the speed loop, obtained from the speed loop design results. The frequency characteristics indicate that the speed loop has a relatively large phase angle stability margin, allowing the regulator parameters to take values over a wide range. As the speed regulation proportional coefficient increases, the amplitude-frequency characteristic curve shifts upward, the phase angle stability margin decreases, the motor speed response accelerates, and the overshoot increases. As the integral coefficient increases, the time for the speed response to reach stability accelerates, and the system stability margin decreases. In actual system operation, with the increase in the rotational inertia of the load carried by the motor, the open-loop amplitude-phase frequency characteristics of the speed loop shift downward, and the system response slows down. To ensure the system meets engineering design requirements, the proportional coefficient of the speed regulator should be appropriately increased, while the integral coefficient can remain unchanged.
Figure 13 Dynamic structure diagram of the speed loop of the servo system
The open-loop frequency characteristics of the position loop were also obtained. These characteristics show that the position loop remains stable over a relatively wide frequency range. Although the position response speed can be improved by increasing the proportional gain of the position regulator, this will lead to position response overshoot, which is absolutely prohibited in practical systems. Furthermore, as the moment of inertia of the motor shaft increases, the phase margin of the position loop decreases. With a fixed proportional gain, the system stability declines; therefore, the proportional gain must be adjusted appropriately.
4. Conclusion
This paper establishes a simulation model of a permanent magnet synchronous servo system, and simulates the entire system in the MATLAB simulation environment. The simulation results are then analyzed.
Simulation results of the current loop show that the regulator engineering design method is still applicable, but the engineering design results are conservative, with slow current dynamic following response, large deviations during the dynamic response process, and neglect of the influence of back EMF on the current loop. To improve the dynamic response performance of the current loop, suppress the influence of back EMF, and ensure the realization of id=0 decoupling control, the regulator parameters should be adjusted according to Table 1 based on the simulation of the dynamic response process. To suppress current loop response overshoot, current differential negative feedback is introduced. Simulation results show that by appropriately selecting and determining the current regulator parameters and setting the current differential negative feedback appropriately, current response overshoot can be suppressed while ensuring fast response.
Simulation results for the speed loop show significant differences between the simulated speed regulator parameters and the design results under no-load and load variation conditions. The regulator saturates during the speed response process. When designed as a linear type II system, the initial conditions for the speed regulator differ greatly from the initial conditions for desaturation operation during actual system operation. Significant adjustments to the design results are needed to meet the requirements of the actual system. This indicates that the engineering design method is not suitable for the design of the speed loop in a servo system, although the selection of the regulator type remains applicable. Load variation, changes in the object's moment of inertia, and the speed regulator's output limiting value are the main factors affecting the speed response process. Appropriate selection of regulator parameters and proper setting of speed differential feedback can prevent oscillations and overshoot while ensuring fast response, and adapt to changes in load and object's moment of inertia.
Simulation results of the position loop show that load variations, changes in load moment of inertia, changes in velocity limit values, and changes in position setpoints all affect the system's position loop response. To obtain the optimal response process while keeping other quantities constant, the system position regulator parameters must be adjusted according to the pattern shown in Figure 11.
The stability analysis of the three loops of the servo system shows that the designed servo system is stable. The influence of changes in parameters such as object parameters, load, and moment of inertia on the stability performance of the system is discussed, thus providing a comprehensive understanding of the permanent magnet synchronous servo system and laying the foundation for further research and improvement of the servo system's performance.
References
1. Zheng Hongxing, Yao Jihuan, Zhang Cheng, eds., MATLAB 5.x Toolbox Usage Techniques and Examples, Huazhong University of Science and Technology Press, 2001.1
2. Chen Rong, Simulation Study of Current Loop in Servo System of Permanent Magnet Synchronous Motor, Motor and Control Applications, 2007.3
3. Hla Nu Phyu, MAJabbar, Liu Zhejie and Bi Chao, Modeling and simulation of brushless permanent magnet DC motor in dynamic conditions by time stepping technique, International Electric Machines & Drives Conference, 2003, Madison, WI, USA
4. Wang Chengyuan, Yang Junyou, et al., Simulation of AC servo system of permanent magnet motor controlled by DSP, Journal of Shenyang University of Technology, 1997, Vol.19(3).
5. Wang Li, Liu Jia, Yan Yangguang, Modeling and Simulation of Vector Control System for Permanent Magnet Synchronous Motor, Journal of Luoyang Institute of Technology, 2001, Vol.22(4).
6. Wei Rong, Xu Zhenlin, Wang Xiuzhi, A new tool for simulation of electrical drive systems - MATLAB 5.2 electrical system module library, Electrical Drive, 2000(1).
7. Mao Qinghai, Wang Zhenmin, Zhang Guojun, Simulation of Electric Drive Control System Based on MATLAB 5.2, Electronic Technology, 2000(4).
8. Power System Blockset User's Guide, Version 2, The MathWorks Inc., 2000
9. Chen Boshi, Automatic Control Systems for Electric Drives, Machinery Industry Press, August 2003.