This example shows how to control the rotor angular velocity in an interior permanent magnet synchronous machine (IPMSM) based electrical-traction drive. For evaluation of the outer loop velocity controller, the inner loop current controller is replaced by a three-phase controlled current source. An ideal torque source provides the load. The Scopes subsystem contains scopes that allow you to see the simulation results. The Control subsystem includes a PI-based outer loop controller. During the three-seconds simulation, the angular velocity demand is -1000, 2000, 3000, 4000, and then 5000 rpm.
The plot below shows the requested and measured speed for the test, as well as the phase currents in the electric drive.
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 100 microseconds.