HIL Emulation on SoC FPGA
For the development of inverter controllers, a cost-effective way of testing was needed: developers should be able to test their software on a test setup right at their desk. In many cases, this makes an elaborate and expensive motor test bench unnecessary and shortens development time. At the same time, the test system can be integrated into an automated CI test environment.
An SoC FPGA emulates the power stage, including motor and load, in real time. The controller “sees” the same signals as in the real drive.
- Test early: verify control and software before prototype hardware is available
- Test safely: no high voltages and no rotating machines at the workplace
- Test reproducibly: repeat operating points and load profiles identically as often as required
- Test automatically: connection to test automation via an RPC interface or a real-time bus system
System Architecture
At its heart is an FPGA SoC that combines FPGA logic and a dual-core processor on a single chip:
- FPGA logic: captures the controller’s PWM gate signals with 10 ns resolution, computes the power stage and the electrical motor model in a 100 ns cycle and returns phase currents, voltages and encoder signals to the controller.
- Real-time core (CPU 1, 100 µs): one CPU core is reserved exclusively for the real-time task. It computes the mechanics and the load model and exchanges torque and speed with the FPGA model via an internal interface.
- Linux core (CPU 0): the second core runs Linux with a web interface, RPC interface and data logging.
Real-Time Models
- Power stage: 2-level inverter (3-phase) and DC/DC converters
- Motors: permanent magnet synchronous machine (PMSM), induction machine (IM), synchronous reluctance machine (SynRM)
- Loads: inertia, constant torque, constant speed
Interfaces to the Device Under Test
- PWM inputs for the gate signals of the control board
- Analog outputs for phase currents, phase voltages and DC link voltage
- Analog inputs, e.g. for resolver excitation
- Encoder emulation: incremental, resolver, sin/cos and digital protocols
- Ethernet: operation via the web interface in the browser, test automation via RPC
- Real-time bus (e.g. EtherCAT): connection to test automation, including complex multi-axis systems in robotics
Multi-Axis Systems in Robotics
Any number of HIL systems can be coupled into a network via the real-time bus. Each system emulates a joint drive, for example of a humanoid robot, and is connected to the corresponding drive controller. A central test controller coordinates all axes together. This makes it possible to test the interaction of the drives and complete motion sequences without having to build the robot itself.
Interested?
Would you like to test your inverter controller with a HIL emulation, or do you need a customized solution? Send us your inquiry.