1 Introduction

With the development of permanent magnet materials, permanent magnet synchronous motor (PMSM) has the advantages of no rotor loss, high power density, energy efficiency, and good static performance [1,2,3,4]. It has attracted widespread attention and recognition. In general, PMSM needs to be controlled to get constant torque according to the position of the rotor. While the encoder and the rotary transformer have been used to detect the position of the rotor, it increases costs, mechanical instabilities, and the complexity of the system. Meanwhile, the position sensor is sensitive to temperature and vibration, which makes it impossible to install and apply in some special applications [5]. Therefore, sensorless control is gaining increasing attention. Sensorless technology has always been a hot topic, including rotor position information derived through the direct detection of voltage and current [6], linear observer [7], model reference adaptive control methods [8], and nonlinear estimation based on the extended Kalman filter algorithm [9, 10]. However, these technologies have some shortcomings, such as DC offset, non-global convergence, parameter dependence, and large amounts of computing.

Because of the advantages of fast dynamic response, insensitivity to parameter variations, and strong robustness [11, 12], sliding mode observer (SMO) is widely used for the sensorless control of PMSM [13, 14]. Sensorless control based on SMO is an appropriate method to estimate the position according to electromotive force (EMF). In the stator voltage equation, the EMF is processed as a disturbance, and any interference is considered to be a part of EMF. Chattering problem, caused by the discontinuous switch character of sliding mode variable structure control methods, is the main obstacle in using SMOs as back EMF observers [11].

Several methods have been proposed for reducing the effect of chattering on position estimation in SMO. In [15], an iterative sliding mode observer (ISMO) is proposed for the robust sensorless control of a PMSM with variable parameters. The proposed ISMO improves the performance of the sensorless technique by iteratively applying the observer 4 times in a current regular period, which reduces the error of back EMF estimation. However, the ISMO requires more running time than conventional SMO. In [16], the chattering noise is reduced by introducing the fuzzy control algorithm to effectively adjust the switching gains according to the sliding mode arrival condition. However, the addition of fuzzy control increases the complexity of the algorithm.

The method based on switching function is another main method to reduce the effect of chattering on position estimation. The sign function is used to enter into the sliding surface of the conventional SMO. However, the step sign function demanding higher requirements of the low-pass filtering may cause the buffeting phenomenon, resulting in large delay, reducing the accuracy of position estimation. To reduce the chattering problem, a sigmoid function is proposed to replace the sign function. In [17], a sigmoid function with variable boundary layers is used as the switching function. The width of the boundary layers must be adjusted according to velocity, otherwise chattering or steady-state error will occur.

In this paper, sensorless PMSM control with SMO based on sigmoid function is presented. First, the SMO model is derived based on the sigmoid function in this paper according to the mathematical model of the IPMSM. Second, sliding mode gain \(k\) and sufficient condition under which SMO can enter into the sliding surface are obtained using Lyapunov stability analysis method. The key parameter \(a\) in the sigmoid function is discussed. Finally, the results of the simulation and experiment show that the sigmoid function can eliminate the chattering phenomenon, and the accuracy of the estimated position is guaranteed.

2 Sliding Mode Observer Model of IPMSM Based on Sigmoid Function

Considering the salient effect, the relationship of PMSM is shown below in the coordinate system \(A - B - C\),\(\alpha - \beta\),\(d - q\).

The voltage equation in the coordinate system \(d - q\) is:

$$\left[ {\begin{array}{*{20}c} {u_{d} } \\ {u_{q} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {R + pL_{d} } & { - \omega L_{q} } \\ {\omega L_{d} } & {R + pL_{q} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{d} } \\ {i_{q} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} 0 \\ {\omega \psi_{f} } \\ \end{array} } \right]$$
(1)

Because the first matrix of the right part of the Eq. (1) is asymmetric, this matrix can be transformed to be of odd symmetry.

$$\begin{aligned} \left[ {\begin{array}{*{20}c} {u_{d} } \\ {u_{q} } \\ \end{array} } \right] = & \left[ {\begin{array}{*{20}c} {R + pL_{d} } & { - \omega L_{q} } \\ {\omega L_{q} } & {R + pL_{d} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{d} } \\ {i_{q} } \\ \end{array} } \right] \\ + \left[ {\begin{array}{*{20}c} 0 & 0 \\ {\omega \left( {L_{d} - L_{q} } \right)} & { - pL_{d} - L_{q} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{d} } \\ {i_{q} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} 0 \\ {\omega \psi_{f} } \\ \end{array} } \right] \\ \end{aligned}$$
(2)

According to the coordinate transformation, Eq. (2) is transformed under the coordinate \(\alpha - \beta\) system.

$$\begin{aligned} \left[ {\begin{array}{*{20}c} {u_{\alpha } } \\ {u_{\beta } } \\ \end{array} } \right]& = \left[ {\begin{array}{*{20}c} {R + pL_{d} } & { - \omega \left( {L_{d} - L_{q} } \right)} \\ {\omega \left( {L_{d} - L_{q} } \right)} & {R + pL_{d} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{\alpha } } \\ {i_{q} } \\ \end{array} } \right] \\ &\quad+ \left\{ {\left( {L_{d} - L_{q} } \right)\left( {\omega i_{d} - \mathop i\limits^{ \cdot }_{q} } \right) + \omega \psi_{f} } \right\}\left[ {\begin{array}{*{20}c} { - \sin \theta } \\ {\cos \theta } \\ \end{array} } \right] \\ \end{aligned}$$
(3)

The second term of (3) is the extension EMF (EEMF).

$$\left\{ {\begin{array}{*{20}c} {ee_{\alpha } = - \sin \theta \left( {\left( {L_{d} - L_{q} } \right)\left( {\omega i_{d} - \mathop i\limits^{ \cdot }_{q} } \right) + \omega \psi_{f} } \right)} \\ {ee_{\beta } = \cos \theta \left( {\left( {L_{d} - L_{q} } \right)\left( {\omega i_{d} - \mathop i\limits^{ \cdot }_{q} } \right) + \omega \psi_{f} } \right)} \\ \end{array} } \right.$$
(4)

So, the position of rotor is

$$\theta = \tan^{ - 1} \left( { - \frac{{ee_{\alpha } }}{{ee_{\beta } }}} \right)$$
(5)

Equation (3) can be written in the form of state equation.

$$\begin{aligned} \left[ {\begin{array}{*{20}c} {\mathop i\limits_{\alpha } } \\ {\mathop i\limits_{\beta } } \\ \end{array} } \right] = & \left[ {\begin{array}{*{20}c} { - \frac{R}{{L_{d} }}} & { - \omega \frac{{L_{d} - L_{q} }}{{L_{d} }}} \\ {\omega \frac{{L_{d} - L_{q} }}{{L_{d} }}} & { - \frac{R}{{L_{d} }}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{\alpha } } \\ {i_{\beta } } \\ \end{array} } \right] \\ - \frac{1}{{L_{d} }}\left[ {\begin{array}{*{20}c} {ee_{\alpha } } \\ {ee_{\beta } } \\ \end{array} } \right] + \frac{1}{{L_{d} }}\left[ {\begin{array}{*{20}c} {u_{\alpha } } \\ {u_{\beta } } \\ \end{array} } \right] \\ \end{aligned}$$
(6)

From the equation, we can observe that the EEMF includes significant information. The position of the rotor can be obtained through the estimated EEMF.

When resistance deviation is considered, based on the method of state observer and Eq. (6), SMO model of EEMF is

$$\left[ {\begin{array}{*{20}c} {\mathop {\widehat{i}}\limits^{ \cdot }_{\alpha } } \\ {\mathop {\widehat{i}}\limits^{ \cdot }_{\beta } } \\ \end{array} } \right] = A\left[ {\begin{array}{*{20}c} {\widehat{i}_{\alpha } } \\ {\widehat{i}_{\beta } } \\ \end{array} } \right] + B\left( {\left[ {\begin{array}{*{20}c} {\widehat{u}_{\alpha } } \\ {\widehat{u}_{\beta } } \\ \end{array} } \right] - k\left[ {\begin{array}{*{20}c} {H(\overline{i}_{\alpha } )} \\ {H(\overline{i}_{\beta } )} \\ \end{array} } \right]} \right)$$
(7)

\(A = \left[ {\begin{array}{*{20}c} { - \frac{R}{{L_{d} }}} & { - \omega \frac{{L_{d} - L_{q} }}{{L_{d} }}} \\ {\omega \frac{{L_{d} - L_{q} }}{{L_{d} }}} & { - \frac{R}{{L_{d} }}} \\ \end{array} } \right],B = \left[ {\begin{array}{*{20}c} {\frac{1}{{L_{d} }}} & 0 \\ 0 & {\frac{1}{{L_{d} }}} \\ \end{array} } \right]\),

\(\overline{i}_{\alpha } = \widehat{i}_{\alpha } - i_{\alpha }\), \(\overline{i}_{\beta } = \widehat{i}_{\beta } - i_{\beta }\)

\(\widehat{i}_{\alpha } ,\,\;\widehat{i}_{\beta }\)—the estimated current.

\(\overline{i}_{\alpha } ,\;\overline{i}_{\beta }\)—the error of the estimated current.

Equation (7) is the sliding mode state observer. When the error of the estimated current is processed with sign function in the traditional SMO, the estimated EMF is a modulation waveform, and the cutoff frequency of the low pass filter is designed to be very low. This causes the estimated position lag, while the estimated position has jitter problems. The performance of the whole system comes down or does not function properly (Fig. 1). Therefore, the sigmoid function is applied to the SMO in this study.

The expression of the sigmoid function is

$$\left[ {\begin{array}{*{20}c} {H(\overline{i}_{\alpha } )} \\ {H(\overline{i}_{\beta } )} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\left( {\frac{2}{{1 + \exp ( - a \cdot \overline{i}_{\alpha } )}}} \right) - 1} \\ {\left( {\frac{2}{{1 + \exp ( - a \cdot \overline{i}_{\beta } )}}} \right) - 1} \\ \end{array} } \right]$$
(8)

In Eq. (8), \(a\) is a constant used for adjusting the slope of the sigmoid function, and when \(a\) is close to infinity, the sigmoid function is transformed into a sign function.

According to (6) and (7), the estimated EEMF is

$$\left\{ {\begin{array}{*{20}c} {\widehat{ee}_{\alpha } \approx k \cdot H(\overline{i}_{\alpha } )} \\ {\widehat{ee}_{\beta } \approx k \cdot H(\overline{i}_{\beta } )} \\ \end{array} } \right.$$
(9)

The diagram of the estimated position can be obtained from the analysis above, as shown in Fig. 2.

Fig. 1
figure 1

Relationship among three references

Fig. 2
figure 2

SMO based on sigmoid function

The diagram of SMO based on the sigmoid function for sensorless PMSM control is shown in Fig. 3. Phase voltage is calculated based on the voltage of the DC bus and SVPWM switching state. The measured phase currents are transformed into \(i_{\alpha } ,i_{\beta }\), then \(i_{\alpha } ,i_{\beta }\) are placed into the SMO model with phase voltage, and the position is obtained according to (5) and (9).

Fig. 3
figure 3

Diagram of PMSM sensorless control with SMO based on sigmoid function

3 The stability Analysis of the System

The key of SMO for PMSM is to ensure that the estimated values can converge to the sliding surface. When the current error is negative, its differential value is positive; when the current error is positive, its differential value is negative. This law is presented by the non-negative Lyapunov function in Eq. (10).

$$V = \frac{1}{2}s^{T} s$$
(10)

\(s = [\begin{array}{*{20}c} {\overline{i}_{\alpha } } & {\overline{i}_{\beta } } \\ \end{array} ]^{T}\) is estimated current error.

According to the Lyapunov stability theory, the derivative of V must be less than zero to ensure that the stable point has asymptotic stability. The derivative of the Eq. (11) is

$$\mathop V\limits^{ \cdot } = \overline{i}_{\alpha } \, \cdot \mathop {\overline{\,i} }\limits^{ \cdot }_{\alpha } + \overline{i}_{\beta } \, \cdot \mathop {\overline{\,i} }\limits^{ \cdot }_{\beta } < 0$$
(11)

Substituting (6) and (7) into (11), Eq. (12) is obtained.

$$\begin{gathered} \mathop V\limits = - \frac{R}{{L_{d} }}\left( {\overline{i}_{\alpha }^{2} + \overline{i}_{\beta }^{2} } \right) \hfill \\ \quad + \frac{1}{{L_{d} }}\left[ {\overline{i}_{\alpha } \left( {ee_{\alpha } - kH(\overline{i}_{\alpha } )} \right) + \overline{i}_{\beta } \left( {ee_{\alpha } - kH(\overline{i}_{\beta } )} \right)} \right] \hfill \\ \end{gathered}$$
(12)

According to (8), \(H(\overline{i}_{\alpha } )\) and \(H(\overline{i}_{\beta } )\) are increasing functions, which pass through the origin and are restricted within \(\pm 1\). Therefore, a sufficient condition to Eq. (12) is (13).

$$k \ge \max \left( {\left| {ee_{\alpha } } \right|,\left| {ee_{\beta } } \right|} \right)$$
(13)

Equation (13) determines the feedback coefficient of SMO to guarantee that SMO based on the sigmoid function will converge to the sliding surface. At the same time, k determines the speed of convergence. At the switching point of sliding mode, the change of the current error will lead to the change of the sigmoid function; motor voltage equation is equivalent to a first-order incentive system, and the main reason of the jitter is the response of the stimulus in SMO. The higher the number of k, the greater the response value. Therefore, the jitter and stability must reach an equilibrium point with the selection of k. Furthermore, a must also be selected appropriately; if a is too small, it will affect the stability of the system or the speed of convergence; if a is too large, the jitter problem will appear. Under the condition of proper a and k, the sigmoid function, instead of sign function, has a significant advantage in the jitter problem.

4 The Simulation and Experimental Results

The parameters of the motor are shown in Table 1. The motor was connected to the DC generator with a belt as the load. Selecting the photoelectric encoder of Autonics, the position can be used as the actual position. \(a = 1\) in the sigmoid function, the gain of current error is K = 250.

Table 1 The parameters of PMSM

In this study, the current waveforms are obtained by the current sensor. The actual position \(\theta\), estimate position \(\widehat{\theta }\), and estimation error \(\theta - \widehat{\theta }\) are obtained by the TLC7528 after processed by a DSP. There are only two DA channels in TLC7528, so the three waveforms about the position cannot appear in the oscilloscope at the same time. The experiments were run under the conditions of sensorless PMSM control (Fig. 4).

Fig. 4
figure 4

The experimental platform

The calculated electromotive force is shown in Fig. 5a. The upper part in the figure is the waveform before the low-pass filter, and the lower part is the waveform after the low pass filter. There is no high-frequency component, and there is little delay in the lower part of Fig. 5a. The spectrum analysis of the waveform before the low-pass filter is shown in Fig. 5b. The frequency of harmonics is \(250*n\) times of the fundamental. The fundamental component is the electrical frequency of the machine, which is far lower than the frequency of harmonics. Therefore, jitter and delay are produced substantially.

Fig. 5
figure 5

Estimated EEMF and its frequency

While there is no load at 2 Hz, the current of phase A, actual position, and estimated position are shown in Fig. 6a. The A-phase current, actual position, and estimated error are shown in Fig. 6b. The actual position coincides with the estimated position, and the estimated error is significantly small. This algorithm is well verified in low-speed operating conditions.

Fig. 6
figure 6

Position estimating at 2 Hz and no load

While there is no load at 20 Hz, the position and current are shown in Fig. 7. Compared with 2 Hz, there are higher estimation accuracy and better matching degree.

Fig. 7
figure 7

Position estimating at 20 Hz and no load

The position estimation at 20 Hz and sudden load are shown in Fig. 8. When loading suddenly, the estimated error increases from 0º to 5º.

Fig. 8
figure 8

Position estimating at 20 Hz and sudden load

The figure of stable operation is shown in Fig. 9 at 20 Hz and loading; when loaded stable operation, the position error is stable ahead of the actual position about 5º. The error can be compensated for according to the load and is easy to implement; a similar phenomenon also appears in [18]. The stable estimated error in the figure shows that there is no chattering phenomenon.

Fig. 9
figure 9

Position estimating at 20 Hz and full load

5 Conclusion

The SMO of the sigmoid function is based on BEMF of the IPMSM. The obtained findings of this study are:

  1. 1.

    Lyapunov stability analysis was used to obtain the sliding mode gain range

  2. 2.

    2. The sigmoid function to eliminate the chattering phenomenon of SMO is analyzed.

  3. 3.

    3. The experimental results show that this method can suppress and eliminate the buffeting phenomenon and proved that the SMO of the sigmoid function has much higher accuracy.

  4. 4.

    4. The estimated position which is ahead of the actual position on load needs further analysis to reduce or eliminate.