Main Content

Estimate Induction Motor Parameters Using Recommended Hardware

This example determines the parameters of a three-phase AC induction motor (ACIM) using the recommended Texas Instruments™ hardware. The example determines these parameters:

  • Stator resistance ${R_s}$ (Ohm)

  • Rotor resistance ${R_r}$ (Ohm)

  • Magnetizing inductance ${L_m}$ (H)

  • Stator leakage inductance ${L_{ls}}$ (H)

  • Rotor leakage inductance ${L_{lr}}$ (H)

  • Motor inertia $J$ (Kg.m^2)

  • Friction constant $B$ (N.m.s)

The example accepts the minimum required motor and hardware parameters, runs tests on the target hardware, and displays the estimated parameters.

Note: This example does not support simulation. Use the supported hardware configuration to run this example.


  • Ensure that the motor is in the no-load condition.

  • Ensure that the motor has a quadrature encoder sensor. The parameter estimation tool needs the quadrature encoder sensor to measure the rotor speed.

Supported Hardware

This example supports only the following hardware configuration:

  • LAUNCHXL-F28379D controller

  • BOOSTXL-DRV8305 inverter

  • A three-phase AC induction motor with a quadrature encoder sensor

  • DC power supply

Required MathWorks® Product

To run parameter estimation, you need:

  • Motor Control Blockset™

  • Embedded Coder®

  • Embedded Coder Support Package for Texas Instruments C2000™ Processors

Prepare Hardware

1. Attach the inverter board to the controller board such that J1 and J2 of BOOSTXL align with J1 and J2 of LAUNCHXL.

2. Connect the motor three phases to MOTA, MOTB, and MOTC on the BOOSTXL inverter board.

3. Connect the DC power supply to PVDD and GND on the BOOSTXL inverter board.

4. Connect the quadrature encoder pins (G, I, A, 5V, B) to QEP_A on the LAUNCHXL controller board.

For more details regarding these connections, see Hardware Connections.

For more details regarding the model settings, see Model Configuration Parameters.

For LAUNCHXL-F28379D, load a sample program to CPU2, for example, the program that operates the CPU2 blue LED using GPIO31 (c28379D_cpu2_blink.slx) to ensure that CPU2 is not mistakenly configured to use the board peripherals intended for CPU1.

Parameter Estimation Tool

The parameter estimation tool includes a target model and a host model. The models communicate with each other by using a serial communication interface. For more details, see Host-Target Communication.

Enter the details about the hardware setup and the motor under test in the host model. The target model uses an algorithm to perform tests on the motor and estimate the motor parameters. The host model starts the required tests and displays the estimated parameters.

Prepare Workspace

Open the parameter estimation host model. You can also use this command to open the host model:


Enter these details in the host model to prepare the workspace.

  • Communication Port — In the Host Serial Setup block parameter dialog box, select the serial Port name to which the hardware is connected. Select an available port from the list. For more details, see Find Communication Port.

  • Required Inputs — Enter the motor specification and hardware setup data. You can obtain these values either from the motor datasheet or from the motor nameplate.

          - Nominal Voltage — The rated voltage (line-to-line RMS value) of the motor (Volts).

          - Input DC Voltage — The DC supply voltage for the inverter (Volts).

          - Nominal Current — The rated current (phase peak value) of the motor (Ampere).

          - Nominal Magnetizing Current (Id0) — The rated magnetizing current of the motor (Ampere). For detailed instructions to compute this value, see the Compute Nominal Magnetizing Current (Id0) section.

          - Pole Pairs — The number of pole pairs of the motor.

          - Rated Frequency — The rated frequency of operation of the motor (Hertz).

          - Total QEP Slits — The number of slits available in the quadrature encoder sensor. By default, this field has a value 1000.

Note: When updating Required Inputs, consider these limitations:

  • The tests protect the hardware from over-current faults. However, to ensure that these faults do not occur, keep the rated current of the motor (entered in Nominal Current field) less than the maximum current supported by the inverter.

  • If you have an SMPS-based DC power supply unit, set a safe current limit on the power supply for safety reasons.

Deploy Target Models

Before starting the tests by using the parameter estimation tool, you need to download the binary files (.hex/ .out) generated by the target model into the target hardware. There are two workflows to download the binary files:

Workflow 1: Build and Deploy Target Model

Use this workflow to generate and deploy the code for the target model. Ensure that you press Ctrl+D to update the workspace with the required input values from the host model.

Click this hyperlink available in the parameter estimation host model to open the target model:

Click Build, Deploy & Start in the Hardware tab to deploy the target model to the hardware.

Note: Ignore the warning message Multitask data store option in the Diagnostics page of the Configuration Parameter Dialog is none displayed by the model advisor, by clicking the Always Ignore button. This is part of the intended workflow.

Workflow 2: Manually Download Target Model

Use this workflow to deploy the binary files (.hex/ .out) of the target model manually by using a third party tool (the workflow does not need code-generation).

  • Locate the binary files (.hex/ .out) at this location:

          - < matlabroot >\toolbox\mcb\mcbexamples\mcb_acim_param_est_f28379D_DRV8305.out

