Вы находитесь на странице: 1из 14

The personal quadrotor project brief state report

Jaromir Dvorak (dvoraj13@fel.cvut.cz) Horn Cerekev, October 17, 2010

Motivation and little history

History of this project reachs up into the past, to the last years of my sudies on high school. Since my childhood ive been allways interested in and fascinated by autonomous ying machines. When becoming CTU student, I had allready designed inertial measurement unit board and want to use it to control a conventional RC model helicopter. Last year, my brother went to Croatia yachting with his family and a close friend as their captain. Accidentaly, both of them are RC modellers. Once they were chatting about their planes, the captain mentioned about his participation in an organisation, about the project of autonomous ying vehicle which they want to develop but dont have people with required skills. My brother immediately started talking about me, about my interests. After their return, we exchanged contacts and organised meeting. So nally, I nally got a sponsor. The project submission follows: Design and realise a control system for autonomous ying robot.

Why quad-rotor?

From one of the very basic eld of view, the aerial vehicles can be divided into two groups. The following table shows some of the main theoretical features of them. xed wing low nonomnidirectional higher no higher no not allways critical rotating wing high omnidirectional lower yes lower yes deadly

power consumption maneuverability range vtol speed hover mode control fault tolerance

For our approach, there are undeniable advantages of a rotating wind over the xed wing aircraft, especially for short-range or indoor missions where maneuverability, omni-directional movement, ability of hovering and obstacle avoidance is critical. The main dierence is that the copter is omnidirectional in translation, i.e. it can move up, down, left or right, backward or forward in space independently. Price for this property is the need for constant power to the propellers to keep the device in-the-air, which results to shorter battery life and shorter ight range.

There are many rotating-wing aircraft congurations, like the classical helicopter model with tail rotor for yaw control or multi-rotor and co-axial congurations. Quad-rotor over the classical helicopter concept is mechanically much simpler and easier to construct. There is no need for complicated rotor head, blades that must change their attack angles, collective pitching, nor tail rotor for yaw stabilisation. There are only 4 (or any even number) of rotating propellers with parallel axis mounted around a rigid body. The propeller doesnt only generate a static thrust, but also a torque, which we can eectively use to control the yaw angle. One half of the properells are rotating clockwise, the other half counter-clokwise. Thats why even number of propellers is needed. Attitude + heading (spatial rotation) and movement (spatial translation) is controlled via the power of propeller motors. Each propeller must be, of course, controllable separately. By using todays brushless synchronous motors with excellent rigidity and lifetime, which actually depends only on their bearings, the resulting device is, from the mechanical eld of view, pratcticaly faulty-free, care-free, and can be easily constructed using cheap, available parts.

First engineers look at the dynamic model

In this section, ill try to describe my own comprehension of the dynamic quadrotor behavior and geometry. Theese thoughts were the basics during all the recent development. A ying vehicle, in opposite to a surface wheel robot, has totally 6 degrees of freedom, which we wish to control. So in the language of control engineering, our aircraft vehicle, quad-rotor, has 4 inputs and 6 outputs.

Figure 1: basic model inputs/outputs

Thus, it is not controllable because of the input vector has lower dimension than the output vector. In the language of robotics, this means that the device is not holonomic i.e. not all the conguration states can be directly changed without changing the others. However, device is controllable, or holonomic if we see the rotation-only or translation-only part of the output. So lets split the devices output state into two groups: absolute spatial rotation and absolute spatial position, lets say, in Earths North-West-Down coordinates. If we assume the craft oating in a gravity-free environment, the non-holonomic relationship idea can be brought to all parts as follows: The device can only move by an axis which is parallel to the propeller axes (all of them are parallel). For comparison - imagine a 2-wheel robotic footbal player. It has two inputs (left and right wheel) and three states (x, y, heading). Its obvious that it can only move forward, to a direction determined by heading angle, likewise our quadrotor. For robotic football player we can write the symbolic movement equations: vf orward = wheel1 + wheel2 vangular = wheel1 wheel2 And similarily for the quad-rotor. Let x,y,z be the body frame basis: momentx = motor1 motor3 momenty = motor2 motor4 momentz = motor1 + motor2 motor3 motor4 thrustz = motor1 + motor2 + motor3 + motor4 (3) (4) (5) (6) (1) (2)

Matrix representing theese relations is regular, so the motor thrusts are uniquely determinig the moments. That means if we obtain the desired moments, we can compute thrusts for each of the propellers and vice versa.

The next thing we need to take into acount is gravity. Accept for a moment Eulers angles as absolute rotation description. Lets have a look at the thrust vector in absolute Earths coorinates and lets spread it into two parts: horizontal and vertical. The vertical part, obviously, must be equal to the devices mass times Earths acceleration to maintain the altitude. The horizontal part will accelerate the aircraft in horizontal plane. However, direction of horizontal part is uniquely determined by the pitch and roll angles. This means, that if we want to control position, we cannot control rotation (pitch and roll) simultaneously. The horizontal position (x and y) are dependent variables (theyre changing according to actual attitude) and for ilustration, we can temporally ommit them from our model:

Figure 2: reduced model inputs/outputs: rotation + z

It can be shown that such model is controllable, nevertheless has some unreachable states (like pitch pi/2 or roll pi/2). Since position is prior and most likely what we want to actually control, let us remove the the pitch and roll output variables instad, assuming them dynamically dependent on desired position change:

Figure 3: reduced model inputs/outputs: position + yaw

Now the model is fully controllable and holonomic, it can reach all its con4

guration states and the output values is what exactly we want to control.

How to control such system?

In respect with the above described train of thoughts, the sensor properties, dynamical properties and practical experiences with the real model, let me propose te following basic control structure:

Figure 4: proposed control structure

I will leave space here for the discussion.


Up to now, we were supposing that we have the absolute measurement of quadrotors position and rotation in some absolute coordinate system. However, determination of theese are not an easy task and has been recalled many times since the growth of aerial industry.



Lets focus on the rotation. In early times, aswell as for dead reckoning in marine navigation, mechanical gyroscopes mounted on a gimbal were used to sense the articial horizon required for rst autopilots. In general, the unit that senses absolute rotation is often abbreviated AHRS (Attitude and Heading Reference System). Latest progress in MEMS technology (Micro-Electro-Mechanical Systems) enabled to manufacture single chip inteligent sensors that can be used to avoid the need of high precission mechanical gyroscopes. A common type of modern AHRS unit, suitable and aordable for our project, is fully electronical

and uses inertial and magnetic sensors to determine the absolute spatial rotation. Such unit can be constructed to work stand-alone as a closed system with no evident inputs. It determines the absolute rotation using accelerometers, magnetometers and gyrometers, which I together call the planetary sensors. used to measure earths acceleration - tilt earths magnetic eld - heading angular rates systematic error parasitic acceleration and vibrations parasitic magnetic eld drift error

accelerometer magnetometer gyrometer

We could theoretically determine the rotation only from the accelerometer and magnetometer, because of they are measuring two linearly independent vectors in absolute Earths frame, which is enough to uniquely determine the absolute rotation. Similarily or by integrating the gyrometers. But, as shown in the table, all the sensors have some unavoidable systematic errors. For a reasonable rotation determination, we need to combine the measurements of them. The method is often recalled fusion algorithm. In the language of control engineering, the correct name is rotation estimator or rotation observer - i.e. an algorithm, that has model of actual system and tries to adjust its state according to the sensor measurements that are somehow related to the state of the real system.

Figure 5: rotation observer structure

The rotation observer algorithm has been the main focus of my work for a year up to now. I managed to develop pretty unique fusion algorithm which linearizes the problem using some special mathematical operations like quaternion interpolation, instead of performing computationally very complex non-linear kalman ltering. The actual algorithm was implemented in C and currently being tested and tuned. It has a feature of auto-tunning and tracking oset values of some of the sensors.

Figure 6: developped algorithm visualisation



Just like for the rotation, there is no stand-alone solid absolute spatial position sensor that would be suitable for control. GPS is the one what comes into consideration, but it has some limitations, like low accuracy, long time period between measurements and the need for constant GPS signal, which makes it unusable for indoor environments. This makes it often impossible to be used as stand-alone absolute spatial translation reference for position control, especially for micro UAV. We can use other, satallite independent physical sensors to determine the position, like barrometric presure sensor, which could provide valuable information of altitude, or sonar rangender to measure distance to the ground, useful for example when performing landing procedure. Since we have the rotation, we can also substract the gravitational vector from the accelerometer reading and double integrate it to obtain relative position. The goal could be to design a fusion algorithm, similarly like for rotation, which would combine all of theese sensors to determine the position. Current device is equipped with optical ux sensor, a device being used in personal computer optical mice. Generally a camera with onboard DSP processor that makes the two consecutive shots at correlation and tries to determine image movement. Ive attached an board camera optics to this device to focus on the above ground pattern and currently experimenting with it. There is also onboard sonar rangender. Measurement of theese sensors must be corrected according to the absolute rotation, and therefore they could be provide reasonable translational readings, especially for indoor environment.


From the variety of propeller actuators, suitable type for this project are clasiccal brushed DC motor with mechanic commutator or brushless DC motor. Limitations of brushed DC motors overcome by BLDC motors include lower eciency and susceptibility of the commutator assembly to mechanical wear and consequent need for servicing, at the cost of potentially less rugged and more complex and expensive control electronics. Brushless DC motors (BLDC motors, BL motors) also known as electronically commutated motors (ECMs, EC motors) are synchronous electric motors powered by direct-current (DC) electricity and having electronic commutation systems, rather than mechanical commutators and brushes. The current-to-torque and voltage-to-speed relationships of BLDC motors are linear, like DC motor. Relationship between the voltage and speed is a rst order dynamic system. Because the controller must direct the rotor rotation, the controller needs some means of determining the rotors orientation/position (relative to the stator coils.) Some designs use Hall eect sensors or a rotary encoder to directly measure the rotors position. Others measure the back EMF in the undriven coils to infer the rotor position, eliminating the need for separate Hall eect sensors, and therefore are often called sensorless controllers. They enable the even simpler motor construction, without the need of expensive hall sensors. There are commercially available sensorless BLDC controllers, especially for aircraft RC models. Ive decided to design my own system because of the interfacing and especially, the possibility for revolutions per second measurement to be used as state variable in the rotation controller feedback. The design is currently in working beta state.

