Sensorless Control for a Permanent Magnet Synchronous Motor Based on a Sliding Mode Observer

: This paper proposes a sensorless control strategy for permanent magnet synchronous motors (PMSMs) based on a sliding mode observer (SMO), and high-speed PMSM sensorless velocity control is realized. To solve the serious chattering and phase lag problems of conventional SMOs, the continuous function is used as the control function, and the low-pass filter is improved into a back electromotive force (EMF) observer with an adaptive structure. In addition, the phase-locked loop is combined to perform the SMO-based sensorless control. The simulations and experiments prove the effectiveness of the proposed strategy


Introduction
Since the 1980s, the emergence of various high-performance permanent magnet (PM) materials has effectively promoted the rapid development of permanent magnet synchronous motors (PMSMs) [1].Compared with induction motors, PMSMs have the advantages of a simple structure, high power density, and large starting torque [2,3], which can effectively meet the needs of train traction.In recent years, they have attracted extensive attention from researchers in the field of rail transit.Many companies, such as Toshiba, Alstom, and Siemens, have engaged in the research and development of PMSM traction drive systems since the late 1990s, and they have been successfully applied to trains [4][5][6][7][8].
With the gradual promotion of PMSMs in the field of rail transit, the requirements for their control performance are also increasing further and further.To meet the highperformance requirements of PMSM drive system, the key is to realize closed-loop control with accurate rotor angle and speed signals.The general acquisition method involves installing mechanical sensors (such as photoelectric encoder, resolver, etc.) on the rotor shaft of the motor.However, the mechanical sensor not only increases the size and the system cost, but also has strict requirements regarding the surrounding environment [9,10].
To avoid these problems, sensorless position control with low cost, high reliability, and simple implementation is proposed.Its implementation method involves processing the detected voltage and current signals in the motor through a control algorithm to complete the estimation of the rotor angle and speed.Sensorless position control technology represents the development trend of PMSM control systems and has become a research hotspot in the field of motor drive control.
Sensorless control methods can be divided into two categories.One involves injecting a high-frequency voltage signal, processing the detected high-frequency current signal, and extracting rotor angle information [11,12].These methods rely on external continuous high-frequency excitation to show the convex polarity, independent of the speed.Therefore, these methods are more suitable for the estimation of the rotor angle at a low speed or even Eng 2024, 5, 1737-1751.https://doi.org/10.3390/eng5030091https://www.mdpi.com/journal/engzero speed.However, their application is narrow and high-frequency voltage or current noise will be introduced.
The other category of methods involves estimating the rotor angle information based on the back electromotive force (EMF) information.These methods are noninvasive and applicable for medium-and high-speed motor operations.This type of method can be divided into the following categories: (1) Rotor position estimation methods based on the electromagnetic relationship [13,14].These methods introduce the concept of 'active flux' and design the rotor position observer.These methods require high accuracy of the motor parameters and have poor robustness to parameter changes.(2) Rotor position estimation methods based on a model reference adaptive system (MRAS) [15,16].These method introduce a rotor flux correction link to make the estimation result more accurate.However, their estimation accuracy is greatly affected by the system parameters, and it has a strong dependence on the selection of the reference model and the adjustable model.
(3) Rotor position estimation methods based on an extended Kalman filter (EKF) [17][18][19].These methods consist of an efficient recursive estimation algorithm based on the minimum variance.However, they are difficult to implement because they depend more on the accuracy of the model and system parameters.In addition, the amount of calculation is large.(4) Rotor position estimation method based on a sliding mode observer (SMO).The SMO was developed on the basis of variable structure control theory.The stator voltage and current signals of the motor are adopted to construct the current observer.The sliding mode surface and the control function are designed based on the difference between the observed current and the actual current.Then, the rotor position and speed are estimated.
The sliding mode can be designed and is independent of the internal parameters and disturbances of the system.Therefore, the SMO has strong parameter robustness.However, its essentially discontinuous characteristics will also cause chattering problems.Chattering will affect the estimation accuracy of the control system.Thus, it is necessary to weaken the chattering of the SMO.
Much research has been carried out to solve the chattering problem, and it can be divided into the following categories [20]: (1) Smoother switching functions [21,22].Many continuous switching functions or control functions have been proposed to replace the discontinuous function to solve the chattering problem.(2) Higher-order SMO [23,24].The second-order (full-order) SMO is applied to weaken the chattering.However, the computational burden is increased.(3) Adaptive gain [25,26].Different adaptive SMOs have been proposed to solve the chattering problem.However, this increases the difficulty of the design process and reduces the practicability of the control algorithm.
Therefore, this paper proposes a sensorless control strategy for a PMSM based on an SMO.To solve the serious chattering and phase lag problems of a conventional SMO, the continuous function is used as the control function, and the low-pass filter is improved into a back electro-motive force (EMF) observer with an adaptive structure.In addition, the phase-locked loop is combined to perform the SMO-based sensorless control.The structure of this paper is arranged as follows.Section 2 introduces the basic principle of conventional SMO.The scheme of the improved SMO is described in Section 3. Section 4 shows the experimental investigations and Section 5 presents the conclusion.

Conventional SMO Scheme
The mathematical model of PMSM in the two-phase rotating coordinate system (d−q) is as follows: In (1), u d and u q are the dand q-axis stator voltages, respectively.i d and i q are the dand q-axis stator currents, respectively.R s is the stator resistance.ω r is the electrical angular speed.L d and L q are the dand q-axis inductances, respectively.ψ f is the permanent-magnet flux linkage.
For three-phase PMSM control system, the design of the SMO algorithm is generally based on the mathematical model in the two-phase stationary coordinate system (α−β), which is as follows: In (2), u α and u β are the α-and β-axis stator voltages, respectively.i α and i β are the α-and β-axis stator currents, respectively.θ r is the rotor position electrical angle.The expressions of inductances are as follows: Due to the existence of the convex polarity of the interior PMSM, the rotor position information in the voltage model is not only reflected in the back EMF, but also reflected in the inductance matrix.To eliminate the coupling relationship of rotor position, (1) is written as follows: In (8), p is a differential operator.Then, the concept of extended back EMF is introduced: In ( 9), E α and E β are extended back EMF components.The voltage equation based on the extended back-EMF model is obtained by transforming Equation (8) into an α−β coordinate system.
The extended back EMF contains all of the information regarding the rotor position and speed.It is necessary to obtain the accurate extended back EMF to estimate rotor position and speed.To facilitate the application of SMO to observe the extended back EMF, the voltage Equation ( 10) is rewritten with the stator currents as the state variables: Since the stator currents are the only physical quantities that can be directly measured, the sliding mode surface is selected on the stator current trajectory.
In (12), the superscript 'ˆ' denotes the estimated value, and the superscript '-' denotes the error value.u α and u β are the control inputs of the observer.To obtain the estimated value of the extended back EMF, the conventional SMO is usually designed as It is assumed that when the stator current reaches the sliding mode region and the sliding mode dynamics occur, the estimated speed can converge to the actual speed: According to ( 11) and ( 13), the error equation of the stator currents can be obtained as follows: In ( 15), z α and z β are the control functions.The control functions are obtained using the difference between the estimated value and the actual value of the stator currents.The deviation between the two can be corrected by this control function until the deviation is reduced to zero.To ensure that the stator current converges to the sliding mode surface in a limited time, the control functions are designed as follows: In ( 16), k is the gain coefficient of the SMO, while sign(s) is the switching function, expressed as follows: When the state variable of the SMO reaches the sliding mode surface, the observer state will remain on the sliding mode surface.According to the equivalent control principle of sliding mode variable structure control, the control quantity at this time can be regarded as the equivalent control quantity.Therefore, the following results are obtained: Since the actual control variable is a discontinuous high-frequency switching signal, a low-pass filter is usually required to extract a continuous extended back-EMF estimate: In (19), ω c is the cut-off frequency of the low-pass filter.
After obtaining the continuous estimated value of the extended back EMF, the arctangent function method is usually used to obtain the estimated value of the rotor position.
The estimated value of the motor speed can be obtained by the differential operation of (20).
Thus, the control diagram of the conventional SMO algorithm is shown in Figure 1.
The estimated value of the motor speed can be obtained by the differential oper of Error!Reference source not found..

