Performance Analysis of Current Control Strategies for Hybrid Stepper Motors

Hybrid stepper motors are widespread in industrial automation due to their robustness and high torque performance in low speed range, e.g. 3D printers, pick and place, and generally in many low power positioning applications. In order to increase the efficiency and dynamic performance, current/speed/position closed loop controls are implemented for high performance sensored stepper drives. The main challenge comes from the high number of magnetic poles which these motors feature, increasing the ratio between the fundamental and switching frequency. This paper critically evaluates four current control structures based field oriented control: classic PI regulators, sliding mode control, deadbeat predictive current control and model predictive current control. Simulations and experimental results aim to evaluate the dynamic performance, phase current amplitude and distortion in order to support the critical comparison.


I. INTRODUCTION
The hybrid stepper motors (HSMs) are widely adopted in industrial and consumer applications thanks to their low cost, high reliability and the possibility of being easily controlled in open-loop position control. However, the main drawbacks of the open-loop control are the low motor efficiency due to the high copper loss at partial load conditions and the possibility of stalling for high values of the load torque. Although modifications of the open-loop control, such as the microstepping method, allows obtaining a smoother behaviour [1], the efficiency is strongly load dependent. For these reasons, closed loop controls such as field oriented control (FOC) are thus natural candidates to improve performance, efficiency and robustness with respect to microstepping control [2]. However, the linear control stability gets challenged for low ratios of switching frequency f sw to electrical frequency, i.e f sw / f el , so the switching frequency has to be increased to prevent unstable behaviours.
Relevant contributions in literature when mechanical quantities are measured can be found in [3], which compares adaptive learning and repetitive learning controls for position reference profiles that are periodic signals with known period, whereas [4] proposes the minimization of the cogging torque and [5] addresses the position-tracking problem. The purpose of this paper is to analyze the performance of FOC, sliding mode control (SMC) adopted in [6] for a PMSM using a sign function which guarantees the stability and induces a sliding motion on the surface, deadbeat predictive current control (DPCC), used in [7] for a permanent magnet synchronous machine and extended as Dahlin controller in [8], and model predictive control (MPC), used in [9] with its finite control set model predictive control (FCS-MPC) variant. Model predictive controls, in fact, offer the possibility to reduce the effective switching frequency of the converter while maintaining fast dynamic response, with a simple inclusion of multiple objectives and constraints without introducing extra control loops. In addition, FCS-MPC was recently proposed for high performance control of AC drives [10] even in case of thermal control [11] and multilevel converters [12].
The performance of the different control strategies will be compared in terms of current-loop bandwidth, step response, root mean square value (RMS) and total harmonic distortion (THD) of the phase currents.
This manuscript fills a gap in the existing literature, showing a critical evaluation, supported by extensive experimental results, of the different possibilities for FOC in hybrid stepper motors. The paper is organized as follows: Section II describes the adopted mathematical model of HSM, Section II-A highlights some critical issue related to the use of a Digital signal Processor (DSP) in the design of the control strategies, Section III reports the proposed current control architectures (PI control,SMC, DPCC, MPC), while Section IV and Section V include simulation and experimental results, followed by Conclusions.

II. MATHEMATICAL MODEL
The dynamic of a two phase hybrid stepper motor in the (d, q) reference frame, according to [13], is given by: where: θ is the (mechanical) rotor angle, ω is the (mechanical) rotor speed, (i d , i q ) are the stator currents and (u d , u q ) are the stator voltages. The variables (θ, ω, i d , i q ) are the state variables, while (u d , u q ) are the control inputs and the load torque T L is the unknown disturbance input.
The other model parameters are: the viscous friction coefficient F , the number of rotor teeth N r , the moment of inertia J, the stator winding resistance R s , the stator inductance L 0 and the torque constant k M equal to N r φ PM where φ PM is the flux linkage provided by the permanent magnet.
The term T e is the electromagnetic torque produced by the motor and T c models the disturbance torque due to cogging (F m is the magneto-motive force of permanent magnet and P 4 j is the amplitude of the j harmonics as stated by [14]). The electrical speed and angle are ω e = N r ω and θ e = N r θ , respectively.
The derivation of the model above is obtained under the assumptions that self and mutual inductance of the two windings are constant with respect to θ . Fig. 1 shows the typical time sequence associated with the state variables sampling, computation and PWM updating, where T s is the sampling period.

