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 runs the motor using closed-loop field-oriented control (FOC) with a limited speed during which it 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, and 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).

Ports

Input

expand all

The three-phase current response 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 that you provide to the inverter.

Data Types: single

Current position of the rotor.

Data Types: single

Current motor speed.

Data Types: single

Estimated stator resistance 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 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

ohm

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 speed

RPM

Specify current controller gains (off/on)

-

Proportional gain

-

Integral gain

-

Iq Reference current for FOC

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.

Data Types: single

Estimated back EMF constant of the PMSM (in V/m/s).

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

Did not complete mechanical parameter estimation

-

1

Mechanical parameter estimation completed successfully

-

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

Extended Capabilities

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

Version History

Introduced in R2023a