Rotor Position Estimation for Permanent Magnet Synchronous Machines using Electromotive Force and Anisotropy Using Extended-Kalman-Filter

In this paper a new rotor position observer for permanent magnet synchronous machines (PMSM) based on an Extended-Kalman-Filter (EKF) is presented. With this method, just one single EKF is sufficent to evaluate the position information from electromotive force (EMF) and anisotropy. Thus, the PMSM can be controlled for the entire speed range without a position sensor and without the need to switch or synchronize between different observers. The approach covers online estimation of permanent magnetic field and mechanical load. The resulting EKF-based rotor position estimator is embedded in the existing cascaded control concept of the PMSM without need of additional angle trackers or signal filters. The experimental validation for the position sensorless control shows optimized dynamic behaviour.


Introduction
The use of highly efficient field-oriented controlled permanent magnet synchronous machines (PMSM) usually requires a position sensor in addition to the necessary power electronics. This position sensor and necessary signal cables increase the total drive system costs. Furthermore, most position sensors are susceptible to mechanical impacts and can therefore quickly wear out. To reduce the costs and increase the robustness of field-oriented controlled PMSM, the rotor position can be determined from the electrical characteristics of the machine. Known methods for position sensorless control of PMSM can be traced back to two rotor positiondependent machine effects.
First, the rotor position dependency on the electromotive force (EMF) is evaluated. The rotor flux caused by the permanent magnets on the rotor induce the EMF. Therefore the EMF is directly depending on the rotor position. However, the EMF is also linearly dependent on the rotor speed. Nils Wilcken nils.wilcken@gmx.de 1 Institute of Engineering Design, Mechatronics and Electromobility (IKME), Hannover University of Applied Sciences and Arts, Hannover, Germany Therefore there is no EMF voltage when the machine is at standstill. In practice, it has also been shown that at low speed the signal-to-noise-ratio (SNR) of the measured variables is too low for evaluation. Therefore, EMF-based rotor position estimation methods require a minimum speed [1]. Most EMF-based rotor position estimators consist of a linear EMF observer [2,3] and an angle-Tracker [4]. Such methods have a time-delaying transfer behaviour, which reduces the phase margin of closed control loops. Alternatively, the angle information from the EMF can be directly evaluated using the Extended-Kalman-Filter (EKF). In this case, no additional angle tracker is necessary [5,6]. An EKF also enables online disturbance and parameters estimation.
Due to the limited operating range of EMF-based rotor position estimation methods, anisotropy-based rotor position estimation methods are used alternatively or additionally. In the context of position sensorless control, the magnetic anisotropy of the machine means rotor positiondependent inductance. By injecting comparatively high-frequency carrier signals [7][8][9] the inductances can be identified online, also at standstill. However, these carrier signals reduce the voltage bandwidth at high speed. The rotor angle can be estimated by evaluating the anisotropic current sequence, caused by the carrier signals, using adapted angle trackers [10]. Therefore, more or less complex signal filters with a fixed cut-off frequency, e.g. Bandpass or bandstop filter, are required to separate this anisotropic current sequence [11,12]. The necessary signal filters also reduces the phase margin of closed control loops. Alternatively EKF can be used to separate fundamental wave and carrier signals [13]. There are many different variations of anisotropybased estimation methods, but the main disadvantages are basically the same. The estimation accuracy and robustness of anisotropy-based methods are strongly dependent on the PMSM design and decrease with increasing PMSM speed.
It has been shown that anisotropy-based estimation methods at standstill or very low speed and EMF-based methods at medium and high speed have the optimal operating range. Therefore, a common approach for position sensorless control of PMSM in the entire speed range is to combine an EMF and an anisotropy-based estimator [14,15]. In these methods the estimators are switched based on the speed of the PMSM. The different estimators must be synchronized when switched. Otherwise the estimated values may strongly oscillate. To not excite these oscillation, the switch-over range can be passed through at a limited speed dynamic.
It can be said that with conventional methods for a position sensorless control of a PMSM in the entire speed range, compromises must be made between a robust estimation and an optimized control behaviour. For an optimized operation of PMSM without position sensors, an EKF-based rotor position observer which evaluates EMF and anisotropybased angle information is presented in this paper. For this purpose, the EKF uses a fundamental wave-and a HF-state space model. The main difference to conventional methods and the greatest advantage of this method is, that the angular speed and rotor position can be directly estimated at the same time by one estimator. Therefore, there is no need for additional angle trackers to evaluate the anisotropy based angle information or methods to switch or synchronize between different estimators. This reduces the number of additional transfer behaviors in the closed control circuit of the sensorless controlled PMSM. In addition, the EKF is able to separate the fundamental wave and the higher frequency component. Therefore, no further signal filters are necessary and the phase delay of the rotor position observer presented here is comparatively low. In total, this leads to optimized control behavior.
To increases the robustness of the estimator against parameter changes, the amplitude of the permanent magnetic field is estimated online by the EKF. This means that temperature and saturation dependencies can be taken into account without an analytical description of these effects. In addition to the electrical machine behaviour, the state space model includes a mechanical model of the PMSM. By the online parameter estimation of a mechanical disturbance variable, load and dynamic torques of the coupled load application along with parameter inaccuracies can be taken into account. This stabilizes the rotor position estimation especially in case of dynamic load changes.
In [16], it was already shown that the presented EKF rotor angle estimator can pick up freewheeling PMSM and transfer them in a speed controlled state. In contrast to this publication, the general accuracy of the estimator and the control behaviour of the sensorless controlled PMSM are to be examined in this paper.
This paper is divided into the following sections: Section 2 describes the fundamental wave-, higher frequencyand mechanical-model of the PMSM as well as the resulting EKF. Section 3 describes how the rotor position observer is integrated into the cascade control of the PMSM. In Sect. 4, the resulting EKF-based observer is tried and tested on a test bench and evaluated using measurements. In the last Sect. 5 the results and possible subsequent work are discussed.