Figure 7: magnetic eld visualisation in BLDC motor

Real system design state

The project is being developped in cooperation with the sponsor. As mentioned above, my task is to design the vestibular part (low level dynamic controler) for our aircraft. The precedent layer will consist of an unit called task/mission control, which will pass the commands to the dynamic controller. Mission control unit design belongs to the area of machine perception, image processing and articial inteligence, rater than control engineering.

Figure 8: overall block diagram

Ive decided to use a personal computer temporarily as controller hardware, instead of placing the controller onboard. This concept will enable to do the develompent, tuning and adjustments in very comfortable way and wont practically limit the computational power. Neverheless, there is the need for a fast and low latency data link between the computer and the aircraft that will be able to transfer the sensor measurements to the PC and motor commands back within one chosen discrete controller time step. It took a lot of time to nd such a data link on the market. It has been shown that Bluetooth or Zigbee standards are totally unusable for real-time control, because of their high, unpredictable latency. There is only a simple sensor board onboard with fast data telemetry, no complex computer onboard. When development is done, the controller will be placed onboard.



Hardware part of the project consists of the groundstation and the vehicle. Both of them are equipped by a microcontroller that handles the necessary perpiherals. The onboard computer queries the sensors, passes the readings through data link, reads back the motor commands and sends them to the motor controllers. Ground microcontroller reads data from the air and from the RC model transmitter, passes them to the PC, waits for the computation

to complete ands sends the result back to the aircraft. The microcontroller rmware was designed and implemented especially for this project. The main components of groundstation: RC controller with two joysticks as human pilot interface logic board with wireless data transceiver PC as the real-time dynamic controller

The main components of aerial vehicle: aluminium-carbon body four 80W BLDC motors with attached propellers four BLDC motor controllers 2.5Ah lithium-ploymer battery logic board with sensors and wireless data transceiver

Figure 9: sensor board mounted on the body


There has been several mechanical problems with the vehicle construction. Primarily, the the rotating motors with just slightly unbalanced propellers are causing vibrations, which spreads through the body and interferes the accelerometer. For some values of revolutions per seconds ratio, high frequency acceleration shocks can arise that are even out of accelerometers range. Then the accelerometer becomes non-linear, mean value of its measurements does not respond to the earths acceleration and error in rotation estimation will develop. The problem has been temporarily solved by mounting the entire sensor board on the body using elastic bands. Im planning to experiment with various other materials and main body construction to cancel the vibrations. Another problem to solve is that the high current ow to the motors (orientationally, about 12A total is needed to maintain device in the air) causes magnetic elds that interferes the compass. Currently, the device is equipped with twisted wire pairs that cancels the parasitic elds, nevertheless some residual error in magnetic readings are still present.



By term software I mean the control software running on the groundstation PC. Since Im a low-level programmer, all the algorithms were implmented in C using GNU GCC compiler. The current build runs on MS windows, uses OpenGL graphics library for visualisation and shell console for user input.

Figure 10: current control software block diagram

Software modular design respects the proposed control structure. The main components are the rotation observer and rotation controller. Both of theese units are aproximating continuous designs by rectangle discretization and both of them are running on the same sampling frequency. Current rotation controller performs rotation decoupling and implements three independent PID controllers for each axis with user tunable constants. Reference rotation and vertical thrust 11

are computed directly by pilot commands in the way that the pilot directs desired spatial acceleration. We can see the dashed translation controller block in the diagram, which has not yet been implemented. In very simplied way of understanding, this block should convert the acceleration commands into position commands, so that the pilot will direct desired velocity, or nally absolute position instead of desired acceleration.

Figure 11: control software visualisation in openGL


Currently we have almost ready to takeo device, equipped with all necessary perpiherals and ready to experiment with and make measurements on. Rotation observer and simple rotation controller according to the proposed control structure were implemented and tested. Some sucessuful experimental ights have allready been made. The aircraft was cable connected to the groundstation computer, since I had not yet suitable radio transceiver by that time. Test ights have proven that the quadrotor is able to well maintain desired rotation using the described control system.


Figure 12: 1st outdoor wired test ight, 10.4.2010


Extensive project development has yet been made. Ive decided to use this project as part of my engineers diploma work. I would like to document existing algorithms and hardware design, create mathematical model, design and implement an optimal controller. I would like to nalize the project so that the aircraft will have the ability of following a trajectory and hovering around a given spatial point.