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 [Skogestad and Postlethwaite, 1996]. 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#
Figure 1 shows a 2DOF PI controller with an optional feedforward term. Its equivalent state-space form is given by
where \(r\) is the reference signal, \(y\) is the measured (or estimated) feedback signal, \(\ui\) is the integral state, and \(\uff\) is the optional feedforward signal. Furthermore, \(\kt\) is the reference-feedforward gain, \(\kp\) is the proportional gain, and \(\ki\) is the integral gain. Setting \(\kt = \kp\) and \(\uff = 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 [Franklin et al., 1998].
Figure 1: 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.#
Figure 1: 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
where \(\alphai = \ki/\kt\) 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 [Franklin et al., 1998]. The actuator output is limited in practice due to physical constraints. Consequently, the realized actuator output is
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
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
where \(\Ts\) 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 Figure 2, the 2DOF PI controller presented above can be extended for the control of complex-valued space vectors in a coordinate system rotating at \(\omegac\) [del Blanco et al., 1999]. 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
where \(\mathbf{u}\) is the output of the controller, \(\mathbf{r}\) is the reference signal, \(\uI\) is the integral state, and \(\uFF\) is the optional feedforward signal. Furthermore, \(\kT\) is the reference-feedforward gain, \(\kP\) is the proportional gain, and \(\kI\) is the integral gain.
Figure 2: 2DOF complex-vector PI controller with an optional feedforward term.#
Figure 2: 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).
The converter voltage is limited by the DC-bus voltage, and the anti-windup uses the realized voltage obtained from the pulse-width modulation (PWM).
Pulse-Width Modulation#
The motulator.common.control.PWM class computes the duty ratios using space-vector PWM or the discontinuous PWM methods DPWM0, DPWM1, DPWM2, and DPWM3 [Hava et al., 1999], with different overmodulation strategies (minimum phase error, minimum magnitude error, six-step [Bolognani and Zigliotto, 1997]). Before the duty ratios are computed, the control system advances the angle of the voltage reference by \(k_\mathrm{comp} \Ts \omegac\) to compensate for the computational and PWM delays [Bae and Sul, 2003]. The factor \(k_\mathrm{comp}\) is given by the controller: \(k_\mathrm{comp} = 1.5\) corresponds to the computational delay of one sampling period and the delay of half a sampling period caused by the zero-order hold, while \(k_\mathrm{comp} = 0\) is used by the controllers whose design includes the delays.
The realized voltage is reconstructed from the duty ratios and the measured DC-bus voltage. The observers use the voltage of the ongoing sampling period, while the control laws use the average of the voltages of the previous and ongoing sampling periods. The duty-ratio error caused by the inverter nonlinearities, such as the dead time and the threshold voltages of the power devices, can be taken into account, see motulator.common.control.InverterNonlinearity. The realized voltage is then corrected for the error, which is also compensated for by feedforward.