How to build an UAV(1): The basics

Abstract This is is a series of 3 articles dedicated to the process of designing and building an Unmanned Aerial Vehicle (UAV). First article covers the basic definitions, the second goes into the steps of the project, and the third and last is about the practical constructive aspects.
Author Joan C. Abelaira

UAV are everywhere and not new, did you know?

UAVs are today more common than what we could think. Almost anybody with a curiosity about aviation knows about General Atomic's MQ-1 Predator and even they can recognize its silhouette. But the truth is that only in the USA, at least 30 military projects have been developed since 1990, and Predator is one of the oldest. If we add the non-military UAV  models plus those developed in other countries by the governments or individuals, there have been more than 100 successful and public UAV models!


MQ-1 Predator about landing

Here is some terminology used for unmanned airplanes:

It is clear that the first 3 terms above (from now on referred to as UAV) can fly without a land-based pilot. The last 3 terms (drone, RPV and ROA) need a human pilot controlling the plane but not on-board.

UAVs can serve for military purposes (reconnaissance, targeting, logistics, attack, etc.) but also for civilian uses (research, surveying, vast area monitoring, transport, etc.). The basis of the UAV system is the same: to pilot a plane through a predetermined path as if a human pilot did it.


The Aerosonde, a research UAV, and the smallest plane to cross the Atlantic

Basic elements of an UAV system

Two elements are essential for any UAV system: the IMU, the GPS and the Autopilot.

1. The IMU (Inertial Measurement Unit)

The IMU provides information about the attitude of the plane (the pitch, roll and yaw angles). From physics we know that a body in a 3D space has 6 degrees of freedom (DoF): three translations and three rotations about the X, Y and Z axis.

A complete IMU (so called 6 DoF IMU) contains 3 accelerometers and 3 gyroscopes. An accelerometer measures acceleration (variation of speed - m/s2) in a given direction. A gyroscope measures the angular speed (turning rate - in rad/s or degree/s) around a given axis. All elements are located to measure these quantities for X, Y and Z axis (fixed respect to the airplane body). But...

Accelerometers and gyroscopes signals have to be integrated to obtain speeds and rotation angles. This is a bit of a problem because these signals, as any signal coming from a sensor, contains errors: offset, noise, drift, temperature and supply dependence, etc. Integrating a signal with error can make the error to grow with time. Noise, at least, is supposed to be zero-centered and do not build up with integration. Other do, so special calibration procedures and/or cancellation schemes are necessary.


An integrated 6 DoF IMU

Commercial airliner IMUs are still big and heavy boxes with spinning wheels (mechanical gyro). Fortunately, we now have solid state MEMS gyroscopes that offer the same functionality in a tiny space and a mere gram of mass.

A 6 DoF IMU is the standard but sometimes hobbyists adopt simplified 5 or 4 DoF IMU for their projects. Systems like these can work (and fairly well) but a full system will offer the maximum reliability and robustness in gusty conditions, crosswinds, etc.

2. The GPS (Global Positioning System)

The GPS provides information about the position of the aircraft in the air (GPS also provides height). Receiving and decoding GPS signals from satellites is a very complex task (that involves measuring time differences in ps -picoseconds-, getting almanac and orbital data from satellites and computing the most probable position from at least 4 satellites) but fortunately solved with readily available easy to use GPS modules that communicate with an MCU via UART. Almost all GPS modules use the NMEA 0183 protocol so the communication is very standardized. A newer protocol, NMEA 2000, is available but still not common.


A GPS module

3. The Autopilot

In small UAVs a medium-big MCU from 64 KB upwards can host the autopilot's software. In big UAV systems a full PC can be found. The Autopilot reads data from the sensors (IMU, GPS and others) and has the responsibility of governing all the airplane flight controls (ailerons, flaps, elevator, ruder and motor throttle/ thrust) to keep the plane flying in the way somehow programmed (for example in a flash memory or SD card).

The Autopilot is a control system, so Control Theory comes up. The basic scheme of a control loop (for one variable) is this:

But in an UAV, different variables have to be controlled simultaneously (pitch angle, bank angle, heading and speed at least) and control actuations affect to more than one of these variables (for example rudder controls heading but also banks the plane).

While basic, hobbyist UAV systems have a number of independent basic PID controllers, robust and true UAV systems have more advanced control schemes like state space controls, adaptative controls, etc.

Secondary elements in an UAV system

For a better control or just redundancy, some other sensor elements can be included in the UAV system, like:

4. Air speed sensor.

Air speed is the speed of the airplane with respect to the surrounding air. It can be different to the ground speed (speed relative to ground). It is important to avoid stall (when air speed goes below a certain minimum value -stall speed- air flow in the wings gets spoiled and lift is not generated so the plane literally drops).

From IMU data, the speed can be calculated but is ground speed and has the uncertainty of the integral of the error, so it is not the best way to avoid stall. GPS also gives ground speed.

Air speed can be measured in different ways. One of the most used is a Pitot tube and a differential pressure sensor. A small pressure difference is generated and proportional to the square of speed.


Pitot sensor under an Airbus wing


Differential pressure sensor

5. Magnetic compass.

Compasses have been used for centuries and are still a reliable way to know an airplane's heading and attitude. Solid state magnetic sensors measure the magnetic field of the Earth in 2- or 3-axes. Earth magnetic field lines do not run straight from the North to the South geographic poles following the meridians, but keep an angle called magnetic deviation (aka magnetic declination) and well known by sailors. Picture at the right shows world's magnetic declination values for year 1995.

Magnetic declination varies slowly with place and time (in 100s of kilometres and years scale) but most times is taken as a constant (one of these that change every year!)

Earth magnetic field lines make also an angle with the local horizon. This is called magnetic inclination (or magnetic dip) and also varies from place to place and with time.

If for a given (geomagnetically) small area both magnetic inclination and declination are known, data from a 3-axis sensor fixed to the airframe can be converted to heading and attitude, thus providing a redundant information (but without integration error) besides the IMU. But magnetic compasses cannot (so far) replace IMUs because of low accuracy.

6. Barometric altimeter.

They are also used in real sports airplanes. A precise absolute barometer is calibrated to indicate height instead of pressure drop (the atmosphere is a column of fluid -air- so pressure decreases with height).

At the beginning of the flight is set to the airport's altitude over sea's level. Of course, pressure vary from one day to other, but not so much in an hour, so it is quite a valid method.


Absolute pressure sensor

It can be used as an alternate to GPS, specially in landing, because GPS modules send data at a relatively low rate (1 to 10 Hz) while barometric altitude can be read at 100s of Hz.

7. Infrared horizon sensor.

This is a system commonly employed in satellites but more difficult to apply to low altitude UAVs. The basis is that the IR radiation coming from the sky is colder (longer wavelength) than that coming from the Earth surface, even if covered by snow.

In UAVs, some implementations of IRHS use 4 thermopiles (IR sensors) pointing forward, backward, to port and starboard. Such a "four eye" sensor is not easy to install in an airplane without being partially shadowed by the plane itself.

For an UAV in the lower atmosphere, the presence of clouds alter the measured sky temperature. Mountains in the horizon can make the sensors to introduce an error. Differences in terrain reflectivity at short scale (fields, woods, rivers, lakes, etc.) also alter the sensors' readings. To not to say the presence of the Sun

Go To Part 2