# MTPA Control Reference

Compute reference currents for Maximum Torque Per Ampere (MTPA) and field-weakening operation

• Library:
• Motor Control Blockset / Controls / Control Reference

## Description

The MTPA Control Reference block computes the d-axis and q-axis reference current values for maximum torque per ampere (MTPA) and field-weakening operations. The computed reference current values results in efficient output for the permanent magnet synchronous motor (PMSM).

The block accepts the reference torque and feedback mechanical speed and outputs the corresponding d- and q-axes reference current values for MTPA and field-weakening operations.

The block computes the reference current values by solving mathematical relationships. The calculations use SI unit system. When working with the Per-Unit (PU) system, the block converts PU input signals to SI units to perform computations, and converts them back to PU values at the output.

These equations describe the computation of reference d-axis and q-axis current values by the block:

### Mathematical Model of PMSM

These model equations describe dynamics of PMSM in the rotor flux reference frame:

`${\lambda }_{q}={L}_{q}{i}_{q}$`

where:

• ${v}_{d}$ is the d-axis voltage (Volts).

• ${v}_{q}$ is the q-axis voltage (Volts).

• ${i}_{d}$ is the d-axis current (Amperes).

• ${i}_{q}$ is the q-axis current (Amperes).

• ${R}_{s}$ is the stator phase winding resistance (Ohms).

• ${\lambda }_{pm}$ is the permanent magnet flux linkage (Weber).

• ${\lambda }_{d}$ is the d-axis flux linkage (Weber).

• ${\lambda }_{q}$ is the q-axis flux linkage (Weber).

• ${\omega }_{e}$ is the electrical speed corresponding to frequency of stator voltages (Radians/ sec).

• ${\omega }_{m}$ is the rotor mechanical speed (Radians/ sec).

• ${L}_{d}$ is the d-axis winding inductance (Henry).

• ${L}_{q}$ is the q-axis winding inductance (Henry).

• ${T}_{e}$ is the electromechanical torque produced by the PMSM (Nm).

• ${T}_{L}$ is the load torque (Nm).

• $p$ is the number of motor pole pairs.

• $J$ is the inertia coefficient (kg-m2).

• $B$ is the friction coefficient (kg-m2/ sec).

### Base Speed

Base speed is the maximum motor speed at the rated voltage and rated load, outside the field-weakening region. These equations describe the computation of the motor base speed.

The inverter voltage constraint is defined by computing the d-axis and q-axis voltages:

The current limit circle defines the current constraint which can be considered as:

In the preceding equation, ${i}_{d}$ is zero for surface PMSMs. For interior PMSMs, values of ${i}_{d}$ and ${i}_{q}$ corresponding to MTPA are considered.

Using the preceding relationships, we can compute the base speed as:

where:

• ${\omega }_{e}$ is the electrical speed corresponding to frequency of stator voltages (Radians/ sec).

• ${\omega }_{base}$ is the mechanical base speed of the motor (Radians/ sec).

• ${i}_{d}$ is the d-axis current (Amperes).

• ${i}_{q}$ is the q-axis current (Amperes).

• ${v}_{do}$ is the d-axis voltage when ${i}_{d}$ is zero (Volts).

• ${v}_{qo}$ is the q-axis voltage when ${i}_{q}$ is zero (Volts).

• ${L}_{d}$ is the d-axis winding inductance (Henry).

• ${L}_{q}$ is the q-axis winding inductance (Henry).

• ${R}_{s}$ is the stator phase winding resistance (Ohms).

• ${\lambda }_{pm}$ is the permanent magnet flux linkage (Weber).

• ${v}_{d}$ is the d-axis voltage (Volts).

• ${v}_{q}$ is the q-axis voltage (Volts).

• ${v}_{max}$ is the maximum fundamental line to neutral voltage (peak) supplied to the motor (Volts).

• ${v}_{dc}$ is the dc voltage supplied to the inverter (Volts).

• ${i}_{max}$ is the maximum phase current (peak) of the motor (Amperes).

• $p$ is the number of motor pole pairs.

### Surface PMSM

For a surface PMSM, you can achieve maximum torque by using zero d-axis current when the motor is below the base speed. For field-weakening operation, the reference d-axis current is computed by constant-voltage-constant-power control (CVCP) algorithm defined by these equations:

If :

If :

