Observers#

Observers estimate the internal state of electrical machines. In this document, we describe the observer design for induction and synchronous machines, including both sensored and sensorless designs. The observer designs allow to take the magnetic saturation into account.

For Induction Machines#

In induction machine drives, the flux linkages and torque are estimated. In sensorless drives, the rotor speed is also estimated. Sensored and sensorless reduced-order observer designs [Harnefors, 2001, Hinkkanen et al., 2010, Verghese and Sanders, 1988] are available in the motulator.drive.control.im.FluxObserver and motulator.drive.control.im.SpeedFluxObserver classes.

Machine Model#

The inverse-Γ model of an induction machine is considered (see (6) in Induction Machines). In a coordinate system rotating at the angular speed \(\omegac\), the dynamics can be expressed as

(1)#\[\begin{split} \frac{\D \psis}{\D t} &= \us - \Rs\is - \jj\omegac\psis \\ \Lsgm\frac{\D \is}{\D t} &= \us - (\Rsgm + \jj\omegac \Lsgm)\is + \left(\alpha - \jj\omegam\right)\psiR \\ \psiR &= \psis - \Lsgm\is \\ \tauM &= \frac{3\np}{2}\IM\left\{\is \psis^* \right\}\end{split}\]

where \(\alpha = \RR/\LM\) and \(\Rsgm = \Rs + \RR\).

Flux Observer#

A reduced-order observer is implemented in the motulator.drive.control.im.FluxObserver class. Based on (1), the observer is formulated as

(2)#\[\begin{split} \frac{\D \hatpsis}{\D t} &= \us - \hatRs\is - \jj\omegac\hatpsis + \koa\eo + \kob\eo^* \\ \hatpsiR &= \hatpsis - \hatLsgm\is\end{split}\]

where \(\us\) is the realized voltage estimate obtained from the PWM algorithm, \(\koa\) and \(\kob\) are complex gains, the estimates are marked with the hat, and \(^*\) marks the complex conjugate. The estimation error is

(3)#\[ \eo = \hatLsgm\frac{\D \is}{\D t} - \us + \left(\hatRsgm + \jj\omegac\hatLsgm\right)\is - \left(\hatalpha - \jj\hatomegam\right)\hatpsiR\]

where \(\hatomegam\) is the rotor speed estimate. In sensored drives, the speed estimate is replaced with the measured speed, \(\hatomegam = \omegam\). In observer-based V/Hz control [Tiitinen et al., 2025], the speed estimate is replaced with the (rate-limited) speed reference, \(\hatomegam = \omegamref\). Note that the derivative of the stator current in (3) is integrated, i.e., the noise is not amplified. The torque estimate is given by

(4)#\[ \hattauM = \frac{3\np}{2}\IM\left\{\is \hatpsis^* \right\}\]

The magnetic saturation \(\hatLs = \hatLs(\hatabspsis)\) can be taken into account using the motulator.drive.model.InductionMachinePars class.

Note

The angular speed \(\omegac\) of the controller coordinate system can be arbitrarily selected. In the motulator.drive.control.im.FluxObserver class, it is set to \(\omegac = \hatomegam + \hatomegar\), which allows simple discretization since the DC quantities are estimated in the steady state. Estimated rotor coordinates \(\omegac = \hatomegam\) could also be used, while using \(\omegac = 0\) would require a more complex discretization.

Note

Real-valued column vectors and the corresponding \(2\times 2\) gain matrix were used in [Hinkkanen et al., 2010]. The complex form in (2) has the same degrees of freedom.

Gain Analysis and Selection#

The estimation-error dynamics are obtained by subtracting (2) from (1). The resulting system is linearized for analysis and gain selection purposes. Assuming accurate parameter estimates, linearized estimation-error dynamics are [Hinkkanen et al., 2010]

(5)#\[ \frac{\D \Delta\tildepsis}{\D t} = -\koa \Delta \eo - \kob \Delta \eo^* - \jj\omegaso \Delta\tildepsis\]

where \(\Delta\) marks the small-signal quantities, the subscript 0 marks the operating-point quantities, \(\tildepsis = \psis - \hatpsis\) is the estimation error, and \(\omegaso\) is the stator angular frequency. The linearized estimation error is

(6)#\[ \Delta\eo = \left(\alpha - \jj\omegamo \right)\Delta\tildepsis - \jj\psiRo\Delta\tildeomegam\]

Notice that the rotor flux estimation error is \(\Delta\tildepsiR = \Delta\tildepsis\).

Sensored Drives#

In sensored drives, \(\Delta\tildeomegam = 0\) holds and \(\kob = 0\) is used. Under these assumptions, the estimation-error dynamics (5) reduce to [Verghese and Sanders, 1988]

(7)#\[ \frac{\D \Delta\tildepsis}{\D t} = -\left[\koa \left(\alpha - \jj\omegamo \right) + \jj\omegaso \right]\Delta\tildepsis\]

The closed-loop pole can be arbitrarily placed via the gain \(\koa\). The default gains for sensored drives are

(8)#\[ \koa = 1 + \frac{g |\omegam|}{\hatalpha - \jj\omegam} \qquad \kob = 0\]

where \(g\) is a unitless positive design parameter. The corresponding pole is located at \(s = -\alpha - g |\omegamo| - \jj\omegaro\), where \(\omegaro = \omegaso - \omegamo\) is the slip angular frequency.

Note

As a special case, \(\koa = 0\) yields the voltage model. As another special case, the current model is obtained choosing \(\koa = 1\).

Sensorless Drives#

In sensorless drives, the rotor speed estimate \(\hatomegam\) is canceled out from the observer equations by choosing [Hinkkanen et al., 2010]

(9)#\[ \kob = \frac{\hatpsiR}{\hatpsiR^*} \koa\]

With this choice, the linearized estimation-error dynamics in (5) become

(10)#\[\begin{split} \frac{\D}{\D t} \begin{bmatrix} \Delta\tildepsisd \\ \Delta\tildepsisq \end{bmatrix} = \begin{bmatrix} -2\kd\alpha & -2\kd\omegamo + \omegaso \\ -2\kq\alpha - \omegaso & -2\kq\omegamo \end{bmatrix} \begin{bmatrix} \Delta\tildepsisd \\ \Delta\tildepsisq \end{bmatrix}\end{split}\]

where the gain components correspond to \(\koa = \kd + \jj \kq\). The attenuation \(\sigma\) can be assigned by choosing

(11)#\[ \koa = \frac{\sigma}{\hat \alpha - \jj\hatomegam}\]

results in the characteristic polynomial \(D(s) = s^2 + 2\sigma s + \omegaso^2\). In the default tuning, the attenuation is scheduled as \(\sigma = \hat \alpha/2 + \zeta_\infty|\hatomegam|\), where \(\zeta_\infty\) is the desired damping ratio at high speeds. At zero stator frequency \(\omegaso = 0\), the poles are located at \(s = 0\) and \(s = -\alpha\), which allows stable magnetizing and starting the machine. Figure 1 shows the corresponding pole placement example.

Pole placement example in sensorless drives

Figure 1: Example pole placement of the sensorless observer.#

Pole placement example in sensorless drives

Figure 1: Example pole placement of the sensorless observer.#

Speed Observer#

The flux observer (2) is extended with the speed observer in the motulator.drive.control.im.SpeedFluxObserver class. The speed-estimation error signal \(\varepsilon\) is extracted as

(12)#\[ \varepsilon = -\IM\left\{ \frac{\eo}{\hatpsiR} \right\}\]

Considering the rotor speed to be a quasi-constant disturbance, the speed can be estimated as [Harnefors, 2001]

(13)#\[ \frac{\D \hatomegam}{\D t} = \koomega \varepsilon\]

This estimator is essentially the same as the conventional slip-relation-based estimator with the first-order low-pass filter [Hinkkanen et al., 2010].

To avoid the lag in the speed estimate, the speed can be estimated based on the mechanical model and considering the load torque as a quasi-constant disturbance (see (1) in Mechanics). This approach results in the speed observer

(14)#\[\begin{split} \frac{\D \hatomegam}{\D t} &= \frac{\np}{\hat{J}}(\hattauM - \hattauL) + \koomega \varepsilon \\ \frac{\D\hattauL}{\D t} &= -\frac{\kotau}{\np} \varepsilon\end{split}\]

where \(\hattauL\) is the load torque estimate and \(\koomega\) and \(\kotau\) are the observer gains. This observer is analogous to the speed observer in [Lorenz and Van Patten, 1991]. Note that setting \(\hat{J} = \infty\) and \(\kotau = 0\) yields the estimator (13); clearly, the inertia estimate \(\hat{J}\) can be safely overestimated.

Gain Analysis and Selection#

