Biz & IT —

Teaching tiny drones how to fly themselves

Autonomous flying vehicles don't need people to tell them what to do.

A quadrotor in the University of Pennsylvania GRASP labs.
A quadrotor in the University of Pennsylvania GRASP labs.

Thanks to the wars in the Middle East, drones like the Predator have become household names. They’re getting more powerful and more lethal every day, and these combat drones have begun overshadowing important developments. The really exciting recent drone developments haven’t been on military airfields—they're in university labs. To find these advances, don't look to the nightly news. Advantage: YouTube.

If you’re reading this article, chances are you’ve seen a few of these videos: flying robots flitting through windows, swarms of hovering machines moving in choreographed precision, miniature helicopters playing catch and assembling buildings or dancing. What distinguishes these small unmanned aerial vehicles (UAVs) from their hulking military cousins isn’t just their agility, but their intelligence. These little machines are autonomous. Whether building walls or performing acrobatics, they perform their tasks without a human pilot sitting at the other end of a radio link.

Over the past decade, there’s been an explosion in the capabilities of these UAVs. Smaller, more power-efficient hardware for laptops and mobile computing have also brought about a revolution in aerial robotics. Ten years ago, research in automated flight needed big, fixed-wing RC aircraft that cost tens of thousands of dollars and could only be flown from airports. Now, it’s possible to fit the same abilities into a tiny helicopter that fits in the palm of a hand.

Still, even with advances in hardware, it’s always a challenge to fit enough computing onboard a flying robot. This has driven the other side of UAV development: the creation of smarter algorithms that let these UAVs fly, learn, and sense their environments. These algorithms are the brains behind the amazing YouTube videos, and through those videos we’ll explore how these UAVs think.

Flying

One of the first things you might notice about these UAVs is their incredible agility. If the Global Hawks and Predators are the condors and eagles of the unmanned aerial world, then these little guys are the hummingbirds.

One of my favorite examples is this video from the General Robotics, Automation, Sensing, and Perception (GRASP) Lab at the University of Pennsylvania:

The UAVs in this video are called quadrotor helicopters, or quadrotors. Unlike a normal helicopter, these fly with four rotors instead of two. Quadrotors are incredibly maneuverable, and they’re a good way to introduce the most basic needs for UAV flight: control and trajectory planning. The UAV needs to know how to fly itself, and how to get to a goal.

Let's start with how UAVs fly themselves. The basic hardware is pretty common across UAVs: motors and actuators, computing, gyroscopes that report the attitude angle (roll, pitch, yaw) of the robot, accelerometers, and often sonar to report altitude.

Most modern UAVs have their computing split into two levels, like the higher and lower brain functions in humans. There’s a powerful, high-level computer that handles things like communications, sensing, and path planning. Then there is a lower level processor, often a micro-controller, which stabilizes the UAV in flight. The low-level processor acts like the involuntary nervous system, which controls reflexes like balance. It samples the gyros and other sensors several hundred times per second, adjusting the motors to keep the UAV stabilized in the air.

But how does the low-level computer know what to change and how to make adjustments? That’s the role of the control algorithms, the code running on the computer that samples the sensors and decides how fast to run the motors. Designing and building a control system means first understanding how motor commands change the physical states of the UAV (things like acceleration, rotational rate, etc).

The ironic thing about quadrotors is, although they may look more complicated than regular helicopters and airplanes, they’re actually simpler to control (at least for a computer). It’s this simplicity that made them so popular, and it makes possible the kind of maneuvers we see above.

Take a look at this comparison between the main rotor of a regular helicopter, and one of the rotors on a quadrotor. The helicopter has a complicated collection of linkages and gears that control the exact angle of the individual rotor blades. On the quadrotor, the propeller is directly attached to the motor, and the only thing that changes during flight is how fast the propeller spins.

Wikimedia

A helicopter changes directions in the air by tilting the entire rotor disk: to fly to the left, the pilot tilts the rotor to the left, and so on. The pilot uses the controls to change the pitch angle of the rotor blades as they spin, so a blade generates more lift on one side of the helicopter than on another. This literally causes the blades to fly up and down as they rotate, tilting the angle of the rotor disk and moving the helicopter in the desired direction. The process itself is not simple. Because of gyroscopic precession, the lift offset is actually 90 degrees out of phase with the actual deflection of the rotor blades, so a leftward tilt of the rotor disk is actually created by increasing the blade pitch at the rear of the helicopter, and decreasing it at the front. A helicopter's controls have to automatically account for this when mapping the pilot's control inputs to the rotor system.

As you might imagine, tilting the rotor blades like this is complicated, and helicopters are really hard to fly without a lot of training. A small change in a single control input like rotor angle affects the helicopter in many different ways. And this also makes life rough for a robot designer: it’s hard to predict how changes in the controls will affect the flight of the helicopter. Human pilots train for hundreds of hours to develop the muscle memory that enables them to fly a helicopter.

Channel Ars Technica