New Sensorless Speed Control of a Hybrid Stepper Motor Based on Fuzzy Sliding Mode Observer

: Stepper motors are widely used in industrial and consumer applications due to low-cost, high reliability, and open-loop control capability. Though open-loop features a simple structure, it bears low step resolution, high torque ripple, and low energy e ﬃ ciency. To improve the performance without increasing hardware cost, a fuzzy sliding mode observer (SMO)-based new sensorless speed control structure is proposed. Unlike the conventional sensorless speed control, it does not use Park and inverse Park transformations to transform currents between a-b and d-q coordinates. Instead, it uses a new current transformation method to generate reference currents of stator windings, which not only reduces the calculation burden of the controller, but also improves the stability of the system. To reduce the chattering, a fuzzy logic controller (FLC) embedded into the SMO is designed to adjust the observer gain adaptively, without using the conventional method that replaces the discontinuous sign function with the continuous, such as sigmoid or saturation function. The e ﬀ ectiveness of the proposed controller is veriﬁed using MATLAB / Simulink simulation (R2018b, MathWorks, Natick, MA, USA) and experiment by assessing the speed and position tracking abilities. current the used, The consists of a PI controller, a PWM, an LPF, a current-voltage convert circuit implemented by a shunt resistor, the H-bridge circuit. Both the two-level three-level PWM techniques be used to drive the H-bridge, the former features high dynamic performance but high current ripple, while the low dynamic performance current dynamic performance of winding current, the two-level PWM and aggressive PI controller states of the diagonal electronic switches of the H-bridge, of


Introduction
Stepper motors are widely used in industrial and consumer applications such as computer numerical control (CNC) machines, robotic arms, scanners, printers, and more recently, in 3D printers due to low-cost, high reliability, and open-loop control capabilities [1,2]. They feature fast response for brushless, holding torque at a standstill, and open-loop control, etc. The ability to convert discrete pulse series into rotor angular displacement enables the stepper motor operating in the open-loop mode.
Generally, stepper motors operate in open-loop, i.e., there is no rotor position information feedback to the controller. Therefore, the rotor position and speed are controlled by pulse amount and pulse frequency, respectively. Therefore, the planning of the speed profile plays an important role in open-loop control and has been heavily studied. In [3], a generalized algorithm for generating stepper motor speed profiles in real-time is proposed, it can be operated on a low-end microcontroller and does not limit the stepper motor starting from a standstill. The influence of different acceleration and deceleration profiles is investigated in [4], and it shows that the parabolic type has better dynamic performance and smaller position tracking errors compared with the constant and exponential types. In addition, the control of the currents fed through stator windings is also extremely critical and it is a research hotspot. A hysteresis current controller, which regulates winding currents by comparing the measured currents with corresponding reference currents to control the metal-oxide-silicon field-effect transistor (MOSFET) gate signals, is adopted to drive a pulse width modulation (PWM) converter in [5]. An improved current control scheme that adapts control parameters to the changes of motor 1.
We design a new structure for the sensorless speed control, it does not need to use Park and inverse Park transformations to transform currents between a-b and d-q coordinates for implementing of the FOC. Instead, it uses a simple algorithm to generate reference currents of stator windings, which reduces the calculation burden of the controller notably.

2.
Instead of replacing the discontinuous sign function with the continuous but computation complex functions, such as sigmoid or saturation function, we design a fuzzy logic controller (FLC) and embed it into the SMO to adjust the value of the observer gain adaptively. This simplified design suppresses the chattering phenomenon significantly without decreasing system stability. 3.
The effectiveness of the proposed controller is verified using MATLAB/Simulink simulations and experiments. Under the reference speed multi-step variation strategies, we assess the speed and position tracking abilities by comparing the estimated value gained from the observer with the real information measured by the mechanical sensors.
The rest of this paper is organized as follows. Section 2 presents a mathematical model of the two-phase bipolar hybrid stepper motor. The conventional and fuzzy SMO-based sensorless speed control structures are described successively in Section 3. Section 4 demonstrates the implementation of the sensorless speed controller and the experiments to verify the effectiveness of the proposed method. Finally, conclusions are summarized in Section 5.