Model basis of the EKF rotor position estimator
In this Section, the fundamental wave model and the model for high frequency carrier signals (HF-model) are described.
In addition, a mechanical model of the PMSM is considered. To clearly differentiate between the associated variables and parameters of the two electrical models, they are marked with f for the fundamental wave model or with c for the HF-model (carrier signal). Both models are represented in the stator-fixed˛ˇ-coordinate system.

Fundamental wave model of the PMSM
The fundamental wave model consists of a voltage equation and a flux linkage equation which are shown in matrix notation. The vector u f;˛ˇc ontains the fundamental wave voltages u f;˛a nd u f;ˇ, while the vector i f;˛ˇc ontains the associated current responses i f;˛a nd i f;ˇ. The fundamental wave voltage is derived from the induced voltage d dt « f;˛ˇa nd the drop of voltage at the ohmic resistance R s . Changes in electrical resistance due to temperature are neglected. However, the saturation related current dependency of the inductances is taken into account. For this purpose, the current-dependent curves of the inductances L d and L q are approximated by polynomial functions. Since operation with field weakening must K also be provided, the inductances in the fundamental wave model are modeled as a function of currents i d and i q . The modeling and the identification of the models was described in detail by the authors in [17].
The flux linkage in the fundamental wave model consists of two parts. The first part is the flux linkage from the permanent magnets: The amplitude of the permanent magnetic flux in the air gap « PM depends on various effects. Due to the saturation of the iron surrounding the permanent magnets, more field lines close directly in the material without contributing to the air gap field. As a result, the amplitude of the corresponding air gap field « PM depends on the saturation state of the iron and thus, implicitly on the currents i f;˛a nd i f;ˇ. However, the temperature of the permanent magnets has an even stronger influence on them. When temperature rises, the field strength of the magnets decreases and along with it the corresponding air gap flux. Using appropriate models to take this current dependent permanent magnet flux into account is quite complex. Especially since the temperature of the PMSM is usually only measured on the stator windings, the exact temperature of the permanent magnets can normally only be estimated. Therefore, the amplitude of the permanent magnetic field « PM is continuously estimated online using EKF. The second part of the flux linkage results from the inductances. The inductance matrix contains an isotropic part and a anisotropic part Since the inductances have a comparatively small influence on the EMF-based rotor position estimation, the cross-coupling inductances of the fundamental wave model are neglected in this work.
Combining the flux linkage eq. (2) and the voltage eq. (1) yields to The time derivative of flux linkage can be resolved by: The expression in brackets in the right part of the eq. (8) is called differential inductance L diff f;˛ˇa nd can be substituted. Thus, the equation of state results in: Since the differential inductances L diff f;˛ˇa re derived from L f;˛ˇ, they are also dependent on i d and i q .

