This example shows how to model an electric vehicle dynamometer test. The test environment contains an asynchronous machine (ASM) and an interior permanent magnet synchronous machine (IPMSM) connected back- to-back through a mechanical shaft. Both machines are fed by high- voltage batteries through controlled three-phase converters. The 164 kW ASM produces the load torque. The 35 kW IPMSM is the electric machine under test. The Control Machine Under Test (IPMSM) subsystem controls the torque of the IPMSM. The controller includes a multi-rate PI-based control structure. The rate of the open-loop torque control is slower than the rate of the closed-loop current control. The task scheduling for the controller is implemented as a Stateflow™ state machine. The Control Load Machine (ASM) subsystem uses a single rate to control the speed of the ASM. The Visualization subsystem contains scopes that allow you to see the simulation results.