Abstract Stepper motors are digital discrete motors, particularly suitable for digital discrete control. However, their mathematical model is highly nonlinear, making it difficult for PID control to achieve high precision. This paper combines fuzzy control and PID control, achieving automatic switching based on a pre-set error range.
Keywords: stepper motor fuzzy control, PID parameter self-tuning, mathematical model simulation
Stepper Motor Fuzzy PID Control
Sun Pan Jun Yan Xue Wen
(School of Electronic Information Engineering Tai Yuan University of Science And Technology)
Abstract Stepper motor is a digital discrete motor, that is particularly suitable for digital discrete control. But its mathematical model is highly nonlinear, PID control is difficult to achieve high precision performance, the paper combines the fuzzy control with PID control. According to set good error range, the system can achieve automatic switching.
Key words stepper motor PID Fuzzy control Parameter Self-tuning Mathematical Model Simulation
1. Introduction
Stepper motors are essentially digital discrete motors, directly accepting digital signals and converting electrical pulse signals into displacement signals; that is, a pulse signal causes the stepper motor to rotate by a certain angle. The control variables within a stepper motor are highly nonlinear and interconnected. Traditional PID control, based on precise mathematical models, cannot effectively handle uncertainties in the system, and using constant PID parameters cannot achieve good control results. Fuzzy control does not require a precise mathematical model of the object, is insensitive to system changes, has good robustness, and strong anti-interference capabilities. However, due to its fuzzy nature, its steady-state accuracy is poor. In such cases, fuzzy control and PID control can be combined.
2. Mathematical Model of Hybrid Stepper Motor
This paper uses a two-phase stepper motor. Ignoring the effects of mutual inductance, leakage flux, hysteresis, eddy current, saturation, etc., we use an equivalent effective RL circuit winding for one phase for analysis.
Using a 4-step phase progression, and taking phase A as the reference, phase B lags phase A by 90 electrical degrees. Therefore, the following current equation applies:
According to the laws of mechanics, the mechanical motion equations of an electric motor can be written as follows:
Where is the motor torque, is the load torque, is the moment of inertia, is the coefficient of viscous friction, and is the rotor angular velocity. Assuming the load torque is zero, the following differential equation holds:
Equations (1), (2), (3), and (4) form the mathematical model of a two-phase stepper motor. It can be seen that the stepper motor is a highly nonlinear controlled object, which requires a very complex control method. Fuzzy control is just right for this characteristic.
3-stepper motor fuzzy PID design
In industrial control, PID control is the most widely used analog control method. By discretizing the samples using a computer, digital PID formulas can be implemented.
This paper adopts a two-dimensional fuzzy control system. The fuzzy inference input fuzzy linguistic variables are deviation E and deviation change rate EC. The fuzzy domain is [-3 3]. The output is the three change increments of PID, , and . The linguistic values of the input fuzzy linguistic variables E and EC and the output fuzzy linguistic variables are both selected as 7, namely {negative large (NB), negative medium (NM), negative small (NS), zero (Z), positive small (PS), positive medium (PM), positive large (PB)}.
Let the control deviation and the rate of change of deviation, as well as the basic universe of discourse [-0.5 0.5], determine the quantization factor and the fuzzy factor.
Table 1 KP Fuzzy Rules
Table 2 KI Fuzzy Rules
Table 3 KD Fuzzy Rules
Fuzzy reasoning and defuzzification are also important. Defuzzification is the process of drawing control variables based on the results of fuzzy reasoning. Commonly used methods include the maximum membership method, the median method, and the weighted average method. The maximum membership method has trapezoidal discontinuity, which is not conducive to system stability, while the weighted average method is beneficial to system stability. Therefore, this paper adopts weighted reasoning.
Figure 2. Simulation model of stepper motor fuzzy PID control using SIMULINK
Fuzzy controllers possess excellent dynamic characteristics, but their static characteristics are not satisfactory, while PID control offers high steady-state static accuracy. By introducing PID control into a fuzzy controller, fuzzy control is used over a large error range, while PID control is switched to a smaller error range. The switching between the two is automatically achieved by a pre-set program based on the error range.
4. Simulation Results Analysis
With the same input of 10 rad at the given position, Figure 4 also achieved the required result, but significant jitter occurred in the middle. However, after adopting fuzzy PID control, as shown in Figure 5, the system response was much faster, the overshoot was very small, and the process stability was greatly improved. This demonstrates that fuzzy PID control met the basic requirements of the control system and is indeed superior to simple PID control.
5. Conclusion
By modeling the stepper motor, we can see that it is a complex, highly nonlinear system. The fuzzy PID control system in this paper is a significant improvement over ordinary PID control. However, due to the existence of the maximum starting speed of the stepper motor, it is prone to step loss and oscillation. In order to maintain stability and start-stop time as much as possible, fuzzy self-tuning technology can be used. By changing the value of KP, the direct start speed and stop speed of the stepper motor can be set to a value less than 1, which can further improve the system response speed.
References
1 Shi Jingzhuo. Servo Control Technology for Stepper Motors [M]. Beijing: Science Press, 2006.
2 Li Qingchun A PID Fuzzy Controller (Fuzzy PI + Fuzzy ID Type) Control and Decision, July 2009, Vol. 24, No. 7
3 Liu Weiguo, Song Shoujun. Modeling and Simulation of Common Control Methods for Three-Phase Reactive Stepper Motors. Micromotors, Vol. 40, No. 8 (Total No. 164), 2007.
4. Xie Shihong, MATLAB R2008 Control System Dynamic Simulation Example Tutorial (MATLAB Application Series), Chemical Industry Press, January 2009.
5 Wang Xiaoming, Microcontroller Control of Electric Motors, Beijing University of Aeronautics and Astronautics Press, June 2008
6. Wang Zongpei, Stepper Motor and Its Control System [M]. Harbin: Harbin Institute of Technology Press, 1984.
About the Author
Sun Panjun (1984-), male, Han nationality, postgraduate student of Control Theory and Control Engineering, Taiyuan University of Science and Technology, Shangqiu, Henan Province, class of 2007.
Yan Xuewen (1959-) Male, Han nationality, Professor and Master's Supervisor, School of Electronic and Information Engineering, Taiyuan University of Science and Technology, Jinzhong, Shanxi Province. Research areas: Control Theory and Control Engineering. Mailing Address: P.O. Box 633, School of Electronic and Information Engineering, No. 66 Wuliu Road, Wanbailin District, Taiyuan, Shanxi Province, 030024, China. Mobile: 15135152781. Email: [email protected]