1 Introduction

During recent years, the permanent magnet synchronous machines (PMSMs), especially, the surface-mounted PMSMs (SPMSMs) have attracted considerable attentions and gained extensive applications in a variety of industrial fields of manufacturing and industrial servo control ranging from elevators, electric vehicles and robotics to biotechnology [1]. The PMSMs feature excellent dynamic characteristics including high power density, good controllability, high efficiency, high reliability, and low maintenance cost [2]. In order to achieve high-performance sensor-less control of PMSMs, high-accuracy initial rotor position should be identified at standstill. Without information of the initial rotor position, the start of the PMSMs will fail and the data about the current position of the drive operation will also be lost. Therefore, the exact detection of the initial rotor position is essential to ensure high-efficiency operations of the PMSMs.

Generally, encoders are used to detect the position of PMSM rotor poles. The absolute encoders or incremental encoders with UVW can also be used to measure the rotor initial positions. However, the presence of these sensors highly increases the machine size and the total cost, and also degrades the system reliability and noise immunity. Also, the initial position detection accuracy of the magnetic pole in the incremental encoders with UVW is only around ± 30° electrical angle, which cannot meet the need of the high-performance control of PMSMs.

The common methods without using the encoders are basically the high-frequency (HF) pulsating signal injection and the HF sinusoidal rotating signal injection [3]. For the HF pulsating signal injection method, a HF pulsating current or voltage signal is injected into the stator windings to estimate the initial position of the motor rotor. In the HF sinusoidal rotating signal injection method, a balanced three phase HF current or voltage signal is injected into stationary reference frame to excite the position-dependent high-frequency (HF) current response. Then, the rotor position information can be obtained by using a synchronous reference frame filter from negative-sequence carrier current. Even though the HF pulsating signal injection method is relatively accurate and maybe less sensitive to power device dead-time effect [4], the problems of limited system stability and long convergence time maybe the disadvantages of the method. Although the HF sinusoidal signal injection method is relatively simple, the rotor magnetic polarity may not be well identified by using the method. Also, the method needs low-pass filters (LPFs) that may degrade the estimation performance. In [5], a method was proposed to detect the initial rotor position of a PMSM based on high-frequency voltage injection without filter. The method can be used to sample the α and β high-frequency response currents due to the high-frequency voltage at the π/2 phase without using a low-pass filter. However, the DC component corresponding to the average value of the AC/DC axis inductance needs to be subtracted, and the polarity discrimination needs to be performed by injecting forward and reverse voltage vectors. The high-frequency peak current sampling is affected by current noises, and if the current sampling frequency is not high enough, it will lead to phase deviations and cause amplitude sampling errors.

There also exist some methods in the literatures for detecting the initial rotor position. In [6], the initial rotor position was estimated by using a comb filter. In [7], the current peak was used to detect the initial rotor position. In [8], the Kalman filter was used for the initial rotor position estimation. The work in [9] has used the torque ripples to estimate the initial rotor position. The work in [10] has used the finite element analysis and the nonlinear machine model. However, the method has the disadvantage of large computational complexity. In [11], a combined sinusoidal current and square-wave voltage injection method was used for initial rotor position estimation of low-speed free-running PMSM. The effectiveness of the method was verified on a 1.5 kW interior PMSM test platform. In [12], an initial rotor position estimation method based on square-wave signal injection was presented to resolve the starting problem of surface-mounted PMSM. The method was verified via a 1.5 kW PMSM motor drive platform. In [13], the concept of reference frame was used for initial pole position detection method for a surface mounted PMSM. The method generates better results as compared with the other method. In [14], the pseudorandom HF square-wave voltage injection method was presented for the initial position detection. The method was experimentally verified by using a 2.2-kW interior PMSM drive platform. Han et al. [15] proposed an initial position detecting strategy of sensor-less control for the surface-mounted PMSM which combines the virtual high frequency (HF) voltage pulsating injection with the carrier frequency component method. Wang et al. [16] proposed an impulse injection method by generating a series of phase-axial injections to calculate the probable rotor position, then injecting two reciprocal voltage pulses to obtain the rotor polarity, and finally injecting iterative voltage vectors to obtain the real position rapidly. In [5], the arctangent function was used to eliminate the filtering process and reduce the influence of the parameter deviation of the motor system on the detection accuracy of the initial position. Liu et al. [17] proposed a low-speed sensor-less control method of SPMSM for oil pump based on improved pulsating high-frequency voltage injection. Zhang et al. [18] proposed a method in which a high-frequency pulsed voltage signal is injected into the d axis of the synchronous rotating frame of a SPMSM with insignificant salient pole effects. In [19], a signal demodulation method was proposed, which can directly obtain the amplitude of high-frequency current, thus eliminating the use of filters, improving system stability and dynamic performance and saving the work of adjusting filter parameters. Wang et al. [20] proposed a position estimation method that combines derivative calculations of current and zero-voltage-vector (ZVV) injection, which is especially effective for zero-speed and low-speed operation of sensor-less PMSM drives. In [21], a hybrid optimization method was proposed to find the optimal set of design parameters of a permanent magnet brushless motor to yield the high efficiency. In [22], a single-input dual-output converter was proposed for permanent magnet brushless motor usage in electric vehicle applications. In [23], a 3-phase balanced voltage of higher frequency (150 Hz) was applied to the motor terminals for a short period of time (for 300 ms) and the corresponding phase currents were indirectly used to determine the rotor position. In [24], the rotor position was calculated by relationship between the vibration signals and the rotating virtual d-axis position. In [25], a method for estimating the initial rotor position and d-q axis inductances of a PMSM was proposed. In [26], a series of positive and negative voltage pulses method was proposed to detect the initial rotor position of SPMSM, and the detection resolution is only 60°. In [27], an improved pulse-voltage injection-based initial rotor position estimation method was proposed. In [28], sequence voltage vectors were injected to achieve reasonable accuracy for measuring inductance and rotor position. In [15], an initial position detecting strategy of sensor-less control for the PMSM motor was proposed by combining the virtual high frequency (HF) voltage pulsating injection method with the carrier frequency component method. In [29], a multilevel inverter topology using less number of switches and gate drivers with a hybrid control method was introduced. In [30], a nonlinear controller was designed for the stabilization of the DC/DC full-bridge converter feeding constant power loads.

