Hardware in the loop

from Wikipedia, the free encyclopedia

( HiL , also HIL , HitL , HITL ) describes a process in which an embedded system (e.g. real electronic control unit or real mechatronic component, the hardware ) is connected to an adapted counterpart via its inputs and outputs. The latter is generally called the HiL simulator and is used to simulate the real environment of the system. From the test point of view, hardware in the loop is a method for protecting embedded systems, for support during development and for the early commissioning of machines and systems.

Areas of application

HiL is used in the following areas.

Embedded Systems

The system to be controlled (e.g. car) is simulated using models in order to test the correct function of the control unit to be developed (e.g. engine control unit). The HiL simulation usually has to run in real time and is used in development to shorten development times and save costs. In particular, recurring processes can be simulated. This has the advantage that a new development version can be tested under the same criteria as the previous version. Thus, it can be shown in detail whether an error has been fixed or not (see also error re , English re-testing ).

The inputs of the control unit are stimulated with sensor data from the model. The regulator loop ( English loop ) to close, the reaction of the outputs of the control unit, z. B. the control of an electric motor, read back into the model.

The HiL simulator therefore consists of a computer that can meet the real-time conditions of the respective application (increasingly also PC-based), digital and analog input and output interfaces to the control unit and equivalent loads that simulate the control unit's internal output stage diagnosis that all actuators are correct are connected.

The tests on real systems can be greatly reduced and system limits can also be determined without endangering the target system (e.g. car and driver).

The HiL simulation is always just a simplification of reality and therefore cannot replace the test on the real system. If the discrepancies between the HiL simulation and reality are too large, the underlying models in the simulation are overly simplified. Then the simulation models have to be further developed.

Automotive sector

With the rapid increase in electronic control units and the increasing range of functions, especially in drive electronics, with a wealth of new rule-based functions, hardware in the loop was introduced at the beginning of the 1990s as a measure to improve test options in the automotive sector. HiL is used for the test in two main forms.

1. Adaptation of an electronic system (e.g. engine, transmission or brake electronics) to a HiL simulator as a so-called component or module test bench.

2. Adaptation of several electronic systems to one or more coupled HiL simulators as a so-called integration test bench. The electronic systems generally belong to the same sub-area of ​​the automobile (drive electronics, comfort or body electronics, infotainment electronics). The use of the designation HiL in connection with convenience and infotainment electronics is common in everyday language, but due to the lack of real control loops in these systems it is only correct in some cases.

3. Adaptation of real test drives to one or more coupled HiL simulators as a so-called real test bench.

When performing tests with HiL, the tests performed manually in the initial phase are replaced by automatic test sequences. This process is called test automation . This means that tests can be parameterized in almost any way and repeated precisely. A control of the error correction is thus much better possible. The test automation helped the HiL test procedure to breakthrough and made the test procedure accompanying development an integral part of the testing process.

Due to the high quality of the models used in the vehicle dynamics or engine area, the HiL method has been used more and more in the development of new control algorithms since the early 2000s. This now leads to a considerable reduction in development times.

In addition to the simple connection of the electronic control unit to a HiL simulator, there is also a variant of the mechatronic process. Part of the mechanics is also integrated into the control loop here. This method is often used in electronic steering systems, where part of the steering linkage is coupled to the HiL simulator as real mechanics.

Mechanical and plant engineering

In machine and plant construction, a programmable logic controller is usually connected to a physical model of a machine or plant via a fieldbus for hardware in the loop . The term plant simulation is also used for this . The system simulation usually contains an illustration of the behavior and the material flow. An observer can then monitor the machine function via an optional 3D visualization and outputs from the physics simulation.

The purpose is to create and test control programs before the components of a machine are manufactured and assembled. This enables the commissioning phase to be shortened. Another advantage is the ability to test borderline situations without endangering the operator, such as B. moving to hardware limit switches.

Future fields of application can include remote diagnosis and remote maintenance of machines and systems. The current status of a controller is transmitted from the machine operator to a service center at the machine manufacturer via a telecommunication line (e.g. via the Internet). Initial diagnoses can then be made there based on the physical model and recommendations derived.

Aerospace

In the aerospace industry, HiL systems test conditions that cannot always be replicated on the ground. For the approval of the flight control, the Iron Bird is already being replaced by the virtual or electronic bird for the Superjet 100 .

Power electronics

HIL systems are increasingly being used to simulate power electronic systems. The use cases are mostly

  • Virtual initial commissioning to save time later in the field. The advantage applies particularly to offshore facilities with poor accessibility.
  • Automated software tests to ensure software quality
  • Certificate transfers for admission / homologation tests. The legal framework conditions for the application in the approval test are currently still in development (as of 2020).

The HIL systems can be a single system such as B. emulate a wind energy converter, larger systems can simulate complete microgrids. B. a combined simulation of complete wind parks, storage systems, solar panels and emergency power generators.

