Embedded Target for Motorola MPC555 | ![]() ![]() |
The Embedded Target for Motorola MPC555 supports processor-in-the-loop (PIL) cosimulation, a technique that is designed to help you evaluate how well a candidate control system operates on the actual target processor selected for the application.
The Embedded Target for Motorola MPC555 (processor-in-the-loop) target is an extended version of the embedded real-time (ERT) target configuration, designed specifically for PIL cosimulation. We will refer to this target as the PIL target.
Why Use Cosimulation?
PIL cosimulation is particularly useful for simulating, testing and validating a controller algorithm in a system comprising a plant and a controller. In classic closed-loop simulation, Simulink and Stateflow model such a system as two subsystems and the signals transmitted between them, as shown in this block diagram.
Your starting point in developing a plant/controller system is to model the system as two subsystems in closed-loop simulation. As your design progresses, you can use Simulink external mode with standard Real-Time Workshop targets (such as GRT or ERT) to help you model the control system separately from the plant.
However, these simulation techniques do not help you to account for restrictions and requirements imposed by the hardware. When you finally reach the stage of deploying controller code on the target hardware, you may need to make extensive adjustments to the controller system. Once these adjustments are made, your deployed system may diverge significantly from the original model. Such discrepancies can create difficulties if you need to return to the original model and change it.
PIL cosimulation addresses these issues by providing an intermediate stage between simulation and deployment. The term "cosimulation" reflects a division of labor in which Simulink models the plant, while code generated from the controller subsystem runs on the actual target hardware. In a PIL cosimulation, the target processor participates fully in the simulation loop -- hence the term "processor-in-the-loop."
![]() | PIL Cosimulation | How Cosimulation Works | ![]() |