The existing three-phase PMSM rotor initial position detection method uses six basic voltage vectors to determine the maximum response current amplitude, whose theoretical estimation accuracy is ± 30° electrical angle. To further improve the initial position detection accuracy, it is necessary to further inject other SVPWM (space vector pulse width modulation) voltage vectors synthesized on the basis of six basic voltage vectors. To prevent rotor displacement caused by sequence voltage vectors injection in initial position detection, negative space voltage vector needs to be added after every space vector injection, which leads to increase of the detection time.

Initial position detection of rotor pole position of three-phase PMSM can also be achieved by high-frequency voltage injection. However, high-frequency voltage signals need to be injected and signal processing needs to be performed. Then, error signals should be extracted through bandpass and low-pass filters, and adjusted to convergence by controllers to obtain the initial position without polarity signals. At the same time, either low-pass filtering is required to extract polarity error signals, or inject positive and negative voltage vector pulses are injected for polarity detection by comparison of the response current amplitude. The algorithm implementation is complex and time-consuming. The high-frequency injection method without low-pass filtering is also affected by current noise and voltage sampling phase error, so the high-frequency injection method cannot meet the requirements of both detection accuracy and fast detection speed.

Although the research progress for the initial rotor position detection of surface-mounted PMSMs has been reported in the literature. The currently available methods have some issues to be solved such as relatively long detection time, relatively complex implementation, relatively low accuracy for the initial rotor position detection. The use of LPFs may reduce or limit the system stability when the initial rotor position methods are used in the motor control system.

Therefore, this work investigates a novel rotor initial position detection scheme based on the principle that different initial rotor positions can cause the variations of stator winding inductances. A simple yet effective method to identify the rotor initial position based on space vector PWM (pulse width modulation) suitable for arbitrary initial rotor position at zero speed was proposed. The principle of the initial position detection is briefly discussed and implementation procedure of the proposed method has been presented.

The initial position detection method of the rotor pole position of the three-phase PMSM proposed in this method/algorithm has the novelty as follows:

(a) The algorithm is simple to implement, does not require a filter or polarity judgement, and detect the initial position by simple calculation with the three-phase current difference value associated with the saturation inductance.

(b) The algorithm does not contain a PI regulator, so there is no parameter need to be commissioning, and it has no convergence problem.

(c) Only six basic voltage vectors are required in combination with the PWM full-off state and without PWM dead-time, which can greatly improve the initial position detection accuracy and decrease the detection time.

(d) The proposed method is applicable in incremental encoder control or sensor-less control of SPMSM to prevent reverse of the rotor and ensure the maximum electromagnetic torque output during the startup process.

2 Methodology

The proposed method/algorithm can be described with several steps, first determining the inductance of the three-phase windings, then conducting current sampling and phase current difference construction, and finally, the initial position solution can be obtained. The following subsections will describe the steps sequentially.

2.1 Inductance of the three-phase windings

Considering the three phase windings A, B and C, at standstill, when all three-phase windings are energized as one of the six basic voltage vectors + A–B–C, –A + B + C, –A + B–C, + A–B–C, –A–B + C, + A + B–C. Where + A–B–C means phase winding A is connected to DC bus positive pole, and phase B and phase C are both connected to DC bus negative pole. Then the PMSM motor inductances can be described as the following.

$$\begin{gathered} L^{\prime}_{A} = L_{0} + L_{2} \cos \left( {2\theta } \right){ + }L_{3} \cos \left( \theta \right) \hfill \\ L^{\prime}_{B} = L_{0} + L_{2} \cos \left( {2\theta + \frac{2\pi }{3}} \right){ + }L_{3} \cos \left( {\theta - \frac{2\pi }{3}} \right) \hfill \\ L^{\prime}_{C} = L_{0} + L_{2} \cos \left( {2\theta - \frac{2\pi }{3}} \right){ + }L_{3} \cos \left( {\theta + \frac{2\pi }{3}} \right) \hfill \\ \end{gathered}$$
(1)

where \(L_{d}\) is the d-axis inductance, \(L_{q}\) is the q-axis inductance, \(\theta\) is the initial rotor position in electrical degree. \(L_{0} = L_{d} + L_{q}\),\(L_{2} = L_{d} - L_{q}\),\(L_{3}\) is the amplitude of the saturation inductance component. For the SPMSM, \(L_{3} < 0\), and the inductance was saturated. \(L_{A}{\prime}\) is the inductance when + A–B–C or –A + B + C. \(L_{B}{\prime}\) is the inductance when –A + B–C, + A–B–C. \(L_{C}{\prime}\) is the inductance when –A–B + C, + A + B–C.

Then, at standstill, the inductance of the SPMSM can be simplified as the following

$$\begin{gathered} L^{\prime}_{A} = L_{0} + L_{3} \cos \left( \theta \right) \hfill \\ L^{\prime}_{B} = L_{0} + L_{3} \cos \left( {\theta - \frac{2\pi }{3}} \right) \hfill \\ L^{\prime}_{C} = L_{0} + L_{3} \cos \left( {\theta + \frac{2\pi }{3}} \right) \hfill \\ \end{gathered}$$
(2)

2.2 Current sampling and phase current difference construction

The proposed algorithm collects phase currents, such as the A-phase current when only + A–B–C is energized (0 degrees) or –A + B + C (180 degrees), therefore ia and ib + ic are equal in magnitude and opposite in direction at that time, with ib = ic = – ia/2 (satisfied only when the rotor poles are at 0° or 180°).

The B-phase current will be collected when –A + B–C (120 degrees) or + A–B + C (300 degrees) is energized; and the C-phase current is collected when –A–B + C (240 degrees) or + A + B–C (60 degrees) is energized.

As shown in Fig. 1, the A-phase current acquisition is illustrated as an example, and the acquisition process is as the following procedures (a) ~ (e).

Fig. 1
figure 1

Diagram of A-phase current sampling process

(a) t0+、t1+、t2+ are respectively the starting point of the current response curve i0+ (start to inject voltage), the 1st sampling point i1+, and the 2nd sampling point i2+ of the current response curve when + A–B–C is energized, then \(\Delta i_{ + }\) = i2+ – i1+  > 0.

(b) t0-、t1-、t2- are respectively the starting point of the current response curve i0- (start to inject voltage), the 1st sampling point i1-, and the 2nd sampling point i2- of the current response curve when –A + B + C is energized, then \(\Delta i_{ - }\) = i2- – i1- < 0.

(c) The three-phase power electronics are switched off during t2+ and t0-, but the but the winding current through the A-phase lower bridge arm and the B-phase upper bridge arm and the C-phase upper bridge arm of the continuity diode in series with -Vdc, and its fall law is the same as t0- → t1- → t2-.

(d) when the positive voltages are injected, then

