MATLAB: How MIL,SIL is a Closed Loop Testing

MATLABsimulinkstateflow

Closed Loop Testing

Best Answer

I will give you an overall idea about the MIL SIL PIL and HIL. I have read it somewhere and sharing it with u. By reading this u will get the clear idea of what actually is plant model and what is controller model and how design testing flow works.
If you are designing the controller from scratch then you develop the model of the plant and controller (say using Matlab,SIMULINK) and use MIL to verify or test whether it is implementable. Whereas if you already have the controller model you can skip MIL and go to SIL.
Once your model is verified, the next stage is SIL where you develop a software/HDL code depending on the processor or FPGA you plan to use for final hardware implementation and run the simulations for the controller model (with the plant still a software model) with this code to verify it. If you experience any glitches you may have to go back to MIL and make necessary changes. If you have a model which has been tested for SIL also then you can skip this and go directly to PIL.
Once your controller is verified for its SIL implementation, you proceed to the next stage i.e., PIL where you load the developed code onto the processor/FPGA and run the simulations on the modeled plant for verification. If there are glitches then go back to your code, SIL or MIL and rectify them. If you have an FPGA or a processor ready then you can skip this and go directly to HIL.
Once your plant model has been verified using PIL, now you can replace the plant model with the original hardware ,say lab model, (say,if its a DC motor whose speed controller is being designed, then controller is in FPGA/processor which is now interfaced to the DC motor by connecting the inputs and outputs/states at the right points of sensors/transducers) and conduct the HIL test for verification.
Once you complete all the above tests, your controller is said to be ready for hardware implementation.
If supposing you give National Instruments your plant specifications and controller requirements, they may design an FPGA based on Labview and give it to you.In that case you can directly run the HIL and verify.
Related Question