facturing. In energy, PHIL (Power HIL) is used to test
the response of smart grids and power components.
In this manner, PHIL performs optimization of power
supply and prevents dangerous failures see (Lentijo
et al., 2010). In robotics, the robot interaction with
other robots and/or humans is a growing application,
it is generating new challenges in terms of response
time, stability and security.
In manufacturing, HIL is providing a tool to an-
alyze production and maintenance capabilities. The
information about factory performance is showed by
the KPIs (Key Performance Indicators), so HIL must
focus in providing the signals needed to calculate
determined KPI. (Gu et al., 2007) has studied how
HIL could provide reduction in unscheduled down-
time and in the KPI MTTR (Mean Time to Repair).
Meanwhile (Harrison et al., 2012) has used it in a de-
tailed level for manufacturing systems where real and
virtual world could be used simultaneously.
A description of how HIL could be used in pro-
duction management is described in the next sections.
3 HIL MODULE BASES
In modern factories the continuity of the link design-
real machine is broken due the provider-customer re-
lations. Machines that are used in manufacturing pro-
cesses are designed mostly by Computer Aided Engi-
neering (CAE). The design information is lost when
the machine is commissioned in a plant under real
conditions, as well as the real performance and be-
haviour of the real machine is not feedback to design-
ers.
One of the big differences between engineering
models and real machines is that in a factory, the be-
haviour of a machine depends of the industrial control
system (PLC), it is a fundamental part of a machine
performance and operation.
Therefore, real manufacturing systems need hy-
brid simulations to represent the combination of dy-
namics and logical states. A detailed model with
logic states, mechatronic and environmentsystems in-
dicators is fundamental to calculate properly the main
production KPIs, like are production and cycle time,
reaching even the level of work pieces.
The cycle time is defined as the total time from the
beginning to the end of the process. To calculate cy-
cle time, process time and delay time are needed. The
performance of HIL module is the combination of the
level of detail in the representation of the process and
in the real-time hardware (Cai et al., 2008).
Summarizing, HIL module for manufacturing
needs three basic elements: a dynamic model of the
machine, the PLC control program and the character-
istics of the production sequence.
Several ways could be used to obtain the dynam-
ics of a machine, one of them is the mechatronic mod-
elling of final prototypes in multibody dynamics CAE
tools, such as ADAMS or ProEngineer. Based on
ADAMS (Multibody Dynamics and Motion Analysis
Software) model, a set of linear state space matrices is
exported to MATLAB as the linear representation of
the machine. Other way to find the machine dynamics
is using the Lagrange-Euler laws of the mechanism,
this approach is implemented in mechanic machines
and robots (Siciliano et al., 2011).
With the machine model in MATLAB/Simulink it
is possible to use StateFlow to model the control pro-
gram of the machine and perform a hybrid simula-
tion between logic programming and the continuous
states.
Figure 1: Communication process to read production se-
quence and write generated KPIs.
The application needs to be loaded to a real-time
environment; in this case it has been implemented
with dSpace. The processor dSpace rti1006 runs to
1KHz and the results can be transmitted during the
simulation thanks the Control Desk application and
the connection libraries in C ++/Java. The imple-
mented HIL runs in a PC with Matlab/Simulink (ver-
sion 2007 or later) and the Control Desk application
must be a 2008 version at least.
Finally the production sequence information
could be directly introduced by the designer or loaded
from a database. Then, HIL calculations could be
stored.
The key issue is the HIL configuration as a mod-
ule that is used by the management actions to improve
the factory performance (Sauer et al., 2009). With the
modelling of a critical machine in Matlab/Simulink,
this module needs to be communicated with other
modules (Fig.1). This is the view of VFF, that all
modules could exchange information; in other words,
that the knowledge produced in one place could be
accessible for other modules interested in having it.
HardwareintheLoopModuletoCalculateProductionIndicators
465