Modeling of a Hybrid Stepper Motor
A simplified two-phase bipolar hybrid stepper motor model consists of a permanent magnetic rotor and two stator windings, A and B separated by 90 • , shown in Figure 1. The dynamics of the hybrid stepper motor can be represented in the state-space form [10,23], as follows: where v a , v b and i a , i b are the voltages and currents in windings A and B, respectively, ω is the rotor (angular) speed, θ is the rotor (angular) position, B is viscous friction coefficient, J is the inertia of the rotor, K m is the motor torque constant, R is the resistance of the stator windings, L is the induction of the stator windings, N r is the number of rotor teeth, and τ L is the load disturbance torque, assumed to be zero for simplicity. For a stepper motor, since the electrical dynamics is much faster than the mechanical dynamics, it is ignored.
Energies 2020, 13, x FOR PEER REVIEW 3 of 20 (FLC) and embed it into the SMO to adjust the value of the observer gain adaptively. This simplified design suppresses the chattering phenomenon significantly without decreasing system stability. 3. The effectiveness of the proposed controller is verified using MATLAB/Simulink simulations and experiments. Under the reference speed multi-step variation strategies, we assess the speed and position tracking abilities by comparing the estimated value gained from the observer with the real information measured by the mechanical sensors.
The rest of this paper is organized as follows. Section 2 presents a mathematical model of the two-phase bipolar hybrid stepper motor. The conventional and fuzzy SMO-based sensorless speed control structures are described successively in Section 3. Section 4 demonstrates the implementation of the sensorless speed controller and the experiments to verify the effectiveness of the proposed method. Finally, conclusions are summarized in Section 5.

Modeling of a Hybrid Stepper Motor
A simplified two-phase bipolar hybrid stepper motor model consists of a permanent magnetic rotor and two stator windings, A and B separated by 90°, shown in Figure 1.The dynamics of the hybrid stepper motor can be represented in the state-space form [10,23], as follows: where , and , are the voltages and currents in windings A and B, respectively, is the rotor (angular) speed, is the rotor (angular) position, B is viscous friction coefficient, J is the inertia of the rotor, is the motor torque constant, R is the resistance of the stator windings, L is the induction of the stator windings, is the number of rotor teeth, and is the load disturbance torque, assumed to be zero for simplicity. For a stepper motor, since the electrical dynamics is much faster than the mechanical dynamics, it is ignored. Nonlinear terms exist in state-space Equation (1). To remove the nonlinear terms, Park transformations for winding voltages and currents [23] are defined by: Nonlinear terms exist in state-space Equation (1). To remove the nonlinear terms, Park transformations for winding voltages and currents [23] are defined by: and respectively, where v d , v q , i d , and i q are direct voltage, quadrature voltage, direct current, and quadrature current, respectively. Applying Park transformation to the state-space Equation (1) yields new state-space equations, as follows: Generally, the instantaneous torque τ is composed of electromagnetic torque and reluctance torque [24]. The electromagnetic torque is equal to the sum of the torque resulting from the interaction of the winding currents and magnetic fluxes created by the magnets and the detent torque τ d . Since the detent torque τ d does not significantly affect the torque produced by the motor and is ignored. The reluctance torque τ r depends on the variation of reluctance between the two axes and can be zeroed by keeping i d = 0. Based on the assumptions mentioned above, the instantaneous torque of the stepper motor can be further simplified to:

Conventional Sensorless Speed Control Based on SMO
The architecture of the conventional sensorless speed control is shown in Figure 2. It consists of two PI control loops, i.e., the inner current control loops and the outer speed regulation loop, the Park and inverse Park transformations used to transform currents between a-b and d-q coordinates, and an SMO to estimate the rotor speed and position.
respectively, where , , , and are direct voltage, quadrature voltage, direct current, and quadrature current, respectively. Applying Park transformation to the state-space Equation (1) yields new state-space equations, as follows: Generally, the instantaneous torque is composed of electromagnetic torque and reluctance torque [24]. The electromagnetic torque is equal to the sum of the torque resulting from the interaction of the winding currents and magnetic fluxes created by the magnets and the detent torque . Since the detent torque does not significantly affect the torque produced by the motor and is ignored. The reluctance torque depends on the variation of reluctance between the two axes and can be zeroed by keeping = 0. Based on the assumptions mentioned above, the instantaneous torque of the stepper motor can be further simplified to:

Conventional Sensorless Speed Control Based on SMO
The architecture of the conventional sensorless speed control is shown in Figure 2. It consists of two PI control loops, i.e., the inner current control loops and the outer speed regulation loop, the Park and inverse Park transformations used to transform currents between a-b and d-q coordinates, and an SMO to estimate the rotor speed and position. From Equation (1), we get the differential equations of the stator winding currents defined in stationary a-b coordinate, as follows: From Equation (1), we get the differential equations of the stator winding currents defined in stationary a-b coordinate, as follows: where e a and e b are the back EMF of windings A and B, respectively, and e a = −ψ m ω e sin(θ e ) e b = ψ m ω e cos(θ e ), Energies 2020, 13, 4939 where θ e and ω e are rotor electrical position and electrical speed, respectively, ψ m is the maximum magnetic flux, and θ e = N r θ, ω e = N r ω. From Equation (7), the information of the rotor position and speed is contained in the back EMF, and an SMO is used to estimate it, for the sliding mode control is robust to parameter variations and disturbances [25]. The speed and position estimator of the rotor is a multiple input multiple output subsystem, shown in Figure where and are rotor electrical position and electrical speed, respectively, is the maximum magnetic flux, and = , = . From Equation (7), the information of the rotor position and speed is contained in the back EMF, and an SMO is used to estimate it, for the sliding mode control is robust to parameter variations and disturbances [25]. The speed and position estimator of the rotor is a multiple input multiple output subsystem, shown in Figure 3, where stator currents , , and winding voltages , are the inputs of the estimator, and the electrical position and electrical speed are the outputs of this estimator. According to the sliding mode variable structure theory and Equation (6), an SMO is constructed, as follows: where ˆa i and ˆb i are the estimated values of the winding currents and , respectively, is observer gain, and sign function sgn( ) is defined as follows: To verify the stability of the SMO, a Lyapunov function is defined: where is the error vector and: ˆ.
From the Lyapunov stability theorem, a system is asymptotically stable when < 0 for > 0. The error equations are obtained by subtracting Equation (6) from Equation (8), as follows: According to the sliding mode variable structure theory and Equation (6), an SMO is constructed, as follows: whereî a andî b are the estimated values of the winding currents i a and i b , respectively, k sw is observer gain, and sign function sgn(x) is defined as follows: To verify the stability of the SMO, a Lyapunov function is defined: where s is the error vector and: From the Lyapunov stability theorem, a system is asymptotically stable when . V < 0 for V > 0 The error equations are obtained by subtracting Equation (6) from Equation (8), as follows: Differentiating Equation (10) with respect to time, yields: Substituting Equation (12) into Equation (13), the stability condition can be written as: as a result, k sw > max(|e a |, |e b |). Once the observer gain k sw is large enough, it can ensure both the existence of sliding motion and the asymptotical stability of sliding motion in the global scope. When the system reaches the sliding surface, then: Based on equivalent control, substitutes Equation (16) into Equation (12), so: However, the back EMF cannot be used to calculate rotor position and speed directly, for they contain high-order harmonics. An LPF is used to filter out the high-order harmonics: where ω c is the cut-off frequency of the LPF. Then, the electrical positionθ e and speedω e are calculated using the arc tangent function, as follows:θ Finally, a phase shift compensation component is used to compensate for the phase delay caused by the LPF.

New Senssorless Speed Control Based on Fuzzy SMO
According to the analysis above, coordinate transformations are necessary operations, where the Park transformation transforms winding currents i a and i b in a-b coordinate into i d and i q in d-q coordinate, and the inverse Park transformation restores voltage v d and v q in d-q coordinate to winding voltages v a and v b in a-b coordinate. These operations are a high computation burden for the controller, however, the values of voltage and current needed by the SMO are all defined in a-b coordinate. Therefore, we propose a new sensorless speed control structure for stepper motors, shown in Figure 4. It uses a new current transformation method to generate reference currents of stator windings and then PI current controllers are used to regulate winding currents effectively. Unlike the conventional method, all operations are in a-b coordinate, so it does not need to use Park and inverse Park transformations to transform currents between a-b and d-q coordinates. This new structure benefits reducing the calculation burden of the controller.

New Current Transformation Scheme
The proposed current transformation generates reference currents and of stator windings in a-b coordinate. Two PI current controllers with the identical structure are used to regulate the currents and of the stator windings according to the corresponding reference currents and . The current transformation scheme is defined as follows:

New Current Transformation Scheme
The proposed current transformation generates reference currents i are f and i bre f of stator windings in a-b coordinate. Two PI current controllers with the identical structure are used to regulate the Energies 2020, 13, 4939 7 of 19 currents i a and i b of the stator windings according to the corresponding reference currents i are f and i bre f . The current transformation scheme is defined as follows: where τ d is the instant constant torque modulated by the outer PI speed controller. For fulfilling constant torque control, under the assumption i d = 0, similar results were reported in [10,24].
As is known, the PI controller accurately regulates winding currents by adjusting the duty cycle of the two-level PWM, so i a ≈ i are f and i b ≈ i bre f . Applying Park transformation to i a and i b , we get the i d and i q in the rotating d-q coordinate, as follows: Therefore, the proposed method also generates constant torque, but it does not use the Park transformation. Again, applying inverse Park transformation to the current vector i d i q T , where i d = 0 and i q = τ K m , we get the currents i are f and i bre f , as follows: As can be seen, they are equal to the corresponding reference currents i are f and i bre f got using the proposed method. Therefore, the effect of using the new current transformation scheme for the proposed new sensorless speed control is the same as the effect of employing the conventional method. However, the proposed method uses none of Park and inverse Park transformations, which reduces the computation burden and improves calculation efficiency.
Conventional SMO, shown in Figure 3, can be used directly in this new sensorless speed control structure. However, the chattering phenomenon caused by the discontinuous sign function exists and affects system performance in terms of reducing control accuracy. To reduce the chattering phenomenon, the discontinuous sign function can be replaced by the continuous sigmoid or saturation function [26,27], but these continuous functions are computation complex. In this design, we design a FLC and embed it into the SMO to adjust the value of the observer gain k sw adaptively. Instead of using the conventional methods that replace the discontinuous sign function with the continuous functions, the proposed fuzzy gain adaptive method can suppress the chattering phenomenon significantly without decreasing system stability. The whole structure of the fuzzy SMO is shown in Figure 5. saturation function [26,27], but these continuous functions are computation complex. In this design, we design a FLC and embed it into the SMO to adjust the value of the observer gain adaptively. Instead of using the conventional methods that replace the discontinuous sign function with the continuous functions, the proposed fuzzy gain adaptive method can suppress the chattering phenomenon significantly without decreasing system stability. The whole structure of the fuzzy SMO is shown in Figure 5.

Fuzzy Logic Control
Recently, the fuzzy logic control has been widely used in hybrid control systems, such as fuzzy PID, fuzzy sliding mode control, and fuzzy neural networks [28][29][30]. The numerous successful applications are largely due to it being able to conveniently map an input space to an output space using if-then rules. A typical fuzzy system consists of four parts, namely fuzzification, rule-base, inference mechanism, and de-fuzzification. The fuzzification part uses crisp data from input to determine the degree to which they belong to the corresponding fuzzy sets via membership functions. The rule-base part contains a set of if-then rules which embed the knowledge of experts, and a fuzzy rule uses linguistic terms to express the relationships among fuzzy variables. The generic form of a multiple input single output fuzzy rule is:

Fuzzy Logic Control
Recently, the fuzzy logic control has been widely used in hybrid control systems, such as fuzzy PID, fuzzy sliding mode control, and fuzzy neural networks [28][29][30]. The numerous successful applications are largely due to it being able to conveniently map an input space to an output space using if-then rules. A typical fuzzy system consists of four parts, namely fuzzification, rule-base, inference mechanism, Energies 2020, 13, 4939 8 of 19 and de-fuzzification. The fuzzification part uses crisp data from input to determine the degree to which they belong to the corresponding fuzzy sets via membership functions. The rule-base part contains a set of if-then rules which embed the knowledge of experts, and a fuzzy rule uses linguistic terms to express the relationships among fuzzy variables. The generic form of a multiple input single output fuzzy rule is: where d k , k = 1, 2, . . . , m is a fuzzy set of kth input, x = (x 1 , x 2 , . . . , x m ) is the crisp input vector, c is the output variable, and z j is the output level. Using aggregate method such as centroid, bisector, middle of maximum, largest of maximum, or smallest of maximum, the de-fuzzification part converts a fuzzy set from the inference engine into a single crisp number [31].
Two types of fuzzy inference methods are commonly used, i.e., the Mamdani and the Sugeno methods. These two methods are similar in many respects, except that the Sugeno output membership functions are either linear or constant. Because the Mamdani method is much closer to natural language and has widespread acceptance, we use it as the fuzzy inference method.

Implementation of the FLC
The proposed FLC is a two-input single-output system. The two inputs areω and e, representing the estimated rotor speed and the speed error between the reference speed and the estimated speed, i.e., e = ω − . ω, respectively. The output k is a proportional factor of the observer gain K sw . The fuzzy language variables NB, NM, NS, Z, PS, PM, and PB are defined, representing negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively. The trapezoid and triangle functions are used as the membership functions of the inputs and output variables due to the simple implementation. We apply the FuzzyLogicDesigner toolbox in MATLAB to model the FLC and use MATLAB function plotmf to print the membership functions.
The fuzzy language variables used for the first inputω are NB, NM, NS, Z, PS, PM, and PB, shown in Figure 6a, while the second input e use NB, NS, Z, PS, and PB as its language variables, shown in Figure 6b. As the observer gain proportional factor k should be positive, the fuzzy language variables used for the output k are Z, PS, PM, and PB, shown in Figure 7. The centroid defuzzification method is used in this design, and then the observer gain k sw is adjusted adaptively using the multiplication of k and the other scalar k base , i.e., k sw = k * k base .
Energies 2020, 13, x FOR PEER REVIEW 9 of 20 defuzzification method is used in this design, and then the observer gain is adjusted adaptively using the multiplication of and the other scalar , i.e., = * .   Based on Mamdani type inference, the fuzzy rules base with 35 rules is illustrated in Table 1, and the rule surface for output is presented with a 3D plot, shown in Figure 8. These rules are chosen to adjust the observer gain depending on the variation of the state trajectories. From the back EMF Equation (7) and the stability condition of the SMO expressed in Equation (15), the observer gain should be adjusted adaptively according to the rotor speed for suppressing the chattering phenomenon. That is, little observer gain should be used at low-speed ranges, and the gain should increase accordingly when rotor speed increases; correspondingly, the larger gain is selected at highspeed ranges, and the gain decreases along with the rotor speed descend. However, the stability condition must be assured all the time. The speed error is used as the second input of the FLC to change the observer gain. If there is a large speed error, which means the state trajectories drift away from the sliding surface, so the observer gain should be increased to drive the state trajectories to the sliding surface as soon as possible. On the contrary, when the speed error is minor, little observer gain should be selected to reduce the chattering.  Based on Mamdani type inference, the fuzzy rules base with 35 rules is illustrated in Table 1, and the rule surface for output k is presented with a 3D plot, shown in Figure 8. These rules are chosen to adjust the observer gain k sw depending on the variation of the state trajectories. From the back EMF Equation (7) and the stability condition of the SMO expressed in Equation (15), the observer gain k sw should be adjusted adaptively according to the rotor speed for suppressing the chattering phenomenon. That is, little observer gain should be used at low-speed ranges, and the gain should increase accordingly when rotor speed increases; correspondingly, the larger gain is selected at high-speed ranges, and the gain decreases along with the rotor speed descend. However, the stability condition must be assured all the time. The speed error e is used as the second input of the FLC to change the observer gain. If there is a large speed error, which means the state trajectories drift away from the sliding surface, so the observer gain should be increased to drive the state trajectories to the sliding surface as soon as possible. On the contrary, when the speed error is minor, little observer gain should be selected to reduce the chattering.

Low-Speed Running Strategy
At medium and high-speed ranges, the drive runs at the closed-loop mode using the proposed fuzzy SMO based sensorless speed control strategy. The closed-loop strategy not only improves its dynamic performance but also increases energy efficiency, for stepper motors are driven in an optimal way [2]. However, for the limitations of the back EMF based sensorless method, the drive

Low-Speed Running Strategy
At medium and high-speed ranges, the drive runs at the closed-loop mode using the proposed fuzzy SMO based sensorless speed control strategy. The closed-loop strategy not only improves its dynamic performance but also increases energy efficiency, for stepper motors are driven in an optimal way [2]. However, for the limitations of the back EMF based sensorless method, the drive needs to switch to open-loop mode at low-speed ranges to assure the reliability. In this design, we employ the open-loop microstepping mode to drive the stepper motor at low-speed ranges. The mixed open-loop stepping and observer based closed-loop control methods make the stepper motor to be the ideal device running at the sensorless mode in full-speed ranges.
The essence of microstepping is to regulate winding currents sinusoidally. Usually, the maximum currents are used to generate maximum torque to avoid step-out. The reference currents are modulated as follows: where N = 1, 2, 4, . . . , 32, . . . is microstepping resolution, m is an incremental number to generate reference current sequences for windings and m = 0, 1, 2, . . . , (4N − 1), I R is the amplitude of the rated current of windings, and i are f and i bre f are reference staircase current sequences of windings A and B, respectively. The current sequence described when N = 1 is called full-step single phase on because the rotor is moved by one whole step at a time feeding only one of the two stator windings at a time. Corresponding, the mode N = 2 is called half-step single phase on. Figure 9 demonstrates the reference currents of full-step and microstepping during the const speed period, where the running time and the reference speed are 0.03 s and 60 rpm, respectively.

Implementation and Experimental Results
The experimental setup consists of a two-phase bipolar hybrid stepper motor, an incremental encoder which has 2500 lines 10,000 pulses/rev, attached to the motor, and is used for measuring the rotor position and speed, a DC switching power supply, and a stepper motor drive for real-time shown in Figure 10. The parameters of the stepper motor and the drive are shown in Table 2. The drive implements the proposed sensorless speed control scheme and has been successfully applied to a project of a smart wheel-chair with a rehabilitation module [32]. A total of 13 stepper motors are deployed on the smart wheel-chair, e.g., two high-power stepper motors are the main drive motors, which are used in a mechanism to drive the wheel-chair forward and backward; and another two are equipped in a front-leg mechanism, which is designed to lift the front legs. Therefore, it is critical to realize of a versatile, efficient, and cost-effective stepper motor drive.

Implementation and Experimental Results
The experimental setup consists of a two-phase bipolar hybrid stepper motor, an incremental encoder which has 2500 lines 10,000 pulses/rev, attached to the motor, and is used for measuring the rotor position and speed, a DC switching power supply, and a stepper motor drive for real-time shown in Figure 10. The parameters of the stepper motor and the drive are shown in Table 2. The drive implements the proposed sensorless speed control scheme and has been successfully applied to a project of a smart wheel-chair with a rehabilitation module [32]. A total of 13 stepper motors are deployed on the smart wheel-chair, e.g., two high-power stepper motors are the main drive motors, which are used in a mechanism to drive the wheel-chair forward and backward; and another two are equipped in a front-leg mechanism, which is designed to lift the front legs. Therefore, it is critical to realize of a versatile, efficient, and cost-effective stepper motor drive. drive implements the proposed sensorless speed control scheme and has been successfully applied to a project of a smart wheel-chair with a rehabilitation module [32]. A total of 13 stepper motors are deployed on the smart wheel-chair, e.g., two high-power stepper motors are the main drive motors, which are used in a mechanism to drive the wheel-chair forward and backward; and another two are equipped in a front-leg mechanism, which is designed to lift the front legs. Therefore, it is critical to realize of a versatile, efficient, and cost-effective stepper motor drive.    The drive is composed of a controller chip, two H-bridges, stator currents sampling circuits, and faults monitoring circuit, shown in Figure 11. A Texas Instruments microcontroller TMS320F28035, which is the ideal choice of motor motion control, is used in the drive. It is composed of a high-efficiency 32-bit fixed-point CPU, an enhanced pulse width modulator (ePWM) module, an enhanced quadrature encoder pulse (eQEP) module, a 12-bit analog-to-digital converter, and a joint test action group (JTAG), etc. The H-bridge, implemented of insulated gate bipolar transistors (IGBT), is used to drive the stepper motor.
Current sensors, such as Hall effect sensors, current transformers, and shunt resistors, are usually used for current measurement [33]. Hall effect sensors are widely used because they have good accuracy and high current measurement abilities and often available in the form of a small IC packet. Current transformers feature medium accuracy, low power consumption, and high current measurement abilities; therefore, they are popular in high current applications and AC line-monitoring applications. However, the cost of these sensors is high, and the saturation problems exist. Correspondingly, shunt resistors feature high accuracy and low cost though they consume high power and cannot bear large currents; therefore, they are the ideal selection for the current measurement of the H-bridge. There are two types of placement of the shunt resistor, i.e., low-side placement and high-side placement, where the low-side method gets its name as the shunt resistor is placed between the ground and low side IGBTs; and when the shunt resistor is placed between the power supply and the high side IGBTs, it is called the high-side method. For the low-side method, the sampling circuit is simple, and so it is used in this design, shown Figure 11.

Current integral gain 3072
The drive is composed of a controller chip, two H-bridges, stator currents sampling circuits, and faults monitoring circuit, shown in Figure 11. A Texas Instruments microcontroller TMS320F28035, which is the ideal choice of motor motion control, is used in the drive. It is composed of a highefficiency 32-bit fixed-point CPU, an enhanced pulse width modulator (ePWM) module, an enhanced quadrature encoder pulse (eQEP) module, a 12-bit analog-to-digital converter, and a joint test action group (JTAG), etc. The H-bridge, implemented of insulated gate bipolar transistors (IGBT), is used to drive the stepper motor. Current sensors, such as Hall effect sensors, current transformers, and shunt resistors, are usually used for current measurement [33]. Hall effect sensors are widely used because they have good accuracy and high current measurement abilities and often available in the form of a small IC packet. Current transformers feature medium accuracy, low power consumption, and high current measurement abilities; therefore, they are popular in high current applications and AC linemonitoring applications. However, the cost of these sensors is high, and the saturation problems exist. Correspondingly, shunt resistors feature high accuracy and low cost though they consume high power and cannot bear large currents; therefore, they are the ideal selection for the current measurement of the H-bridge. There are two types of placement of the shunt resistor, i.e., low-side placement and high-side placement, where the low-side method gets its name as the shunt resistor is placed between the ground and low side IGBTs; and when the shunt resistor is placed between the power supply and the high side IGBTs, it is called the high-side method. For the low-side method, the sampling circuit is simple, and so it is used in this design, shown Figure 11. By sampling the power supply voltage and stator winding currents, and computing the changes of the supply voltage, the controller can protect the drive system from the damages caused by over current, over voltage, and under voltage, etc. When faults occur, the controller resets the outputs of EPWM1A, EPWM1B, EPWM2A, and EPWM2B. Then, winding currents enter slow decay mode, i.e., the current only flows through the IGBTs of the low side of the H-bridge and the stator winding. At last, the currents decay to zero, for the power supply does not drive the H-bridge under this mode. When faults are eliminated, the controller will recover from the halt to the running state and be ready to receive new commands.
In this study, the microcontroller TMS320F28035 implements the PI current controllers and the PWM, which are used to regulate winding currents. Because the two-phase bipolar hybrid stepper motor has two windings, two current controllers with the identical structures are used, and one for each winding. The controller consists of a PI controller, a PWM, an LPF, a current-voltage convert circuit implemented by a shunt resistor, and the H-bridge circuit. Both the two-level and three-level PWM techniques can be used to drive the H-bridge, where the former features high dynamic performance but high current ripple, while the latter has low dynamic performance but low current ripple. To gain high dynamic performance of winding current, the two-level PWM and aggressive PI controller gains are adopted. By setting the states of the diagonal electronic switches of the H-bridge, either open or close, the microcontroller can adjust the direction of the currents. The magnitude of the current is controlled by the duty of the PWM, which is again controlled by the PI controller by comparing the real current with the reference current. Typically, we call the mode of increasing winding current as the drive mode, correspondingly, the fast decay mode to decrease the winding current. The current direction passing through the shunt resistor is used to differentiate the two modes, and when current flows into the earth known as the drive mode, while it flows out the earth for the fast decay mode. The first fuzzy SMO based sensorless speed control experiment is performed during reference speed varies according to 300-400-500-600 rpm, and Figure 12 demonstrates responses of rotor speed and electrical position. Figure 12a shows that the estimated speed is identical to the reference speed, moreover, the PI speed controller exhibits excellent dynamic performance, i.e., small overshot, and short setting time. Figure 12b-e illustrates in detail rotor electrical positions during each of their first-half speed step times, where the reference speed changes in every 0.1 s. For example, Figure 12b shows the electrical position response during 0-0.05 s, where the reference speed is 300 rpm. Position errors between the measured and the estimated positions exist during the speed ripple periods and the errors reduce to zero in about 10 ms. Furthermore, the frequencies of the sawtooth wave representing rotor electrical position during 0- 0.1 s, 0.1-0.2 s, 0.2-0.3 s, and 0.3-0.4 s, are 250, 333.3, 416.7, and 500 Hz, respectively. Correspondingly, the real rotor speeds approximate to 5, 6.7, 8.3, and 10 revolutions per second. Therefore, the electrical speed of the rotor varies 50 times of the mechanical speed, for the hybrid stepper motor has 50 teeth on the rotor. the current is controlled by the duty of the PWM, which is again controlled by the PI controller by comparing the real current with the reference current. Typically, we call the mode of increasing winding current as the drive mode, correspondingly, the fast decay mode to decrease the winding current. The current direction passing through the shunt resistor is used to differentiate the two modes, and when current flows into the earth known as the drive mode, while it flows out the earth for the fast decay mode.
The first fuzzy SMO based sensorless speed control experiment is performed during reference speed varies according to 300-400-500-600 rpm, and Figure 12 demonstrates responses of rotor speed and electrical position. Figure 12a shows that the estimated speed is identical to the reference speed, moreover, the PI speed controller exhibits excellent dynamic performance, i.e., small overshot, and short setting time. Figure 12b- Figure 13 shows the responses of the currents of the first sensorless speed tracking experiment. Winding current and are shown in Figure 13a, applying Park transformation to and , currents and in d-q coordinate are acquired, shown in Figure 13b, where ≈ 0 and varies proportionally to the rotor speed. Figure 13c-f illustrates in detail the currents and measured through shunt resistor during each of their first-half speed step times. As can be seen, they vary in a sinusoidal fashion, the amplitude of the sinusoidal wave is proportional to the rotor speed, and the  Figure 13 shows the responses of the currents of the first sensorless speed tracking experiment. Winding current and are shown in Figure 13a, applying Park transformation to and , currents and in d-q coordinate are acquired, shown in Figure 13b, where ≈ 0 and varies proportionally to the rotor speed. Figure 13c-f illustrates in detail the currents and measured through shunt resistor during each of their first-half speed step times. As can be seen, they vary in a sinusoidal fashion, the amplitude of the sinusoidal wave is proportional to the rotor speed, and the frequencies of the sinusoidal wave representing stator currents, during 0-0.  The second experiment uses reference speed decreasing strategy, i.e., the reference speed varies according to 500-450-400-350 rpm, and results similar to the first experiment are reported in Figure 14, where Figure 14a shows responses of reference speed and the estimated speed, and Figure 14b-e illustrates in detail rotor electrical positions of the measured and the estimated during each of their first-half speed step times.
The second experiment uses reference speed decreasing strategy, i.e., the reference speed varies according to 500-450-400-350 rpm, and results similar to the first experiment are reported in Figure  14, where Figure 14a shows responses of reference speed and the estimated speed, and Figure 14b        Due to the limitation of the back EMF-based sensorless speed control at low-speed ranges, the stepper motor drive runs at open-loop microstepping mode at the starting phase just before switching to the sensorless speed control strategy. Usually, the step, trapezoidal, exponential, parabolic, and Scurve speed profiles can be used as the reference speed curve. Among them, the trapezoidal profile is widely used due to its simple structure and fast response. Normally, it consists of the acceleration stage, constant speed stage, and the deceleration stage.
The last experiment is performed using the open-loop microstepping strategy, and the trapezoidal reference speed profile is employed to suppress ripples of speed and torque, where the acceleration, constant speed, and deceleration times are 0.2, 0.1, and 0.2 s, respectively, and microstepping resolution = 8. Furthermore, the number of steps is 400 for each of the acceleration, Due to the limitation of the back EMF-based sensorless speed control at low-speed ranges, the stepper motor drive runs at open-loop microstepping mode at the starting phase just before switching to the sensorless speed control strategy. Usually, the step, trapezoidal, exponential, parabolic, and S-curve speed profiles can be used as the reference speed curve. Among them, the trapezoidal profile is widely used due to its simple structure and fast response. Normally, it consists of the acceleration stage, constant speed stage, and the deceleration stage.
The last experiment is performed using the open-loop microstepping strategy, and the trapezoidal reference speed profile is employed to suppress ripples of speed and torque, where the acceleration, constant speed, and deceleration times are 0.2, 0.1, and 0.2 s, respectively, and microstepping resolution N = 8. Furthermore, the number of steps is 400 for each of the acceleration, constant speed, and deceleration stages. Therefore, the maximum rotor speed and the total rotor displacement is 150 rpm and 1.5π, respectively. Sinusoidal currents of the stator windings sampled through shunt resistor are shown in Figure 16a, overshot exists due to the selection of the aggressive PI gains. As can be seen, the energy efficiency of the open-loop control is not optimized, as the maximum amplitude I r = 4 A of the sinusoidal current is used continuously for generating maximum torque to avoid step-out, however, speed ripple occurs shown as Figure 16b. The rotor position measured by the encoder and the reference position are illustrated in Figure 16c, as can be seen, the measured position almost overlaps with the reference position.

