Observers#
Observers estimate the internal state of electrical machines. We first present a generic rotor speed observer used in both induction and synchronous machine drives (both sensored and sensorless). Then, we describe the flux observer designs for induction and synchronous machines. These designs cover both sensored and sensorless drives and account for magnetic saturation.
Speed Observer#
The rotor speed observer described below is available in the motulator.drive.control.im.SpeedObserver and motulator.drive.control.sm.SpeedObserver classes for induction machines and synchronous machines, respectively.
The rotor speed can be estimated (or filtered in sensored drives) using a disturbance observer structure [Franklin et al., 1997]. The starting point is the mechanical model [see (1) in Mechanics], in which the load torque is considered as a quasi-constant disturbance. The resulting speed observer is
where \(\hatomegaM\) is the estimated (or filtered in sensored drives) speed, \(\hattauM\) is the electromagnetic torque estimate, \(\hattauL\) is the load torque estimate, and \(\koomega\) and \(\kotau\) are the observer gains. The error signal \(\varepsilon\) depends on the machine type and on whether the drive is sensored or sensorless, as described below. In induction machines, it is based on the speed estimation error; in synchronous machines, it is based on the position estimation error.
As a special case, setting \(\hat{J} = \infty\) and \(\kotau = 0\) yields the commonly used reduced-order estimator [Harnefors, 2001]
which corresponds to a first-order low-pass filter of the true speed. The full-order observer (1) uses the mechanical model to avoid the lag inherent in such filtering. Clearly, the inertia estimate \(\hat{J}\) can be safely overestimated.
The observer structure (1) was originally proposed for sensored servo drives [Lorenz and Van Patten, 1991] and for signal-injection methods [Kim et al., 2003]. We use it also in model-based sensorless control, where the error signal comes from the flux observer instead of a measured speed or position.
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
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 (3), the observer is formulated as
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
where \(\hatomegam = \np\hatomegaM\) represents the filtered rotor speed in sensored drives and estimated rotor speed in sensorless drives. 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 (5) is integrated, i.e., the noise is not amplified. The torque estimate is given by
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, but 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 (4) has the same degrees of freedom.
Gain Analysis and Selection#
The estimation-error dynamics are obtained by subtracting (4) from (3). The resulting system is linearized for analysis and gain selection purposes. Assuming accurate parameter estimates, linearized estimation-error dynamics are [Hinkkanen et al., 2010]
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
Notice that the rotor flux estimation error is \(\Delta\tildepsiR = \Delta\tildepsis\).
Sensored Drives#
In sensored drives, \(\Delta\tildeomegam\) decoupled from the flux estimation. Consequently, this external disturbance can be omitted in the analysis, \(\Delta\tildeomegam = 0\). Thus, the gain \(\kob = 0\) can be used. Under these assumptions, the estimation-error dynamics (7) reduce to [Verghese and Sanders, 1988]
The closed-loop pole can be arbitrarily placed via the gain \(\koa\). The default gains for sensored drives are
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]
With this choice, the linearized estimation-error dynamics in (7) become
where the gain components correspond to \(\koa = \kd + \jj \kq\). The attenuation \(\sigma\) can be assigned by choosing
which 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.
Figure 1: Example pole placement of the sensorless observer.#
Figure 1: Example pole placement of the sensorless observer.#
Speed and Flux Observer#
To estimate the rotor speed, the flux observer (4) is extended with the speed observer (1) in the motulator.drive.control.im.SpeedFluxObserver class. The error signal is different in sensored and sensorless drives, as described below.
Sensored Drives#
In sensored drives, the error signal for the mechanical rotor speed is
where \(\omegaMmeas\) is the measured speed and \(\hatomegaM\) is the filtered speed. The measured speed \(\omegaMmeas\) may contain a significant amount of noise (such as quantization noise from incremental encoders), which is filtered by the speed observer.
Sensorless Drives#
In sensorless drives, the estimation error of the mechanical rotor speed is obtained from the flux observer (4) and (5) as
The reduced-order speed observer (2) with the error signal (15) is essentially the same as the conventional slip-relation-based estimator with the first-order low-pass filter, see [Hinkkanen et al., 2010].
Gain Analysis and Selection#
The flux observer gain (11) decouples the rotor speed estimation from the flux estimation. Therefore, the speed estimation dynamics can be analyzed separately. Assuming an ideal measurement (\(\omegaMmeas = \omegaM\)) in the sensored case, the estimation dynamics are identical for both sensored and sensorless drives.
For the observer (1), the linearized estimation dynamics are
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.
As a special case of (1), setting \(\hat{J} = \infty\) and \(\kotau = 0\) yields (2). This reduced-order estimator gives the first-order estimation dynamics
The gain \(\koomega = \alphao\) determines the speed-estimation bandwidth.
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
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
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 (18), a nonlinear state observer is formulated as
where \(\us'\) is the realized voltage estimate obtained from the PWM algorithm, \(\omegac\) is the angular speed of the coordinate system, and \(\koa\), \(\kob\), and \(\kotheta\) are observer gains. Furthermore, \(\hatomegam = \np \hatomegaM\) is the estimated rotor speed (in electrical rad/s) and \(\varepsilon\) is the rotor position estimation error (in mechanical rad). The flux estimation error is
where \(\hatpsisfcn\) is the flux map estimate. In sensored drives, the estimation error signal is
where \(\thetaMmeas\) is the measured mechanical angular position. In sensorless drives, the estimation error signal of the mechanical rotor position is obtained from (20) and (21) as [Hinkkanen et al., 2018]
The mechanical position is used in these signals for compatibility with the generic speed observer (1). The torque estimate is given by
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 (20) has the same degrees of freedom.
Gain Analysis and Selection#
The analysis resembles that of induction machines, see Gain Analysis and Selection. The following results can be derived from the linearized form of (18) – (24), see details in [Hinkkanen et al., 2018].
Sensored Drives#
In sensored case, the rotor position estimation error is decoupled from the flux estimation, i.e., it acts as an external disturbance in the flux estimation. Therefore, the gain \(\kob = 0\) can be selected. Using (18) and (20), the linearized estimation-error dynamics become
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#
To decouple the flux estimation from the rotor angle, the gains of (20) have to be of the form [Hinkkanen et al., 2018]
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
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 and Flux Observer#
To estimate the rotor speed and position, the flux observer (20) is extended with the speed observer (1) in the motulator.drive.control.sm.SpeedFluxObserver class. The error signals are defined above in (22) and (23) for sensored and sensorless drives, respectively.
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. Assuming an ideal measurement (\(\thetaMmeas = \thetaM\)) in the sensored case, the estimation dynamics are identical for both sensored and sensorless drives.
For the observer (1), the linearized estimation dynamics are
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}\).
As a special case of (1), setting \(\hat{J} = \infty\) and \(\kotau = 0\) yields (2). This reduced-order estimator gives the second-order estimation dynamics
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].