The flux observer gain (9) decouples the rotor speed estimation from the flux estimation. Therefore, the speed estimation dynamics can be analyzed separately. The estimator (13) results in the first-order estimation dynamics

(15)#\[ \frac{\Delta\hatomegam(s)}{\Delta\omegam(s)} = \frac{\koomega}{s + \koomega}\]

The gain \(\koomega = \alphao\) determines the speed-estimation bandwidth.

For the observer (14), the linearized estimation dynamics are

(16)#\[ \frac{\Delta\hatomegam(s)}{\Delta\omegam(s)} = \frac{(J/\hat{J})s^2 + \koomega s + \kotau/\hat{J}}{s^2 + \koomega s + \kotau/\hat{J}}\]

where the stiff mechanical model is assumed in the derivation. The critically damped design is obtained by setting \(\koomega = 2\alphao\) and \(\kotau = \alphao^2 \hat{J}\), where \(\alphao\) is the desired pole location.

For Synchronous Machines#

In synchronous machine drives, the flux linkage and the torque are estimated. In sensorless drives, the rotor speed and position are also estimated [Capecchi et al., 2001, Hinkkanen et al., 2018, Jones and Lang, 1989, Piippo et al., 2008]. This document describes an observer design implemented in the motulator.drive.control.sm.FluxObserver and motulator.drive.control.sm.SpeedFluxObserver classes, based on [Hinkkanen et al., 2018]. The observer supports both sensorless and sensored operating modes and accounts for magnetic saturation.

Machine Model#

The synchronous machine model in rotor coordinates rotating at \(\omegam\) is

(17)#\[\begin{split} \frac{\D\psis}{\D t} &= \us - \Rs\is - \jj\omegam\psis \\ \frac{\D\thetam}{\D t} &= \omegam \\ \is &= \isfcn(\psis) \\ \tauM &= \frac{3 \np}{2}\IM\left\{\is\psis^*\right\}\end{split}\]

where \(\isfcn\) is the current map (see Synchronous Machine Model). If the magnetic saturation is omitted, the current is \(\is = (\psid - \psif)/\Ld + \jj\psiq/\Lq\).

Coordinate Transformation#

The control system operates in estimated rotor coordinates, \(\thetac = \hatthetam\), aligned at the rotor angle estimate. In these coordinates, the measured current and the realized voltage (obtained from the PWM algorithm), respectively, are

(18)#\[ \is' = \iss \e^{-\jj\hatthetam} \qquad \us' = \us \e^{-\jj\hatthetam}\]