HF-model of the PMSM
In analogy to the fundamental wave model, the HF-model is also derived from the voltage equation where I is the identity matrix, and a flux linkage equation For the EKF-based rotor position observer, a rotating voltage pointer in the stator-fixed˛ˇ-coordinate system is used as a carrier signal. Therefore, the input voltage vector for the HF-model is directly defined by the amplitude U c and the frequency f c . The current vector i c;˛ˇc ontains the current responses i c;˛a nd i c;ˇt o the additional carrier voltage. Due to the higher frequency of the signals in the HF model there are eddy current losses which must be taken into account. One way to do this is to introduce a frequency-dependent resistance matrix R c that approximates the losses [18,19]. R c is a fully occupied 2 2 matrix. The identification of the associated parameter maps is described in [17].
In contrast to the fundamental wave model, the flux linkage equation of the HF-model (11) does not contain any flux component cased by the permanent magnetic field. Therefore, the flux linkage of the HF-model « c;˛ˇo nly derive from inductance influences. The inductance matrix of the HF-model contains an isotropic part L † and an anisotropic part L which are derived from the inductances L c;d and L c;q of the HF model: and a anisotropic part In [20][21][22] it was shown that the anisotropy-based rotor position estimation is unrobust at high loads if the saturation of the inductances are neglected. Therefore, the inductances of the HF-model are also modeled as current-dependent as described in [17]. Additionaly, the authors have identified the consideration of cross-coupling inductances as an important element in this regard. So the current-dependent cross-coupling inductance l c;dq i q are taken into account in L c;˛ˇ. It is assumed in this paper, that in the case of anisotropybased rotor position estimation i d is always approx zero. Therefore, the inductances of the HF model are only modeled as a function of i q . In Sect. 4, among other things, the behavior of the rotor position estimator at standstill is examined and it is shown that the method is comparatively robust in relation to load jumps. Combining the flux linkage eq. (11) and the voltage eq. (10) results in:

Mechanical model
In addition to the electrical models, the mechanical behaviour of the machine is taken into account. The rotation equations and P ' mech = ! mech (18) are the basis of the mechanical model. The overall torque results from the internal torque of the PMSM The current dependency of the inductances L d .i d ; i q / and L q .i d ; i q / is also taken into account at this point. In Eq. 17 a load moment M load is subtracted. The load torque summarizes all torques that act on the drive in addition to the internal torque. An analytical modelling of these load torques has to be done individually for each application. This procedure is very complex and therefore not suitable for practical applications. To avoid this, M load is estimated online as a disturbance variable by the EKF. As result, the EKF-based rotor position observer can be used flexibly for different applications.

State space model for the EKF-based rotor position estimator
The fundamental wave equation (9), the equation of the HF-model (16) and the mechanical equations of motion (17) and (18) are combined in a state space model used in the EKF. As mentioned before, no model approaches are used for online estimation of the amplitude of the permanent magnetic field « PM and the load torque M load . These parameters are assumed to be constant. Consequently, the corresponding time derivatives of these variables are zero. These state variables therefore only change as a result of contains the superposition of the fundamental wave currents i f;˛a nd i f;ˇw ith the HF-currents i c;˛a nd i c;ˇ. The estimated total currents according to Eq. 22 are compared with the measured currents of the PMSM. The resulting estimation error is multiplied by an observer feedback matrix. This product is used to correct the estimated state variables. The observer feedback matrix is calculated at each calculation step depending on the current operating point. Due to nonlinear behaviour, the state space equations and the output equations have to be linearised. This is done for every time step by calculating the Jacobians of the state equations and output equations. A more detailed description of the EKF algorithm can be found in [23,24].

Implementation of the rotor position observer in the PMSM control concept
The fundamental wave voltages u f;˛a nd u f;ˇa nd the carrier signals u c;˛a nd u c;ˇa re separated input variables of the EKF (see Fig. 1). Therefore, the measured control voltage cannot be used as an input, since the fundamental wave component and the HF component are always superimposed there. Therefore the outputs of the PI current regulators are used as fundamental wave input voltages. The HF voltages are defined by the amplitude U c and the frequency f c and can therefore be set separately as an input. The supper position from fundamental waves and HF component is then modulated with a PWM frequency of 16 kHz and provided by the power electronics. The currents i u , i v and i w , which are measured anyhow, are exploited in the EKF. The estimated fundamental wave currents b i f;d and b i f;q are fed back for current control. The estimated electrical rotor angle b ' el is used to commute the voltages from the rotor-fixed to a stator-fixed coordinate system. The observed mechanical rotor speed b ! mech is fed back to the speed control loop. This is calculated from the electrical angular speed b ! el divided by the pole number p. Additionally, the estimated mechanical disturbance c M load is used as a compensating feedforward control term.
As already indicated in Sect. 2.2, the amplitude of the HF carrier signals depends on the electrical speed of the PMSM. Therefore the amplitude of the Signal is not constant. The amplitude at standstill and at a low speed must be high enough to excite the anisotropic current sequence with sufficient strength. If the speed is high enough to robustly identify the rotor position from the EMF, the carrier signals reduce the voltage bandwidth unnecessarily. Therefore the amplitude is reduced linear from a maximum of U c;max = 30 V at standstill to U c;min = 0 V at 26.3% of the rated speed. At higher speeds, the amplitude is kept constant at U c;min = 0 V. The frequency of the carrier signals is constant at f c = 1000 Hz.

Parametrization of the EKF
The parametraization of the EKF is based on the covariance matrices R and Q. The matrix R corresponds to the covariance of the measurement noise and can therefore be determined relatively easily by measurement. The measurement noise of the measured currents i˛and iˇis evaluated in the stationary state. For the application in this Paper, this results in r.1,1/ = r.2,2/ = 6.8 10 −5 : The covariance matrix Q corresponds to the covariance of the system noise and thus to the model accuracy. This inaccuracy can hardly be quantified, which means that the parameterization of the matrix Q is usually based on experience and empirical tests. The following describes how to analytically approach a parameterization based on the available model knowledge for the application presented in this paper. The elements of the main diagonal of Q are assigned to the state variables. The relations are shown in Table 1. The higher the weighting of a state variable in Q, the more the estimate is corrected. It is thus assumed that the a priori calculation of the states by the state space model is less ac- curate. The correction becomes more dynamic with higher weighting. Priority is given to estimating the position of the rotor. In terms of the model, there is only an integrator between rotor speed and rotor position. It can therefore be assumed that if the rotor speed has a high estimation accuracy, the roter position will also be accurately estimated. Therefore, the Q entry related with rotor speed q.6,6/ is weighted the highest. The weighting of the entry belonging to the rotor position q.5,5/ can be selected correspondingly lower.
It is assumed that the fundamental wave model was modeled more accurately than the HF model because there are stronger parasitic machine effects with higher frequency voltage injection. Therefore, the elements q.3,3/ and q.4,4/ belonging to i c;˛a nd i c;ˇa re weighted slightly more heavily than the items q.1,1/ and q.2,2/ belonging to i f;˛a nd i f;ˇ.
Since there is no a priori estimate for the load and parameter estimation based on the state space model, stability problems can arise if the variables are estimated too dynamically. Therefore, these are weighted comparatively weakly. A special case is q.7,7/ which belongs to the estimation of « PM . It is a variable parameter which depends on the angular speed b ! el . This speed dependent weighting is necessary, because the information about the permanent magnetic field is linked to the EMF. Therefore, there is no excitation at standstill. In this case, the estimated « PM drifts and increases the parameter error of the fundamental wave model. Therefore, the correction of the parameter by the observer feedback must be suspended at low speed and standstill. This is achieved by seting weight coefficient of the corresponding state to zero from a lower speed limit ! low . In addition, the corresponding entry q.7,7/ of the covariance matrix of the estimate P must also be zeroed. From an upper speed limit ! up , the weighting of the estimation is kept constant. The weighting is increased linearly between these speeds. This leads to the function: K Based on these preliminary considerations, the design of the matrix Q was empirically optimized in a simulation environment and then transferred to the test bench. As a result the values entered in Table 1 emerges.

