Main Content

PMSM FeedForward Control

Decouple d-axis and q-axis current to eliminate disturbance

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

Description

The PMSM FeedForward Control block decouples d-axis and q-axis current controls and generates the corresponding feed-forward voltage gains to enable field-oriented control of a permanent magnet synchronous motor (PMSM).

The block accepts feedback values of d-axis and q-axis currents and the mechanical speed of the rotor.

The block generates feed-forward gains from motor parameters specified using one of these methods.

  • Lumped parameters with d-axis and q-axis stator winding inductances and permanent magnet flux linkage.

  • Nonlinear model with d-axis and q-axis stator winding inductances and permanent magnet flux linkage lookup tables.

  • Nonlinear model with d-axis and q-axis flux linkage lookup tables.

Equations

If you select Per-Unit (PU) in the Input units parameter, the block scales down the internal parameters to match the per-unit scale by default. You can also configure the block to convert the inputs to SI units before performing any computation and convert them back to per unit values after calculating the output.

These equations describe the computation of feed-forward gain by the block.

ωe=pωm

VdFF=ωeψq=ωeLqIq

VqFF=ωeψd=ωeLdId+ωeψm

where:

  • p is the number of pole pairs available in the motor.

  • ωe is the electrical speed corresponding to frequency of stator voltages (rad/s).

  • Ld and Lq are the d-axis and q-axis stator winding inductances (henry).

  • Id and Iq are the d-axis and q-axis currents (amperes).

  • ψd and ψqare the magnetic fluxes along the d- and q-axes (weber).

  • ψm is the permanent magnet flux linkage (weber).

For a detailed set of equations and assumptions that Motor Control Blockset™ uses for a PMSM, see Mathematical Model of PMSM.

Ports

Input

expand all

Current along the d-axis of the rotating dq reference frame.

Data Types: single | double | fixed point

Current along the q-axis of the rotating dq reference frame.

Data Types: single | double | fixed point

Mechanical speed of the rotor.

Data Types: single | double | fixed point

D-axis winding inductance (in henry).

Dependencies

To enable this input port, set Motor parameter input method to Input port based Ld, Lq and FluxPM.

Data Types: single | double | fixed point

Q-axis winding inductance (in henry).

Dependencies

To enable this input port, set Motor parameter input method to Input port based Ld, Lq and FluxPM.

Data Types: single | double | fixed point

Peak permanent magnet flux linkage (in weber).

Dependencies

To enable this input port, set Motor parameter input method to Input port based Ld, Lq and FluxPM.

Data Types: single | double | fixed point

Output

expand all

Feed-forward voltage gain along the d-axis of the rotating dq reference frame.

Data Types: single | double | fixed point

Feed-forward voltage gain along the q-axis of the rotating dq reference frame.

Data Types: single | double | fixed point

Parameters

expand all

Number of pole pairs available in the motor.

Motor parameters that the block uses to generate feedforward gains.

  • Linear model with lumped parameters — Generate gains using lumped-circuit values for motor parameters Ld, Lq, and FluxPM.

  • Non-linear model with D,Q-flux linkage LUTs — Generate gains using d-axis flux linkage FluxD and q-axis flux linkage FluxQ lookup tables (LUTs).

  • Non-linear model with Ld,Lq and FluxPM LUTs — Generate gains using Ld, Lq, and FluxPM LUTs, specified as block parameters.

  • Input port based Ld,Lq and FluxPM — Generate gains using Ld, Lq, and FluxPM LUTs, specified as block inputs.

Linear Model with Lumped Parameters

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

Dependencies

To enable this parameter, set Motor parameter input method to Linear model with lumped parameters.

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

Dependencies

To enable this parameter, set Motor parameter input method to Linear model with lumped parameters.

Peak permanent magnet flux linkage (in weber).

Dependencies

To enable this parameter, set Motor parameter input method to Linear model with lumped parameters.

Nonlinear Model with FluxD and FluxQ Lookup Tables

D-axis current vector used in the following lookup tables, depending on the method used to specify the motor parameters.

  • FluxD(id,iq) and FluxQ(id,iq) for the Non-linear model with D,Q-flux linkage LUTs method.

  • Ld(id,iq), Lq(id,iq), and FluxPM(id,iq) for the Non-linear model with Ld,Lq and FluxPM LUTs method.

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with D,Q-flux linkage LUTs or Non-linear model with Ld,Lq and FluxPM LUTs.

Q-axis current vector used in the following lookup tables, depending on the method used to specify the motor parameters.

  • FluxD(id,iq) and FluxQ(id,iq) for the Non-linear model with D,Q-flux linkage LUTs method.

  • Ld(id,iq), Lq(id,iq), and FluxPM(id,iq) for the Non-linear model with Ld,Lq and FluxPM LUTs method.

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with D,Q-flux linkage LUTs or Non-linear model with Ld,Lq and FluxPM LUTs.

D-axis flux linkage FluxD(id,iq) lookup table data (in weber).

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with D,Q-flux linkage LUTs.

Q-axis flux linkage FluxQ(id,iq) lookup table data (in weber).

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with D,Q-flux linkage LUTs.

Nonlinear Model with Ld, Lq, and FluxPM Lookup Tables

D-axis inductance Ld(id,iq) lookup table data (in henry).

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with Ld,Lq and FluxPM LUTs.

Q-axis inductance Lq(id,iq) lookup table data (in henry).

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with Ld,Lq and FluxPM LUTs.

Permanent magnet flux linkage FluxPM(id,iq) lookup table data (in weber).

Dependencies

To enable this parameter, set Motor parameter input method to Non-linear model with Ld,Lq and FluxPM LUTs.

Motor Configuration

Saturation limit (in volts) for the output voltages VdFF and VqFF.

Unit of the input values.

Base voltage (in volts) for per-unit system.

Dependencies

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

Base current (in amperes) for per-unit system.

Dependencies

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

Base speed (in rpm) for per-unit system.

Dependencies

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

Option to scale down internal parameters to match per-unit scale when generating code.

  • When you enable this option, the block scales down the internal constants and coefficients to match the per-unit scale. This allows for higher precision when you use the fixed-point data type. If you use this option with the single or double data type, some precision loss can occur depending on the number of bits allotted to the integer portion.

  • When you disable this option, the block converts all the constants and coefficients used for internal calculations to SI units and then converts them back to the PU scale. This allows you to update the lookup table values in the generated code, typically, for applications such as controller tuning or end-of-line operations. You can also update the values manually for debugging or reusing previously generated code.

Dependencies

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

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 R2020a