You are on page 1of 7

Indian Journal of Geo-Marine Sciences

Vol. 40(2), April 2011, pp. 200-206








Depth and pitch control of USM underwater glider: performance comparison
PID vs. LQR
Maziyah Mat Noh, Mohd Rizal Arshad & Rosmiwati Mohd Mokhtar

USM Robotics Research Group, School of Electrical and Electronic Engineering ,Universiti Sains Malaysia,
Engineering Campus, 14300 Nibong Tebal, Seberang Perai Selatan, Pulau Pinang, Malaysia
[E-mail: maziyah@ump.edu.my, rizal@eng.usm.my,rosmiwati@ieee.org]
Received 23 March 20011; revised 28 April 2011
Present study consists the design of an optimal state feedback controller for our USM Underwater Glider (USM-
Glider). The glider mathematical model for motion control is obtained using MATLAB System Identification Toolbox,
where ballast pumping rate is an input signal to the system. Different parameters were observed independently, the pitching
angle, and the depth. Two different models were obtained for the respective observations that relates ballast pumping rate to
pitching angle and depth. From the transfer obtained, we apply a Linear Quadratic Regulator (LQR) and PID control
schemes to observe the performance of the controllers over the pitching angle, and the depth. The optimal performances are
obtained via tuning of Qs and Rs matrices of the LQR and gain of K
p
, K
i
and K
d
of the PID controller. The results show both
controllers provide satisfactory performance.
[Keywords: Underwater Glider, Model Order Reduction, System Identification, PID, LQR]
Introduction
An underwater glider is a buoyancy-propelled and
fixed-winged glider that shifts internal actuators to
control attitude. Underwater glider has greater range
than other underwater vehicle, and does not need
expensive support vessels. This idea was inspired by
Stommel in
1
and has been realized after almost
10 years. The first generation gliders have been
developed and tested in ocean including SLOCUM
glider
2
, Seaglider glider
3
and Spray glider
4
. Currently
many laboratory-scale gliders progressively have been
developed and tested including ALBAC (University
of Tokyo), ROGUE (University of Princetone),
STERNE (Ecole Nationale Superieure DIngenieurs
INSIETA) and ALEX (Osaka Perfecture University).
After developing the glider, controller is needed to
ensure the glider designed is gliding steadily.
Feedback control is the most commonly used method
in designing controller for glider motion
5-9
. In [
6
]
combination of feedforward and feedback control was
used to get a better result compare to feedback control
alone. Among feedback control PID is the most
popular used due to its simple architecture and
controller tuning parameters as used in
6-7
. The optimal
control so called Linear Quadratic Regulator (LQR) is
another approach has been used in
5,8-9
, where in this
method only two tuning knobs (Q and R) need to be
varied in order to obtain an optimal gain that
minimizing the cost function and be a solution for the
Ricatti equation. Another approach is Hierarchical
Supervisory Control (HSC)
10
, and Decentralized
Supervisory Control (DSC)
11
both are based on RW
(Ramadge & Wonham) supervisory control theory of
Discrete Event Dynamic System (DEDS),where the
control implementation has been divided into layers
which mission, task, and behavior layers , and motion
control is fall under behaviour layer. Detail
implementation is explained in
10-11
. The most recent
approach used is Model Predictive Control (MPC)
12
.
In this approach, the authors divided the dynamic into
two-level hierarchical controller by decompose the
problems into two simple control problems that are
attitude control loop as high level controller to control
ballast and internal sliding mass position, and low-
level control for internal configuration control loop to
check the control inputs have matches the high-level
references.
This paper presents assessment of PID and LQR
controllers on a nonlinear glider. The Simulation
works of the nonlinear control design of glider system
for pitching angle, and depth control that having one
control input are performed in Matlab software and
the results of the responses are presented in time
domain. The outline of this paper is as follows,
Section Method discusses on methods which include
the glider system, modelling of glider system, model
NOH et. al: DEPTH AND PITCH CONTROL OF USM UNDERWATER GLIDER


