Disturbance-Observer-Based Grid-Forming Control#

In these notes, disturbance-observer-based grid-forming control is discussed [Nurminen et al., 2024]. This control method is available in the motulator.grid.control.ObserverBasedGridFormingController class. As can be realized by comparing examples 12.5-kVA, RFPSC-GFM and 12.5-kVA, DO-GFM, the observer-based grid-forming control can be configured to behave practically identically with reference-feedforward power-synchronization control (PSC) [Harnefors et al., 2020]. Compared to reference-feedforward PSC, disturbance-observer-based grid-forming control is easier to analyze and extend with different operating modes (including grid-following and transparent current-control modes). The order of these two control methods is the same and their computational complexity is comparable.

System Model#

First, the system is modeled in general coordinates, whose angle with respect to the stationary coordinates is \(\thetac\) and the angular speed is \(\omegac = \D\thetac/\D t\). The dynamics of the inductor current \(\ic\) and the grid voltage \(\ug\) are modeled as

(1)#\[\begin{split}L\frac{\D \ic}{\D t} &= \uc - \ug - \jj\omegac L \ic \\ \frac{\D\ug}{\D t} &= \jj(\omegag - \omegac)\ug\end{split}\]

where \(L\) is the inductance and \(\omegag\) is the grid angular frequency. The grid voltage \(\ug\) is modeled as a disturbance; this same disturbance model for the grid voltage is also used in the development of Phase-Locked Loop. The active power fed to the grid is nonlinear in the state variables

(2)#\[\pg = \frac{3}{2}\RE\{\ug\ic^*\}\]

For the purpose of grid-forming control, we may define the quasi-static converter voltage as an output variable as a function of the state variables,

(3)#\[\vc = \ug + \jj\omegag L \ic\]

This voltage is controllable (unlike the grid voltage which is the disturbance) and it equals the converter output voltage \(\uc\) in the steady state. The disturbance-observer-based PSC regulates the voltage magnitude \(|\vc|\) and the power \(p_\mathrm{g}\) fed to grid.

Control System#

The control system consists of a disturbance observer and a control law, see Figure 1. The disturbance observer estimates the quasi-static converter voltage and the power fed to the grid. The control law generates the converter voltage reference based on the estimated grid voltage and power. The disturbance observer also provides the integral action for the control law. This control structure allows seamless switching between grid-forming and grid-following modes [Nurminen et al., 2024]. For simplicity, only the grid-forming mode is considered in the following.

Disturbance-observer-based grid-forming control

Figure 1: Disturbance-observer-based grid-forming control. The observer transforms the measured converter current \(\ics\) into the controller coordinates, rotating at the nominal grid angular frequency, and estimates the quasi-static converter voltage \(\hatvc\) and the power \(\hatpg\). The observer uses the realized voltage obtained from the PWM, taking into account the voltage limitation and the computational delay. The control law also uses the converter current for the transparent current limitation.#

Disturbance-observer-based grid-forming control

Figure 1: Disturbance-observer-based grid-forming control. The observer transforms the measured converter current \(\ics\) into the controller coordinates, rotating at the nominal grid angular frequency, and estimates the quasi-static converter voltage \(\hatvc\) and the power \(\hatpg\). The observer uses the realized voltage obtained from the PWM, taking into account the voltage limitation and the computational delay. The control law also uses the converter current for the transparent current limitation.#

Disturbance Observer#

Based on (1)–(3), a disturbance observer for the grid voltage can be formed [Franklin et al., 1997, Kukkola et al., 2021, Nurminen et al., 2024]

(4)#\[\begin{split}\frac{\D \hatug}{\D t} &= \jj (\hatomegag - \omegac)\hatug + \alphao\left(\uc - \hat L \frac{\D \ic}{\D t} - \jj \omegac \hat L \ic - \hatug \right) \\ \hatvc &= \hatug + \jj\hatomegag \hat L \ic \\ \hatpg &= \frac{3}{2}\RE\{\hatvc\ic^*\}\end{split}\]

where \(\hatomegag\) is the nominal grid angular frequency and estimates are marked with hat.

Note

A conventional phase-locked loop (PLL) can be expressed in the same disturbance observer framework, see the Phase-Locked Loop notes. It can be realized that the measured grid voltage \(\ug\) used in the conventional PLL is replaced by its converter-voltage-based estimate \(\uc - \hat L (\D \ic/\D t) - \jj \omegac \hat L \ic\) in the disturbance observer (4).

Control Law#

A nonlinear state feedback law is used

(5)#\[\ucref = \hatvc + \kP (\pgref - \hatpg) + \kV (\vcref - \hatabsvc)\]

where \(\pgref\) is the active power reference, \(\vcref\) is the converter voltage magnitude reference, and \(\hatabsvc = |\hatvc|\) is the magnitude. The complex gains for the active-power and converter-voltage-magnitude channels, respectively, are selected as

(6)#\[\kP = \frac{R_\mathrm{a}}{v_\mathrm{c,ref}} \frac{\hatvc}{\hatabsvc} \qquad \kV = (1 - \jj k_\mathrm{v}) \frac{\hatvc}{\hatabsvc}\]

where the gains \(R_\mathrm{a} = 0.2\) p.u. and \(k_\mathrm{v} = \alphao/\omegag\) can be used.

Implementation Aspects#

To avoid the derivate on the right-hand side of (4), a new state variable \(\hatug' = \hatug + \alphao \hat L \ic\) can be introduced [Franklin et al., 1997]. Furthermore, the coordinate system for the implementation can be chosen freely. The simplest choice is to use the nominal grid frequency as the coordinate system frequency, \(\omegac = \hatomegag\). Using these design choices, the whole control system consisting of the disturbance observer (4) and the control law (5) in the state-space form reduces to [Nurminen et al., 2024]

(7)#\[\begin{split}\frac{\D \hatug'}{\D t} &= \alphao (\ucref - \hatvc) \\ \hatvc &= \hatug' - (\alphao - \jj\hatomegag) \hat L \ic \\ \hatpg &= \frac{3}{2}\RE\{\hatvc\ic^*\} \\ \ucref &= \hatvc + \kP (\pgref - \hatpg) + \kV (\vcref - \hatabsvc)\end{split}\]

where the gains can be selected according to (6) and the converter voltage appearing in the observer has been replaced with its reference. Various control modes could be easily incorporated into the control system (7), simply by changing the feedback correction terms of the control law [Nurminen et al., 2024]. The switching between the modes is seamless since the control law does not have memory, but the integral action is provided by the disturbance observer (in addition to synchronization).

The control system implemented in the motulator.grid.control.ObserverBasedGridFormingController class corresponds to (7). In the example implementation, a transparent current-control mode is implemented. In the grid-forming mode, the observer bandwidth \(\alphao = 1\) p.u. can be used. Furthermore, the inductance estimate can be set close to the lowest expected inductance value, e.g., \(\hat L = 0.15\) p.u. Using this configuration, the robust performance from strong grids to very weak grids can be achieved. This grid-forming control method can also be used with LCL filters, similarly to reference-feedforward PSC.

Active-Power Reference Limitation#

The transparent current controller limits the converter current, but it does not guarantee that the active-power reference is realizable. For example, during a grid-voltage sag in a weak grid, the power that can be transferred to the grid may drop below the reference. Then, no equilibrium exists and the converter loses synchronism. To avoid this, the active-power reference can be limited to a realizable level, prioritizing the reactive current [Määttä et al., 2026]. In balanced conditions, the maximum allowable active power is

(8)#\[\begin{split}i_\mathrm{q} &= \frac{\IM\{\ucref\ic^*\}}{|\ucref|} \\ i_\mathrm{d,lim}^2 &= i_\mathrm{d,max}^2 - i_\mathrm{q}^2 \\ p_\mathrm{max} &= \frac{\alpha_\mathrm{l}}{s + \alpha_\mathrm{l}} \frac{3}{2} |\ucref| \sqrt{\min\left[\max\left(i_\mathrm{d,lim}^2,\, 0\right),\, i_\mathrm{d,max}^2\right]}\end{split}\]

where \(i_\mathrm{d,max}\) is the maximum active current and \(\alpha_\mathrm{l}\) is the power-limitation bandwidth. The limited active-power reference is \(\bar p_\mathrm{g}^\mathrm{ref} = \mathrm{sign}(\pgref) \min(|\pgref|, p_\mathrm{max})\). The maximum active current should be chosen somewhat below the current limit \(i_\mathrm{max}\), e.g., \(i_\mathrm{d,max} = 1.1\) p.u. when \(i_\mathrm{max} = 1.3\) p.u. [Määttä et al., 2026]. This limitation is enabled in the motulator.grid.control.ObserverBasedGridFormingController class by setting the parameter i_d_max. Its effect is demonstrated in the example 12.5-kVA, DO-GFM, grid-voltage sag.