The saturation function used to compute ${i}_{q_sat}$ is described below:

If ,

If ${i}_{q_fw}>{i}_{q_lim}$,

If ,

The block outputs the following values:

`${I}_{d}^{ref}={i}_{d_sat}$`
`${I}_{q}^{ref}={i}_{q_sat}$`

where:

• ${\omega }_{e}$ is the electrical speed corresponding to frequency of stator voltages (Radians/ sec).

• ${\omega }_{m}$ is the rotor mechanical speed (Radians/ sec).

• ${\omega }_{base}$ is the mechanical base speed of the motor (Radians/ sec).

• ${\omega }_{e_base}$ is the electrical base speed of the motor (Radians/ sec).

• ${i}_{d_mtpa}$ is the d-axis phase current corresponding to MTPA (Amperes).

• ${i}_{q_mtpa}$ is the q-axis phase current corresponding to MTPA (Amperes).

• ${T}^{ref}$ is the reference torque (Nm).

• $p$ is the number of motor pole pairs.

• ${\lambda }_{pm}$ is the permanent magnet flux linkage (Weber).

• ${i}_{d_fw}$ is the d-axis field weakening current (Amperes).

• ${i}_{q_fw}$ is the q-axis field weakening current (Amperes).

• ${L}_{d}$ is the d-axis winding inductance (Henry).

• ${i}_{max}$ is the maximum phase current (peak) of the motor (Amperes).

• ${i}_{d_sat}$ is the d-axis saturation current (Amperes).

• ${i}_{q_sat}$ is the q-axis saturation current (Amperes).

• ${I}_{d}^{ref}$ is the d-axis current corresponding to the reference torque and reference speed (Amperes).

• ${I}_{q}^{ref}$ is the q-axis current corresponding to the reference torque and reference speed (Amperes).

### Interior PMSM

For an interior PMSM, you can achieve maximum torque by computing the d-axis and q-axis reference currents from the torque equation. For field-weakening operation, the reference d-axis current is computed by voltage and current limited maximum torque control (VCLMT) algorithm.

The reference currents for MTPA and field weakening operations are defined by these equations:

`${i}_{d_mtpa}=\frac{{\lambda }_{pm}}{4\left({L}_{q}-{L}_{d}\right)}-\sqrt{\frac{{\lambda }_{pm}^{2}}{16{\left({L}_{q}-{L}_{d}\right)}^{2}}+\frac{{i}_{m}^{2}}{2}}$`
`${i}_{q_mtpa}=\sqrt{{i}_{m}^{2}-{\left({i}_{d_mtpa}\right)}^{2}}$`
`${v}_{do}=-{\omega }_{e}{L}_{q}{i}_{q}$`

`${v}_{do}^{2}+{v}_{qo}^{2}={v}_{\mathrm{max}}^{2}$`

If ,

If ,

`${I}_{d}^{ref}=\mathrm{max}\left({i}_{d_fw},-{i}_{\mathrm{max}}\right)$`

If ${i}_{q_fw}<{i}_{m}$,

`${I}_{q}^{ref}={i}_{q_fw}$`

If ${i}_{q_fw}\ge {i}_{m}$,

`${I}_{q}^{ref}={i}_{m}$`

For negative reference torque values, the sign of ${i}_{m}$ and ${I}_{q}^{ref}$ are updated and equations are modified accordingly.

where:

• ${i}_{m_ref}$ is the estimated maximum current to produce the reference torque (Amperes).

• ${i}_{m}$ is the saturated value of estimated maximum current (Amperes).

• ${i}_{d_\mathrm{max}}$ is the maximum d-axis phase current (peak) (Amperes).

• ${i}_{q_\mathrm{max}}$ is the maximum q-axis phase current (peak) (Amperes).

• ${T}^{ref}$ is the reference torque (Nm).

• ${I}_{d}^{ref}$ is the d-axis current component corresponding to the reference torque and reference speed (Amperes).

• ${I}_{q}^{ref}$ is the q-axis current component corresponding to the reference torque and reference speed (Amperes).

• $p$ is the number of motor pole pairs.

• ${\lambda }_{pm}$ is the permanent magnet flux linkage (Weber).

• ${i}_{d_mtpa}$ is the d-axis phase current corresponding to MTPA (Amperes).

• ${i}_{q_mtpa}$ is the q-axis phase current corresponding to MTPA (Amperes).

