A New Technique for Controlling Hybrid Stepper Motor Through Modified PID Controller

-- Due to the development of digital control systems, hybrid stepper motors became more attractive to be used in robotics and computer numerical control machines where they have to perform high-precision positioning operations without any feedback sensor. However, at open loop control (especially at higher stepping rate), the speed response of the stepper motor suffer from large overshoot, oscillatory response and long settling time. Therefore, a closed loop control system essentially required for a good precise operation performance. However, due to the non-linear characteristics and the resonance problem of the hybrid stepper motor, it is difficult to settle the classical control systems with this type of motor. Moreover, the use of discrete pulses to drive the hybrid stepper motor in half stepping mode leads to jerky and noisy movements at high and low stepping rate respectively. The objective of the present paper is to use the PID control system to enhance the performance of the open loop control system to control the speed of the hybrid stepper motor for a given reference input. Also, a microstepping technique, which consists of sine and cosine waveforms, is also used to drive the hybrid stepper motor instead of discrete pulses. Therefore, a simulation program is constructed using MATLAB software version 7.7 to simulate the hybrid stepper motor performance in open loop, classical PID and modified PID control systems. Results show that the open loop control system suffers from oscillatory response at half stepping mode and form from large overshoot and long settling time at microstepping mode. Also, the classical PID control system didn’t give consistent results. And, the proposed control algorithm gives a better performance than that of the open loop even when the system is subjected to a sudden load disturbance up to 41% and working at high motor speed.


INTRODUCTION
Nowadays, hybrid stepper motors (HSM) are widely used in precision positioning applications such as robotic positioning systems, tracking and production lines.HSM can be driven by digital and open loop control system.In open loop control, the speed response of the HSM suffers from large overshoot, oscillatory response and long settling time.Additionally, the motor must respond to each excitation change.If the excitation changes are made too quickly, the stepper motor may lose some steps and therefore it will be unable to move the rotor to the new demanded position.Therefore, a permanent error can be introduced between the load position and that expected by the controller [1].Due to these limitations, the stepper motor cannot be used without feedback sensor and closed loop control system with high performance applications where the exact position or rotor speed is required.
Much work is reported in this field by many researchers, but the majority is concentrated on using simple closed loop algorithms.These types of controllers are weak because these algorithms are not insensitive enough when confronted by mechanical configuration changes.This problem can be solved by using PID control system or advanced closed loop control techniques such as fuzzy control system.
The digital closed loop principle was introduced by Fredriksen [2], Kuo [3] and Takashi [4] in 1969, 1970 and 1984 respectively.They used the closed loop algorithm in order to increase the stepper motor positioning accuracy and making it less sensitive to load disturbances.The closed loop control system is characterized by starting the motor with one pulse, and subsequent drive pulses are generated as a function of the motor shaft position and/or speed by the use of a feedback encoder.
The use of self-tuning regulator (STR) to control the stepper motor speed was introduced by Betin et al. [5].The purpose of the STR is to force the controller to be adapted to the motor operating conditions.However, this kind of control strategy is difficult to be implemented in practice because it requires a large amount of floating-point computation, which means an increase in the sampling period.
The artificial neural network control scheme (ANNCS) is proposed by Ahmed Rubaai et al. [6].The ANNCS uses continuous online random training to simultaneously identify and adaptively control the speed of the stepper motor.The ANNCS show good results in stepper motor speed trajectory tracking.However, when the system is subjected to a sudden load disturbance, the ANNCS takes a long recovery time to cope the changes because it requires a large amount of computations for learning and adaptation.
Another method to control the stepper motor speed by using fuzzy logic is applied and developed by Franck Betin et al. [7].In their paper, the output from the fuzzy controller is not the control variable itself but its increment.Therefore, the controller can be considered as an incremental fuzzy controller.When the system is subjected to a load disturbance, the fuzzy control system gives a reasonable result with the stepper motor compared to that of open loop control.However, the system suffers from some oscillatory response because they used a pulse train to drive the stepper motor instead of sine and cosine signals.Also, their experimental results show that the system performance depends mainly on the encoder resolution.For a high resolution, the system performance increases and vice versa.Moreover, this control algorithm requires a large external memory size for storing the fuzzy control table.
In the present paper, the PID control system is used to enhance the properties of the open loop control system of the hybrid stepper motor speed for a given reference input.Also, instead of using pulse train to drive the stepper motor, a microstepping technique, which consists of sine and cosine signals, is used.The performance of the proposed control system is tested by applying a sudden load disturbance and compared with that obtained from the open loop control system.

