• A  |  
  • A  |  
  • A

IPM Motor with vector control in Simulink

Gallery spotlight
Motors and generators

The vector control of an Interior Permanent Magnet (IPM) Brushless DC motor involves running both Simulink and MagNet transient solvers simultaneously.

Co-simulations allow the strengths of two separate simulators to be combined, in this case the powerful system-level simulation of Simulink with the dynamic electrical machine analysis of MagNet. A continuous data exchange between the two keeps the shared quantities (voltages and currents) synchronized.

METHODS and RESULTS

SIMULINK MODEL

The Simulink model, which implements the closed loop vector control of the motor speed, is shown on the left. The element which couples to MagNet is the red component with the MagNet logo.

Click to zoom

MESH used for MAGNET'S PART of the CO-SIMULATION

The link component is designed to allow MagNet to take advantage of symmetry, by allowing the currents and/or voltages to be scaled in the transfer between Simulink and MagNet. In this case the four windings of each phase are connected in a series-parallel configuration, so the current and the voltage are both scaled by a factor of two in the Simulink component. Shown here is the mesh used by MagNet for its part of the simulation. At each time step, as the rotor changes position, the airgap is remeshed, which allows motional effects to be modeled quickly and accurately.

Click to zoom

COMMANDED SPEED vs ACTUAL SPEED

Using vector control, a feedback loop monitors the motor speed and varies the motor torque to maintain a desired speed. The graph here shows the commanded speed (1800 rpm, shown in green) and the actual speed (shown in blue). The transient simulation starts in Simulink, which invokes MagNet transparently to jointly run its electromagnetic simulation. While both simulations are running they are constantly passing data back and forth to synchronize the voltages and currents.

Click to zoom

VECTOR VOLTAGES COMMANDED by the FEEDBACK CIRCUIT

This graph shows the vector voltages commanded by the feedback circuit. The system blocks in the lower left quadrant of the circuit implement an approximate inverse model of the motor, which means that the speed feedback need only generate small corrections to these voltages.

Click to zoom

PHASE VOLTAGES COMMANDED by the CONTROLLER

The graph shows the phase voltages commanded by the controller, which are obtained from the vector voltages by a DQ to ABC transformation. The element which performs this transformation is a user defined S-Function which implements the mathematical operations.

Click to zoom

PHASE CURRENTS

MagNet also takes the mechanical loads on the motion component into account, as well as velocity effects such as back emf. The resulting phase currents shown here are calculated by performing a finite element analysis, and are returned to Simulink.

Click to zoom

VECTOR CURRENTS

This graph shows the actual vector currents. A limiter component in the feedback loop keeps the commanded current magnitude under 10 Amps. These currents are obtained from the phase currents using a user-defined ABC to DQ transformation element.

Click to zoom

MAGNETIC TORQUE on the ROTOR

The previous graphs were generated by "Scope" blocks, which is just one of the many ways of extracting data from Simulink. Once the simulation is complete, MagNet's post-processor can be invoked to plot the magnetic quantities, such as flux linkage and torque, as well as fields, such as flux density and current density. The magnetic torque on the rotor is plotted here.

Click to zoom

DATA EXCHANGE between SIMULINK and MAGNET

The link which orchestrates the data exchange between Simulink and MagNet is designed to allow different time steps in each application while both are running a transient simulation. In this example MagNet is running with a time step of only 0.2 ms, while Simulink is using a finer time step. A summary of the simulation data follows.

SIMULATION DATA

Simulation time: 0 to 80 ms. (400 MagNet time steps).
Total solve time: 12 minutes.
CPU: AMD Athlon© XP 2800+ 2.08 GHz.
Average number of elements in MagNet: 4440.
Average number of unknowns in MagNet: 2300.

discover the power of our products

Offers & links

Member associations