Main Content

PMSM Mechanical Parameter Estimator

Estimate back EMF constant, rotor inertia, and viscous damping of permanent magnet synchronous motor (PMSM)

Since R2023a

Libraries:
Motor Control Blockset / Parameter Estimation / PMSM Parameter Estimation

Description

The PMSM Mechanical Parameter Estimator block uses the phase currents and voltages, DC voltage across the motor, motor position and speed, stator resistance, d-axis inductance, as well as the other test configuration elements to compute the following mechanical parameters of a PMSM:

  • Back EMF constant (Ke)

  • Rotor inertia (J)

  • Viscous damping (B)

The block starts the motor using open-loop V by F or I-F control. You can use the Start up technique parameter to select one of these startup methods.

After starting the motor, the block runs the motor using closed-loop field-oriented control (FOC) with a limited speed. With the motor running, the block runs the tests to estimate the back-EMF constant (Ke) and viscous damping (B). After a pre-configured duration, the block concludes these tests to compute Ke and B. The block then triggers coast-down by shutting down all six inverter switches. The coast-down results in gradual decline in motor speed which eventually reaches zero. The block measures and uses the time to reach zero-speed to calculate rotor inertia (J).

Examples

Ports

Input

expand all

The three-phase current response (in amperes) of the motor measured by the current sensors.

Note

Providing phase-c current input is optional. The block functionality is not impacted if you do not provide the phase-c current input.

Data Types: single

DC bus voltage (in volts) that you provide to the inverter.

Data Types: single

Current position (in per-unit) of the rotor. For more details about the per-unit system, see Per-Unit System.

Data Types: single

Current motor speed (in RPM).

Data Types: single

Estimated stator resistance (in ohms) of the PMSM. You can either connect this input port to the Rs output of the PMSM Rs Estimator block or provide the resistance value manually using a Constant block.

Data Types: single

Estimated d-axis stator inductance (in henries) of the PMSM. You can either connect this input port to the Ld output of the Ld Estimator block or provide the d-axis inductance value manually using a Constant block.

Data Types: single

Signal that starts running the motor in closed-loop FOC mode:

  • 1 (rising edge of a pulse) — This signal initiates mechanical parameter estimation by running the motor in closed-loop using FOC.

  • 0 (falling edge of a pulse) — This signal starts running the motor using open-loop control.

Data Types: single

Signal that either starts or stops block execution:

  • 1 (rising edge of a pulse) — This signal initiates block execution.

  • 0 (falling edge of a pulse) — This signal immediately stops block execution and any tests that the block is running. If you interrupt the estimation process abruptly before completion, the block does not compute or output the mechanical parameter values.

Data Types: Boolean

This table summarizes the expected configuration elements in the bus signal input.

CategoryConfiguration elementUnits

Elements for motor and inverter hardware

Number of pole pairs

-

Rated speed of motor

RPM

Rated current of motor

A

Maximum measurable inverter current

A

Board resistance

ohms

Current sense gain

A/ADC Count

Voltage sense gain

V/ADC Count

Parameter estimation sample time

seconds

Elements for estimating motor inductances (Ld and Lq)

Maximum frequency

Hz

Minimum frequency

Hz

Step for frequency sweep

Hz

Frequency step size for estimation

Hz

Number of frequencies for estimation

-

Elements for estimating back EMF constant (Ke), motor inertia (J), and friction constant (B)

Back EMF estimation time

seconds

Back EMF estimation maximum speed limit

RPM

Specify current controller gains (off/on)

-

Proportional gain

-

Integral gain

-

Iq reference current as a ratio of rated motor current

PU current

Lower speed limit for inertia estimation

RPM

You can connect this input port to the Config output port of the PMSM Parameter Estimation Configurator block.

Data Types: single

Output

expand all

Stator reference voltage components along the a, b, and c axes of the abc reference frame. Each voltage component has a range between -1 and 1.

Data Types: single

Estimated back EMF constant of the PMSM (in Vpk_LL/krpm (peak voltage (line-to-line) per kilo revolution per minute)).

Data Types: single

Estimated inertia of the PMSM (in kg.m2).

Data Types: single

Estimated viscous damping of the PMSM (in N.s/m).

Data Types: single

Signal that switches on or switches off the inverter:

  • 1 (logical high) — For the duration when this signal is high, all six switches of the inverter are switched on.

  • 0 (logical low) — For the duration when this signal is low, all six switches of the inverter are switched off.

Data Types: single

Debug signals that the block provides for examination. The bus includes these debug signals.

Debug signalDescriptionUnits

status

0

Mechanical parameter estimation did not start yet.

-

1

Mechanical parameter estimation is in progress.

-

2

Mechanical parameter estimation completed successfully.

-

8300

Back EMF estimation failed because the motor failed to reach 90% of Back EMF estimation maximum speed limit (RPM) within the period of Back EMF estimation time (s)+10 seconds.

If the motor is already spinning in closed-loop control, try changing parameters in the PMSM Parameter Estimation Configurator block. Increase the Iq reference current as a ratio of rated motor current parameter, or reduce the Back EMF estimation maximum speed limit (RPM) parameter.

-

8301

Back EMF estimation failed because the motor did not exit I-F controller based startup.

If the motor is not starting, try changing parameters in the PMSM Parameter Estimation Configurator block. Increase the Maximum start up current (A) parameter. If the motor starts but fails to reach Speed to enter closed loop (RPM), increase the reference current and reduce the Start up speed change rate (RPM/S) parameter. If the motor accelerates but still fails to reach the required speed, reduce the Start up current decay rate (A/S) parameter so that the motor remains in I-F control for a longer time.

 

CoastDownTime

Measured coast-down duration

seconds

Vdq

Voltages across d and q axes

volts

Idq

Currents across d and q axes

amperes

VIAlphaBeta

Voltages and currents across α and β axes

volts, amperes

Data Types: single

Parameters

expand all

Since R2026a

Method for starting the motor before back EMF estimation. Specify one of the following options:

  • I-F Controller — Use I-F control to start the motor.

  • V by F — Use V by F control to start the motor.

For more details, see I-F Controller and VbyF Controller.

Since R2026a

Sample time (in seconds) used for I-F control.

Dependencies

To enable this parameter, set Start up technique to I-F Controller.

Slowdown factor (specified as an integer between 1 and 20) for the current PI controllers during back-EMF estimation. A smaller value results in more aggressive controllers.

Extended Capabilities

expand all

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

Version History

Introduced in R2023a

expand all