Nested High Order Sliding Mode Controller with Back-EMF Sliding Mode Observer for a Brushless Direct Current Motor

: This work presents a nested super-twisting second-order sliding mode speed controller for a brushless direct current motor with a high order sliding mode observer used for back electromotive force (back-EMF) estimation. Due to the trapezoidal nature of the back-EMF, a modiﬁed Park transformation is used in order to achieve proper ﬁeld orientation. Such transformation requires information from the back-EMF that is not accessible. A second-order sliding mode observer is used to estimate the back electromotive forces needed in the modiﬁed transformation. Sliding mode control is known to be robust to matched uncertain disturbances and parametric variations but it is prone to unmatched perturbations that affect the performance of the system. A nested scheme is used to improve the response of the controller in presence of unmatched disturbances. Simulations performed under similar conditions to real-time experimentation show a good regulation of the rotor speed in terms of transient and steady-state responses along with a reduced torque ripple.


Introduction
Permanent magnet synchronous motors (PMSM) are a kind of electrical machine that has been characterized by having permanent magnets embedded within or mounted on the surface of its rotor and a three-phase winded stator. A brushless direct current (BLDC) motor is a particular kind of PMSM that has a trapezoidal-shaped back electromotive force (back-EMF) that differentiates itself from other PMSM which have a sinusoidal shape back-EMF [1]. Literature shows that it is possible to assume the back-EMF of a BLDC motor as sinusoidal shaped causing some confusion between the concept of PMSM and BLDC motor. This assumption allows mathematical analysis and control technique design for BLDC motors to be developed in a similar way as for a PMSM as shown in [2][3][4][5]. It is clear that by making this assumption real behavior of the motor is neglected. A vector control design oriented to the field (Field-oriented control) can be used by this assumption using Park transformation to represent a three-phase alternate current motor as an equivalent two-phase machine. This technique is based on vector transformation from a stationary reference frame to a rotating reference frame (d, q) that represents the mathematical model of the motor in constant variables similar to that of a separately excited direct current motor [6]. However, Park transformation is intended for sinusoidal back-EMF machines making it necessary to modify the transformation that allows implementation for a BLDC motor with non-sinusoidal variables.
In [7,8] a modification to Park transformation is described that allows the transformation to be implemented for non-sinusoidal machines. The modification introduces a set of variables that compensate the variations resulting from standard Park transformation for accurate field orientation. These research papers focus on the implementation of the modified transformation and use PI controllers to control rotor velocity and stator currents. PI and PID controllers are often used in BLDC motor control (see [7][8][9]), however, these types of controllers lack the robustness needed for many practical applications due to their poor performance to parametric variations and presence of disturbances. Other methodologies that have been used recently in speed control of BLDC motors are fuzzy-based controllers [10][11][12]. Many of these systems are PID controllers with a fuzzy logic algorithm that tunes the controller gains. Other works rely on fuzzy logic controllers that have a better performance when compared to traditional PID control laws but external and internal variations can still impact negatively in the performance of the system. Sliding mode control is another kind of controllers that have been recently implemented for brushless direct current motors [3,13,14]. Load torque variations, back-EMF estimation, ripple reductions, and proper field orientation are some of the most common problems presented in sliding mode control for electric motors. Most of these works focus on these problems separately while just a few deal with more than one of that issues at same time.
In this paper, a sliding mode (SM) speed controller is described for a BLDC motor. Sliding mode controlled systems exhibit high-frequency oscillations in the output known as chattering, this is due to the discontinuous nature of the sign function used in the control signal. By introducing a super-twisting second-order sliding mode scheme it is possible to mitigate the chattering effect [15]. An important characteristic of SM control is its robustness to parametric variations and rejection of disturbances presented in its control subspace known as matched perturbations while unmatched variations have a negative effect in the sliding mode dynamics [16]. Nested sliding mode control has been designed to improve the performance of the SM controller when unmatched disturbances are present [17]. Furthermore, to obtain a mathematical model that accurately represents the BLDC motor, a modified Park transformation is used. The modification requires information from the back-EMF generated by the motor to compensate for the error resulting from standard Park transformation. A previous work was conducted that describes the modified transformation used in this paper and the developed control law while assuming that all information from the back-EMF signals is available, which is not possible to achieve in real-life scenarios, see [18]. Back-EMF estimation can be read while the motor phases are not being excited, but this task proves difficult while operating the motor, in this research paper a super-twisting second-order sliding mode observer is added to solve back-EMF estimation while operating the motor. Back-EMF estimation is an interesting research area, there are several observer techniques used for this task, some of these observers include sliding mode observers [19] extended Kalman Filter observers [20] and adaptive observers [21] among others. Regardless, these works show high complexity procedures that demand high computational processing. In this paper, a simple second-order sliding mode observer is designed where the equivalent control signals from the observer tend to take the form of the back-EMF. Simple manipulation of these control signals is used to determine the information needed for the modified Park transformation. Additionally, the controller has been adjusted along with the estimated signals to achieve satisfactory system performance under conditions similar to real-time experimentation.
The main contribution of this work resides in the use of a modified transformation described in previous papers [7,8] while improving the control approach in these works by using a robust second-order sliding mode controller design. The performance of the controller is enhanced using a nested scheme that is robust to parameter variations and is capable of unmatched disturbance rejection. It is important to take into consideration the non-sinusoidal nature of the machine by using a modified transformation for proper field-oriented control while utilizing a more robust and complex control design that is capable of rejecting external and internal disturbances such as load perturbations and parametric variations. A sliding mode observer for the back-EMF of the machine is implemented as an addition to a previous research paper [18]. Estimation of the back-EMF is important since it is not possible to measure these variables while the motor is in operation which contains the information needed to modify the transformation and achieve accurate field orientation. It is shown that the design of the observer gives an accurate estimation of the back-EMF even in presence of simulated sensor noise and signal delays as well as low-speed operation. Simulations are carried out in presence of noise and signal delays as well as parametric variations and load perturbations using high and low-velocity reference signal to test the performance of the system under similar circumstances to that of real-time experimentation [22].
The rest of this work is organized as follows: Section 2 deals with the background of the BLDC motor mathematical model as well as the stationary and rotary reference frame transformations. Section 3 describes the design of a sliding mode back-EMF observer used for the modified transformation of the model of a BLDC motor. Then a nested high order sliding mode controller is presented. Section 4 presents the simulation results obtained that validate the observer and controller design. Section 5 finalizes with the conclusions derived from this research work.

Brushless Direct Current Motor Modeling
It is a common practice in the analysis of electrical motors to express the mathematical models in different reference frames that simplify the complexity of the equations that describes the behavior of electrical machines. Such representation of the mathematical models is done so by applying well-known transformations. This section describes the mathematical background for the modeling of BLDC motors described in [18].

Mathematical Modeling of the BLDC Motor in Natural Variables
A mathematical model can be expressed in the following set of equations assuming a symmetrical three-phase BLDC motor while ignoring mutual inductance between phases and magnetic hysteresis [23]: where v as , v bs , v cs and i as , i bs , i cs are the stator phase voltages and stator phase currents respectively, R s is the stator phase resistance and L s being the stator inductance. The induced stator back-EMF waveforms are denoted by e as , e bs and e cs and can be written as: where ω e = dθ e /dt defines the electrical rotor velocity, λ p is the magnitud of the flux linkages generated by the permanent magnets, θ e = p 2 θ m represents electrical angular position of the rotor with p being the number of motor poles and θ m representing the rotor mechanical position. The functions f as (θ e ), f bs (θ e ) and f cs (θ e ) are position dependent back-EMF waveform fundamental functions shown in Figure 1. The following equation describes the electromagnetic torque generated by the motor: T e = [e as i as + e bs i bs + e cs i cs ] 1 and by substituting (2) in this equation, the electromagnetic torque can be expressed by: To complete the mathematical model it is necessary to describe the equation of motion for the BLDC motor as: From (1) and (5), the mathematical model results as:

Mathematical Model of the BLDC Motor in (α, β) Reference Frame
A useful transformation known as (α, β) transformation is commonly used to express a three phase system as an equivalent set of two variable equations system [24]. Three phase variables are transformed from a three phase reference frame to an orthogonal two-axis reference frame simplifying subsequent analysis. The following matrix is used to transform the BLDC model (6): The transformation matrix (7) is applied to (1) to obtain the voltage equations for the machine in (α, β) reference frame described as: Furthermore, by applying this transformation to (4) the electromagnetic torque is given in (α, β) reference frame as: Then, it is possible to describe the mathematical model for the BLDC motor in (α, β) reference frame:

Mathematical Model of the BLDC Motor in (d, q) Reference Frame
Field orientation of three-phase motors is widely used since it permits to represent the dynamics of motors similarly to that of DC motors, which is characterized by constant variables. Park transformation, also known as (d, q) transformation, is used to represent a stationary system in a rotary reference frame that is fixed to the magnetic fluxes generated in the motor [24]. BLDC motors commonly have hall effect sensors which are used for rotor position but only used as a six-position profile, it is then necessary to use an encoder or resolver to sense the electrical position of the rotor at all time instances. The transformation is achieved using an orthogonal transformation matrix expressed by: Applying (d, q) transformation to (8) and (9) gives the (d, q) voltage equations: and the (d, q) electromagnetic torque equation: From (12) and (13), the (d, q) mathematical model of the BLDC motor can be written as: It is important to note that Park transformation is designed for motors with sinusoidal shaped back-EMF. The BLDC motor has non-sinusoidal back-EMF fundamental functions as shown in Figure 1; therefore, to achieve correct field orientation a modification to standard Park transformation is needed (see [7]). Figure 2 shows the back-EMF fundamental functions of the motor in (d, q) reference frame.  Evidently, a modification to standard (d, q) transformation is required to obtain the mathematical model of the BLDC motor with time-invariant variables.

Mathematical Model of the BLDC Motor in Modified-(d, q) Reference Frame
A modification to Park transformation is described in [7,8], where two new variables are presented to compensate amplitude and position error resulting from standard (d, q) transformation. An offset to the rotor position, denoted as µ, is introduced to fix the d component of the back-EMF fundamental function along the d axis of the reference frame. A variable κ is used to compensate for the amplitude variations in the q-component of the back-EMF fundamental functions. The modified transformation matrix is defined as: where the compensation variables are described as: It is evident that this modified transformation is a generalization of Park transformation for non-sinusoidal back-EMF motors where µ = 0 and κ = 1 for a sinusoidal machine.
The resulting back-EMF fundamental functions after modified transformation, denoted f md (θ e ) and f mq (θ e ), are shown in Figure 3. From this figure it is clear that the modified transformation successfully transforms non-sinusoidal variables to constant dc quantities which shows proper field orientation, thus, allowing control schemes for the BLDC motor to be designed similarly as other PMSM that have sinusoidal shaped back-EMF. It is then necessary to express a mathematical model for the BLDC motor in this newly defined reference frame. Applying (15) into (8) gives the voltage equations in the modified-(d, q) reference frame: where f md (θ e ) is fixed to the d-axis of the modified reference frame and is equal to zero and f mq (θ e ) = 1/κ 2 . Also, the electromagnetic torque (9) results in: in this new reference frame.
From (17) and (18) and by substituting f md (θ e ) = 0 and f mq (θ e ) = 1/κ 2 , we obtain the mathematical model for the BLDC motor in the modified-(d, q) reference frame: It is important to note that the differential equation for the rotor velocity of (19) results in a simplification of the rotor velocity equation in (14) by the modified transformation. This simplification allows the controller to be designed in a similar fashion as a PMSM as in [25].

Sliding Mode Back-EMF Observer Design
The modified transformation described in (15) and (16) requires the back-EMF waveform fundamental functions to compensate the errors present in standard (d, q) transformation. The back-EMF is not a measurable variable while the motor is being operated so an observer is used to estimate these variables while compensating simultaneously at all time instances the modified transformation. This information is needed Based on (10). As an addition to previous research [18], a sliding mode observer is proposed as: Current estimation errors are then calculated asĩ α = i α −î α andĩ β = i β −î β whereî α and i β are estimated currents. Deriving the estimation errors and using (20) and (10) the dynamics of the estimation errors result as: Following a super-twisting sliding mode observer scheme, the observer injection signals are designed as: where M α , N α , M β and N β are observer design gains set so that the current estimation errors tend asymptotically to zero as in [26], mathematical proof for the finite time convergence of the estimation errors can be found in [25]. The resulting closed loop sliding mode functions are: An important property of this observer is that the equivalent control signals from the observer defined from (22) tend to take the form of the unmeasurable terms of the system. When sliding mode occurs, the current estimation errorsĩ α andĩ β are equal to 0. From (21) one determines the following equivalent expressions for the injected signals: and thus it is possible to estimate the back-EMF waveform fundamental functions needed in the compensation variables (16) used in the modified transformation as: Finally, a block scheme of the system is presented in Figure 4.

Nested High Order Sliding Mode Control Design
Following [18], speed control of the BLDC motor is designed by considering a mechanical angular velocity reference signal, ω re f , and determining the speed tracking error of the system as z 1 = ω m − ω re f [27]. Deriving the tracking error and substituting from (19) the tracking error dynamic can be expressed as:ż The dynamic for the speed tracking error, z 1 , is proposed as follows: where k 1 > 0. A sigmoid function S ε is used as an approximation of the sign function and is defined as: A sigmoid function is used instead of a sign function because its derivative nature allows it to be implemented in the control design improving the response of the system to unmatched disturbances, see [17]. A sigmoid function is shown in Figure 5 for different values of ε. Clearly the approximation of the sign function is obtained for sufficiently small values of ε. Furthermore, from (26) and (27) a reference current is developed which acts as a pseudo-control law that incorporates the desired dynamics of the velocity tracking error as: In field oriented control, the reference current i mdre f is fixed to zero to maximize torque [24]. Current tracking variables are then defined as z 21 = i md − i mdre f and z 22 = i mq − i mqre f where: To force the current tracking errors to converge asymptotically to zero, a super-twisting second order sliding mode control law is proposed as: with k d , k d1 , k q , k q1 as positive control parameters designed so that z 21 y z 22 tend to zero in finite time. The closed-loop system is obtained by substituting control signals u md and u mq in (30) and by considering (26) with Note that ϕ d and ϕ q are bounded functions, i.e., |ϕ d | ≤ δ 1 > 0, and |ϕ q | ≤ δ 2 > 0. This assumption is natural due to the limited energy supplied to the motor. Due to the boundness of such functions, control gains can be designed as in [27], mathematical proof of the convergence of current tracking errors in finite time is also shown in the previous reference.
When sliding mode occurs, z 21 = z 22 = 0, the sliding mode dynamics reduce to the dynamics of the velocity tracking error as:ż where gain k 1 can be designed to guarantee that the speed tracking error tends asymptotically to zero in finite time [17].
Although the observer and the controller are separately designed, the separation principle is satisfied by achieving finite time convergence of the output tracking error of the system and ensuring that the current estimations errors tend asymptotically to zero, mathematical proof of the finite-time convergence is shown in [28].

Simulation Results
Simulations are carried out to verify the performance of the designed observer and controller. To emulate real-time experimentation noise is introduced to the current and speed signals and delays in both input and output of the controller were applied along with load and coil resistance variations. Table 1 details the parameters of the BLDC motor that was used. It is possible to assume that BLDC motors have a sinusoidal shaped back-EMF as described in [2][3][4][5]. This assumption is done so by simplification or by mistake and can have a negative effect on system performance. In Figure 6, a comparison is done showing the performance of a sliding mode controller designed assuming a BLDC motor with sinusoidal shaped back-EMF when applied to both a sinusoidal and non-sinusoidal variable BLDC motor. Figure 6a shows the performance of a sliding mode controller designed assuming a BLDC motor with sinusoidal shaped back-EMF applied to a sinusoidal variable BLDC motor and Figure 6c displays the response of the same controller when paired to a non-sinusoidal variable machine, a close up on the performance of both cases is shown in Figure 6b and Figure 6d respectively. Table 2 shows the precision error and chattering percentage of the performance of the system when assuming a sinusoidal and trapezoidal variable BLDC motor.  Table 2. Precision error and chattering for sinusoidal and trapezoidal back-EMF assumption.

