Main Content

SM Current Controller

Discrete-time synchronous machine current PI controller

  • SM Current Controller block

Libraries:
Simscape / Electrical / Control / SM Control

Description

The SM Current Controller block implements a discrete time PI-based synchronous machine (SM) current controller in the rotor d-q reference frame.

Defining Equations

The block is discretized using the backward Euler method due to its first-order simplicity and its stability.

Three PI current controllers implemented in the rotor reference frame produce the reference voltage vector:

vdref=(Kp_id+Ki_idTszz1)(idrefid)+vd_FF,

vqref=(Kp_iq+Ki_iqTszz1)(iqrefiq)+vq_FF,

and

vfref=(Kp_if+Ki_ifTszz1)(ifrefif),

where:

  • vdref, vqref, and vfref are the d-axis, q-axis, and field reference voltages, respectively.

  • idref, vqref, and ifref are the d-axis, q-axis, and field reference currents, respectively.

  • id, iq, and if are the d-axis, q-axis, and field currents, respectively.

  • Kp_id, Kp_iq, and Kp_if are the proportional gains for the d-axis, q-axis and field controllers, respectively.

  • Ki_id, Ki_iq, and Ki_if are the integral gains for the d-axis, q-axis and field controllers, respectively.

  • vd_FF, and vq_FF are the feedforward voltages for the d-axis and q-axis, respectively, obtained from the machine mathematical equations and provided as inputs.

  • Ts, is the sample time of the discrete controller.

Using PI control results in a zero in the closed-loop transfer function which can be canceled by introducing a zero-cancelation block in the feedforward path. The zero cancellation transfer functions in discrete time are:

GZC_id(z)=TsKi_idKp_idz+(TsKp_idKi_idKp_idKi_id),

GZC_iq(z)=TsKi_iqKp_iqz+(TsKp_iqKi_iqKp_iqKi_iq),

and

GZC_if(z)=TsKi_ifKp_ifz+(TsKp_ifKi_ifKp_ifKi_if).

Saturation must be imposed when the stator voltage vector exceeds the voltage phase limit Vph_max:

vd2+vq2Vph_max,

where vd, and vq are the d-axis and q-axis voltages, respectively.

In the case of axis prioritization, the voltages v1 and v2 are introduced, where:

  • v1 = vd and v2 = vq for d-axis prioritization.

  • v1 = vq and v2 = vd for q-axis prioritization.

The constrained (saturated) voltages v1sat and v2sat are obtained as follows:

v1sat=min(max(v1unsat,Vph_max),Vph_max),

and

v2sat=min(max(v2unsat,V2_max),V2_max),

where:

  • v1unsat and v2unsat are the unconstrained (unsaturated) voltages.

  • v2_max is the maximum value of v2 that does not exceed the voltage phase limit, given by v2_max=(Vph_max)2(v1sat)2.

In the case that the direct and quadrature axes have the same priority (d-q equivalence) the constrained voltages are obtained as follows:

vdsat=min(max(vdunsat,Vd_max),Vd_max),

and

vqsat=min(max(vqunsat,Vq_max),Vq_max),

where

Vd_max=Vph_max|vdunsat|(vdunsat)2+(vqunsat)2,

and

Vq_max=Vph_max|vqunsat|(vdunsat)2+(vqunsat)2.

The constrained (saturated) field voltage vfsat is limited according to the maximum admissible value:

vfsat=min(max(vfunsat,Vf_max),Vf_max),

where:

  • vfunsat is the unconstrained (unsaturated) field voltage.

  • Vf_max is the maximum allowable field voltage.

An anti-windup mechanism is employed to avoid saturation of integrator output. In such a situation, the integrator gains become:

Ki_id+Kaw_id(vdsatvdunsat),

Ki_iq+Kaw_iq(vqsatvqunsat),

and

Ki_if+Kaw_if(vfsatvfunsat),

where Kaw_id, Kaw_iq, and Kaw_if are the anti-windup gains for the d-axis, q-axis and field controllers, respectively.

Assumptions

  • The plant model for direct and quadrature axis can be approximated with a first order system.

  • This control solution is used only for synchronous motors with sinusoidal flux distribution and field windings.

Examples

Ports

Input

expand all

Reference d-q and field currents for control of synchronous motor.

Data Types: single | double

Actual d-q and field axis currents of controlled synchronous motor.

Data Types: single | double

Feedforward pre-control voltages.

Data Types: single | double

Maximum allowable voltage in each phase.

Data Types: single | double

Maximum allowable field voltage.

Data Types: single | double

External reset signal (rising edge) for integrators.

Data Types: single | double

Output

expand all

Reference d-q and field voltages for control of synchronous motor.

Data Types: single | double

Parameters

expand all

General

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.

Specify the discretization sample time when zero-cancellation is active and sample time is set to -1 (e.g., when the block is used inside a triggered subsystem).

Prioritize or maintain ratio between d and q axes when block limits voltage.

Enable or disable zero-cancellation on the feedforward path.

Enable or disable pre-control voltage.

d-q Control

Proportional gain of PI controller used for direct-axis current control.

Integrator gain of PI controller used for direct-axis current control.

Anti-windup gain of PI controller used for direct-axis current control.

Proportional gain of PI controller used for quadrature-axis current control.

Integrator gain of PI controller used for quadrature-axis current control.

Anti-windup gain of PI controller used for quadrature-axis current control.

Field Control

Proportional gain of PI controller used for field current control.

Integrator gain of PI controller used for field current control.

Anti-windup gain of PI controller used for field current control.

References

[1] Märgner, M., and W. Hackmann. "Control challenges of an externally excited synchronous machine in an automotive traction drive application." Emobility-Electrical Power Train, 2006, pp. 1-6.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2017b