A. MODELLING OF THE DELAY EFFECTS
During a switching cycle N, the stator currents (i α , i β ) and the rotor angle θ are sampled. At the same time, considering e.g. the period from time T k to T k+1 , the DSP performs the updating of the PWM of the N k−1 th cycle and the calculation of the PWM of the N k th cycle.
It can be observed that the PWM update of the previous cycle N k−1 involves a processing time delay. Since the counting period is fixed to one switching period T s , this delay corresponds exactly to T s and it has been included in the control design in order to obtain more realistic simulations.
In the same way, the rotor position is read at the N k th cycle while the control voltages of the different topologies are applied at the N k+1 th cycle. In order to solve this problem a rotor position compensation has been adopted.
According to [15], after a switching period T s the PWM of the N k−1 th cycle is updated, but the actual output voltage V act activates from T s to 2T s .
Following the volt-second principle in [15], the relationship between the actual voltage V act and the original voltage output by current regulator V ori results as: sin ω e T s 2 e jω e T s V ori (2) According to (2), V act is delayed of 1.5T s due to delayed PWM. The delay angle θ is therefore expressed as: The rotor position compensation is adopted for each control strategy by adding θ to the electrical rotor angle θ e when the inverse Park transformation is computed.

III. DESCRIPTION OF THE CONTROL STRATEGIES
The current control schemes adopted in this paper are described in this section. The power circuit of the dual H-bridge inverter feeding the HSM is reported in Fig. 2. This converter topology consists of a dual H-bridge inverters supplied by the same DC voltage but feeding the two windings of the HSM independently. Technical details about the different control strategies are provided in the following subsections.

A. PROPORTIONAL-INTEGRAL CONTROL
The PI control scheme is reported in Fig. 3.   In order to prevent that the integral part of the PI control "winds-up," the back-calculation strategy has been implemented as described in [16] and the Tustin transform has been used to convert the PI regulators to the discrete domain.
Parameters are tuned following closed-loop Ziegler-Nichols method.

B. SLIDING MODE CONTROL
Sliding mode control scheme is reported in Fig. 4.
Sliding mode control has been widely applied in recent years for motor drive applications with speed/current control loops [6], [17] and with sensorless control [18], [19].
Defining the tracking error as e q = i q − i q , where i q is the current reference and i q is the measured current, the purpose is to achieve e q equal to 0. Let the sliding surface function equal to σ q = e q + K i e q (4) with K i positive constant that determines the decay rate of the q-axis stator current error.
To guarantee that σ q approaches zero in a finite time, a Lyapunov function V = 0.5 σ 2 q is selected to induce σ q = 0. A common criterion is to achieve [20] V < −γ |σ q | Taking the derivative of the sliding surface respect to time giveṡ Choosing u q equal to The term k q is selected in order to guarantee the stability even in case of wrong knowledge of the parameters, so considering R s , L 0 and k M as variations of the nominal parameters and assuming that | R s | < a, | L 0 | < b and | k M | < c, with a, b and c positive constant it is necessary to ensure that In the same way, a control law for the d-axis voltage is derived as where e d is the tracking error equal to i d − i d and σ d is the As noted in [21] fast dynamics in the control loop, which were neglected in the system model, can be excited by the fast switching of sliding mode controllers. Moreover, digital implementations in microcontrollers with fixed sampling rates may lead to discretization chatter. This phenomenon is known as chattering and it has been verified that a sigmoidal function instead of the sign function can suppress this issue [18] when sliding mode observers (SMO) are used. In this case, for current control the sign in (7) and (10) is replaced by the functions

