Hardware-in-the-Loop (HIL) testing has become a standard approach for motor controller development. Speedgoat test systems with configurable I/O modules and Simulink® Programmable FPGAs offer a powerful and scalable platform to simulate motors and inverters in deterministic real-time. You can easily interface the virtual signals with your actual embedded motor controller. The demonstration focuses on a field-oriented controller algorithm deployed to a TI C2000 microcontroller controlling a PMSM with a two-level 3-phase inverter via CAN bus communication.
We show how to set-up the HL test bench using first using an ideal inverter model and then by deploying a high fidelity model to the FPGA. We demonstrate the entire workflow, from the controller requirements, simple controller performance assesment, current and torque ripple minimization and robustness to fault injection. At each step, we compare the results against the initial specifications and we show how to easily implement test automation.