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:
Nominal Magnetizing Current (Ampere)
Stator resistance (Ohm)
Rotor resistance (Ohm)
Magnetizing inductance (H)
Stator leakage inductance (H)
Rotor leakage inductance (H)
Motor inertia (Kg.m^2)
Friction constant (N.m.s)
The example accepts the minimum required motor and hardware parameters, runs tests on the target hardware, and displays the estimated parameters.
This example does not support simulation. Use the supported hardware configuration to run this example.
This example computes nominal magnetizing current only if you set the Nominal Magnetizing current ( Id0 ) required input field to
0. For more details, see the Prepare Workspace section.
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.
This example supports only the following hardware configuration:
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™
C2000™ Microcontroller Blockset
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.
Note: Ensure that the target model and host model that you use for parameter estimation belong to the same release version of Motor Control Blockset.
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 block parameter dialog boxes of Host Serial Setup, Host Serial Receive, and Host Serial Transmit blocks, select the serial Port 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). If you do not know the nominal magnetizing current of your motor and want the parameter estimation tool to automatically calculate and use the computed value as input, set this field to
0. The tool updates the display box Id0 (available in the Estimated Motor Parameters section of the host model) with the computed value only if you set this field to
If you know of your motor and do not want the tool to compute this value, set this field with the (positive) value. The tool uses this input to perform the subsequent calculations.
- 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
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 (
.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 (
.out) of the target model manually by using a third party tool (the workflow does not need code-generation).
Locate the binary files (
.out) at this location:
< matlabroot >\toolbox\mcb\mcbexamples\mcb_acim_param_est_f28379D_DRV8305.out
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 (
Download and run the binary files (
.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 (
.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 computing the electrical parameters (stator resistance , rotor resistance , magnetizing inductance , stator leakage inductance , and rotor leakage inductance ), the parameter estimation tool keeps the motor stationary. However, the tool runs the motor to compute the mechanical parameters (nominal magnetizing current , motor inertia , and friction constant ).
Note: You can ignore the displayed mechanical parameters, if the motor does not run.
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 (
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:
You can determine the total leakage inductance (in Henry) using the and values computed by the parameter estimation tool:
The parameter estimation tool does not estimate rated slip (
slip_rated). The tool computes the rated speed assuming that . We recommend that you measure
slip_ratedor obtain it from the motor datasheet.