• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Analog IC Tips

Analog IC Design, Products, Tools Layout

  • Products
    • Amplifiers
    • Clocks & Timing
    • Data Converters
    • EMI/RFI
    • Interface & Isolation
    • MEMS & Sensors
  • Applications
    • Audio
    • Automotive/Transportation
    • Industrial
    • IoT
    • Medical
    • Telecommunications
    • Wireless
  • Learn
    • eBooks / Tech Tips
    • FAQs
    • EE Learning Center
    • EE Training Days
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • LEAP Awards
    • Podcasts
    • White Papers
  • Video
    • EE Videos
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Engineering Training Days
  • Advertise
  • Subscribe

How do MIL, SIL, PIL and HIL simulation and testing relate to MBSE?

September 14, 2022 By Jeff Shepard Leave a Comment

Model-based systems engineering (MBSE) supports requirements development, design, analysis, verification, and validation of complex systems, especially cyber-physical systems and systems of systems. Verification (simulation) and validation (testing) are key elements of MBSE. Model in the loop (MIL), software in the loop (SIL), processor in the loop (PIL), and hardware in the loop (HIL) simulation and testing take place at specific points during the MBSE process to ensure a robust and reliable result.

This FAQ looks at the origin of these testing and simulation activities in model based design (MBD) processes for large software projects, followed by a discussion of how each is implemented during MBSE and closes by considering how this methodology results in cost savings in addition to improved system design outcomes.

In MBSE, models are software representations of system elements such as electrical, electronic, mechanical, hydraulic, optical, etc. MBD leverages simulation to predict the operation software on a to-be-constructed physical system or system element.

The term ‘in-the-loop’ originally referred to the software environment, the controlled system, or the hardware to be simulated. Today, it increasingly refers to the complete software and hardware models and physical system. The combined models of the various system elements comprise the digital twin of the ultimate system. MIL, SIL, PIL, and HIL simulation and testing are used sequentially to validate the results of the MBD process, often as part of an overall MBSE effort. If a simulation does not produce the desired result or requirements are modified, it can be necessary to go back to the previous MBD step until the required result is achieved. All four testing and simulation steps must be successfully completed prior to the start of system integration (Figure 1).

Figure 1: MIL, SIL, PIL, and HIL simulations must all be completed successfully before proceeding to system integration. (Image: Algorithm)

Model-in-the-Loop

MIL testing and simulation is the first point for software verification and validation. It consists of testing individual or integrated model modules in a development environment, such as ASCET from ETAS or MATLAB Simulink from Mathworks. For example, after a plant model has been developed, MIL is used to validate that the controller module can control the plant as desired. It verifies that the controller logic produces the required functionality.

Software-in-the-Loop

Following model verification, SIL generates code from the controller model and uses that code in place of the controller block. SIL testing consists of verifying the functionality of embedded software, algorithms, control loops, and other system elements on a personal computer or other platform without using the actual control hardware. It consists of simulating the software as C code and the plant as a software model. Suppose there are any anomalous results from SIL. In that case, it can be necessary to return to the MIL step, make adjustments as indicated by the SIL results, reconfirm that the adjustments still produce acceptable results from MIL testing, and then repeat the SIL verification process. In complex systems, it can be necessary to repeat this circular process several times. Once acceptable results are obtained for both MIL and SIL verification, the next step is PIL.

Processor-in-the-Loop

Depending on the system architecture, PIL can also be referred to as FIL (FPGA-in-the-loop) testing. In this step, the embedded software, algorithms, control loops, and other system elements are run as a closed-loop simulation on the actual processor (or FPGA) hardware instead of on a personal computer or other platform. This ensures that the hardware can run the controller software without glitching and that the outputs are as expected. Problems at this stage can identify a processor that may not be capable of performing the required tasks, or it can identify the need for software modifications. If software modifications are needed, it can be necessary to return to SIL or even MIL testing before returning to PIL.

In parallel with the development and validation of the control software using MIL, SIL, and PIL testing, the various hardware systems and subsystems are being modeled and validated using MBSE tools and techniques. Before beginning the system integration process, HIL testing is usually the final validation and verification step.

Hardware-in-the-Loop

HIL testing occurs before connecting the embedded processor to the actual hardware by running a simulated plant model on a real-time system such as Typhoon, OPAL-RT, dSPACE, Plexim’s RT Box, Speedgoat, and NI. Most of these tools work with simulation models created using platforms such as ASCET or MATLAB Simulink. HIL includes deterministic simulations and real physical connections to the embedded processor, such as analog inputs and outputs, communications interfaces, etc. It captures the real-time interaction between the control software and the actual hardware environment and can identify glitches and other problems that can elude detection in simulations. For example, delays and attenuations can be added to an analog channel that can cause instabilities in the control loop. HIL testing is required in automotive and aerospace applications, especially for safety-critical functions. As various subsystems are integrated, it may be necessary to return to HIL testing if a problem occurs. In extreme cases, it can be necessary to return to an even earlier stage in the MIL, SIL, and PIL process.

Importance of early and thorough design verification

