harware in the loop simulation uuv ieee
TRANSCRIPT
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
1/6
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
2/6
hardware architectures like: MIPS, PowerPC, SH-4, ARM,
StrongARM, xScale, and x86.
Real Time Framework: The Constellation consists of an
object oriented real time framework that provides capabilities
to interfacing and code generation from a model developed in
MATLAB/Simulink. The Constellation framework is
specified in [6]. The model could be converted in ANSI C++
programming language using all advantages of the objected
oriented programming and yet a high performance. The real
time capabilities are found in a middleware interface,
between the generated code and the real time environment.
The MATLABs real time workshop provides the necessary
elements to perform that relationship.
UUVs Dynamic: One of the first steps to realize an
appropriate simulation consists of the modeling of the
dynamic equations of the Hornet UUV, specified in [4] and
used in this work as a concept prove, due the fact that UUVs
model presents a simpler system of equations appropriate to
develop the necessary software interfaces to be used also by
others UUVs. The Fig. 1 presents the six degrees and the
respective derivatives used by a rigid body and its system of
coordinates in the Hornet UUVs model. Where: is the
linear movement relationship to the longitudinal axis; is thelinear movement relationship to the transversal axis; is the
linear movement relationship to the vertical axis; is the
angular or rotational movement over the axis; is the
angular or rotational movement over the axis and is the
angular or rotational movement over the axis.
The inputs of the system are defined by the following set of
forces: : force applied by lateral thruster, : force applied
by frontal thruster, : force applied by vertical thruster,
: external disturbs or interferences like water
current for instance, linear hydrodynamic drag
force as defined in (1), and studied by [16].
Where:
: Drag coefficient.
: Waters density.
: Projected area of drag.
: Velocity of the surface of drag.
The dynamic equations used to describe the vehicles
movement are developed in accordance with [14]. Taking the
sum of all forces in direction of the respective axis
(X, Y, Z), and solving its equations for acceleration,
presented, respectively, by (2), (3), and (4).
Where:
: Acceleration over X axis.
: Acceleration over Y axis.
: Acceleration over Z axis.
: Velocity over X axis.
: Velocity over Y axis.
: Angular velocity over Z axis.
: Linear hydrodynamic drag forceover the X axis.
: External disturbs over the X axis.
: Linear hydrodynamic drag force
over the Y axis.
: External disturbs over the Y axis.
: Linear hydrodynamic drag force
over the Z axis.
: External disturbs over the Z axis.
: Considering that there are not
disturbances.
: Vehicles mass.
: Vehicles weight in water
(Considering that the buoyancy
force is 0).
And taking the sum of the moments over the axis, it is
obtained the acceleration around that axis presented by (5):
Where:
: Angular acceleration over Z axis.
: Distance between the thrusters 1
(lateral thruster) and 2 (frontal
thruster): Sum of the moments over Z axis
(Considering that there are not
disturbance over Z axis).
: Moment of inertia over Z axis.
Fig. 1. Rigid body and its coordinate system.
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
3/6
For the simulation purposes those movement equations
contains eight state variables, represented by the vector
and three inputs independently
controlled represented by presented by (6):
=
The transformation matrix presented in (7) is responsible to
convert the output states of the rigid body found in the plant
model into the coordinate values associated to a geographic
reference in the horizontal plan.
To obtain the coordinates in the vertical plan, it is sufficient
to calculate the superposition matrix of .
The Fig. 2 shows the block diagram used to represent the
depth controller. The vehicle receives a command with the
desired depth ( ), it verifies the current depth
( ) and apply an output to the thruster 3 ( ).
Analyzing (4), it is possible to see that the relationship
between the depth and the actuator responsible to adjust it (in
this case, the thruster 3) is simple and linear; therefore a PID
(Proportional-Derivative-Integral) controller is sufficient
[23].
Where:
: Command of depth used by the mission
planner;
: Current depth gathered by the navigation
system;
: Depth error;
: Vertical thruster output;
: Proportional gain;
: Integral gain;
: Derivative gain.
A PID controller is also provided to establish the velocity
control; the velocity is obtained directly from the thruster (T1)
instead the desired velocity produced by the mission planner
This approach is used to minimize problems of accuracy
due utilization of estimated values. The velocity and direction
controller work together where, depending of the current
directions value, it is possible to increase or decrease the
vehicles velocity.
To control the vehicles direction, it was used a slide-mode
control, presented by Fig. 3 and also used by [24], that allows
errors in its sliding layer with about +/- 3 degrees and sliding
function defined by (8).
The direction controller uses the following parameters:
: Direction angle used by the mission
planner;
: Current UUVs direction angle;
: Positive and negative limits used over thethruster output;
: Error gain;
: Error rate gain;
and : Horizontal thrusters output.
The direction controller uses the sliding function presented
by (8), to decrement the error and error rate down to zero.
Where:
: Slide mode function;
: It is a bi-dimensional array with the controllersgains;
: It is a bi-dimensional array that contains the
controllers error and error rate
Hardware In the Loop Simulation Environment: The
Fig. 4 shows a general overview of the HILS architecture
used to assist the development and construction of a semi-
autonomous underwater vehicle. It contains the main
components:
Embedded Hardware: It represents a clone of part of
the hardware used to produce the UUV. The inputs
consists of the forces generated by the environment
(like current, pressure, buoyancy, etc) and the forces
generated by the thrusters; World Model: It consists the model used to represent
the physical world or, more precisely, a very close
representation of where the UUV will operate;
Control Parameters: They are the main and auxiliary
variables used to operate adequately the control
Fig. 2. Block Diagram of the PID depth controller..
Fig. 3. Block Diagram of the slide-mode direction controller.
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
4/6
algorithms used by the UUV (For example: initial
velocity, initial acceleration, Initial position, erroradjusts for directions, maximum pressure allowed,
etc);
Sensors and Actuators: They represent the components
that allow the inputs and outputs of the system,
respectively. They could be real components
(hardware like compass, inclinometers, temperature
sensors, pressure sensors) or virtual (represented by
input/output files, for instance).
Data Logger: This component is responsible to register
all operations that are using this infra-structure, either
through a partial or total simulation. Only using the log
files and registers produced by this component is
possible to evaluate if a control algorithm is adequate
for the UUV and its environment of operation.
The following steps are necessary to generate a useful code
compatible with the proposal of hardware in the loop
architecture, based in an initial UUV's conceptual model.
To prepare the UUV's control model in Simulink
environment: It consists in the utilization of the
Simulink tool box and its control blocks (like S-
Functions, PID block, Plant block, etc). OBS: Before
the next step, it is important to eliminate any algebraic
loop in the model (algebraic loops occur when an input
port with direct feed through is driven by the output of
the same block, either directly, or by a feedback path
through other blocks which have direct feed through); To convert the prepared UUV's control model in a
suitable software component compatible with the real
time framework adopted. There is a special tool
developed to achieve that objective where is possible
to specify event handlers, allows priority specification
and concurrent code;
To prepare the target environment and to configure
its real time operating system to establish all
necessary connections;
To configure the real time framework to operate
either with the operating system in target machine or
with a simulation environment (environment with the
same interfaces but not considering time restrictions);
To establish connection between the target machine
and the Matlab/Simulink environment using the
middleware provided by Constellation tools;
Trough the Data Logger component and tools like the
Matlab's shell, WindView or Stethoscope, see [17]; is
possible to evaluate and even update values of
monitored variables or statuses in run time to achieve
the timers and specified control conditions;
All generated firmware's code is in ANSI C++ not
allowing the utilization of templates (generic
programming) or even dynamic memory allocation
(temporally to avoid problems with garbage
collection, for instance).
III. RESULTS
The dynamic model and its respective control algorithm,
published in [4], were successfully reproduced in
Matlab/Simulink environment, without any behavioral loss,
even after the elimination of undesired algebraic loops.
The hardware in the loop environment and the UUV's
controller was embedded in a hardware developed in PC104
standard, using x86 architecture, the same configuration
presented by the UUV in development. Virtual sensors and
virtual actuators (like compass, inclinometers, depth's
sensors, thrusters, etc) also had its embedded and real time
representation stored directly into the target's file system.
For all graphs generated, the following procedure was
executed:
All sensors have their values recorded in files. The code generated for the controller reads the value
of those files (sensor values) and, after the necessary
calculus, generates the actuation signals for the UUV's
thrusters.
The actuation signals were also recorded in files, used
later as input for the dynamic simulator. They contain
information about velocity control, direction control,
and depth control.
To compare the results obtained with the implemented
HILS (identified by the label: "Reproduced") against
the adopted bibliographic material (identified by the
label: "Source").
The Fig. 5 shows a direction graph of the path traversed by
the UUV from the start point (point: X=0 and Y=0) in
direction to the point indicated by the beacon (point: X=35
and Y=35). The trajectory performed by the UUV in HILS
environment is similar and compatible with the results
presented by [4].
Fig. 4. Overview of the HILS used to assist the development of UUV.
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
5/6
-
8/10/2019 Harware in the Loop Simulation UUV IEEE
6/6
more detailed study could be performed to improve that
knowledge area.
ACKNOWLEDGMENT
To our families and friends for encouraging the crowd
standing and successful completion of this work; To FINEP
than through one of its research funds, the CT-PETRO,
allowed some of the funding of this work; To CNPq
(National Council for Scientific and Technological
Development Conselho Nacional de Desenvolvimento
Cientfico e Tecnolgico), for having awarded the scholarship
to complete this Master in Science work, and finally to the
University of So Paulo and their collaborators - who
introduced the graduate program in Mechanical Engineer,
innovating in the environment of academic teaching.
REFERENCES
[1] S. Alles, C. Swick and M. Hoffman. "A Real Time Hardware in theLoop Simulation for Traction Assist," International Journal of VehicleDesign, 1994. Vols. 15, pp. 597-625.
[2] P.E. Almeida., M.G. Simoes. "Projeto de um sistema robtico
inteligente para instalao de equipamentos em poos petrolferos emguas profundas," IV SBAI Simpsio Brasileiro de AutomaoInteligente. So Paulo. 1999.
[3] W.K. Anakawa et al. "Environments for rapid implementation ofcontrol algorithms and hardware in the loop simulation," In IEEE 28thAnnual Conference of the Industrial Electronics Society, 2002.
[4] T. Braunl et al. "The Autonomous Underwater Vehicle Initiative Project Mako". IEEE Conference on Robotics, Automation, andMechatronics(IEEE-RAM), Singapore . 2004. Vols. pp: 446-451.
[5] D.P. Brutzman, Y. Kanayama and M. J. Zida. Integrated Simulationfor Rapid Development of Autonomous Underwater Vehicles. IEEESymposium On Autonomous Underwater Vehicle Technology, 1992.
[6] Constellation. Constellation, Real-Time Software Framework". Real-Time Innovations, Inc, 2005.
[7] S.E. Duno, M. Smith and P. Betzer. Design of AutonomousUnderwater Vehicles for Coastal Oceanography, Underwater RoboticVehicles. Design and Control. TSI Press, 1994. Vols. pp. 229-326.
[8] A. Jansson and J.O. Palmberg. Load simulation, a flexible tool for
assessing the performance of hydraulic valves. In Proceedings of theFourth Triennial International Symposium on Fluid Control, FluidMeasurement, and Visualisation, Toulouse, France, 1994.
[9] C. Key. Cooperative Planning in the Pilots Associate. Proc. DARPAKnowledge-Based Planning Workshop, 1987.
[10] J. Kim and A. Srinivan. "Computationally efficient technique for realtime surgical simulation with force feedback". Proc. 10th Sym. OnHaptic Interfaces For Virtual Environment & Teleoperator Systems,2002.
[11] F.V. Lima, C.M. Furukawa. Development of a High ResolutionUnderwater Positioning System.XIV COBEM Brazilian Congress ofMechanical Engineer. 2003.
[12] F.V. Lima. Desenvolvimento de um Sistema Acstico dePosicionamento Submarino. Master in Science thesis presented toEscola Politcnica da USP. So Paulo. 2003.
[13] D. Maclay. Simulation Gets Into the Loop,IEEE Review, 1997.[14] N. Olgac, B.E. Platin and J.M. Chang. Sliding Mode Control of
Remotely Operated Vehicles for Horizontal Plane Motions, IEEEProceedings, 1991. Vol. 138.
[15] E.A. Prasetiawan et al. "Modeling and control design of a powertrainsimulation testbed for earthmoving vehicles," Journal of Fluid PowerSystems and Technology, 1999.
[16] J.A. Roberson and C.T. Crowe. "Engineering Fluid Mechanics,"JohnWiley & Sons, New York, 1997. Vol. Sixth Edition.
[17] Scopetools. "Windriver's ScopeTools Suite," Windriver Corp., 2005.[18] Y. Senta and E. Okamura. "HIL simulation system for hdd servo
firmware," IEEE Transactions on Magnetics, 2002. pp: 2204-2207.
[19] VxWorks. "Windriver - VxWorks Programmer's Guide," Windriver,2005. Vol. 5.5.
[20] Y. Yuroda, K. Aramik and T. Ura. AUV Test Using Real/VirtualSynthetic World, IEEE Symp. On Autonomous Underwater VehicleTechnology, 1996.
[21] R. Zhang, D.E. Carter and A.G. Alleyne. "Multivariable control of anearthmoving vehicle powertrain experimentally validated in anemulated working cycle". In Proc ASME International MechanicalEngineering Congress & Exposition. Washington, 2003.
[22] L. Zhen, M. Kyte and B. Johnson. "Hardware in the loop real-timesimulation interface software design,"In Proc of The 7th InternationalIEEE Conference on Intelligent Transportation Systems, 2004. pp:1012-1017.
[23] K. Ogata. Modern Control Engineering, " Prentice Hall. New Jersey,1997. Vol. Third Edition.
[24] R.A. Decarlo., S.H. Hak and S.V. Draukunov. Variable Structure,Sliding-Mode Controller Design.," In The Control Handbook, CRCPress. Florida, 1996