The mcb_acim_param_est_f28379D_DRV8305.out file uses fixed quadrature encoder slits count of 1000, therefore you can use this file only for motors connected to a quadrature encoder with 1000 slits.

  • Open a third-party tool to deploy the binary files (.hex/ .out).

  • Download and run the binary files (.hex/ .out) on the target hardware.

Estimate Motor Parameters

Use the following steps to run the Motor Control Blockset parameter estimation tool:

1. Ensure that you deploy the binary files (.hex/ .out) generated from the target model to the target hardware and update the required details in the host model.

2. In the host model, check if the Run-Stop slider switch position is Run. Then, click Run in the Simulation tab to run the parameter estimation tests.

3. The host model displays the estimated motor parameters after successfully completing the tests.

When the parameter estimation tests complete, the Test Status LED turns green.

If the tests are interrupted, the Test Status LED turns red. When the LED turns red, run the host model to rerun the parameter estimation tests.

During an emergency, you can manually turn the Run-Stop slider switch to the Stop position to stop the parameter estimation tests. In addition, the model interrupts the parameter estimation tests and turns these LEDs red to protect the hardware from the following faults:

1. Over-current fault (this fault occurs when actual current drawn from the power supply is more than the Nominal Current value specified in the Required Inputs section of the host model)

2. Under-voltage fault (this fault occurs when input DC voltage drops below 80% of the Input DC Voltage value specified in the Required Inputs section of the host model)

3. Serial communication fault

Save Estimated Parameters

You can export the estimated motor parameters and then use them for the simulation and control system design.

To export, click Save Parameters to save the estimated parameters in a MAT (.mat) file.

To view the saved parameters, load the MAT (.mat) file in the MATLAB® workspace. MATLAB saves the parameters in a structure named motorParam in the workspace.

Click Open Model to create a new Simulink® model with an Induction Motor block. The block uses the motorParam structure variables from the MATLAB workspace.


  • For some phase sequences, the parameter estimation tool may not compute the Motor Inertia and Friction Constant parameters. Interchange any two motor phase connections and try running the parameter estimation host model again to estimate these parameters.

  • Under the following conditions, slightly increase the Nominal Current required input in the host model (for example, increase by 10% of the original value) and run the parameter estimation tests again:

          - When the host model runs and executes the tests, the Speed debug signal (in the time scope available in the host model) does not reach a stable value of around 0.6 per-unit (PU).

          - When running the host model multiple times, the Motor Inertia and Friction Constant values vary.

Repeat this step until the Speed signal stabilizes (at around 0.6 PU) in the time scope. This ensures that the computed Motor Inertia and Friction Constant values are accurate.

  • It is recommended to set the power supply DC bus voltage to the following value:

$$Input\;DC\;Voltage\;{\rm{ }}(V) = (\sqrt 2 ) \times \left[ {Nominal\;Voltage\;of\;motor\;(V)\:(line - line\;RMS\;value)} \right]$$

  • You can determine the total leakage inductance (in Henry) using the ${L_{ls}}$ and ${L_{lr}}$ values computed by the parameter estimation tool:

$${L_{ls}} = {L_{lr}} = \left( {{{Total\;leakage\;inductance} \over 2}} \right)$$

  • The parameter estimation tool does not estimate rated slip (slip_rated). The tool computes the rated speed $\left( {\left( {1 - {\rm{slip}}\_{\rm{rated}}} \right) \times {\rm{synchronous\;speed}}} \right)$ assuming that ${\rm{slip}}\_{\rm{rated}} = 0.25$. We recommend that you measure slip_rated or obtain it from the motor datasheet.

Compute Nominal Magnetizing Current (Id0)

You can obtain the value of the nominal magnetizing current (Id0) of the motor under test either from the motor datasheet or by performing the standard no-load tests and experiments. Optionally, you can follow this alternative procedure to manually compute the Id0 value.

1. You can configure the target model included in the example Run 3-Phase AC Motors in Open-Loop Control and Calibrate ADC Offset with the parameters of the motor under test and separate out the paths for frequency reference (${f^{ref}}$) and voltage reference (${V^{ref}}$) processing such that these signals become independent of each other.

In addition, use the ADC driver blocks (available in the target model) to compute the real-world value of the phase current of the motor. You can measure this value directly or send this value to the host model via serial communication for monitoring.

Note: The ADC offset depends on the ADC gain value inverter.SPI_Gain_Setting that you configure in the model initialization script associated with the target model. Changing ADC gain also changes the ADC offset.

2. Set ${f^{ref}}$ to 50% of Rated Frequency ${V^{ref}}$ to 50% of Nominal Voltage.

3. Increase ${f^{ref}}$ to Rated Frequency and ${V^{ref}}$ to a value between 90% and 95% of Nominal Voltage.

4. Ensure that the motor is in no-load condition and the motor phase current is magnetizing current. After you run the model and the motor, monitor the phase current.

Measure the peak value of the phase current. You can consider this value as the nominal magnetizing current (Id0) of the motor under test.