Controllers#

2DOF PI Controller#

Proportional-integral (PI) control is widely used in various applications. A standard one-degree-of-freedom (1DOF) PI controller manipulates only the control error, i.e., it has single input and single output. Its two-degrees-of-freedom (2DOF) variants have two inputs (reference signal and feedback signal), which allows to design disturbance rejection and reference tracking separately [1]. The 2DOF PI controller is available in the motulator.common.control.PIController class, which is the base class for the motulator.drive.control.im.SpeedController and motulator.grid.control.DCBusVoltageController classes.

Typical Structure#

The figure below shows a 2DOF PI controller with an optional feedforward term. Its equivalent state-space form is given by

(1)#\[\begin{split}\frac{\mathrm{d} u_\mathrm{i}}{\mathrm{d} t} &= k_\mathrm{i}\left(r - y\right) \\ u &= k_\mathrm{t}r - k_\mathrm{p}y + u_\mathrm{i} + u_\mathrm{ff}\end{split}\]

where \(r\) is the reference signal, \(y\) is the measured (or estimated) feedback signal, \(u_\mathrm{i}\) is the the integral state, and \(u_\mathrm{ff}\) is the optional feedforward signal. Furthermore, \(k_\mathrm{t}\) is the reference-feedforward gain, \(k_\mathrm{p}\) is the proportional gain, and \(k_\mathrm{i}\) is the integral gain. Setting \(k_\mathrm{t} = k_\mathrm{p}\) and \(u_\mathrm{ff} = 0\) results in the standard PI controller. This 2DOF PI controller can also be understood as a state-feedback controller with integral action and reference feedforward [2].

2DOF PI controller.

2DOF PI controller with an optional feedforward term. The operator \(1/s\) refers to integration. A discrete-time variant of this controller with the integrator anti-windup is implemented in the motulator.common.control.PIController class.#

2DOF PI controller.

2DOF PI controller with an optional feedforward term. The operator \(1/s\) refers to integration. A discrete-time variant of this controller with the integrator anti-windup is implemented in the motulator.common.control.PIController class.#

Disturbance-Observer Structure#

The controller (1) can be equally represented using the disturbance-observer structure as

(2)#\[\begin{split}\frac{\mathrm{d} u_\mathrm{i}}{\mathrm{d} t} &= \alpha_\mathrm{i}\left(u - \hat v\right) \\ \hat v &= u_\mathrm{i} - (k_\mathrm{p} - k_\mathrm{t})y + u_\mathrm{ff} \\ u &= k_\mathrm{t}\left(r - y\right) + \hat v\end{split}\]

where \(\alpha_\mathrm{i} = k_\mathrm{i}/k_\mathrm{t}\) is the redefined integral gain and \(\hat v\) is the input-equivalent disturbance estimate. This structure is convenient to prevent the integral windup that originates from the actuator saturation [2]. The actuator output is limited in practice due to physical constraints. Consequently, the realized actuator output is

\[\bar{u} = \mathrm{sat}(u)\]

where \(\mathrm{sat}(\cdot)\) is the saturation function. If this saturation function is known, the anti-windup of the integrator can be implemented simply as

(3)#\[\frac{\mathrm{d} u_\mathrm{i}}{\mathrm{d} t} = \alpha_\mathrm{i}\left(\bar{u} - \hat v \right)\]

The other parts of the above controller are not affected by the saturation.

Discrete-Time Algorithm#

The discrete-time variant of the controller (2) with the anti-windup in (3) is given by

(4)#\[\begin{split}u_\mathrm{i}(k+1) &= u_\mathrm{i}(k) + T_\mathrm{s} \alpha_\mathrm{i} \left[\bar{u}(k) - \hat v(k) \right] \\ \hat v(k) &= u_\mathrm{i}(k) - (k_\mathrm{p} - k_\mathrm{t})y(k) + u_\mathrm{ff}(k) \\ u(k) &= k_\mathrm{t}\left[r(k) - y(k)\right] + \hat v(k) \\ \bar{u}(k) &= \mathrm{sat}[u(k)]\end{split}\]

where \(T_\mathrm{s}\) is the sampling period and \(k\) is the discrete-time index. This algorithm corresponds to the actual implementation in the motulator.common.control.PIController class.

Complex-Vector 2DOF PI Controller#

As shown in the figure below, the 2DOF PI controller presented above can be extended for the control of complex-valued space vectors in a coordinate system rotating at the angular speed \(\omega\) [3]. Depending on the control task, the controlled quantity is typically either a current vector or a flux linkage vector. In the continuous-time domain, the controller in the state-space form is given by

(5)#\[\begin{split}\frac{\mathrm{d} \boldsymbol{u}_\mathrm{i}}{\mathrm{d} t} &= (\boldsymbol{k}_\mathrm{i} + \mathrm{j}\omega \boldsymbol{k}_\mathrm{t})\left(\boldsymbol{r} - \boldsymbol{y}\right) \\ \boldsymbol{u} &= \boldsymbol{k}_\mathrm{t}\boldsymbol{r} - \boldsymbol{k}_\mathrm{p}\boldsymbol{y} + \boldsymbol{u}_\mathrm{i} + \boldsymbol{u}_\mathrm{ff}\end{split}\]

where \(\boldsymbol{u}\) is the output of the controller, \(\boldsymbol{r}\) is the reference signal, \(\boldsymbol{u}_\mathrm{i}\) is the the integral state, and \(\boldsymbol{u}_\mathrm{ff}\) is the optional feedforward signal. Furthermore, \(\boldsymbol{k}_\mathrm{t}\) is the reference-feedforward gain, \(\boldsymbol{k}_\mathrm{p}\) is the proportional gain, and \(\boldsymbol{k}_\mathrm{i}\) is the integral gain.

2DOF complex-vector PI controller, with feedforward.

2DOF complex-vector PI controller with an optional feedforward term.#

2DOF complex-vector PI controller, with feedforward.

2DOF complex-vector PI controller with an optional feedforward term.#

The discrete-time implementation of (5) with the anti-windup is given in the motulator.common.control.ComplexPIController class, which is the base class for motulator.drive.control.sm.CurrentController, motulator.drive.control.im.CurrentController, and motulator.grid.control.CurrentController classes. The algorithm is similar to the real-valued case given in (4).

References