$$\left\{ \begin{gathered} i_{0 + } = 0\;,\;i_{m} = V_{dc} /R \hfill \\ i_{1 + } = i_{m} + (i_{0 + } - i_{m} )e^{ - RT/L} = i_{m} \left( {1 - e^{ - RT/L} } \right) \hfill \\ i_{2 + } = i_{m} + (i_{0 + } - i_{m} )e^{ - 2RT/L} = i_{m} \left[ {1 - e^{ - 2RT/L} } \right] \hfill \\ \Delta i_{ + } = i_{2 + } - i_{1 + } = i_{m} e^{ - RT/L} \left( {1 - e^{ - RT/L} } \right) \hfill \\ \end{gathered} \right.$$
(3)

where R = 1.5Rs; Rs is the phase winding resistance, L is the phase winding inductance.

(e) when the negative voltages are injected, then

$$\left\{ \begin{gathered} i_{m} = V_{dc} /R \hfill \\ i_{0 - } = \left( { - i_{m} } \right) + \left[ {i_{2 + } - \left( { - i_{m} } \right)} \right]e^{ - RT/L} = - i_{m} + \left( {i_{2 + } + i_{m} } \right)e^{ - RT/L} \hfill \\ i_{1 - } = - i_{m} + \left( {i_{2 + } + i_{m} } \right)e^{ - 2RT/L} \hfill \\ i_{2 - } = - i_{m} + \left( {i_{2 + } + i_{m} } \right)e^{ - 3RT/L} \hfill \\ \Delta i_{ - } = i_{2 - } - i_{1 - } = - i_{m} \left[ {2 - e^{ - 2RT/L} } \right]e^{ - 2RT/L} \left( {1 - e^{ - RT/L} } \right) \hfill \\ \end{gathered} \right.$$
(4)

When the absolute value of the -2RT/L is very small, then \(e^{ - 2RT/L} = 1 - 2RT/L\), \(e^{ - RT/L} = 1 - RT/L\), and

$$\left\{ \begin{gathered} \left| {\Delta i_{ + } } \right| = i_{m} \left( \frac{RT}{L} \right)\left[ {1 - \left( \frac{RT}{L} \right)} \right] \hfill \\ \left| {\Delta i_{ - } } \right| = i_{m} \left( \frac{RT}{L} \right)\left[ {1 - \left( \frac{2RT}{L} \right)^{2} } \right] \hfill \\ \end{gathered} \right.$$
(5)

Therefore

$$\Delta i = \left| {\Delta i_{ - } } \right| - \left| {\Delta i_{ + } } \right| = i_{m} \left\{ {\frac{RT}{{L^{2} }} - \left( \frac{2RT}{L} \right)^{2} \frac{1}{L}} \right\}$$
(6)

Since the absolute value of 2RT/L is extremely small, (2RT/L)2 is extremely small, then the second term of the above Eq. (6) can be neglected, and the constructed current difference is inversely proportional to \(L^{2}\).

$$\Delta i = \left| {\Delta i_{ - } } \right| - \left| {\Delta i_{ + } } \right| = \frac{{RTi_{m} }}{{L^{2} }}$$
(7)

The phase current difference is constructed as follows for each of the three phases of ABC phase currents:

$$\begin{gathered} \Delta i_{A} = \frac{k}{{L_{A}^{\prime 2} }} \hfill \\ \Delta i_{B} = \frac{k}{{L_{B}^{\prime 2} }} \hfill \\ \Delta i_{C} = \frac{k}{{L_{C}^{\prime 2} }} \hfill \\ \end{gathered}$$
(8)

where \(k = RTi_{m}\).

2.3 Initial position calculation solution

Let

$$\left\{ \begin{gathered} \sin \_val = \Delta i_{A} - \frac{{\left( {\Delta i_{B} + \Delta i_{C} } \right)}}{2} \hfill \\ \cos \_val = \frac{\sqrt 3 }{2}\left( {\Delta i_{B} - \Delta i_{C} } \right) \hfill \\ \end{gathered} \right.$$
(9)

Then

$$\begin{gathered} \frac{\sin \_val}{{\cos \_val}} = \frac{{\Delta i_{A} - \frac{{\left( {\Delta i_{B} + \Delta i_{C} } \right)}}{2}}}{{\frac{\sqrt 3 }{2}\left( {\Delta i_{B} - \Delta i_{C} } \right)}} = \frac{{\frac{k}{{L_{A}^{\prime 2} }} - \frac{{\left( {\frac{k}{{L_{B}^{\prime 2} }} + \frac{k}{{L_{C}^{\prime 2} }}} \right)}}{2}}}{{\frac{\sqrt 3 }{2}\left( {\frac{k}{{L_{B}^{\prime 2} }} - \frac{k}{{L_{C}^{\prime 2} }}} \right)}} \hfill \\ \;\;\;\;\;\;\;\;\;\; \approx \frac{{kL_{0}^{3} L_{3} \cos \left( \theta \right)}}{{kL_{0}^{3} L_{3} \sin \left( \theta \right)}} \hfill \\ \end{gathered}$$
(10)

where \(k > 0\), \(L_{0}^{3} > 0\), \(L_{3}\) < 0, then

$$\left\{ \begin{gathered} \sin \_val \propto - \cos \left( \theta \right) = \sin \left( {\frac{3\pi }{2} - \theta } \right) \hfill \\ \cos \_val \propto - \sin \left( \theta \right) = \cos \left( {\frac{3\pi }{2} - \theta } \right) \hfill \\ \end{gathered} \right.$$
(11)

Therefore

$$\theta = \frac{3\pi }{2} - \tan^{ - 1} \frac{\sin \_val}{{\cos \_val}}$$
(12)

3 Implementation procedure

Implementation of the proposed method/algorithm includes the following steps:

Step 1: Determine the PWM period \(T_{{{\text{PWM}}}}\):

The PWM period is initialized as \(T_{{_{{{\text{PWM}}}} }}^{0}\), and the control time duration can be set as \(7T_{{_{{{\text{PWM}}}} }}^{0}\) PWM periods, of which, in the \(0 \sim 2T_{{_{{{\text{PWM}}}} }}^{0}\), voltage vector of 0° electrical angle will be set as the input, in the \(2T_{{_{{{\text{PWM}}}} }}^{0} \sim 3T_{{_{{{\text{PWM}}}} }}^{0}\), PWM will be switched off, in the \(3T_{{_{{{\text{PWM}}}} }}^{0} \sim 5T_{{_{{{\text{PWM}}}} }}^{0}\), voltage vector of 180° electrical angle will be set as the input, in the \(5T_{{_{{{\text{PWM}}}} }}^{0} \sim 7T_{{_{{{\text{PWM}}}} }}^{0}\), PWM will be all switched off. At the instant of the \(2T_{{_{{{\text{PWM}}}} }}^{0}\), the phase A current can be measured as \(i_{{_{A12 + } }}^{0}\). When the control process ends at the \(7T_{{_{{{\text{PWM}}}} }}^{0}\), the PWM period will be increased step by step if the measured \(i_{{_{A12 + } }}^{0}\) is lower than the rated peak current of the motor, that is, \(T_{{_{{{\text{PWM}}}} }}^{{\text{p}}} { = }T_{{_{{{\text{PWM}}}} }}^{{\text{p - 1}}} {\text{ + k}}\), P = 1,2, 3, …, , where k is the increment of the PWM period. Then, the PWM control with \(7T_{{_{{{\text{PWM}}}} }}^{{\text{p}}}\) duration will be conducted for the PMSM, and the measurement of the \(i_{{_{A12 + } }}^{{\text{p}}}\) will be obtained, which will be compared with the rated peak current of the motor until the \(i_{{_{A12 + } }}^{{\text{p}}}\) is equal or larger than 95% of the rated peak current of the motor. Then, the PWM period \(T_{{_{{{\text{PWM}}}} }}^{{\text{p}}}\) is set as \(T_{{{\text{PWM}}}}\).

Step 2: Collecting the phase currents and measure two rounds of the currents of the phase A, B and C.

In the first round of the phase A current measurement (Fig. 2), the PWM control with 7 \(T_{{{\text{PWM}}}}\) duration will be conducted. In the \(0 \sim 2T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 0° electrical angle will be set as the input, in the \(2T_{{_{{{\text{PWM}}}} }}^{{}} \sim 3T_{{_{{{\text{PWM}}}} }}^{{}}\), PWM will be switched off, in the \(3T_{{_{{{\text{PWM}}}} }}^{{}} \sim 5T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 180° electrical angle will be set as the input, in the \(5T_{{_{{{\text{PWM}}}} }}^{{}} \sim 7T_{{_{{{\text{PWM}}}} }}^{{}}\), PWM will be all switched off. At the instant of \(1T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{A11 + }\), at the instant of \(2T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{A12 + }\), at the instant of \(4T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{A11 - }\), at the instant of \(5T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{A12 - }\).

Fig. 2
figure 2

The schematic diagram of phase A current sampling points

In the first round of the phase B current measurement, the PWM control with 7 \(T_{{{\text{PWM}}}}\) duration will be conducted. In the \(0 \sim 2T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 120° electrical angle will be set as the input, in the \(2T_{{_{{{\text{PWM}}}} }}^{{}} \sim 3T_{{_{{{\text{PWM}}}} }}^{{}}\), PWM will be switched off, in the \(3T_{{_{{{\text{PWM}}}} }}^{{}} \sim 5T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 300° electrical angle will be set as the input, in the \(5T_{{_{{{\text{PWM}}}} }}^{{}} \sim 7T_{{_{{{\text{PWM}}}} }}^{{}}\), the PWM will be all switched off. At the instant of \(1T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{B11 + }\), at the instant of \(2T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{B12 + }\), at the instant of \(4T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{B11 - }\), at the instant of \(5T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{B12 - }\).

In the first round of the phase C current measurement, the PWM control with 7 \(T_{{{\text{PWM}}}}\) duration will be conducted. In the \(0 \sim 2T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 240° electrical angle will be set as the input, in the \(2T_{{_{{{\text{PWM}}}} }}^{{}} \sim 3T_{{_{{{\text{PWM}}}} }}^{{}}\), PWM will be switched off, in the \(3T_{{_{{{\text{PWM}}}} }}^{{}} \sim 5T_{{_{{{\text{PWM}}}} }}^{{}}\), voltage vector of 60° electrical angle will be set as the input, in the \(5T_{{_{{{\text{PWM}}}} }}^{{}} \sim 7T_{{_{{{\text{PWM}}}} }}^{{}}\), the PWM will be all switched off. At the instant of \(1T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{C11 + }\), at the instant of \(2T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{C12 + }\), at the instant of \(4T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{C11 - }\), at the instant of \(5T_{{{\text{PWM}}}}\), the phase current measurement will be \(i_{C12 - }\).

Collect the first round measurements and set them as \(i_{A11 + }\), \(i_{A12 + }\), \(i_{A11 - }\), \(i_{A12 - }\), \(i_{{{\text{B}}11{ + }}}\), \(i_{B12 + }\), \(i_{B11 - }\), \(i_{B12 - }\), \(i_{C11 + }\), \(i_{C12 + }\), \(i_{C11 - }\), \(i_{C12 - }\).

The second-round current measurement has the same procedure as the first round, and the second-round measurements can be set as \(i_{A21 + }\), \(i_{A22 + }\), \(i_{A21 - }\), \(i_{A22 - }\), \(i_{{{\text{B2}}1{ + }}}\), \(i_{B22 + }\), \(i_{B21 - }\), \(i_{B22 - }\), \(i_{C21 + }\), \(i_{C22 + }\), \(i_{C21 - }\), \(i_{C22 - }\).

Step 3: Processing the current measurements:

$$\frac{\sin \_val}{{\cos \_val}} = \frac{{\Delta i_{A} - \frac{{\left( {\Delta i_{B} + \Delta i_{{\text{C}}} } \right)}}{2}}}{{\frac{\sqrt 3 }{2}\left( {\Delta i_{B} - \Delta i_{C} } \right)}}$$
(13)

where

$$\left\{ \begin{gathered} \Delta i_{A} = \left| {i_{A12 - } - i_{A11 - } } \right| - \left| {i_{A12 + } - i_{A11 + } } \right| + \left| {i_{A22 - } - i_{A21 - } } \right| - \left| {i_{A22 + } - i_{A21 + } } \right| \hfill \\ \Delta i_{B} = \left| {i_{B12 - } - i_{B11 - } } \right| - \left| {i_{B12 + } - i_{B11 + } } \right| + \left| {i_{B22 - } - i_{B21 - } } \right| - \left| {i_{B22 + } - i_{B21 + } } \right| \hfill \\ \Delta i_{C} = \left| {i_{C12 - } - i_{C11 - } } \right| - \left| {i_{C12 + } - i_{C11 + } } \right| + \left| {i_{C22 - } - i_{C21 - } } \right| - \left| {i_{C22 + } - i_{C21 + } } \right| \hfill \\ \end{gathered} \right.$$
(14)

Step 4: Calculating the electric angle \(\theta_{0}\) at the initial position of the rotor pole

$$\theta_{0} = \frac{3\pi }{2} - \tan^{ - 1} \frac{\sin \_val}{{\cos \_val}}$$
(15)

Remark 1: In the step 1, the parameters \(T_{{_{{{\text{PWM}}}} }}^{0} { = }50\mu s\) and \({\text{k = 2}}\mu s\).

Remark 2: In the step 2 of the phase A, B and C current measurements, the last current measurement of each phase will be all set as all PWM switched-off states of two PWM periods in order to make sure that the current response of the negative voltage vector decreases to 0 to eliminate the influence on the next phase current acquisition after the current phase current acquisition is completed.

Remark 3: The states of the six switches connected with the A, B and C phase windings of the motor via the three-phase inverter circuit are denoted as SAH, SAL, SBH, SBL, SCH and SCL. For the voltage vector with an input electric angle of 0°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 100,101. For the voltage vector with an input electric angle of 180°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 011010. For the voltage vector with an input electric angle of 120°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 011001. For the voltage vector with an input electric angle of 300°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 100,110. For the voltage vector with an input electric angle of 240°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 010110. For the voltage vector with an input electric angle of 60°, the switching state combination is denoted as SAHSALSBHSBLSCHSCL = 101,001. For the full PWM off state, the combination of the switch states is denoted as SAHSALSBHSBLSCHSCL = 000000.

4 Results and discussions

4.1 Simulation of the proposed method

Considering a surface-mounted PMSM with 16 pairs of poles, the rated current is 23.7 A RMS (root mean square), the DC bus voltage Vdc of the three-phase inverter circuit is 540 V (VDCH = VDCL = 270 V), the phase resistance Rs is 0.7Ω, the d axis inductance Ld is equal to the q axis inductance Lq and is set as 10mH. The flux linkage of the permanent magnet \(\psi_{f}\) = 0.7701 Wb. The load torque \(T_{L}\) of the motor is zero. The initial position theta_deg of magnetic pole of motor rotor is 30° electric angle. The simulations of the PMSM and the proposed algorithm are designed as shown in Fig. 3. The PMSM block is the model of the SPMSM. Serial voltage sources of DCH block and DCL block compose the DC bus voltage. The constant block of theta_deg is the real rotor position. The PWM_set1 block is the rotor position detection block, where its output x was delayed by 1/z block and then goes into the input as × 0. Signal × 0 is the state vector, which is consist of estimated raw rotor position electrical angle signal theta_est and 12 current sampling values in one round of basic 6 voltage vectors inject phase. Signal theta_est is calculated to get the estimated rotor position electrical angle by the expression of 270 mius theta_est, and then was saved in variable “in”. The output signal “sector” of the PWM_set1 block denotes one of the six basic voltage vectors, which is input of the PWM_set block. The output of the PWM_set block denotes the three phase PWM drive signal vector consist of six bridges of the three-phase inverter block, which has no PWM deadtime. Output of the three-phase inverter block is the three phase PWM voltage applied to the three phase stator windings of the motor.

Fig. 3
figure 3

Simulation model of the proposed initial position estimation algorithm

The implementation of the proposed method can be described as follows:

Step 1: Initialize the \(T_{{{\text{PWM}}}}^{0} { = }\;50{\mu s}\), and \({\text{k = 2}}\mu s\), inject 0°and 180°basic voltage vector in every round of 7 PWM duration with \(T_{{{\text{PWM}}}}^{p} { = }\;T_{{{\text{PWM}}}}^{p - 1} + k\) based on the Step 1 of the above Sect. 3 to get the \(i_{{_{A12 + } }}^{{\text{p}}}\), which will be compared with the rated peak current of the motor until the \(i_{{_{A12 + } }}^{{\text{p}}}\) is equal or larger than 95% of the rated peak current of the motor. Then, the PWM period \(T_{{_{{{\text{PWM}}}} }}^{{\text{p}}}\) is set as \(T_{{{\text{PWM}}}}\). So \(T_{{{\text{PWM}}}} = 400\mu s\). This step is not needed in startup initial position detection every time except when in new PMSM is in a new PMSM initial position detection.

Step 2: Collect the currents of phase A, B and C in the two rounds.

When the initial position is 30°, the current waveform taken during the whole current sampling process is shown in Fig. 4, and the input parameters of the estimation algorithm are obtained through three sets of two rounds of rotational sampling of phase currents with T as the sampling period. As shown in Fig. 4, there are totally 6 segments and each segment lasts for 7 T. Within each segment, forward and reverse voltage vectors are employed for injection, and the current will decay faster by injecting reverse voltage vectors, ensuring that the current of each segment fully decays to 0 before 7 T.

Fig. 4
figure 4

Phase current response curve for the whole process of initial position estimation

The corresponding current value collected is shown in Table 1.

Table 1 The collected currents of phases A, B and C in the two rounds

Then, the incremental values of the phase A, B and C are calculated as

$$\left\{ \begin{gathered} \Delta i_{A} = \left| {i_{A12 - } - i_{A11 - } } \right| - \left| {i_{A12 + } - i_{A11 + } } \right| + \left| {i_{A22 - } - i_{A21 - } } \right| - \left| {i_{A22 + } - i_{A21 + } } \right|{ = } - {2}{\text{.3874}} \hfill \\ \Delta i_{B} = \left| {i_{B12 - } - i_{B11 - } } \right| - \left| {i_{B12 + } - i_{B11 + } } \right| + \left| {i_{B22 - } - i_{B21 - } } \right| - \left| {i_{B22 + } - i_{B21 + } } \right|{ = }0.4815 \hfill \\ \Delta i_{C} = \left| {i_{C12 - } - i_{C11 - } } \right| - \left| {i_{C12 + } - i_{C11 + } } \right| + \left| {i_{C22 - } - i_{C21 - } } \right| - \left| {i_{C22 + } - i_{C21 + } } \right|{ = }4.1521 \hfill \\ \end{gathered} \right.$$
(16)

Step 3: The current signal can be processed as

$$\frac{\sin \_val}{{\cos \_val}} = \frac{{\Delta i_{A} - \frac{{\left( {\Delta i_{B} + \Delta i_{{\text{C}}} } \right)}}{2}}}{{\frac{\sqrt 3 }{2}\left( {\Delta i_{B} - \Delta i_{C} } \right)}}{ = }\frac{{ - 2.3874 - \frac{0.4815 + 4.1521}{2}}}{{\frac{\sqrt 3 }{2}\left( {0.4815 - 4.1521} \right)}} = 1.4799$$
(17)

where sin_val and cos_val are both less than zero, then the corresponding arc tangent angle should be in the third quadrant. The “sin_val” and “cos_val” are used to represent the calculation results of Eq. (9), indicating that they are respectively related to the sine/cosine calculation results of a certain angle.

Step 4: Calculate the electric angle \(\theta_{0}\) at initial position of rotor pole as

$$\theta_{0} = \frac{3\pi }{2} - \tan^{ - 1} \frac{\sin \_val}{{\cos \_val}}{ = }\frac{3\pi }{2} - \left( {0.9765 + \pi } \right) = {34}{\text{.0507}}^{ \circ }$$
(18)

Therefore, the initial position estimation error is \({34}{\text{.0507}}^{ \circ } - 30^{ \circ } { = } - 4.0507^{ \circ }\).

The different initial positions at 1° intervals within 0~360° are recognized using the algorithm in this paper, the estimated angles are compared with the actual angles as shown in Fig. 5. As shown in Fig. 5, the angular error between the estimated initial position and the actual initial position is less than ±5° over the entire electrical angle range, the angle estimation error has three peaks and three valleys.

Fig. 5
figure 5

Estimation error at different initial positions

As shown in Fig. 4, to achieve an initial position detection error of less than ±5° throughout the initial position detection stage, 2 rounds of 6 groups of current samples are required, taking 7 T × 6 = 42 T = 42 × 0.0004 s = 16.8 ms, while using the traditional pulse sequence method requires at least 3 + 2 + 2 + 2 + 2 + 2 = 11 groups of voltage vectors to be injected in order to obtain the current response, and the subsequent voltage vector injections must wait until the current response of the previous group is 0, i.e., each group needs 7 T, hence the time required is 11*7 T=77 T=77×0.0004 s =30.8 ms. The algorithm proposed in this paper obtains the same ±5° initial position estimation error, and the time required is shortened by 50%.

4.2 Comparison with high frequency pulse voltage injection method

In order to further verify the effectiveness of the rotor initial position estimation algorithm based on the “high-frequency pulsating voltage plus forward and backward pulse voltage vector injection”, a Matlab/Simulink simulation model has been established. Figure 6 shows the simulation model of the initial position detection system based on high-frequency pulse voltage injection. Among them, the automatic selection switch in the bottom left corner is used to choose whether to use high-frequency injected PWM voltage pulses or PWM voltage pulses that determine polarity. The PWM voltage pulses determined by polarity are only used when the initial positioning is completed (InitPosRawFlag = 1) and the final initial positioning is not completed (InitPosDoneFlag = 0). Figure 7 shows the initial position detection model based on high-frequency pulse voltage injection while Fig. 8, 9 shows the angle and velocity calculation module (HFI calc) of the high-frequency pulse voltage injection method. Figure 10 shows the simulation model for the initial position convergence judgment. Through the convergence judgment, the initial position of the rotor is preliminarily determined, but there may be an estimation error of 180 degrees at this time. Further injection of the forward and reverse voltage pulse vectors determine the initial position of the rotor by judging its current response, and the final initial position is the initial position value plus the angle deviation value obtained by polarity judgment.

Fig. 6
figure 6

The simulation model of the high frequency injection method

Fig.7
figure 7

The HFI block diagram of initial position estimation by high frequency pulse voltage injection

Fig.8
figure 8

HFI calc block diagram

Fig.9
figure 9

The theta_e0 cvg detection block diagram

Fig.10
figure 10

The pole identification block diagram

The simulation motor parameters are the same as that in the Sect. 4.1. The PWM switching frequency is 10 kHz, the high-frequency injection voltage frequency is 750 Hz, the injection voltage amplitude is 150 V, the lower limit cut-off frequency of the BPF bandpass filter is 375 Hz, the upper limit cut-off frequency is 1125 Hz, the LPF cut-off frequency before the PI regulator is 75 Hz, and the LPF cut-off frequency after the PI regulator is 50 Hz.

Figures 11, 12, 13 and 14 show the initial position estimation angle estimation process and the d/q axis current waveform of the motor during the initial position detection process at 30° and 150°, respectively. It can be seen that when using the high-frequency injection algorithm to detect the initial position of the motor rotor, the motor rotor does not move. The detection process is divided into four stages: high-frequency injection stage, high-frequency injection shutdown stage (waiting for the current response to decay to 0), forward voltage vector injection stage (including injection, shutdown, and waiting for the current response to decay to 0), and reverse voltage vector injection stage (including injection, shutdown, and waiting for the current response to decay to 0). These four stages are indispensable, The latter two stages are used for polarity discrimination. During the high-frequency pulse voltage injection stage, there may be an error of about 180° in the estimation of rotor position. As shown in Fig. 14, when the initial position is 150°, the estimated position converges to the opposite polarity. After polarity discrimination and calibration by the forward and reverse voltage pulse vectors, the initial position estimation error is within a small range.

Fig.11
figure 11

The d-axis current id and q-axis current iq waveform in initial position detection with HFI method at initial position of 30 electrical degree

Fig.12
figure 12

initial position estimation process with HFI method at initial position of 30 electrical degree

Fig.13
figure 13

d-axis current id and q-axis current iq waveform in initial position detection with HFI method at initial position of 150 electrical degree

Fig.14
figure 14

initial position estimation process with HFI method at initial position of 150 electrical degree

The different initial positions at 1° intervals within 0~360° are recognized using the HFI, the estimated angles are compared with the actual angles as shown in Fig. 15, and the estimation time at different initial positions. As shown in Fig. 15, the angular error between the estimated initial position and the actual initial position is less than ±6.2° over the entire electrical angle range, and the estimation time is between 227.4 ms~365.1 ms.

Fig. 15
figure 15

Estimation error at different initial positions with HFI method

The different initial positions at 1° intervals within 0~360° are recognized using the HFI, the estimated angles are compared with the actual angles as shown in Fig. 15, and the estimation time at different initial positions. As shown in Fig. 16, the angular error between the estimated initial position and the actual initial position is less than ±6.2° over the entire electrical angle range, and the estimation time is between 227.4 ms~365.1 ms.

Fig. 16
figure 16

Estimation time at different initialss positions with HFI method

Compared with the results of the high-frequency injection method, the proposed method achieves the same initial position estimation error of ± 5°. The estimation time of the high-frequency injection method is 227.ms ~ 365.1 ms. According to the analysis in Sect. 4.1, the proposed method only requires 16.8 ms and the detection time required for any initial position remains unchanged. Therefore, compared to high-frequency injection, the detection time of our method is reduced by at least 210.6 ms (92.6%).

Thanks to the six basic voltage vectors with a 100% duty cycle, the current response time of the proposed method is shorter. By reversing the voltage vector, not only negative phase current error signals are obtained, but also the attenuation of phase current is accelerated, further shortening the initial position detection time. By adding a round of 6 basic voltage vector injections and averaging, the error caused by signal sampling is further reduced, ensuring that the method has high accuracy. Due to the fact that the proposed method directly calculates the initial rotor position instantly after all current samples are collected, without the PI regulator and polarity discrimination of high-frequency injection method, and without the need for multiple rounds of voltage vector injection to improve accuracy of traditional pulse sequence method, the method proposed in this article greatly reduces the time of initial position detection while ensuring the accuracy of initial position detection, achieving ultra-fast initial position detection.

5 Conclusion

High-frequency injection method for the initial position detection requires band-pass filtering, low-pass filtering and polarity detection, and at the same time requires the PI controller to adjust the estimation angle to make the estimation angle converge. Although the accuracy of this method is high, it is time-consuming. The traditional voltage vector pulse sequence method has a fast speed but low accuracy. To further improve the estimation accuracy, further injection of voltage vector pulses is required. By comparing their current response, the initial position estimation accuracy can be improved, which leads to increased time consumption.

Therefore, a fast-initial position detection method for SPMSM is proposed, which does not require a filter, and only needs injection by using 6 basic voltage vectors without setting the PWM dead-time. Then, the angle is obtained by constructing the phase current difference signal associated with the saturation inductance, and the trigonometric function value of the angle is obtained by constructing the equation such that the angle can be obtained. The proposed method completes the initial position detection in only 42 PWM cycles through 2 rounds of 6 basic voltage vector injections, and can achieve the initial position estimation error within ± 5° electrical angle.

The simulation results have proven that the proposed method works very well and the proposed method obtains the same ± 5° initial position estimation error, and the time required is shortened by 50% when compared with traditional pulse sequence method, and shortened by no less than 92.6% when compared with high frequency voltage injection method. Therefore, this method can be used for incremental encoder control or sensor-less control of permanent magnet synchronous motors with high requirements for initial position detection speed and accuracy.

The initial position estimation error of different PMSMs may vary due to different designs and different saturation degrees of the phase inductance. In such cases, the error model of the proposed method is an area for further investigation to further reduce the estimation error. Also, the effect of the proposed method in more comprehensive scenarios and the results will be evaluated and verified by experiments in the future.