C. DEADBEAT PREDICTIVE CURRENT CONTROL
Deadbeat predictive current control (DPCC) scheme is reported in Fig. 5. According to the deadbeat theory, by discretizing, the voltage vector required to obtain the desired stator current vector i * dq (k) can be computed at the (k + 1) th sampling instant.
The electrical machine model can be discretized and approximated thanks to Euler's forward difference quotient The discrete voltage vectors are obtained from (1), considering that the currents at the (k + 1) th sampling instant are equal to the reference currents i * dq,k = i dq,k+1 In the ideal case, DPCC establishes a zero current error within one sampling interval T s , but since a DSP is used to implement the algorithm, the DPCC voltage vectors computation causes an inherent calculation delay. Neglecting this delay leads to a persistent oscillation in the current control loop [22]. Moreover, the more accurate deadbeat control presented in [22] has a strong dependence on the knowledge of the electrical parameters, so the adopted deadbeat current control is based on [23] and the main equations are briefly reported. The parameter mismatches lead to steady state error between the stator current. The incremental model based deadbeat predictive current control (IDPCC) method adopted in [7], [23] has been adopted in order to achieve a zero steady state error eliminating the dependency from the permanent magnet flux linkage term.
Since the voltage equations at the k th instant are computed as in (13), similarly the voltage equations at (k − 1) th sampling interval can be expressed by Subtracting (14) from (13), the incremental prediction model is obtained under the assumption that the mechanical dynamics are much slower than electrical dynamics, so the rotor speed is considered constant (i.e. ω k − ω k−1 ≈ 0) during successive sampling periods: It can be noted from (15) that the torque constant in the incremental predictive model is eliminated. In order to compensate the computation delay due to the use of a DSP, the predicted current at the (k + 1) th sampling interval can be expressed aŝ Hence, the reference voltage at the (k + 1) th sampling interval can be obtained as where i dq,k+1 = i dq,k+1 − i dq,k .

D. MODEL PREDICTIVE CURRENT CONTROL
The FCS-MPC control scheme is reported in Fig. 6. Based on the current sampling states and the HSM model, a prediction of the machine currents is performed according to the length of the prediction horizon (equal to 1) with respect to all the 16 combinations of feasible voltage vectors related to the 2 H-Bridge inverter (every H-Bridge has 4 configurations that can be applied).
Assuming the same approximation reported in (12), the expression of the predicted currents i dq , first available at the (k + 1) th sampling interval, can be determined as The incremental model predictive current control model used in [24] has been adopted in order to improve the parameter robustness respect to the errors of the flux linkage provided by the permanent magnet. Since the predictive currents at the (k + 1) th sampling interval can be predicted according to (18), similarly the currents at the k th instant are expressed by Subtracting (19) from (18), the incremental prediction model is obtained as in (16). Since a microprocessor is used, depending on its sampling frequency and its speed, the time between the measurement of the load currents and the application of the next switching state can be considerable. If the difference between the computation time and the sampling time is significant, a time delay will negatively affect the performance of the system. In order to compensate for this delay, the solution proposed in [25] has been adopted. The measured currents and the applied switching state at the sample instant k are used in (18) in order to estimate the value of the load currents i dq,k+1 . Then, in order to compensate the delay, these predictions are used to compute the new current vectors, first available at the (k + 2) th sampling instant. where In the proposed algorithm, depicted in Fig. 7, the predicted currents reported in (20) are evaluated by a cost function for each of the 16 combinations. The voltage vector whose current prediction is closest to the expected current reference is chosen and applied at the next sampling instant. In other words, the selected vector is the one that minimizes the cost function.
Since the computation associated to the MPC algorithm takes time to be completed, the computed new output voltage V act activates after T s . On the basis of this assumption, the delay angle adopted in the MPC strategy is changed in According to [26], different cost functions can be chosen depending on the application. In accordance with the most common approaches, a quadratic cost function has been

