Main Content

Field-Oriented Current Controller

Implement current control for three-phase motors using field-oriented control (FOC) technique

Since R2023b

Libraries:
Motor Control Blockset / Controls / Controllers

Description

The Field-Oriented Current Controller block implements current control for a three-phase permanent magnet synchronous motor (PMSM) or an AC induction motor (ACIM) using the FOC algorithm. You can input the reference d- and q-axis currents, measured stator phase a and b currents, motor electrical position, as well as PI controller parameters to compute three phase voltages that drive the motor.

The block uses Clarke and Park transformations to compute actual d- and q-axis currents from the measured phase currents and motor electrical position. It uses the PI Controller blocks to implement d- and q-axis current controllers. The current controller loop uses the reference and actual d- and q- axis currents to generate reference voltages that drive the motor. For more information about the FOC algorithm implemented by the block, see Field-Oriented Control (FOC).

The block supports SI and per-unit inputs, however, units of all block inputs should be identical.

Examples

Ports

Input

expand all

Reference motor currents along the d- and q-axis of the rotating d-q reference frame.

IdqRef = [IdRef, IqRef]

Data Types: single | double | fixed point

Measured phase a and phase b currents of the motor.

IabMeas = [IaMeas, IbMeas]

Data Types: single | double | fixed point

Electrical position of the motor.

Data Types: single | double | fixed point

Saturation limit of the d- and q-axis reference voltages generated by the internal PI controllers. This value depends on the DC bus voltage (Vdc) and the selected PWM method. Generally, this value is equal to Vdc/2 (for SPWM) and Vdc/sqrt(3) (for SVM). For more information about the PWM techniques, see PWM Reference Generator.

Data Types: single | double | fixed point

Gains of the d-axis and q-axis PI controllers (Kp and Ki, respectively) multiplexed with the block sample time (Ts).

Kp,Ki*Ts = [Kp(d-axis), Ki*Ts(d-axis), Kp(d-axis), Ki*Ts(d-axis)]

Data Types: single | double | fixed point

Initial values of the internal PI controller integrators multiplexed with their limits.

PIConfig = [Upper saturation limit of PI controller integrators, Lower saturation limit of PI controller integrators, Initial value of d-axis PI controller integrator, Initial value of q-axis PI controller integrator]

Data Types: single | double | fixed point

Signal that resets the PI controllers used in the block:

  • 1 — Reset internal PI controllers.

  • 0 — No action.

Data Types: single | double | fixed point

Output

expand all

Stator phase a, b, and c voltages that drive the motor.

Data Types: single | double | fixed point

The internally computed multiplexed signals that the block captures for debugging purposes. The multiplexed signal consists of these elements:

  • Idq — The actual d- and q-axis motor currents computed from the motor phase currents.

  • Vdq — The d- and q-axis motor voltages computed by the internal d- and q-axis current PI controllers.

  • Vαβ — The α- and β-axis voltages that the block computes internally using inverse Park transformation of Vdq.

  • Iαβ — The α- and β-axis currents that the block computes internally using Clarke transformation of the IabMeas input.

Data Types: single | double | fixed point

Parameters

expand all

Unit of the motor electrical position input θe.

Size of the lookup table array used by the internal sine-cosine lookup algorithm that computes the sine and cosine of the motor electrical position. This parameter accepts a value in the range [125, 4095].

Align either the d- or q-axis of the rotating reference frame to the α-axis of the stationary reference frame.

Set the saturation method to one of these:

  • D-Q equivalence

  • Prioritize D axis

  • Prioritize Q axis

Pulse-width modulation technique for the three-phase voltage that the block outputs, specified as one of these:

  • SVM: space vector modulation

  • SPWM: sinusoidal PWM

Extended Capabilities

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

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced in R2023b