II.
STEPPER MOTOR DYNAMIC MODEL To test the dynamic response of the HSMs, a mathematical model must be employed.The Kuo model [8], which is used by many researchers, has been employed in this paper.Basically, this model consists of electrical and mechanical equations.The electrical equations are given by, )) sin( ( 1 )) cos( ( 1 And the mechanical equations are, ) Where, V a and V b , are the voltages on phases A and B respectively (Volt), I a and I b are the currents in phases A and B respectively (Amp),  is the rotor speed (rad/sec),  is rotor position (rad), R is the resistance of the phase winding (Ω) and L is the self inductance of the phase winding (H).L is assumed to be constant (by neglecting magnetic saturations).
K m is the motor torque constant (Nm/A), K v is the viscous friction coefficient (Kg.m 2 /s) and J and T l are the rotor inertia (Kg.m 2 ) and load torque (Nm) respectively.
The model can be represented by the following general form, Where, and .
Therefore, by using equation ( 5) and ( 6) the non -linear continuous model of the HSM can be expressed by, In order to test the dynamic performance of the HSM with the proposed control algorithm, it is preferred to utilize the discrete model of the stepper motor in discrete state space vector form instead of continuous form [1][2][3][4][5][6][7].This procedure can be obtained using the first order Euler approximation [9] as, ) , ( ] T and T is the sampling period (sec) which must be small compared to the electrical time constant of the motor [9].By using equation ( 9) and (10) the discrete stepper motor model can be expressed by, STEPPER MOTOR MICROSTEPPING DRIVE Normally, the stepper motor is driven in a full step or half step mode.This means that the motor currents are switched on and off according to a specified pattern.At each switching on event, the motor shaft moves a small step.But at high speeds, both the full and half step drive tend to make abrupt (7) (8) mechanical displacements.This is because the time from one position to the next can be much less than the step period.This stepping action contributes to a jerky movement and much mechanical noise in the system [1].
In the HSM, the rotor stable positions are in sync hronization with the stator flux.When the windings are energized, each winding will produce a flux in the air gap proportional to the current in that winding.This flux is directly proportional to the vector sum of the winding currents, in the resultant vector direction.In full and half step modes, the rated currents The most important characteristics of micro-stepping technique are; the smooth movement at low speeds, increased step positioning resolution of a smaller step angle and maximum torque at both low and high step rates.However, it requires more processing power but can be easily implemented using a low cost micro-controller [10].
IV. PID CONTROL TECHNIQUE In order to examine the feasibility of using PID controller with HSM, it is necessary to understand the methodology of designing this controller; this is briefly explained in the following section.
Figure 2 shows a block diagram of the digital PID control system with HSM.The output control signal from the PID controller U(k) at time step k is given by [11], Where, K p is the PID proportional gain, T i is the integral time constant (sec), e(k) is the speed error at time step k (rad/s), T d is the derivative time constant (sec), and T is the sampling period (sec).

Ref.
Act.Finding the optimum adjustments of a controller for a given process is not trivial.In practice, the PID controller gains are usually tuned through human expertise, based on some of trial and error.There are several tuning rules for PID controller such as Ziegler and Nichols, Chien and Kitamori [11].In this paper, Ziegler and Nichols tuning method has been employed, since it is the most proven and popular method.After using Ziegler and Nichols and manual tuning, the final values of the controller parameters are shown in the Appendix.

V.
THE MODIFIED PID CONTROL TECHNIQUE Due to the non-linear characteristics and the resonance problem of the HSM [7], the classical PID control system did not give consistent results as shown in the next section.
To solve the instability problem of the PID control system, a positional form of PID equation could be used instead of equation ( 13).This equation is given as [13], Where, u 0 is the constant offset of the system.Since the reference speed is constant with time, the open loop control system can be concurrently used with the PID control system as shown in Fig. 3. Therefore, the output control signal from the PID controller will be used only as an increment to enhance the properties of the open loop control system.By using equation ( 14) the overall control signal U(k) will be,

Open Loop Control Technique
The discrete model represented by equations ( 11) and ( 12) is used to simulate the HSM with a sampling time of 0.0001 sec, which is a compromise between the computation time and the accuracy of results [1].Smaller sampling time will only increase the computation time and yields the same results.
A hybrid stepper motor of model Kysan 57BYG is used as a case study in this paper.Its technical parameters are shown in the Appendix.This stepper motor is popular in many applications such as tracking systems and industrial applications.
Figure 4 shows the HSM speed response at half stepping mode with a reference speed of 50 rad/sec (477.46 rpm).It is clear that the rotor speed suffers from high speed oscillations at steady state with about 5 rad/sec from the reference speed.Therefore, the half stepping mode is not suitable for high precision applications.The input voltages from time 0.049 sec to 0.061 sec on the HSM windings at half stepping mode are shown in Fig. 5.
The open loop speed response the input voltages at microstepping mode without load disturbance are shown in Fig. 6 and Fig. 7 respectively.The input voltages are displayed from time 0.049 sec to 0.06 sec.It can be seen that speed oscillations at stead y state in microstepping mode is almost removed compared to that of the half stepping mode speed response.However, the rotor speed takes about 0.071 sec from starting to reach the steady state speed 50 rad/sec with a high oscillatory response.
Also, an overshoot of 53.43% is observed, which it is extremely high compared with the reference speed, and the rise time is 0.00167 sec.Figure 8 shows the open loop phase plane trajectory.It can be seen that the trajectory takes a large number of turns to reach the origin.The corresponding current waveforms in phase A and B are shown in Fig. 9 (a-b) respectively.Figure 10 and Fig. 11 show the open loop response when the system is subjected to a sudden load disturbance (+50% and -50% from the initial value respectively).In both cases, the sudden load disturbance occurs at a time 0.1 sec from starting.It can be seen that the recovery time is about 0.042 sec in both cases.Also, the speed is dropped and increased to 46.37 rad/sec (-7.26%) and 53.93 rad/sec (+7.36%) from the reference value in +50% and -50% load disturbance respectively.

