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
Estimate PMSM Parameters Using Parameter Estimation Blocks
Uses the parameter estimation blocks provided by Motor Control Blockset™ to estimate these parameters of a permanent magnet synchronous motor (PMSM) with a quadrature encoder sensor:
Estimate PMSM Parameters Using Parameter Estimation Blocks on Real-Time Systems
Uses the parameter estimation blocks provided by Motor Control Blockset™ to estimate these parameters of a permanent magnet synchronous motor (PMSM):
Ports
Input
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.
Category | Configuration element | Units | ||
---|---|---|---|---|
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
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 signal | Description | Units | ||
---|---|---|---|---|
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 | 0 | Rs estimation did not start yet. | - | |
1 | Rs estimation is in progress. | - | ||
2 | Rs estimation completed successfully. | - | ||
8000 | Rs 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. | - | ||
8001 | Rs1 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. | - | ||
8002 | Rs2 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. | - | ||
8003 | Rs3 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
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
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2023aThe Block Parameters dialog box now includes advanced options for configuring the parameter estimation process.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)