201
identification, and controller design. Section Results
and Discussion discusses the controller performance
on glider system through simulation works. Final
section is conclusion where we reiterates the main
contribution of the work and highlights some of the
possible future improvement.

Material and Methods

Glider System
All the symbols used throughout this paper are
shown in Table 1. The general kinematic and dynamic
equations of the glider system designed is based on
Leonard and Graver
13
; is shown in Figure 1
14
.
Reference frames are established that is inertial frame
and body frame. We consider inertial frame is the
non-rotating reference frame of i, j and k. Let i and j
inertial axes lie in the horizontal perpendicular to
gravity. The k axis lies in the direction of the gravity
vector and is positive downwards. The inertial value
for k=0 coincides with the waters surface, in which
case k is depth.
The body frame is coordinate frame fixed to the
glider body with its origin at the glider center of
buoyancy (CB) as shown in Figure 1
14
.
In this paper, the vertical plane dynamics is
controlled using movable mass and variable ballast
mass is considered. Since the fix rudder is used to
stabilize the glider straight motion in vertical plane,
therefore the lateral dynamics can be ignored, hence
all the lateral components such as V
2
are equal to zero
except for the pitching component,
2
. This is reason
why the study for the vertical plane dynamics and
representative of actual glider operation are useful.
The following vertical motion equations suggested by
Leonard and Grave
5
is used in
14
to validate the
estimation model during the system identification
process. All the symbols used through this paper are
shown in Table 1.

sin cos
3 1
v v x + =
(1)

cos sin
3 1
v v z + =
(2)

2
=

(3)
Table 1Description of the symbols

Symbol Description
Angle of attack
Pitching angle
i, j, k Inertial reference frame
b =[x, y, z]
T
Body position vector from
inertial frame
D

Drag force
J = J
h
+ J
f
=diag(J
1
, J
2
, J
3
) Total Inertia Matrix
L Lift force
M = m
s
I +M
f
= diag(m
1
,m
2
,m
3
) Sum of body and added mass
M
DL

Viscous moment
m Mass of displaced fluid
m
b
Variable ballast mass
m Internal movable mass
m
0
= m
v
- m Excess mass
=[
1
,
2
,
3
]
T
Angular velocity
P
P
=[P
P1
, P
P2
, P
P3
]
T
Linear momentum of
m

R Rotation matrix
r
P
=[r
P1
, r
P2
, r
P3
]
T
Position of the internal
movable mass
v=[v
1
, v
2
,v
3
]
T
Translational velocity


Fig. 1Glider dynamics
14

INDIAN J. MAR. SCI., VOL. 40, NO. 2, APRIL 2011


202
( )
2 3 1 1 3 1 3 3 2
2
1 3 3 1 1 3
1
[( ) ( )
cos sin )]
DL
m m v v rPp rp Pp mg
J
rp rp M rp u rp u
= +
+ + +

(4)

( )
1 0 2 3 2 3 3
1
1
cos sin sin
1
u D L g m Pp v m
m
v + =
(5)

( )
3 0 2 1 2 1 1
3
3
sin cos cos
1
u D L g m Pp v m
m
v + =
(6)

( )
2 3 1 1 1
1
=
P P P
r v P
m
r
(7)

( )
2 1 3 3 3
1
=
P P P
r v P
m
r
(8)

1 1
u P
P
=

(9)

3 3
u P
P
=

(10)

4
u m
b
=
(11)

where is the angle of attack, D is drag, L is lift, M
DL

is viscous moment, is pitching angle, is angular
velocity, r
p
is position of movable mass, P
p
is linear
momentum, x and z are components of vehicle
position, and v
1
and v
3
are velocity with respect to
fixed body cord as shown in Figure 1 and appears in
equations 1 - 11. The estimation of hydrodynamics
forces acting on the underwater glider are obtained
using CFD analysis as explained in
15-16
. The
simulation of motion is also explained in
15-16
.

