Contenuto principale

Compute Surface Maps for Flux and Torque

After you import nonlinear motor data (as mentioned in the previous step), you can process the input data to generate grid spaces for the currents, and surface maps for the flux and torque.

The script ComputeSurfaceMaps.m contains the code to define the grid spaces for currents for characterization and automatically create surface maps. To open this script, run this command:

openExample("ComputeSurfaceMaps.m")

Run the first code section:

idAxis = linspace(-I_rated,0,50);
iqAxis = linspace(0,I_rated,51);
[IDgrid,IQgrid] = ndgrid(idAxis,iqAxis);
currentBreakpoints = {idAxis,iqAxis};
lambdad = fitlookupn(currentBreakpoints,[id,iq],fluxD,8,ShowPlot=1);
title("Flux d [Wb]");
xlabel("Id [A]");
ylabel("Iq [A]");

In the generated surface map, you can observe the smooth surface of fitted d-axis flux linkage plotted overlapping the input data as black dots.

The above figure shows the input Flux linkage data in D-axis in scatter format represented by dots, and the uniform surface created that matches the input data, as a function of operating currents id and iq.

Similarly, run the code to generate surface map for flux for q-axis. Run the second code section in ComputeSurfaceMaps.m.

lambdaq = fitlookupn(currentBreakpoints,[id,iq],fluxQ,5,ShowPlot=1);
title("Flux q [Wb]");
xlabel("Id [A]");
ylabel("Iq [A]");

You can observe the smooth surface of fitted q-axis flux linkage plotted overlapping the input data as black dots.

Run the code to generate surface map for torque. Run the third code section in ComputeSurfaceMaps.m.

torque = fitlookupn(currentBreakpoints,[id,iq],T_Nm,5,ShowPlot=1);
title("Torque [Wb]");
xlabel("Id [A]");
ylabel("Iq [A]");

The above figure shows the input computed or measured torque data in D-axis in scatter format represented by dots, and the uniform surface created that matches the input data, as a function of operating currents id and iq.