Main Content

PMSM Current Reference Generator

Permanent magnet synchronous machine current reference generator

  • PMSM Current Reference Generator block

Libraries:
Simscape / Electrical / Control / PMSM Control

Description

The PMSM Current Reference Generator block implements a current reference generator for permanent magnet synchronous machine (PMSM) current control in the rotor d-q reference frame.

You typically use this block in a series of blocks making up a control structure.

For an example of a full control structure, from machine measurements to machine inputs, see the PMSM Field-Oriented Control block.

Equations

The PMSM Current Reference Generator block obtains the current reference by using one of these methods:

  • Zero d-axis control (ZDAC)

  • User-defined lookup tables

  • Automatically-generated lookup tables

For the ZDAC method, the block sets the d-axis current reference idref to zero and determines the q-axis current reference iqref using the torque equation:

idref=0,

and

iqref= 2Tref3pψm,

where:

  • Tref is the reference torque input.

  • p is the number of pole pairs.

  • ψm is the permanent magnet flux linkage.

For operation below the base speed of the synchronous machine, ZDAC is a suitable method. Above the base speed, the generator requires a field weakening controller to adjust the d-axis reference.

To pregenerate the optimal current references for several operating points offline, define two lookup tables using the user-defined lookup table approach:

idref=f(nm,Tref,vdc),

and

iqref= g(nm,Tref,vdc),

where:

  • nm is the rotor angular velocity.

  • vdc is the DC-link voltage of the converter.

To let the block create the lookup tables, choose the automatically-generated lookup table approach. The block generates the lookup table using two strategies:

  • Maximum torque per ampere

  • Field weakening

The selection between the two strategies depends on the modulation index. This equation calculates the modulation index,

M=VskVph_max,

where Vs is the stator voltage amplitude, k is the modulation factor, and Vph_max is the maximum allowable phase voltage. If the modulation index is greater than 1, the block generates the current references by using the field weakening procedure. Otherwise, the block calculates the current references by using the maximum torque per ampere procedure.

Maximum Torque Per Ampere

You can generate current references in the constant torque region (occurring below rated speed) by using the maximum torque per ampere (MTPA) strategy.

These equations defines the direct and quadrature components of the stator current in terms of angle and magnitude,

id=Issinβ

iq= Iscosβ

where:

  • β is the angle of the stator current vector.

  • Is is the stator current amplitude.

Using the angle-magnitude variant of the d-q currents, this equation calculates the PMSM torque equation,

Te=3p2ψmIscosβ+3p4(LqLd)Is2sin2β,

where Ld and Lq are the direct and quadrature inductances, respectively.

To obtain fast transient response and maximize torque with the smallest possible stator current amplitude, MTPA imposes (dTe)/ = 0 to the torque equation, which yields

3p2ψmIssinβ+3p2(LqLd)Is2(cos2βsin2β)=0.

The MTPA d-axis current id_mtpa is written in terms of the q-axis component iq_mtpa by substituting the d-q currents back from their angle and magnitude variants:

id_mtpa=ψm2(LqLd)ψm24(LqLd)2+iq_mtpa2.

Finally, by plugging the previous equation into the d-q variant of the PMSM torque equation, the block obtains this polynomial:

9p2(LqLd)2iq_mtpa4+6Trefpψmiq_mtpa4Tref2=0.

The q-axis component is the solution of this polynomial.

Field Weakening

You can generate current references in the above rated speed region by using the field weakening (FW) strategy.

Above the rated speed, the stator voltage is limited by the power converter and the available DC-link voltage. The maximum stator voltage is

Vs=vd2+vq2Vph_max,

where Vph_max is the maximum available stator phase voltage.

The steady-state voltage equations for PMSMs are

vd=RsidωeLqiq ,

and

vq=Rsiq+ωe(Ldid+ψm),

where ωe is the rotor electrical angular velocity, in rad/s.

For rotor speeds above rated, the stator resistance is negligible, and the field weakening d-axis current component id_fw is obtained in terms of the q-axis component iq_fw from the vq steady-state equation:

id_fw=ψmLd+1LdVph_max2ωe2(Lqiq_fw)2,

Finally, by plugging the id_fw equation into the PMSM torque equation, the block obtains this polynomial:

9p2(LdLq)2Lq2ωe2iq_fw4+(9p2ψm2Lq2ωe29p2(LdLq)2Vph_max2)iq_fw212TrefpψmLdLqωe2iqfw+4Tref2Ld2ωe2=0

The q-axis component is the solution of this polynomial.

Assumptions

The machine parameters are constants.

Limitations

The automatically generated current references introduce latency in the presimulation phase. For medium-power PMSM drives the latency is around 300 ms.

Examples

Ports

Input

expand all

Desired mechanical torque produced by the PMSM, in N*m.

Data Types: single | double

Mechanical angular velocity of the rotor, obtained via direct measurement of the PMSM, in rad/s.

Data Types: single | double

DC-link voltage of the converter, in V. For the ZDAC method, this value is used to limit the output reference torque and torque limit. For the lookup table method, this value is used as an input to the lookup tables.

Data Types: single | double

Output

expand all

Reference d- and q-currents to be given as inputs to a PMSM current controller, in A.

Data Types: single | double

Reference torque saturated by the calculated torque limit TqLim, in N*m.

Data Types: single | double

Torque limit imposed by both the electrical and mechanical constraints of the system, in N*m.

Data Types: single | double

Parameters

expand all

General Parameters

Nominal DC-link voltage of the electrical source.

Maximum allowable PMSM power.

Maximum allowable PMSM torque.

Sample time for the block (-1 for inherited). If you use this block inside a triggered subsystem, set the sample time to -1. If you use this block in a continuous variable-step model, you can specify the sample time explicitly.

Reference Generation Strategy

Select the strategy for determining current references.

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.

Quadrature-axis current reference lookup data.

Specify the waveform technique.

Dependencies

This parameter is only visible when Current references is set to Automatically generated lookup-table.

Safety factor used to compute the maximum allowed phase voltage for current references generation.

Dependencies

This parameter is only visible when Current references is set to Automatically generated lookup-table.

Number of permanent magnet pole pairs on the rotor.

Peak permanent magnet flux linkage.

Direct-axis inductance.

Quadrature-axis inductance.

Stator resistance per phase.

References

[1] Haque, M. E., L. Zhong, and M. F. Rahman. "Improved trajectory control for an interior permanent magnet synchronous motor drive with extended operating limit." Journal of Electrical & Electronics Engineering. Vol. 22, Number 1, 2003, p. 49.

[2] Carpiuc, S., C. Lazar, and D. I. Patrascu. "Optimal Torque Control of the Externally Excited Synchronous Machine." Control Engineering and Applied Informatics. Vol. 14, Number 2, 2012, pp. 80–88.

Extended Capabilities

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

Version History

Introduced in R2017b