# SRM Current Controller with PWM Generation

Current controller with internal pulse width modulation for switched reluctance machines

• Library:
• Simscape / Electrical / Control / SRM Control

• ## Description

The SRM Current Controller with PWM Generation block performs discrete-time proportional-integral (PI) current control for the Switched Reluctance Machine (SRM) block. The block includes pulse width modulation (PWM).

### PWM Generation Model

The figure shows the converter structure for an SRM. As the figure shows, the PWM generation signal is for high side switching devices. When the control signal is greater than the carrier counter value, the PWM generator outputs 1. Otherwise, it outputs 0.

### Equations

To determine the duty cycle, the block implements PI current control in the rotor reference frame in accordance with this equation.

`$D=\left({K}_{p}+{K}_{i}\frac{{T}_{s}z}{z-1}\right)\left({I}_{s_ref}-{I}_{s}\right)$`

Where:

• D is the duty cycle.

• Kp is the proportional gain.

• Ki is the integral gain.

• Ts is the sample time.

• Is_ref is the reference current.

• Is is the measured current.

To obtain control signals for the three-phases, the block then multiplies the duty cycle with the commutation signals. The resulting three control signals are normalized over the interval [0, 1].

## Ports

### Input

expand all

Reference current for control.

Data Types: `single` | `double`

Actual current.

Data Types: `single` | `double`

External reset signal (rising edge) for the integrator.

Data Types: `Boolean`

Rotor angle in the interval [0, β ].

Data Types: `single` | `double`

Angle for switching on the phase supply.

Data Types: `single` | `double`

Angle for switching on the phase supply.

Data Types: `single` | `double`

### Output

expand all

Pulse waveforms that determine switching behavior.

Data Types: `single` | `double`

## Parameters

expand all

### Control Parameters

Proportional gain, Kp, of the controller.

Integral gain, Ki, of the controller.

Anti-windup gain, Kaw, of the controller.

Time, in s, between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.

If this 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 using a positive scalar.

### PWM Generator

Use the carrier counter strategy to change the initial behavior of the PWM output:

• Up counter — PWM output begins at the start of the on state.

• Down counter — PWM output begins at the start of the off state.

• Up-down counter — PWM output begins in the middle of the on state.

Pulse width modulation timer period, Tper, in seconds.

Time, in s, between consecutive PWM generator executions. During execution, the block produces PWM output and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.

To ensure adequate resolution in the generated PWM signal, set the fundamental sample time so that $0<{T}_{s\text{_}pwm}\le 10{T}_{per}$, where:

• Ts_pwm is the Fundamental sample time (s).

• Tper is the Timer period (s).

 Saha, N. and S. Panda. "Speed control with torque ripple reduction of switched reluctance motor by Hybrid Many Optimizing Liaison Gravitational Search technique." Engineering Science and Technology. Vol 20 (2017): 909–921.