• ${L}_{d}$ is the d-axis winding inductance (Henry).

• ${L}_{q}$ is the q-axis winding inductance (Henry).

• ${i}_{max}$ is the maximum phase current (peak) of the motor (Amperes).

• ${v}_{max}$ is the maximum fundamental line to neutral voltage (peak) supplied to the motor (Volts).

• ${v}_{do}$ is the d-axis voltage when ${i}_{d}$ is zero (Volts).

• ${v}_{qo}$ is the q-axis voltage when ${i}_{q}$ is zero (Volts).

• ${\omega }_{e}$ is the electrical speed corresponding to frequency of stator voltages (Radians/ sec).

• ${i}_{d}$ is the d-axis current (Amperes).

• ${i}_{q}$ is the q-axis current (Amperes).

• ${i}_{d_fw}$ is the d-axis field weakening current (Amperes).

• ${i}_{q_fw}$ is the q-axis field weakening current (Amperes).

• ${\omega }_{base}$ is the mechanical base speed of the motor (Radians/ sec).

## Ports

### Input

expand all

Reference torque input value for which the block computes the reference current.

Data Types: `single` | `double` | `fixed point`

Reference mechanical speed value for which the block computes the reference current.

Data Types: `single` | `double` | `fixed point`

### Output

expand all

Reference d-axis phase current that can efficiently generate the input torque and speed values.

Data Types: `single` | `double` | `fixed point`

Reference q-axis phase current that can efficiently generate the input torque and speed values.

Data Types: `single` | `double` | `fixed point`

## Parameters

expand all

Type of PMSM based on the location of the permanent magnets.

Number of pole pairs available in the motor.

Resistance of the stator phase winding (ohms).

#### Dependencies

To enable this parameter, set Type of motor to `Interior PMSM`.

Stator winding inductance (henry) along the d-axis of the rotating dq reference frame.

Stator winding inductance (henry) along the q-axis of the rotating dq reference frame.

#### Dependencies

To enable this parameter, set Type of motor to `Interior PMSM`.

Magnetic flux linkage between the stator windings and permanent magnets on the rotor (weber).

Maximum phase current limit for the motor (amperes).

DC bus voltage (volts)

#### Dependencies

To enable this parameter, set Type of motor to `Interior PMSM`.

Unit of the block input values.

Speed of the motor at the rated voltage and rated current outside the field weakening region.

Current corresponding to 1 per-unit. We recommend that you use the maximum current detected by an Analog to Digital Converter (ADC) as the base current.

#### Dependencies

To enable this parameter, set Input signal units to `Per-Unit (PU)`.

Torque corresponding to 1 per-unit. See Per-Unit System page for more details.

This parameter is not configurable and uses a value that is internally computed using other parameters.

#### Dependencies

To display this parameter, set Input signal units to `Per-Unit (PU)`.

## References

[1] B. Bose, Modern Power Electronics and AC Drives. Prentice Hall, 2001. ISBN-0-13-016743-6.

[2] Morimoto, Shigeo, Masayuka Sanada, and Yoji Takeda. "Wide-speed operation of interior permanent magnet synchronous motors with high-performance current regulator." IEEE Transactions on Industry Applications, Vol. 30, Issue 4, July/August 1994, pp. 920-926.

[3] Li, Muyang. "Flux-Weakening Control for Permanent-Magnet Synchronous Motors Based on Z-Source Inverters." Master's Thesis, Marquette University, e-Publications@Marquette, Fall 2014.

[4] Briz, Fernando, Michael W. Degner, and Robert D. Lorenz. "Analysis and design of current regulators using complex vectors." IEEE Transactions on Industry Applications, Vol. 36, Issue 3, May/June 2000, pp. 817-825.

[5] Lorenz, Robert D., Thomas Lipo, and Donald W. Novotny. "Motion control with induction motors." Proceedings of the IEEE, Vol. 82, Issue 8, August 1994, pp. 1215-1240.

[6] Briz, Fernando, et al. "Current and flux regulation in field-weakening operation [of induction motors]." IEEE Transactions on Industry Applications, Vol. 37, Issue 1, Jan/Feb 2001, pp. 42-50.

[7] TI Application Note, "Sensorless-FOC With Flux-Weakening and MTPA for IPMSM Motor Drives."