IV. SIMULATION RESULTS
The modeling and simulation of the different control techniques discussed in the previous section were carried out using Simulink/PLECS environments for a commercial AM34SS3DGA-N stepper motor. In order to compare the control strategies, the machine dynamic model (see Table 1 for nameplate data) and the model of the two H-Bridges (see Table 2 for converter data) are kept the same throughout all simulations. The adopted modulation scheme for the PI control, SMC and the DPCC control is the unipolar PWM, while no modulator is needed for the MPC.
Although the switching frequency f sw coincides with the sampling frequency f s when considering PI, SMC and DPCC control, the MPC strategy behaves differently.
In [9] it is shown that the switching frequency for the MPC is variable and limited. In fact, the switching state of the inverter can be changed only once during each sampling instant T s , thus the maximum switching frequency of the output voltages is limited to half of the sampling frequency f s . It is worth mentioning that having a variable switching frequency could cause the current harmonics to fall within the audible spectrum, which is can be a disadvantage for certain applications, whereas it can be accepted for industrial plant usages. However, the switching states do not change every T s if the same optimal state is selected, then the average switching frequency is always lower than f s /2.
For example, in [26] it is demonstrated that increasing T s five-fold, the switching frequency decreases by approximately five-fold and the total harmonic distortion (THD) increases five-fold. According to these considerations, to compare the performance of the different control strategies, it has been decided to double the MPC sampling frequency, although this choice leads the MPC strategy to exhibit an effective switching frequency f sw that is lower than the PI, SMC and DPCC switching frequencies. In order to take into consideration the finite resolution of analog-to-digital converters (ADCs) and digital pulse width modulators (PWMs), the control scheme blocks of Figs. 3, 4, 5 and 6 have been discretized [T s = 50 μs for PI, SMC and DPCC, T s = 25 μs for MPC], measured currents and applied voltages have been quantized to 12 bits resolution while the rotor angle has been quantized considering a 20000 pulses per revolution.
All the simulations were carried out with the magnitude of the cogging torque T c equal to 10% of the nominal torque.

A. CURRENT-LOOP BANDWIDTH
The current-loop bandwidth was computed at standstill and has been assessed for every different control strategy considering the current control loop only. At first, the simulations have been carried out considering the response to a sinusoidal reference current i q with 0.6 A amplitude at different frequencies without saturating the applied output voltages.
An amplitude of 0.6 A has been chosen because with lower current values MPC applies the null vector and the reference cannot be followed. The same situation is exhibited in [27] with a FCS-MPC strategy for a H-Bridge driving an RL load. Fig. 8 shows the response of the four strategies with a frequency of 1.2 kHz. It can be seen that the phase shift between i q,DB and i q,DB approaches to 45 degrees (the same method is used in [28]), then the DPCC current-loop bandwidth value has been estimated to be approximately 1.2 kHz, while SMC and PI control follows the reference. In addiction, the MPC strategy shows a serious drawback when low currents are involved.
In Fig. 9 the PI and SMC current-loop bandwidth values have been estimated to be approximately 2.2 kHz, showing a better response compared to DPCC control. The MPC response to a sinusoidal input current i q with an amplitude of 0.6 A cannot be evaluated against the other strategies, since a greater current is needed to obtain an acceptable response. For this reason, the same test has also been assessed considering a sinusoidal input reference current with an amplitude of 3 A. In this condition the behaviour when the voltage saturates is studied. Fig. 10 shows that the SMC control follows a reference with electrical frequency of 1.5 kHz, while the DPCC current-loop bandwidth has been estimated to be approximately 1.2 kHz, even if the reference amplitude is increased. Fig. 11 shows that the PI control follows a reference with electrical frequency of 1.7 kHz. The worsening of the performance of the SMC and PI control strategies are due to the voltage saturation in the control loop. In this condition the MPC strategy is able to follow the reference showing a better response in terms of magnitude and phase shift compared to the other strategies. Lastly, Fig. 12 shows that MPC follows a reference with electrical frequency of approximately 2.3 kHz, showing a better response compared to the other strategies.