Conclusions
In this paper, new sensorless speed control of a hybrid stepper motor is proposed and developed successfully. The novel architecture of the proposed sensorless speed control is convenient for employing a new current modulation scheme to generate reference currents of the stator windings, without using the computation complex Park and inverse Park transformations. Compared with the conventional sensorless speed control algorithm, this simplified design reduces about 9.6% computation burden of the controller that runs with the algorithm at 20 kHz and further improves the stability and reliability of the system. The chattering phenomenon of the sliding mode control is suppressed by designing an FLC and embed it into the SMO to adjust the observer gain adaptively, and the lower the rotor speed, the more obvious the chattering suppressing effect. The limitation of the back EMF based sensorless speed control at low-speed ranges is solved by using open-loop microstepping, and the trapezoidal profile is designed as the reference speed curve to reduce torque ripple. Integrating the low-speed microstepping with the fuzzy SMO-based sensorless speed control makes the stepper motor the ideal device working sensorless in full-speed ranges. Moreover, energy efficiency is optimized. When drives no-load, compared with the control strategy of using only the microstepping that rated current is 4 A and microstepping resolution is eight, the proposed method

Conclusions
In this paper, new sensorless speed control of a hybrid stepper motor is proposed and developed successfully. The novel architecture of the proposed sensorless speed control is convenient for employing a new current modulation scheme to generate reference currents of the stator windings, without using the computation complex Park and inverse Park transformations. Compared with the conventional sensorless speed control algorithm, this simplified design reduces about 9.6% computation burden of the controller that runs with the algorithm at 20 kHz and further improves the stability and reliability of the system. The chattering phenomenon of the sliding mode control is suppressed by designing an FLC and embed it into the SMO to adjust the observer gain adaptively, and the lower the rotor speed, the more obvious the chattering suppressing effect. The limitation of the back EMF based sensorless speed control at low-speed ranges is solved by using open-loop microstepping, and the trapezoidal profile is designed as the reference speed curve to reduce torque ripple. Integrating the low-speed microstepping with the fuzzy SMO-based sensorless speed control makes the stepper motor the ideal device working sensorless in full-speed ranges. Moreover, energy efficiency is optimized. When drives no-load, compared with the control strategy of using only the microstepping that rated current is 4 A and microstepping resolution is eight, the proposed method saves energy consumption by 81%, 78.5%, 76%, and 73.5%, when the rotor speed is 300, 400, 500, and 600 rpm, respectively.
Due to the limitation of the multi-tooth structure of the rotor, the maximum speed of a hybrid stepper motor is much lower than that of the other permanent magnet synchronous motors. In this design, since the back EMF is not compensated, the tracking ability of the stator winding current is significantly reduced when the rotor speed is higher than 900 rpm. In future work, we plan to introduce the field weakening to increase the maximum speed and improve the electromagnetic torque of the stepper motor, furthermore to implement online motor parameter identification to improve the self-adaptive ability of the drive.