PID Control Technique
The system response when the PID controller is used to control the HSM is shown in Fig. 12.It is clear that, the system loses its stability in a short time after starting, although there is no load disturbance.Similar results have been reported by [5], [7] and [12].Also, Fig. 13 (a-b) shows the corresponding input currents to the HSM when the PID control system is employed instead of the open loop control.It can be seen that the input currents became severely deformed after 0.068 sec from starting the system.These inconsistent results prove that the classical PID control system cannot be used to control non-linear devices such as the HSM.

Modified PID Control Technique
Figure 15 and Fig. 16 show the speed response and the phase plane trajectory of the modified PID control system without load disturbance.It can be seen that the speed response of the system looks better than that of the open loop control system.The overshoot of the modified PID control system is 42.56%, which it is lower than that of the open loop system with about 10.87%.Also, the settling time is about 0.042 sec, which is lower than that of the open control system with 0.029 sec.
Additionally, the phase plane trajectory of the modified PID control system shown in Fig. 16 goes much faster to the origin than that of the open loop control system.However, the rising time is 0.00167 sec, which is the same as open loop control system.From these results, it can be concluded that the modified PID control system increases the open loop control system performance.A lower overshoot could be obtained, by increasing the value of T d and K p , but it will decrease the system stability and increase the settling time, yielding a poor system performance [11].Figure 17 (a-e) shows the modified PID control system performance at different values of load disturbances (at 0.1 sec) with values of 30%, 35%, 42%, 43% and 45% from the initial values respectively.It can be seen that the system begin to lose its stability at 42% until it becomes unstable at 43% and over.
A comparative assessment between the open loop and th e modified PID controllers is summarized in Table 1.It is clear that from the table that the modified PID controller gives a better performance than that of the open loop control systems.Also, it can be seen that from the table, the recovery time at ±35% load disturbance in the modified PID is 0.001 sec, which it is extremely lower than that of the open loop with about 0.024 sec.
From these results, it can be concluded that the modified PID control system is be better than the open loop control to a certain load disturbance value.Also, it is very sensitive to load variations especially, with a non-linear device such as hybrid stepper motor.Therefore, an advanced control (such as fuzzy or adaptive PID) algorithm is essentially required to control the HSM in high precision application [7].Results show that the half stepping mode suffers from a large oscillatory response with about 5 rad/sec at steady state and the microstepping mode shows a smooth rotor movement at steady state.Also, the open loop control system suffers from a large overshoot of 53.43% and a settling time of 0.071 sec and the classical PID control system didn't give consistent results.Additionally, the modified PID control system gives a better performance than that of the open loop and the classical PID control.The overshoot in the modified PID is reduced to 42.56% and the settling time is also reduced to 0.042 sec.Moreover, when the modified PID control system is subjected to ±35% load disturbance, the recovery time was about 0.001 sec, which it is extremely lower than that of the open loop with about 0.024 sec at the same load disturbance.However, when the modified PID control system is subjected to 41% load disturbance and over the system became unstable.Therefore, an advanced control algorithm is essentially required to control the hybrid stepper motor at high precis ion application.

IFig. 1 .
Fig. 1.T he two coils are driven by sine and cosine waveforms.

Fig. 2 .
Fig. 2. Block diagram of the PID controller with HSM.

Fig. 9 .
Fig. 9. a. Phase A current at open loop control.
Parameters of the stepper motor drive: Rated phase current I = 15 Amp Rated phase voltage V = 90 Volt Self-inductance of each phase winding L =2.2 mH Resistance of each phase winding R = 2.2 Ω Number of rotor teeth N = 50 Motor torque constant K m = 0.252 Nm/A Viscous-friction coefficient K v = 0.0123 Kg.m 2 /s Stepping motor and load inertia J = 6.9849*10 -4 Kg.m 2 Load torque constant T l = 0.01 Nm Simulation parameters: Sampling time constant T = 0.0001 sec Reference speed ω ref = 50 rad/sec PID Controller parameters: Proportional gain factor K p = 2.26 Integral time constant T i = 0.0094 sec Derivative time constant T d =2.35x10 -3 sec Modified PID Controller parameters: Proportional gain factor K p = 0.3 Integral time constant T i = 0.001 sec Derivative time constant T d =2 x10 -3 sec Open loop proportional gain factor = 50