Sie sind auf Seite 1von 13

Hardware-in-the-Loop Simulation

1. Introduction

Modern machines and systems are steered by computers with complex


control systems. Hardware In the Loop (HIL) simulation is a technique that is
used for the development and testing of these control systems. With HIL
simulation the physical part of a machine or system (or plant) is replaced by
a simulation.

HIL Testing

What is HIL Testing?


Hardware-in-the-Loop (HIL) simulation is a technique that is used for testing
control systems. Carrying out a HIL simulation to test a control system is
called HIL testing.
The machine or physical part of the system (which we call the plant) is
normally connected with the control system, through actuators and sensors.
With HIL testing the plant is replaced by a simulation of the plant (which we
call the HIL simulator). If the HIL simulator is designed well, it will accurately
mimic the plant, and can be used to test the control system. Some HIL
simulators are equipped with 3D visualization and represent the plant so
well that they can be used for training. These HIL simulators are
called training simulators.

2. Why Perform Hardware-In-The-Loop Simulation? Benefits


With a simulated plant you can run tests that would destroy a real plant or
would be harmful for people in a real situation. That is why HIL simulation
can greatly enhance the safe operation of machines. However there are
more benefits:

2.1. Increase Safety


In systems like heavy lift cranes where personnel safety is of the utmost
importance, HIL simulation is extremely useful. Testing these machines is
potentially dangerous and requires extensive safety procedures. Using HIL
simulation, tests can be carried out without harming people or equipment
during all stages of a design.

Figure 1: Large machines should have the highest safety precautions.

HIL simulation will also allow tests that would normally destroy or damage
the real machine. Testing beyond the normal range of operation can reveal if
the control system can safely operate the machine. This is closely related to
failure model and effects analysis. With HIL simulation, the correct action of
a control system to various failure modes can effectively be tested. This
makes HIL simulation and effective technique to increase the safety of
machines and systems.

2.2. Enhance Quality


If HIL simulation is embedded in a model based design process, it can be
used already during the early stages of design. The HIL simulator will grow
with the design of the real plant and can be used by control engineers to
continuously test their control systems. These test will reveal problems and
errors that would otherwise have been detected at the final stages of a
design where the control system and plant are integrated.

HIL simulation can be deeply embedded in the design process by test


automation. Using scripts numerous tests can be carried out. The process
can be fully automated by including it in the build system of the controller
design. Every time a change is made to the control system software and the
results are stored in SVN, the build system will compile a new version of the
control system and use the HIL simulator to automatically test it. The control
engineer will see the results as web pages or documents in any form. These
tests can verify if the control system still meets the specifications and check
the response against failure modes. In this way, a control engineer gets an
immediate response to the changes made on the control system software
and make corrections if needed. It has been verified in numerous research
projects that the early detection of problems and errors and acting
correspondingly will lead to a significant increase in the quality of machines
and systems.

2.3. Save Time


The cost of errors increase with the time it takes to discover them. Errors
wich are found during commissioning are notorious for the delays in time
they can cause. In most companies, machines and control systems are
developed in parallel, which means errors in the control system can only be
found during commissioning. With HIL simulation, errors can be found early-
on and solved early-on. HIL simulation is therfore an effective technique to
reduce the commissioning time.

2.4. Save Money


Testing a real plant can be very expensive. It may require many costly
prototypes, the running costs may be high or expensive safety precautions
may have to be taken. HIL simulation can be a real money saver when
testing expensive machinery. Another money saver comes from the working
hours. HIL simulation will normally require more work during the early
stages of design but save a lot of work during the implementation phase of
a design. Working hours during implementation are generally much more
costly than working hours during the early phases, especially if the
implementation is at remote locations.

2.5. Human Factor


In most testing procedures, human interaction is not included. HIL
simulation, however, can be used to test the human interaction on
machines. This allows control engineers to test if their machines can be
operated easily and comfortably. If the HIL simulation is extended with
visualization screens they can be used to train operators. These HIL
simulators are called training simulators.

3. HIL Simulator
PC based
The HIL simulator is generally a PC computer with a Windows or Linux
operating system. On this PC a simulation environment is installed, which is
used to run the plant model. The connection with the control system is
provided by IO which is connected with the fieldbus of the controller. The
simulation environment provides the proper communication between the
plant model and the IO.

Use HIL simulation to test the design of your controller when you are
performing Model-Based Design (MBD). The figure shows where HIL
simulation fits into the MBD design-to-realization workflow.

Validation involves using actual plant hardware to test your controller in


real-life situations or in environmental proxies (for example, a pressure
chamber). In HIL simulation, you do not have to use real hardware for your
physical system (plant). You also do not have to rely on a naturalistic or
environmental test setup. By allowing you to use your model to represent
the plant, HIL simulation offers benefits in cost and practicality.

Automotive examples
Embedded Control Systems
Testing Embedded Control Systems
System Level Testing

What if the DC Motor is not available yet? What if test failures could
damage the DC Motor?
What if the DC Motor is very expensive (capital, maintenance, operation,
facilities)?
What if DC Motor conditions are not repeatable?
What if there are numerous variations of the DC Motor?
Component Level Testing

Component Level Testing Challenges

Virtual Reality for your UUT


What does your UUT know about the world around it?
Testing Embedded Control Systems
Virtual System Level Testing

What is a Model?
System Modeling Tools

Reduce Cost & Risk with HIL Testing


Increase reliability and quality
- Better test coverage
- Test repeatability
Develop more efficiently
- Shorten validation process
- Identify design issues earlier
Lower cost to innovate

Hardware-In-the-Loop is a form of real-time simulation. Hardware-In-the-Loop differs


from real-time simulation by the addition of a real component in the loop. This component
may be an Electronic Control Unit (ECU) if the test is performed in an
Automotive/Avionic domain or a "Programmable Logic Controller" (PLC) if its a process
control domain.

The reason the use of a HIL process is becoming more prevalent in all industries is driven
by two major factors: time to market and complexity.
As systems are getting more and more complex and time to market for a new product is
reducing rapidly, HIL testing is a nice way to directly evaluate a system at component level
by giving it input of all the possible situations it can face and then analyzing the
performance.
A typical HiL system comprises of two components

1. A device under test ( DuT)


2. A Test System ( Mimics the plant or the realtime enviroment in which the DuT
is intended to function)

A typical schematic of an automotive HiL is as shown in the image


Hardware-in-the-loop (HIL) testing has become an essential verification step
in the development of vehicle electronics and software systems if the
controller to be tested is implemented in the controller hardware, often
denoted the electronic control unit (ECU), and the simulator must run in real
time. The setup of HIL simulation environment makes functional testing and
development of ECUs possible, and realized hardware and software
integrated with ECUs.
The Figure below shows that the plant is simulated and the ECU is real. The
purpose of a Hardware-In-the-Loop system is to provide all of the electrical
stimuli needed to fully exercise the ECU. In this way you fool the ECU into
thinking that it is indeed connected to a real plant. The HIL simulation
includes a mathematical model of the process and a hardware device/ECU
you want to test, e.g. an industrial PID controller in our case.
After the ECU functions have been developed and implemented on the
production ECU, they have to be tested thoroughly. With hardware-in-the-
loop (HIL) simulation, you can easily cover all the different motor varieties
and their ECUs. The ECUs environment (interacting components or even a
whole system), is simulated. This has several advantages:

1. Function tests are possible at an early development stage, even before all
parts are available in reality.

2. Laboratory tests reduce time and cost and take place under controlled
conditions.

3. Failures, and the ECUs behavior in what are normally dangerous


situations, can be tested with no risk for the driver or the controlled
machine.

4. The tests are reproducible and can be automated.

Das könnte Ihnen auch gefallen