Monday, July 1, 2013

Project UAV

In this project we present the implementation of a Video Monitoring
system using an Unmanned Aerial Vehicle (UAV). Initially we present the
design details for the control system of the UAV built around a quadrotor
configuration. Quadrotor UAVs are being increasingly deployed in military
warcraft and off late, they have also found varied applications in the field of
law enforcement, traffic analysis, swarm intelligence and mainly in various
rescue operations. UAVs require sophisticated control system which are very
challenging to build. Our focus in this project, is on the electronic control
of the UAV rather than the mechanical aspects of its design. We propose
a control system consisting of two stages - the Inertial Measurement Unit
(IMU) and the UAV Flight Control. We demonstrate image transmission
from UAV to the base station using a Zigbee link.
We demonstrate a low cost realization of IMU by fusing the output of
MEMS sensors (accelerometer and gyroscope) using the Kalman Filter. The
Kalman Filter takes input from both the accelerometer and gyroscope and
returns an accurate estimate of the position of the UAV. We also describe
the associated state modeling and optimization of the Kalman filter. We
then demonstrate the superior performance of the Kalman Filter compared
to raw sensor data. We implement the Complementary Filter and compare
its performance with that of the Kalman Filter.
In flight control part, we achieve the flight of the UAV by differentially
controlling the speed of each of the four motors. A possible implementation
of the motor driver and differential speed control with PWM signals is
shown. We implement the Proportional Integral Derivative(PID) controller
to obtain error parameters for yaw, roll and pitch. These error parameters
are then used to generate appropriate PWM signal for each of the four
motors. We then present the tuning of PID controller for this application.
We mount a serial camera on the UAV and transmit images to the base
station via a Zigbee link. The images from the UAV can then be used for
surveillance and to guide rescue operations in flood affected areas.
Block Diagram

Inertial Measurement Unit (IMU)

1.  IMU is a system that helps in localization and pose estimation of the UAV.
2.  We implement the IMU using a MEMS accelerometer and gyroscope.
3. The Kalman Filter and the Complementary Filters are then used on the raw sensor data to obtain an accurate estimate of the pose of the UAV.

Sensors
1.  We used a 3 axis accelerometer (ADXL335) and a 2 axis gyroscope (LPR5150AL) in the
IMU.
2. The accelerometer measures the tilt depending upon the gravitational force acting on it, while the gyroscope measures angular rate.


Sensor interfacing
1. An Atmega32 microcontroller is used to read the sensors and implement the control functionality of the UAV.
2. The MEMS accelerometer, gyroscope are analog devices and hence the sensors are connected to the microcontroller through the inbuilt ADC channels of Atmega32.

Need for Sensor Fusion
1. Accelerometer readings are noisy.
2.  Gyroscopes suffer from drift.
3. Kalman Filter and Complementary Filter are
used for Sensor Fusion.
4. Kalman Filter is a popular tool used to fuse noisy sensor readings to get clean, accurate estimates.
5. Complementary is a close approximation to the Kalman Filter with less computational burden.

Kalman Filter for Sensor Fusion
Kalman Filter

Flight Control
Flight Control
Thrust Measurement
1. All the four motors used in the UAV should 
produce the same thrust or upward force for same 
input voltage.
2. But practically it is very difficult to obtain perfectly 
matched motors.
3. The thrust produced by each motor is measured at 
varying input voltages and this is used to supply 
appropriate PWM to each of the motors.
4. This is done by suspending the motor assembly 
from a load cell and measuring the force produced 
at different voltages.

Thrust Measurement
Thrust Measurement

PID Controller
PID Controller

PID Tuning
1. We use the Zeiglar Nicholas method to tune the 
gains of the PID controller.
2. The method used is as follows
           Make I and D gains zero and increase P till the 
system oscillates.
           Note the value of Proportional gain as the critical 
gain Ku and the period of oscillations.
3. We use the Simulink Blockset in MATLAB to tune 
the gains of the PID controller using the Zeiglar 
Nicholas method.
4. The PID gains are tuned with the hardware in the 
control loop.
5. The input angles are read from the IMU, while 
motor actuation signals are sent from Simulink to 
the UAV through the serial port.

Conclusion
Successfully implemented IMU with Kalman 
Filtering and Complementary Filtering.
1. On comparison it was seen that the 
Complementary Filter responds very fast to the 
changes while the Kalman Filter needs some 
iterations. But, the Kalman Filter provides a more 
accurate estimate.
2. Thrust characterization of the motors.
3. Tuned the gains of the PID controller for 
satisfactory response.
4. Flight tests – Not satisfactory mainly due to ever 
deteriorating characteristics of the brushed 
motors.