Special features of the HIL real-time simulations of IGBT-supported converters are the high hardware requirements, the computing steps must be much shorter than the PWM frequency, which is mostly in the kilohertz range. Signal acquisition must therefore be performed on a fast processor, usually an FPGA. The model can be downsampled with a mean value model on a slower coprocessor - or, if the model is optimized, also on the FPGA.

System architecture of HIL simulators

The system architecture of commercially available HIL simulators varies, here is a selection:

  • Nvidia : The HIL simulators are primarily used for the development of driver assistance systems and autonomous driving. Primarily GPU-based, a 3D model of the street / surroundings is calculated on a game console, similar to a racing game. All vehicle sensors (lidar / radar / etc.) are fed directly with calculated model data, the connected vehicle control units can be operated close to the field. Different weather situations and route profiles can be driven automatically with physically available control units.
  • dSpace : The larger real-time simulators are mostly based on a combination of Intel XEON and FPGA processors, the systems can be put together in racks according to the application. The toolchain is based on Matlab and is supplemented by its own libraries. DSpace systems are widely used in the automotive industry.
  • Opal : Mostly an interplay of ARM processors and FPGAs, areas of distribution include energy and vehicle technology.
  • Typhoon : FPGA in cooperation with coprocessors; on the software side, there are proprietary models with interfaces and integration options for C / Python / Matlab programs. The focus is on power electronics. The offer ranges from smaller real-time simulators to custom systems for large microgrids. SIL solutions are also possible.
  • PLECS : RT-Box, Xilinx Zynq System-on-Ship with FPGA and several CPU cores, solved on the software side through Matlab connection with additional proprietary additional libraries. The focus is on power electronics. SIL solutions are also possible.
  • Micronova : Various systems for simulating vehicle components and solutions for electrified drives are available.
  • Siemens : For simpler applications, the classic in-house PLC solutions from Siemens are often used throughout the industry; the company's newer products include the virtual commissioning of fully automated production lines including extensive software libraries.

The majority of the simulators simulate Matlab models. These are mostly compiled with third party software or in-house compilers for the processor systems used (FPGA, GPU, ARM etc.) and transferred to the HIL memory. After compilation, a SCADA interface is opened on the user PC in order to interact with the model manually or automatically. In most market solutions, the SCADAs are based on the Python programming language .

Due to the mostly open interfaces and the widespread use of Python, several tools can usually be used for SCADA and / or test automation tools. One example is the Micronova EXAM from the VW Group and widely used in Germany. Many HIL manufacturers also offer their own solutions, and end customer developments are also common.

In many cases, larger industrial HIL systems consist of hardware and software from different manufacturers. Special modules handle the bus communication to the tested control units, other HIL modules compute the physics models in real time, and other modules handle the physical signal routing between the control units and the simulators. However, there are also all-in-one solutions for smaller projects.

HiL versus real world

Thanks to technological progress and the development of powerful microprocessors, it is now state of the art that HiL systems are increasingly replacing the real environment. Especially for the development of electronic control units, the HiL simulator enables the creation of an ideal test environment in the laboratory. Depending on the system requirements, the calculation time of a complete simulation cycle is in the range of 1 ms; for special applications it can be in the microsecond range.

Regardless of the technical possibilities, however, the HiL simulator always only represents a limited and largely reduced section of the real environment. Particularly with functions in which the customer interacts with the technology, the limits of the simulation capability are quickly reached.

An environmental simulation is always based only on the available knowledge, collected measurement and experience values, which are converted into simplified mathematical formulas and then found as models in the HiL simulator. Because of this, and despite the advances in environmental simulation, the HiL simulator can only replace the test in the real world to a limited extent.

Software in the loop

In contrast to the HiL, the Software in the Loop (SiL) method does not use any special hardware. The original control unit code is written into a file using an automated coding process, usually a DLL. This DLL can be integrated into a simulation tool (e.g. Matlab Simulink) in an environment model. The DLL is then tested in the purely virtual model world. In contrast to the HiL method, no control unit or real-time simulator is required.

SiL simulators do not run in real time, the simulation can be stopped at any time for debugging. Hardware-related runtime problems or variable overflows that appear on the real ECU can hardly be detected with SiL simulations.

Further advantages of SiL are, among other things, that the target hardware does not have to be fixed and that the costs are much lower due to the lack of a simulation environment. The model of the route used here can also be used in the HiL, so that the individual test runs can be compared with one another.

See also

literature

  • K. Borgeest: Electronics in vehicle technology. 2nd Edition. Vieweg-Teubener, Wiesbaden 2010, ISBN 978-3-8348-0548-5 .
  • J. Schäuffele, Th. Zurawka: Automotive Software Engineering. 4th edition. Vieweg-Teubener, Wiesbaden 2010, ISBN 978-3-8348-0364-1 .

Web links