Design and implementation of an adaptive controller for a quadcopter.

Niit, Edgar Andries (2017-12)

Thesis (MEng)--Stellenbosch University, 2017.

Thesis

ENGLISH ABSTRACT: The Solar Thermal Energy Research Group (STERG) from Stellenbosch University is attempting to reduce the cost of Concentrated Solar Power (CSP) plants. Introducing robotics into such CSP plants can assist in reducing the cost. An optimized calibration method currently being investigated by STERG is using a pair of quadcopters to calibrate the heliostats. The system requires that the quadcopter has a stable hover, despite the presence of disturbances. The aim of this project was to design and implement an advanced controller for a quadcopter. The advanced controller should improve on the existing controller and ultimately allow for a more stable hover. Standard control laws have unique parameters that yield a certain response based on the model on which they are implemented. Changes in the model will result in changes in the response, yielding the need for new ideal parameters. Adaptive controllers have the advantage of reducing the number of control parameters to be tuned. Reducing the number of parameters can be beneficial, as obtaining the ideal parameters can become a time-consuming process. Model reference adaptive control (MRAC) is the control approach that is considered in this project. This approach has previously been implemented on a quadcopter by Achtelik [Adaptive Control of a Quadcopter in the Presence of large/complete Parameter Uncertainties, (2011)]. It was desired to implement the adaptive controller on the Pixhawk flight controller. The Pixhawk flight controller was chosen due to its capabilities when considering research projects. It also runs PX4 firmware which is part of an open source project. The designed controller should integrate well with the existing PX4 firmware to allow users still to be able to use the flight controller as before. In order to integrate the adaptive controller with the PX4 firmware some modifications to the approach followed by Achtelik et al. (2011) was required. This report focuses on the implementation of MRAC in PX4 firmware. This required the use of quaternions in the control loop as opposed to the common Euler angles. The mixer was also extracted from the adaptive law. The mixer refers to the part of the controller which translates moment commands to motor commands, according to the airframe being used. From simulations it could be seen that quaternions showed a significant improvement in reference tracking when it came to simultaneous pitch, roll and yaw inputs. The adaptive controller was first evaluated against other controllers in simulation before testing it in practice. In practical flight, it was again evaluated against other controllers. Specifically devised tests were evaluated to test the reference tracking and disturbance rejection of the different controllers. The adaptive controller showed the largest improvement, when compared to the other controllers, in the disturbance rejection tests. Finally, an autonomous mission was flown with the newly designed adaptive controller and also with the original PX4 controller. This showed successful integration of the adaptive controller with the existing firmware. An improvement in reference tracking for the adaptive controller, as opposed to the PX4 controller, was also found.

AFRIKAANSE OPSOMMING: Stellenbosch Universiteit se termiese sonkrag energie navorsingsgroep (STERG) probeer om die koste van gekonsentreerde sonkragaanlegte te verminder. Die gebruik van robotika in gekonsentreerde sonkragaanlegte kan help om die koste geassosieer met sulke aanlegte te verminder. STERG is tans besig om n alternatiewe kalibrasie metode na te vors om die proses te optimiseer en sodoende koste te verminder. STERG be-oog om twee kwadrotuie vir hierdie kalabrasie proses te gebruik. ’n Vereiste is dat die kwadrotuie baie stabiel in vlug moet wees. Dit moet ook steurings kan weerstaan. Die doel van hierdie projek was daarom om ’n gevorderde beheerstelsel vir ’n kwadrotuig te ontwerp en te implementeer. Die gevorderde beheerder moet op die bestaande beheerder verbeter en ’n meer stabiele vlug tot gevolg hê. Standaard beheer wette het unieke parameters wat ’n sekere respons vir die stelsel bepaal, gebaseer op die model waarvoor die beheerder ontwerp is. Enige veranderinge in die model sal ’n verandering in die optrede van die stelsel tot gevolg hê. Nuwe beheer parameters word daarom benodig. ’n Voordeel van ’n aanpasbeheerder is dat dit die hoeveelheid beheer parameters wat aangepas moet word verminder. Dit kan voordelig wees om die aantal parameters te verminder aangesien dit ’n tydrowende proses is om die ideale waardes te bepaal. Model verwysing aanpasbeheer (MRAC) is die beheer benadering wat oorweeg word. Achtelik [Adaptive Control of a Quadcopter in the Presence of large/complete Parameter Uncertainties, (2011)] het voorheen hierdie beheer benadering op ’n kwadrotuig geimplementeer. Daar was die begeerte om MRAC op die Pixhawk vlugbeheerder toe te pas. Die Pixhawk vlugbeheerder was gekies omdat dit ’n ideale vlugbeheerder is vir navorsings projekte. Die rede hiervoor was omdat dit PX4 sagteware, wat oopbron is, kan proseseer. Die aangepaste beheerder moes dus goed inskakel met die bestaande PX4 sagteware om te verseker dat die vlugbeheerder steeds soos van te vore gebruik kon word. Sekere aanpassings aan Achtelik et al. (2011) se benadering was dus nodig om suksesvolle integrasie te bereik. Die projek fokus op die implementering van MRAC in die PX4 sagteware. Dit het die gebruik van quaternions in plaas van Euler hoeke vereis. Die menger was ook uit die beheer wet gehaal. Die menger verwys na die deel van die beheerder wat die moment bevele omskakel in motor bevele afhangend van die raam opset. Simulasie het ’n beduidende verbetering in verwysingsvolging getoon in die geval van gelyktydige rol, hei en gier bevele. Die beheerder was eers teen ander beheerders vergelyk in simulasie voor daar praktiese toetse gedoen was. Vir die praktiese toetse was die ontwerpte beheerder weereens met ander beheerders vergelyk. ’n Outonome missie was uitgevoer met die nuut onwerpte beheerder asook die PX4 beheerder. Die toets het gedui op suksesvolle integrasie met die PX4 sagteware. ’n Verbetering in verwysingsvolging was ook waargeneem toe die aanpasbeheerder met die PX4 beheerder vergelyk was.

Please refer to this item in SUNScholar by using the following persistent URL: http://hdl.handle.net/10019.1/102790
This item appears in the following collections: