Hardware in the Loop Test for Motor Control Software

Motor Control Software Development Simplified

The miniHIL bridges the gap between model or software-in-the-loop testing and lab setup with real hardware when testing motor control software. It enables reliable testing of motor control software in interaction with driver software and microcontroller peripherals.

Here's how it works

Accelerating test cycles is at the heart of the automation strategy. It is important to be able to test every code change within minutes, rather than waiting weeks for results. This gives you early feedback and allows you to fix bugs quickly.

Challenges in test automation for embedded systems

Test automation for embedded systems such as engine control units is particularly demanding. Hardware-dependent tests involving a complete electronic unit, engines, pumps and hydraulic systems often take several weeks. In addition, there are often mechanical or environmental issues that can hinder automated testing, such as fluid leaks or component freezing.

This is where miniHIL comes in: it provides a hardware-independent test environment that simulates the real hardware, enabling fast and reliable test automation.

The solution

miniHIL is designed to replace real hardware components with simulations, enabling faster integration and deeper testing. This means you no longer have to rely on slow and expensive hardware testing, but can test software changes on actual processors. With miniHIL, you can simulate environments and test the entire software stack – including drivers, controllers and bus systems – in real time.

Advantages of simulation with miniHIL

A key advantage of the miniHIL test environment is the ability to inject faults. This means that developers can specifically interrupt sensor or control signals to check how the system responds to faults. This type of simulation enables deeper test automation, as not only the ‘happy paths’ but also fault scenarios can be tested.

Another crucial aspect is the ability to simulate closed control loops. This means that the simulation not only plays back signals, but also actively responds to control commands from the system. This realistically replicates the behaviour of a real motor, which is particularly important in the development of motor control systems.

Test levels and test methods

In order to fully grasp the complexity of embedded systems, work is carried out at various test levels:

Focus of Test Levels and Methods

  1. Unit tests and software integration tests: Testing individual software components that are easy to automate.
  2. Hardware-software integration tests: Integration tests of drivers, sensors and motor controllers that can be run on the miniHIL.
  3. "Large" hardware-in-the-loop test:
  4. System tests: These tests are more complex and difficult to automate, but remain indispensable for final system validation.

Application example: Testing motor controllers

A practical example of the miniHIL’s capabilities is test automation for BLDC motor controllers. Instead of a real motor, miniHIL simulates the motor and associated sensors, allowing tests such as temperature shutdowns and overcurrent tests to be performed in a fraction of the time. While conventional tests can take up to 30 days, miniHIL can reduce the entire test cycle to 50 minutes – a huge time saving that enables continuous integration and rapid feedback.

Beispiel 1: BLDC Motor

Beispiel 2: Field Oriented Control (FOC)

DC Motor mit Spring Reset

Example test cases for motor controls: Temperature monitoring and shutdown

Continuous Integration (CI) for complete test automation

The miniHIL can be seamlessly integrated into continuous integration (CI) workflows, which means that every code change can be tested automatically. This enables teams to test continuously and respond quickly to errors, even in distributed development environments. The ability to connect multiple miniHILs to a CI server allows parallel testing to be carried out in different projects.

More about continuous integration.

The automation of tests for embedded systems, especially for motor control systems, is a challenging task that can be solved efficiently and scalably with the miniHIL. By simulating hardware components, the miniHIL offers a powerful solution for accelerating development cycles and improving software quality.

PROTOS miniHIL 5V Adapter