Viet Nam Received- October 25, 2013; accepted: April 22, 2014 Abstract This paper presents a novel object-onented model, which is based on the Real-Time Unified Modeling Language UML a
Trang 1An Object-Oriented Model to Implement Controllers
for Industrial Hybrid Dynamic Systems
Hoang Sinh Truong, Ngo Van Hien'
Hanoi University of Science and Technology
No I Dai Co Viet Str Ha Noi Viet Nam Received- October 25, 2013; accepted: April 22, 2014
Abstract
This paper presents a novel object-onented model, which is based on the Real-Time Unified Modeling Language (UML) and Modelica language combined with hybrid automata to effectively analyze, design and implement contnDllers of industnal Hybrid Dynamic Systems (HDS) This model also allows the developed generic artifacts to be customizable and re-usable in the design phase of new HDS confrof applications The paper brings out step-by-step the dynamic analysis model of an industnal HDS specified
by hybnd automata, as well as the detailed design model of HDS controllers earned out by specializing Real-Time UlvIL, that permits us to quickly find out the main control capsules, their ports and communication protocols in order to precisely model and tightly allocate control structures corresponding converted into l^odelica models m order to quickly simulate and implement the controller of this HDS completely designed and simulated
Keywords, Hybnd Dynamic System, Hybrid Automata, Real-Time UML, Modelica
1 Introduction
Control systems of actual machines or
actuators take account of models with discrete events
and continuous behaviors that are called Hybrid
Dynamic Systems (HDS) [1,2], These systems
always do not have the same behavior because they
are associated with validity hypotheses to check at
any moment; the security requirement forces to
envisage events and behaviors different from nominal
behaviors The behaviors of such systems are thus
(HA) [1,3] In addition, the immersion in an
industrial control context requires the customization
production of a new application m order to reduce its
costs, resources and time development
According to the Object Management Group
(OMG) [4], the Real-Tune UML version can be
chosen to specify the design model of the developed
HDS in detail This version includes the 'capsules,
parts, protocols, connectors' concepts that we
adapted by specializing a set of capsules in precise
behaviors for IndusU-ial HDS (IHDS) Furthermore,
Modelica is also the object-oriented modeling
language; but it is primarily used to analyze the
continuous and discrete time dynamics of complex
• Corresponding Author Tel: (+84) 904.255.855
systems based on solving differential and algebraic equaUons [5,6]
Starting from the above considered points, we have developed an object-oriented model, which is
mainly based on Real-Time UML and Modelica
combined with HA in order to effectively analyze, design and implement controllers of IHDS In our model, we adapt the specification of an IHDS modeled with HA, and specialize Real-Time UML's features, e,g capsules, ports, protocols and connectors to completely obtain an object oriented implementation model of HA for the IHDS controller The detailed capsule collaboration is then
converted into Modelica models in order to quickly
simulate and realize this IHDS controller Finally, this approach is applied to completely design and simulate a controller of Electro-Hydraulic Governor
hydropower station to be stabilized
2 Dynamic analysis model for an ihds
2.1 Specification of industrial HDS
In general, HDS are those systems with interacting continuous and discrete system dynamics [1,4], A HDS has a continuous evolufion and occasional jumps The jumps conespond to the
response to external events or to the continuous evolution A continuous evolution is associated to each stale of the automaton by means of ordinary
Trang 2differential equations The structure of the equations
and the initial condition may be different for each
state In this paper, we are interested in analyzmg and
designing an IHDS, This IHDS contains two parts,
which are the HDS controller and controlled HDS
[3,7] These parts mutually exchange periodic signals
and episodic events The episodic event is either
external or internal Fig, 1 shows out the block
diagram of an IHDS
HDS Co
y '
-Industrial HDS
(IHDS)
.„,
\
-, E -, -,
s , <
• ^ — - > - ' \
-^ -^ k- -^
Fig 1 Block diagram of industrial HDS
Where Eo are output events; E, are input
events; So are output signals; Si are input signals; AT
Actori, , Actorm are descriptions of a coherent set of
roles that users (i e persons or involved extemal
systems) play when they interact with the developed
IHDS,
An IHDS and its actors asyn-chronously
exchange messages that can be carried out by a state
several models from the mdustrial control
perspective; interactions between these models can be
presented by using one of formalisms such as HA,
Hybrid Grafcet, Hybrid Pefri Nets, etc [1,3]
2.2 Specialization of HA to model dynamic
behaviors of an IHDS
A hybnd automaton [1,2] is defined by data of
F! = (Q, X, Z A, Inv, F, qo, Xa), here'
g is a set of states describing operational modes of
the system, called situations; ?„ is the initial
situation
X presents the continuous state space of the
automaton, X <z 9?, Xo is the initial value of this
space
Zis a finite set of events
.4 IS a set of transitions defmed by {q Guard, a
Jump, q') and represented by an arc between
situations, here: ^ e Q,q'€ Q; Guard is a subset
must he so thit the transition can be crossed
Jump represents the continuous state
transformation durmg the change of situition it is
whose result is affected like mitial value of the contmuous state m the new situation tr c ,Z'
transition tbis association does not impl> to gne
an input or output du'ection to the e\ ent
In\ IS an application which associates a subset of
the state space to each situation it is called the mvanant of the situation in which the contmuous
state must remain when the situation is q the contmuous state must venty T e im fq)
F IS defined for each situation the evolution of
conhnuous state is occuned when the situation is acti\ited this evolution of contmuous state is generally expressed by a differential equation It
will be named contmuous fluid F
To descnbe an IHDS with the HA's formalism and cany out its evolution, we introduced constramts
as follows: cre^T are considered m term of
inputs/outputs and internality/extemality; X contains
input/ output signals We also presented the realizafion hypotheses of the HA's evolution, which
permit the invariant Inv and guard control Guard can
details of these hypotheses can be found in the author's thesis [3] and report [7,8]
3 Specifying the design model for an ihds
3.1 Using Real-time UML
Real-Time UML [4] has its own the graphical notation set to model structures and behaviors of real-time systems, A capsule stereotype is used to represent an active object A capsule can communicate with other capsules through port:s, which are boundary objects, and a protocol associated with the port, Real-Time UML also defines a connector which coimects ports to provide transmission facility for supporting a particular protocol- Real-Time UML is more oriented towards the acmal implementadon and physical design But Real-Time UML lacks artifacts for modeling system
dynamic analysis model for IHDS controllers in Section 2 of this paper
3.2 Main control capsules of an IHDS
In the design phase of an IHDS, we transform the identified elements of the analysis model mto capsule collaborations of Real-Time UML to visualize and model interconnection types between
Trang 3out its implementation model, and re-use them in
different applications of IHDS- We defmed 5 main
capsules, which take part m the implementation of
HA of an LHDS; the continuous part's capsule,
discrete part's capsule, intemal interface's capsule,
extemal interface's capsule and Instantaneous Global
out a communication pattern for inter-connecting
between these mam control capsules earned out by
their ports, protocols and connectors
The discrete part's capsule contains a set of
situations Q and of fransitions A of HA of the
IHDS bemg developed
The continuous part's capsule is related to
sequential evolution of continuous elements is
n descnbed m [3]
Fig 2, Communication partem of mam control
capsules for IHDS confrollers
The IGCB's capsule contains concrete continuous
fluids of the developed confrol system at time
given just as /^ m its HA Each fluid F conesponds
to a situation in this HA
The intemal interface's capsule can generate
intemal events based on Inv in HA of confrol
system, so that the discrete part's capsule can
make its own evolution by these events
The extemal interface's capsule is an
mtermediary, which receives or sends episodic
events and periodic signals between the developed
Ey;lem and their interacted systems
In addition, the re-use is very important for
developmg the industrial confrol system; because it
makes it possible to reduce the time and development
cost The specialization, which permits the capsule
customizable and reusable in the new application for
different IHDS, can be seen in [3,9] The validation
traceability with the requirement analysis are conected by using software platforms such as IBM Rational Rose RealTime or IBM Rational Architect RealTime[10]
3.3 Implementing the real-time capsule collaboration for an IHDS
The 'subsystem' paradigms, which are supported by software tools such as LabView-Yl, MatLah-Smiulink, etc are used to perform the
simulahon model of IHDS controllers; because they
In this study, we use OpenModelica [6] software tool
tightly based on object-onented mechanisms and properties of Modelica language such as the abstraction, encapsulation, modularity and hentance
solve qmckiy the continuous and discrete lime
differential and algebraic equations So we applied the following rules to con\'ert the above defmed capsule elements mto Modelica models m order to completely simulate the IHDS controller Each capsule is implemented by a class or a block model;
Each sub-capsule is canted out by a component class or block model; the super-capsule conesponds to the composite class or block model
Messages are implemented by the ''fiinctions" of
classes or block models;
Interfaces are realized by the set of inputs and outputs of a block model;
Passive classes such as contmuous elements or
IGCB mstances are mapped to the "expressions"
terms, State machines of the main capsules are implemented by state graphs
The obtained simulation results permits us to theoretically evaluate the system control performance and functionalities, and to easily optimize control design elements of this system before we decide to realize and deploy it
To implement the realization model for an IHDS controller, we have to firstly update the desigi model with the control elements modified in the previous smiulation model, e,g the confrol law and
convert this updated design model into different Implementation Development Environments (IDE),
Trang 4languages such as C-H-, Java, Ada, IEC6I499 etc in
order to completely realize it in industrial platforms,
e.g micro-confrollers, programmable logic
confrollers
4 An application
Following the above described approach, we
have completely designed and simulated a confroller
of Electro-Hydraulic Governor (EHG), which makes
It possible to stabilize the frequency of a small
hydropower station having a load lower than 1,000
kW (Lmio) The implemented functional block
diagram of this EHG is shown as Fig 3,
Here, EHG contains extemal events such as
the connection or the disconnection by the Electrical
Consumption System (ECS) and Electrical
Measurement System (EMS), and the intemal events
issued from the intra-system's components, e.g the
Limiter element of EHG controller; KF, KC and Ks
are respectively the amplificafion coefficients of
feedback signals including the real frequency of
generator, real position of hydraulic cylinder, real
position of servo-valve [3], Fo(t) and F(t) are
respectively the desired and real frequency of the
small hydropower station
All of artifacts of the analysis and design
model have been created by using the above
presented approach to completely make the
simulation model for implementing entirely this EHG
confroller We present here some of the control
simulation results carried out by OpenModelica
software tool, that supposed EHG receiving the
Connection events with the dummy loads of 10%
L„ax and of 30% L^ax issued from EMS when the
application is automatically started up, the transient
m frequency-direct ion is shown a confrol
Fig 4, All of obtained simulation results permit us to theoretically evaluate the control performance of this system within the confrol criteria such as the
enors From that point, we can decide to choose the designed confrol elements in the realization phase of this system
5 Conclusion
We have presented an approach based on
Real-Time UML and Modelica language combined
with HA in order to completely cover the requirement, analysis and design models of an IHDS The main points of this paper are indicated as follows: The requirement specifications of an IHDS controller are earned out by the specialization of HA The capsule collaboration (i.e capsules, sub-capsules, ports, protocols, connectors and communicarion pattern) is defined to capmre the HA's evolution and obtain the detailed design model
converted into the Modelica models in order to
rapidly simulate and optimally implement the IHDS controller Based on this approach, the designed elements can be customizable and re-usable in the development of new confrol applications of IHDS,
In the next time, we will develop our approach with different formalisms and architectures in order
deploy different IHDS applications interconnected cooperatively by
networks-M j Hydraulic L I J Servo I [ m
^ cyintMr H «lv« [* | mol
Fig 3 Implemented functional block diagra
of the developed EHG
'"*"•"""' i / ' " ^ \
/ /
/ /
• L d 1 KLoa z
R(F;1
Fig 4 Transient confrol responses of frequency for the developed EHG
Trang 5[1] Carloni, L P , Passerone R., Pinto, A ,
Sangiovanm-Vineenlelli L-A„ Languages and Tools for Hybrid
Systems Design; now Publishers Inc-, Boston, 2006
[2] Hien, N.V., Soriano, T.; Implementing hybrid
automata for developing industrial control systems;
Proceedings of 8^^ lEEE-ETFA ISBN
0-7803-7241-7, d o r l 0 1109/ETFA 2001997679, Volume 2,
(2001)129-137-[3] Hien N.V,; Une Meihode Indusn-ielle de Conception
de Commande par Automate Hybride Developpee en
France, 2001
[4] OMG, UML Profile for MARTE: Modelmg and
Analysis of Real-time Embedded Systems; Version
1.1 hnp7/www omg.org/spec/MARTE/, 2011,
[5] Fritzson P.; Introduction to Modeling and Simulation
of Technical and Physical with Modelica; John Wiley
& Sons, 2011
[6] OpenModelica; OpenModelica software tool,
https/Zopenmodelica.org/, 2013,
[7] Hien, N V,, el al,; Research, design and manufacture
control systems with die integration of
object-oriented technology (MDA & Real-Time UML) and
navigation units (INS/GPS) for autonomous
underwater vehicles; Final report of potential
research project, code- K C O 3 T N 0 5 / n - l 5 , Hanoi
University of Science and Technology, 2012,
[8] Sonano, T , Sghaier, A., Hien N.V., Mechatronics
Design from an Object-Onented Point of View,
1109-2742, Volume 3 Issue I, (2004) 282-287
[9] Hien N V., Vinh H T , Sonano T ; Using
Model-Driven Architecture to Develop IndusUial Control
SyMems, Proceedings of 4"' lEEE-RlVF ISSN
1621-0875, (2006) 75-80 HCM City, Vietnam
[10] IBM; IBM Rational Online Documentation and
Training Sofl^vare Kits; littps//www.ibm,com/developenvorks/university/
2010,