Observer Design#

An observer is commonly used to estimate the state of an electrical machine. In motion-sensored drives, the state of interest is typically the flux linkage. In sensorless drives, the rotor speed estimate is needed as well. Furthermore, sensorless synchronous machine drives require estimation of the rotor position.

Induction Machines#

In the following, reduced-order observer designs for the induction machine are considered [1], [2], [3]. Both sensored and sensorless observer variants are available in the motulator.drive.control.im.Observer class. Similar design principles are applied to synchronous machines as well.

Machine Model#

The inverse-Γ model of an induction machine is considered (see Electric Machines). In a coordinate system rotating at the angular speed \(\omega_\mathrm{s}\), the rotor flux dynamics can be expressed using the stator and rotor quantities, respectively, as

(1)#\[\begin{split}\frac{\mathrm{d} \boldsymbol{\psi}_\mathrm{R}}{\mathrm{d} t} + \mathrm{j}\omega_\mathrm{s}\boldsymbol{\psi}_\mathrm{R} &= \boldsymbol{u}_\mathrm{s} - R_\mathrm{s}\boldsymbol{i}_\mathrm{s} - L_\sigma \frac{\mathrm{d} \boldsymbol{i}_\mathrm{s}}{\mathrm{d} t} - \mathrm{j} \omega_\mathrm{s}L_\sigma\boldsymbol{i}_\mathrm{s} \\ &= R_\mathrm{R}\boldsymbol{i}_\mathrm{s} - \left(\alpha - \mathrm{j}\omega_\mathrm{m} \right)\boldsymbol{\psi}_\mathrm{R}\end{split}\]

where \(\omega_\mathrm{m}\) is the electrical rotor angular speed.

Observer Structure#

General Coordinates#

Based on (1), a reduced-order observer can be formulated in a coordinate system rotating at \(\omega_\mathrm{s}\),

(2)#\[\frac{\mathrm{d} \hat{\boldsymbol{\psi}}_\mathrm{R}}{\mathrm{d} t} + \mathrm{j}\omega_\mathrm{s}\hat{\boldsymbol{\psi}}_\mathrm{R} = \boldsymbol{v} + \boldsymbol{k}_1(\hat{\boldsymbol{v}} - \boldsymbol{v}) + \boldsymbol{k}_2(\hat{\boldsymbol{v}} - \boldsymbol{v})^*\]

where \(\boldsymbol{k}_1\) and \(\boldsymbol{k}_2\) are complex gains, the estimates are marked with the hat, and \(^*\) marks the complex conjugate. The back-emf estimates are

(3)#\[\begin{split}\boldsymbol{v} &= \boldsymbol{u}_\mathrm{s} - R_\mathrm{s}\boldsymbol{i}_\mathrm{s} - L_\sigma \frac{\mathrm{d} \boldsymbol{i}_\mathrm{s}}{\mathrm{d} t} - \mathrm{j} \omega_\mathrm{s}L_\sigma\boldsymbol{i}_\mathrm{s} \\ \hat{\boldsymbol{v}} &= R_\mathrm{R}\boldsymbol{i}_\mathrm{s} - \left(\alpha - \mathrm{j}\hat{\omega}_\mathrm{m} \right)\hat{\boldsymbol{\psi}}_\mathrm{R}\end{split}\]

In sensored drives, the rotor speed estimate is replaced with the measured speed, \(\hat{\omega}_\mathrm{m} = \omega_\mathrm{m}\). If needed, the estimates for the stator flux linkage and the electromagnetic torque, respectively, are

(4)#\[\begin{split}\hat{\boldsymbol{\psi}}_\mathrm{s} &= \hat{\boldsymbol{\psi}}_\mathrm{R} + L_\sigma \boldsymbol{i}_\mathrm{s} \\ \hat{\tau}_\mathrm{M} &= \frac{3n_\mathrm{p}}{2}\mathrm{Im}\left\{\boldsymbol{i}_\mathrm{s} \hat{\boldsymbol{\psi}}_\mathrm{R}^* \right\}\end{split}\]

It is also worth noticing that the derivative of the stator current in (3) is integrated, i.e., the noise is not amplified.

Note

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

Estimated Flux Coordinates#

The flux estimate in stator coordinates can be expressed using the polar form, \(\hat{\boldsymbol{\psi}}_\mathrm{R}^\mathrm{s} = \hat{\psi}_\mathrm{R}\mathrm{e}^{\mathrm{j}\hat{\vartheta}_\mathrm{s}}\), where \(\hat{\psi}_\mathrm{R}\) is the magnitude and \(\hat{\vartheta}_\mathrm{s}\) is the angle of the estimate. The observer is convenient to implement in estimated rotor flux coordinates, in which the rotor flux estimate is real, \(\hat{\boldsymbol{\psi}}_\mathrm{R} = \hat{\psi}_\mathrm{R} + \mathrm{j}0\) [2]. Under these conditions, the angular speed of the coordinates system can be solved from (2) as

(5)#\[\frac{\mathrm{d}\hat{\vartheta}_\mathrm{s}}{\mathrm{d} t} = \omega_\mathrm{s} = \frac{\mathrm{Im} \{ \boldsymbol{v}' + \boldsymbol{k}_1(\hat{\boldsymbol{v}} - \boldsymbol{v}') + \boldsymbol{k}_2(\hat{\boldsymbol{v}} - \boldsymbol{v}')^* \} }{\hat{\psi}_\mathrm{R} + L_\sigma \mathrm{Re}\{(1 - \boldsymbol{k}_1)\boldsymbol{i}_\mathrm{s} + \boldsymbol{k}_2 \boldsymbol{i}_\mathrm{s}^* \}}\]

where

(6)#\[\boldsymbol{v}' = \boldsymbol{u}_\mathrm{s} - R_\mathrm{s}\boldsymbol{i}_\mathrm{s} - L_\sigma \frac{\mathrm{d} \boldsymbol{i}_\mathrm{s}}{\mathrm{d} t}\]

The flux magnitude dynamics are

(7)#\[\frac{\mathrm{d} \hat{\psi}_\mathrm{R}}{\mathrm{d} t} = \mathrm{Re}\{ \boldsymbol{v} + \boldsymbol{k}_1(\hat{\boldsymbol{v}} - \boldsymbol{v}) + \boldsymbol{k}_2(\hat{\boldsymbol{v}} - \boldsymbol{v})^* \}\]

Notice that the right-hand side of (5) is independent of \(\omega_\mathrm{s}\). Futhermore, in these coordinates, the condition (12) for an inherently sensorless observer reduces to \(\boldsymbol{k}_2 = \boldsymbol{k}_1\). This observer structure is implemented in the motulator.drive.control.im.Observer, where simple forward-Euler discretization is used.

Gain Selection#

The estimation-error dynamics are obtained by subtracting (2) from (1). The resulting system can be linearized for analysis and gain selection purposes. Using the rotor speed as an example, the small-signal deviation about the operating point is \(\Delta \omega_\mathrm{m} = \omega_\mathrm{m} - \omega_\mathrm{m0}\), where the subscript 0 refers to the operating point. Linearization of the estimation-error dynamics leads to [3]

(8)#\[\frac{\mathrm{d} \Delta\tilde{\boldsymbol{\psi}}_\mathrm{R}}{\mathrm{d} t} = \boldsymbol{k}_1\Delta \tilde{\boldsymbol{v}} + \boldsymbol{k}_2\Delta \tilde{\boldsymbol{v}}^* - \mathrm{j}\omega_\mathrm{s0}\Delta\tilde{\boldsymbol{\psi}}_\mathrm{R}\]

where the estimation error of the rotor flux is \(\Delta\tilde{\boldsymbol{\psi}}_\mathrm{R} = \Delta\boldsymbol{\psi}_\mathrm{R} - \Delta\hat{\boldsymbol{\psi}}_\mathrm{R}\) and other estimation errors are marked similarly. Furthermore, the back-emf estimation error is

(9)#\[\Delta\tilde{\boldsymbol{v}} = -\left(\alpha - \mathrm{j}\omega_\mathrm{m0} \right)\Delta\tilde{\boldsymbol{\psi}}_\mathrm{R} + \mathrm{j}\boldsymbol{\psi}_\mathrm{R0}\Delta\tilde{\omega}_\mathrm{m}\]

Sensored Case#

Here, \(\boldsymbol{k}_2 = 0\) and \(\Delta\tilde{\omega}_\mathrm{m} = 0\) are assumed, corresponding to the sensored reduced-order observer in [1]. Under these assumptions, the estimation-error dynamics in (8) reduce to

(10)#\[\frac{\mathrm{d} \Delta\tilde{\boldsymbol{\psi}}_\mathrm{R}}{\mathrm{d} t} = -\left[\boldsymbol{k}_1\left(\alpha - \mathrm{j}\omega_\mathrm{m0} \right) + \mathrm{j}\omega_\mathrm{s0}\right]\Delta\tilde{\boldsymbol{\psi}}_\mathrm{R}\]

It can be noticed that the closed-loop pole could be arbitrarily placed via the gain \(\boldsymbol{k}_1\). Well-damped estimation-error dynamics can be obtained, e.g., by choosing

(11)#\[\boldsymbol{k}_1 = 1 + \frac{g |\omega_\mathrm{m}|}{\alpha - \mathrm{j}\omega_\mathrm{m}}\]

where \(g\) is a unitless positive design parameter. The corresponding pole is located at \(s = -\alpha - g |\omega_\mathrm{m0}| - \mathrm{j}\omega_\mathrm{r0}\), where \(\omega_\mathrm{r0} = \omega_\mathrm{s0} - \omega_\mathrm{m0}\) is the operating-point slip angular frequency.

Note

As a special case, \(\boldsymbol{k}_1 = 0\) yields the voltage model. As another special case, the current model is obtained choosing \(\boldsymbol{k}_1 = 1\).

Sensorless Case#

For sensorless drives, choosing

(12)#\[\boldsymbol{k}_2 = (\hat{\boldsymbol{\psi}}_\mathrm{R}/\hat{\boldsymbol{\psi}}_\mathrm{R}^*) \boldsymbol{k}_1\]

yields an inherently sensorless observer, i.e., the rotor speed estimate \(\hat{\omega}_\mathrm{m}\) cancels out from the observer equations [3]. Under this condition, the linearized estimation-error dynamics in (8) become

(13)#\[\begin{split}\frac{\mathrm{d}}{\mathrm{d} t} \begin{bmatrix} \Delta\tilde{\psi}_\mathrm{Rd} \\ \Delta\tilde{\psi}_\mathrm{Rq} \end{bmatrix} = \begin{bmatrix} -2k_\mathrm{d}\alpha & -2k_\mathrm{d}\omega_\mathrm{m0} + \omega_\mathrm{s0} \\ -2k_\mathrm{q}\alpha - \omega_\mathrm{s0} & -2k_\mathrm{q}\omega_\mathrm{m0} \end{bmatrix} \begin{bmatrix} \Delta\tilde{\psi}_\mathrm{Rd} \\ \Delta\tilde{\psi}_\mathrm{Rq} \end{bmatrix}\end{split}\]

where the gain components correspond to \(\boldsymbol{k}_1 = k_\mathrm{d} + \mathrm{j}k_\mathrm{q}\). It can be seen that the dynamics of the rotor speed are decoupled from the flux-estimation error dynamics. The decay rate \(\sigma\) be assigned by choosing

(14)#\[\boldsymbol{k}_1 = \frac{\sigma}{\alpha - \mathrm{j}\hat\omega_\mathrm{m}}\]

which results in the characteristic polynomial \(D(s)=s^2 + 2\sigma s + \omega_\mathrm{s0}^2\). The decay rate can be selected as \(\sigma = \alpha/2 + \zeta_\infty|\hat{\omega}_\mathrm{m}|\), where \(\zeta_\infty\) is the desired damping ratio at high speed. At zero stator frequency \(\omega_\mathrm{s0} = 0\), the poles are located at \(s = 0\) and \(s = -\alpha\), which allows stable magnetizing and starting the machine.

References

Synchronous Machines#

In sensorless control of synchronous machine drives, the rotor position and speed estimates are needed [4], [5], [6]. As a side product, the stator flux linkage is also estimated. In the following, an observer design available in the motulator.drive.control.sm.Observer class is considered, which is based on [6]. This observer implementation also includes a sensored mode.

Machine Model in General Coordinates#

In Electric Machines, the synchronous machine model is given in rotor coordinates. For the observer design and analysis, it is convenient to express this model in general coordinates, aligned at \(\vartheta_\mathrm{s}\) and rotating at \(\omega_\mathrm{s} = \mathrm{d} \vartheta_\mathrm{s}/\mathrm{d} t\) with respect to stator coordinates. Furthermore, the rotor is aligned at \(\vartheta_\mathrm{m}\) and rotates at \(\omega_\mathrm{m} = \mathrm{d} \vartheta_\mathrm{m}/\mathrm{d} t\) with respect to stator coordinates. This coordinate transformation results in

(15)#\[\begin{split}\frac{\mathrm{d}\boldsymbol{\psi}_\mathrm{s}}{\mathrm{d} t} &= \boldsymbol{u}_\mathrm{s} - R_\mathrm{s}\boldsymbol{i}_\mathrm{s} - \mathrm{j}\omega_\mathrm{s}\boldsymbol{\psi}_\mathrm{s} \\ \frac{\mathrm{d}\delta}{\mathrm{d} t} &= \omega_\mathrm{m} - \omega_\mathrm{s}\end{split}\]

where \(\boldsymbol{u}_\mathrm{s}\) is the stator voltage, \(\boldsymbol{i}_\mathrm{s}\) is the stator current, and \(\delta = \vartheta_\mathrm{m} - \vartheta_\mathrm{s}\) is the electrical angle of the rotor as seen from the general coordinate system. Assuming linear magnetics, the relation between the stator flux linkage and the stator current is governed by

(16)#\[\boldsymbol{\psi}_\mathrm{s} = \mathrm{e}^{\mathrm{j}\delta}\left(L_\mathrm{d}\mathrm{Re}\{\boldsymbol{i}_\mathrm{s} \mathrm{e}^{-\mathrm{j}\delta}\} + \mathrm{j}L_\mathrm{q}\mathrm{Im}\{\boldsymbol{i}_\mathrm{s}\mathrm{e}^{-\mathrm{j}\delta}\} + \psi_\mathrm{f}\right)\]

where \(L_\mathrm{d}\) is the d-axis inductance, \(L_\mathrm{q}\) is the q-axis inductance, and \(\psi_\mathrm{f}\) is the PM flux linkage.

Notice that setting \(\vartheta_\mathrm{s}=0\) yields the machine model in stator coordinates. In the following, the coordinate system will be fixed to the estimated angle of the rotor, i.e., to the coordinate system used by the control system.

Observer Structure#

The observer is assumed to operate in estimated rotor coordinates, whose d-axis is aligned with the rotor angle estimate \(\hat{\vartheta}_\mathrm{m}\). Now, the angle \(\delta = \vartheta_\mathrm{m} - \hat{\vartheta}_\mathrm{m}\) in the machine model (15) corresponds to the estimation error of the rotor angle, which naturally is unknown to the sensorless control system.

Since the stator current is measured, the observer is fundamentally corrected by means of the current estimation error. However, due to the saliency, it is more convenient to scale the current estimation error by the stator inductance, resulting in the flux linkage error

(17)#\[\boldsymbol{e} = \psi_\mathrm{f} + L_\mathrm{d} \mathrm{Re}\{ \boldsymbol{i}_\mathrm{s}\} + \mathrm{j} L_\mathrm{q} \mathrm{Im}\{\boldsymbol{i}_\mathrm{s} \} - \hat{\boldsymbol{\psi}}_\mathrm{s}\]

where \(\hat{\boldsymbol{\psi}}_\mathrm{s}\) is the stator flux estimate. The flux linkage is estimated by

(18)#\[\frac{\mathrm{d} \hat{\boldsymbol{\psi}}_\mathrm{s}}{\mathrm{d} t} = \boldsymbol{u}_\mathrm{s} - R_\mathrm{s}\boldsymbol{i}_\mathrm{s} - \mathrm{j}\omega_\mathrm{s}\hat{\boldsymbol{\psi}}_\mathrm{s} + \boldsymbol{k}_1 \boldsymbol{e} + \boldsymbol{k}_2 \boldsymbol{e}^*\]

where \(\boldsymbol{k}_1\) and \(\boldsymbol{k}_2\) are gains (complex in a general case), the estimates are marked with the hat, and \(^*\) marks the complex conjugate.

In the sensored mode, \(\omega_\mathrm{s} = \omega_\mathrm{m}\) is used. In the sensorless mode, the speed-adaptive structure (which would correspond to the phase-locked loop if the observer were implemented in stator coordinates) can be used to estimate the rotor angle and speed, respectively, as

(19)#\[\begin{split}\frac{\mathrm{d} \hat{\omega}_\mathrm{m}}{\mathrm{d} t} &= \mathrm{Im}\{\boldsymbol{k}_\mathrm{i} \boldsymbol{e}\} \\ \frac{\mathrm{d}\hat{\vartheta}_\mathrm{m}}{\mathrm{d} t} &= \hat{\omega}_\mathrm{m} + \mathrm{Im}\{\boldsymbol{k}_\mathrm{p} \boldsymbol{e}\} = \omega_\mathrm{s}\end{split}\]