Model Identification
The System Identification (System Id) method has
been used to observe the ballast system (pumping
rate) of the USM-Glider causes changes in glider
motion behaviour. For this purpose, the input signal
(pumping rate/ballast rate) are positive and negative
pulses to command the ballast to pull and push the
water from the ballast tank. Then this input will
manipulate the mass distribution in the vehicle , hence
the vehicle dynamics are observed. The pitching angle
and the depth have been observed independently. The
detail implementation is explained in
14
. From
14
, we
have the following mathematical models that relates
the input (ballast rate) to the outputs. Using the
models obtained, we construct the controller
accordingly.

05 . 0 33 . 0
2
37 . 0
3
69 . 1
4
17 . 1
5
083 . 1
6
95 . 1
7
56 . 9
2
7 . 21
3
84 . 16
5
94 . 21
6
1 . 10
) (
+
+ +
+
+ +
=
z z
z z z z z
z z
z z z
z
Pitch
G

(12)

977 . 0 934 . 1
2
063 . 0
3
02 . 2
4
665 . 0
2
327 . 1
3
662 . 0
) (
+ +
+
=
z z z z
z z z
z
Depth
G
(13)

All the transfer functions obtained during the
identification process
14
are converted into continuous
time using ZOH approximation with sampling time Ts
= 0.5 seconds. This conversion is done using Matlab
simulation software. As a result the following transfer
functions are obtained.

82 . 19 92 . 78 8 . 276 2714
5 . 942 299 23 . 75 978 . 7
10 335 . 1 10 86 . 1
10 172 . 1 10 256 . 2
6759 1 . 184 108 713 . 7
) (
2 3
4 5 6 7 8
5 5
2 5 3 4
4 5 6 8
+ + + +
+ + + +
+ +
+ +
+ +
=
s s s
s s s s s
x s x
s x s x
s s s s
s G
pitch

(14)

03994 . 0 016 . 0 1263 . 0
48 . 39 09031 . 0
04793 . 0 2351 . 0
44 . 26 606 . 6 6765 . 0
) (
2
3 4 5
2 3 4
+
+ +
+

=
s s
s s s
s
s s s
s G
depth
(15)

Controller Design
In this section, a PID and LQR control schemes are
proposed and described in detail. The design
objectives to examine the performance of both
controllers in terms of system overshoot (OS%),
settling time (Ts) and the steady-state error (ess). The
gain of PID controller and the Qs and Rs values were
tuned heuristically.

PID Controller
The design methods for PID controllers are
typically based on a time-domain or frequency-
domain performance criterion. However, the
NOH et. al: DEPTH AND PITCH CONTROL OF USM UNDERWATER GLIDER


203
relationships between the dynamic behavior of the
closed-loop system and these performance indices
are not straightforward. A proportionalintegral
derivative controller (PID controller) is a generic
control loop feedback mechanism (controller) widely
used in industrial control systems. This is a type of
feedback controller whose output, a control variable
(CV), is generally based on the error (e) between
some user-defined set point (SP) and some measured
process variable (PV). The PID controller calculation
(algorithm) involves three separate parameters, and is
accordingly sometimes called three-term control: the
proportional, the integral and derivative values,
denoted K
p
, K
i
, and K
d
. Each element of the PID
controller refers to a particular action taken on the
error.

Proportional: error multiplied by a gain, K
p
.
This is an adjustable amplifier. In many
systems K
p
is responsible for process stability:
too low and the PV can drift away; too high
and the PV can oscillate.
Integral: the integral of error multiplied by a
gain, K
i
. In many systems K
i
is responsible for
driving error to zero, but to set K
i
too high is to
invite oscillation or instability.
Derivative: the rate of change of error
multiplied by a gain, K
d
. In many systems K
d
is
responsible for system response, if set too high
then the PV will oscillate; if set too low then
the PV will respond sluggishly.

The structure of the PID control scheme is shown
in Figure 2.

In this study the proportional, integral and
derivative gains are obtained through manual tuning
process. We did not use Ziegler-Nichols or Cohen-
Coon tuning methods due to very oscillatory open
loop response as shown in Figures 4 and 5. Through
manual tuning process of the proportional, integral
and derivative gains shows that the optimum response
of PID controller for controlling pitching angle is
achieved by setting K
p
= 0.00003, K
i
= 1.5, and K
d
=
82. For depth control the optimum response is
achieved by setting K
p
= 0.001, K
i
= 0.001, and K
d
=
0.01.

Linear Quadratic Regulator (LQR)
LQR is a method in modern control theory that
uses state-space approach to analyze such a system.
This the standard optimal control design which
produces a stabilizing control law that minimizes a


Fig. 2The PID controller structure



Fig. 3The LQR structure



Fig. 4Pitching angle

Fig. 5Depth
INDIAN J. MAR. SCI., VOL. 40, NO. 2, APRIL 2011


204
cost function, J that is weighted of sum of squares of
the states and input variables. By determines the
feedback gain matrix that minimizes J, we can
establish the trade-off between the use of control
effort, the magnitude, and the speed of response that
will guarantee a stable system. Assume that all the
states are available for feedback. The cost function is
to be minimized is defined as

dt t u R t u t Qx t x J
T T
) ( ) ( ) ( ) (
0

+ =
(16)

Where Q is symmetric positive semi-definite state
penalty matrix and R is symmetric positive semi-
definite control penalty matrix. Choosing Q relatively
large than those of R, then deviations of x from zero
will be penalized heavily relative to deviations of u
from zero. On the other hand, if R is relatively large
than those of Q, then control effort will be more
costly and the state will not converge to zero as
quickly as we wish. The tracking performance of the
LQR applied to the underwater glider was
investigated by setting the value of vector K and N
which determines the feedback control law and for
elimination of steady state error capability
respectively. The LQR structure is shown in Figure 3.

The transfer functions are converted into state
space form to enable LQR control to be constructed
over the system. After conversion the following
matrices are obtained.

[ ]
[ ]
0
60 . 32 39 . 11 58 . 3 34 . 0 41 . 0 04 . 0 11 . 0 12 . 0
0 0 0 0 0 0 0 64
0 25 . 0 0 0 0 0 0 0
0 0 5 . 0 0 0 0 0 0
0 0 0 5 . 0 0 0 0 0
0 0 0 0 4 0 0 0
0 0 0 0 0 4 0 0
0 0 0 0 0 0 4 0
0 0 0 0 0 0 0 16
31 . 0 31 . 0 54 . 0 650 . 2 68 . 3 67 . 4 702 . 4 98 . 7
=
=
=


=
pitch
pitch
T
pitch
pitch
D
C
B
A
(17)
[ ]
[ ]
0
05 . 0 06 . 0 65 . 1 21 . 0 17 . 0
0 0 0 0 4
0 25 . 0 0 0 0
0 0 25 . 0 0 0
0 0 0 50 . 0 0
0 0 0 0 8
16 . 0 02 . 0 03 . 0 93 . 4 09 . 0
=
=
=


=
depth
depth
T
depth
depth
D
C
B
A
(18)

Q and R matrices are tuned to obtain the
satisfactory results. The value Q and R are set to be
diag(500,50,10,10,0.5,0.5,0.5,5), and 0.005 for
pitching control and diag(80000,0.05,0.8,0.1,0.01),
and 0.01 for depth control. By setting such Qs and Rs
values we obtain the following K
pitch
and K
depth
.

K
pitch
= [316.3 215.6 230.9 133.9 40.7 55.5 43.1 31.6]

K
depth
= 1000 *[2.8 0.1 0.03 0.01 0.001]

In order to reduce the steady state error of the
system output, a value of constant gain, Nbar should
be added after the reference. With a full-state
feedback controller all the states are fed back. The
steady-state value of the states should be computed,
multiply that by the chosen gain K, and use a new
value as the reference for computing the input. The
Nbar can be found using the user-defined function
which can be used in m-file code. The value of
constant gains, pitching is 0.97 and depth is -20.88.

Results and Discussion
In this section, the proposed control scheme is
implemented and tested within the simulation
environment of the glider system and the
corresponding results are presented. The system
responses namely pitching angle, and depth, are
observed. The performances of the control schemes
are assessed in terms of ballast pumping rate input
tracking capability and time response specifications.
Figures 4, and 5 shows open loop response, Figure 6
and 8 shows the closed-loop response for various
values of gain K
p
and lastly Figures 7, and 9 shows
the closed loop response of pitching angle, and depth
for both controllers designed. The summarized result
NOH et. al: DEPTH AND PITCH CONTROL OF USM UNDERWATER GLIDER


205
is shown in Tables 2 and 3. Based on Table 1(pitching
angle), LQR demonstrates faster response which has
settling time of 12.2 seconds as compared to PID
which has much slower settling time of 88.1 seconds.
LQR also yields the maximum overshoot
considerably much lower than PID which is 4.13% as
compared to PID which is 22.5%. However both
controllers converge to the desired value with zero
steady-state error. Based on Figure 9, again LQR
demonstrates a good control over the system as
compared to PID which unable to converge to the
desired value, however the oscillation is reduced as
shown in Figure 10. Table 3 shows that LQR able the
reach settling time at 79.3 seconds, maximum
overshoot of 0.7%, and zero steady-state error.
An effective and considerable amount of research
work has been reported in the past on the tuning of PID
controllers. Some of them are Ziegler-Nichols step
response, Ziegler-Nichols ultimate cycling, Cohen-
Coon, internal model control, and error-integral criteria.
However, these tuning methods use only a small amount
of information about the systems, and often do not
provide good tuning for higher-order systems. Therefore
in his work, the controller parameters are obtained using
heuristic tuning approach.
The models for pitching and depth control are
obtained through system identification method using
data from simulation of the motion equations
14
. The
restoring forces (buoyancy and gravity) are included
in the model derivation
13
. The glider is modeled in
such that the external disturbances (water current and
wave) can be neglected. The PID controller provides an


Fig. 6Pitching angle-PID Controller with various values of
Kp Gain



Fig. 7Pitching angle LQR vs. PID


Fig. 8Depth- PID Controller with various values of Kp Gain



Fig. 9Depth- LQR vs. PID
INDIAN J. MAR. SCI., VOL. 40, NO. 2, APRIL 2011


206
overall control over the system not local. This is because
we only use ballast pumping rate as a control input to
observe the performance of overall glider system.

Conclusion
In this paper, two controllers: LQR and PID are
successfully designed. Based on the results and the
analyses, a conclusion has been made that both of the
control methods, modern controller (LQR) and
conventional controller (PID) are capable of controlling
the pitching angle. However for depth control, PID
control is unable to converge to the desired value as the
LQR does. All the successfully designed controllers
were compared. The responses of each controller were
plotted in one window and are summarized in Table 1
and Table 2. Simulation results show that LQR
controller has better performance compared to PID
controller in controlling the glider system. Further
improvement need to be done for LQR controller. LQR
controller should be improved so that the faster
response is obtained. In real system, not all states are
available to be fed back, therefore in future; observer-
based controller may be the option and Sliding Mode
Control (SMC) also a good option for control
technique to be used to control motion of the
underwater glider. In future online tuning also can be
considered to obtain optimal tuning over the system.

References
1 Stommel H. The Slocum mission. Oceanography. 1989; 2(1):22-
5.
2 Webb DC, Simonetti PJ, Jones CP. SLOCUM: an underwater
glider propelled by environmental energy. Oceanic Engineering,
IEEE Journal of. 2001;26 (4):447-52.
3 Eriksen CC, Osse TJ, Light RD, Wen T, Lehman TW, Sabin PL,
et al. Seaglider: a long-range autonomous underwater vehicle for
oceanographic research. Oceanic Engineering, IEEE Journal of.
2001;26(4):424-36.
4 Sherman J, Davis RE, Owens WB, Valdes J. The autonomous
underwater glider "Spray". Oceanic Engineering, IEEE Journal
of. 2001;26(4):437-46.
5 Leonard NE, Graver JG. Model-based feedback control of
autonomous underwater gliders. Oceanic Engineering, IEEE
Journal of. 2001;26(4):633-45.
6 Mahmoudian N, Woolsey C. Underwater glider motion control.
Decision and Control, 2008 CDC 2008 47th IEEE Conference
on; 2008 9-11 Dec. 2008; 2008. p. 552-7.
7 Bender A, Steinberg DM, Friedman AL, Williams SB. Analysis
of an autonomous underwater glider. Proceedings of the 2008
Australasian Conference on Robotics & Automation; 2008
December 3 - 5, 2008; Canberra, Australia
8 Yanhui W, Hongwei Z, Shuxin W. Trajectory Control Strategies
for the Underwater Glider. Measuring Technology and
Mechatronics Automation, 2009 ICMTMA '09 International
Conference on; 2009 11-12 April 2009; 2009. p. 918-21.
9 Kan L, Zhang Y, Fan H, Yang W, Chen Z. MATLAB-based
simulation of buoyancy-driven underwater glider motion.
Journal of Ocean University of China (English Edition).
2008;7(1):113-8.
10 Yu Z, Jiaping T, Donghai S, Shijie W. Research on the
Hierarchical Supervisory Control of Underwater Glider.
Intelligent Robots and Systems, 2006 IEEE/RSJ International
Conference on; 2006 9-15 Oct. 2006; 2006. p. 5509-13.
11 Yu Z, Liang Z, Tiejun Z. Discrete Decentralized Supervisory
Control for Underwater Glider. Intelligent Systems Design and
Applications, 2006 ISDA '06 Sixth International Conference on;
2006 16-18 Oct. 2006; 2006. p. 103-6.
12 Tatone F, Vaccarini M, Longhi S. Modeling and Attitude
Control of an Autonomous Underwater Glider. 8th IFAC
International Conference on Manoeuvring and Control of
Marine Craft; 2009 September 16-18, 2009; Guaruj (SP),
Brazil; 2009.
13 Graver JG. Underwater Gliders: Dynamics, Control and Design.
New Jersey: Princetone University; 2005.
14 Nur Afande Ali Hussain, Mohd Rizal Arshad, Mohd-Mokhtar
R. Modelling and Identification of Underwater Glider. Accepted.
2010.
15 Ali Hussain NA, Arshad MR, Mohd-Mokhtar R. Development
of an underwater glider platform. Proc of the Electrical and
Electronic Postgraduate Colloquium EEPC2009,; 2009 2
November 2009; Penang, Malaysia; 2009.
16 Nur Afande Ali Hussain, Ting Ming Chung, Mohd Rizal
Arshad, Rosmiwati Mohd-Mokhtar, Abdullah MZ. Design of
an underwater glider platform for shallow-water applications.
Int J Intelligent Defence Support Systems. 2010; 3(3).
Table 2Pitching angle

PID LQR
Maximum overshoot (OS%) 22.5 4.13
Settling time (Ts,secs) 88.1 12.2
Steady-state error (ess) 0 0
Table 3Depth

PID LQR
Maximum overshoot (OS%) unidentified 0.7
Settling time (Ts,secs) unidentified 79.3
Steady-state error(ess) unidentified 0



Fig. 10Depth PID vs. Open loop

You might also like