MBE approaches can provide early design verification and speed the development process. MBSE, for example, is particularly valuable in numerous scenarios such as:

  • Complex systems. Increasing functional complexity from generation to generation can exponentially complicate the design process, especially when new functionalities are added on top of an existing system, such as vehicles with more and more advanced driver assistance system (ADAS) functions that must work in harmony and share access to multiple electronic control units (ECUs).
  • Stricter safety and performance requirements. Safety and performance expectations for aerospace systems, vehicles, and even Industry 4.0 cyber-physical systems are increasingly complex. MBSE tools support early-stage testing and simulations that can save time and expense while still meeting challenging performance and safety requirements.
  • Cost and time to market. Better, faster, cheaper has been the mantra of the electronics industry for decades, and that same expectation now extends to complex systems. The use of MBD and MBSE enables faster development of increasingly complex cyber-physical systems and systems of systems, and that in turn supports better system performance and reduced costs.

Using models in place of hardware prototypes in the design environment inherently reduces costs and increases flexibility. That can be especially important for the development of software prior to integration with actual hardware. Once the software models have been validated through the MIL, SIL, PIM, and HIL processes, hand coding is not necessary. The embedded code can be automatically generated, producing a more uniform code and software structure, and reducing the overall time needed to produce the final code. That benefit carries throughout the software development life cycle from the initial definition of requirements to the completed integration process and deployment (Figure 2).

Figure 2: Using MBD and MBSE throughout the software development lifecycle brings numerous benefits. (Image: L&T Technology Services)

More about HIL

The use of HIL for software validation can be especially important for ensuring performance and reducing risk when the time comes for actual system integration. Testing new designs on vehicles or aircraft is fraught with challenges and expensive. A first approximation to address this challenge is using models in the loop (MIL). However, MIL testing and simulation are limited in their potential to identify higher-level system integration problems. HIL bridges that gap. For example, HIL enables the electronics controller design team to work collaboratively with the mechanical team when creating a new ECU. The concept of an ECU can extend from simple window opening/closing features to complex flight controllers. A sophisticated HIL controller enables the test engineer to intentionally inject problems such as faults or alarms into the test to find out how the ECU reacts (Figure 3). This can be especially important in safety-critical systems where some faults may be expected to occur only on very rare occasions.

Figure 3: HAL enables more thorough testing and simulation prior to hardware integration, speeding the process and reducing costs. (Image: Genuen)

Early defect discovery and cost savings

MBD and MBSE use models throughout the design process to reduce ambiguity in product functionalities and specifications and support simulations at every stage to verify and validate performance. The earlier use of models enables the examination of various solutions and possible system architectures. Using a common toolchain from conceptualization and development through the operational stages of the system lifecycle also enables greater collaboration between diverse design teams and faster design iterations. The faster development process produces cost savings since MBSE enables the discovery of model defects earlier than the traditional Software Engineering Institute (SEI) industry averages (Figure 4). Savings result from better requirements analysis plus continuous testing, validation, and verification.

Figure 4: MBSE shifts defect discovery earlier in the process where corrections are less costly and have less impact on time to market. (Image: MathWorks)

Summary

MIL, SIL, PIL, and HIL testing and simulation were originally developed for use with large-scale software projects. Today, they are also combined with the other elements of MBSE for the creation of complex cyber-physical systems and systems of systems. There are numerous ways that the combination of MBD and MBSE contributes to reduced development times and improved system performance throughout the software and system life cycle.

References

Hardware-in-the-loop and MBSE, Siemens
Measuring the Return on Investment of Model-Based Design, MathWorks
Mission Engineering, Digital Engineering, MBSE, and the Like: The One Underlying Essential Attribute, Boeing
Model-Based Design and MIL to HIL, Algorithm
Model based systems engineering for accelerating software development, L&T Technology Services
What are MIL, SIL, PIL, and HIL, and how do they integrate with the Model-Based Design approach?, MathWorks
What is Hardware-in-the-Loop (HIL) Testing?, Genuen

 

You may also like:


  • What’s a digital shadow and how does it relate to…

  • How do the military and aerospace use MBSE?

  • How do SysML and model-based design relate to MBSE?

  • How do digital threads & digital twins fit in MBSE?

  • What’s MBSE and what does it mean for designers?

Filed Under: FAQ, Featured, Simulation, Tools Tagged With: FAQ

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Design a circuit for ultra-low power sensor applications

Active baluns bridge the microwave and digital worlds

Managing design complexity and global collaboration with IP-centric design

PCB design best practices for ECAD/MCAD collaboration

Open RAN networks pass the time

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE LEARNING CENTER

EE Learning Center
“analog
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

EE ENGINEERING TRAINING DAYS

engineering

RSS Current EDABoard.com discussions

  • Power Management Dilemma for Pet Feeder
  • PCB layout impact on RF path impedance
  • Op-Amp oscillating
  • Current driver for generator windings
  • Cheap sensor for measuring low pressure to rough vacuum?

RSS Current Electro-Tech-Online.com Discussions

  • need two ICs
  • Converting 1vac to 24vac
  • AC Input Relay Device Required
  • WTB: "The Theory Of Servicing AM, FM, And FM Receivers" by Clarence R. Green and Robert M. Bourque
  • MLT-8530 Buzzer on ESP32: Why Is the Sound Output Lower Than Expected?
“bills

Footer

Analog IC Tips

EE WORLD ONLINE NETWORK

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Battery Power Tips
  • Connector Tips
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

ANALOG IC TIPS

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy