Mikro hava araçlarının bilinmeyen ortamlarda görüntü temelli kontrolü
Vision based control of micro air vehicles in unknown environments
Yazar: CİHAT BORA YİĞİT
Danışman: YRD. DOÇ. DR. ERDİNÇ ALTUĞ
İstanbul Teknik Üniversitesi / Fen Bilimleri Enstitüsü / Mekatronik Mühendisliği Ana Bilim Dalı
Derece: Yüksek Lisans, 2012
Konu: Mekatronik Mühendisliği = Mechatronics Engineering
Dizin: Görüntü işleme = Image processing ; Kalman filtre = Kalman filter ; PID denetleme = PID control ; Stabilleştirme = Stabilization ; İnsansız hava aracı = Unmanned aerial vehicle

Özet:
İnsansız hava araçları günümüzde büyük önem kazanmıştır. Bu araçların askeri ve sivil pek çok uygulama alanı vardır ve uygulama alanları gün geçtikçe artmaktadır. Bu araçlar genellikle üzerlerinde bulunan kamera ile yer kontrol istasyonuna görüntü gönderirler. Son yıllarda, bu kameraları kullanarak görüntü işleme metotları ile araçların otonomluğunu geliştirmeyi amaçlayan çalışmalar yapılmaktadır. Bu çalışmada öncelikle deney platformu olarak açık kaynak kodlu bileşenler içeren bir hava aracı geliştirilmesi amaçlanmış, daha sonra bu platformu kullanarak görüntü işleme teknikleri ile bu aracın kontrolünün sağlanması amaçlanmıştır.İHA dört rotorlu bir helikopter (quadrotor) olarak oluşturulmuştur. Mekanik ve elektronik parçalar istenilenleri sağlayacak şekilde seçilmiş ve uygun biçimde birleştirilmiştir. Parçaların seçimi için bazı deney düzenekleri oluşturulmuş, deneyler yapılmış ve sonuçlara göre parça seçimi yapılmıştır. Tüm parçaların seçiminde hafifliğe özen gösterilirken, mekanik parçaların dayanımı elektronik parçaların ise kullanıcı müdahalesine açıklığı ön planda tutulmuştur.Hava aracının kontrolünün sağlanabilmesi için matematiksel modeli oluşturulmuş ve görüntü kullanılmaksızın ataletsel ölçüm birimi yardımı ile kontrolünün sağlanabilmesine çalışılmıştır. Oluşturulan model simulasyon ortamına aktarılmış ve kontrolcü katsayıları denenerek katsayılar için ön değerlendirme yapılmıştır. Daha sonra bu katsayılar hava aracı üzerinde denenmiş ve uygun katsayılar bulunarak hava aracının ataletsel ölçüm birimi yardımı ile kontrolü sağlanmıştır.Görüntü işleme için kullanılan yöntem V-SLAM yaklaşımı olmuştur. Hava aracının daha önceden düzenlenmemiş veya bilinmeyen bir ortamda çalışmasının amaçlanması öncelikle haritalama ve bu haritaya göre konumlandırma ihtiyacı doğurmuştur. Hava aracı üzerinde kullanılmaya uygun, gerçek zamanlı çalışabilen bir algoritma incelenmiş ve önce bilgisayar ortamında, daha sonra hava aracı üzerinde taşınabilmesi amacı ile gömülü bir bilgisayarda gerçeklenmiştir. Hava aracının hızlı hareketlerine karşılık anlamlı görüntüler alınabilmesi için yüksek hızlı kamera kullanılmıştır.Görüntü işleme sistemi, hava aracı kontrolörü ve yer bilgisayarı arasında iletişim kurularak deney platformu hazırlanmıştır. Bu platform, güvenli olması amacıyla, hava aracının üç eksende hareketine izin veren ve düşmesini engelleyen bir deney düzeneği üzerinde denenmiştir. Görüntü işleme algoritmasının verdiği sonuçların ataletsel ölçüm ünitesine benzer olduğu görülmüştür. Ayrıca yönelme açısı görüntüden alınan geribesleme sayesinde kullanıcı tarafından kumandadan gönderilen referans açısal konuma oturması sağlanmıştır. İleriki çalışmalarda bu referansın da görüntü işleme algoritması tarafından üretilmesine (navigasyon) çalışılacaktır.

