Content uploaded by Rajesh R J
Author content
All content in this area was uploaded by Rajesh R J on Nov 02, 2018
Content may be subject to copyright.
Content uploaded by P. Kavitha
Author content
All content in this area was uploaded by P. Kavitha on Apr 25, 2018
Content may be subject to copyright.
IEEE International Conference on Computer, Communication and Control (IC4-2015)
CAMERA GIMBAL STABILIZATION USING
CONVENTIONAL PID CONTROLLER AND
EVOLUTIONARY ALGORITHMS
R J RAJESH
School of Electrical Engineering
VIT University, Vellore,
Tamil Nadu, India
rajesh1790reddy@gmail.com
Dr. Kavitha P
School of Electrical Engineering
VIT University, Vellore,
Tamil Nadu, India
kavithaslvm@gmail.com
Abstract: In this paper, control system is designed to
stabilize the camera gimbal system used in different air borne
systems for applications such as target tracking, surveillance,
aerial photography, autonomous navigation and so on. This
camera gimbal system replaces many traditional tracking
systems such as radar which are heavy and large to mount on air
vehicles. So, the stabilization of camera gimbal is very important
to eliminate shakes and vibrations in photography, provides
accuracy in tracking moving target and so on. The control system
for this gimbal is developed using various control methods and
algorithms to provide better and efficient performance with
flexibility, accuracy and feasibility. PID controller is designed to
control camera gimbal due to its effectiveness, simplicity and
feasibility. The tuning parameters of PID controller are tuned
using traditional and evolutionary algorithms such as PSO and
GA to provide better performance and accuracy in system
response. PSO and GA are used due to its dynamic and static
performance, computational efficiency and so on. In this paper,
performance of system with conventional PID and PSO, GA
tuned PID controllers are compared and optimized algorithm is
implemented.
Keywords— Gimbal, PID controller, Particle Swarm
Optimization(PSO), Genetic Algorithm (GA), Ziegler Nichols,
Cohen Coon, Kinematics
I. INTRODUCTION
The main aim of this paper is to develop stabilized camera
control system which is used in number of applications such
as aerial photography, surveillance, missile tracking, and
autonomous navigation and so on. The camera control system
is supported using a mechanical system known as gimbal
system. This camera gimbal is used in moving carrier such as
UAV’s, MAV’s, helicopter [1] and so on for target tracking,
rescue operations, to capture motion pictures. Disturbances
caused for the system due to motor friction, unbalanced
aerodynamics, spring torque forces are compensated using this
electro-mechanical system. If the camera positioning is not
compensated or stabilized, it produces shakes in the video
capturing, blurred images, and failure in object tracking and so
on during aerial photography, autonomous target tacking etc.
So stabilization of camera is necessary for various
applications.
Autonomous operations and tracking of moving target
without knowing its future position is a challenging task. The
applications such as tracking a moving target, surveillance etc
is very important in military applications, civilian purposes
etc. So, the stabilization of camera is very much necessary for
all these applications. For the development of camera gimbal
control system, control algorithm designing is necessary.
There are many algorithms such as adaptive control, PID
controller, fuzzy logic controller, fractional order controller
and so on. The controller used for this system is PID
controller. PID controller is the most commonly used
controller in the industries for its effectiveness, simplicity and
feasibility.
The gimbal mechanism used for control of camera position
is a mechanical device which is designed using the rings
mounted on axes at right angles to each other. The objects
present in unstable environments are arranged in stable
position using this mechanical device [2]. Camera used in
aerial vehicles is mounted as payload for this gimbal device.
PID controller controls the movement of this device which
indirectly controls on board camera. Gimbal has variety of
applications in aircraft environment, to maintain level of
measuring instruments with respect to ground and so on. In
this paper, the controller maintains the camera position
horizontal to ground axis or world axis. Control of camera can
be feasible by manual control, but it is complex and tedious
since it requires separate operator to control it [3]. So,
autonomous control is preferable than manual control. The
advantage of using gimbal control with a particular control
algorithm is shown in figure 1.
The gimbal used to control is 3-axis gimbal which consists
of servomotor, IMU sensor [4]. It is mounted at the front end
of the aerial vehicle below the vehicle as shown in figure 1.
The PID controller controls gimbal actuators which control the
movement of the camera.
IEEE International Conference on Computer, Communication and Control (IC4-2015)
Fig 1: Schematic diagram of Camera Gimbal on UAV
In this application yaw-roll-pitch-axis movement gimbal
mechanism is used. The defect in the design of gimbal device
may lead to the development of complex control algorithms
and performance criteria may not be achieved [5].
II. MATHEMATICAL MODELLING
The designing of control algorithm requires the
mathematical model of gimbal device and its actuator [6].
A. Gimbal Modelling
The 3-axis gimbal consists of three revolute joints and it
has yaw-roll-pitch axis representation. Here θ1, θ2, θ3
represent yaw-roll-pitch angles. The schematic diagram of
gimbal kinematics with 3 revolute joints is shown in figure 2.
Fig 2: Gimbal Kinematics with 3 revolute joints
Gimbal forward kinematics is derived by using DENAVIT-
HARTENBERG convention. The transformation from body
(0) to body (3) is shown below
The rotation matrix of yaw axis from the frame of body (0)
to the frame of body (1) is
The rotation matrix of roll axis from the frame of body (1)
and the frame of body (2) is
The rotation matrix of pitch axis from the frame of body
(2) and the frame of body (3) is
The total rotation matrix between the base frame (0) and
frame of body (3) is
Here Ci=Cos (θi) and Si=Sin (θi).
The IMU sensor is mounted on the camera frame i.e. body
(3) and position encoders mounted to servo motors. The
angular position of camera frame is derived from the gyros
and accelerometers on IMU mounted on it. α1, α2 and α2 are the
angles of yaw, roll and pitch axes of camera frame. α1desired,
α2desired and α3desired represent the desired position of camera
frame with respect to ground frame. ε1, ε2 and ε3 represent the
errors of yaw, roll and pitch axes of camera’s reference frame.
ε1= α1desired - α1
ε2= α2desired - α2
ε3= α1desired - α3
The rotation matrix of camera’s error reference frame is
Here Cεi=Cos (εi) and Sεi=Sin (εi).
01
R=
11
11
cosθ -sinθ 0
sinθ cosθ 0
0 0 1
22
22
1 0 0
0 cosθ -sinθ
0 sinθ cosθ
12
R=
1 3 1 2 3 2 1 1 3 3 1 2
3 1 1 2 3 1 2 1 3 1 3 2
2 3 2 2 3
C C -S S S -C S C S +C S S
C S +C S S C C SS -C C S
-C S S C C
03
R=
33
33
cosθ 0 sinθ
0 1 0
-sinθ 0 cosθ
23
R=
0 0 1 2
3 1 2 3
R = R R R
1 3 1 2 3 2 1 1 3 3 1 2
3 1 1 2 3 1 2 1 3 1 3 2
2 3 2 2 3
Cε C ε - S ε S ε S ε - C ε S ε C ε S ε + C ε S ε S ε
Cε S ε + C ε S ε S ε C ε C ε S ε S ε - C ε C ε S ε
-Cε S ε S ε C ε C ε
3 ε
R=
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
Zw
Yw
Xw
Zim
Yim
Xim
Camera Captured Image
Target Image
UAV
ROLL
PITCH
YAW
IEEE International Conference on Computer, Communication and Control (IC4-2015)
From the inverse kinematics of gimbal, new joint angles
are derived. The total rotation matrix from frame of body (0)
to the error frame ε in camera’s reference frame is
θ1, θ2 and θ3 are the current joint angles. The new joint
angles of gimbal are calculated as shown in (11).
The equation (11) indicates that frame of body (3) is same as
error frame (ε) of camera frame. From equation (10) and (11),
equation (12) is obtained.
The right hand side of equation (12) is represented as
rij represents the components of matrix . The
equations derived using inverse kinematics give the desired
joint angles as shown below.
Θ1new, Θ2new and Θ3new are the new desired joint angles.
B. Motor Modelling
The transfer function equation of gimbal actuator to obtain
desired position using controller is equation (17).
Where,
K represents emf in (Nm/A)
L is inductance in (henry)
R is resistance in (ohm)
J is the moment of inertia of rotor in (kg.m2/s2)
B is the damping ratio in (N-m/rad)
Θ(s) is the angular position
C. PID Controller
PID controller is the most commonly used controller used
in industries. Its parameters Kp, Ki and Kd provide accurate
closed loop performance and are known as proportional,
integral and derivative gains respectively. The PID controller
transfer function is
III. CONTROL BLOCK DIAGRAM
Fig 3: Control block diagram of gimbal
Figure 3 shows the control block diagram used for
designing the camera gimbal control system. PID controller
performance depends on its parameters which are tuned using
different tuning algorithms such as Ziegler Nichols, Cohen
Coon, PSO tuning, Genetic algorithm, ACO and so on. In this
paper PSO tuned PID controller performance is compared
with GA tuned PID controller along with traditional tuning
methods.
IV. PSO TUNING METHOD
PSO is a robust stochastic optimization technique and is
developed by the inspiration of bird flocking. It solves
problems based the movement and intelligence of swarms and
provides optima for problems with non linearity, non-
differenciality and so on. It is a searching algorithm which
gives optimum and shortest position. Birds are known as
particles and fly in the problem space of n dimensions (n is the
no. of tuning parameters) by considering current optimum
particles [7]. It consists of parameters such as swarm size,
position, and maximum no. of iterations with random
initialization of its position and velocity. In this method, each
particle is updated with two best values for every iteration
with one best value being the best solution achieved by
individual particle so far known as Pbest and the other best
value is the optimum best solution obtained by a particle in the
entire population of particles called Gbest. The particles
velocity and position is updated by the following equations.
Where,
0 0 3
ε 3 ε
R(θ,ε)= R (θ) R (ε)
00
3 new ε
R(θ )= R (θ,ε)
0 0 3
3 new 3 ε
R(θ )= R (θ) R (ε)
03
3ε
R(θ) R (ε) =
11 12 13
21 22 23
31 32 33
r r r
r r r
r r r
03
3ε
R(θ) R (ε)
-1 12
1new
22
-r
θ = tan ( )
r
-1
2new 32
θ = sin (r )
2
θ(s) K
=
V(s) s[(Ls+R)(Js+B)+K ]
I
PID P D
K
G =K + +K s
s
t+1 t t
i,m i,m 1 best(i,m) i,m
t
2 best(m) i,m
v =w.v + c * rand() * (P -x ) +
c *rand()*(G -x )
t+1 t t+1
i,m i,m i,m
x = x + v
-1 31
3new
33
-r
θ = tan ( )
r
(18)
i - 1, 2, 3…….n
m - 1, 2, 3.....d
n - Number of particle population in a group
d - Dimension of space (no. of tuning parameters)
t - Current iteration value
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(19)
(20)
Rotary
Encoder
IMU
_desired
new
Position
Controller Gimbal
Actuator
Inv.
Position
IEEE International Conference on Computer, Communication and Control (IC4-2015)
The flow chart of PSO algorithm implementation is as shown
in figure 4.
V. GENETIC ALGORITHM TUNING METHOD
Genetic Algorithm (GA) is a stochastic global search
optimization technique which uses natural process of
evolution for finding optimal solution. It is similar to PSO
algorithm and here particles are considered as chromosomes.
This algorithm starts with zero knowledge of correct solution
and depends on system responses to arrive at optimal solution.
GA consists of three steps and they are selection of parent
chromosomes [8], crossover of these parent chromosomes and
the mutation to create new individual better than parents. The
procedure is shown in flowchart in figure 5.
Fig 5: Flow chart of GA algorithm
The Simulink model of 3-axis Camera Gimbal control is
shown in figure 6. Here the IMU reading is taken as step input
generated using stair generator block in simulink.
Fig 6: The simulink model of 3-Axis camera gimbal system
The IMU desired angles are the set point angles to be achieved
which makes camera stable and points to desired object. The
error to PID controller is the difference between the joint
angle calculated by inverse kinematics of gimbal and the joint
angle obtained by position encoder.
A. Implementation of PID controller using Conventional
Tuning methods
The responses of the 3-axis gimbal system obtained using
traditional tuning methods for tuning parameters of PID
controller are shown in figure 7, figure 8 and figure 9.
Fig 4: Flow chart of PSO algorithm
vi, m - velocity of a particle I at iteration t
w - Inertia weight factor
c1, c2 - learning factors
rand ( ) - random no. between 0 and 1
Xi, d - current position of particle i at t iteration
Pbest (i) - best particle position of ith particle
Gbest - best particle position among all the
particles in the population
Start
Initialize particles with random
position, velocity, Pbest & Gbest
Evaluate the fitness function for each particle
IS
current fitness value of a
particle < its previous best
Pbest = Current Fitness Value
Calculate current Gbest of all
particle
IS
Global best fitness value
< Previous global best
fitness value
Gbest = current fitness value
Update position & velocity of
particles
IS
stop criteria met?
Parameter values = Gbest values
Stop
Move to next
particle check
Yes
Yes
No
Yes
No
No
Pbest
Gbest
Start
Initialize Kp, Ki and Kd
Evaluate the fitness function for each
particle/chromosome
Selection of Parent Chromosomes
Crossover between the parent
chromosomes using Arithmetic
Crossover
Uniform Mutation
Elitist Model
IS
stop criteria met?
Parameter values = Best Solution
Stop
Yes
No
IEEE International Conference on Computer, Communication and Control (IC4-2015)
Fig 7: Yaw axis response using conventional tuning method
Fig 8: Roll Axis response of 3-axis gimbal system
Fig 9: Pitch axis response of 3- axis gimbal system
B. Implementation of PID controller using
EvolutionaryTuning methods
PSO and GA evolutionary tuning algorithms are used in this
paper. The PSO and GA parameters used for tuning PID
controllers are shown in table 1 and table 2.
Table 1: The PSO algorithm parameters
Parameter Name
Variable
Value
Cognitive component
c1
1.5
Social component
c2
1.5
No. of particles (Population)
n
100
No. of iterations
N
1000
Minimum inertia weight
Wmin
0.4
Maximum Inertia weight
Wmax
0.9
Dimension (No. of
parameters)
dim
3
The fitness function or objective function used in PSO
algorithm and Genetic algorithm is as shown below. Selection
of fitness function is crucial for obtaining best solution of PID
tuning values. Here β value is taken as 1.5.
Where, F is fitness value, β is weighing factor, Ess is steady
state error, Mp is overshoot, Ts is settling Time and Tr – Rise
time.
Table 2: Genetic algorithm parameters
Parameters
Values
Population size
50
Maximum No of generations (iterations)
500
No. of tuning parameters
3
Mutation rate (Uniform)
0.3
Crossover Probability (Arithmetic)
0.8
Selection rate
0.5
The system responses obtained using evolutionary tuning
algorithms is shown in figures 10, 11 and 12.
Fig 10: Yaw axis response using Evolutionary techniques
F=(1-exp(-β))*(Mp+Ess)+exp(-β)*(Ts-Tr)
(21)
IEEE International Conference on Computer, Communication and Control (IC4-2015)
The responses of PSO and GA tuned PID controller for
Camera Gimbal control show the final joint angle reading
obtained from position encoder.
Fig 11: Roll Axis response of system using evolutionary technique
Fig 12: Pitch axis representation of gimbal using evolutionary technique
The responses clearly indicate the performance variation
of the system for different tuning algorithms. PSO tuned PID
controller gives the better performance of the system
compared to other tuning methods. The system performance
depends on controller and its tuning parameter values. The
step response of gimbal system using different tuning
algorithms is shown in figure 13.
Fig13: Step responses of system for different tuning algorithms
VI. CONCLUSION
The Stabilization of Camera Gimbal is very important for
various applications in air borne systems and other systems as
discussed. The control system of gimbal plays crucial role in
these applications to get accuracy in performance. The PID
controller designed stabilizes the camera gimbal and improves
its performance as shown by the responses. Tuning methods
used to tune PID parameters show different variations in
performance in the system and PSO tuned PID controller
gives accurate and stable convergence. So, PSO tuned PID
controller is preferred to stabilize camera gimbal system.
VII. REFERENCES
[1] Tiimus K and Tamre M, “Camera Gimbal “Control System for
Unmanned Platforms”, 7th International DAAAM Baltic Conference
"INDUSTRIAL ENGINEERING”, Tallinn, Estonia, 22-24 April 2010.
[2] Ole C. Jakobsen and Eric N. Johnson, “Control Architecture for a UAV-
Mounted Pan/Tilt/Roll Camera Gimbal”, InfoTech @Aerospace,
Arlington, Virginia, 26 - 29 September 2005.
[3] Taki Shiino, Kazuo Kawada, Toru Yamamoto, Manabu Komichi and
Takafumi Nishioka, “Gimbals Control with the Camera for Aerial
Photography in RC Helicopter” International Conference on Control,
Automation and Systems in COEX, Seoul, Korea, 2008 Oct. 14-17,
2008.
[4] Mohammad Abdul Rahman Al-Mashhadani, “Optimal and PID
Controller for Controlling Camera’s Position in Unmanned Aerial
Vehicles”, International Journal of Information Technology, Modeling
and Computing (IJITMC), Vol.1, No.4, November 2013.
[5] Per Skoglar,” Modeling and control of IR/EO-gimbal for UAV
surveillance applications”, Institution for Systemteknik, Sweden.
[6] Jakob Johansson, thesis on “Modeling and control of an advanced
camera gimbal”, Department of Electrical Engineering, Linkoping’s
university, Linkoping, Sweden.
[7] P. Ravi Kumar, V. Naga Babu, “Position Control of Servo Systems using
PID Controller Tuning with Soft Computing Optimization Techniques”,
International Journal of Engineering Research & Technology (IJERT),
Vol. 3 Issue 11, November-2014.
[8] Bindu R, Mini K. Namboothiripad, “Tuning of PID Controller for DC
Servo Motor using Genetic Algorithm”, International Journal of
Emerging Technology and Advanced Engineering, ISSN 2250-2459,
Volume 2, Issue 3, March 2012.