Hardware in the Loop Simulation

A Hardware-in-the-Loop-Simulation (HILS) refers to a system in which parts of a pure simulation have been
replaced with actual hardware components. Before the availability of inexpensive digital computers, analog
computers were used to simulate both the dynamics and controls of systems. For analog computer
simulations, a HILS could be realized by replacing the dynamic plant, simulated by linear amplifiers and
filters, with actual hardware. The major drawback of the earlier analog HILS was that structuring
(programming) required connecting wires between circuit components.  For systems of considerable
complexity, the task could become overly difficult to manage.  Also non-linear characteristics of models or
other complex features were difficult to implement in analog computers. Today nearly all simulations are
done by digital computers.  Programming and complexity is now only limited by skill and imagination.

Why insert hardware into a simulation?

Pure simulation can be used to understand the behavior of a system if the system model is known, or to
predict an outcome under different internal and external influences. Simulation can reduce investment
risks. But if the simulation is being used as the basis for proving control feasibility, the risk of investment
can be further reduced utilizing a HILS approach.  For most real systems, there are characteristics that are
unknown or too complex to model by pure simulation. If for example we wish to develop controls for a head
positioner in a disk drive system, it would be foolish to build all the hardware at the start without
considering the system as a whole. Good system engineering practice would begin with a mathematical
model of the disk drive written as a simulation. As components become better defined (with the aid of this
simulation), they can be fabricated and replaced as components in the simulation. Once the physical
components are added to the loop, un-modeled characteristics can begin to be investigated, and controls
can be further refined. The use of HILS eliminates expensive and lengthy iterations in machining and
fabrication of parts, or design and fabrication of electronics and speeds development towards a more
efficient design. For controls, HILS is a method of rapid prototyping.

What are the costs?

Before the availability of inexpensive, super fast, desktop computers or laptops, computer based hardware
in the loop simulations required super-expensive computers. The cost of these systems ranged from
$50,000 to over $1000,000. Today Pentium based machines at multi Ghz clock speeds far exceed the
processing power of these older machines, and the interface to analog or digital I/O has also decreased
remarkably in price. Capability once only affordable by large aerospace or large volume manufacturers
can today be purchased by even the smallest of companies. A system including the computer, applications
software and I/O can be purchased for under $6000. I/O includes analog, discrete, and various bus
interfaces including RS-232, CAN, and even MIL 1553.

With minor additional costs, the HILS approach can further consider the choice of embedded processor
and I/O.  Digital signal processor (DSP) costs are low, and the applications software now supports code
development targeting these processors. DSP solutions are available as either standalone or PC-hosted
boards.

What about programming costs?

With capabilities provided by today’s block-diagram based software, such as VisSim, systems can be
rapidly developed using system level concepts by a single controls engineer. In this development
environment, the engineer is not required create control algorithms as C code; rather he simply draws the
design on the computer screen as a system of interconnected blocks. The controls engineer can focus
entirely on design issues eliminating the need for tedious code development and debugging.  By focusing
solely on design issues without the burden of coding and debugging, the engineer can complete more
design iterations in a shorter period of time.  An engineer can now accomplish in hours to minutes what
once took teams of programmers and engineers weeks or months to complete. This is where the greatest
savings are realized.

But we still need to program the target processor …

Eventually the design will need to be transferred to the target system.  With the HILS approach the controls
engineer now has the advantage that the controls design has been proven with actual hardware, and that
a working model for the design exists.  Since we know the control algorithm, we also know the
computational load, and can select an appropriate processor – neither under nor over-rated to accomplish
the task. We also have the advantage that the proven design can serve as a template for software design
specification and code validation.  Unit and system level validation techniques are easily applied to the
code using the HILS controller to provide reference test data.  At this stage of development risk is no
longer limited by technology, and debugging is a snap, and uncertainty has been removed.

The technique of HILS applies to all systems large and small; to industrial processes as well as
development of products.  Wherever hooks can be accessed between simulation and the real world, there
is an opportunity for a HILS approach.

How to get started

If you believe this approach to product or system development could benefit your project, please do not
hesitate to drop me an email with any questions.
email Mike Borrello .