An Object-Oriented Approach to Analyze and Design Controllers of Autonomous Surface Vessels Nguyen Hoai Nam, Khuong Minh Tuan, Ngo Van Hien*, Hoang Sinh Truong Hanoi University of Scie
Trang 1An Object-Oriented Approach to Analyze and Design Controllers
of Autonomous Surface Vessels
Nguyen Hoai Nam, Khuong Minh Tuan, Ngo Van Hien*, Hoang Sinh Truong Hanoi University of Science and Technology, No.l Dai Co Viet Str., Ha Not, VietNam
Received; March 04, 2014; accepted: April 22, 2014
Abstract
This paper presents a novel approach based on the Model-Driven Architecture (MDA) to systematically
to entirely specify the requirement analysis, design and deployment phases of these systems In this
Computation Independent Model (CIM) combined with the use-case model and hybrid automata, the Platform Independent Model (PIM) carried out by using the real-time Unified Modeling Language (UML)/System Modeling Language (SysML) and its Platform Specific Mode! (PSM) implemented by object-oriented mechanisms to completely perform the development lifecycle of ASV controller This approach is then applied to implement and deploy a horizontal planar trajectory-tracking controller for a open-source platform in order to quickly simulate and realize the operational functionalities of control system
Keywords: Autonomous Surface Vessel, Hybrid Automata, UML, SysML and MDA
I Introduction
Conttol systems have a significant impact on
the performance of surface vessels and marine
structures allowing them to perform tasks in severe
sea states and during long periods of time Surface
vessels are designed to operate with adequate
reliability and economy, and in order to achieve this,
it is essential to control the motion The problem of
designing motion contiollers for ASV is equally
challenging because they are tightly cotmected with
the dynamic models In addition, the immersion in an
mdustrial conttol context makes that the designers
existing standards for analyzing, designing and
implementing effectively these systems
Starting from the above considerations, we
have developed an object-oriented model to
effectively carry out the conttoller of Autonomous
Surface Vessels (ASV), which have the dynamic
behaviors modeled by using hybrid automata [ I ] , [2]
This system permits an ASV to reach and follow a
model, we specify the dynamic model of surface
vessels, M D A ' s feahires such as the CIM with
use-case model including hybrid automata and industrial
constraints, the PIM earned out by using real-time
UML/SysML, and its PSM implemented by
object-' Conesponding autiior; Tel: (+84) 904.255.855
oriented mechanisms to cover the whole of development hfecycle of ASV contiollers Based on this approach, a ttajectory-ttacking conttoller of a miniature ASV is completely retto-designed and simulated
2 Modelling asv dynamics for control
2.1 Dynamic model of surface vessels
According to SNAME [3], the six motion
components of a surface vessel defined as surge, sway, heave, roll, pilch, and_vavv From the large field
of guidance, navigation and conttol of marine
dynamic model of surface vessels in body frame can
be written in (1):
{ M-v + C(v)v -f- Div)v -1- giri) = T -|- 5^ + cu *^'
Where: r] (x, y, ^ tp 9, 1//)^ is the
position (NED: North, East and Down) and orientation (Euler: RPY -Roll, Pilch and Yaw angles);
V = (u, V w, p, q, r)'"\% the velocity and angular velocity; M = M^^ + M^ is a mass mattix, which
denotes the 6x6 system inertia matrix containing
both: MKB - the generalized constant inertia matrix, and MA the added mass inertia mattix;
C(v)=C^(v)-\-C/v) is the 6x6 Conolis and centripetal
Trang 2nonlinear hydrodjmamic damping are contained
within the 6x6 matrix D(v)=D+DJv), D contains the
linear damping terms, and DJv) contains the
nonlinear damping terms; g(ri) is the 6x1 vector of
gravitational and buoyancy effects; r is the 6x1
conttol input force and torque; gg is the ballast force
and torque; and finally (o is the 6x1 vector extemal
disturbances caused by wind, waves and ocean
current
2.2 Using the 3D dynamic model for ASV
controllers
The horizontal motion of a surface vessel is
often described by the motion in surge, s-way, and
yaw Therefore, we choose tj= (x, y, y/)''', v = (u,
V, r)'^ and the Jacobian matrix typed 3x3 for
obtaining the dynamic model of this case from the
genera! modeL as m (1) More details of this 3D
dynamic model can be found in [4] In this paper, we
are interested in the ttajectory-ttacking conttol of
ASV, so we must concenttate on this dynamic model
to gather the conttol algorithms with a concrete
guidance, e.g the Line-of-Sight (LOS) [4], [5],
3 MDA specialization to develop an asv controller
3.1 Overview of MDA
The MDA [6] is an approach to system
development, which increases the power of models
in that work, MDA contains three models to
separate the specification of the operation of a
system from the details of the way that system uses
the capabilities of its platform:
• Computation-Independent Model (CIM) is refened
to as a domain or business model, the CIM presents
the system at the highest level of absttaction,
• Platform-Independent Model (PIM) is used by
conttol system architects and designers to describe
the conttol solution at a high level, independent of the
solution's deployment platform
• Platform-Specific Model (PSM) specifies a
combination between the details found m the PIM
with the details representing how a solution can be
implemented on a platform
Furthermore, this approach supports also for
model transformation The model ttansformation is
the process of converting one model to another
model of the same system Transformations can use
different mixtures of manual and automatic
transformation [6]
3.2 MDA process for an ASV controller
Starting fi-om MDA specifications and characteristics of dynamic model of ASV, we define here an executable process, which permits us to cany out the development of an ASV having behavion modeled by Hybrid Automata (HA) [ I ] , [2], and to re-use it in different ASV conttol applications This process includes the following main points:
• Object collaborations with UML/SysML and HA present the CIM, which allow analyzing structure and behaviors of an ASV conttoller
- To describe a conttol system such as the ASV with the H A ' s formalism and carry out its evolution, we have inttoduced consttaints and mies, which can be found in [2], [5] In CIM, HA are used to describe mathematical behaviors (i.e, the
dynamic model of ASV: Situations, Slate
Variables, Transition, etc, of its HA) of this
system
- Object collaborations with UML [7] permit the identified HA model to be exacfly converted into business objects, which present control elements of the ASV being developed,
• Real-Time UML models indicate the PIM, which permit us to cover the design phase of the developed system These models are described by using the 'capsules, ports, protocols' concept [7] in order to specify a set of conttol modules in precise behaviors,
• Object-Oriented ( 0 0 ) implementation models are used to introduce the PSM of this system m order to validate and deploy the identified conttol design.' model into the OO software platforms That permits
us to evaluate the conttol performance and functionalities, and to easily build control design elements before they can be realized and deployed This process will be gone into detail in the next section for describing the development phases
of an ASV
4 Whole of MDA process for an ASV controller
4.1 CIM for an ASV controller
Main stages to build the CIM of an ASV are the followings:
• Identifying complex behaviors of the ASV being developed by using the use case model [7] In this step, tt is necessary to provide industrial consttaint conditions, e.g the maximum swing angle of mdder,
sure the precise operation of this system Fig 1
Here, MDS is the Measurement and Display System; MES is the Marine Environment System including
Trang 3disturbances such as the wind, waves, ocean cunents
etc
We find that the "Drive'" use case is oriented
towards conttol modes; its complex behaviors must
be specified by using sequence diagrams and local
state machines In our model, we use the 3D
dynamic model of ASV and LOS guidance [4], [5]
because we are interested in the trajectory-tracking
conttol
Behavior (IGCB's capsule) Fig 2 shows out the general inter-communication pattern of these conttol capsules by using the RT U M L ' s collaboration diagram It can be noted that if we
then each capsules and its protocols respectively correspond to a block and its flow ports and item flows
ASV Intecronnecbon pattern of ma'n control capsEiles
Fig 1 Main use case model of an ASV controller
• Defining the extended fimctional diagram [5],
which permits us to model ttansformational activities
of an ASV conttoller with events coming from
outside
• Building a global state machine in order to bring
developed from all local identified state machines
global state machine can be found in [5]
• Specifying the hybrid automaton of an ASV; this
includes situations, invariants, continuous state
spaces, events, initial situation, mitial continuous
stale, and continuous fluids [2] We have defined the
steps and realization hypotheses, which can be found
in the author's report [5] to determine HA of the ASV
being developed
4.2 PIM for an ASV controller
We find that the direct ttansformation of
CIM to the implementation environment must be
supplemented to carry out an ASV and its re-use in
the new application development phase For
example, the above identified CIM are not well
adapted to visualize, model interconnection types
between control objects or sub-systems In the
detailed design phase of this system, we transform
the identified CIM into PIM, which is based on the
use case approach, and uses the Real-Time
UML/SysML notations [7] From the approach
described in [8], we have developed the 5 main
conttol capsules of PIM, which take part in the HA
realization of the ASV being developed: the
continuous part's capsule, discrete part's capsule,
intemal interface's capsule, extemal interface's
Fig 2 Interconnection pattern of main conttol capsules
• The discrete part's capsule contains a set of
situations and ttansitions in HA of the ASV being
yaw)
• The continuous part's capsule is associated in
ttansformational activities of the identified extended functional diagram,
• The IGCB's capsule contains concrete continuous
fluids of the ASV being developed at time given in its
HA Each conttnuous fluid conesponds with a sittiation in this HA
• The internal interface's capsule generates intemal
events of the ASV bemg developed, so that the discrete part's capsule can make its own evolution by these events
• The external interface's capsule is an intermediary,
signals between the ASV being developed and their interacted systems such as MES and MDS m our case study
4.3 PSM for an ASV controller
The 'sub-system' paradigms, which are supported by software tools such as MatLab-Simulink, OpenModelica, etc are used to perform the
conttol simulation model of ASV; because they are easily adapted from the object-oriented analysis elements of this system Then, the 0 0 realization models are developed in the PSM in order to carry
Trang 4which can support object-oriented programming
languages such as C++, Java, Ada, etc., and upload
the implemented conttol program to compatible
microconttoUers Within limit of the paper, we do
not show out here all the components of CIM, PIM
and PSM for the ASV conttoUer, so detailed results
can be seen in [5]
5 Application
Based on the above described approach, we
have successfiilly analyzed, designed and
implemented the horizontal planar ttajectory-ttacking
conttoller for a miniature autonomous marine
vehicle This is a part of the potential research project
(code: KC03.TN05/I I-I5), which has been led by the
author fi-om Hanoi University of Science and
Technology [5] In this application, we have used
OpenModelica software tool [9] for simulate the
conttol performance of ASV, because it is tightly
oi Modelica language [10] Arduino platform [I I] has
been used to quickly deploy the realization model of
prototyping platform based on flexible, easy-to-use
hardware and software It can sense the environment
by receiving inputs from a variety of sensors such as
the pressure, Inertial Measurement Unit (IMU),
magnetometer Global Positioning System (GPS),
etc., and can affect its surroundings by conttolled
actuators Arduino Mega2560 microconttoUer [ I I ] on
the board has been programmed by using the Arduino
programming language based on C++ AH of PIM
by using the above approach to completely deploy
and take on trial trip for this marine vehicle [5]
6 Conclusion
In this paper, we have inttoduced an
object-oriented approach to develop conttollers of ASV
This approach is based on the specialization of
MDA's features with real-time UML/SysML and HA
in order to quickly analyze, design and implement the
conttol parts of system No single formalism or
language of an engineering process can possible
capture all the knowledge and information needed to
solve complex conttol systems such as the ASV
conttoller The ASV dynamic model is adapted to
gather the conttol requuement analysis The MDA's
features are specified to obtain a general MDA
process model including the CIM, PIM and PSM to
entirely develop this system The CIM of an ASV
analysis phase by specializing use case model and
design model by specifymg real-time UML/SysML
notations in the precise behaviors and stmctures of
new PSMs by using different object-oriented specific platforms in order to completely realize this conttoller with compatible microconttoUers Following this approach, a ttajectory-ttacking conttoller of a miniature autonomous marine vehicle has been completely developed with the simulation
using Arduino Mega2560 microconttoUer In the nexl
time, we will develop this approach combined with
to perfectly design, implement and deploy conttollers for balancing search and target response in cooperative ASV teams
Acknowledgment The authors would like to thank the supports fi-om the scientific research project, code; KC03.TN05/H-I5, Hanoi University of Science and Technology
References
1 Carloni, L.P., Passerone R., Pinto, A., Sangiovanni-VincenteUi L.A.; Languages and Tools for Hybrid Systems Design; now
Soriano, T.; Implementing hybrid automata for developmg industrial control systems; Proc of
129-137
2 SNAME; Nomenclature for Treating the Motion
of a Submerged Body Through a Fluid; SNAME Technical and Research Bulletin No 1-5, N.Y., U.S.A., 1950
3 Fossen T I.; Handbook of Marine Crafl Hydrodynamics and Motion Conttol; John Wiley & Sons, 2011
4 Hien, N.V., et al.; Research, design and manufacture control systems with the integration
of object-oriented technology (MDA & Real-Time UML) and navigation units (INS/GPS) for autonomous marine vehicles; Final report of potential research project, code:
KC03.TN05/11-15, Hanoi University of Science and Technology, 2013
5 OMG; Model-Driven Architecture (MDA) guide; hflp://wTvw.omg.org/mda/, 2003
6 OMG; UML Profile for MARTE, Real-Time Unified Modeling Language, System Modeling Language; http://www.omg.org/spec/, 2011
7 Soriano, T., Sghaier, A., Hien N.V.; Mechattonics Design fi-om an Object-Oriented Point of View; WSEAS Transactions on Communications, ISSN 1109-2742, 3 (2004)
Trang 58 OpenModelica; OpenModelica software tool;
https://openmodelica.org/, 2012
9 Fritzson P.; Introduction to Modeling and
Simulation of Techiucal and Physical with
Modetica; John Wiley & Sons, 2011
10 Arduino, Open-source electtonics prototyping
platform for hardware and software;
http://www.arduino.cc/, 2012