Hardware-in-the-loop simulation
Encyclopedia
Hardware-in-the-loop simulation
is a technique that is used in the development and test of complex real-time embedded systems. HIL simulation provides an effective platform
by adding the complexity of the plant under control to the test platform. The complexity of the plant under control is included in test and development by adding a mathematical representation
of all related dynamic systems. These mathematical representations are referred to as the “plant simulation”. The embedded system to be tested interacts with this plant simulation.
For example, a HIL simulation platform for the development of automotive anti-lock braking systems may have mathematical representations for each of the following subsystems in the plant simulation:
1. Cost
2. Duration
3. Safety
4. Feasibility
Cost of the approach will be a measure of the cost of all tools and effort. The duration of development and test affects the time-to-market for a planned product. The safety factor and duration are typically equated to a cost measure. Specific conditions that warrant the use of HIL simulation include the following:
An ideal condition to test the embedded system is to test it against the real plant but most of the time real plant itself imposes limitations in terms of the scope of the testing. e.g. in case of the engine control unit following condition may lead to dangerous test condition for the test engineer
- Testing at or beyond the range of the certain ECU parameters (e.g. Engine parameters etc)
- Testing and verification of the system at failure conditions
In the above mentioned test scenarios, HILs provides the efficient control and safe environment where test or application engineer can focus on the functionality of the controller.
prototype is made available for control system testing, 95% of the engine controller testing will have been completed using HIL simulation.
The aerospace and defense industries are even more likely to impose a tight development schedule. Aircraft and land vehicle development programs are using desktop and HIL simulation to perform design, test, and integration in parallel.
An example of usability testing
is the development of fly-by-wire flight controls. Fly-by-wire flight controls eliminate the mechanical linkages between the flight controls and the aircraft control surfaces. Sensors communicate the demanded flight response and then apply realistic force feedback to the fly-by-wire controls using motors. The behavior of fly-by-wire flight controls is defined by control algorithms. Changes in algorithm parameters can translate into more or less flight response from a given flight control input. Likewise, changes in the algorithm parameters can also translate into more or less force feedback for a given flight control input. The “correct” parameter values are a subjective measure. Therefore, it is important to get input from numerous man-in-the-loop tests to obtain optimal parameter values.
In the case of fly-by-wire flight controls development, HIL simulation is used to simulate human factors. The flight simulator includes plant simulations of aerodynamics, engine thrust, environmental conditions, flight control dynamics and more. Prototype fly-by-wire flight controls are connected to the simulator and test pilots evaluate flight performance given various algorithm parameters.
The alternative to HIL simulation for human factors and usability development is to place prototype flight controls in early aircraft prototypes and test for usability during flight test
. This approach fails when mesuring the three conditions listed above.
Cost: A flight test is extremely costly and therefore the goal is to minimize any development occurring with flight test.
Duration: Developing flight controls with flight test will extend the duration of an aircraft development program. Using HIL simulation, the flight controls may be developed well before a real aircraft is available.
Safety: Using flight test for the development of critical components such as flight controls has a major safety implication. Should errors be present in the design of the prototype flight controls, the result could be a crash landing.
Feasibility: It may not be possible to explore certain critical timings (e.g. sequences of user actions with millisecond precision) with real users operating a plant. Likewise for problematical points in parameter space that may not be easily reachable with a real plant but must be tested against the hardware in question.
systems is the next quantum leap in the evolution of HIL technologies. The ability to design and automatically test power electronics systems with HIL simulations will reduce development cycle, increase efficiency, improve reliability and safety of these systems for large number of applications. Indeed, power electronics is an enabling technology for hybrid electric vehicles, electric vehicles, variable speed wind turbines, solar photovoltaics, industry automation, electric trains etc. There are a least three strong reasons for using hardware-in-the-loop simulation for power electronics, namely:
The question is why are power electronics systems so different considering that HIL has been used in aerospace and automotive applications for decades? Power electronics systems are a class of dynamic systems that exhibit extremely fast dynamics due to high-frequency switching action of power electronics switches (e.g. IGBTs, MOSFETs, IGCTs, diodes etc.). Real-time simulations of switching transitions require digital processor speeds and latencies that can actually be met with off-the-shelf computer systems and with FPGA/CPU platform technologies making it 100 times faster than traditional computational methods to achieve high-resolution HIL for power electronics.
are often time-consuming, expensive and not reproducible, HIL simulators allow developers to validate new hardware and software automotive solutions, respecting quality requirements and time-to-market restrictions. In a typical HIL Simulator, engine dynamics is emulated from mathematic models, executed by a dedicated real-time processor. In addition, an I/O
unit allows the connection of vehicle sensors and actuators (which usually present high degree of non-linearity). Finally, the Electronic Control Unit
(ECU) under test is connected to the system and stimulated by a set of vehicle maneuvres executed by the simulator. At this point, HIL simulation also offers a high degree of repeatability during testing phase.
In the literature, several HIL specific applications are reported and simplified HIL simulators were built according some specific purpose. When testing a new ECU software release for example, experiments can be performed in open loop and therefore several engine dynamic models are no longer required. The strategy is restricted to the analysis of ECU outputs when excited by controlled inputs. In this case, a Micro HIL system (MHIL) offers a simpler and more economic solution. Since complexity of models processing is dumped, a full-size HIL system is reduced into a portable device composed of a signal generator, an I/O
board, and a console containing the actuators (external loads) to be connected to the ECU.
Simulation
Simulation is the imitation of some real thing available, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviours of a selected physical or abstract system....
is a technique that is used in the development and test of complex real-time embedded systems. HIL simulation provides an effective platform
Platform (computing)
A computing platform includes some sort of hardware architecture and a software framework , where the combination allows software, particularly application software, to run...
by adding the complexity of the plant under control to the test platform. The complexity of the plant under control is included in test and development by adding a mathematical representation
Representation (mathematics)
In mathematics, representation is a very general relationship that expresses similarities between objects. Roughly speaking, a collection Y of mathematical objects may be said to represent another collection X of objects, provided that the properties and relationships existing among the...
of all related dynamic systems. These mathematical representations are referred to as the “plant simulation”. The embedded system to be tested interacts with this plant simulation.
How HIL works
A HIL simulation must include electrical emulation of sensors and actuators. These electrical emulations act as the interface between the plant simulation and the embedded system under test. The value of each electrically emulated sensor is controlled by the plant simulation and is read by the embedded system under test (feedback). Likewise, the embedded system under test implements its control algorithms by outputting actuator control signals. Changes in the control signals result in changes to variable values in the plant simulation.For example, a HIL simulation platform for the development of automotive anti-lock braking systems may have mathematical representations for each of the following subsystems in the plant simulation:
- Vehicle dynamicsVehicle dynamicsVehicle dynamics refers to the dynamics of vehicles, here assumed to be ground vehicles. Vehicle dynamics is a part of engineering primarily based on classical mechanics but it may also involve chemistry, solid state physics, electrical engineering, communications, psychology, control theory,...
, such as suspension, wheels, tires, roll, pitch and yaw; - Dynamics of the brake system’s hydraulic components;
- Road characteristics.
Why use hardware-in-the-loop simulation?
In many cases, the most effective way to develop an embedded system is to connect the embedded system to the real plant. In other cases, HIL simulation is more efficient. The metric of development and test efficiency is typically a formula that includes the following factors:1. Cost
2. Duration
3. Safety
4. Feasibility
Cost of the approach will be a measure of the cost of all tools and effort. The duration of development and test affects the time-to-market for a planned product. The safety factor and duration are typically equated to a cost measure. Specific conditions that warrant the use of HIL simulation include the following:
- Enhancing the quality of Testing
- Tight development schedules
- High-burden-rate plant
- Early process human factors development
Enhancing the quality of Testing
Usage of HiLs enhances the quality of the testing by increasing the scope of the testing.An ideal condition to test the embedded system is to test it against the real plant but most of the time real plant itself imposes limitations in terms of the scope of the testing. e.g. in case of the engine control unit following condition may lead to dangerous test condition for the test engineer
- Testing at or beyond the range of the certain ECU parameters (e.g. Engine parameters etc)
- Testing and verification of the system at failure conditions
In the above mentioned test scenarios, HILs provides the efficient control and safe environment where test or application engineer can focus on the functionality of the controller.
Tight development schedules
The tight development schedules associated with most new automotive, aerospace and defense programs do not allow embedded system testing to wait for a prototype to be available. In fact, most new development schedules assume that HIL simulation will be used in parallel with the development of the plant. For example, by the time a new automobile engineInternal combustion engine
The internal combustion engine is an engine in which the combustion of a fuel occurs with an oxidizer in a combustion chamber. In an internal combustion engine, the expansion of the high-temperature and high -pressure gases produced by combustion apply direct force to some component of the engine...
prototype is made available for control system testing, 95% of the engine controller testing will have been completed using HIL simulation.
The aerospace and defense industries are even more likely to impose a tight development schedule. Aircraft and land vehicle development programs are using desktop and HIL simulation to perform design, test, and integration in parallel.
High-burden-rate plant
In many cases, the plant is more expensive than a high fidelity, real-time simulator and therefore has a higher-burden rate. Therefore, it is more economical to develop and test while connected to a HIL simulator than the real plant. For jet engine manufacturers, HIL simulation is a fundamental part of engine development. The development of Full Authority Digital Engine Controllers (FADEC) for aircraft jet engines is an extreme example of a high-burden-rate plant. Each jet engine can cost millions of dollars. In contrast, an HIL simulator designed to test a jet engine manufacturer’s complete line of engines may demand merely a tenth of the cost of a single engine.Early process human factors development
HIL simulation is a key step in the process of developing human factors, a method of ensuring usability and system consistency using software ergonomics, human-factors research and design. For real-time technology, human-factors development is the task of collecting usability data from man-in-the-loop testing for components that will have a human interface.An example of usability testing
Usability testing
Usability testing is a technique used in user-centered interaction design to evaluate a product by testing it on users. This can be seen as an irreplaceable usability practice, since it gives direct input on how real users use the system...
is the development of fly-by-wire flight controls. Fly-by-wire flight controls eliminate the mechanical linkages between the flight controls and the aircraft control surfaces. Sensors communicate the demanded flight response and then apply realistic force feedback to the fly-by-wire controls using motors. The behavior of fly-by-wire flight controls is defined by control algorithms. Changes in algorithm parameters can translate into more or less flight response from a given flight control input. Likewise, changes in the algorithm parameters can also translate into more or less force feedback for a given flight control input. The “correct” parameter values are a subjective measure. Therefore, it is important to get input from numerous man-in-the-loop tests to obtain optimal parameter values.
In the case of fly-by-wire flight controls development, HIL simulation is used to simulate human factors. The flight simulator includes plant simulations of aerodynamics, engine thrust, environmental conditions, flight control dynamics and more. Prototype fly-by-wire flight controls are connected to the simulator and test pilots evaluate flight performance given various algorithm parameters.
The alternative to HIL simulation for human factors and usability development is to place prototype flight controls in early aircraft prototypes and test for usability during flight test
Flight test
Flight test is a branch of aeronautical engineering that develops and gathers data during flight of an aircraft and then analyzes the data to evaluate the flight characteristics of the aircraft and validate its design, including safety aspects...
. This approach fails when mesuring the three conditions listed above.
Cost: A flight test is extremely costly and therefore the goal is to minimize any development occurring with flight test.
Duration: Developing flight controls with flight test will extend the duration of an aircraft development program. Using HIL simulation, the flight controls may be developed well before a real aircraft is available.
Safety: Using flight test for the development of critical components such as flight controls has a major safety implication. Should errors be present in the design of the prototype flight controls, the result could be a crash landing.
Feasibility: It may not be possible to explore certain critical timings (e.g. sequences of user actions with millisecond precision) with real users operating a plant. Likewise for problematical points in parameter space that may not be easily reachable with a real plant but must be tested against the hardware in question.
HIL in Robotics
Techniques for HIL simulation have been recently applied to the automatic generation of complex controllers for robots. A robot uses its own real hardware to extract sensation and actuation data, then uses this data to infer a physical simulation (self-model) containing aspects such as its own morphology as well as characteristics of the environment. Algorithms such as Back-to-Reality (BTR) and Estimation Exploration (EEA) have been proposed in this context.HIL in Power Electronics
Hardware-in-the-Loop Simulation for Power ElectronicsPower electronics
Power electronics is the application of solid-state electronics for the control and conversion of electric power.-Introduction:Power electronic converters can be found wherever there is a need to modify a form of electrical energy...
systems is the next quantum leap in the evolution of HIL technologies. The ability to design and automatically test power electronics systems with HIL simulations will reduce development cycle, increase efficiency, improve reliability and safety of these systems for large number of applications. Indeed, power electronics is an enabling technology for hybrid electric vehicles, electric vehicles, variable speed wind turbines, solar photovoltaics, industry automation, electric trains etc. There are a least three strong reasons for using hardware-in-the-loop simulation for power electronics, namely:
- reduction of development cycle,
- demand to extensively test control hardware and software in order to meet safety and quality requirements, and
- need to prevent costly and dangerous failures.
The question is why are power electronics systems so different considering that HIL has been used in aerospace and automotive applications for decades? Power electronics systems are a class of dynamic systems that exhibit extremely fast dynamics due to high-frequency switching action of power electronics switches (e.g. IGBTs, MOSFETs, IGCTs, diodes etc.). Real-time simulations of switching transitions require digital processor speeds and latencies that can actually be met with off-the-shelf computer systems and with FPGA/CPU platform technologies making it 100 times faster than traditional computational methods to achieve high-resolution HIL for power electronics.
HIL in Automotive Systems
In the context of automotive applications "Hardware-in-the-loop simulation systems provide such a virtual vehicle for systems validation and verification." Since in-vehicle driving tests for evaluating performance and diagnostic functionalities of Engine Management SystemsEngine Control Unit
An engine control unit is a type of electronic control unit that determines the amount of fuel, ignition timing and other parameters an internal combustion engine needs to keep running...
are often time-consuming, expensive and not reproducible, HIL simulators allow developers to validate new hardware and software automotive solutions, respecting quality requirements and time-to-market restrictions. In a typical HIL Simulator, engine dynamics is emulated from mathematic models, executed by a dedicated real-time processor. In addition, an I/O
I/O
I/O may refer to:* Input/output, a system of communication for information processing systems* Input-output model, an economic model of flow prediction between sectors...
unit allows the connection of vehicle sensors and actuators (which usually present high degree of non-linearity). Finally, the Electronic Control Unit
Electronic control unit
In automotive electronics, electronic control unit is a generic term for any embedded system that controls one or more of the electrical systems or subsystems in a motor vehicle....
(ECU) under test is connected to the system and stimulated by a set of vehicle maneuvres executed by the simulator. At this point, HIL simulation also offers a high degree of repeatability during testing phase.
In the literature, several HIL specific applications are reported and simplified HIL simulators were built according some specific purpose. When testing a new ECU software release for example, experiments can be performed in open loop and therefore several engine dynamic models are no longer required. The strategy is restricted to the analysis of ECU outputs when excited by controlled inputs. In this case, a Micro HIL system (MHIL) offers a simpler and more economic solution. Since complexity of models processing is dumped, a full-size HIL system is reduced into a portable device composed of a signal generator, an I/O
I/O
I/O may refer to:* Input/output, a system of communication for information processing systems* Input-output model, an economic model of flow prediction between sectors...
board, and a console containing the actuators (external loads) to be connected to the ECU.
External Links
- Why Test ECUs with Hardware-in-the-Loop Simulation ? HIL Testing
- About Hardware In the Loop “Hardware In the Loop”.