Sabit kanatlı bir hava aracının modellenmesi ve ımc yöntemi ile iniş yaptırılması
Modelling the fixed wing aircraft and automatic landing with imc method
Yazar: YUSUF SINCAK
Danışman: DR. ÖĞR. ÜYESİ İLKER ÜSTOĞLU
İstanbul Teknik Üniversitesi / Lisansüstü Eğitim Enstitüsü / Mekatronik Mühendisliği Ana Bilim Dalı / Mekatronik Mühendisliği Bilim Dalı
Derece: Yüksek Lisans, 2022
Konu: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol = Computer Engineering and Computer Science and Control ; Uçak Mühendisliği = Aircraft Engineering
Dizin: Bütünleşik pazarlama = Integrated marketing ; Hava aracı = Air vehicle ; Sabit kanatlı hava araçları = Fixed-wing aircraft ; İniş performansı = Landing performance

Özet:
Bu tez kapsamında sabit kanatlı bir hava aracına otomatik iniş yaptırmak amaçlanmıştır. Bu amaçla hava aracının matematiksel modelinin oluşturulmasından kontrolcü tasarımına kadar tüm süreç anlatılmıştır. Ek olarak tasarımı yapılan kontrolcünün gerçek uygulaması yapılarak sonuçlar değerlendirilmiştir. Bu süreç içerisinde bir çok adım bulunmaktadır. Bu adımlar temel olarak matematiksel modelin oluşturulması, denge noktalarının bulunması, lineer modellerin elde edilmesi ve kontrolcü tasarımı adları altında ayrılabilir. Temel adımların detayları ilgili konu başlıkları altında anlatılmıştır.
Bu kapsamda ilk olarak hava aracı seçilmiştir. Bu tez kapsamında B2-Spirit model uçağı kullanılmıştır. Bu hava aracının matematiksel modeli çıkartılmıştır. Plantin aerodinamik katsayıları incelenmiş ve ne anlama geldikleri yorumlanmıştır. Burada hava aracının genel davranış limitleri gözlemlenmiştir. Sonrasında hava aracının denge(trim) noktalarını bulabilmek için trim algoritması yazılmıştır ve hava aracının denge noktaları elde edilmiştir. Bu bilgiler daha sonra iniş konsepti tasarlanırken kullanılmıştır. Elde edilen denge noktalarında nonlineer plant lineerleştirilmiştir. Bu işlem için lineerleştirme algoritması yazılmıştır. Burada hangi parametrenin hava aracının hangi davranışına etki ettiği gözlemlenmiştir. İnişin nasıl olması gerektiğine dair genel standartlar incelenmiş ve anlatılmıştır. IMC mimarisinin genel prensiplerinden bahsedilmiştir. Elde edilen lineer modeller kullanılarak kontrolcü tasarımları yapılmaya başlanmıştır. Kontrolcülerin doğru çalıştıklarının teyidi için hava aracının o denge noktasında kullandığı kontrol yüzeyi bükümleri ile kontrolcünün çıkardığı kontrol yüzeyi bükümleri karşılaştırılmıştır. Tüm kontrolcüler tamamlandıktan sonra hava aracına tam iniş yaptırılmıştır ve simülasyon sonuçları incelenmiştir.
Simülasyonda çalışan kontrolcülerin gerçekte denenebilmesi için tüm mimari cpp koduna çevrilmiştir. Çevrim yapılmadan önce sürekli zamanda çalışan kontrolcüler ayrık zamana çevrilmiştir. Ayrıca hava aracını direk kırıma götürmemek adına iç döngülerin test edileceği PKM modu da oluşturulmuştur. Bu modda sadece iç döngüler olup referans olarak pilot komutları kullanılmaktadır. Uçuş testinde pilot hava aracını istediği gibi uçarabilirse otomatik iniş algoritmasının da doğru çalışacağı varsayılmıştır. Sonrasında tasarlanan otomatik iniş moduna alınıp hava aracının inişi gözlemlenmiştir.
Son olarak simülasyon ve gerçek sonuçlar karşılaştırılımıştır. IMC mimarisinin ve plant modelinin ne kadar doğru çalıştığı değerlendirilmiştir.

Abstract:
In this thesis, it is aimed to make an automatic landing on a fixed-wing aircraft. For this purpose, the whole process from the creation of the mathematical model of the aircraft to the controller design is explained. In addition, the real application of the designed controller was made and the results were evaluated. There are many steps in this process. These steps can be basically divided into mathematical model creation, finding equilibrium points, obtaining linear models and controller design. In addition to the basic steps, what should be done during the landing and the general rules of aviation standards are mentioned. In order to make a real landing attempt with the designed controller, the processes performed during the integration of the generated controller code into the processor are explained.
In this context, the first aircraft was selected. B2-Spirit model aircraft was used in this thesis. The mathematical model of this aircraft has been extracted. The components in the mathematical model of the aircraft consist of the aerodynamic model, equations of motion, thrust model and atmosphere model. The aerodynamic model is where the forces and moments resulting from the interaction of the aircraft with the air and acting on the aircraft are calculated. The aerodynamic coefficients of the aircraft were examined and their meanings were interpreted. Here, the general behavior limits of the aircraft are observed. The thrust model is where the thrust obtained from the engine of the aircraft is transformed into forces and moments. There are two brushless DC motors in the model aircraft used. The behavior of these motors is assumed to be linear and modeling is done. Weather dynamics are calculated in the atmosphere model. Since the flight can be performed in a very small area with the model airplane, these calculated values do not change much. With the equations of motion, the rotational and translational movements of the aircraft with all the calculated forces and moments are calculated. These movements are called body velocities (u, v, w), Euler angles (Φ, θ, ψ), angular velocities (p, q, r) and position information (X, Y, Z). Derivatives of these movements are calculated in the mathematical model. At the output of the plant, these values are integrated into the model and fed back into the model. The initial conditions of the integral consist of the equilibrium point of the system. After the plant was created, the accuracy of the behavior was examined by giving different commands in order to control the behavior of the aircraft.
Afterwards, the trim algorithm was written in order to find the equilibrium (trim) points of the aircraft and the equilibrium points of the aircraft were obtained. When the equilibrium point is fed into the mathematical model as the initial condition, it is observed that the aircraft continues its flight without leaving that equilibrium point and the accuracy of the obtained equilibrium point has been proven. Equilibrium points have been calculated for many different situations with the trim algorithm.
With these calculated values, general information about the general dynamics of the aircraft was obtained. This information was then used when designing the landing concept.
A linear model is required for the controller design. The mathematical model obtained in the first section is the nonlinear model. An equilibrium point is needed to linearize this model. The linear model around the equilibrium point gives more accurate information about the behavior of the aircraft. A linearization algorithm has been written for this process. The small perturbation method was used for the linearization process. In this method, by giving small perturbations to each state one by one, it is calculated how much the other states have changed. Afterwards, a linear model was obtained by taking the average of this change. Here, it has been observed how much which parameter affects which behavior of the aircraft.
There are certain rules that must be followed in order to land an aircraft. These rules are set by aviation authorities. Although changes are made in these rules over time, the general concept does not change much. In general rules, general approaches and numerical values about many subjects such as how many degrees the approach angle of the aircraft should be, what speed should be kept during the approach, how to make the flare movement, how to land in the crosswind, what to do if there is swell before putting the wheels down. In the light of all this information, the general landing concept of the aircraft was determined. Afterwards, trimming was done and it was evaluated whether the aircraft was suitable for this concept. As a matter of fact, a speed selection above the standards had to be made for the approach speed.
After everything was prepared, the controller design was started. The IMC method, which has not been applied in aviation before, has been chosen for the controller. Since this method basically uses the inverse of the plant as the controller, the compatibility of the mathematical model with the real model is an important factor for the success of the controller. Zeros on the right half plane of the system in the controller design create a great danger. Because when zero inversion in the right half plane is performed, it appears as a pole in the right half plane. This leads the system directly to instability. Some protections are in place to avoid this event.
It was decided to use the IMC architecture in the inner loop. In the inner loop, the behavior of the aircraft is controlled. In longitudinal pitch and speed, in lateral roll movements are controlled. For the design of these controllers, transfer functions from the relevant control signals to the relevant sensor data are used. In order to confirm that the controllers are working correctly, the control surface bends used by the aircraft at that equilibrium point and the control surface bends produced by the controller were compared. In addition, the unit step responses of the inner loops, the sizes of the control signals used for this response, and Bode plots were examined and evaluated. Controller gains are readjusted for unsuitable results.
The outer loop is where the movements that the aircraft must make in order to land are produced. Here, reference is generated to pitching motion to perform altitude hold for longitudinal and to roll motion to hold runway centerline.
After all the controllers were completed, it was observed how the aircraft landed by starting from different points in order to test the success of the controllers. Landings were examined and necessary protections were added for troubled places. And then the controllers were updated.
The entire architecture has been translated into cpp code so that the controllers working in the simulation can be tested in reality. Before the conversion, some adjustments have been made so that the controllers can work properly. First, all controllers are converted from continuous to discrete time. Secondly, the point where the aircraft will put the wheels is determined and embedded in the code. The latitude and longitude information comes from the GPS. In order for the aircraft to land, the distance to the touchdown point must be known. A function that calculates the current position from the latitude-longitude information according to the touchdown point has been added. In addition, PKM mode was created in which the internal loops will be tested in order not to take the aircraft directly to slaughter. In this mode, only inner loops are used and pilot commands are used as reference. In the flight test, it is assumed that the automatic landing algorithm will work correctly if the pilot can fly the aircraft as he wishes. A separate cpp code was created for both modes. In order to integrate this code into the pixhawk module, the inputs and outputs in the generated cpp code were rearranged according to the pixhawk project. Then the whole project is compiled by adding the two mods to the project folder. After the project compilation process, the software was embedded in Pixhawk and flight testing was carried out.
In the flight test, the aircraft behavior was checked with the PKM mode. After observing that the pilot was able to control the aircraft, the automatic landing mode was activated and the landing of the aircraft was observed.
Finally, simulation and real results are compared. It was evaluated how well the IMC architecture and plant model worked.