Due to the estimation error \(\tildethetam = \thetam - \hatthetam\), the current \(\is'\) generally differs from the current \(\is\) (and similarly for the voltage).

Flux and Position Observer#

Based on (17), a nonlinear state observer is formulated as

(19)#\[\begin{split} \frac{\D \hatpsis}{\D t} &= \us' - \hatRs\is' - \jj\omegac\hatpsis + \koa \eo + \kob \eo^* \\ \frac{\D\hatthetam}{\D t} &= \hatomegam - \kotheta \IM\left\{ \frac{\eo}{\psiaux} \right\} = \omegac\end{split}\]

where \(\omegac\) is the angular speed of the coordinate system, \(\eo\) is the estimation error, \(\koa\), \(\kob\), and \(\kotheta\) are observer gains, the estimates are marked with the hat, and \(^*\) marks the complex conjugate. The flux estimation error is

(20)#\[ \eo = \hatpsisfcn(\is') - \hatpsis\]

where \(\hatpsisfcn\) is the flux map estimate. This observer structure is used in the motulator.drive.control.sm.FluxObserver class. The implementation also contains optional PM-flux adaptation [Tuovinen et al., 2018], see the 2.2-kW IPMSM, CVC, PM-flux adaptation example.

Note

Since the current is measured, the observer is fundamentally corrected by means of the current estimation error. However, due to the saliency and magnetic saturation, the current estimation error is convenient to map (or scale in the case of linear magnetics) to the flux linkage error.

Note

Real-valued column vectors and the corresponding \(2\times 2\) gain matrix were used in [Hinkkanen et al., 2018]. The complex form in (19) has the same degrees of freedom.

Gain Analysis and Selection#

Sensored Drives#

In sensored case, \(\tildethetam = 0\) holds and \(\kob = 0\) is used. Therefore, using (17) and (19), the linearized estimation-error dynamics become

(21)#\[ \frac{\D \Delta\tildepsis}{\D t} = -(\koa + \jj\omegamo)\Delta\tildepsis\]

where \(\Delta\) marks the small-signal quantities, the subscript 0 marks the operating-point quantities, and \(\tildepsis = \psis - \hatpsis\) is the estimation error. The pole can be arbitrarily placed via the gain \(\koa\). Well-damped dynamics are obtained simply with a real gain, \(\koa = \sigma\), resulting in the pole at \(s = -\sigma - \jj\omegamo\), where \(\sigma = 2\pi \cdot 15\) rad/s is used as the default value in the motulator.drive.control.sm.FluxObserver class in sensored drives.

Sensorless Drives#

The analysis of the sensorless case resembles that of induction machines, see Sensorless Drives. The following results can be derived from the linearized form of (17)(19), see details in [Hinkkanen et al., 2018].

To decouple the flux estimation from the rotor angle, the gains of (19) have to be of the form

(22)#\[ \koa = \sigma \qquad \kob = \frac{\sigma\hatpsiaux}{\hatpsiaux^*}\]

where \(\hatpsiaux = \hatpsiaux(\is')\) is the estimate of the auxiliary flux [see (9) in Synchronous Machine Model] and \(\sigma\) is the attenuation, i.e., the resulting characteristic polynomial is \(D(s) = s^2 + 2\sigma s + \omegamo^2\). By default, the attenuation in sensorless drives is scheduled as

(23)#\[ \sigma = \frac{\beta}{2} + \zeta_\infty |\hatomegam |\]

where \(\zeta_\infty\) is the desired damping ratio at high speeds. At zero speed, one pole is placed at \(s = 0\) and another at \(s = -\beta\). Unstable double pole at \(s = 0\) is avoided, enabling stable start of the machine.

Speed Observer#

The flux observer (19) is extended with the speed observer in the motulator.drive.control.sm.SpeedFluxObserver class. The angle-estimation error signal \(\varepsilon\) is extracted as

(24)#\[ \varepsilon = -\IM\left\{ \frac{\eo}{\hatpsiaux} \right\}\]

Considering the rotor speed to be a quasi-constant disturbance, the speed can be estimated as [Hinkkanen et al., 2018]

(25)#\[ \frac{\D \hatomegam}{\D t} = \koomega \varepsilon\]

To avoid the lag in the speed estimate, the speed can be estimated based on the mechanical model and considering the load torque as a disturbance (see (1) in Mechanics). This approach results in the speed observer

(26)#\[\begin{split} \frac{\D \hatomegam}{\D t} &= \frac{\np}{\hat{J}}(\hattauM - \hattauL) + \koomega \varepsilon \\ \frac{\D\hattauL}{\D t} &= -\frac{\kotau}{\np} \varepsilon\end{split}\]

where \(\hattauL\) is the load torque estimate and \(\koomega\) and \(\kotau\) are the observer gains. Note that setting \(\hat{J} = \infty\) and \(\kotau = 0\) yields the estimator (13); clearly, the inertia estimate \(\hat{J}\) can be safely overestimated. Originally (26) was used in servo drives with incremental encoders [Lorenz and Van Patten, 1991] and signal-injection methods [Kim et al., 2003].

Gain Analysis and Selection#

The flux observer design decouples the speed and position estimation from the flux estimation. Therefore, the speed estimation dynamics can be analyzed separately. The estimator (25) results in the second-order estimation dynamics

(27)#\[ \frac{\Delta\hatomegam(s)}{\Delta\omegam(s)} = \frac{\alphao^2}{(s + \alphao)^2}\]

The critically damped design is obtained by setting \(\kotheta = 2\alphao\) and \(\koomega = \alphao^2\), where \(\alphao\) is the desired pole location. The inertia estimate is avoided, but the lag limits achievable speed-control bandwidth [Tiitinen et al., 2025].

For the observer (26), the linearized estimation dynamics are

(28)#\[ \frac{\Delta\hatomegam(s)}{\Delta\omegam(s)} = \frac{(J/\hat{J}) s^3 + (J/\hat{J}) \kotheta s^2 + \koomega s + \kotau/\hat{J}}{s^3 + \kotheta s^2 + \koomega s + \kotau/\hat{J}}\]

where the stiff mechanical model is assumed in the derivation. The critically damped design is obtained by setting \(\kotheta = 3\alphao\), \(\koomega = 3\alphao^2\), and \(\kotau = \alphao^3 \hat{J}\).