Abstract:
Unmanned aerial vehicles (UAV) has become increasingly important nowadays. They have been widely used in civil applications such as aerial photography and millitary applications such as reconnaissance and combat. These vehicles can be classified as fixed wing and vertical take-off and landing (VTOL). VTOL vehicles can be used in small workspaces due to their maneuver capabilities. However succesful control of these vehicles requires precise information about the vehicle attitude. Camera is usually carried on boards of the systems, as a requirement of their applications. Usually these cameras are used to observe something from aerial vehicle side of view and connected to ground control system with a wireless communication system. Computer vision systems using the onboard cameras can be an alternative to inertial measurements system which are mostly used on aerial vehicles to measure attitude. First aim of this project is to develop an open source air vehicle platform. Second one is the stabilisation of the vehicle by using a vision algorithm.Quadrotor is a four-rotor helicopter and can be classified as a VTOL vehicle. A quadrotor consists of some mechanical and electronic parts. Mechanical parts are frame, motors, rotors and other connection parts. Motors and rotors are chosen after some experiments. To find the correct motor for the system a thrust test rig is created. Two different brushless motors and different rotors are run on the rig. Best performed motor-rotor couple is chosen. Electronics consists of usually an autopilot and inertial measurement unit (IMU), electronics speed controllers (ESC), receiver, battery and vision system. Autopilot is responsible for the stabilisation of quadrotor vehicle. IMU is attitude measurement unit and IMU used in the project has a magnetometer and altimeter. Altimeter can measure the altitude of the helicopter and magnetometer gives information of yaw angle. ESC is a circuit that can run brushless motors using PWM input, which comes from directly an RC receiver or an autopilot system. Receiver is a bridge between user and quadrotor, it can sense inputs from user by using radio waves and transfers it to Ardupilot. A lithium-ion battery is used in this project due to its low volume/charge ratio. Vision system includes an embedded computer and a high speed camera. Embedded computer is Beagleboard Xm. High speed camera is Firefly Mv and its maximum frame rate is 60 frame per second. All of the components used in this system are given in more details in the project and the methods are explained in order to choose the correct components.Working principle of a quadrotor is based on the difference between speed of rotors. Helicopter is designed in `+? shape and every corner has a motor-rotor couple. When decelerating, the front motor and accelerating the rear motor gives a difference, which means a change in pitch angle and movement on the x axis. Pitch and roll axes work based on this principle. Yaw axis is changed differentiating motor couple speeds. To balance the yaw angle, opposed motors turns in the same direction. When front and rear motor is decelerating, comparing right and left, quadrotor rotates around yaw axis. Thus quadrotor control is an easy control problem when compared to other helicopter models. However, to stabilize the quadrotor synchronization of motors are required.Firstly, to control the system, model of the quadrotor is analysed. Quadrotor is an under-actuated platform, it has four inputs and six outputs. The model is simplified and linearized to calculate a controller for the system. For attitude control, an enhanced PID algorithm is used in autopilot card and contoller coefficients is tuned using the simplified model. Both linear and non-linear models are created in simulation environment (Matlab Simulink) and autopilot is modeled as well. Calculated coefficients are simulated and the results give the best coefficients for fine tuning on real system. For the experiments, inertial measurement system which comes with autopilot is used for attitude information. Gyros and accelerometers are combined to give attitude by using Direction Cosine Matrix (DCM) algorithm.First simulation results for an underdamped system gave succesful result both for linear and non-linear model; however, experiments show that controller design has to make system over-damped to stabilise the quadrotor. Secondly, coefficients are calculated in the light of this information. Both simulation and experiments are succesful and stable flight is observed after fine tuning of the controller.Ardupilot is an open-source platform, therefore an existing algorithm `ArduCopter NG? is used to implement PID control design to the system. Controller coefficients which are calculated, are added to the algorithm. Open-source software of the autopilot gives the chance of changing some parts of it, while using vision system instead of IMU, related parts are changed. Also the communication between Beagleboard, Ardupilot and ground control station are coded using same software.Control in an unknown environment requires mapping and localization simultaneously. In literature, SLAM (simultaneous localisation and mapping) is well defined problem and most of the examples uses sensors such as radar. Alternative method for the SLAM is structure from motion aproach, however these algorithms generally are computationally expensive algorithms and usually used for augmented reality applications. Recently, vision has started to be used as a sensor for SLAM. V-SLAM aproach is explained in this project and an EKF based V-SLAM algorithm is implemented using a PC. However, aim of the project is to stabilise the quadrotor without using a ground control system help. Thus, an embedded computer is used to run the vision algorithm.Vision algorithm uses corners as reference points and takes 21 x 21 pixels area around the corner as the parts of the map. Dynamic model is given as constant velocity model and system treats accelerations as disturbance. Quadrotor states are given in a vector size of 13. Every camera point adds system 6 new states. To cope with the blurring image problem under fast velocity situations, a fast camera (60 FPS) is used on the quadrotor. The camera model is defined as standard pinhole camera model, and calibrated using well-known solutions in literature. EKF algorithm makes `predict-measure-update? cycle in every step so that algorithm can run on beagleboard (embedded computer, Angstrom operating system, 1 GHz Arm processor-512 MB RAM) 10 FPS. Having one camera on board due to limitatitons of thrust provided by motors, makes system a `monocular? vision system. Problem of using monocular vision for estimating location of camera, is estimating depth of a feature location on the image plane. This problem is solved by using parallax in the algorithm. Parallax can be defined as the diffent movements on camera appearence of two different objects, one of them is closer, other one is far.Initialization of the vision system is very important in these kind of incremental vision algorithms. For simplification vision algorithm are always started at zero degree orientation because the purpose of the project is not designing a new initialisation system.Finally, in order to put together quadrotor and vision system, communications between autopilot, embedded computer, RF receiver and ground logging computer is designed. Embedded computer uses camera and vision algorithm to estimate attitude of the quadrotor and sends the results (orientation) to the autopilot. Autopilot controls motors using this estimates and user reference orientation values which is received by RF receiver. Autopilot also sends some useful information for logging to ground logging computer. These data are processed using Matlab to plot the results of control.For a safe experiment, micro air vehicle is connected to a test rig. Quadrotor can rotate between +20 and -20 degrees for roll and pitch angles. It can rotate freely for yaw angles. First experiment is about verifying vision algorithm by using IMU as ground truth. Experiments show that there is similar results between IMU and vision system; however, there is a one second delay due to the embedded board-autopilot communication, vision processing and camera-embedded board communication. Second experiment is the control of quadrotor using the vision data for attitude estimation. These experiments shows that, quadrotor can stabilise itself near hover position, and can track reference signal on yaw axis.At last, the performance of the vision system can be refined using optimisation techniques. Delay between IMU and can be minimized using a better communication system. Response of the vision system can be accelerated using EKF and estimations without measurements making application a multi-thread one. Dynamic model can be introduced into the EKF instead of using constant velocity model. Also usage of this vision system gives opportunity to navigate in an unknown environment. For this purpose, IMU and other sensors on the quadrotor can be fused with vision system to get better results.