Main Content

Lq Estimator

Estimate stator inductance (Lq) of permanent magnet synchronous motor (PMSM)

Since R2023a

Motor Control Blockset / Parameter Estimation / PMSM Parameter Estimation


The Lq Estimator block computes the q-axis stator inductance of a PMSM using the phase currents, stator resistance, and the test configuration elements.

At first, the block locks the rotor along the d-axis by injecting a constant voltage (Vd). This ensures that the rotor remains stationary (aligned with d-axis) during frequency injection. To estimate q-axis stator inductance, the block injects a high-frequency voltage signal along the q-axis and then performs the frequency sweep process by gradually reducing the injected signal frequency using the step size defined by Step for frequency sweep (Hz) parameter. During frequency sweep, the block monitors the magnitude of the motor phase current. When the current magnitude becomes appropriately high or when the injected signal frequency reaches the minimum value (Minimum frequency (Hz) parameter), the block starts the estimation process by injecting a signal with rising frequency having a step size of Frequency step size for estimation (Hz) with number of steps defined by the Number of frequencies for estimation parameter. For details about these parameters, see PMSM Parameter Estimation Configurator.

This image shows the frequency sweep and the incremental steps of rising frequency.

The Lq estimation process uses the measured frequency sweep time duration as well as the step size of the changing frequency to estimate the q-axis stator inductance, Lq.



expand all

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


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

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

Signal that either starts or stops Lq estimation:

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

  • 0 (falling edge of a pulse) — This signal immediately stops the Lq estimation process. If you interrupt the estimation process abruptly before completion, the block does not compute or output the Lq 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


Rated current of motor


Maximum measurable inverter current


Board resistance


Current sense gain

A/ADC Count

Voltage sense gain

V/ADC Count

Parameter estimation sample time


Elements for estimating motor inductances (Ld and Lq)

Maximum frequency


Minimum frequency


Step for frequency sweep


Frequency step size for estimation


Number of frequencies for estimation


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

Back EMF estimation time


Back EMF estimation maximum speed limit


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


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

Data Types: single


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 q-axis stator inductance (in henries).

Data Types: single

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

Debug signalDescriptionUnits


Frequency of signal injected most recently



0Lq estimation did not start yet.


1Lq estimation is in progress.


2Lq estimation completed successfully.


8200Lq estimation failed because the current feedback from motor did not increase proportionally to the rise in the injected voltage.



Q-axis current



Q-axis voltage



Phase difference between the injected voltage and current response


Data Types: single

Extended Capabilities

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

Version History

Introduced in R2023a