Transcription of The Design and Implementation of a Quadrotor …
1 The Design and Implementation of a QuadrotorFlight Controller Using the QUEST AlgorithmJacob OurslandDepartment of Mathematics and Computer ScienceSouth Dakota School of Mines and TechnologyRapid City, SD posed in 1965, the problem of optimal attitude estimation from vector measure-ments has been a hot topic of research in the aerospace community. This paper provides asurvey of open source Quadrotor helicopter autopilots that demonstrates that the UnmannedAerial Vehicle community has largely ignored the optimal attitude estimation work to , the effectiveness of a Quadrotor helicopter autopilot utilizing attitude esti-mates from optimal attitude estimation techniques is IntroductionOptimal attitude estimation techniques used in the Aerospace industry have been knownfor several decades. However, the results of the work have been largely ignored by theUnmanned Aerial Vehicle (UAV) industry. The goal of this paper is to demonstrate thesuccessful Implementation of a Quadrotor autopilot based upon optimal attitude paper has three parts.
2 First, a brief introduction to optimal attitude estimation is cov-ered. Next, to justify the claim that UAVs largely ignore the known optimal attitude estima-tion methods a survey of existing Quadrotor helicopter autopilots to examine their methodsof attitude estimation. Finally, a Quadrotor helicopter autopilot is implemented and testedto demonstrate the effectiveness of optimal attitude estimation techniques such as QUESTin the control systems of Quadrotor helicopter Optimal Attitude EstimationIn 1965 Dr. Grace Wahba, then a graduate student, formally posed the problem of esti-mating the optimal rotation between a set of observed vectors and a corresponding set ofreference vectors [5][6]. Restated, the problem is to minimize the loss functionL(A) 12 iai|bi Ari|2(1)whereAis the rotation matrix,aiare non-negative weights,biare the body measurementvectors andriare the reference vectors. Solutions to this problem yield the optimal responses have resulted with the early ones being primarily iterative in nature.
3 Latermethods were developed that were non-iterative. Of these, the Quaternion Estimator (QUEST)algorithm has been the most widely used algorithm [3][4]. A survey of attitude estimationtechniques can be seen in [2].3 Survey of Open Source Quadrotor AutopilotsSeveral open source autopilots exist for Quadrotor helicopters. An analysis of four suchautopilots and their attitude estimators has shown a variety of approaches AeroQuad ( )The AeroQuad is a Quadrotor autopilot based on the Arduino microcontroller 1: The AeroQuad Quadrotor HelicopterHardware:CPU:Atmel ATMega 328 8-bit microcontroller operating at 16 :SparkFun 5 DOF IMU with an additional IXZ500 dual axis rates gyro tosupply the third rates gyro Input:Radio Control (RC) receiver receiving input from an RC handheld trans-mitter and ZigBee protocol using an XBee can be Control:Standard RC brushless motors controlled by RC brushless elec-tronic speed controllers (BESCs). Output to the BESCs occurs at 400Hz (normallyRC BESCs are controlled at 50 Hz).
4 Software:The software is programmed in a variant of the C language used by the Arduino Estimation:Euler angles roll and pitch are computed by =tan 1(ax a2y+a2z)and =tan 1(ay a2x+a2z). The resulting values are then fed into a complementary filteryielding filtered estimates of roll and :Control of the roll and pitch angle rates is performed by PID controllers. The targetvalues of the controllers are set by the input from the RC receiver modified by atti-tude estimates from the accelerometers. As there is no yaw estimation as such thetarget values of the yaw PID controller come exclusively from the RC MikroKopter ( )The MikroKopter project is a long running Quadrotor autopilot system from Germany. Thecurrent MikroKopter Quadrotor helicopter platform is known as the MikroKopter ME. Allmajor components of the MikroKopter system are custom 2: The MikroKopter ME Quadrotor Helicopter3 Hardware:CPU:Atmel ATMega 644P operating at 20 :Sensors for the MikroKopter include a LIS344 ALH 3-axis accelerometer,Analog Devices ADXRS610 single axis rates gyros on all three axes and a barometricpressure sensor to estimate Input:User input comes from an RC receiver.
5 Alternatively, input can comefrom a serial input permitting the use of wireless communications systems such Control:Custom BESCs are used to control RC brushless motors. Commu-nication with the BESCs is over the I2C :The flight control software of the MikroKopter platform is programmed in C. Func-tionality of the MikroKopter has been split out amongst different processors on sep-arate circuit boards. The lowest level functionality, receiving user input and main-taining attitude control, is on one board while GPS input and position control is on asecond Estimation:Attitude estimation of roll and pitch rates is accomplished by computing the differ-ence between the predicted and measured accelerometer values and by integratingthe gyros. The resulting estimates are :Control is performed by PD controllers on each axis. The target rates are set by userinput and output from the PD controllers is sent to the custom Paparazzi ( )The Paparazzi project is a long running autopilot project supporting many types of the project focused on fixed wing aircraft before moving into Vertical Take-Offand Landing (VTOL) fixed wing aircraft.
6 The Quadrotor platform and autopilot, the Pa-parazzi Booz, is an extension of the VTOL autopilot. The Paparazzi autopilots have beensuccessfully used to win a number of UAV 3: The Paparazzi Booz Quadrotor HelicopterHardware:CPU:NXP LPC2148 microcontroller operating at 60 :The Paparazzi project has developed a custom three axis IMU for the Boozutilizing Analog Devices ADXL320 accelerometers and ADXRS610 gyros for ratesmeasurement. Alternatively, a Cloud Cap Technologies Crista IMU may be usedwith the Paparazzi Input:User input comes from an RC Control:BESCs designed for the MikroKopter and Ascending Technologiesaircraft as well as OpenBLDC and modified Turnigy RC BESCs may all be used tocontrol RC brushless :The Paparazzi project develops their flight control software in C with several possibletarget Estimation:Attitude estimation is achieved through the use of an Extended Kalman Filter (EKF).The attitude is propagated forward by integrating the rates gyros and updated withmeasurements from the accelerometers and :Control of the Paparazzi Booz comes in a variety of modes: angular rates, attitude,hover and navigation.
7 All control systems are implemented as PID controllers. Whenin angular rates and attitude modes the controllers only control the rates or attitude,respectively, whereas hover and navigation modes employ layered controllers to con-trol position and velocity as Vicacopter ( )The Vicacopter autopilot project touts itself as the only open source English languagesource code helicopter autopilot. The autopilot support two configurations: a minimal au-topilot with rates gyros and sonar transducer and a full autopilot with 6 Degree of Freedom(DOF) IMU, magnetometer, barometer and GPS. The Vicacopter autopilot is available ontwo platforms: the Microchip PIC microcontroller and the Gumstix Computer on Module(COM) 4: The Vicacopter Quadrotor Helicopter6 Hardware:CPU:Marvell PXA255 on the Gumstix COM at 600 :The sensor complement of the Vicacopter includes a SparkFun MicroMag3 three axis magnetometer, an Analog Devices ADXRS613 on each axis, an AnalogDevices ADXL330 three axis accelerometer, an u-blox 5 GPS receiver and a VTISCP1000 barometric pressure Input:User input is from RC Control:Output is through RC brushless motors controlled via RC :The software is programmed in C and takes advantage of the POSIX compliant Linuxoperating system of the Estimation:Attitude estimation is accomplished via a seven state EKF.
8 The first four states arethe attitude quaternion components and the last three states are the gyro biases. Thepredict state portion of the EKF uses information from the gyros and state updatecomes in two phases, first using input from the accelerometers and then using inputfrom the :The Vicacopter has two control methods available: PID and Artificial Neural Net-work. Both methods apply layered controllers to control attitude, velocity and Autonomous Control of a QuadrotorOf the open source autopilots only two (Paparazzi Booz and Vicacopter) used attitude esti-mates in their control systems, the other two used rotational rates. Neither of the autopilotsutilized known techniques for optimal attitude estimation. All of the autopilots examinedmake the assumption that the vehicle is operating in or at near hover and the measuredacceleration is that of the gravity and Elkaim have postulated that given the dynamics of micro air vehicles(MAVs), optimal attitude estimation techniques may not yield the necessary performanceneeded for controllability [1].
9 To test the hypothesis of a Quadrotor helicopter controllabil-ity using estimates from an optimal attitude estimation technique, a Quadrotor helicopter7autopilot was developed and tested. The algorithm utilized is a variant of the QUEST algo-rithm. In the Implementation the Newton-Raphson method is limited to a single states that convergence is frequently attained within the first iteration and mytests have concluded the DesignThe developed Quadrotor autopilot is quite small and performs only a few key measurements from the IMU are acquired and the observations are fed into the QUEST algorithm. Next a target attitude is computed using the input from the RC receiver. A dif-ference quaternion is computed between the two attitudes. The difference quaternion isthen converted to Euler angles and used in three PD controllers. The derivative componentof the PD controllers is derived from the gyro measurements of the ImplementationFigure 5: The Developed Quadrotor Helicopter8 Hardware:CPU:NXP LPC2106 at 60 :MEMS ense nIMU providing accelerometers, rates gyros and magnetome-ter measurements on all three Input:User input is from a Futaba FASST R617FS RC receiver.
10 Although notused for input, a serial interface is also available over ZigBee wireless using an Control:Output is through Turnigy Plush 25A RC brushless motors con-trolled via RC :The software is programmed in less than 1600 lines of Estimation:QUEST algorithm using the Earth s geomagnetic field declination vector and thegravitational acceleration vector as two reference vectors. The observation vectorsare measured by the nIMU s magnetometers and :Control is accomplished via three PD controllers. The proportional components aremeasured by the error between the estimated attitude quaternion and the desired at-titude quaternion. The derivative components are measured from the rates gyros oneach ResultsTethered flights demonstrated stable hover and the ability to control the UAV. Unfortu-nately, there were intermittent jumps observed in the vehicle. These are believed to bearising from noise coming from the IMU. Given the low sampling rate of the nIMU (max156 Hz) in comparison to the sampling rates of the other vehicles (>1000 Hz), attempts tofilter the noise have been met with limited success.