# Velocity Controller

Discrete-time velocity controller

**Libraries:**

Simscape /
Electrical /
Control /
General Machine Control

## Description

The Velocity Controller block implements a velocity controller in discrete-time.

You provide measured and reference rotor velocities (*w* and
*w _{ref}*) as inputs to the block. The
block then outputs a reference torque

*T*for an electric drive.

_{ref}To prevent windup in the integrator, feed the saturated reference
torque *T _{ref_sat}* from the electric drive back
to the velocity controller.

### Equations

You can control the rotor angular velocity with discrete sample time
*T _{s}* using one of three common approaches:

Proportional-integral (PI) control, with proportional and integral gains

*K*and_{p_w}*K*:_{i_w}${T}_{ref}=\left({K}_{p\_w}+{K}_{i\_w}\frac{{T}_{s}z}{z-1}\right)\left({w}_{ref}-w\right)$

Proportional (P) control, with proportional gain

*K*:_{p_w}${T}_{ref}={K}_{p\_w}\left({w}_{ref}-w\right)$

P-PI control characterized by a double velocity feedback loop as shown in the following figure:

Here, the PI Controller block is structured as in the PI control strategy, and

*K*is the proportional gain for a P controller._{v}

**Zero Cancellation**

Using PI control results in a zero in the closed-loop transfer function, which can result in undesired overshoot in the closed-loop response. This zero can be canceled by introducing a zero-cancelation block in the feedforward path. The zero cancellation transfer function in discrete time is

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

## Examples

## Ports

### Input

### Output

## Parameters

## References

[1] Naouar, M. W., A. A. Naassani, E. Monmasson, and I. Slama-Belkhodja.
"FPGA-based predictive current controller for synchronous machine speed drive."
*IEEE Transactions on Power Electronics.* Vol. 23, Number 4,
2008, pp. 2115–2126.

## Extended Capabilities

## Version History

**Introduced in R2017b**