B. STEP RESPONSE ANALYSIS
In order to obtain additional information about the bandwidth, a step response analysis has been carried out as well. Fig. 13 shows the response to a i q current step between −0.6 A and 0.6 A, highlighting that the MPC strategy assures a faster response compared to the other control methods; even if a higher current ripple and distortion, due to the low input current, can be observed. In addiction, deadbeat control follows the reference in 2 sampling instants because the closed  loop transfer function is equal to z −2 , as expected by the theoretical analysis. Since the MPC strategy shows a considerable steady state error when low input currents are involved, a step response analysis with a greater amplitude has been carried out. Fig. 14 shows the response to a i q current step between −5 A and 5 A, highlighting that the MPC strategy assure a faster response with respect to the other control methods,   while the response of the SMC strategy results to be the slowest. The step response of SMC can be faster acting on α, k d and k q in (11), although modifying these parameters to improve the step response lead to current oscillations which negatively affect the steady state error and the current loop bandwidth. For these reasons, SMC parameters have been tuned to obtain a trade off in order to maximise the currentloop bandwidth while ensuring low current oscillations.
In this condition, DPCC requires more than 2 sampling instants because the response is limited by the maximum voltage available. After the transient, the steady state condition is well regulated without error.
In Table 3 results in terms of rise time are summarized for the simulation of Fig. 13 and Fig. 14.

C. SPEED-LOOP ANALYSIS
In order to evaluate the root mean square value (RMS) and the total harmonic distortion (THD) of the phase currents for the different control strategies, a speed-loop analysis has been carried out. The speed loop is closed on a PI regulator whose proportional and integral gains have been chosen while simulating the PI control strategy and they have been left unchanged for the other topologies. In order to compare the results of the four strategies, the PI regulator closed on the speed-loop of the MPC has been discretized with the same sampling period used for the other topologies. The simulations have been carried out imposing a reference constant speed of 40 rad/s, well below the flux-weakening operative region. At first, the THD and RMS value of the phase current i a are evaluated when a load torque of 1 Nm is imposed. Then, the same analysis is repeated imposing a load torque of 4 Nm. The results obtained for i a are the same as the phase current i b . Table 4 summarizes the results in terms of THD and RMS. It can be noted that with low currents MPC has much more THD compared to the other strategies. When high currents are involved, the THD of MPC strategy reduces considerably even if it is sill higher with respect to the other strategies.

V. EXPERIMENTAL RESULTS
The proposed control schemes have been finally tested by experiments. The controllers are implemented in their discrete version on a commercial STM32H743ZI DSP controller. The DSP is used to implement the proposed controls, as well as  to generate the PWM signals and to acquire the two motor phase currents. The hybrid stepper motor AM34SS3DGA-N is a two-phase salient stepper motor with 50 rotor teeth and a step angle of 1.8 • employing an incremental encoder with 20000 counts/rev.
The HSM is installed on the test bench shown in Fig. 15 which also includes a torquemeter and a brushless machine as brake.

A. CURRENT-LOOP BANDWIDTH
The current-loop bandwidth was computed at standstill in the same manner as the simulations, i.e. with sinusoidal i * q current reference. Experimental data are extracted from the test bench of Fig. 15 and processed with Matlab for visualization purpose. Fig. 16 shows the response of the four strategies with a frequency of 1 kHz. The DPCC current-loop bandwidth value has been estimated to be approximately 1 kHz (the phase difference is approximately 45 degrees), while SMC and PI  controls track the reference with smaller angle delay. As expected, in this condition MPC shows serious drawback to work with low currents.
In Fig. 17 the PI current-loop bandwidth value has been estimated to be approximately 1.5 kHz, showing a better response with respect to DPCC control, as expected.
In Fig. 18 the SMC current-loop bandwidth value has been estimated to be approximately 2.2 kHz showing the same result that has been achieved in simulation.
In the same way as in the simulations, the response of the different control strategies has also been assessed considering a sinusoidal input reference current with an amplitude of 3 A,  in this last case the saturation of the output voltages happens during transients. Fig. 19 shows that SMC and PI control follows a reference of approximately 1.2 kHz. Increasing the amplitude of the current reference, the DPCC has the same bandwidth of Fig. 16. In fact, when a reference of 1.2 kHz is followed as in Fig. 19, DPCC exhibits a phase delay more than 45 degrees respect to the reference. As expected, in this condition the MPC is able to follow the reference showing a better response in terms of magnitude and phase shift compared to the other strategies.
In the same way as the simulation, Fig. 20 shows that the SMC strategy follows a reference of approximately 1.5 kHz.  Lastly, in Fig. 21 the MPC current-loop follows a reference of approximately 2 kHz, showing a better response with respect to the other strategies.

