EUSFLAT - LFA 2005
Fuzzy Trajectory Control Design for Underwater Robot
Jerzy Garus Department of Electronics and Electrical Engineering Naval University 81-103 Gdynia, ul. Śmidowicza 69 Poland
[email protected]
Abstract
The URV is operated manually with a joystick or automatically with a computer. The automatic control of the underwater robot is a difficult problem due to its nonlinear dynamics. Moreover, the dynamics can change according to the alteration of configuration to be suited to the mission. In order to cope with those difficulties, the control system should be flexible. An interesting review of classical and modern techniques adapted to control the dynamic behaviour of unmanned underwater vehicles has been provided in [1].
In the paper applying of genetic algorithms to designing of a fuzzy autopilot for trackkeeping control of underwater robot is considered. For the tracking of a reference trajectory, the way-point line of sight scheme is incorporated and three independent fuzzy controllers are used to generate command signals. Parameters of membership functions of input and output are tuned using genetic algorithms. Quality of control is concerned without and in presence of external disturbances. Some computer simulations are provided to demonstrate the effectiveness and robustness of the approach.
Nowadays, fuzzy systems find wide practical applications, ranging from soft regulatory control in consumer products to accurate control and modeling of complex nonlinear systems [2,6,7,8,9]. In this paper we design the fuzzy logic autopilot to trackkeeping control of the URV tuning its parameters by genetic algorithms.
Keywords: Underwater robot, Autopilot, Fuzzy control, Artificial intelligence.
1
Zygmunt Kitowski Faculty of Mechanical and Electrical Engineering Naval University 81-103 Gdynia, ul. Śmidowicza 69 Poland
[email protected]
2
Introduction
Underwater Robotics has known an increasing interest in the last years. The main benefits of usage of Underwater Robotic Vehicles (URVs) can be removing a man from the dangers of the undersea environment and reduction in cost of exploration of deep seas. Currently, it is common to use the URVs to accomplish missions as the inspection of coastal and offshore structures, cable maintenance, as well as hydrographical and biological surveys. In the military field they are employed in such tasks as surveillance, intelligence gathering, torpedo recovery and mine counter measures.
1158
Equations of Motion
The general motion of marine vehicle in 6 DOF describes the following vectors [3,4]: η = [x, y, z,φ ,θ ,ψ ]
T
v = [u,υ , w, p, q, r ]
(1)
T
τ = [X , Y , Z , K , M , N ]
T
where:
η – position and orientation vector with coordinates in the earth-fixed frame; v – linear and angular velocity vector with coordinates in the body-fixed frame;
EUSFLAT - LFA 2005
τ – vector of forces and moments acting on a hull in the body-fixed frame. The dynamical and kinematical equations of motion can be expressed as follows [3]: Mv& + C( v ) v + D(v )v + g ( η) = τ η& = J (η)v
(2)
where: M – inertia matrix (including added mass); C(v) – matrix of Coriolis and centripetal terms (including added mass); D(v) – hydrodynamic damping and lift matrix; g(η) – vector of gravitational forces and moments; J (η) – velocity transformation matrix between body and earth-fixed frames.
3
Tracking and Coordinate Systems
It is convenient to define three coordinate systems when analysing tracking control systems for the robot’s 3D motion in horizontal plane (see Fig. 1) [3,4]: 1. the global coordinate system OXY (called also the earth-fixed frame); 2. the local coordinate system O0X0Y0 (fixed to the body of the robot); 3. the reference coordinate system PiXiYi (system is not fixed).
Let us assume that the route is composed of some straight lines defined by turning points P1, P2, P3, etc., with coordinates ( x1 , y1 ) , (x2,y2 ) , (x3,y3 ) , etc. A tracking error of the robot is defined in the reference coordinate system PiXiYi (in Fig. 1 it is P1X1Y1) as a perpendicular distance d of the robot located in position ( x 0 , y 0 ) to the predefined trajectory. According to this, the two-component vector of the robot’s position [x0 , y 0 ] in the global coordinate system can be expressed as:
x 0 cos(ϕ i ) − sin (ϕ i ) x x i y = sin (ϕ ) cos(ϕ ) y + y i i 0 i
(3)
where:
[xi , yi ]T
– global coordinates of the point Pi;
ϕi
– rotation of the reference coordinate system with respect to the global one: y − y (4) ϕ i = arctan i +1 i x x − i +1 i
[x, y ]T
– local coordinates of the robot, determined by expression:
x& k cos(∆ψ k )u k − sin (∆ψ k )υ k x y = ∑ y& = ∆t ∑ sin (∆ψ )u + cos(∆ψ )υ k k k k k k k
(5)
where: ∆ψ k = ψ k − ϕ i – local heading angle defined as the angle between the track reference line and the robot’s centreline; – robot’s heading and linear ψ k , uk ,υ k
[x& k , y& k ]
T
speeds in instant t=k∆t; – increment of the robot’s local
coordinates in t=k∆t; ∆t – time step; k = 0,1,2,… . Each time the robot location ( x 0 ( t ), y 0 ( t ) ) at the time t satisfies:
[xi − x 0 (t )]2 + [ y i − y 0 (t )]2 ≤ ρ 2
Figure 1: Coordinate systems used to description of track-keeping control in the horizontal plane: OXY – earth-fixed system, O0X0Y0 – body-fixed system, PiXiYi – reference system
1159
(6)
where ρ is a circle of acceptance, the next way-point should be selected (e.g. in Fig. 1 it is P2X2Y2) and the robot’s position updated corresponding to the new reference coordinate system.
EUSFLAT - LFA 2005
4
Control System
The main task of the designed tracking control system is to minimize distance of attitude of the robot’s centre of gravity d to the desired trajectory under assumptions: 1. robot can move with varying linear velocities u, υ and angular velocity r; 2. the robot’s position x, y and heading ψ are measurable; 3. desired trajectory is given by means of set of points η d = {( x di , y di ,ψ di )};
Membership functions of fuzzy sets of input variables: error signal e(t ) = η d − η (t ) and derived
change in error ∆e(t ) = η (t ) − η (t − 1) as well as
output one (command signal) τ (t ) are shown respectively in Fig. 4. The notation is taken as follows: N – negative, Z – zero, P – positive, S – small, M – medium and B – big.
4. command signal τ consists of three components: τ 1 = X and τ 2 = Y – forces respectively in
x- and y-axis, τ 6 = N – moment about z-axis; 5. travel time is not fixed, thus the navigation between two points is not constrained by time.
Figure 3: Fuzzy control structure
A structure of the proposed control system with the autopilot consisting of three independent controllers is depicted in Fig. 2.
Presented in Table 1 rules from the Mac Vicar-Whelan’s standard base of rules have been chosen as the control ones [7]. Table 1: The fuzzy controller’s base of rules Error signal e Derived change in error ∆e
NB
NM
Z
PM
PB
N
NB
NM
NS
Z
PS
Z
NM
NS
Z
PS
PM
B
NS
Z
PS
PM
PB
Command signal τ
4.2
Figure 2: A general structure of the control system 4.1
Fuzzy Control Law
To designing of the controllers the fuzzy proportional derivative (FPD) controller, adopted from [2,8] and working in configuration presented in Fig. 3, has been used.
1160
Tuning of Fuzzy Controllers
The unknown parameters of the proposed fuzzy controllers have been determined using genetic algorithms (GA), which are based on Darwin’s principle of reproduction and survival of the fittest [5,9]. In general the GA techniques manipulate sets of individuals (solutions) by using genetic operators (selection, reproduction, crossover and mutation) in order to propose better ones. Chromosomes represent individuals in a population. A structure of the chromosome, which has been used in the tuning procedure, is illustrated in Fig. 5. The chromosome consists of four values that corresponded to unknown parameters of the membership functions. Their tuning range has been defined as follows:
EUSFLAT - LFA 2005
0 < xe ≤ 0.5 ,
0.5 < x ∆e < 1 ,
0 < x M ≤ 0.5 ,
0.25 < x S ≤ 1 .
Due to the objective is to minimise the control error, e.g. the tracking error d, a cost function has been defined in the form:
[
]
J = min ∑ λ1 d 2 (t ) + λ 2τ 22 (t ) + λ3τ 62 (t ) t
(7)
where λ1, λ2 and λ3 are constant values. Calculated for the following configuration of genetic algorithms: 1. 2. 3. 4.
population – 20, crossover – 0.8, mutation – 0.05, generation – 100,
the demanded parameters of the membership functions for three fuzzy controllers of the autopilot are shown in Table 2. They were obtained on basis on analysis of the cost function J during the robot’s movement between two set points: x B = 0 m, 0 m, 90o , x F = 50 m, 50 m, 45o . A goal of the robot was to reach the point xF starting from xB.
(
)
(
)
Table 2: Parameters of membership functions Controllers trajectory in trajectory in x-axis y-axis
5
Figure 4: Membership functions for fuzzy sets: signal ek, derived change in error ∆ek and command signal τ k
Figure 5: Chromosome definition
1161
course
xe
0.14
0.19
0.39
x∆e
0.87
0.63
0.45
xS
0.25
0.70
0.58
xM
0.89
0.94
0.65
Simulation Study
To validate the performance of the developed nonlinear control law, simulations results using the Matlab/Simulink environment are presented. The model of the UVR is based on a real construction of a underwater robot called UKWIAL designed and built for the Polish Navy. The URV is an open frame robot controllable in 4 DOF, being 1.5 m long and having a propulsion system consisting of six thrusters. Displacement in horizontal plane is done by means of four ones which generate force up to ±750 N assuring speed up to ±1.2 m/s and ±0.6 m/s in x and y direction, consequently. All parameters of the robot’s dynamics are presented in Appendix A.
EUSFLAT - LFA 2005
Tracking control simulation results for no added disturbances and for a sea current disturbance are shown in Fig. 6 and Fig. 8. The URV has to follow the desired trajectory beginning from (0 m,0 m), passing target waypoints: (50 m,0 m), (100 m,50 m), (100 m, 80 m), (30 m, 80 m), (0 m,50 m) and coming back to start under assumption that the turning point is reached if the robot is inside of the two-metre circle of acceptance. In Fig. 7 and Fig. 9 courses of command signals are depicted respectively without and with interaction of sea disturbances.
Figure 8: The influence of sea current (speed 0.5 m/s and direction 1350) on track-keeping performance: 1 - desired trajectory, 2 - real trajectory
Figure 6: Simulation result of track-keeping without environmental disturbances: 1 - desired trajectory, 2 - real trajectory
Figure 9: Time histories of command signals for track-keeping in presence of the sea current (speed 0.5 m/s and direction 1350)
6
Conclusion
Using of the fuzzy controllers for underwater robot’s track-keeping has been described. From the results presented, it may be concluded that the proposed approach provides the autopilot being robust and having good performance both without and in presence of the sea current disturbances. Figure 7: Time histories of command signals for track-keeping without environmental disturbances
Another advantage of the discussed control system is its flexibility with regard to the change of dynamic properties of the ROV and a performance index. Further works are needed to identify the best fuzzy structure of the autopilot and test the robustness of this approach in the real world.
1162
EUSFLAT - LFA 2005
References
Appendix A
[1] J. Craven, R. Sutton, R.S. Burns, “Control Strategies for Unmanned Underwater Vehicles,” J. Navigation, vol. 51, pp. 79-105, 1998. [2] D. Driankov, H. Hellendoorn, M. Reinfrank, An Introduction to Fuzzy Control, Springer-Verlag, 1993. [3] T.I. Fossen, Marine Control Systems, Marine Cybernetics AS, 2002. [4] J. Garus, Z. Kitowski, “Fuzzy Control of Underwater Vehicle’s Motion,” in Advances in Fuzzy Systems and Evolutionary Computation, N. E. Mastorakis, Ed. WSES Press, 2001, pp. 100-103. [5] D. Goldberg, Genetic Algorithms in Search, Optimisation, and Machine learning, AdisonWesley, 1989. [6] J. Kacprzyk, Multistage Fuzzy Control, John Wiley and Sons, 1997. [7] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs, SpringerVerlag, 1994. [8] R.R. Yager, D.P. Filev, Essential of Fuzzy Modelling and Control, John Wiley and Sons, 1994 [9] R.R. Yager, L.A. Zadeh, An Introduction to Fuzzy Logic Applications in Intelligent Systems, Kluwer Academic Publishers, 1991.
1163
The URV model
The following parameters of robot’s dynamics were used in the computer simulations: M = diag { 99.0 108 .5 126 .5 8.2 32.9 29.1} D(v ) = diag {10.0 0.0 0.0 0.223 1.918 1.603}+ 227.18 u diag
405.41υ
478.03 w
3.212 p
14.002 q
0 0 0 0 0 0 0 0 0 C (v ) = 0 26 . 0 w − 28 .0υ − 26.0 w 0 18.5u 0 28.0υ − 18.5u
0 − 26.0 w 28.0υ 0 − 5 .9 r 6 .8 q
− 17.0 sin(θ ) 17.0 cos(θ ) sin(φ ) 17.0 cos(θ ) cos(φ ) g (η) = − 279.2 cos(θ ) sin(φ ) − 279.2(sin(θ ) + cos(θ ) cos(φ ) ) 0
12.937 r
− 28.0υ 18.5u − 18.5u 0 5 .9 r − 6 .8 q 0 1 .3 p − 1 .3 p 0 26.0w 0