• No results found

Robust Drone Mission in the Arctic

N/A
N/A
Protected

Academic year: 2021

Share "Robust Drone Mission in the Arctic"

Copied!
82
0
0

Loading.... (view fulltext now)

Full text

(1)

UPTEC F 20034

Examensarbete 30 hp 30 Juni 2020

Robust Drone Mission in the Arctic

Elvira Brenner

Oscar Hultmar

(2)

Teknisk- naturvetenskaplig fakultet UTH-enheten

Besöksadress:

Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0

Postadress:

Box 536 751 21 Uppsala

Telefon:

018 – 471 30 03

Telefax:

018 – 471 30 00

Hemsida:

http://www.teknat.uu.se/student

Abstract

Robust Drone Mission in the Arctic

Elvira Brenner, Oscar Hultmar

During environmental research projects in the Arctic region AFRY has come across an unproportionally high number of cases where the navigation of drones have not worked as intended, compared to other regions. The main objective of this thesis is to investigate the cause of these navigational problems and determine the main cause. A second objective is to design a solution that can mitigate these observed errors and improve the navigation. To establish the main error sources flight logs from test flights performed at Svalbard are analyzed. The drone considered in this project is a quadcopter with a Pixhawk Cube flight controller and the Ardupilot software. A Pixhawk Here+ module is used for external sensors. The data logs show several cases of drones having troubles flying along a straight line. Analyzing the sensor data for the flights show that many of the flights suffer from the gyroscope drifting around the z-axis. The data show that the varying temperature on the IMU board is the cause of the drifting gyroscope. The on-board heaters did not manage to keep the temperature constant due to a too high target temperature and low outside temperatures. The system is aided with information from the magnetometer to estimate the drift around the z-axis. Results show that the estimation system is having trouble correctly estimating large drifts. To investigate why the

magnetometer cannot properly compensate for the gyroscope, simulations of the magnetometer and estimation system are made. The results show that an increasing angle of inclination increases the gyroscope bias estimation errors. The large angle of inclination causes the horizontal components of the magnetic field to become too small for the

magnetometer to measure correctly. The solution consists of instructions on how to operate the drone to properly use the on-board heaters, as well as an external module consisting of multiple magnetometers.

Multiple magnetometers reduced the variance in the readings, but did not reach the accuracy needed to replace the external magnetometers on the drone. A better calibration method could be explored in the future, or another solution such as an improved magnetometer, a gyro compass, a GPS compass or dual GNSS antennas

ISSN: 1401-5757, UPTEC F 20034 Examinator: Tomas Nyberg Ämnesgranskare: Ping Wu

Handledare: Lasse Larsson, Mats Elfing

(3)

Populärvetenskaplig Sammanfattning

Drönare är en växande marknad som blivit allt mer populär genom åren. Användningsområdena ökar och marknaden för drönarindustrin är ljus. Ett av de användningsområden där drönare kan komma att spela en viktig roll är miljöforskning. Eftersom Arktis är ett område som är extra utsatt av klimatförändringar bedrivs mycket forskning just där. Det är ett område där det är svårt att ta sig runt på grund av den svåra terrängen och bristen på vägar. Användandet av drönare skulle kunna vara till stor hjälp för forskare i Arktis. Bland annat skulle sensorer kunna monteras och prover kunna tas på ställen som är svåråtkomliga. Det minimerar riskerna för de på plats och kan dessutom lämna mindre avtryck i naturen. Andra användningsområden är att räkna och spåra vildliv, studera ytor och vegetation samt mäta snödjup. Dock är det inte lätt att implementera användandet av drönare i Arktis. Det är ett hårt klimat med många svårigheter. Hårda vindar, is och låga temperaturer är bara några av problemen. AFRY har dessutom fått rapporter på flertalet fall av drönare som flyger i fel riktningar eller kraschar i marken. Antalet rapporteringar har varit oproportionerligt högt i Arktis jämfört med andra områden. Vad de här navigationsproblemen beror på är alltså viktigt att undersöka för drönarnas framtid i Arktis. Det här projektet går ut på att undersöka möjliga orsaker till navigationssvårigheterna i Arktis och fastställa vad de beror på. Fortsättningsvis ska lösningsförslag på metoder som kan minimera de här problemen presenteras och en lösning designas med mål att förbättra navigeringen.

Som hjälp till undersökningen har testflygningar utförts på Svalbard av anställda på AFRY och sensordata sparats i dataloggar. Loggarna ligger som grund för undersökningen av felkällor. I undersökningen konstaterades det att drönare som ska flyga fram och tillbaka längs med en rak linje i många fall avvek mer och mer från linjen under flygningens gång. När sensordatan från dessa flygningar analyserades noterades det att gyroskopet, som mäter rotationen runt drönarens axlar, driftat runt drönarens z-axel. Genom att undersöka temperaturdatan på drönaren ser man en tydlig trend att ju mer temperaturen varierat under flygningen desto mer har gyroskopet driftat. Flygkontrollern har ett estimeringssystem som uppskattar gyroskopets drift med hjälp av extern sensordata. För drifter runt z-axeln använder estimeringssystemet sig av mätningar från magnetometern. Skillnaden mellan den estimerade driften och den verkliga driften, estimeringsfelet, visade sig bli större desto mer gyroskopet driftar. Det tyder på att estimeringssystemet inte klarar av att uppskatta stora gyroskopdrifter på nordliga breddgrader. Ett estimeringsfel i rotationen runt z-axeln betyder att drönaren även feluppskattar sin girvinkel. Girvinkeln är vinkeln som den har i horisontalplanet, alltså dess riktning. Med en feluppskattad girvinkel kommer drönaren att flyga i fel riktning. Eftersom att gyroskopet driftar med tiden är det ett fel som blir större och större ju längre tiden går. Det stämmer överens med det observerade felet i testet där drönaren ska flyga längs med en linje.

För att undersöka varför magnetometern inte klarar av att uppskatta gyroskopets drift tillräckligt bra skapades en modell av magnetometern samt en modell av estimeringssystemet i MATLAB. Estimeringssystemet är ett Kalmanfilter som tar emot sensorvärden från gyroskop, accelerometer, barometer samt magnetometer och ger ut uppskattningar på drönarens rymdvinklar, altitud och gyroskopdrift. Data matades in i filtret på en drönare helt utan rotation. Sedan matades magnetometerdata in på magnetfält med olika inklinations- och deklinationsvinklar. Deklinationsvinkeln är vinkeln mellan jordens magnetfälts nordliga pol och den geografiska nordpolen. Inklinationsvinkeln är lutningen på magnetfältet mot horisontalplanet. Simuleringen tyder på att olika deklinationsvinklar inte påverar estimeringssystemet så mycket, men när inklinationsvinkeln ökar så förvärras gyroskopdriftens estimeringar. Ju större inklinationsvinkeln är desto mindre blir magnet- fältets komponenter i horisontalplanet. Det är horisontalplanets komponenter som drönaren använder sig av när den uppskattar sin girvinkel. Det behövs alltså en bra magnetometer som kan mäta de små komponenterna med hög noggrannhet och lite brus för att estimeringssystemet ska korrekt kunna justera sin modell för gyroskopdrift och girvinkeln.

(4)

Slutsatsen från analysdelen av projektet är att ju mer temperaturen varierar under flygningen deto mer driftar gyroskopet, eftersom att det är känsligt för temperaturvariationer. Drönaren har värmare på sig som skall hålla temperaturen konstant, men eftersom att temperaturen i Arktis var kall och värdet temperaturen skulle uppnå var alldeles för högt nåddes aldrig värdet och temperaturen varierade under flygningen. Stora gyroskopdrifter blir svåra för flygkontrollen att uppskatta eftersom att magnetometern inte fungerar optimalt så långt norrut.

Detta på grund av en stor inklinationsvinkel som gör att horisontalkomponenterna blir små och svåra att mäta exakt. För att åtgärda problemet behövs bättre kompassdata. Detta kan uppnås på flera olika sätt. Antingen med en bättre kompass eller multipla kompasser som sammanslår sina mätningar. Även kompasslösningar som inte beror på magnetfältet är möjliga, såsom en gyrokompass eller en GPS-kompass. Ett lösningsförslag konstruerades baserat på teorin att en sammanslagning av flera kompasser kan ge mätningar med lägre varians än en enda kompass. En mikrokontroller läste av data från sex magnetometrar och sammanslog dem genom en egendesignad algoritm baserad på viktning. Resultatet visade att implementeringen inte fungerade bättre än kompassen som redan sitter på drönaren. Variansen i mätningarna minskade men sensorerna lyckades inte kalibreras tillräckligt bra för att ge korrekt data. I framtiden finns det mycket potential att fortsätta undersöka metoden med multipla sensorer eller någon av de andra föreslagna metoderna för att bygga en lösning som kan hjälpa drönare att navigera i Arktis.

(5)

Acronyms

AEU - the attitude enhancement unit

EKF - Extended Kalman Filter

ESA - European Space Agency

GNSS - Global Navigation Satellite System

GPS - Global Positioning System

IMU - Inertial Measurement Unit

IUAV - Integrated UAV

MEMS - Micro Electro Mechanical Systems

NCEI - National Centers for Environmental Information, Boulder CO, USA

NED - North-, East-, Down- reference system

RPAS - Remotely Piloted Aircraft system

(6)

Contents

1 Introduction 1

1.1 Introduction . . . 2

1.2 Background . . . 2

1.3 Objective . . . 3

1.4 Specifications . . . 3

1.5 Task and Scope . . . 3

2 Technical and Theoretical Backgrounds 4 2.1 The Arctic Environment . . . 5

2.1.1 Magnetic field . . . 5

2.1.2 Global Navigation Satellite System (GNSS) . . . 6

2.1.3 Space Weather . . . 6

2.2 Extended Kalman Filter . . . 7

2.2.1 Theory . . . 7

2.2.2 Algorithm . . . 8

2.3 Remotely Piloted Aircraft System (RPAS) . . . 11

2.3.1 Quadcopter . . . 11

2.3.2 Sensors . . . 12

2.3.3 Flight Controller . . . 14

2.3.4 ArduPilot . . . 15

2.4 Simulink . . . 15

3 Data Analysis and Problem Identification 16 3.1 Flight Tests . . . 17

3.2 Data Analysis . . . 18

3.2.1 Heading error . . . 19

3.3 Gyroscope Data . . . 21

3.3.1 Temperature . . . 23

3.3.2 Estimation System . . . 24

3.4 GNSS Signals . . . 25

3.5 Space Weather . . . 27

3.6 Simulations . . . 28

3.6.1 Magnetometer Simulations . . . 28

3.6.2 EKF Simulations . . . 31

3.6.3 Discussion . . . 37

3.7 Conclusion . . . 38

4 The Attitude Enhancment Unit (AEU) 39 4.1 Solution . . . 40

4.1.1 Improved Magnetometer . . . 40

4.1.2 Gyro Compass . . . 40

4.1.3 Redundant Magnetometers . . . 40

4.1.4 GPS Compass . . . 41

4.1.5 Dual GNSS antenna . . . 41

(7)

4.1.6 Summary . . . 42

4.2 Design And Architecture . . . 43

4.2.1 General Design . . . 43

4.2.2 Hardware Design . . . 43

4.2.3 Software Architecture . . . 45

4.3 Results . . . 48

4.3.1 Calibration . . . 48

4.3.2 Testing . . . 49

4.4 Conclusion . . . 51

5 Conclusion and Further Work 52

A Heading error TB7-TB12 56

B Calibration.ino 68

C Main.ino 72

D Division of Work 75

(8)

Chapter 1

Introduction

(9)

1.1 Introduction

In the Arctic, many places are hard for humans to access due to the terrain and limited number of roads.

Since the Arctic is one of the regions that is the most affected by the changing climate, a lot of research is being conducted there. The usage of drones could be of great aid to researchers on scientific expeditions.

The usage of a drone could ease mounting or placing sensors in places that otherwise are hard to access.

Other possible use cases could be to measure snow coverage and depth or to collect samples of air, water, soil or gravel [1][2]. Drones could also be used for counting and tracking wildlife, mapping out surfaces and vegetation or making meteorological measurements such as measuring ozone or other greenhouse gasses [1][3]. However, implementing drones in the Arctic region is not easy. The Arctic climate poses some unique challenges when it comes to equipment. Hard winds, icing and low temperatures are not the only problems. Magnetic field fluctuations and space weather interfering with Global Navigaton Satelite System signals might be the reason why navigating close to the north pole has shown to be problematic.

1.2 Background

A drone, also called Remotely Piloted Aircraft System (RPAS), is an airborne vehicle without a human pilot aboard. Drones are rapidly growing in popularity and over the past few years the usage of drones have expanded in various businesses and industries [4]. They can be used in more and more applications and the Drone Industry Insights team analyzed over 730 use cases conducted in over 100 different countries [5]. As technology advances, drones are becoming more and more powerful and the drone market is estimated to

$100 billion in 2020 [6]. Drones have become an important tool in environmental research. They usually have less environmental impact than executing a mission manually and are especially applicable for Arctic research since the Arctic consists of vast areas with very limited infrastructure and often inaccessible places.

They also increase safety in the field by operators avoiding walking over mountains, ice, snow and wetlands.

As of now the usage of RPAS in the Arctic is not wide spread amongst scientists, but in the near future it is feasible that drones will be part of the equipment operated routinely by scientists in the Arctic area [1].

However, when using RPAS in the Arctic, researchers have come across several cases when the navigation have not worked as intended. The number of reported cases, compared to other regions, is unproportionally high. Thus, investigating and identifying the navigation problem and finding the solution for it becomes necessary. The European Space Agency (ESA) has funded a project for AFRY together with Integrated UAV (IUAV) to increase accuracy when using RPAS drones in the Arctic environment. This thesis will investigate possible sources that can cause the navigational problems and propose a solution on how these problems can be resolved. To investigate the problem, flight logs from flight tests performed at Svalbard are available.

The flight tests were performed by employees from AFRY and IUAV. Two identical drones, with the same software and hardware were used, the IUAV drone and the AFRY drone. These flight logs are to be analyzed to find deviations and errors that might affect the navigation. Simulations of crucial components will be made to better understand the effects of the findings. After error sources, that have negative effects on the performance of RPAS in the Arctic, have been identified a solution will be pursued. The final objective is to propose a hardware component that offers a solution to these problems.

(10)

1.3 Objective

The main objective of this thesis is to find possible error sources that might affect the navigation of RPAS in the Arctic negatively. To this purpose data from flight tests will be investigated and simulations made. When the most likely error sources have been established, a method to correct these sources shall be determined.

A hardware solution that can be attached to a RPAS should be designed. The aim is that the hardware design mitigates the error sources.

1.4 Specifications

An explanation should be provided that explains the main causes to the observed navigational problems.

Then an external module should be designed. The module should be an external module that can attach to any of the two RPASs that were used in the flight tests (the IUAV and AFRY RPAS) as a navigational aid.

The module will be called the Attitude Enhancement Unit (AEU). The AEU is to be an evolution of the already existing hardware and software in the avionics navigational system and come with a simple solution for the software and hardware integration. Other specifications on the AEU is that it should:

• Use a supply voltage of no more than 5V as a power source on the flight controller

• Have low energy consumption

• Have low mass

• Have a low cost

• Have a simple solution for integrating it with existing hardware and software of the RPAS

• Have a size and geometry that fits the balance and geometry of the RPAS

• Have a minimum operating temperature of -20°C

1.5 Task and Scope

The first objective is to investigate possible error sources and how they might affect the RPAS, and to search through flight logs for evidence of these disturbances. To recreate these errors to confirm their effects simulations of the RPAS in an Arctic are to be conducted. Lastly possible solutions need to be investigated and a solution that fulfills the specifications designed. The tasks can be summarized as:

• Learning about the working principles of the RPAS

• Investigation of the Arctic environment

• Flight log investigation for evidence of the navigation not working

• Flight log investigation to identify the causes of the observed problems

• Simulations of important parts of the RPAS

• Investigation of possible solution methods

• Designing the AEU

• Verification and testing of the AEU

(11)

Chapter 2

Technical and Theoretical Backgrounds

(12)

2.1 The Arctic Environment

The Arctic climate poses some unique challenges when it comes to electronic devices and navigation. A big problem for electronic devices is the low temperatures. Low temperatures have effects on hardware, mainly the batteries but also on some sensors. The cold weather can also cause accretion of ice layers on surfaces. This becomes critical for RPAS when its rotors are exposed to icing. Rain, snowfall and fog affect the flying performance and communication and heavy winds have negative effects on the controllability and battery life [7]. Wind speeds close to the speed of the RPAS makes it impossible to fly for a mission. The indistinct terrain has few reference points for visual or radar orientation, and there are very few ground-based radio-technical navigation system facilities.

2.1.1 Magnetic field

The Earths magnetic field is generated by electric currents due to the motion of molten iron in its core. Earths magnetic field is always changing and these fluctuations could cause problems for navigating with a magnetic compass. The north magnetic pole is a wandering point that is always shifting due to the fluctuations. The north magnetic pole and geographical north pole, or the true north, are at two different places. The angle of declination is the angle that forms between the horizontal planes between the magnetic and true north (shown in Figure 2.1). Since a compass needle points toward the north magnetic pole, not the true north, the angle of declination must be taken into consideration. Close to the north magnetic pole the magnetic field lines go vertically down into the planet. This also makes navigation hard since the horizontal components become very small compared to the vertical component. The angle which the magnetic field line forms between the surface of the earth is called the angle of inclination. Figure 2.1 illustrates the components of the magnetic field line in the NED frame. The components are denoted N for north, E for east and D for down. The north and east components are needed for navigation as the RPAS measures the component sizes to determine which angle it has in the horizontal plane. A large angle of inclination causes the N and E components to become very small, more prone to noise and hard to observe, which could be a problem for the RPAS.

Figure 2.1: The angle of declination, denoted as D, (left) and angle of inclination, denoted as I (right). The components in the NED frame are denoted N for north, E for east and D for down. ®𝑀is the total magnetic field.

(13)

2.1.2 Global Navigation Satellite System (GNSS)

GNSS stands for Global Navigation Satellite System and refers to a constellation of satellites providing positioning and timing data to GNSS receivers. The receivers then use this data to determine location. GNSS include the navigation satellite systems Galileo, GPS, GLONASS and BeiDou [8]. Satellite navigation is difficult in the Arctic region. The GNSS signals are less reliable and more inaccurate than in other places.

One major element in GNSS signaling are the ground stations that maintain the satellite systems through monitoring and control of satellite orbital parameters and tracking each satellites position. The lack of ground stations in the Arctic region affects the signal accuracy [9]. Another reason is the orbital inclination of the satellites. No satellites from the major satellite system passes directly over the geographic north pole (as shown Figure 2.2). This causes the signals to travel a longer path from the satellites to the receivers which attenuates the signal and exposes it to more noise. There is also a risk that the signal can be lost.

Figure 2.2: The Satellite systems Galileo (left), GPS (middle left), GLONASS (middle right) and BeiDou (right) shown from above the geographic north pole.[10]

2.1.3 Space Weather

The magnetic field deflects the solar wind and protects the earth from harmful radiation. It is roughly dipolar, but is weaker around the poles. This makes the north pole sensitive to space weather. Space weather is caused by activity on the suns surface. Large fluxes of charged particles can cause magnetic field fluctuations. A geomagnetic storm is a temporary disturbance of the Earths magnetosphere caused by a solar wind shock wave. Magnetic storms affect radio communication and compass navigation. The geomagnetically induced currents can also cause electromagnetic interference which can disturb the electronics of the RPAS [11].

GPS satellites are not impervious to ionospheric activity. The increased space activity can cause signal scintillation which changes the amplitude or phase of the GNSS signals which causes errors in positioning calculations [9].

(14)

2.2 Extended Kalman Filter

To estimate its states, the flight controller uses an Extended Kalman Filter. It always has two instances of the filter running in parallel and uses the output of the core that reports the best health, which is determined by the consistency of its sensor data [12].

2.2.1 Theory

A Kalman Filter is an algorithm that uses a series of measurements observed over time, and produces estimates of unknown variables. The estimates tend to be more accurate than those based on a single measurement alone, since the measurements contain noise and other inaccuracies. The Kalman Filter represents linear relationships between different state variables. In real life, most of the problems encountered are not linear, and instead the Extended Kalman Filter (EKF) can be used. The EKF linearizes the non-linear system model in each point of the state-trajectory, so that the Kalman Filter can be applied in each step. The algorithm is a two-step process with a prediction step and an update step. In the prediction step, the filter estimates the current state variables and their uncertainties, or covariances. Then the next measurement is observed and the estimates are updated using a weighted average. The weighted average weighs estimates with a higher certainty more. In the EKF, the state transition and observation models do not need to be linear functions of the state and can instead be differentiable functions. The state space, x, and observation, z, at time k is assumed to evolve from the state at (k-1) according to

𝑥𝑘 = 𝑓 (𝑥𝑘−1, 𝑢𝑘) + 𝑤𝑘

𝑧𝑘 = ℎ(𝑥𝑘) + 𝑣𝑘

(2.1) where 𝑢𝑘 is the control vector and 𝑤𝑘 and 𝑣𝑘 are the process and observation noises. They are assumed to be zero mean Gaussian noises. The function f is used to compute the predicted state from the previous estimate, and the function h is used to compute the predicted measurement from the state 𝑥𝑘. However, the functions can not be applied to the covariance directly and instead the Jacobian is calculated. The Jacobian is a matrix of partial derivates which is computed for each time step with the predicted states. The Jacobian can then be used in the filter equations [13]. The estimate of 𝑥 at time k is denoted ˆ𝑥𝑘|𝑚, where m denotes that the estimate is given with observations up to and including time m ≤ 𝑘 .

The first step in the EKF algorithm is the prediction step. The state estimates are predicted as

ˆ

𝑥𝑘|𝑘−1= 𝑓 (𝑥ˆ𝑘−1 |𝑘−1, 𝑢𝑘) (2.2) and the covariance matrix estimate, P, is predicted as

𝑃𝑘|𝑘−1= 𝐹𝑘𝑃𝑘−1 |𝑘−1𝐹𝑇

𝑘 + 𝑄𝑘 (2.3)

where 𝑄𝑘is the covariance matrix of the process noise and 𝐹𝑘the state transition model which is applied to the previous state 𝑥𝑘−1. The state transition matrix is defined as the Jacobian

𝐹𝑘 = 𝜕 𝑓

𝜕 𝑥

|𝑥ˆ𝑘−1|𝑘−1,𝑢𝑘 . (2.4)

The update step of the algorithm begins with estimating the innovations, which is the difference between the observed value and estimated value. The innovation for the state measurement, ˜𝑦, is calculated as

˜𝑦 = 𝑧𝑘− ℎ( ˆ𝑥𝑘|𝑘−1) (2.5)

and the innovation of the covariance, 𝑆𝑘, as

𝑆𝑘 = 𝐻𝑘𝑃𝑘|𝑘−1𝐻𝑇

𝑘 + 𝑅𝑘 (2.6)

(15)

where 𝑅𝑘 is the covariance matrix of the observation noise and 𝐻𝑘 is the observation matrix defined as the Jacobian

𝐻𝑘 = 𝜕 ℎ

𝜕 𝑥

|𝑥ˆ𝑘|𝑘−1 (2.7)

Then the near-optimal Kalman gain, 𝐾𝑘, which is the relative weight given to the measurements and current state estimate, is calculated as

𝐾𝑘 = 𝑃𝑘|𝑘−1𝐻𝑇

𝑘𝑆−1

𝑘 . (2.8)

The state estimate is then updated according to

ˆ

𝑥𝑘|𝑘=𝑥ˆ𝑘|𝑘−1+ 𝐾𝑘˜𝑦𝑘 (2.9)

and the covariance estimate is updated

𝑃𝑘|𝑘= (𝐼 − 𝐾𝑘𝐻𝑘)𝑃𝑘|𝑘−1 (2.10)

where I is the identity matrix. An advantage of the EKF is that it is a recursive estimator. This means that only the current measurement and the last estimated state is needed to compute a new estimate [13].

No history of observations or estimations is required. A common application of the EKF is for navigation, guidance and control of vehicles.

2.2.2 Algorithm

The EKF estimates a total of 22 states and consists of many different files, functions and large matrices.

Ardupilot also offers a MATLAB model of a simplified version of the EKF system. The simplified system is based on the same equations as the real EKF and is a good tool for EKF simulations. However, it only predicts 9 states: the rotation error, velocity and gyro bias for all three axes. The model also simplifies noise parameters and does not consider temperature data. It uses fewer sensor inputs, only IMU data, magnetometer data and barometer data is considered [14]. This section will explain how the EKF works, but use equations from the MATLAB model. An overview of the EKF is shown in figure 2.1.

(16)

Figure 2.1: Schematic view of the EKF

The EKF works in the following way: IMU measurements are placed on delay in a buffer. The delay buffer is used so that when measurements are fused they are done so using measurements, filter states and covariance matrices from the same point in time [12]. The IMU angular rates are integrated to calculate the angular position. The change in angle is denoted dAng and the change in velocity is denoted dVel. They are calculated

𝑑𝐴𝑛𝑔=0.5 ∗ (𝑎𝑛𝑔𝑅𝑎𝑡𝑒 − 𝑝𝑟𝑒𝑣 𝐴𝑛𝑔𝑅𝑎𝑡𝑒) ∗ 𝑑𝑡

𝑑𝑉 𝑒𝑙=0.5 ∗ (𝑎𝑐𝑐𝑒𝑙 − 𝑝𝑟𝑒𝑣 𝐴𝑐𝑐𝑒𝑙) ∗ 𝑑𝑡 (2.11)

where angRate is the gyroscope data from the most recent time instance, prevAngRate data from the last instace and dt is the time step. Accel is the most recent accelerometer data and prevAccel is the data from the last instance. After that the IMU accelerations are converted using the angular position from the body frame to the north-east-down coordinate system (NED frame) and corrected for gravity [12]. The velocity is calculated as

𝑣𝑥= 𝑣𝑥+ 𝑑𝑉 𝑒𝑙 𝑁 𝑎𝑣𝑥

𝑣𝑦= 𝑣𝑦+ 𝑑𝑉 𝑒𝑙 𝑁 𝑎𝑣𝑦

𝑣𝑧 = 𝑣𝑧+ 𝑑𝑉 𝑒𝑙 𝑁 𝑎𝑣𝑧

(2.12)

where 𝑣𝑥, 𝑣𝑦and 𝑣𝑧are the velocity estimates in the states vector and dVelNav the dVel parameter transformed to the NED frame [14]. This is the state prediction block shown in Figure 2.1. Other states that are assumed to change slower, such as gyro biases, compass biases and the Earths magnetic field, are not modified in the

’State Prediction’ step but by measurements described later [12]. Parameters estimating the gyroscope and accelerometer noise are used to estimate the growth in error of the angles, velocities and position calculated using IMU data. These estimated errors are captured in the State covariance matrix, P. The covariance matrix for the next instance, PP, is calculated as

𝑃 𝑃= 𝐹 ∗ 𝑃 ∗ 𝐹𝑇 + 𝑄 (2.13)

(17)

where F is the transition matrix, P is the covariance matrix from the last instance and Q the state error matrix.

Q is a diagonal matrix containing noise parameters that are set in the initializations [14]. Error growth in the inertial solution is assumed to be driven by ’noise’ in the delta angles and velocities, after bias effects have been removed. The distortion vector distVector contains the noise parameters and the distortion matrix distMatrixis calculated as

𝑑𝑖 𝑠𝑡 𝑀 𝑎𝑡𝑟 𝑖𝑥= 𝑑𝑖𝑎𝑔(𝑑𝑖𝑠𝑡𝑉 𝑒𝑐𝑡𝑜𝑟2) (2.14)

and the state error matrix Q is then calculated as

𝑄= 𝐺 ∗ 𝑑𝑖𝑠𝑡 𝑀 𝑎𝑡𝑟𝑖𝑥 ∗ 𝐺𝑇. (2.15)

G is the disturbance influence matrix calculated as the Jacobian matrix of the new state estimates with respect to the distortion vector. The state vector contains the estimates of the x, y, z-rotation errors, velocity and gyroscope bias. F is a 9x9 Jacobian matrix (in the flight controller it is a 22x22 matrix) that gives the probabilities of different states going from one to another. It depends on the delta angle and velocity measurements from the state prediction step as well as the gyroscope bias estimates and the rotation of the RPAS relative to the NED frame. The rotation is given by quaternions, which are a numbers that extends the complex numbers and are used for calculations involving three-dimensional rotations.

All steps mentioned so far are repeated every time new IMU data is received until a new measurement from another sensor is available. The data fusion steps combine data from the IMU, GPS, compass, barometer and other sensors to calculate a more accurate and reliable state estimate [12]. Accelerometer measurements can be used to observe if the linear acceleration of the body is much smaller than the earth gravity vector. The rotation around the earth gravity vector cannot be observed from accelerometer measurements. The yaw can instead be observed using magnetometers [15]. The state vector first is updated by the accelerometer:

𝑠𝑡 𝑎𝑡 𝑒 𝑠= 𝑠𝑡𝑎𝑡𝑒𝑠 − 𝐾𝑣 𝑒𝑙∗ 𝑣; (2.16)

and then by the magnetometer:

𝑠𝑡 𝑎𝑡 𝑒 𝑠= 𝑠𝑡𝑎𝑡𝑒𝑠 − 𝐾𝑚𝑎𝑔∗ 𝑎; (2.17)

where a is the error in angle between the predicted yaw and measured yaw and v is the difference between the predicted velocity and measured velocity. K is the Kalman gain vector and is calculated with the same formula for both the velocity fusions and magnetometer fusions.

𝐾 = 𝑃∗ 𝐻𝑇

𝑣𝑖 (2.18)

In the velocity fusion 𝐻𝑣 𝑒𝑙=[0 0 0 1 1 1 0 0 0], and 𝑣𝑖𝑣 𝑒𝑙is calculated as

𝑣𝑖𝑣 𝑒𝑙= 𝐻 ∗ 𝑃 ∗ 𝐻𝑇 + 0.52 (2.19)

and for the magnetometer fusion H is a 1x9 vector with a complicated equation, depending on both the magnetic field readings and quaternions [14], and 𝑣𝑖𝑚𝑎𝑔is calculated as

𝑣𝑖𝑚𝑎𝑔= 𝐻 ∗ 𝑃 ∗ 𝐻𝑇 + 0.17452 (2.20)

(18)

2.3 Remotely Piloted Aircraft System (RPAS)

Remotely piloted Aircraft systems come in many types, i.e. multirotors, fixed-wing aircrafts and single-rotor helicopters. The most common type in the drone world is the multirotor. A mulitrotor is a RPAS with more than two rotors. Names like tricopter, quadcopter and hexacopter are given to drones with three, four and six rotors. The multirotor is aerodynamically unstable and requires a flight controller to control its rotors. They require a lot of energy just to fight gravity and keep them in the air. One advantage is that they can hover in one place and fly in any direction. However they have a limited flight time and speed. For this thesis a quadcopter with a Pixhawk flight controller will be considered.

2.3.1 Quadcopter

A quadcopter has four different actuators. Each one rotates in the opposite direction as its neighbour. The two opposite rotations balance out and keep the quadcopter steady. Figure 2.1 shows the two sets of motors.

Motors 1 and 3 rotates clockwise and motors 2 and 4 rotates counterclockwise. To lift off the ground, all motors must rotate with equal amount of thrust which results in a combined net force upwards greater than the gravitational force. By increasing or decreasing the speed of specific motors, a desired movement can be achieved.

Figure 2.1: The two sets of motors on a quadcopter

The drone can manoeuvre in all its three axes, called pitch, yaw and roll. (as shown in Figure 2.2). Rotation around the x-axis is denoted roll, around the y-axis is denoted pitch and around the z-axis is denoted yaw.

To roll left the drone speeds up motors on the right side of the frame and slows down the rotors on the left side. To move forward the drone slows down the two forward motors and increases the two motors on the back. It turns around its own axis, changes its yaw, by speeding and slowing down motors diagonally across from each other.

Figure 2.2: The three axis of rotation

(19)

2.3.2 Sensors

A drone uses several sensors to determine its attitude. An IMU is a MEMS sensor that often contains a 3-axis gyroscope, a 3-axis accelerometer, a 3-axis magnetometer and a barometer. Then the flight controller combines the readings from the IMU with readings from the magnetometer and radio and GNSS receivers.

While the GNSS receivers will give the position of the RPAS, the magnetometer will tell how it is positioned.

This is specifically important for a multirotor. It relies on the compass to tell how it is positioned since it can hover in the air in one place and is not always moving. The flight controller has three IMU boards as well as external sensors in the Here+ module available. However, only one magnetometer, gyroscope or accelerometer is used. The flight controller can not change between different sensors during flight, and not fuse together readings of several sensors. The extra sensors are used as backups and for monitoring the health of the main sensor.

Gyroscope

A classic mechanical gyroscope is a device that detects deviation of an object from its desired position.

It contains a rapidly spinning wheel mounted in gimbal rings. The spinning wheel maintain its original orientation in space because of its angular momentum. The ability of direction indication makes it usable in automatic piloting [16].

The Pixhawk Cube uses digital output gyro sensors with operating temperatures between -40 °C to +85 °C [17] [18] [19]. These angular rate sensors convert the rotation rate of the sensor into an electric signal. They are vibratory gyroscopes. Each sensor consists of three independent vibratory gyroscopes. A vibration gyro sensor is based on the vibration that occurs within the sensor. The underlying physical principle is that a vibrating object tends to continue vibrating in the same plane even if its support rotates. When a rotational force occurring outside the sensor is applied, the Coriolis force produces a new vibration within the sensor. The Coriolis force is an inertial force that acts on objects that are in motion. It is generated in the direction that is perpendicular to the location of the vibration within the sensor and produces a new vibration within the sensor. This vibration is detected by a capacitive pickoff circuit. The resulting signal is amplified, demodulated and filtered to produce a voltage that is proportional to the angular rate. The voltage is digitalized and sent to the IMU [20].

Figure 2.3: Coriolis force (Fc) on a mass with velocity v. Ω is the angular velocity

A gyroscope has several internal contributors to error. Bias instability is the major error source. Gyroscopes are subject to bias instabilities, in which the initial zero reading of the gyroscope will drift over time due to integration of inherent imperfections and noise within the device. Bias instabilities causes an angular error. The undesirable result of drift is that the error of a computed heading will increases continuously [21]. The gyroscope is sensitive to temperature variations. Variations in the surrounding temperature will lead to the bias drifting. The drift is not linear with temperature and therefore hard to model. To achieve

(20)

Accelerometer

While the internal gyroscope measures rotation about a known point, an accelerometer measures displacement.

It is an instrument that measures the rate that the velocity of an object is changing. Since acceleration cannot be measured directly, Newtons second law of motion, 𝐹 = 𝑚𝑎 is used. An accelerometer measures the force exerted by restraints that are placed on a mass to hold its position fixed in a body. With a known mass, and a measured force, the acceleration can be calculated [23].

The RPAS has access to different accelerometers. Each sensor uses three separate proof masses, one for each axis [17] [18] [24]. As the object housing the sensor accelerates, intertia causes the suspended proof mass to lag behind. The displacement of the suspended mass is proportional to the acceleration of the object. Capacitive sensors detect the displacement of the mass. Acceleration along a specific axis induces displacement of the corresponding proof mass. The z-axis is pointed downwards. This means that when the device is placed on a flat surface, the sensor will measure 0g along the x- and y-axes and +1g on the z-axis. Accelerometer measurements can be used to observe if the linear acceleration of the body is much smaller than the Earth gravity vector. The rotation around the Earth gravity vector cannot be observed from accelerometer measurements. The angle with respect to the magnetic north, the yaw, can be observed using magnetometers instead [15].

Magnetometer

A magnetometer is an instrument for measuring the strength of magnetic fields. The magnetometers on the RPAS use highly sensitive Hall sensor technology. The Hall effect occurs when a conductor with current flowing through it is introduced to a magnetic field. When exposed to a magnetic field perpendicular to the current, moving charges accumulate on one face of the material establishing an electric field. This electric potential can be measured by the Hall effect sensor. The voltage is proportional to the applied magnetic field. The voltage is amplified and digitalized.

In a magnetically undisturbed environment, magnetometers measure the true local Earth magnetic field.

However, magnetometers are not disturbance free. When mounting magnetometers in an aircraft the presence of magnetic field disturbances can cause erroneous heading estimates. The magnetometer needs to be calibrated for both magnetometer sensor errors and for the presence of magnetic disturbances [15].

Instrumentation errors are unique and constant for each device. These sensor errors consist of three components: scale errors, the non-orthogonality of the sensor axes and presence of a null shift. The sensitivity varies with the variations in the magnitude of the sensed magnetic field. Each axis has a different sensitivity which needs to be calibrated. The sensor axes in the magnetometer are not always perfectly orthogonal, and the non-orthogonality must be taken into consideration. Lastly, the magnetometer should measure zero when no magnetic field is present. Usually sensors have a small offset, a null shift, which needs to be removed. The three main instrumentation errors are shown in Figure 2.4.

Figure 2.4: Schematic representation of each instrument error: scale errors (left), non-orthogonality (middle) and null shift errors (right).

The magnetic interference is caused by ferromagnetic elements present in the surroundings. It is composed by permanent and induced magnetism. The distortion caused by permanent magnets is called hard iron distortion. Hard iron effects are due to the permanent magnetization of the magnetic material and lead to a constant additional magnetic field. Induced magnetism, or soft iron distortion, are due to magnetization

(21)

of the material as a result of an external magnetic field. It will therefore depend on the orientation of the material with respect to the external field and can change both the magnitude and the orientation of the measured magnetic field [25]. Presence of noise in the magnetometer measurements will also affect the result.

Barometer

A barometer is a device used to measure atmospheric pressure. The RPAS uses the barometer to measure its altitude. Since the atmospheric pressure changes with the distance to the sea level, a barometer can be used to measure that distance. The on board barometers can measure altitudes with a resolution of 10 cm, under an operating temperature between -40 °C to +85 °C [26]. It has a piezo-resistive sensor to measure the atmospheric pressure. The piezo-resistive sensor consists of a semiconductor material which changes in resistance when the material is stretched or compressed. The change in resistance results in an analogue output voltage which is then digitalized and sent to the IMU.

2.3.3 Flight Controller

The multirotor is aerodynamically unstable, which require its rotors to be controlled by a flight controller.

The flight controller takes inputs from several sensors and analyses their values in order to give the correct thrust to the rotors. The flight controller uses an Extended Kalman Filter (EKF) to estimate its attitude. The EKF receives data from an inertial measurement unit (IMU) to estimate its states and combines them with measurements from external sensors. The flight controller used for this project is the Pixhawk Cube flight controller and the external module the Here+.

Pixhawk The Cube

Pixhawk are low-cost flight controllers with open hardware and open source software. They are equipped with several inputs and outputs which allow external hardware such as sensors and motors to be connected.

This gives the operator the ability to custom configure the RPAS and design it for a specific mission or task.

The Cube is the second generation Pixhawk flight controller that has a built-in heat generating resistor so that the temperature of the IMU system can be controlled. This makes The Cube applicable for operations in low temperatures. Additionally it has three IMU systems to improve the reliability. For this project, the Cube will be used together with the Here+ RTK GPS receiver which can provide much more accurate position estimates than regular GPS receivers. The Here+ allows multiple GNSS receptions: GPS, GLONASS, BeiDou and Galileo [27]. All specifications are[28]:

• 32-bit ARM Cortex M4 core with FPU

• 168 Mhz/256 KB RAM/2 MB Flash

• 2 x MPU9250 IMU sensor having a 3-axis gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer

• MS5611 barometer

• LSM303D integrated accelerometer/magnetometer

• L3GD20 gyroscope Here+ module:

• STM32F302 processor

• ICM20948 IMU sensor having a 3-axis gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer

• MS5611 barometer

• 72-channel u-blox M8N engine

(22)

Figure 2.5: The Pixhawk Cube flight controller (left) and Here+ RTK GPS receiver (right) [29].

2.3.4 ArduPilot

ArduPilot is an open source autopilot software. Ardupilot is capable of controlling multirotor drones, fixed wing drones and helicopters. It allows for fully autonomous, semi-autonomous and fully manual flights.

It supports a large number of navigation sensors. ArduPilot provides failsafe features for i.e. loss of radio contact, GPS and minimum battery power level [30]. The ArduPilot software suite consists of navigation software running on the quadcopter, along with ground station controlling software: Mission Planner.

Mission Planner

Mission Planner is a full-featured ground station application for the ArduPilot open source autopilot project.

Mission Planner allows users to load the software into the flight controller, set up, configure and tune the quadcopter. Users can save, download and analyze data from missions. Dataflash logs are stored in the dataflash memory of the flight controller and can be downloaded after a flight. These logs can be reviewed automatically or manually by the user [31].

2.4 Simulink

Simulink is a commersial MATLAB-based graphical programming environment for modeling, simulating and analyzing systems. Available libraries offer blocks needed for simulations. It is also possible to import other libraries and toolboxes. Simulink offers tight integration with the rest of the MATLAB environment and can either drive MATLAB or be scripted from it.

(23)

Chapter 3

Data Analysis and Problem

Identification

(24)

3.1 Flight Tests

To find errors and inconsistencies, data logs from flight tests performed at Svalbard are available. The flight tests have already been performed by employees at AFRY and Integrated UAV (IUAV). Each test is performed by two drones: the AFRY and the IUAV RPAS. Both are identical and have the same hardware, software and parameters configurated. The specific hardware of the drones is described in section 2.3.3 and software in section 2.3.4. Each test is performed three times per RPAS. All flights are performed at an altitude of 10 m with a maximums speed of 2.5 m/s unless otherwise specified. The tests are divided into two groups: baseline tests (TB), which are tests performed to get data of simple maneuvers, and mission tests (TM) which are tests designed to simulate real missions. The TB tests are performed manually in Loiter Mode. In Loiter mode the RPAS automatically holds the current location, heading and altitude. The operator steers the vehicle but when the control is released the vehicle stops and holds the position [32]. The TM tests are performed by the autopilot. The mission is planned in Mission Planner by placing geographical markers on a map. The RPAS uses the GNSS receivers to navigate between the markers [33]. The TB7, TB9 and TB11 tests are performed flying along a magnetic field line and the TB8, TB10 and TB12 tests are performed flying orthogonally to a magnetic field line. When performing the manual tests, visual markers are placed on the ground as visual reference points for the operators. These markers are placed so that the line that crosses the points NW and S is parallel with, and the line that crosses the reference points NW and E is orthogonal, to the Earths magnetic field line. The locations of these points can be found in table 3.1.

These locations were calculated by using a magnetic declination of 9.9272 degrees taken from the World Magnetic Model that was developed jointly by the National Centers for Environmental Information (NCEI, Boulder CO, USA) and the British Geological Survey (BGS, Edinburgh, Scotland) [34].

Table 3.1: The locations of the reference points

Point Longitude (°E) Latitude (°N)

NW 15.65849 78.222561

E 15.660674 78.222483

S 15.658165 78.222182

The TB5-TB8 tests are performed in Sweden as well to collect reference data for future analyses.

• TB1: Ground test without throttling.

• TB2: Throttle up to about 40% and make sure that the drone does not lift of the ground.

• TB3: Fly the drone straight up to an altitude of 1.5 m and hover at the final altitude for 1 minute.

• TB4: Flying the drone straight up to an altitude of 5 m and hover at the final altitude for 1 minute.

• TB5: Fly the drone straight up to an altitude of 1.5 m and then Rotate the drone 360°.

• TB6: Fly the drone straight up to an altitude of 5 m and then Rotate the drone 360°.

• TB7: Take off to an altitude of 5 m and fly along the Earth’s magnetic line for 50 m and then stop.

Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

• TM1: Collecting data by performing a pre-defined waypoint mission traveling in a circle.

• TM2: Collecting data by performing a pre-defined waypoint mission traveling in a grid.

• TM3: Collecting data by performing TM1 while using a fixed declination parameter.

• TM4: Collecting data by performing TM1 while performing multiple low passes below 2.5m.

• TM5: Collecting data by performing TM1 while using large maximum tilt angle. Set the maximum speed to 15 m/s.

• TM6: Collecting data by performing TM1 while using a small maximum tilt angle. Set the a maximum speed to 1 m/s

• TM7: Collecting data by performing TM1 while using different yaw behaviors.

• TB8: Take off to an altitude of 5 m and fly perpendicular the Earth’s magnetic line for 50 m and then stop. Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

(25)

• TB9: Take off to an altitude of 5 m and fly along the Earth’s magnetic line for 50 m while maintaining a small pitch angle. Set the maximum speed to 1 m/s. Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

• TB10: Take off to an altitude of 5 m and fly perpendicular to the Earth’s magnetic line for 50 m while maintaining a small pitch angle. Set the maximum speed to 1 m/s. Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

• TB11: Take off to an altitude of 5 m and fly along the Earth’s magnetic line for 50 m while maintaining a large pitch angle. Set the maximum speed to 1 m/s. Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

• TB12: Take off to an altitude of 5 m and fly perpendicular to the Earth’s magnetic line for 50 m while maintaining a large pitch angle. Set the maximum speed to 1 m/s. Nose into flight direction and fly straight from one point to the other. Return backwards along the same line and stop.

3.2 Data Analysis

The first step is to find a problem in the navigation. In the TB7 test, the RPAS is to fly along a magnetic field line for 50 m. Figures 3.1 and 3.2 show the results from two different flights performing the TB7 test. Figure 3.1 shows the first AFRY flight performing the test and Figure 3.2 shows the first IUAV flight performing the test. The blue line represents the path it takes going north and the green line is the path it takes going south. The black line is the reference line it is supposed to fly along. The result shows that the IUAV flight seem to have problems with the navigation as it drifts further away from the line on the way back.

Figure 3.1: The path of the first AFRY flight performing the TB7 test

(26)

Figure 3.2: The path of the first IUAV flight performing the TB7 test

3.2.1 Heading error

Method

The reference path is found by placing a straight line between the NW and S reference points for the TB7, TB9 and TB11 flight. For the TB8, TB10 and TB12 flight a straight line is adjusted to the NW and E reference points. To calculate the difference between the reference path and the measured location, two different methods can be used. One is to find the vertical- and the other one to find the perpendicular offset to the line. The two different methods are shown in Figure 3.3.

Figure 3.3: Example of distance calculation with vertical offset (left) and perpendicular offset (right) [35].

The method using vertical offset compares the measured coordinates y-value to the y-value of the line with the same x-value. The method using perpendicular offset instead calculates the smallest possible distance between the points and the line. This is the method most suitable for this specific error calculation since the drone is trying to fly as parallel to the line as possible and trying to keep the offset minimal. To calculate this distance, the reference line is used to retrieve a new perpendicular line from the measured point to the line.

Then, where the two lines meet, a new coordinate emerges, which is used to calculate the distance using Pythagoras theorem. The result is the distance error between the the measured data points and the preset route.

(27)

The result is a vector with the same length as the measured locations. Each index stores the location error for every data point. To compare errors between different flights, box plots are made of the vectors.

Box plots plot the median error for every flight as well as the 25th and 75th percentiles. It is a good way to find the median error as well as how much the distribution of the error. A "good" flight should have a low median as well as a low spreading. The resulting boxplots can be found in appendix A.

Result

The resulting error box plots from the two flights in Figures 3.1 and 3.2 performing the TB7 test show the errors for the two flight going north and south (shown in Figures 3.4 and 3.5). The boxplots confirm that the AFRY flight performed better than the IUAV flight, and also that the error was larger on the second half for the IUAV flight.

Figure 3.4: The error on the way north (blue) and south (red) for the first AFRY flight performing TB7.

Figure 3.5: The error on the way north (blue) and south (red) for the first IUAV flight performing TB7.

Discussion

The heading error analysis shows that many flights had large deviations from the reference path. A constant factor is that flights that had large heading errors all performed better on the first half of the test than the second. The error analyses for all flights performing the TB7-TB12 tests can be found in appendix A. Both AFRY and IUAV experienced this problem. There was no trend between tests that some tests went better than others. All flights had some small error, like the offset that is shown in Figure 3.4. Since the flights were performed manually the human factor has an impact. Visual problems for the operators estimating the

(28)

3.3 Gyroscope Data

Theory

The internal 3-axis gyroscope capability measures rotation about a known point, but it is common that the gyroscope readings drift over time due to bias instabilities. Bias instabilities will cause angular errors which induces errors in the computed heading. The heading error will increase continuously [21].

Gyroscope Bias

Before and after the test, the RPAS stands still on the ground. The gyroscope should measure 0 rad/s. If not, the gyroscope has drifted and there is a gyroscope bias. To measure the bias, a long sequence of data must be collected and the average value calculated. The data is collected from the RPAS while it is standing still after the test.

Results

The gyroscope data for the two flights performing the TB7 test after the flight is shown in Figures 3.1 and 3.2. It can be seen, the AFRY flight suffered from almost no gyroscope drift while the IUAV flight had a gyroscope bias of 0.0184 rad/s around the z-axis on the IMU used.

Figure 3.1: Gyroscope Z-axis data after flight for the first AFRY flight performing the TB7 test.

(29)

Figure 3.2: Gyroscope Z-axis data after flight for the first IUAV flight performing the TB7 test.

Analysing data from the TB7-TB12 tests showed that many flights suffered from a significant gyroscope bias. The gyroscope biases for all flights performing the TB7-TB12 tests are presented in table 3.2. All observed biases were found on the second IMU on the gyroscope measuring the rotation around the z-axis.

There was no gyroscope bias around the x or y axis.

Table 3.2: The gyroscope biases on the second IMU z-component

AFRY IUAV

Flight gyro.z bias [rad/s] gyro.z bias [rad/s]

1 0.000508 0.0184

TB7 2 -0.000584 0.0100

3 0.000416 0.0068

1 0.000530 0.0078

TB8 2 0.0038 0.019

3 0.0030 0.0100

1 0.0245 0.0140

TB9 2 0.0047 0.0062

3 0.0013 0.0038

1 0.0216 0.000912

TB10 2 0.0087 0.0173

3 -0.0084 0.0094

1 0.0010 0.0020

TB11 2 0.0134 0.0027

3 0.0295 0.0025

1 0.0090 0.0016

TB12 2 0.0031 0.0014

3 0.0000062 0.0012

(30)

Discussion

The gyroscope data shows that most flights suffered from drifting gyroscopes. As already mentioned, gyroscopes are subject to bias instabilities and usually drift. A drifting gyroscope is no problem if the system is aided with information from other sensors to estimate the magnitude of the drift. If estimated correctly, the gyroscope bias can be subtracted from the gyroscope readings in the flight controller to achieve accurate gyroscope data. The gyroscope bias around the x- and y-axes can be estimated with readings from the accelerometer. Magnetometer readings are used to estimate the bias around the z-axis [21]. The gyroscope drifting around the z-axis explains the behaviour shown in Figure 3.2. The gyroscope bias accumulates a yaw error which increases over time. The yaw angle determines the direction in the horizontal plane and the growing error would cause the RPAS to perform better in the beginning of the flight than toward the end, as was shown. Since two individual RPAS experienced the same problem it indicates that there is a systematic error.

3.3.1 Temperature

Theory

The low temperature does not only affect the battery life but most importantly the sensor readings. The IMU boards have heaters to keep the temperature constant. The desired temperature can be set in the parameter BRD_IMU_TARGTEMP. This should keep the temperature consistent which is good since the gyroscope is sensitive to temperature variations. Variations in the surrounding temperature lead to the gyroscope drifting which leads to a gyroscope bias. The gyroscope is calibrated before the flight while standing still. For the flight tests the target temperature parameter is set to 45°C.

Method

The temperature readings during flight are logged. Unfortunately only the first and third IMU boards logged the temperatures during all flight tests. The second IMU, which is the one being examined, did not. The delta temperature, i.e the difference between the maximum and minimum temperature values during the flight, will be compared to the gyroscope bias measured at the end of the flight. Whether the target temperature is reached or not will also be investigated.

Results

The temperature never reached the target temperature for any of the flights. The temperature variances are compared to the resulting gyroscope biases for all flights. The absolute values plotted against each other are shown in Figure 3.3. The dashed line shows the linear regression performed on the data.

Figure 3.3: The gyroscope bias for different delta temperatures

(31)

Discussion

There is a clear trend that flights where the temperature varied a lot had a high gyroscope bias whilst flights where the temperatures were constant had almost no bias. If the heaters are not sufficient in the low outside temperatures the IMU board temperature will vary. During the flight tests the target board temperature was set to 45°C, which was never achieved for any flight. The low outside temperature and the too high target temperature together caused the temperature to vary during some flights. Lowering the target temperature, or improving the IMU heaters could mitigate the drift in the gyroscope. The operators should also wait for the heaters to reach the target temperature before flying.

3.3.2 Estimation System

Theory

A large gyroscope bias is not necessarily a problem as long as the EKF can estimate the bias. If the estimation system for some reason cannot estimate the drift properly then the RPAS will have problems estimating correct yaw angles.

Method

The flight logs save the estimation data from the EKF system estimating the gyroscope bias. The gyro bias estimate while the RPAS stands still after the flight can be compared to the true gyroscope bias obtained from the gyroscope data. The difference between the bias estimate and the actual bias will be called the estimation error.

Results

The estimation error for all flights performing the TB7-TB12 compared to the gyroscope drifts shown in Figure 3.4. The dashed line shows linear regression performed on the data. The figure shows that flights that had a large gyroscope drift also had large errors in the bias estimation.

(32)

Discussion

The result indicates that there is a correlation between the bias estimate and gyroscope bias. This shows that the flight controller, which is supposed to be able to handle large biases, is having trouble with that at northern latitudes [36]. Errors in the estimated bias causes errors in the estimated yaw. An error in the yaw angle causes the RPAS to fly in the wrong direction. Most flights performed worse on the second half, which is the expected result from a drifting gyroscope accumulating a yaw error. Since only the z-axis drift is a problem this indicates that the magnetometer cannot properly compensate for the drift and needs to be investigated.

3.4 GNSS Signals

Theory

A GPS glitch can cause the RPAS to think it is suddenly at the wrong location. To correct the perceived error it can change its direction very harshly. This leads to the RPAS flying off in a completely wrong direction.

This might happen in autonomous modes [37].

Method

Ardupilot logs the number of satellites during a flight as Nsat and a measure of gps precision, HDop. HDop values below 1.5 are very good. Values over 2.0 could indicate that the GPS position is not good. A good number of satellites is 12 or more. Nsat dropping below 12 is bad. A significant change in these two values often accompanies a GPS position change caused by a GPS glitch [37].

Result

In one test, the RPAS could be seen flying off in the completely wrong direction. Figure 3.1 shows two AFRY flights performing the TM3 test. In one of the flights the RPAS behaves as expected. In the other flight it arrives back to the right position but then flies away.

Figure 3.1: TM3: AFRY flight 1 flying as expected (left) and AFRY flight 3 flying away (right)

To investigate if this is because of a GPS glitch the Nsat and Hdop values were analysed. Figure 3.2 shows that during the test the RPAS gets signals from 18 satellites. When it starts behaving unexpectedly the number of satellites drops to 9. Figure 3.3 shows that the Hdop value lies at 0.6 during the test, but increases to 2.05.

(33)

Figure 3.2: The number of satellites for the third AFRY flight performing the TM3 test

Figure 3.3: The Hdop value for the third AFRY flight performing the TM3 test

Discussion

For one of the flights performed the RPAS flew away in the wrong direction and its Hdop and Nsat values indicate that this was because of a GNSS glitch. This shows that the loss of GNSS signals can happen in the Arctic, but since only one test out of 114 experienced this problem it will not be classified as a significant

(34)

3.5 Space Weather

Space weather increases the level of ionizing particles in the atmosphere and could cause electromagnetic interference. The EMI could possibly affect the navigation. However, the days that the flight tests were performed the auroral activity was low with a Kp-index of 2 [38]. The Kp-index is a global auroral activity indicator on a scale from 0 to 9 [39]. Since the effects of space weather is not present in the flights logs its effects on the navigation cannot be determined from the available data.

(35)

3.6 Simulations

3.6.1 Magnetometer Simulations

As mentioned in section 3.2 magnetometer readings are used to estimate the gyroscope drift around the z-axis. Since the estimation system made large errors estimating the z-axis drift, the magnetometer needs to be investigated. To investigate its behaviour a model of the magnetometer is created which will be used to simulate the magnetometer. In the Arctic, the inclination and declination of the magnetic field are of interest. By simulating the magnetic measurements the effects of these can be investigated.

Method

Ideally the measured magnetic field, ℎ𝑚, would be equal to the true local magnetic field, ℎ. However this is not the case due to sensor errors and magnetic interference. The sensor errors consist of six major components. The first one is the scale sensitivity of all three magnetometer axes. This scale factor, S, can be modeled as a diagonal matrix:

𝑆=

𝑆𝑥 0 0

0 𝑆𝑦 0

0 0 𝑆𝑧

(3.1)

The second component is the non-orthogonality of the sensor axis, N. This error can be modeled by the 3x3 matrix

𝑁=  ®𝑛𝑥 𝑛®𝑦 𝑛®𝑧

(3.2) where each column represents a 3x1 vector. The third component is a sensor offset which can be modeled

𝑏𝑠𝑜=

 𝑏𝑠𝑜

𝑥

𝑏𝑠𝑜

𝑦

𝑏𝑠𝑜

𝑧

(3.3)

This bias implies that the magnetometer will measure a non-zero magnetic field even if the magnetic field is zero. The fourth component is the presence of noise in the measurements. To model this the noise is assumed to be Gaussian noise, i.e. noise having a probability density function equal to Gaussian distribution [15]. Constant magnetic interference in the measurements can be divided into two components: permanent and induced magnetism. Any non-constant magnetic interference cannot be compensated for. Permanent (hard iron) interference is the result from permanent magnets. It is equivalent to a bias that can be modeled as:

𝑏ℎ𝑖=

 𝑏ℎ𝑖

𝑥

𝑏ℎ𝑖

𝑦

𝑏ℎ𝑖

𝑧

(3.4)

Induced magnetism (soft iron) is due by interaction of an external magnetic field with ferromagnetic materials. This causes a change in the intensity and direction of the measured field. This can be modeled as:

𝐴=

𝑎11 𝑎12 𝑎13 𝑎12 𝑎22 𝑎23 𝑎13 𝑎23 𝑎33

(3.5)

The distortion sources can be combined into the measurement model:

References

Related documents

Ett relativt stort antal arter registrerades dven utefter strdckor med niira an- knytning till naturbetesmarker (striickorna 5, 6.. = 9,

However, using standalone deriving, we can add the constraint that all the types contained in the data types have to be mem- bers of the type classes (requires the language

For future reference, free seedlings and the carbon payments will be defined as a decrease in investment cost and increased labor costs and reduced rainfall as reductions

You suspect that the icosaeder is not fair - not uniform probability for the different outcomes in a roll - and therefore want to investigate the probability p of having 9 come up in

Considering the outcome variable Awareness of Territory Statute, this study found a statistically significant effect of Green Grant for most groups of

In the analysis of river runoff we find 5, 8, 11 and 17 years (and a very large maximum at 28 years), whereas the result of processing Anholt Nord salinity, the annual

Results from Experiment 2 indicated that when a pleasant water sound (Sea) was added to the unpleasant road traffic noise it had a positive effect on the

We hypothesize that if the wing patch is a sexual ornament that females use to select their mates, males with reduced wing patches should have a lower breeding success compared