Main Content

Import IPMSM Flux Linkage Data from Motor-CAD

This example shows how you can import a motor design from Motor-CAD into a Simscape™ simulation.

Flux Linkage Data

This example shows two approaches to import flux linkage from Motor-CAD. The first approach is to export the flux linkage and iron loss data to a MATLAB® data file using the Motor-CAD saturation and loss map export utility. The IPMSMFluxFromMotorCADSaturationLossMap.m script implements this first approach. The second is to extract data using the Motor-CAD ActiveX interface. The IPMSMFluxFromMotorCADData.m implements this second approach.

Model

In this test, each winding phase is connected to a 1 megohm resistor. The neutral port is connected to electrical ground to allow non-zero zero-sequence currents. This allows the third harmonic to show up in the back EMFs. Both A-phase and Park's axes fluxes are exported from Motor-CAD, but you must use the A-phase data for higher harmonics to appear in the simulation results.

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.