In software testing, it’s important to begin testing at an early stage in the development process. Similarly, in the automotive industry, testers need to use various test environments that are appropriate for different stages of development in the Model-Based Design approach. These are some common test environments used for testing before the model is deployed to hardware for the production:
- Model in the Loop (MIL)
- Software in the Loop (SIL)
- Processor in the Loop (PIL)
- Hardware in the Loop (HIL)
In this post, I want to talk more about those environments.
In this environment, the System Under Test (SUT) -Plant & controller model are developed in a simulation environment which is executable but not compiled for a special hardware. In this environment, the plant and controllers are put in the loop off test in the simulated model.
In this environment, we generate code only from the controller model and replace the controller block with this code (e.g: C files). Then run the simulation with the Controller block (which contains the C code) and the plant, which is still the software model. It is similar to the testing in the MIL. This test is to verify the control logic can be converted to code and if it is hardware implementable.
We are simple to compare the input and output of this environment with the result from MIL.
PIL introduces the target hardware into the testing environment. We will put the Controller model onto an embedded processor and run a closed-loop simulation with the simulated Plant. It provides valuable insights into the integration of software and hardware components. In this step, we will verify the processor is capable of running the developed Control logic.
HIL testing represents the final stage of testing before deployment. It involves testing the complete system, including both software and physical hardware components. We connect the embedded processor to the actual hardware and run the simulated plant model on a real-time system. This will help us to identify whether there are any issues related to the communication channels and I/O interface.