Import Nonlinear Motor Data from Dyno Tests or FEA Tools
The first step in characterizing the nonlinear behavior of a permanent-magnet synchronous motor (PMSM) is to import motor data.
Import the following nonlinear motor data.
Voltages along a and b axes, Va and Vb or d and q axes, Vd and Vq (V)
Currents along a and b axes, ia and ib or d and q axes, id and iq (A)
Motor speed, ω (rpm)
Torque, T (N.m)
The script NonLinearMotorData.m contains code to import the data. Open
the script using the below command, choose one of the four options, and then run the code
section to generate the required Workspace variables that are used in the subsequent steps of
the workflow.
openExample("ImportNonLinearMotorData.m")
You can choose to import data from the following sources.
V{abc} and I{abc} measurements: This option uses the physical measurements in the stationary (a - b) frame. When you select the corresponding option, the script calculates the corresponding values of voltage, current and flux linkages in the rotor (d-q) frame from the provided motor position using Clarke and Park transforms.V{dq} and I{dq} measurements: This option uses physical measurements in the rotor (d-q) frame.From virtual dyno simulation: This option uses the FEA based virtual dyno simulation. Select this option if you do not have pre-existing data to import. This script loads data from the pmsmData_LdLq.mat and DynoData.mat data files that are provided with this example.The model that was used to obtain DynoData.mat is also provided with this example (VirtualDynoModel.slx). You can modify this model to obtain another data file according to your motor specifications.
From FEA tools: This option uses the FEA simulation sample data.
Generate the Workspace variables by selecting one of the above options in
ImportNonLinearMotorData.m and then running the first section.
Then, you need to specify the operating parameters for the motor and inverter by
initializing these variables from MATLAB. Run the second code section in
ImportNonLinearMotorData.m:
I_rated = PU_System.I_base; % A
Vdc = inverter.V_dc;
pp = pmsm.p; % number of pole pairs
Rs = pmsm.Rs; % Ohm
clf;