# DC Voltage Controller

Discrete-time DC voltage PI control with feedforward zero cancellation and integral anti-windup

**Libraries:**

Simscape /
Electrical /
Control /
General Machine Control

## Description

The DC Voltage Controller block implements discrete-time PI-based DC voltage control. The block can implement zero cancellation in the feedforward path. To avoid saturation of the integral gain, the block can implement anti-windup gain.

### Equations

The equation that the DC Voltage Controller block uses to calculate the control signal is

$control=\left({K}_{p}+{K}_{i}\frac{{T}_{s}z}{z-1}\right)\left({v}_{ref}-v\right),$

where:

*control*is the control signal, which is expressed as a duty cycle or a current.*K*is the proportional gain._{p}*K*is the integral gain._{i}*T*is the sample time._{s}*v*is the reference voltage._{ref}*v*is the measured voltage.

The PI control calculation yields a zero in the closed-loop transfer function. To cancel the zero, the block uses this discrete-time zero-cancellation transfer function:

${G}_{ZC}\left(z\right)=\frac{\frac{{T}_{s}{K}_{i}}{{K}_{p}}}{z+\left(\frac{{T}_{s}-\frac{{K}_{p}}{{K}_{i}}}{\frac{{K}_{p}}{{K}_{i}}}\right)}.$

To avoid saturation of the integrator output, the block uses an anti-windup mechanism. The integrator gain is then equal to

$${K}_{i}+{K}_{aw}\left(contro{l}_{sat}-contro{l}_{unsat}\right),$$

where:

*K*is the anti-windup gain._{aw}*control*is the saturated control signal, which the block calculates as $contro{l}_{sat}=\text{min}\left(\mathrm{max}\left(contro{l}_{unsat},contro{l}_{min}\right),contro{l}_{max}\right),$_{sat}where:

*control*is the unsaturated control signal._{unsat}*control*is the lower limit for the control signal._{min}*v*is the upper limit for the control signal._{max}

## Ports

### Input

### Output

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2018a**