Main Content

Import IPMSM Flux Linkage Data from ANSYS Maxwell

This example shows how you can import a motor design from ANSYS® Maxwell® into a Simscape™ simulation.

Flux Linkage Data

The data file defining the motor flux linkage is IPMSMFluxFromANSYSMaxwellData.txt, and is reproduced with permission of ANSYS, Inc. To view the data, open the model from MATLAB® and click on the "From ANSYS Maxwell" link.

To read this data into MATLAB, the text file requires some minor editing to make it executable from the MATLAB command line. The resultant script is IPMSMFluxFromANSYSMaxwellData.m and can be viewed by clicking on the "MATLAB script" link from the model. To see a summary of the edits, click on the "Compare" link.


Simulation Results from Simscape Logging

The plot below shows the simulated open-circuit voltages. Notice the nonlinear back EMF profile that would not be captured if using a simplified PMSM model with fixed back EMF constant.

Results from Real-Time Simulation

This example has been tested on a Speedgoat Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU. This model can run in real time with a step size of 200 microseconds.