B. STEP RESPONSE ANALYSIS
In this subsection the response to a step input has been carried out in the same manner as the simulations. Fig. 22 shows the response to a i q current step between −0.6 A and 0.6 A. The SMC, PI and DPCC controls shows a similar transient response, while the MPC strategy response shows a high current ripple and a remarkable distortion due to the low input current, as expected from the simulations. In order to better evaluate the MPC strategy, a step response analysis with a greater amplitude has been carried out. Fig. 23 shows the response to a i q current step between −5 A and 5 A, highlighting that the MPC strategy assure a faster response with respect to the other control methods. Concerning the simulations, the PI control strategy shows a faster response than the DPCC control strategy, while the SMC response is the slowest as expected. As stated in [29], a predictive current control method is based on nominal parameters in order to predict and control the current of the motor,  so a mismatch between actual parameters and their nominal values can appear due to temperature rise (which has effect on R s and k M ) or magnetic saturation (which has effect on L 0 ). The DPCC control strategy seems to suffer parameter mismatches much more than the MPC strategy.
In Table 5 results in terms of rise time are summarized for the experimentals of Fig. 22 and Fig. 23.

C. SPEED LOOP ANALYSIS
The speed-loop analysis was computed in the same manner as the simulations. Table 4 summarizes the results in terms THD and RMS. While PI, SMC and DPCC show similar results and are comparable, it can be noted that with low currents MPC has a higher THD compared to the other strategies, while with high currents the THD tends to decrease as expected from the simulations.

D. COMPUTATIONAL COST
The computational cost of the four strategies is compared based on the execution times when the control is closed on the speed loop. The algorithms runs with an internal clock of 480 MHz and results are summarized in Table 7. Due to the evaluation of every possible configuration the MPC execution time is bigger, while the other strategies highlight similar behaviours.

VI. CONCLUSION
This paper analyzes the performance of different current control strategies for a HSM in terms of current loop bandwidth and THD of the phase currents. While PI, SMC and DPCC control strategies show a better behaviour than the MPC strategy in terms of bandwidth when low currents are involved, as the amplitude current increases the MPC strategy provides higher bandwidth and faster step response. In terms of THD, PI, SMC and DPCC have similar behaviour with low and high currents, while MPC tends to work better when higher currents are involved.
FABIO IMMOVILLI (Senior Member, IEEE) received the M.S. degree and the Ph.D. degree in mechatronic engineering with the University of Modena and Reggio Emilia, Modena, Italy, in 2006 and 2011, respectively. Since November 2019, he has been an Associate Professor of electric converters, machines and drives with the Department of Sciences and Methods for Engineering, University of Modena and Reggio Emilia. He is the author or coauthor of more than 55 technical papers. His current research interests include electric machine condition monitoring, electric power converters, machines for energy conversion from renewable energy sources, and thermoacoustics.
EMILIO LORENZANI (Senior Member, IEEE) received the M.S. degree in electronic engineering and the Ph.D. degree in information technologies from the University of Parma, Parma, Italy, in 2002 and 2006, respectively. Since 2011, he has been with the Department of Science and Engineering Methods, University of Modena and Reggio Emilia, Modena, Italy, where he is currently an Associate Professor of electric machines and drives. He is the author or coauthor of more than 80 technical papers. He holds five industrial patentsHis research interests include power electronics for renewable energy resources, electric drives, and electric motor diagnostics. Dr. Lorenzani is an Associate Editor for IET Power Electronics.