# Velocity Controller

Discrete-time velocity controller

• Library:
• Simscape / Power Systems / Simscape Components / 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 wref) as inputs to the block. The block then outputs a reference torque Tref to be given to an electric drive.

To prevent windup in the integrator, feed the saturated reference torque Tref_sat from the electric drive back to the velocity controller.

### Equations

You can control the rotor angular velocity with discrete sample time Ts using one of three common approaches:

• Proportional-integral (PI) control, with proportional and integral gains Kp_w and Ki_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 Kp_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 Kv is the proportional gain for a P controller.

## Ports

### Input

expand all

Desired or reference velocity, in rad/s.

Data Types: `single` | `double`

Data Types: `single` | `double`

Saturated torque reference used for integral anti-windup gain, in N*m.

Data Types: `single` | `double`

External reset signal (rising edge) for the integrator.

Data Types: `single` | `double`

### Output

expand all

Unsaturated reference torque, in N*m.

Data Types: `single` | `double`

## Parameters

expand all

Type of controller.

Proportional gain of PI or P controller.

Integral gain of PI controller.

#### Dependencies

This parameter is enabled when the is set to `PI control` or ```P-PI control```.

Proportional gain of P controller.

#### Dependencies

This parameter is enabled when the is set to `P-PI control`.

Anti-windup gain of PI controller.

#### Dependencies

This parameter is enabled when the is set to `PI control` or ```P-PI control```.

Time interval between samples. If the block is inside a triggered subsystem, inherit the sample time by setting this parameter to `-1`. If this block is in a continuous variable-step model, specify the sample time explicitly. For more information, see What Is Sample Time? (Simulink) and Specify Sample Time (Simulink).

Specify the discretization sample time when the zero-cancellation is active and simulation sample time is set to` -1`.

#### Dependencies

This parameter is enabled when:

• is set to `PI control` or `P-PI control`.

• is set to `-1`.

Enable or disable zero-cancellation on the feedforward path.

#### Dependencies

This parameter is enabled when the is set to `PI control` or ```P-PI control```.

## 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.

Get trial now