# SM Field-Oriented Control

Synchronous machine field-oriented control

• Library:
• Simscape / Electrical / Control / SM Control

• ## Description

The SM Field-Oriented Control block implements a synchronous machine (SM) field-oriented control structure. Field Oriented Control (FOC) is a performant AC motor control strategy that decouples torque and flux by transforming the stationary phase currents to a rotating frame. Use FOC when rotor speed and position are known and your application requires:

• High torque and low current at startup

• High efficiency

### Equations

The SM FOC is made up of several control blocks from the Control library. To see and modify these blocks and the FOC's internal structure, right-click the block in Simulink and select Mask > Look Under Mask. The overall control structure is made up of several parts:

• The outer loop controller converts the reference signal you supply to the reference d-axis, q-axis, and field currents.

You can choose the type of reference signal you provide using the `Control mode` parameter:

• `Velocity control` — Control or regulate the rotation speed of the synchronous machine. An internal Velocity Controller block generates a reference torque from the rotor speed error.

• `Torque control` — Control or regulate the mechanical torque of the SM.

An internal SM Current Reference Generator block generates the reference currents using a proportional-integral (PI) controller, minimizing the torque error.

• The inner loop controller converts the current references into voltage references. An internal SM Current Controller generates the voltage references using a PI controller minimizing the current error, and the feedforward terms:

`$\begin{array}{l}{v}_{d_FF}=-{\omega }_{e}{L}_{q}{{}_{i}}_{q}\\ {v}_{q_FF}={\omega }_{e}\left({L}_{d}{i}_{d}+{L}_{mf}{i}_{f}\right)\\ {v}_{f_FF}=0\end{array}$`

where:

• ωe is the rotor electrical angular velocity.

• Ld and Lq are the d- and q-axis stator inductances.

• Lmf is the mutual field armature inductance.

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

• The PWM Generator converts the reference stator voltages into gate pulses to be passed to a Power Converter that is powering the stator windings of the synchronous machine.

• The Excitation PWM Generator converts the reference field voltage into gate pulses to be passed to a DC-DC Chopper powering the SM field winding.

This diagram shows the overall architecture of the block. In the diagram:

• ω and ωref are the measured and reference angular velocities, respectively.

• Tref is the reference electromagnetic torque. If you configure the block for speed control, a Velocity Controller generates this reference torque.

• i and v are stator currents and voltages. Subscripts d, q, and f, represent the d-axis, q-axis, and field winding. Subscripts a, b, and c, represent the three stator windings.

• θe is the rotor electrical angle.

• G is a gate pulse, subscripts H and L represent high and low, and subscripts a, b, and c, represent the three stator windings. Subscript ex represents the field excitation pulses.

You can choose to implement either velocity or torque control with the `Control mode` parameter. The block implements velocity control exactly as shown in the diagram. The block implements torque control by removing the Velocity Controller block and accepting the reference torque directly.

### Assumptions

The machine parameters are known.

### Limitations

The control structure is implemented with a single sample rate.

## Ports

### Input

expand all

System reference specified as torque reference in N*m or velocity reference in rad/s, depending on the control mode selected.

Data Types: `single` | `double`

Measured stator phase currents, in A.

Data Types: `single` | `double`

Measured rotor field current, in A.

Data Types: `single` | `double`

Measured mechanical angular velocity of rotor, in rad/s.

Data Types: `single` | `double`

Measured mechanical angle of rotor, in rad.

Data Types: `single` | `double`

Data Types: `single` | `double`

### Output

expand all

Six pulse waveforms that determine switching behavior in the attached power converter.

Data Types: `single` | `double`

Waveforms that determine switching behavior in the attached excitation chopper. The size of the waveform depends on the selected chopper type. To specify the chopper type, use the Chopper type parameter:

• ```First and fourth quadrant chopper``` — The output waveform has two pulses.

• `Four-quadrant chopper` — The output waveform has four pulses.

Data Types: `single` | `double`

Bus containing signals for visualization, including:

• `Reference`

• `wElectrical`

• `iabc`

• `theta`

• `Vdc`

• `PwmEnable`

• `TqRef`

• `TqLim`

• `idqRef`

• `idqf`

• `vdqRef`

• `modWave`

• `DCexcit`

Data Types: `single` | `double`

## Parameters

expand all

### General

Specify either a torque control or velocity control strategy.

Nominal DC-link voltage of the electrical source.

Maximum machine power.

Maximum machine torque.

Maximum current in the field winding.

Voltage threshold to activate the power inverter.

Number of pole pairs on the rotor.

Fundamental sample time for the block.

### Outer Loop

Specify the type of the control strategy.

Proportional gain of the PI controller.

Integral gain of the PI controller.

Proportional gain of P controller.

Anti-windup gain of the PI controller.

Select the current reference strategy.

Speed vector used in the lookup tables for determining current references.

Torque vector used in the lookup tables for determining current references.

DC-link voltage vector used in the lookup tables for determining current references.

Direct-axis current reference lookup data.

Field current reference lookup data.

Synchronous machine torque constant. This value is numerically equivalent to the back EMF constant expressed in `V/(rad/s)`.

### Inner Loop

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

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

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

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

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

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

Proportional gain of the PI controller used for field current control.

Integral gain of the PI controller used for field current control.

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

Prioritize or maintain ratio between d- and q-axis when the block limits voltage.

Enable or disable zero cancellation on the feedforward path.

Enable or disable pre-control voltage.

Specify how to parameterize the machine.

• `Constant parameters` — Specify machine parameters that are constant throughout the simulation.

• `Lookup table based parameters` — Specify machine parameters as lookup tables that depend on current.

#### Dependencies

Enabled when the Enable pre-control voltage parameter is selected.

Direct-axis inductance for feedforward pre-control.

#### Dependencies

Enabled when the Machine parameters parameter is set to `Constant parameters`.

#### Dependencies

Enabled when the Machine parameters parameter is set to `Constant parameters`.

Mutual inductance between the field and armature windings.

#### Dependencies

Enabled when the Machine parameters parameter is set to `Constant parameters`.

Direct-axis current vector used in the lookup tables for parameters determination.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

Quadrature-axis current vector used in the lookup tables for parameters determination.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

Field current vector used in the lookup tables for parameters determination.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

Ld matrix used as lookup table data.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

Lq matrix used as lookup table data.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

Lmf matrix used as lookup table data.

#### Dependencies

Enabled when the Machine parameters parameter is set to ```Lookup table based parameters```.

### PWM

Specify the waveform technique.

Specify whether the block samples the modulation waveform when the waves intersect or when the carrier wave is at one or both of its boundary conditions.

Specify the rate at which you want the switches in the power converter to switch.

Specify DC-DC chopper type.

Specify PWM switching frequency for excitation system.

 Märgner, M., and W. Hackmann. "Control challenges of an externally excited synchronous machine in an automotive traction drive application." In Emobility-Electrical Power Train. (2010): 1–6.

 Carpiuc, S., C. Lazar, and D. Patrascu. "Optimal Torque Control of the Externally Excited Synchronous Machine." Journal of Control Engineering and Applied Informatics. 14, no 2 (2012): 80–88.