where \(\boldsymbol{k}_\mathrm{i}\) and \(\boldsymbol{k}_\mathrm{p}\) are complex gains. This observer structure is used in the motulator.drive.control.sm.Observer class.

Note

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

Gain Selection#

Sensored Case#

In the sensored case, the gain \(\boldsymbol{k}_2=0\) can be set in (18). Furthermore, \(\delta=0\) holds. Therefore, using (15) and (18), the linearized estimation error dynamics become

(20)#\[\frac{\mathrm{d} \Delta\tilde{\boldsymbol{\psi}}_\mathrm{s}}{\mathrm{d} t} = -(\boldsymbol{k}_1 + \mathrm{j}\omega_\mathrm{m0})\Delta\tilde{\boldsymbol{\psi}}_\mathrm{s}\]

where \(\tilde{\boldsymbol{\psi}}_\mathrm{s} = \boldsymbol{\psi}_\mathrm{s} - \hat{\boldsymbol{\psi}}_\mathrm{s}\) is the estimation error, \(\Delta\) marks the small-signal quantities, and the subscript 0 marks the operating-point quantities. It can be seen that the pole can be arbitrarily placed via the gain \(\boldsymbol{k}_1\). Well-damped estimation-error dynamics can be obtained simply by using a real gain, \(\boldsymbol{k}_1 = \sigma\), resulting in the pole at \(s = -\sigma - \mathrm{j}\omega_\mathrm{m0}\), where \(\sigma = 2\pi \cdot 15\) rad/s is used as the default value in motulator.drive.control.sm.Observer.

Sensorless Case#

The analysis of the sensorless case is more complicated. Here, the main results are summarized using the complex notation. The following results can be derived from the linearized form of (15)(19), see further details in [6]

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

(21)#\[\boldsymbol{k}_1 = \sigma \qquad \boldsymbol{k}_2 = \frac{\sigma\hat{\boldsymbol{\psi}}_\mathrm{a}}{\hat{\boldsymbol{\psi}}_\mathrm{a}^*}\]

where \(\sigma\) is the desired decay rate of the flux estimation error and

(22)#\[\hat{\boldsymbol{\psi}}_\mathrm{a} = \psi_\mathrm{f} + (L_\mathrm{d} - L_\mathrm{q}) \boldsymbol{i}_\mathrm{s}^*\]

allows to decouple the flux-estimation error dynamics from the rotor-position dynamics. By default, the decay rate is scheduled as

(23)#\[\sigma = \frac{R_\mathrm{s}}{4}\left(\frac{1}{L_\mathrm{d}} + \frac{1}{L_\mathrm{q}}\right) + \zeta_\infty |\hat{\omega}_\mathrm{m} |\]

where \(\zeta_\infty\) is the desired damping ratio at high speed. At zero speed, (23) places one pole at \(s = 0\) and another at \(s = -(R_\mathrm{s}/2)(1/L_\mathrm{d} + 1/L_\mathrm{q})\).

The gains of the speed adaptation in (19) are selected as

(24)#\[\boldsymbol{k}_\mathrm{i} = -\frac{\alpha_\mathrm{o}^2}{\hat{\boldsymbol{\psi}}_\mathrm{a}} \qquad \boldsymbol{k}_\mathrm{p} = -\frac{2\alpha_\mathrm{o}}{\hat{\boldsymbol{\psi}}_\mathrm{a}}\]

where \(\alpha_\mathrm{o}\) is the desired speed-estimation bandwidth. The choices (21) and (24) result in the observer characteristic polynomial \(D(s) = (s^2 + 2\sigma s + \omega_\mathrm{m0}^2)(s + \alpha_\mathrm{o})^2\). Furthermore, it can also be shown that the resulting speed-estimation error dynamics are

(25)#\[\frac{\Delta \hat{\omega}_\mathrm{m}(s)}{\Delta \omega_\mathrm{m}(s)} = \frac{\alpha_\mathrm{o}^2}{(s + \alpha_\mathrm{o})^2}\]

Note

The flux linkage \(\boldsymbol{\psi}_\mathrm{a}\) is called the auxiliary flux linkage in [6]. It is also linked to the maximum-torque-per-ampere (MTPA) condition, which can be compactly expressed as \(\mathrm{Re}\{\boldsymbol{i}_\mathrm{s}\boldsymbol{\psi}_\mathrm{a}^*\}=0\) [7].

References