Control Function
The discontinuity of the control caused by the switching action is the essential re for the occurrence of chattering.Buffeting not only affects the accuracy of control, bu increases energy loss, which can cause system oscillation or instability in severe case reduce the impact of chattering, it is necessary to improve the control function in the algorithm.The variable boundary saturation function is applied instead of the switc function to weaken buffeting.

Variable Boundary Layer Saturation Function
Firstly, the variable boundary layer saturation function is used to replace the ori switching function to improve the estimation performance of the SMO.The expressi the saturation function is as follows: In Error!Reference source not found.,Δ is the boundary layer.The essence o boundary layer is as follows: outside the boundary layer, switching control is ado within the boundary layer, linear control is adopted.When the selection is too smal linear interval is small, and the system chattering reduction effect is not obvious.W the selection is too large, the linear interval is large.At this time, although the chatt

Control Function
The discontinuity of the control caused by the switching action is the essential reason for the occurrence of chattering.Buffeting not only affects the accuracy of control, but also increases energy loss, which can cause system oscillation or instability in severe cases.To reduce the impact of chattering, it is necessary to improve the control function in the SMO algorithm.The variable boundary saturation function is applied instead of the switching function to weaken buffeting.

Variable Boundary Layer Saturation Function
Firstly, the variable boundary layer saturation function is used to replace the original switching function to improve the estimation performance of the SMO.The expression of the saturation function is as follows: In (22), ∆ is the boundary layer.The essence of the boundary layer is as follows: outside the boundary layer, switching control is adopted; within the boundary layer, linear control is adopted.When the selection is too small, the linear interval is small, and the system chattering reduction effect is not obvious.When the selection is too large, the linear interval is large.At this time, although the chattering is weakened, the discrete structure of the SMO is destroyed, and the estimation accuracy and robustness of the system are reduced.Therefore, it is necessary to select the boundary layer thickness reasonably.The diagram of the saturation function is shown in Figure 2.
Eng 2024, 5, FOR PEER REVIEW 6 is weakened, the discrete structure of the SMO is destroyed, and the estimation accuracy and robustness of the system are reduced.Therefore, it is necessary to select the boundary layer thickness reasonably.The diagram of the saturation function is shown in Figure 2.
The control function using the saturation function has the following expression: ŝat( ) ŝat( ) Based on the idea of quasi-sliding mode, this paper continues to improve the control function on the basis of the saturation function and replaces the variable boundary layer saturation function with a continuous function.The expression is shown as follows: The control function using the saturation function has the following expression:

Continuous Function
Based on the idea of quasi-sliding mode, this paper continues to improve the control function on the basis of the saturation function and replaces the variable boundary layer saturation function with a continuous function.The expression is shown as follows: In (24), a is the slope of the continuous function, and a > 0. The smaller the slope a is, the smoother the curve of the continuous function is, and the smaller the system chattering is.The larger the slope a is, the greater the system chattering is.The schematic diagram of the continuous function is shown in Figure 3.
The control function using the saturation function has the following expression: ŝat( ) ŝat( )

Continuous Function
Based on the idea of quasi-sliding mode, this paper continues to improve the control function on the basis of the saturation function and replaces the variable boundary layer saturation function with a continuous function.The expression is shown as follows: ( ) ( ) In Error!Reference source not found., a is the slope of the continuous function, and a > 0. The smaller the slope a is, the smoother the curve of the continuous function is, and the smaller the system chattering is.The larger the slope a is, the greater the system chattering is.The schematic diagram of the continuous function is shown in Figure 3.  ŝigmoid( ) The switching control function with a continuous function has the following expression:

Low-Pass Filter
The extended back EMF after the continuous function still contains discontinuous high-frequency harmonic signals.The conventional SMO algorithm usually uses a low-pass filter to extract continuous extended back EMF estimates.The ordinary low-pass filter causes the extended back EMF estimation component to have a phase delay, which directly affects the accuracy of the rotor position estimation.To achieve a better filtering effect and achieve the purpose of accurately estimating the rotor position, it is necessary to improve the low-pass filter.In this paper, an extended back EMF observer with an adaptive structure is designed.It can not only remove high-order harmonics, but also accurately estimate the rotor position without compensating for the phase.
According to the design of the conventional SMO, the stator current equation ( 11) can be written as: In (26), A, B, and K e are matrix forms of equation coefficients.
The sliding surface function is defined as: The current observer is designed as follows: According to ( 26) and (28), the error equation of the current is Since the system enters the sliding surface, there is Thus, it can be obtained that Since the mechanical time constant is much larger than the electrical time constant, the rotational speed can be considered to be constant in an estimation period.Therefore, the extended back EMF observer is designed as follows: In (32), l is the adaptive law.It can be seen that the estimated component of the extended back EMF does not need to go through the filtering link, so as to avoid the problem of phase delay and waveform distortion caused by the low-pass filter.To verify the stability of the extended back EMF observer, the Lyapunov function is defined as follows: According to ( 9) and (33), it can be obtained that: Equation (34) satisfies the Lyapunov stability equation, indicating that the algorithm is stable.

Rotor Position Estimation
Since the sliding mode variable structure control is accompanied by high-frequency chattering in the sliding mode, the estimated extended back EMF will contain highfrequency harmonic signals.The rotor position estimation method based on the arctangent function will directly introduce these harmonic signals into the division operation of the arctangent function, which will cause a large angle estimation error.The larger angle error will form a larger pulsation on the rotational speed after the differential, especially at low speeds.In order to reduce this error, this paper uses a phase-locked loop (PLL) system to extract rotor position information, and its implementation block diagram is shown in Figure 4.
Assuming that it can be obtained that sin θ r − θr = θ r − θr (37) arctangent function, which will cause a large angle estimation error.The larger angle will form a larger pulsation on the rotational speed after the differential, especially a speeds.In order to reduce this error, this paper uses a phase-locked loop (PLL) syst extract rotor position information, and its implementation block diagram is shown in ure 4. Assuming that ( )( ) it can be obtained that ( ) The error is defined as: ( ) ( ) The error is defined as: Through the above analysis, it can be seen that the principle of the PLL system to estimate the rotor position is to construct the error of the extended back EMF component, and the error is directly calculated by the PI regulator to calculate the estimated speed, and then the estimated rotor position angle is obtained by the integral operation, thus avoiding the error interference caused by the use of the arctangent function and the differential link.
In order to verify the stability of the PLL system, the equivalent block diagram of Figure 4 is shown in Figure 5.
Through the above analysis, it can be seen that the principle of the PLL system to estimate the rotor position is to construct the error of the extended back EMF component, and the error is directly calculated by the PI regulator to calculate the estimated speed, and then the estimated rotor position angle is obtained by the integral operation, thus avoiding the error interference caused by the use of the arctangent function and the differential link.
In order to verify the stability of the PLL system, the equivalent block diagram of Figure 4 is shown in Figure 5.According to Figure 5, the transfer function can be obtained: In Error!Reference source not found., ωn determines the bandwidth of the PI regulator, and The error transfer function is ( ) Assuming that the motor speed is constant at a certain time, the input of the phaselocked loop system is the ramp function.At this time, the steady-state error of the estimated rotor position is The steady-state error of the estimated rotor position is 0, indicating that the algorithm is stable.According to Figure 5, the transfer function can be obtained: In (39), ω n determines the bandwidth of the PI regulator, and The error transfer function is Assuming that the motor speed is constant at a certain time, the input of the phaselocked loop system is the ramp function.At this time, the steady-state error of the estimated rotor position is The steady-state error of the estimated rotor position is 0, indicating that the algorithm is stable.
In summary, by improving the control function, the low-pass filter, and the rotor position estimation method, this paper designs an improved SMO, and its implementation schematic is shown in Figure 6.

Experimental Platform
To verify the feasibility and control performance of the sensorless control strate a PMSM based on an SMO proposed in this paper, a series of experiments were comp on the experimental platform of a PMSM based on the Myway system.
The schematic diagram of the PMSM experimental platform based on the M system is shown in Figure 8.

Experimental Platform
To verify the feasibility and control performance of the sensorless control strategy o a PMSM based on an SMO proposed in this paper, a series of experiments were complete on the experimental platform of a PMSM based on the Myway system.
The schematic diagram of the PMSM experimental platform based on the Mywa system is shown in Figure 8.

Experiments 4.1. Experimental Platform
To verify the feasibility and control performance of the sensorless control strategy of a PMSM based on an SMO proposed in this paper, a series of experiments were completed on the experimental platform of a PMSM based on the Myway system.
The schematic diagram of the PMSM experimental platform based on the Myway system is shown in Figure 8.
The experimental platform is mainly composed of a 5.5 kW PMSM, a main circuit, and a control circuit.The main circuit of the system includes a voltage regulator, a 380 V three-phase AC power supply, a diode rectifier, a support capacitor, a three-phase PWM inverter, speed and position sensors, coupling, a magnetic powder dynamometer, and so on.Firstly, the input 380 V three-phase alternating current is changed into a 540 V direct current through the rectifier, and then according to the control command of the driving signal, the 540 V direct current is changed into a three-phase alternating current through the three-phase PWM inverter to supply the PMSM end and drive the motor to start.When the motor is running, the required load torque is provided by the magnetic powder dynamometer, and the load torque can be changed by changing the excitation current in the magnetic powder dynamometer.The experimental platform is mainly composed of a 5.5 kW PMSM, a main circuit and a control circuit.The main circuit of the system includes a voltage regulator, a 380 V three-phase AC power supply, a diode rectifier, a support capacitor, a three-phase PWM inverter, speed and position sensors, coupling, a magnetic powder dynamometer, and so on.Firstly, the input 380 V three-phase alternating current is changed into a 540 V direc current through the rectifier, and then according to the control command of the driving signal, the 540 V direct current is changed into a three-phase alternating current through the three-phase PWM inverter to supply the PMSM end and drive the motor to start.When the motor is running, the required load torque is provided by the magnetic powder dyna mometer, and the load torque can be changed by changing the excitation current in the magnetic powder dynamometer.
The system control circuit is a set of motor control systems based on a TMS320F28335 DSP controller developed by the Myway company.Firstly, the voltage and current sensors input the measured signal into the control board through the A/D port.The DSP contro module will generate six PWM pulse signals according to the input voltage and curren signals, and then the six PWM pulse signals will act on the three-phase PWM inverter through the drive circuit to output the three-phase AC voltage, so as to realize the vector control of the permanent magnet synchronous motor.The DSP control module is con nected to the host computer through the system communication interface.In the host com puter, the motor can be controlled in real time, and the waveform of each signal can be observed in real time.
The experimental platform of a permanent magnet synchronous motor based on the system is shown in Figure 9.The PMSM parameters are shown in Table 1.The system control circuit is a set of motor control systems based on a TMS320F28335 DSP controller developed by the Myway company.Firstly, the voltage and current sensors input the measured signal into the control board through the A/D port.The DSP control module will generate six PWM pulse signals according to the input voltage and current signals, and then the six PWM pulse signals will act on the three-phase PWM inverter through the drive circuit to output the three-phase AC voltage, so as to realize the vector control of the permanent magnet synchronous motor.The DSP control module is connected to the host computer through the system communication interface.In the host computer, the motor can be controlled in real time, and the waveform of each signal can be observed in real time.
The experimental platform of a permanent magnet synchronous motor based on the Myway system is shown in Figure 9.The PMSM parameters are shown in Table 1.
Eng 2024, 5, FOR PEER REVIEW 12    The motor runs at a constant speed of 300 rpm without load.At 4.6 s, it accelerates from 300 rpm to 400 rpm at an acceleration of 500 rpm/s to stable operation.At 8.4 s, it decelerates to 300 rpm at an acceleration of −500 rpm/s, and then maintains constant-speed operation.The experimental results are as follows:

Torque excitation system of dynamometer
Figure 10 is the experimental waveform of the motor speed from 300 rpm to 400 rpm, and then it slows down to 300 rpm constant-speed operation.It can be seen from (a) that when the speed changes from 300 rpm to 400 rpm, the value of the current id also increases from 0 to 1 A, and when the motor runs at a constant speed, id returns to near zero.When the speed is decelerated from 400 rpm to 300 rpm, there is an opposite change process.
It can be seen from (b) that when the speed command value rises to 400 rpm at 4.6 s, the actual speed value will also respond quickly and gradually track the change in the speed command; the actual value of the speed after a steady state fluctuates between 380 rpm and 420 rpm, and the average value is basically consistent with the speed instruction value.When the speed is decelerated from 400 rpm to 300 rpm, there is an opposite change process.
When the speed is accelerated 300 rpm to 400 rpm, the speed estimation error increases from ±20 rpm (actual speed 6.7%) to ±22 rpm (actual speed 7.3%).When the motor runs at a constant speed of 400 rpm, the speed estimation error is reduced by ±20 rpm (the actual speed is 6.7%).
It can be seen from (c) that when the speed is accelerated from 300 rpm to 400 rpm, the error range of rotor position estimation is changed from (−2 • , 4 • ) to (−9 • , −10 • ).When the motor runs at a constant speed of 400 rpm, the rotor position estimation error range becomes (−4 • , 2 • ).
At the moment of speed change, the rotor position and speed estimation error will increase, and the motor will converge to a smaller range after stable operation.This shows that the improved sliding mode observer has better dynamic response performance and can still maintain high rotor position estimation accuracy when the speed changes.

Constant-Speed Variable-Load Experimental Results
The motor runs at a constant speed of 300 rpm, and different load torques are manually applied to the motor through the dynamometer.The load torque is gradually increased from 0 at 2 s, and the load torque is increased to 0.5 Nm at 6.5 s; the load torque is gradually reduced from 0.5 Nm at 9 s, and the load torque becomes 0 at 13 s, and then the no-load operation is maintained.The experimental results are as follows: Figure 11 is the experimental waveform of the load torque change during the constantspeed operation of the motor at 300 rpm.The change in load torque directly affects the change in quadrature axis current i q , as shown in (a).When the load torque changes from 0 to 0.5 Nm, the value of the current id also fluctuates from around 0 to around 0.5 A. When the motor load torque returns to 0, the id fluctuates back to around zero.It can be seen that in the process of the load torque changing from 0 to 0.5 Nm speed estimation error increases from ±12 rpm (actual speed 4%) to ±18 rpm (actual s 4.5%).When the current iq is stable, the speed estimation error is also stable, and th namic performance is better.
Through the above experiments, it can be seen that the sensorless position contr PMSM with an improved SMO has high accuracy of rotor position and speed estima good dynamic performance, and strong robustness.

Conclusions
In this paper, a sensorless control strategy for a PMSM based on an SMO is prop

Conclusions
In this paper, a sensorless control strategy for a PMSM based on an SMO is proposed.The continuous function is used as control function and the low-pass filter is improved into a back-EMF observer with an adaptive structure.In addition, the phase-locked loop is combined to perform the SMO-based sensorless control.The variable-speed no-load experiments and constant-speed variable-load experiments are carried out on the Myway control diagram of the conventional SMO algorithm is shown in Figu

Figure 3 .
Figure 3. Continuous function.The switching control function with a continuous function has the following expression: ŝigmoid( ) ŝigmoid( )

Figure 4 .
Figure 4. Block diagram of SMO based on PLL.

Figure 4 .
Figure 4. Block diagram of SMO based on PLL.

Eng 2024, 5 ,Figure 6 .
Figure 6.Improved SMO.The sensorless control block diagram of PMSM based on the improved SMO is s in Figure7.

Figure 7 .
Figure 7. Block diagram of a PMSM sensorless control system based on the improved SMO.

Figure 6 . 7 .Figure 6 .
Figure 6.Improved SMO.The sensorless control block diagram of PMSM based on the improved SMO is shown in Figure7.

Figure 7 .
Figure 7. Block diagram of a PMSM sensorless control system based on the improved SMO.

Figure 7 .
Figure 7. Block diagram of a PMSM sensorless control system based on the improved SMO.

Figure 8 .
Figure 8. Schematic diagram of the experimental platform for a PMSM based on the Myway system.

Figure 8 .
Figure 8. Schematic diagram of the experimental platform for a PMSM based on the Myway system.

Figure 9 .
Figure 9. Pictures of the experimental platform for a PMSM based on the Myway system.

Figure 9 .
Figure 9. Pictures of the experimental platform for a PMSM based on the Myway system.

Figure 11 .
Figure 11.Experimental result of closed-loop control with a constant speed and load torque ch

Figure 11 .
Figure 11.Experimental result of closed-loop control with a constant speed and load torque change.

Table 1 .
Parameters of the PMSM.

Table 1 .
Parameters of the PMSM.