Experimental testing of the rotor position observer
To evaluate the EKF-based rotor position estimator and the superimposed position sensorless speed control, different measurements on the test bench are shown in this section and the results are discussed. For the tests, a PMSM was coupled with a load machine and controlled via a frequency converter from the company LENZE (i950 4kW). The presented position sensorless control concept was implemented on a real-time target (RTT), which transmits the voltages generated by the current control to the converter and receives the measured current values. The connected motor is also a PMSM from LENZE with the type designation MD-SKSAG056-23. For the separate evaluation of fundamental waves and high-frequency signals, these can be determined by offline filtering from the total currents or voltages measured. In this paper, however, only the total currents and voltages are shown.
To evaluate the angle estimation error and the speed estimation error of the EKF over the entire speed operating range, a speed ramp is traversed from standstill to the nominal speed. The machine is idle during this experiment. Figure 2 shows high estimation quality over the entire speed range, both for the rotor position and the speed estimation. It turns out that at the transition between the anisotropy and the EMF range, at approx. 100 to 500 rpm, there are no negative effects on the speed control. The transition takes Fig. 2 Speed ramp from standstill to rated speed: a measured speed; b rotor position estimation error; c speed estimation error place very slowly, but the results are accordant even in the event of a jump speed setting in a later experiment.
In Fig. 2 it can be seen that over the entire speed range the maximal estimation error of the electrical rotor position ' el is 4 ı . The maximal estimation error of the mechanical speed n mech is 11 rpm. In this experiment, however, the estimation accuracies are not considered in the steady state. Therefore, it cannot be ruled out that dynamic errors influence the results. Therefore, in a second experiment, the PMSM is driven to different stationary speed operating points and the estimation errors of the rotor position and speed are statistically evaluated.
In Fig. 3 the mean value and standard deviation of the estimation errors of rotor position and speed are illustrated. The maximum angle estimation error at speed of n mech = 0rpm is ' el;max = 4.17 ı el and the maximum speed estimation error n mech;max = max n mech + sd OE n mech sign n mech at speed of n mech = 100 rpm is n mech;max = 2.9 rpm can be determined from Fig. 3. The evaluation shows that the maximum estimation error is present in both cases in the low speed range. In this range the anisotropy is used as the basis for the angle estimation. In order to evaluate the dynamic behaviour of the sensorless speed controlled PMSM, a speed setpoint jump to 1000 rpm is performed. The PMSM is idling during this   Figure 4 shows, that the EKF-based sensorless speed control behaviour is comparably good. However, the comparison of the measured currents shows that, with position sensorless control, the current in d -direction is higher and the current in the q-direction is slightly lower shortly after the jump. This is cased by temporarily higher estimation errors. Due to the reduced q-current, the internal torque of the PMSM is also lower, which explains the slightly lagging speed for sensorless control. Overall, this experiment shows that the EKF-based sensorless control has approximately the same behaviour as speed control with a position sensor.
As described in Sect. 3, the estimated fundamental wave currents are fed back as actual values for the current control. This means that no additional filtering is necessary. For proof of the current sequence separation by the EKF, the frequency spectrum of the measured total currents, the estimated fundamental wave and higher-frequency current sequences are compared next. For this purpose, the fre- The frequency spectrum of the˛current in Fig. 5 shows that the sequences of fundamental wave and carrier signals are separated effectively by the EKF. The dominant frequency of the fundamental wave at 50 Hz (1000 rpm p=60 s = 50 Hz) and the dominant frequency of the carrier signal at 1000 Hz are only expressed in the respective estimated current sequences, which confirms the high quality of the current separation.
Finally, the robustness of the estimation and the superimposed position sensorless control with regard to load and disturbance torques should be examined. For this purpose, a load torque jump of 1.6 Nm is applied with the help of the coupled load machine. This happens once when the machine is at a standstill and once at a speed of 1000 rpm. At standstill, only the anisotropy-based rotor position information is used for estimation, while at 1000 rpm only the EMF is evaluated for rotor position estimation.
In Fig. 6 it can be seen that the disturbance jump is regulated a little bit slower with sensorless control compared to the control with a position sensor. However, the difference is insufficient small and can also be traced back to the dynamic estimation error. It also shows that the rotor position estimation error resulting from the load jump is higher at standstill than at 1000 rpm. The estimation based on the EMF is therefore more robust.

Conclusion
In this paper, a new EKF-based rotor position observer for position sensorless control of a PMSM is presented. This EKF simultaneously evaluates EMF and anisotropy for ro- tor position estimation. Switching between or synchronizing different estimators is not necessary. The estimation accuracy and the control quality were examined on the basis of experiments. The measurements show that the maximum stationary estimation error of the electrical rotor position in the entire speed range is below 4.2 ı . The later comparison shows that the EKF-based position sensorless control has no significant disadvantages compared to PMSM control with position sensor. The EKF can clearly separate the fundamental wave current components from the higher-frequency current. Thus, in addition to the EKF rotor position observer, no additional angle trackers or signal filters are necessary. Therefore, the phase margin of the control loop is not unnecessarily reduced. It was also shown that disturbance torques can be estimated with a high accuracy by the EKF. This disturbance variable estimation has a high potential for an additional error detection, such as e.g. for detecting gear breakdowns or mechanical wear. The new EKF-based rotor position estimator presented in this paper enables an optimized position sensorless operation of the PMSM with regard to the control dynamics without the necessity to make compromises with regard to estimation robustness. Therefore, the presented rotor position estimator enables applications with high demands on dynamics and accuracy to be controlled without position sensors.
An analytical investigation of the transmission behaviour of the presented EKF and an optimization of the controller design are planned as the content of future work.
Funding The European Regional Development Fund co-financed this research and publication.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4. 0/.