Main Content

PMSM Rs Estimator

Estimate stator resistance (Rs) of permanent magnet synchronous motor (PMSM)

Since R2023a

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

Description

The PMSM Rs Estimator block computes the stator resistance of a PMSM using the phase currents, DC voltage across the motor, and the test configuration elements.

The block injects two voltages V1 and V2 for each phase and measures the respective current responses I1 and I2 to estimate each phase resistance. It then estimates the motor resistance by averaging the three phase resistances.

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

Signal that either starts or stops Rs estimation:

  • 1 (rising edge of a pulse) — This signal initiates the Rs estimation process.

  • 0 (falling edge of a pulse) — This signal immediately stops the Rs estimation process. If you interrupt the estimation process abruptly before completion, the block does not compute or output the Rs value.

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 stator resistance (in ohms) of the PMSM.

Data Types: single

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

Debug signalDescriptionUnits

I1

First measured phase current

A

V1

First injected phase voltage

V

I2

Second measured phase current

A

V2

Second injected phase voltage

V

Rs1

Estimated a axis resistance

ohms

Rs2

Estimated b axis resistance

ohms

Rs3

Estimated c axis resistance

ohms

status

0Rs estimation did not start yet.

-

1Rs estimation is in progress.

-

2Rs estimation completed successfully.

-

8000Rs estimation failed because the current feedback from motor did not increase proportionally to the rise in the injected voltage. Observe all three phase resistances from the log output and if they are in the acceptable range, increase the threshold in the block mask to accommodate the imbalance in resistances.

-

8001Rs1 estimation failed due to issues in the Ia phase current. Check if the motor is properly connected and that the ADC is correctly measuring Ia.

-

8002Rs2 estimation failed due to issues in the Ib phase current. Check if the motor is properly connected and that the ADC is correctly measuring Ib.

-

8003Rs3 estimation failed due to issues in the Ic phase current. Check if the motor is properly connected and that the ADC is correctly measuring Ic.

-

Data Types: single

Parameters

expand all

Maximum allowed current (in amperes) during testing.

Step size (in per-units) during ramp up of injected voltage.

Maximum allowed duration (in seconds) for ramp up of injected voltage.

Number of voltage and current samples for each voltage injection that are used for Rs estimation.

Wait duration (in seconds) between successive voltage injections.

Threshold (specified as a value between 0 and 1) above which to determine the imbalance among the phase resistances.

Extended Capabilities

expand all

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

Version History

Introduced in R2023a

expand all