Back-EMF Type Precision Error Chattering
Sinusoidal 0.1% 0.2% Trapezoidal 0.05% ≈0% It is clear that both systems follow the reference signal as expected but the controller designed assuming a sinusoidal variable device exhibit oscillations around the reference signal. These variations result from the control law design when a sinusoidal variable motor is assumed and is applied to a more accurate mathematical model of the motor with non-sinusoidal back-EMF.
The modified transformation used in this paper requires information from the back-EMF fundamental functions which are not accessible during motor operation. There are several observer schemes used in back-EMF estimation that require heavy computation processing. A Luenberger observer is a common technique used in back-EMF estimation that is relatively uncomplicated and does not require heavy computational processing. In this paper, a super-twisting second-order sliding mode based observer is used due to its accurate estimation and simple design. Figures 7 and 8 show the performance of the proposed observer and a Luenberger observer respectively. Figure 9 shows a comparison of both observers where it shows that the proposed observer has lower estimation errors when compared to a Luenberger observer.  For a proper analysis, a modified transformation has been used to obtain an accurate model of the motor and subsequent controller design. The design gains of the system are presented in Table 3 which were defined by experimental tuning. Furthermore, to test the response of the system for different rotor velocities, an angular velocity reference signal is specified as: 200 rad/s; 0s ≤ t < 5 s 10 rad/s; 5s ≤ t < 8 s −80 rad/s; 8s ≤ t < 10 s.
To analyze the robustness of the designed controller to unmatched disturbances, a variation to the load torque of the motor is used. Additionally, a gradual increase of 50% of the stator resistance is introduced to simulate the effect of temperature rise in the motor coils. These variations have the following form: Besides, 5% noise is introduced to the current and speed signals simulating real-time readings from sensors as well as signal delays in both sensors and control signals. The output of the system is shown in Figure 10. It is easy to see that the motor is able to follow the desired reference signal at positive and negative velocities with zero crossing and it also shows good performance at low speed where traditional observer-based controllers usually tend to show performance degradation.
The introduced variations are shown in Figure 11a,c and the figures Figure 11b,d display a zoom of the output of the system at the time instances where these perturbations are introduced. From these figures it is clear that the designed controller is able to reject unmatched disturbances such as load torque variations and shows robustness to parametric variations. The currents in natural variables i a , i b and i c are shown in Figure 12 and the control signals in natural variables u a , u b and u c are described in Figure 13. Also, the currents and control voltages in modified-(d, q) are shown in Figure 14 and Figure 15 respectively. These figures show the response of the control voltages and the sensed currents under the presence of the simulated noise and delay. Furthermore, the current Figures 12 and 14 show the effect of the introduced load variation at 2.5 s.    The modified-(d, q) transformation described in this paper requires the estimation of the back-EMF fundamental functions to compensate for the error resulting from standard (d, q) transformation. Figures 16a and 17a show the correct estimated back-EMF fundamental functionsf α (θ e ) andf β (θ e ). The transient responses of both estimations are shown in Figures 16b and 17b. The estimation of these functions uses information from the measurable variables that are simulated with noise and signal delays. Figures 16c and 17c show a zoom of the back-EMF estimation errors before parametric and load variations and a zoom of the estimation errors after the variations are presented is shown in Figures 16d and 17d. From these figures, it is clear that the observer is able to perform successfully under these disturbances. The performance of the observer is further displayed in Figure 18a,b where it is shown that the estimation errors for the back-EMF functions are lower than 0.25 units for positive and negative speeds. Traditional observer-based controlled systems usually present degradation of performance at low speeds, such performance is also shown in the previous figures with estimation errors lower than 0.8 units.   Another characteristic that is important to note is the smooth torque as a result of the modified-d, q transformation which is not an easy task with traditional controllers. Figure 19a shows the electromagnetic torque of the machine under ideal operation where smooth torque is reached during the steady state condition of the motor shown in Figure 19b as a result of the modified-(d, q) transformation.

Discussion
Sliding mode controllers can be designed assuming a BLDC motor with sinusoidal back-EMF which simplifies the control law development but it has been shown to neglect accurate system behavior. To address this issue a modification of Park transformation has been implemented that allows proper motor modeling and controller design. An observer has been introduced to estimate the back-EMF functions needed for the modified-(d, q) transformation. From the described modified transformation a nested high order sliding mode controller for speed control of a BLDC motor has been designed and simulated. The robustness of the system has been analyzed by introducing unmatched disturbances in the form of load torque variations and stator resistance parametric variations with sensor noise and signal delays to emulate real-time experimentation. The system showed a satisfactory response under the previously mentioned stressed conditions. Smooth torque is exhibited in the performance of the system as a result of ripple reduction by the modification introduced in the used transformation. Discrete-time modeling analysis and controller designed are foreseen as future work along with real-time experimentation of both continuous and discrete-time schemes and future implementation on mobile robotic systems and/or electric vehicles.