positioning and tracking of target drone

93
Master of Science Thesis in Electrical Engineering Department of Electrical Engineering, Linköping University, 2021 Positioning and tracking of target drone Anna Hanström and Jet Verheij

Upload: others

Post on 20-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Positioning and tracking of target drone

Master of Science Thesis in Electrical EngineeringDepartment of Electrical Engineering, Linköping University, 2021

Positioning and tracking oftarget drone

Anna Hanström and Jet Verheij

Page 2: Positioning and tracking of target drone

Master of Science Thesis in Electrical Engineering

Positioning and tracking of target drone

Anna Hanström and Jet Verheij

LiTH-ISY-EX--21/5362--SE

Supervisor: Senior Scientist Rolf GustavssonSwedish Defence Research Agency (FOI)

Research Engineer Andreas HöggrenSwedish Defence Research Agency (FOI)

PhD student Özgecan Özdoganisy, Linköping university

Examiner: Docent Danyo Danevisy, Linköping university

Division of Communication SystemsDepartment of Electrical Engineering

Linköping UniversitySE-581 83 Linköping, Sweden

Copyright © 2021 Anna Hanström and Jet Verheij

Page 3: Positioning and tracking of target drone

Abstract

This master thesis studied methods for tracking and localising a moving targetfrom an autonomous seeker drone. Feasible methods for automatic control of theseeker drone and different antenna configurations were explored as well. Twodifferent tracking filters and two different controllers were tested for this pur-pose. The algorithm was developed in Python and MATLAB. The evaluation ofthe filters and controllers was done both theoretically with simulations but alsopractically with flight tests. Performance and robustness were measured by exam-ining the estimated target position and the smoothness of the seeker path. Bothfilters performed satisfactorily, the same conclusion could be made for the auto-matic controllers as well.

Regardless of the sufficient results, for future work there are several aspectswhich can be improved. The communication with the drone’s motors, the noisemodels and one of the automatic controllers are all examples of areas which canbe improved further.

iii

Page 4: Positioning and tracking of target drone
Page 5: Positioning and tracking of target drone

Acknowledgments

Firstly, we would like to thank our supervisors at FOI, Rolf Gustavsson and An-dreas Höggren. Without your constant support and great knowledge this projectwould not have been what it is today. Additionally, we would also like to thankour supervisor and examiner at Linköping University, Özgecan Özdogan andDanyo Danev. We would like to thank Simon Ahlberg, Johannes Lindblom andPatrik Hedström at FOI, your helpful insights always managed to keep us onthe right track. Lastly, we are very thankful for the help we have received fromJoakim Rydell, Alfred Patriksson and the rest of the people at FOI who have con-tributed to this master thesis in one way or another.

Linköping, February, 2021Jet Verheij and Anna Hanström

v

Page 6: Positioning and tracking of target drone
Page 7: Positioning and tracking of target drone

Contents

Notation ix

1 Introduction 11.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Theory 32.1 Positioning methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1.1 Direction finding method and positioning method - what isthe difference? . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1.2 Fundamental ambiguity . . . . . . . . . . . . . . . . . . . . 42.1.3 Received Signal Strength Indication (RSSI) . . . . . . . . . 52.1.4 Time difference of arrival (TDOA) . . . . . . . . . . . . . . . 82.1.5 Interferometry . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.1 Model formulation . . . . . . . . . . . . . . . . . . . . . . . 122.2.2 Error sources . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2.3 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2.4 Resampling methods . . . . . . . . . . . . . . . . . . . . . . 162.2.5 UAV flight controller . . . . . . . . . . . . . . . . . . . . . . 192.2.6 Optimality criterion . . . . . . . . . . . . . . . . . . . . . . 20

2.3 Noise distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3.1 Student-t distribution . . . . . . . . . . . . . . . . . . . . . . 212.3.2 Rice distribution . . . . . . . . . . . . . . . . . . . . . . . . 22

3 Method 253.1 System overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.2 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.2.1 Global coordinate system setup . . . . . . . . . . . . . . . . 273.2.2 Global and local coordinate system setup . . . . . . . . . . 283.2.3 Conversion of GPS data to Cartesian coordinates . . . . . . 28

vii

Page 8: Positioning and tracking of target drone

viii Contents

3.3 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3.1 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3.2 Particle Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.4 Flight control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.4.1 MDP controller . . . . . . . . . . . . . . . . . . . . . . . . . 323.4.2 Relative bearing controller . . . . . . . . . . . . . . . . . . . 323.4.3 Collision handling . . . . . . . . . . . . . . . . . . . . . . . 32

3.5 Test framework setup . . . . . . . . . . . . . . . . . . . . . . . . . . 333.5.1 Test model for signal strength . . . . . . . . . . . . . . . . . 333.5.2 Test model for bearing . . . . . . . . . . . . . . . . . . . . . 37

3.6 Practical tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383.6.1 Simulation of bearing and signal strength . . . . . . . . . . 38

3.7 Hardware setup and software programs . . . . . . . . . . . . . . . 38

4 Results 414.1 Coordinate system setups . . . . . . . . . . . . . . . . . . . . . . . . 414.2 Antenna configuration and positioning method . . . . . . . . . . . 414.3 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.3.1 Kalman filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.3.2 Particle filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.4 Flight control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.5 Noise sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . 49

4.5.1 Large bearing noise . . . . . . . . . . . . . . . . . . . . . . . 504.5.2 Large signal strength noise . . . . . . . . . . . . . . . . . . . 544.5.3 Medium large bearing noise and signal strength noise . . . 58

4.6 Practical tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.6.1 Initial tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.6.2 Qualitative performance . . . . . . . . . . . . . . . . . . . . 644.6.3 Flight tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5 Discussion 755.1 Signal models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755.2 Coordinate system setup . . . . . . . . . . . . . . . . . . . . . . . . 755.3 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765.4 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775.5 Practical flight test . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

6 Conclusion 796.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

6.1.1 Positioning method . . . . . . . . . . . . . . . . . . . . . . . 796.1.2 Tracking method . . . . . . . . . . . . . . . . . . . . . . . . 806.1.3 Antenna configuration . . . . . . . . . . . . . . . . . . . . . 806.1.4 Flight control . . . . . . . . . . . . . . . . . . . . . . . . . . 80

6.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Bibliography 81

Page 9: Positioning and tracking of target drone

Notation

Abbreviations

Abbreviation Meaning

3d 3 Dimensionalcdf Cumulative Distribution Functioncrlb Cramér Rao Lower Boundfoi Swedish Defence Research Agencygps Global Positioning Systemlos Line of Sightmdp Markov Decision Processpf Particle Filterrmse Root Mean Square Errorrssi Received Signal Strength Indicatorrt90 Rikets Koordinatsystem 1990snr Signal to Noise Ratiotdoa Time Difference of Arrivaluav Unmanned Aerial Vehiclevhf Very High Frequencywgs84 World Geodetic System 1984

ix

Page 10: Positioning and tracking of target drone
Page 11: Positioning and tracking of target drone

1Introduction

In this chapter the motivation and purpose of this master thesis work are pre-sented. The problem statement and the delimitations connected to them are de-fined as well.

1.1 Motivation

In the last couple of years there has been an increased amount of incidents whereunmanned aerial vehicles (UAVs) have violated or intruded unauthorised areas.These violations have been especially problematic for airports and public build-ings. Due to these incidents it is of great interest to investigate what methodsthere are to detect UAVs and localise them in an efficient and rapid way [31].

1.2 Purpose

The focus of this master thesis was to investigate several methods for UnmannedAerial Vehicle (UAV) detection and localisation using radio frequency signals.The detection and localisation aimed to be implemented on a seeker drone whichin a finalised stage would operate and follow the intruding drone completely au-tonomously.

1.3 Problem statement

• What positioning method is most suitable for this task: received signalstrength, interferometry or Time Difference of Arrival (TDOA)?

• What method is most suitable for tracking the target drone?

1

Page 12: Positioning and tracking of target drone

2 1 Introduction

• What antenna configuration is the most suitable for this task?

• How should the automatic controlling of the seeker be implemented in or-der to make direction changes smooth?

1.4 Limitations

The task was delimited to a two dimensional case where the height of the seekerdrone and the target drone was omitted. Also, the drones were assumed to be inLine of Sight (LOS) from each other, meaning that there would be no obstacles be-tween them. These limitations were made to simplify the tracking and automaticcontrolling of the seeker drone since less parameters had to be taken into account.

When performing practical tests the seeker drone did not have any antenna hard-ware for receiving the signals from the target drone. The focus was on testing thetracking algorithms and automatic controllers. Instead, the Global PositioningSystem (GPS) on the drones provided the position and from that the bearing andsignal strength were simulated, together with noise.

The power of the outgoing signal strength from the target drone was assumedto be known and constant. The reason to have a known power was that it sim-plified the calculations of the noise when the signal strength was simulated. Yetagain, this was done to keep the focus on the tracking and automatic controllers.A more elaborated noise model could have been used, but that would have beenon the expense of a less studied tracking and/or controller algorithm.

Page 13: Positioning and tracking of target drone

2Theory

This chapter provides relevant theory for the topics of this master thesis. Section2.1 first explains the fundamental ambiguity and thereafter consists of the posi-tioning methods: received signal strength, interferometry and TDOA. Section 2.2explains different methods for tracking a moving object and mentions the filtersused in this project. Section 2.3 provides theory regarding the simulated noisedistributions that were used for the signal strength and the bearing.

2.1 Positioning methods

This section presents relevant theory regarding positioning methods.

2.1.1 Direction finding method and positioning method - what isthe difference?

A direction finding method gives the direction to the object. A direction can bemeasured in bearing, the angle in the horizontal plane between true north andthe measured direction [27]. A positioning method estimates the exact positionand can be measured in multiple ways, for example by the x, y, z position, thebearing together with a distance or with GPS coordinates.

In many cases the method of finding the direction is the first step of the posi-tioning method [3]. For the tracking algorithm it is sufficient to only know thebearing. In this project the distance between the drones was used to avoid colli-sion. Still the tracking algorithms distance estimation properties were examinedfor both long and short distances, this was to answer the first and second problemstatements.

3

Page 14: Positioning and tracking of target drone

4 2 Theory

2.1.2 Fundamental ambiguity

The goal was to calculate the exact position of the target drone. For this thebearing α of the target drone compared to the seeker drone had to be estimated,see Figure 2.1.

α[n]

Target at timestep [n]

Seeker attime step [n]

Global x axis

Global y axis

Figure 2.1: A depiction of how the bearing α relates to the seeker and thetarget drone.

Here the bearing angle α denotes the angle to the target with respect to the seekerheading.

The first step in that estimation was to receive the signal from the target drone.This could be done with an antenna setup placed on the seeker drone. One gen-eral problem, independent of chosen method, is ambiguity of direction. The am-biguity can be reduced by using different kinds of antennas, different amounts ofantennas or by limitations on the problem. One limitation is already mentionedin the section above, Section 2.1.1, "A direction can be measured in bearing, the an-gle in the horizontal plane between true north and the measured direction". Herethe horizontal plane was a limitation. In this section the fundamental ambiguityproblem will be discussed, in the following sections the three different methodsof interest will be explained together with methods to solve the ambiguity.

In the simplified case of estimating the direction of a planar wave it is not enoughto only recognise the field with a simple antenna in one single point. The infor-

Page 15: Positioning and tracking of target drone

2.1 Positioning methods 5

mation must be compared to at least one other point to say something about thedirection. When comparing the field in two points it is possible to estimate theangle of direction relative the line connecting the points. In the 3 dimensional(3D) case all the possibilities of direction generates something that could be de-scribed as a cone, this is shown in Figure 2.2 [3]. To remove some ambiguity ina 3D world at least three points are needed, reducing the ambiguity to two, onedirection above and one direction below the plane spanned by the three points[3].

Figure 2.2: When measuring a planar wave in two points the different possi-ble directions create a rotational concentric ambiguity in the 3D case. In the2D case there will be an ambiguity of two directions.

A commonly used simplification is to do the estimations in the horizontal planebut keeping two simple antennas. This reduces the ambiguity to two directions,one possibility on each side of the line.

2.1.3 Received Signal Strength Indication (RSSI)

The RSSI method studies the signal strength in different positions or in differentdirections and uses this information to estimate the bearing. The mathematicalsetup depends on the used method, in this section some general methods willbriefly be discussed. Additionally, two different types of antennas will be shortlyexplained.

Antennas for RSSI

For the purpose of transmitting or receiving a signal there are different antennaswhich can be used. For the RSSI cases which are described in this section, onlydirectional antennas were used. A directional antenna transmits and receives sig-nals in a specific direction, the direction is dictated by an angle γ which denotesthe beam width. The area covered by a directional antenna resembles the shapeof a cone. However, there is another type of antenna worth mentioning as well -

Page 16: Positioning and tracking of target drone

6 2 Theory

an omnidirectional antenna. An omnidirectional antenna receives or transmits ina circular pattern, similar to a bagel, thus covering a wider area than a directionalantenna [30].

γ

Figure 2.3: An example of the area which a signal propagates within for adirectional (to the left) and an omnidirectional antenna (to the right).

The RSSI method

The RSSI method builds on the attenuation of the signal, it is a bit like our hear-ing, we turn our head to the direction where the signal is louder. The attenua-tion of the signal depends on the radio propagation channel, this is a combina-tion of the signal frequency and the propagation environment. Under ideal cir-cumstances with no obstacles or refraction the attenuation is lower than if therewould be obstacles such as trees and bushes. This assumes a free space propaga-tion of the signal, where the signal only takes one path. For ideal conditions thesignal level reduction loss is described as follows

Ideal condition: 20· log10(dinitial /df inal) (2.1)

implying that when doubling the distance the received signal level is reducedby 6 dB. Egli [11] proposed an empiric channel model for VHF transmission atground level stating that the signal level was reduced according to the followingequation

Egli: 40· log10(dinitial /df inal) (2.2)

which implies that by doubling the distance the received signal level would bereduced by 12 dB. Several meters up the condition was closer to ideal, but ifthe drone was flying on a low altitude the received signal would be much lower.This equation assumes a multi path propagation of the signal, which in practicemeans that the propagated signal takes more than one path. The cause of this isthe environmental conditions which give rise to reflections. The multiple pathsintroduce distortion which become even more serious when the transmission isin a situation of movement. To redeem the impact of the multi path distortionone can use directional antennas, which has been proved to reduce it greatly [11].

Page 17: Positioning and tracking of target drone

2.1 Positioning methods 7

1

2

Figure 2.4: The triangulation method. Two rotations generate two bearings.Calculating the position where the two bearings cross each other gives theposition of the radio source.

RSSI with directional antennas

In Methods for locating signal jammers with a UAV [16] Höggren and Lindmarkused one single directional antenna mounted underneath a UAV. The directionalantenna received a higher signal strength when pointing at the jammer. By rotat-ing the UAV a full cirle two times on different places the position of the jammerwas identified. This is called the triangulation method, see Figure 2.4. After thefirst rotation and bearing estimation the drone flew to another position perpen-dicular to the bearing and rotated another time. The two bearings were usedto estimate the position. This method generated a position in a fairly straight-forward way, a drawback was that the rotations took time and the calculationdepended on an immobile target. If the target drone moved this would not bea useful method for the situation. Also, the method was sensitive to differentweather conditions, the full rotation took some time to carry out and the windcould cause it to tilt, rotate at uneven speed and gain or lose altitude.

In Hunting Drones with Other Drones: Tracking a moving Radio Target [22] Dresseland Kochendfer used two directional antennas placed on the opposite sides ofthe seeker drone, one pointing along the front of the drone, the other one point-ing to the back. Like before the directional antennas received a higher signalstrength when pointing at the radio source. By having two directional antennasit was possible to say if the target drone was in front or behind the seeker drone,not if the target drone was to right or left hand side of the seeker drone. This isthe fundamental ambiguity and Dressel and Kochendfer used a tracking methoddescribed in Section 2.2.6 to solve the problem.

Page 18: Positioning and tracking of target drone

8 2 Theory

RSSI with multiple antennas

In Electronic warfare using a software defined platform [28] six VHF antennas wereused in different positions together with one signal transmitter. Combining thereceivers two and two it was possible to find an oval for each pair, combining thethree ovals from the pairs they all intersected in one point, namely the positionof the transmitter.

If a pair of receivers got a difference in signal level to, for example, 6 dB andthe conditions were ideal, the distance between the emitter and receiver differ-entiated with a factor of 2. This meant that for receiver A the transmitter wastwice as far away as from receiver B. This is shown in Figure 2.5 where the bluepoints indicate the receivers and the red circle indicates possible positions for thetransmitter.

A B

Figure 2.5: An example of how the ovals are created, the receiver A got 6 dBlower signal level than receiver B, implying the receiver is twice as far awayfrom A than from B. The red oval depicts all possible positions where thetransmitter possibly can be.

2.1.4 Time difference of arrival (TDOA)

In general there are two different techniques for using TDOA, one of them iswhere the subtraction between two different measured time arrivals is calculated.The other method uses the cross-correlation where the measured arrival time forone sensor is correlated with the measured arrival time for another sensor. Themost commonly used method is the one which makes use of the cross-correlation[1]. Both of these methods are described shortly below.

Subtraction of different measured time arrivals

In a simple case, with no noise and two half wave dipole antennas with distanced between them, the angle of incidence is defined such that

α = −arcsinτ21

d/c. (2.3)

Here τ21 = t2 − t1 is the difference in time between the second antenna andthe first antenna receiving the same signal. c is the speed of light [3]. Figure 2.6shows the formation and how α should be interpreted.

Page 19: Positioning and tracking of target drone

2.1 Positioning methods 9

d

d sin α

α

α

Figure 2.6: The two antennas are placed with the distance d and α is theangle of the direction of the incoming planar wave.

Apart from the fundamental ambiguity the estimation method is unambiguous,however, the method can be hard to implement if the distance between the an-tennas is small. A small distance between the antennas generates a very short τ21which requires a very accurate clock [3].

Equation 2.3 originates from that t1 and t2 are known, this is not always the case.If the incoming wave would be single pulses, and the time between the pulses islong enough (or d is large enough) to not mix the pulses up, it is pretty straightforward to calculate the time differences. If not, which occurs most of the time,multiple samples of the received signal must be used, compared and averaged toestimate τ21.

Cross-correlation

A cross-correlation looks at the similarity of two different signals. One signal isdenoted as a reference signal whereas the other is the same signal but includinga time displacement as well. The signals are measured by two different sensors,where the reference signal originates from a reference sensor. The displaced sig-nal originates from another sensor, located at a known distance d from the ref-erence. The measurement at the reference sensor x1, containing the signal s canthen be denoted as

x1(t) = A1 ·s(t) +n(t). (2.4)

The corresponding measurement x2 at the other sensor, which contains the timedisplacement τ , can then be described as follows

x2(t) = A2 ·s(t − τ) +n(t). (2.5)

For these equations n(t) denotes measurement noise, A1 and A2 are signal am-plitudes. The objective is to find the time displacement τ , which correspondsto the relative time difference of arrival between the two sensors. The displace-ment is obtained by correlating the two signals for different displacements. The

Page 20: Positioning and tracking of target drone

10 2 Theory

correlation peaks at the location for the correct displacement, thus the estimatedtime difference τ . The cross-correlation can be summarised into the followingequation

Rx1,x2(m) =

1N

N−1∑n=0

s(m)s(n+m) (2.6)

where N represents number of samples [1]. The angle α can then be calculatedaccording to Equation 2.3.

2.1.5 Interferometry

When the distances d between the antennas must be short, and the TDOA there-fore can be hard to implement, interferometry can be a good alternative. A draw-back of interferometry is the troublesome ambiguity situation if d is greater thanhalf the wavelength, λ/2, of the incoming signal. This is in addition to the fun-damental ambiguity. In Hunting Drones with Other Drones [22] they used afrequency of around 900 MHz, and therefore a wavelength of approximately 33centimetres and half a wavelength of 16.5 centimetres. Depending on the size ofthe drone and used frequency it is possible to have a longer distance between theantennas than half the wavelength and the ambiguity requires therefore furtherexplanation.

Interferometry uses the phase difference between the received signal in only onesample. The true phase difference, Ψ21, is defined as follows

Ψ21 = 2πdsinαλ

(2.7)

given that two antennas are used. Ψ21 can both be positive, negative andseveral multiples of 2π if the quota d/λ ≥ 0.5 . The phase difference, φ21, is easierto estimate by the following equation

φ21 = Ψ21 +n ·2π (2.8)

where n is an integer that gives φ21 a value inside the interval −π < φ21 ≤ π.Combining Equation 2.7 and Equation 2.8 gives Equation 2.9 for the direction ofthe incoming wave can be defined as

α = arcsin

φ212π −nd/λ

. (2.9)

Keeping the distance between the antennas smaller than half a wavelength is auseful method to keep the ambiguity minimal, but a drawback is that the accu-racy of the phase detector decreases with decreasing d. To avoid ambiguity butkeeping a high accuracy it is possible to add an extra antenna, the distance be-tween the two first antennas will be smaller than half the wavelength and thedistance between the last and the first antennas will be longer. This is shown inFigure 2.7.

Page 21: Positioning and tracking of target drone

2.1 Positioning methods 11

Still there is the problem of the fundamental ambiguity of not knowing if thecorrect bearing is the estimated angle or the reflection of it over the antenna ar-ray (assuming a 2D environment). Like before this problem can also be solvedby adding more antennas. If unambiguity is of higher interest than accuracy (orif the antennas are placed with a short distance) it is enough to add just one an-tenna as shown in Figure 2.8a. Here the third antenna must not be placed onthe same line as antenna one and two. The thick line indicates the base pairs,antenna one together with antenna two and antenna two together with antennathree. Together these pairs estimate four directions, two of them in the samedirection indicating that that is the right angle.

d

d 1 si

n α

α

α

d1

Figure 2.7: The line-up uses three antennas to make sure the ambiguity isminimal but keeping the accuracy high.

In the case of a high demand on both accuracy and unambiguity it is possible toexpand to five antennas such as shown in Figure 2.8b. For symmetrical reasonsit is common to create a 90 degree angle between the line-ups.

Page 22: Positioning and tracking of target drone

12 2 Theory

1 2

3

(a) When using three anten-nas the fundamental ambi-guity is removed.

(b) Using five antennas re-moves the fundamental am-biguity and generates thepossibility to increase the ac-curacy.

Figure 2.8: Two different antenna line-ups.

2.2 Tracking

This section presents the required theory for tracking.

2.2.1 Model formulation

The first step which is needed for tracking is to identify a model which representsthe problem. For this kind of task a state space model is a common approachto formulate a model. A general formulation of the state space model can bedescribed as

sk+1 = f (sk ,uk ,wk) (2.10)

yk = h(sk ,uk , ek) (2.11)

where sk denotes the state at time instance k, uk is a known control input, ykdenotes the measurement at time instance k. wk and ek are process and measure-ment noise vectors. In some cases the control input, uk , is omitted dependingon the setup. sk holds data from the dynamic model. f denotes the state matrixand h denotes the observation matrix [15]. Depending on the hardware setup thestate sk could include the bearing and signal strength. This is what was assumedfor this project, the state formulation could then be summarised to sk = [βk ,vk]T

where βk denoted the relative bearing to the target with respect to the seekerdrone’s direction at time instance k [21]. vk represented the signal strength fromthe target for time step k. Other possible additions to the state is the distancebetween the seeker and the target at time instance k and the seeker’s heading foreach time instance. Furthermore, the relative velocity of the seeker with respectto the target at time each instance could also be of interest. This representationmakes sure that the movements of the target and data related to it are beingtracked properly [13].

Page 23: Positioning and tracking of target drone

2.2 Tracking 13

2.2.2 Error sources

One important error source is the noise, since hardware equipment and processnoise may arise it is crucial to know how to handle them. A process noise in thiscontext is an uncertainty which drives the state, sk+1, forward.

Firstly it is necessary to classify the noise, depending on if it’s white or coloured,Gaussian or non-Gaussian. The difference between a case where white noise isincluded compared to a case with coloured noise can be vastly different [25].

GPS offset

Introduction to GPS: The Global Positioning System, Second Edition [12] discussedclocks and the error generated by them. Each GPS satellite contains out of fouratomic clocks, two cesium and two rubidium. Only one of them is used, the otherthree are for backup. The clocks are accurate, but not perfect. The satellite clockerror is somewhere between 8.64 nanoseconds and 17.28 nanoseconds per day.This generates a corresponding range error of 2.59 meter to 5.18 meter.

In A sensitivity analysis of extended Kalman filter for GPS position estimation withand without clock offset [10] a test was performed where the different mean valuesof x-position error, y-position and z-position error were calculated for 22 hours.The mean for the x-position error was 1.28 meter, the mean for the y-positionerror was 2.34 meter and for the z-position error was 2.72 meter. Here it was alsoshown that knowledge of the clock error could minimise the error further.

The GPS offset affected this project when the algorithm was tried in practise. Dueto the fact that the outgoing signal from the target was simulated from the GPScoordinates, a few meters off could generate problems mainly when the droneswere close to each other.

Path loss factor

A sensor setup in practice rarely or never performs perfectly, the received mea-surements therefore include noise and error sources, such as the Doppler effect.Subsequently it is convenient to model the RSSI with these error sources in mindto obtain the correct measurement [25]. The path loss factor is an important fac-tor when modelling the propagation of the received signal strength. Moreover itis necessary when the distance to a target is estimated. The path loss representsthe attenuation between the transmitter and the receiver. The factor is relatedto environmental conditions as well as the hardware setup and subsequently, de-termines the intensity of the received signal strength. If the hardware setup andthe environmental conditions are known the path loss factor can be predicted [2].

As the seeker drone moves along a certain path the environment changes withit, this constant change affects the path loss factor as well. Therefore it is of greatimportance to model the path loss according to these changes and then apply it

Page 24: Positioning and tracking of target drone

14 2 Theory

to the measured data [25]. A generalised equation for the path loss, Lp, can beformulated as follows which is the Friis equation formulated in logarithmic units

Lp[dB] = Pt[dBm]− Pr [dBm] +Gt[dB] +Gr [dB] (2.12)

where Pt and Pr denote the transmitter and receiver powers. Gr and Gt denote thereceiver and transmitter antenna gains [2]. As already mentioned the path loss isof importance when measuring the signal strength with antennas. In this projecthowever, no antennas were used and consequently Gr and Gt were omitted fromthe project scope.

2.2.3 Filters

In order to make a prediction for each time instance a filter is needed. Two dif-ferent filters were implemented in this project, the theory regarding them is pre-sented in this section.

Kalman filter

The Kalman filter is a sequential recursive minimum mean square error estima-tor that allows the estimation of s[n], based on the data {x[0],x[1], ...,x[n]} as nincreases. This filter estimates s[n], which is based on the previous estimations[n − 1]. The filter’s state equation and the filter’s observation equation are asfollows

s[n] = as[n− 1] +u[n] (2.13)

x[n] = s[n] +w[n] (2.14)

where u[n] and w[n] are zero mean Gaussian noise with independent samplesand E(u2[n]) = σ2

u and E(w2[n]) = σ2w. a is the control input, if there is any pre-

known information about the situation a can be used for this. For example, if theKalman filter is used for estimation of the height of a drone when it is landingand it is known that for each sample the drone should drop approximately 25%,a = 0.75 would be reasonable. Furthermore, it is assumed that s[−1] =N (µs,σ2

s ).A summation of the Kalman filter equations are shown below [19]

Prediction:s[n|n− 1] = as[n− 1|n− 1] (2.15)

Minimum Prediction Mean Square Error:

M[n|n− 1] = a2M[n− 1|n− 1] + σ2u (2.16)

Page 25: Positioning and tracking of target drone

2.2 Tracking 15

Kalman Gain:

K[n] =M[n|n− 1]

σ2w +M[n|n− 1]

(2.17)

Correction:s[n|n] = s[n|n− 1] +K[n](x[n]− s[n|n− 1])) (2.18)

Minimum Mean Square Error Matrix;

M[n|n] = (1−K[n])M[n|n− 1] (2.19)

where the indexes are as follows [time index | measurement index]. M[n] is theminimum mean square error when s[n] is estimated based on the previous dataand K[n] denotes the Kalman gain.

The first time the filter runs initial values for s[n − 1|n − 1] and M[n − 1|n − 1]are chosen.

Particle filter (PF)

One type of filter which has been widely used for localisation and prediction ofmoving platforms is the particle filter, PF. The PF provides an approximation ofthe state sk based on a set of samples, so called particles which all have individualweights, wk [15]. In this project the state sk denoted the relative bearing and thesignal strength. A general outline of the PF is stated below [4].

Algorithm 1 Basic outline of a particle filterInput Particle weights wk−1, model state sk−1, measurements ykOutput New model state s∗k , particle weights wk

1: for all particles i do2: Draw a particle i from sik3: Assign particle i a weight wik4: end for5: Calculate total weight t =

∑iw

ik

6: Normalise weights wik according to t−1wik7: Calculate Nef f =

∑wik

2

8: if Nef f less than threshold then9: Resample

10: end if11: Estimate new model state s∗k12: Update particle weights wik and particle states sik

Page 26: Positioning and tracking of target drone

16 2 Theory

The assigned weight wik for particle i is defined as follows

wik|k ∝ wik−1|k−1p(yk |sik−1) (2.20)

where yk is the measurement, wik−1|k−1 is particle i’s weight from the previous

time step k − 1. p(yk |sik−1) is the probability density function. Index i denotesthe particle i and k denotes the time and measurement index [14]. The drawingof particles from sik was generated from the state model and was calculated asfollows

sik = a ·sik−1 − b · βk (2.21)

where βk denoted the measured velocity for the relative bearing β. a andb were constants specified for the model. The measurement equation was thencalculated accordingly

yk = sik . (2.22)

The calculation of sik followed the same pattern for the signal strength. Theequation describing the drawing was outlined as follows

sik = sik−1 − vk (2.23)

where vk denoted the measured velocity for the signal strength. The measure-ment yk was then calculated such that

yk = sik . (2.24)

2.2.4 Resampling methods

There are different methods for resampling particles of a Particle filter, howeverthe main objective is to eliminate particles with low probability and maintainthose with high probability. Depending on the application some resamplingmethods work better than others. It is important that the resampling keeps thebalance between maintaining diversity and at the same time keeping the compu-tational complexity down. There are in general four basic resampling strategies;multinomial resampling, stratified resampling, systematic resampling and resid-ual resampling [18]. The general outline of these methods is presented below.

All of the resampling strategies presented in this section are modifications ofa weighted approximate density. The modifications generate an unweighted den-sity. The reason to make it unweighted is due to the elimination of particles withlow probability. As particles of low importance are removed, particles of highimportance are multiplied. Thus, the indices in a vector where low probabilityparticles were held are replaced with particles of high probability. This state-ment can be summarised into the following equation, where pN is the weightedapproximate density and pN is the unweighted density. pN is defined as

Page 27: Positioning and tracking of target drone

2.2 Tracking 17

pN (x) =N∑i=1

wiδ(x − xi) (2.25)

and is replaced by pN , which can be described as

pN (x) =N∑k=1

1Nδ(x − x∗k) =

N∑i=1

niNδ(x − xi), (2.26)

here ni is the number of copies of the high probability particle xi [17].

Multinomial resampling

The multinomial resampling method is one of the most basic resampling meth-ods. Simply put, it consists of drawing new indices from [1,N ] where N is anon-random integer. The drawing acts independently of the existing approxi-mate weighted density pN . A more hands on implementation of this strategy ispresented below [8].

1. Draw an independent, random uniform number uk ∼U i1≤i≤n from an inter-

val (0, 1]

2. Assign index i a value according to Qi−1 < uk ≤Qi where Qi =∑is=1ws

3. Select x∗k according to x∗k = x(F−1(uk)) = xi

Here F−1(uk) denotes the inverse of the cumulative distribution function basedon the normalised particle weights [17]. x∗k is the new resampled particle state.Item 3 in the list above is utilised for all subsequent resampling methods pre-sented below. The main difference between these resampling techniques is howthe uniform number uk is selected. The resulting drawing of uk and how it differsdepending on the resampling method is illustrated below in Figure 2.9.

Stratified resampling

Stratified resampling consists of generating N subsets in the interval [0,1). uk isthen drawn independently in each of these subsets [8]. The method for selectingthe elements in uk is summarised in the following equation

uk =(k − 1) + uk

N, where uk ∼U [0,1) (2.27)

where N denotes amount of ordered random numbers. The elements in ukwill all lie separately within their respective subset, thus one subset will only beoccupied by one element. Furthermore, all elements in uk has a value inside ofthe range [0,1). Thereafter x∗k is selected according to item 3 in the list from theparagraph about the multinomial resampling, which is presented above. Conse-quently, x∗k is the new resampled particle state.

Page 28: Positioning and tracking of target drone

18 2 Theory

Systematic resampling

As for systematic resampling it follows the same pattern of generating N subsetsas for stratified resampling. Namely, it generates subsets in the interval (0,1] anddraws uk independently according to Equation 2.27. However, systematic resam-pling deviates from the stratified resampling by the means of that the generatedelements in uk are not randomly ordered. The difference between systematic andstratified resampling is depicted in Figure 2.9, which is presented below.

When the procedure of drawing uk is finalised, x∗k is then selected according toitem 3 in the list from the paragraph about the multinomial resampling, which ispresented above. x∗k is now the new resampled particle state.

Residual resampling

Residual resampling differs slightly from the previously mentioned resamplingtechniques. This resampling strategy can be combined with any of the other pre-sented resampling techniques above. In residual resampling, the first step is todetermine how many copies, n

′i , of a particle xi that should be retained. This is

done by using its weight, wi , such that

n′i = bNwic (2.28)

where N is the total number of particles. The brackets in Equation 2.28 takethe integer part of Nwi . Thence, a portion of these n

′i particles are resampled.

How large the portion is is determined by m, which is defined as

m =N −∑

n′i . (2.29)

The resampling is then executed such that a new set of copies, n′′i , is generated

where the probability to select xi equals the new weight w′i = Nwi − n

′i . In other

words, w′i is assigned the decimal part of Nwi . The selection of xi can be per-

formed using any of the presented resampling methods above. More plainlyspeaking, w

′i replaces ws in item 2 from the list from the paragraph about the

multinomial resampling. Consequently xi replaces x∗k item 3. uk is selected ac-cording to the chosen resampling technique.

A more illustrative demonstration of how these different resampling methodswork is presented below in Figure 2.9. The dots in the figure illustrate how theuniform numbers in uk are selected depending on the resampling method. Fromthe figure it is evident that the stratified and systematic resampling have similarsubsets for selecting uk . However, it is also clear that the stratified method picksuk randomly within each subset. This is not the case for the systematic resam-pling. The multinomial resampling draws uk randomly in the interval [0,1). Thisis also evident in the picture since the subsets seem to have no effect on the draw-ing.

Page 29: Positioning and tracking of target drone

2.2 Tracking 19

Systematic resampling was implemented for this project in order to eliminatethe particles with low probability. The reason why systematic resampling wasselected was due to its low computational complexity in relation to the numberof particles [17].

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0

0.5

1

1.5

2

2.5

3

MultinomialStratifiedSystematic

Figure 2.9: Three different uniform samples uk , generated from three resam-pling techniques; multinomial resampling, stratified resampling and sys-tematic resampling.

2.2.5 UAV flight controller

The UAV controller addresses the task of using the estimated data from the filterto form a motion control for the seeker UAV.

One simple approach is to turn the seeker drone to the estimated bearing of thetarget drone and to stop if the estimated signal strength gets too high, to avoida collision. A high signal strength implies that the seeker and target drone areclose to each other.

Page 30: Positioning and tracking of target drone

20 2 Theory

Another method for calculating the motion control for a UAV is described in Sec-tion 2.2.6 where the Markov Decision Process is explained.

2.2.6 Optimality criterion

In this section different methods are described for finding optimality.

Monte Carlo simulations

Monte Carlo simulations consist of performing a repetitive simulation for a seriesof realisations. One simulation includes M realisations, all of them are indepen-dent and of length N . More accurately, it can be concentrated to the followingformula

A =1M

M∑i=1

xi[n], (2.30)

where x[n] = A+w[n] is a vector of length N and with mean A. w[n] is a whiteGaussian noise of length N . This method requires that a new x[n] is computedfor each realisation [19]. Monte Carlo simulations are useful in several aspects,in the formula above it is used to compute an estimator. Moreover, it can beused to evaluate the performance of a method [33]. However, the drawback isas stated previously, the method requires a new and independent realisation foreach instance i. In some cases this can lead to expensive computations which canbe avoided if the problem can be downsampled sufficiently [22]. In this projectMonte Carlo simulations were used to evaluate the algorithm and to decide dif-ferent constants used in the algorithm.

Markov decision process (MDP)

A Markov Decisions Process, MDP, is a process of finding an optimal policy π∗

that minimises the cost function c(sk+∆k) for a time horizon T . The cost functionis a function of the state, where the new state sk+∆k is generated from the modelformulation using input uk . Thus each state is mapped to an action. Here uk isan action from an action space U . The objective is to minimise the expected totalcost, π∗(sk), to time horizon T such that [23]

π∗(sk) = argminuk

E

T∑t=0

c(sk+t∆k)

. (2.31)

Here E denotes the expected value of the summed cost function c. Now followsan example from [22] where a cost function was designed to penalise the seekerdrone if it got too close to the target. The implementation formulated a costfunction as

c(sk) = λE{||seeker pos. - target pos.|| < d

}(2.32)

where d was a pre-determined threshold. The condition within the expectationequalled 1 if its argument was true, otherwise 0. The weight λ decided the trade

Page 31: Positioning and tracking of target drone

2.3 Noise distribution 21

off between the tracking and the collision avoidance. The higher λwas, the largerpenalisation for near collisions. In this project the MDP was used as one of twodifferent UAV controllers. A thoroughly description of how this automatic con-troller was implemented can be found in Section 3.4.1.

2.3 Noise distribution

In this section the noise distributions that were of interest for this project arepresented.

2.3.1 Student-t distribution

The noise of the bearing is assumed to be Student-t distributed [20]. This distri-bution is quite similar to a Normal distribution, except that the probability ofgetting a value further away from the mean is higher. The probability densityfunction is stated as follows

f (x|ν) =Γ (ν+1

2 )Γ (ν2 )

1√νπ

1

(1 + x2

ν )ν+1

2(2.33)

where v is a design parameter and denotes degrees of freedom. The gammafunction, Γ , is as follows [7]

Γ (n) = (n− 1)! =

∞∫0

tn−1et dt (2.34)

where n is any positive integer [6]. Figure 2.10, which is presented below,shows the probability density function of the Student-t distribution with twodifferent degrees of freedom and a standard Normal distribution. Parameter vdenotes the degrees of freedom for both the figure and the equation.

The student-t distribution was used in this project to simulate bearing noise. Thenoise was added to the calculated bearing, that originated from the target andthe seeker drone’s exact positions (neglecting any GPS-error).

Section 3.5.2 contains a detailed explanation of the test framework setup for thebearing.

Page 32: Positioning and tracking of target drone

22 2 Theory

-5 0 5Observation

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Pro

babi

lity

Den

sity

Student's t and Standard Normal pdfs

Student's t Distr. with =3Student's t Distr. with =1Standard Normal Distr.

Figure 2.10: Two probability density functions of the Student-t distributionand one probability density function of a Normal distribution.

2.3.2 Rice distribution

The noise of the signal strength is assumed to be Rice distributed, since the setupbetween the two drones assumed line of sight. This means that the signal has noor very low multi path propagation [32]. The probability density function for aRice distribution is defined as follows

f (x|v,σ ) =x

σ2 e−(x2+v2)

2σ2 I0

(xvσ2

)(2.35)

where v is set according to

v =1r2 . (2.36)

Here r is the distance between the drones and I0(z) is the modified Besselfunction of zeroth order [9]. The Bessel function In(z) is defined according to thefollowing equation

In(z) =zn

2nn!

[1− z2

2(2n+ 2)+

z4

2·4(2n+ 2)(2n+ 4)− ...

](2.37)

where n denotes the order of the function [5].

Page 33: Positioning and tracking of target drone

2.3 Noise distribution 23

The probability density function of the Rice distribution is shown in Figure 2.11aand 2.11b. Figure 2.11a contains three probability density functions for differ-ent v but where σ is constant. Figure 2.11b contains three probability densityfunctions for different σ but where v is constant.

0 2 4 6 8Observation

0

0.1

0.2

0.3

0.4

0.5

0.6

Pro

babi

lity

Den

sity

Rice pdf with = 1

Rice Distr. with =0Rice Distr. with =2Rice Distr. with =4

(a) σ = 1 where v is set to 0, 2 and 4.

0 2 4 6 8Observation

0

0.1

0.2

0.3

0.4

0.5

Pro

babi

lity

Den

sity

Rice pdf with = 1

Rice Distr. with =1Rice Distr. with =2Rice Distr. with =3

(b) v = 1 where σ is set to 1, 2 and 3.

Figure 2.11: Rice probability density function

The Rice distribution was used to simulate signal strength noise. The noise wasadded to the simulated signal strength, that originated from the target and theseeker drone’s exact positions (neglecting any GPS error).

Section 3.5.1 contains a detailed explanation of the test framework setup for thesignal strength.

Page 34: Positioning and tracking of target drone
Page 35: Positioning and tracking of target drone

3Method

In this chapter the methods used in order to answer the research questions arepresented.

3.1 System overview

The project was divided in two parts, firstly all the code was tested and simulatedon the computer, a theoretical test. The next step was to try the code in practicewith drones. Each of these two parts was divided in three sub parts, namelysimulation, tracking and heading adjustment. These three steps are explained inthis chapter.

1. Theoretical test on computer

• Simulation of signal

• Tracking of position

• Heading adjustment of drone

2. Practical test with drones

• Simulation of signal

• Tracking of position

• Heading adjustment of drone

In Section 1.4 it is mentioned that one of the limitations was that no antennaswere used, neither for the theoretical or practical tests. Therefore the first step inthe algorithm was to simulate the bearing and signal strength. When doing thistheoretically the signal strength and bearing were calculated from the positionsof the drones. To make the test more realistic, a significant amount of noise was

25

Page 36: Positioning and tracking of target drone

26 3 Method

applied. In practice the drones built-in GPS position were used to get the positionof the drones, thereafter the process was similar to the theoretical test, calculatethe signal strength and bearing and apply a significant amount of noise. In thisproject it was assumed that the offset of the GPS systems could be neglected.

The simulated noisy signal strength and bearing were sent to a tracking algo-rithm. The tracking algorithm was supposed to estimate the correct signal strengthand bearing, in other words, to remove the noise. Two different tracking al-gorithms were tested and evaluated, one used a Particle filter and one used aKalman filter. The implementation of the tracking algorithm is further discussedin Section 3.3.

The last step of the whole algorithm was the steering control. The task of thesteering control was to change the direction and move the seeker drone to thedirection of the target drone and to make sure the seeker drone took a smoothpath. For each time the steering control algorithm was executed it generated aposition the seeker drone was supposed to go to. In the theoretical test it gener-ated a position close to the seeker drone and in a perfect computer environmentthe simulated drone moved to that point exactly. The generated position wasclose to the seeker drone to mimic an actual movement. If the position wouldhave been far away then it would not have been realistic, since the drone couldnot have reached the specific position in such a short amount of time. In practice,with real drones, it was not possible to send a position close to the seeker drone.The drone would think it already was at that position and stayed still. This wasdue to a margin in the drone’s GPS where it omitted positions which were withina radius of approximately five metres. Instead a position further away but in theright direction was sent, and before the drone reached that position a new posi-tion was sent, creating a smooth path.

For both the tracking algorithms two different steering controls were tested andevaluated. One steering control built on a Markov Decision Process and the otherone, a more simple one, just turned to the estimated bearing.

A summary of the system overview is shown in Figure 3.1.

Simulation TrackingAlgorithm

SteeringControl

Bearing andSignal Strength

Particle Filter

Kalman Filter

Markov Decisionprocess

Turn to estimatedbearing

Figure 3.1: Line up for the project.

Page 37: Positioning and tracking of target drone

3.2 Setup 27

3.2 Setup

Two different setups for the estimation of the seeker and target positions wereimplemented. One of the setups used a global coordinate system only, whereasthe other used both a global and a local coordinate system. In the end only thelast setup was used.

3.2.1 Global coordinate system setup

This method made use of only one global coordinate system where the seeker andtarget positions were defined according to this system, see Figure 3.2.

α[n]

α[n-1]

Target at timestep [n-1]

Target at timestep [n]

Movement ofseeker at time

step [n-1]

Global x axis

Global y axis

ϕ[n]

Figure 3.2: Illustration of the setup of the global coordinate system method.

In this setup two different angles were utilised in order for the seeker to estimatethe position of the target, the relative bearing α and the world bearing φ. Theworld bearing φ was the angle between the seeker’s world east, or the x axis, andthe direction to the target. The relative bearing was the angle between the pre-vious direction to the target and the current direction to the target, with respectto the seeker. In the first time step the relative bearing was assumed to be zerowith respect to the world east, or x axis. The world bearing was calculated asa summation of all previously estimated relative bearings. The world bearingcombined with the estimated signal strength were used to calculate the targetposition. The estimated relative bearing was used as an input to the automaticcontrollers. The cumulative property of the setup showed to be a weakness where

Page 38: Positioning and tracking of target drone

28 3 Method

the error increased and when the standard deviation had a value of 20 the systemcompletely broke down. More of this is found in Section 4.1.

3.2.2 Global and local coordinate system setup

This setup used two coordinate systems, one global and one local and can beseen in Figure 3.3. The global coordinate system did not change while the dronesmoved. The local coordinate system was normalised in the meaning that local yaxis always followed the seeker drone’s direction. The relative bearing β was theangle between the local y axis and the target drone.

Global x axis

Global y axis

Local x axis

Local y axis

β

Figure 3.3: Illustration of the setup with a local and a global coordinatesystem.

3.2.3 Conversion of GPS data to Cartesian coordinates

The positional data yielded from the GPS was the latitude, longitude and alti-tude, which can be summarised as World Geodetic System 1984 (WGS84) data.To obtain global coordinates this data had to be converted to a Cartesian coordi-nate system. The positional data was converted to Rikets koordinatsystem 1990(RT90) data which is the coordinate system used for governmental maps in Swe-den. The coordinates were calculated according to the Gauss-Krüger projectionwith local mean meridians [24].

3.3 Tracking

For the tracking part different predefined paths for the target were used in orderto check and verify the filters. As the seeker and/or target moved, the simulated

Page 39: Positioning and tracking of target drone

3.3 Tracking 29

relative bearing and signal strength were calculated according to the new posi-tions. To each simulated observation an observation noise was added to mimican authentic scenario. The simulated observation also yielded true data, whichwas the simulated data without noise. The true data was used for the evaluationof the filters.

3.3.1 Kalman Filter

The Kalman filter was implemented according to the summary in Chapter 2.2.3,the outline of the code is shown in the pseudo code below

Algorithm 2 Scalar Kalman Filter for estimation of bearingInput Bearing signal β, scalar for amplification of filter m, variance σw, vari-

ance σu , scalar aOutput Estimated bearing β

1: Initialise β2: Initialise M3: while Incoming β do4: β = a · β5: M =

√a ·M + (m ·σw)

6: K =M/(σu +M)7: Update β→ β +K · (β − β)8: Update M→ (1−K)M9: end while

The scalarm affected the Kalman filter in the way that a higher value would makethe filter more prone to follow the noisy signal. A low value could, on the otherhand, take time to stabilise. If the signal was not noisy or made quick changesit was a good idea to have a higher value on m, a noisier signal benefited from alower value. To optimise the result of this project, Monte Carlo simulations wereused to find the best value for m during different circumstances.

If there was any pre-known information about the situation the scalar awas usedfor this. In this project, when a seeker drone followed a target drone that took anunknown path, a was set to 1. There was no pre-known information.

For this project Algorithm 2 estimated the bearing β and the same code was usedfor the estimation of the signal strength. In the signal strength case the β wasreplaced with S and β with S.

3.3.2 Particle Filter

The Particle filter was implemented according to the algorithm of the basic out-line of a Particle filter in Section 2.2.3.

Page 40: Positioning and tracking of target drone

30 3 Method

As a first stage the noises were defined for the bearing and the signal strength,where their respective distributions were set according to the Student-T and theRice distributions. The particles were initiated with a normalised weight wherethe sum of all weights equalled 1. The initial state for the bearing of each particlewas Student-T distributed with 5 degrees of freedom. For the signal strength theinitial state was Rice distributed where the design parameter v was set accordingto the estimated distance. When the distance was large v was set according to alarge noise, when the distance was short v was set according to a small noise.

The outline of the resampling made use of a cumulative summation for all ofthe particle weights at the current time step k, a cumulative distribution function(CDF). A temporary vector representing the weights of the particles was used andcompared to the CDF. The temporary vector consisted of values in increasing or-der from 0 to 1, where the last position held a weight with a value close to 1. Theoutline of the systematic resampling method is described below. The resampled

Algorithm 3 Systematic resamplingInput Particle weights wk , model state skOutput Resampled model state sresj , resampled particle weights wresj

1: Create CDF c2: Create temporary vector u3: Set u0 ∼U [0, 1

Ns]

4: Set i = 05: for all particles j do6: uj = u0 + (j − 1) 1

Ns7: while uj > ci do8: i = i + 19: end while

10: Assign sresj = si11: Assign wresj = 1

Ns12: end for

states sresk were the states which were used in the Particle filter for future timesteps k +∆. The relation between the CDF and the particle weights is illustratedin Figure 3.4.

3.4 Flight control

For the flight controlling two different methods were implemented. One of themsimply moved according to the relative bearing. The other one was based ona Markov Decision Process where different control inputs were explored. Theinputs to the controllers were the estimated relative bearing and signal strengthobtained from the tracking filters.

Page 41: Positioning and tracking of target drone

3.4 Flight control 31

w0 w1 wN...............

...............

CDF

Weight

0

1

Prob

abilit

y

Particle weights

Figure 3.4: Generation of a cumulative sum using the weights from a particlefilter.

Page 42: Positioning and tracking of target drone

32 3 Method

3.4.1 MDP controller

For the MDP controller eight different inputs were explored for a time horizon offour time steps. The resulting optimal policy from the MDP selected the controlinput which yielded the smallest cost, given a certain state. The cost functionused for this purpose was stated as follows

c(sk) = ||target pos. in next time step - seeker pos||. (3.1)

The optimal policy was designed according to the following equation

π∗(sk) = argminuk

T∑t=0

c(sk+t∆k). (3.2)

The seeker position was updated in a loop for each new propagation towards thetime horizon, given one of the eight control inputs. The control inputs consistedof varying the bearing in the interval [−20◦, 20◦] with respect to the estimatedrelative bearing at time step k. The target position in Equation 3.1 was the pre-dicted target position for the next time step k+ 1 given the last and second to lastestimated target positions. A linear equation for these two previous positionswas calculated in order to obtain the predicted position. The seeker position inthe same equation was the current seeker position for the current time index t.The seeker position was then updated after the optimal policy and the collisionhandling.

3.4.2 Relative bearing controller

Compared to the MDP controller, this method was much simpler. With thismethod the seeker moved according to the estimated relative bearing. In prac-tice this meant that the seeker drone rotated and headed toward the target droneaccording to the latest estimated relative bearing.

3.4.3 Collision handling

The collision detection and handling commenced right after the automatic con-trolling process ended. Firstly the detection checked if the distance between theseeker and the target, given the chosen steering instruction from the automaticcontrolling process, exceeded threshold d1 and d2. If that was the case then theseeker should act according to the steering decision. If the distance betweenseeker and target exceeded d1, but did not exceed d2, then the chosen steeringshould not be acted upon. Instead the seeker should then remain at the sameposition as before. If the chosen steering instruction resulted in a distance whichdid not exceed threshold d2 nor d1, then the seeker should move backwards. Anillustration of the thresholds is depicted in Figure 3.5.

Page 43: Positioning and tracking of target drone

3.5 Test framework setup 33

Target

d1

d2

Figure 3.5: The thresholds d1 and d2 for the collision handling of seeker andtarget.

3.5 Test framework setup

In both the theoretical and practical tests the bearing and signal strength wereestimated. For both cases the systems were tested in different settings. What hap-pens if the outgoing signal from the target drone is weak? What happens if the(imaginary) antennas on the seeker drone work poorly? Together with expertsat the Swedish Defence Research Agency (FOI) we generated two models to simu-late the problems above. The model for the signal strength is discussed in Section3.5.1 and the model for the bearing is discussed in Section 3.5.2.

3.5.1 Test model for signal strength

As mentioned in Chapter 2.3.2 the noise distribution for the signal strength wasassumed to be Rice distributed. Different amounts of noise were used to simulatedifferent amount of outgoing signal strength from the target drone. The amountof noise on the signal also depended on the distance between the drones. Forboth the problems Rician fading was used. The Rician fading used the parameterK to illustrate the ratio between the power of the LOS component and the otherscattered paths. Different intervals of K were used to simulate different amountof outgoing signal strength from the target drone. The relation between K andthe variance of the noise σ2, is shown in the equations below. The variance wascalculated according to the following equation [29]

σ2 =v2

2K. (3.3)

The signal strength v, was defined as follows

Page 44: Positioning and tracking of target drone

34 3 Method

v =1r2 . (3.4)

Here r was the distance between the two drones. The K values could then becalculated accordingly,

K =v2

2σ2 . (3.5)

The variance was then used in the Rice distribution to calculate the noise forthe signal amplitude as shown in Equation 2.35.In this project the parameter K depended linearly on the distance between thedrones. A smaller distance generated a higher value on K and therefore a smalleramount of noise on the signal strength. The closest distance possible, namely 0meter, generated a K value that was 10 times higher compared to the greatestdistance. For this project the limit was 100 meters because of the wifi-range.When discussing this with our advisers at FOI we decided to test K-intervalsfrom 1 to 10 for strong noise and from 100 to 1000 for small noise.

Table 3.1: Summation of different K-intervals and how they relate to thesignal strength noise.

K-intervalSmall noise 100 - 1000Medium noise 10 - 100Large noise 1 - 10

Table 3.1 shows a summation of how different K intervals were used to simu-late different signal strength noises. Figure 3.6 shows how the K value changedlinearly depending on the distance between the two drones. TheK value is shownfor three different K-intervals.

To verify that the simulated noise behaved as expected, the error in distancewas examined in two different ways. The error in distance was the subtractionbetween two signals, namely the signal with applied noise and the same signalbefore applying the noise, the ground truth. This gave a geometric error in me-ters of how far the estimated position was from the exact position. Both testswere performed on a computer and the two drones were simulated.

During the first test the seeker drone followed the target drone three times. Inall three times the target drone flew the same path and the seeker started fromthe same position. It took the target drone a little over 350 samples to finish itspath. For this test setup there was no K interval, the value of K was constant anddid not depend on the distance between the drones. Three different values on Kwere used, K = 1, K = 100 and K = 1000. Figure 3.7 shows the error in distancefor these three tests. From this it is possible to see that the error decreases whenthe K increases.

Page 45: Positioning and tracking of target drone

3.5 Test framework setup 35

0 20 40 60 80 100Distance r [m]

0

200

400

600

800

1000

K-va

lue

K-value depening on distanceK-interval 1-10K-interval 10-100K-interval 100-1000

Figure 3.6: Shows how the K-value depended linearly on the distance r be-tween the two drones for three different noise settings.

0 50 100 150 200 250 300 350Sample

0.0

2.5

5.0

7.5

10.0

12.5

15.0

17.5

Erro

r in

dist

ance

Error in distance for different values KK = 1K = 100K = 1000

[m]

Figure 3.7: Error in distance between signal with noise and the signal with-out noise and three different values on K .

The goal of the second simulation test was to verify that the error decreased whenthe distance between the drone decreased. For this the K value changed linearlydepending on distance between 10 and 100. This K interval is shown in Figure3.6 as the orange line. The simulated drones started approximately 50 metersfrom each other, after 25 samples the distance was approximately 10 meters andafter hardly the 50 samples the distance was approximately 15 meters. Figure

Page 46: Positioning and tracking of target drone

36 3 Method

0 10 20 30 40 50

0.5

1.0

1.5

2.0

2.5

3.0

Error in distance [m]

Error in distance

0 10 20 30 40 50

Sample

10

20

30

40

50

Distance [m]

Distance between the dronesSample

0 10 20 30 40 50

0.5

1.0

1.5

2.0

2.5

3.0

Error in distance [m]

Error in distance

0 10 20 30 40 50

Sample

10

20

30

40

50

Distance [m]

Distance between the drones

(a)

0 10 20 30 40 50

0.5

1.0

1.5

2.0

2.5

3.0

Error in distance [m]

Error in distance

0 10 20 30 40 50

Sample

10

20

30

40

50

Distance [m]

Distance between the dronesSample

0 10 20 30 40 50

0.5

1.0

1.5

2.0

2.5

3.0

Error in distance [m]

Error in distance

0 10 20 30 40 50

Sample

10

20

30

40

50

Distance [m]

Distance between the drones

(b)

Figure 3.8: Two plots of a simulated test of ∼ 50 samples where the seekerdrone approached the target drone.(a): Plot of how the distance between the drones changed.(b): Plot of how the error in distance changed.

3.8(a) shows the distance between the drones for the described simulation. Fig-ure 3.8(b) shows the error in distance generated from the simulation. Likewiseas before, the error in distance is the subtraction between two signals, namelythe signal with applied noise and the same signal before applying the noise, theground truth. In the figure it is possible to see that the error in distance reducedfrom ∼ 3 meter to ∼ 0.5 meter depending on the distance of the drones. Impor-tant to mention is that the error not only depended on the value K but also onthe signal strength, that grew stronger when the drones moved closer.

From these two examinations the conclusion was drawn that the error dependedon different K intervals (Figure 3.7) and that the error also depended on the dis-tance between the drones (Figure 3.8).

Page 47: Positioning and tracking of target drone

3.5 Test framework setup 37

3.5.2 Test model for bearing

The test model for the bearing consisted of varying the bearing variance. Sincethe bearing has a Student-T distribution consequently its shape depends on thevariance. The variance for the Student-T distribution is stated as follows [26]

vb =υ

υ − 2. (3.6)

υ denotes the degrees of freedom, which was set to 5. The bearing noise was gen-erated by a Student-T random number generator. The random number generatortook one argument v, which was the degrees of freedom. Consequently, the noiselevel would be constant since the degrees of freedom was set to a constant value.Furthermore, the variance vb would take a constant value of 3

5 . This was not de-sirable since the noise levels needed to be varied in order to test the system withdifferent amounts of noise. Thus, a scaling factor had to be applied to the ran-domised number, the noise to be more exact, in order to vary the noise accordingto the bearing. The scaling factor, which is denoted as x in the following equation,was designed as follows

x2 ·υ

υ − 2= vb. (3.7)

By solving the equation and replacing υ with 5, x could then be described asfollows

x =

√35vb. (3.8)

To verify that the error changed according to the bearing variance, the absoluteerror in bearing was examined. The absolute error in bearing is the absolute valueof the difference between the correct bearing, the ground truth, and the estimatedbearing. For this a simulation was created where the target drone followed thesame path and the seeker drone started from the same position. The simulationwas approximately 350 samples long. Three different variances were tried, σ2 = 1,σ2 = 10 and σ2 = 20. For each variance the mean of a thousand simulations wastaken. The result of this examination is shown in Figure 3.9.

Page 48: Positioning and tracking of target drone

38 3 Method

0 50 100 150 200 250 300 350Sample

0

2

4

6

8

10

12

14

16[D

egre

es]

Error in bearing for different variancessigma = 1sigma = 10sigma = 20

Figure 3.9: Absolute error in bearing for different values on σ2.

3.6 Practical tests

In this section a description of the methods for the practical tests is presented.

3.6.1 Simulation of bearing and signal strength

For the practical tests no antennas were used, instead the bearing and signalstrength were simulated. The simulation in this practical stage was executedwith the GPS coordinates of both the target and the seeker. From the GPS coordi-nates a hypothetical observed relative bearing and signal strength was calculated.To these calculations noise was added to make the simulated data resemble morelike an actual antenna observation.

The GPS setup consisted of two GPS units, one mounted on the seeker droneand the other on the target drone. The GPS units communicated via a WiFi router.The WiFi router had a maximum range of 50 meters. The drones therefore neededto be located within a radius of 50 meters with respect to the WiFi router. To ex-tend the range even further a network of access points could be used.

3.7 Hardware setup and software programs

Both drones were equipped with a Pixhawk 4 flight controller with the open-source code ArduPilot. Each of the drones also had a computer on board, a Rasp-berry Pi model B with 2 GB ram memory loaded with 32 GB memory cards. These

Page 49: Positioning and tracking of target drone

3.7 Hardware setup and software programs 39

computers were connected to the Pixhawks and executed the code generated inthis project. The Raspberry Pis ran the operating system Raspberry Pi OS andthe generated code was programmed in Python 2.7. The Table below shows thedifferent Python libraries that were used in this project.

Python library UsageNumPy Arrays and common mathematical operationsSciPy Probability distributionsmath The mathematical constant pimatplotlib Generating figuresDroneKit Communication with Pixhawk via a MAVLink protocolSocket Communication between the drones

The Raspberry Pis were able to communicate with each other through WiFi andfor this an ASUS Dual Band Gigabit Router was used.

Page 50: Positioning and tracking of target drone
Page 51: Positioning and tracking of target drone

4Results

This chapter presents the results from the theoretical and practical stages.

4.1 Coordinate system setups

The coordinate system setup which only consisted of one global coordinate sys-tem did perform reasonably well for small standard deviations for the relativebearing. However, when the standard deviation increased and its value was largerthan 10, the global coordinate system started to malfunction. When the standarddeviation had a value of 20 the system completely broke down which resulted inrelative bearings with an error of 180 degrees.

The other setup which used both a local and a global coordinate system per-formed satisfactorily, for a standard deviation value of 20 the system still man-aged to keep up with target’s movements. This coordinate system setup is thesetup which was used throughout the simulated tests and the practical tests.

4.2 Antenna configuration and positioning method

Even though no antennas were used in the practical tests it is still possible to dis-cuss the antenna configuration. If antennas were used, multiple antennas wouldhave been mounted on the seeker drone so it would be able to recognise the radiosignal that the target drone sent to its control station on the ground. The distancerange between the drones in this project was 100 meters since this was the rangeof the access points that were used to make sure that the drones could commu-nicate with each other. If an antenna configuration was used this limit would bemuch greater and instead depend on the signal strength, the quality of the anten-

41

Page 52: Positioning and tracking of target drone

42 4 Results

nas and the radio receivers.

A TDOA configuration might not be the most optimal since the distance betweenthe antennas mounted on the seeker antenna would be small and therefore thetime differences would consequently be small as well. Possibly, the time differ-ences could be of such small size that it would be cumbersome to distinguishdifferences in distance. Consequently, a TDOA configuration is slightly imprac-tical for this project. However, it could be useful if multiple seeker drones wereused to create a larger distance between the antennas.

As stated in Chapter 2 an alternative to TDOA is interferometry. Since the dis-tance between the possible mounted antennas would be fairly small an interfer-ometry approach is more suitable. An interferometry implementation yields bothan angle and a received signal strength indication. With an angle and a signalstrength it would be rather straightforward to estimate the position of the targetdrone, given that the distance r could be described as

r ∼ 1√v

(4.1)

where v is the received signal strength.

To obtain precise measurements a large set of antennas would be ideal, howeverthis setup is highly unreasonable and impractical on a small drone. A more fea-sible setup would consist of three antennas mounted on the drone. To only settlefor two antennas would yield a reasonably good bearing estimation, although itwould include a fundamental ambiguity as well. A problem like that could onthe other hand be solved by performing triangulation or making the seeker ini-tially move according to a predefined path. This solution would be more timeconsuming. It would also be unreasonable if the target moves quickly. A moretime efficient solution would be to add more antennas without making the dronesignificantly heavier.

4.3 Tracking

In this section the results from the tracking is covered.

4.3.1 Kalman filter

Multiple initial tests were executed to find the best value of m described in Algo-rithm 2, these results are presented in Figure 4.1a and 4.1b.

Figure 4.2 shows how the Root Mean Square Error (RMSE) of the bearing andthe signal strength changed when the variance of the noise applied on the sim-ulated bearing increases. For this test the lower value of K was set to 100 andthe higher value to 1000. The Monte Carlo simulation ran 100 times for each

Page 53: Positioning and tracking of target drone

4.3 Tracking 43

variance. In the figure the RMSE of the signal strength remains unchanged, con-sequently the variance of the bearing has no impact on the signal strength.

Figure 4.3 shows how the RMSE of the bearing and signal strength changed whenthe lower value of K went from 1 to 100. The higher value was 10 times the lowervalue. The standard deviation of the bearing was set to 2 degrees and the MonteCarlo ran a 100 time for each K value. The corresponding signal strength rangedfrom 0.0001 to 0.25 depending on the distance between seeker and target.

0 20 40 60 80 100Lower K-value

20

40

60

80

100

120

140

Valu

e of

m

Value of m for different K-intervals, assumed from the lower K-value

(a) Value ofm for different K-intervals, the value on the x-axis is the lower value of the K-interval, where the uppervalue is 10 times the lower value.

0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0Variance

0

10

20

30

40

50

Valu

e of

m

Value of m for different variances

(b) Value of m for different variances.

Figure 4.1: Value of m for different variances and K-intervals. The value ofm was decided during Monte Carlo simulations.

Page 54: Positioning and tracking of target drone

44 4 Results

RM

SE [d

egre

es]

RM

SE [1

/m²]

Figure 4.2: An illustration of how the RMSE depended on the variance forthe Kalman filter.

Page 55: Positioning and tracking of target drone

4.3 Tracking 45

RM

SE [d

egre

es]

RM

SE [1

/m²]

Figure 4.3: An illustration of how the RMSE depended on the lower value ofK for the Kalman filter.

4.3.2 Particle filter

An initial test was executed for the Particle filter testing different numbers of par-ticles. The range was set from 2 particles to 100 with 50 Monte Carlo runs. Thestandard deviation of the relative bearing was set to 10. The K interval for theRice distribution was set to [100, 1000]. An illustration of the test result is shownin Figure 4.4.

In the plot in Figure 4.4 it is evident that the RMSE value of the bearing con-verged to a value of approximately 3 when the number of particles exceeded 4.The same convergence occurs for the signal strength. Based on this knowledgethe number of particles was set to 20 for the subsequent tests, which are pre-sented below.

Thereafter the same tests that were performed for the Kalman filter (the RMSE asa function of standard deviation) were also done for the Particle filter. The bear-ing test is depicted in Figure 4.5. In the first picture it can be concluded that theRMSE for the bearing increased with the standard deviation. The latter picture,where the RMSE for the signal strength is illustrated, does not show any signs ofbeing influenced by the bearing’s increasing standard deviation.

The results from the Rician K factor test is presented in Figure 4.6. In the lower

Page 56: Positioning and tracking of target drone

46 4 Results

image the RMSE of the signal strength decreased as the K value increased. Thiswas expected since a higher K value corresponds to a stronger signal. The cor-responding RMSE of the bearing however remains unchanged, which was alsoexpected since the bearing and signal strength do not correlate.

RM

SE [d

egre

es]

RM

SE [1

/m²]

Figure 4.4: An illustration of how the RMSE values depended on the numberof particles.

Page 57: Positioning and tracking of target drone

4.3 Tracking 47

RM

SE [d

egre

es]

RM

SE [1

/m²]

Figure 4.5: A depiction of how the RMSE changed as the standard deviationof bearing increased for the Particle filter.

Page 58: Positioning and tracking of target drone

48 4 Results

RM

SE [d

egre

es]

RM

SE [1

/m²]

Figure 4.6: A depiction of how the RMSE changed as the Rician K intervalincreased for the Particle filter.

4.4 Flight control

To test the smoothness of the flight controllers two tests were performed. Eachtest was performed twice, one time for each controller implementation. Both ofthe tests were done using a computer with simulated drones. To compare thepaths that the seeker drone took, the result is saved and visually plotted.In the first test the two drones started approximately 50 meters from each other.The seeker started in the upper left corner, the target started in the centre of thefigure, see Figure 4.7. For both the controller implementations the target dronefollowed the same path and the distance between the drones where the same.The difference is the seeker drone’s path, this is shown in Figure 4.7. The twodifferent paths of the seeker drone, depending on the control used, are depictedwith different colours. From this figure it is evident that both the controllersproduced a smooth seeker path.During the second test the target was closer to the seeker, otherwise the setupwas the same as above. Both the seeker and the target started in the lower leftcorner, see Figure 4.8. In this figure the difference between the two controllers ismore tangible. The MDP controller moved more smoothly and did not have aslarge variations as the simple controller.

Page 59: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 49

Figure 4.7: A depiction of what the seeker path could look like for bothcontroller implementations, where seeker and target are positioned far away.The black dots indicate the start positions.

Figure 4.8: A depiction of what the seeker path could look like for bothcontroller implementations, where seeker and target are positioned closer.The black dots indicate the start positions.

4.5 Noise sensitivity analysis

The noise sensitivity analysis consisted of three different simulations with differ-ent levels of noise. The simulations were performed for both the filters and boththe controllers. All the simulations were performed on a computer. The firstsetup consisted of having a large standard deviation of the bearing. The stan-

Page 60: Positioning and tracking of target drone

50 4 Results

dard deviation of the bearing was set to 20◦. The K interval for the signal strengthhad a small noise contribution, where the interval was between [100,1000]. Thesecond simulation was performed with a large signal strength noise, the K in-terval was set to [1,10]. The standard deviation of the bearing for this secondsimulation was however changed to a value of 2◦. The third and last simulationincluded both a medium large signal strength noise and a medium large stan-dard deviation for the bearing. This time the K interval was set to [10,100] andthe standard deviation of the bearing was set to 10◦. A summation of these testsetups are shown in Table 4.1, the results form these three setups are in the nextthree sections.

Table 4.1: Summation of the three different test setups.

Standard dev. of bearing K interval deciding the signal noiseSetup 1 20◦ [100,1000]Setup 2 2◦ [1,10]Setup 3 10◦ [10,100]

4.5.1 Large bearing noise

The noise parameters were set to 20◦ and [100,1000], respectively for the stan-dard deviation of bearing and the signal strength K interval. This is a high levelof noise on the bearing and a low level of noise on the signal strength.

The resulting estimated target position is presented below, in Figure 4.9a, 4.9b,4.9c and 4.9d. From the plots it is evident that the Kalman filter managed toestimate the target position slightly better than the Particle filter. As the seekerclosed in on the target the estimation improved significantly, see Figure 4.9a and4.9c. The corresponding estimation for the Particle filter improved as well for thelast couple of samples. As for the difference in estimation between the controllersthe MDP controller managed to generate better estimations when the seeker wasclose to target, see Figure 4.9a and 4.9b. The simple controller still had troublededucing the position, this is evident especially for the final couple of samples inFigure 4.9d and 4.9c. The deviation from the true position is noticeable from thecurvature in the estimation. From Figure 4.9a and 4.9c it can be concluded thatoverall, regardless of time instance, KF simple performed slightly better than KFMDP. This is obvious for the estimations where the seeker is far away from target.For KF MDP the estimations have estimated the relative bearing fairly reasonable.It is the distance which seems to be lacking since the estimated positions are notas close to the true positions as they should be. This conclusions concerns the PFMDP and PF simple as well, although it is not as apparent due to the scatteredestimations.

Page 61: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 51

Dis

tanc

e [m

]

Distance [m]

(a) KF MDP.

Distance [m]

Dis

tanc

e [m

]

(b) PF MDP.

Dis

tanc

e [m

]

Distance [m]

(c) KF simple.

Dis

tanc

e [m

]

Distance [m]

(d) PF simple.

Figure 4.9: Estimated and true target position.

The resulting seeker and target path is presented below, in Figure 4.10a, 4.10b,4.10c and 4.10d. As a result of the slightly worse target estimations the seekerpath for the Particle filter was not as even as for the Kalman filter, see Figure4.10b and 4.10d. The irregular parts are distinct mainly for the second half ofthe sample sequence where seeker was closer to target. For large distances theseeker path looks unchanged in comparison to the Kalman filter. The Kalmanfilter resulted in smooth paths for both controllers, despite the large standarddeviation for the bearing, see Figure 4.10a and 4.10c. Hence from Figure 4.10b itcan be concluded that when the filter could not handle noise particularly well andthe MDP controller performs worse. This was expected since the MDP controllerestimates the next target position based on the previous and current estimation.If these estimations are wrong then the seeker will consequently move in thewrong direction.

Page 62: Positioning and tracking of target drone

52 4 Results

Dis

tanc

e [m

]

Distance [m]

(a) KF MDP.

Dis

tanc

e [m

]

Distance [m]

(b) PF MDP.

Dis

tanc

e [m

]

Distance [m]

(c) KF simple.

Distance [m]

Dis

tanc

e [m

]

(d) PF simple.

Figure 4.10: Target and seeker path.

The resulting Euclidean distance and its error are presented below, in Figure4.11a, 4.11b, 4.12a and 4.12b. The Euclidean distance error for all filters de-creased consistently as the seeker propagates towards the target. However forthe case where the Particle filter was used some occasional peaks in the error arepresent, see Figure 4.11b and 4.12b.

Page 63: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 53

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(a) KF MDP.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

50

100

150

200

250Er

ror d

istan

ce [m

]

Error in distance between estimated and true target position

(b) PF MDP.

Figure 4.11: Euclidean distance error of estimated target position and trueEuclidean distance between target and seeker, MDP controller.

Page 64: Positioning and tracking of target drone

54 4 Results

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

50

100

150

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(a) KF simple.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

50

100

150

200

250Er

ror d

istan

ce [m

]

Error in distance between estimated and true target position

(b) PF simple.

Figure 4.12: Euclidean distance error of estimated target position and trueEuclidean distance between target and seeker, simple controller.

4.5.2 Large signal strength noise

The noise parameters were set to 2◦ and [1,10], respectively for the bearing andthe signal strength. This is a low level of noise on the bearing and a high level ofnoise on the signal strength.

The resulting estimated target position is presented below, in Figure 4.14a, 4.14b,4.14c and 4.14d. As for all filters the estimated target position lacks precision forlarge distances, which was expected. For shorter distances the estimations wereclose to perfect where the Particle filter was slightly better, see Figure 4.14b and4.14d.

The resulting seeker and target path is presented below, in Figure 4.13a, 4.13b,4.13c and 4.13d. The seeker path was steady for all filters and controllers, thelack of signal strength has thus no effect on the smoothness.

Page 65: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 55

The resulting Euclidean distance and its error are presented below, in Figure4.15a, 4.15b, 4.15c and 4.15d. The outcome of a low signal strength is obvious forthe Euclidean distance error. The first 40 samples for all filters show a distincterror of 50 meters or more. Thereafter the error was reduced significantly and forthe last couple of samples the error was negligible in comparison to the distancebetween seeker and target.

Distance [m]

Dis

tanc

e [m

]

(a) KF MDP.

Distance [m]

Dis

tanc

e [m

]

(b) PF MDP.

Distance [m]

Dis

tanc

e [m

]

(c) KF simple.

Distance [m]

Dis

tanc

e [m

]

(d) PF simple.

Figure 4.13: Target and seeker path.

Page 66: Positioning and tracking of target drone

56 4 Results

Dis

tanc

e [m

]

Distance [m]

(a) KF MDP.

Dis

tanc

e [m

]

Distance [m]

(b) PF MDP.

Dis

tanc

e [m

]

Distance [m]

(c) KF simple.

Dis

tanc

e [m

]

Distance [m]

(d) PF simple.

Figure 4.14: Estimated and true target position.

Page 67: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 57

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(a) KF MDP.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(b) PF MDP.

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(c) KF simple.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(d) PF simple.

Figure 4.15: Euclidean distance error of estimated target position and trueEuclidean distance between target and seeker.

Page 68: Positioning and tracking of target drone

58 4 Results

4.5.3 Medium large bearing noise and signal strength noise

The noise parameters were set to 10◦ and [10,100], respectively for the bearingand the signal strength. This is a medium level of noise on both the bearing andthe signal strength.

The resulting estimated target position is presented below, in Figure 4.16a, 4.16b,4.16c and 4.16d. A consistent result throughout all filter setups is that the esti-mation lacks precision for the first samples where seeker and target are far fromeach other. The bearing looks correct, it is the faulty signal strength signal whichseems to cause this issue. As the seeker moved closer to target the estimationswere more refined. For the last couple of samples the estimated positions resem-ble the true positions well.

Distance [m]

Dis

tanc

e [m

]

(a) KF MDP.

Distance [m]

Dis

tanc

e [m

]

(b) PF MDP.

Distance [m]

Dis

tanc

e [m

]

(c) KF simple.

Distance [m]

Dis

tanc

e [m

]

(d) PF simple.

Figure 4.16: Estimated and true target position.

The resulting seeker and target path is presented below, in Figure 4.17a, 4.17b,4.17c and 4.17d. The seeker took a smooth path for all filters, no large differencescan be found between them. This is caused by the estimated target position since

Page 69: Positioning and tracking of target drone

4.5 Noise sensitivity analysis 59

that is what determines where the seeker should go next.D

ista

nce

[m]

Distance [m]

(a) KF MDP.

Dis

tanc

e [m

]Distance [m]

(b) PF MDP.

Dis

tanc

e [m

]

Distance [m]

(c) KF simple.

Dis

tanc

e [m

]

Distance [m]

(d) PF simple.

Figure 4.17: Target and seeker path.

The resulting Euclidean distance and its error is presented below, in Figure 4.18a,4.18b, 4.18c and 4.18d. The Euclidean distance results generated considerablysmall errors compared to the actual distance between target and seeker. Thus,the error is more or less negligible in contrast to from what distance the seekerestimates from. When the seeker was close, the errors for all filters were verysmall. One noticeable matter is one large outlier, at approximately sample 30,for the Kalman filter with the simple controller, see Figure 4.18c.

Page 70: Positioning and tracking of target drone

60 4 Results

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(a) KF MDP.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

50

100

150

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(b) PF MDP.

0 20 40 60 80 100 120Sample

0

20

40

60

80

100

120

140

160

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

175

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(c) KF simple.

0 20 40 60 80 100 120Sample

0

25

50

75

100

125

150

Dist

ance

[m]

True distance between seeker and target

0 20 40 60 80 100 120Sample

0

50

100

150

200

Erro

r dist

ance

[m]

Error in distance between estimated and true target position

(d) PF simple.

Figure 4.18: Euclidean distance error of estimated target position and trueEuclidean distance between target and seeker.

Page 71: Positioning and tracking of target drone

4.6 Practical tests 61

4.6 Practical tests

This section covers the results from the practical tests performed with drones.

4.6.1 Initial tests

Two initial tests were conducted to evaluate the robustness of the estimation. Therelative bearing was tested by moving the target drone in a circle around theseeker drone. For both of these tests the target was put in a box and carriedaround by one person. The position of the seeker drone was constant during thewhole test. The second test performed aimed to evaluate the performance of thesignal strength. This time the target moved towards the seeker along a straightline. Again, the seeker position was constant during the test. The results fromboth tests are presented in the figures below.

In Figure 4.19 the result from the bearing test for the Particle filter is presented.For the first couple of time instances the estimated target position deviated signif-icantly from the true target position, see the lower left corner in Figure 4.19. Thedeviation originates from the false distance estimation, the angle seems ratheron point when inspecting the result visually. The distance estimation convergedtowards the true distance and remained stable throughout the whole test.

580 590 600 610 620 630Distance [m] +1.486e6

30

40

50

60

70

80

Dist

ance

[m]

+6.4743e6

Estimated target position True target position Seeker position

Figure 4.19: A depiction of the flight test where the target moved accordingto a circle using a Particle filter and a MDP controller.

The Kalman filter performed satisfactorily throughout the whole test except for

Page 72: Positioning and tracking of target drone

62 4 Results

some occasional outliers, see Figure 4.20.The y and x axis are distances according to the RT90 coordinates, which are con-verted from the WGS84 coordinates. The high x and y values are relative to aorigin where the corresponding WGS84 latitude and longitude are 0◦.

580 590 600 610 620Distance [m] +1.486e6

30

40

50

60

70

80

Dist

ance

[m]

+6.4743e6

Estimated target position True target position Seeker position

Figure 4.20: A depiction of the flight test where the target moved accordingto a circle using Kalman filter and a MDP controller.

The estimated target positions for the second test with the Particle filter are de-picted in Figure 4.21. The estimation stabilised after four time instances, see thefour estimated positions in the lower left corner, and thereafter continued to doso as the target closed in on the seeker. When the target was close the estimatedtarget position was almost perfect.

In Figure 4.22 the Kalman filter performed rather stable except for a couple ofsporadic outliers throughout the test. As the target progressed towards the seekerthe performance improved and when the target was close the estimated target po-sition was close to perfect. In comparison to the same test done for the Particlefilter, it is obvious from this figure that the Kalman filter had a higher samplingfrequency due to the larger amount of estimated target positions, see Figure 4.22.This could cause the Kalman filter to have obtained a larger amount of outliers.The sampling frequency is further examined in Section 4.6.2.

Page 73: Positioning and tracking of target drone

4.6 Practical tests 63

77.5 80.0 82.5 85.0 87.5 90.0 92.5 95.0Distance [m] +1.4865e6

30

35

40

45

50

55

Dist

ance

[m]

+6.4743e6

Estimated target position True target position Seeker position

Figure 4.21: A depiction of the flight test where the target moved accordingto a straight line using a Particle filter and a MDP controller.

77.5 80.0 82.5 85.0 87.5 90.0 92.5 95.0Distance [m] +1.4865e6

40.0

42.5

45.0

47.5

50.0

52.5

55.0

57.5

Dist

ance

[m]

+6.4743e6

Estimated target position True target position Seeker position

Figure 4.22: A depiction of the flight test where the target moved accordingto a straight line using Kalman filter and a MDP controller.

Page 74: Positioning and tracking of target drone

64 4 Results

4.6.2 Qualitative performance

As a qualitative performance analysis, the positional error for the estimated tar-get position was examined. One other aspect which was analysed as well wasthe sampling frequency for the filters and controllers. Both these analyses arepresented below.

Positional error

A qualitative analysis was performed on the logged data from the initial tests pre-sented above, more precisely the data from Figure 4.21 and 4.22. The analysisconsisted of calculating the Euclidean distance for each time instance betweenthe true target position and the estimated target position. The distance can con-sequently be interpreted as a positional error of the estimation. The noise levelfor the signal strength was set to a K interval of [100, 1000]. The standard devi-ation of the bearing was set to 2◦. The result from the calculations are depictedbelow. For these figures the x-label "Time instance" means the same thing as thepreviously used x-label "Sample".

In Figure 4.23, for the initial eight time instances the error is significantly large.However, as the test progresses the error decreases rapidly and continues to doso as the target closes in on the seeker. After the first inaccurate samples the am-plitude of the error never exceeds more than 1.4 meters. In the second half of theflight test the error is even smaller than 0.75 meters, see Figure 4.24.

The error in the Euclidean distance in Figure 4.25 is the result from the Kalmanfilter. The figure confirms what has been established in the previous tests, theKalman filter performed well for the entire test sequence. For the second half ofthe test the amplitude of the error peaks with a value of approximately 1.8 me-ters. For the last 400 samples in the lower picture in Figure 4.25 the amplitudeof the error is less than or equal to 0.5 meters.

Page 75: Positioning and tracking of target drone

4.6 Practical tests 65

0 100 200 300 400 500 600 700 800Time instance

2.5

5.0

7.5

10.0

12.5

15.0

17.5

20.0

Dist

ance

[m]

Euclidean distance between target and seeker

0 100 200 300 400 500 600 700 800Time instance

0

2

4

6

8

10

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.23: A depiction of the positional error for the Particle filter.

0 100 200 300 400 500 600 700 800Time instance

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.24: A depiction of the positional error for the Particle filter, zoomedin.

Page 76: Positioning and tracking of target drone

66 4 Results

0 500 1000 1500 2000Time instance

5

10

15

20

Dist

ance

[m]

Euclidean distance between target and seeker

0 500 1000 1500 2000Time instance

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.25: A depiction of the positional error for the Kalman filter.

Sampling frequency

Each filter was also analysed with respect to its sampling frequency. The sam-pling frequency was calculated by logging the time stamp for each sample andthen divide the total number of samples by the time difference. Four differentsetups were analysed; the Particle filter and the Kalman filter combined with thesimple controller or the MDP controller. The result from the sampling frequencyanalysis is presented in Table 4.2.

Table 4.2: Result from the sampling frequency analysis.

Tracking filter Simple controller MDP controllerParticle filter 21.24 Hz 23.0 HzKalman filter 64.07 Hz 71.06 Hz

These frequencies were too high for the drone motors, consequently the communi-cation speed was adapted for the flight tests such that every 20th seeker positionfrom the Kalman filter was sent to the drone’s motors. The corresponding value

Page 77: Positioning and tracking of target drone

4.6 Practical tests 67

for the Particle filter was every 10th position was sent to the motors. Becauseof the lowered communication frequency the sent seeker position consisted of amean from the five latest calculated seeker positions.

4.6.3 Flight tests

Additional tests were conducted where the seeker drone flew according to the fil-ter and controller algorithms. For these particular flight tests the target remainedon the ground, instead of flying in the air it was put in a box which was carriedaround by one person. For these tests the standard deviation of the bearing wasset to 2◦ and the K interval ranged within [100,1000]. In other words, the simu-lated data which the algorithm receives had a very small noise contribution. Theresults from these tests are presented below.

Kalman filter, MDP controller

In this section the results generated by the Kalman filter combined with the MDPcontroller are presented.

In Figure 4.26 the seeker path generated by the MDP controller resembled asmooth curve. The Kalman filter pinpointed the target positions nicely with somerare outliers.

Distance [m]

Dist

ance

[m]

Figure 4.26: A depiction of the seeker and target positions using the Kalmanfilter combined with MDP controller. The arrows illustrate the starting po-sition and the direction of seeker and target.

In Figure 4.27 the Euclidean distance between seeker and target is depicted to-gether with the Euclidean distance error between the estimated and true target

Page 78: Positioning and tracking of target drone

68 4 Results

500 1000 1500 2000 2500 3000 3500 4000Time instance

0

5

10

15

20

Dist

ance

[m]

Euclidean distance between target and seeker

500 1000 1500 2000 2500 3000 3500 4000Time instance

0

1

2

3

4

5

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.27: A depiction of the positional error of target using the Kalmanfilter combined with MDP controller.

position. The error decreases as the seeker moved closer to target. The error neverexceeded a value of 5 meters even when the distance between seeker and targetwas larger than 20 meters, this is considered good. In general the errors wereconsidered small compared to how far away the seeker was located, especiallyfor the last samples, see Figure 4.27.

Kalman filter, simple controller

In this section the result from the flight test with the Kalman filter and the simplecontroller is presented.

In Figure 4.28 the target path and its corresponding estimation is depicted to-gether with the seeker path. The seeker path was smoothly taken with a back-wards movement in the end as a result of the collision handling. Overall thefilter estimated the target position well.

Page 79: Positioning and tracking of target drone

4.6 Practical tests 69

Distance [m]

Dist

ance

[m]

Figure 4.28: A depiction of the seeker and target positions using the Kalmanfilter combined with simple controller. The arrows illustrate the startingposition and the direction of seeker and target.

For this flight test the Kalman filter handled the estimation excellently whichcaused the errors to be small, see Figure 4.29 below. When the seeker was farfrom target the errors got larger, which was expected. The smallest errors wereless than 50 centimetres, in some cases as low as 20 centimetres.

Page 80: Positioning and tracking of target drone

70 4 Results

1000 2000 3000 4000 5000 6000Time instance

2.5

5.0

7.5

10.0

12.5

15.0

17.5

Dist

ance

[m]

Euclidean distance between target and seeker

1000 2000 3000 4000 5000 6000Time instance

0.0

0.5

1.0

1.5

2.0

2.5

3.0

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.29: A depiction of the positional error of target using the Kalmanfilter combined with simple controller.

Particle filter, MDP controller

In this section the results generated by the Particle filter combined with the MDPcontroller are presented.

The seeker path together with both estimated and true target position is pre-sented below in Figure 4.30. The seeker path generated by the MDP controllerhas a smooth curvature. The estimated target positions were calculated withgreat precision, they followed the true target positions neatly.

For the plots in Figure 4.31, the Euclidean distance errors were considerablysmall. The largest error value was 1.5 meters, at a point where the distancebetween seeker and target was approximately 16 metres. The smallest errorsoccurred when seeker and target were closely positioned, then these errors fluc-tuated between 0.25-0.5 meters.

Page 81: Positioning and tracking of target drone

4.6 Practical tests 71

Distance [m]

Dist

ance

[m]

Figure 4.30: A depiction of the seeker and target positions using the Parti-cle filter combined with MDP controller. The arrows illustrate seeker andtarget’s respective directions.

200 300 400 500 600 700Time instance

0

2

4

6

8

10

12

14

16

Dist

ance

[m]

Euclidean distance between target and seeker

200 300 400 500 600 700Time instance

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.31: A depiction of the positional error of target using the Particlefilter combined with MDP controller.

Page 82: Positioning and tracking of target drone

72 4 Results

Particle filter, simple controller

In this section the results generated by the Particle filter combined with the sim-ple controller are presented.

The seeker path together with the estimated and true target positions are de-picted below in Figure 4.32. The path which the seeker took was smooth andmade the seeker keep up with target’s movements. The estimated target posi-tions were coupled around the true positions nicely. When the seeker was closeto target the estimations improved, which was expected both from theory andfrom the figure above.

Distance [m]

Dis

tanc

e [m

]

Figure 4.32: A depiction of the seeker and target positions using the Particlefilter combined with simple controller.

From Figure 4.33 it can be concluded that the Euclidean distance error variedwith the distance between target and seeker. The largest error had a value ofapproximately 1.8 metres. However, for most samples the error never exceededa value of 1.25 metres. For samples when the seeker was closer than 10 metresto the target, the error stayed below 0.75 metres. This is considered good sinceexact estimations are only required when the drones are closely positioned.

Page 83: Positioning and tracking of target drone

4.6 Practical tests 73

400 500 600 700 800 900 1000 1100 1200Time instance

5

10

15

20

25

Dist

ance

[m]

Euclidean distance between target and seeker

400 500 600 700 800 900 1000 1100 1200Time instance

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Erro

r [m

]

Euclidean distance between estimated and true target position

Figure 4.33: A depiction of the positional error of target using the Particlefilter combined with simple controller.

Page 84: Positioning and tracking of target drone
Page 85: Positioning and tracking of target drone

5Discussion

In this chapter a discussion is presented about the results and other decisionsthat were made throughout the process.

5.1 Signal models

One assumption made about the signal strength noise was that the parameter Kdecreased linearly. This is a simplified assumption and may not reflect the ac-tual fading characteristics. From Equation 2.35 we found that the distributioncontains an exponential function. Due to this fact a more suitable assumptionregarding K would be to assume it decreases exponentially.

Furthermore about the signal strength, which is mentioned in the limitationsSection 1.4, is that its power is known. This is surely not always the case for mostpractical situations.

The bearing model may not be as accurate either, since it does not take into ac-count the distance between the drones. A more realistic model would be that thebearing noise depended on the signal strength and hence on the distance betweenthe drones. This would result in more bearing noise when the distance was large,whereas when the distance was short the noise would have been smaller.

5.2 Coordinate system setup

One of the coordinate system setups that was tested but not further used in theproject was the global coordinate system. This system depended on a worldbearing which in turn was based on a summation of all previously estimated

75

Page 86: Positioning and tracking of target drone

76 5 Discussion

relative bearings. This did not work out for large amount of noise, which couldbe explained by the summation. If a couple of relative bearings were estimatedwrongly then these errors would propagate throughout the entire flight sequence.A consequence from this would be that the world bearing was more or less use-less for large amounts of noise. If the world bearing could not be utilised thenthe whole coordinate system setup could not be used either.

5.3 Filters

Over all the filters performed satisfactorily for all tests, both practical and theo-retical. For the theoretical tests in Section 4.5, specifically Setup 2 and 3, wherethe amount of noise was large the filters showed indications of worse target posi-tion estimations. However, the large noise contributions may not reflect the realworld and could be seen as extreme cases. Setup 3 which had medium large con-tributions for both signal strength and bearing is a better reflection of the reality.During this setup both filters, disregarding what controller was used, performedwell.

Considering the test results when the seeker drone was in an immovable statecompared to when it was moving in the air, the estimations did not seem to getworse. The seeker drone managed to estimate the target drone’s position on thefly. However, for the tests when the seeker and/or target were moving their re-spective paces were at most a couple of metres per second. It would have beeninteresting to see how the estimations might have changed for different velocities.

For the test cases where small amounts of noise was added to the bearing andsignal strength the Kalman filter showed a larger amount of outliers comparedto the Particle filter. One possible cause of this issue was the sampling frequencyfor the Kalman filter which was almost double the value of the Particle filter. Asthe sequence of the Kalman filter contained more samples the probability of thatit included an outlier increased as well.

One notable thing from the results was how the Particle filter estimations wors-ened as the noise increased. One possible cause to this could be the state modeland how particle states propagated. The state model for these simulations onlypropagated the relative bearing and the signal strength. A more suitable modelwould have been to integrate a non linear model where a position was trackedinstead and where all particles had an individual velocity and/or acceleration as-sociated with them.

One additional concern regarding the Kalman filter is that the m value for itsalgorithm is defined from the noise levels. Consequently, if the noise level is highthen the value of m is vastly different from when the noise level is low. The deter-mination of m in this project requires the noise levels to be known. This is a cleardrawback with the Kalman filter.

Page 87: Positioning and tracking of target drone

5.4 Controllers 77

5.4 Controllers

For large amount of noise where the filter had trouble with the estimations theMDP controller indicated an irregular seeker path. This was evident in Setup 1and 2 from Section 4.5. This result was generated from the estimation of target’snext position. The estimation was based on the second to last and last estimationsof the target position. Thus, if one or both of these estimations were wrong thenthe calculation of the next position would be wrong as well. One redemption tothis issue is to add more points to the estimation calculation, for example onefeasible solution could be to include five instead of two points. These five pointswould naturally be the latest five estimations of the target position.

Putting the extreme test cases from Setup 1 and 2 aside the MDP controller per-formed better than the simple controller in the sense that it produced a smootherseeker path. If the filter estimations improve then this controller would be themost feasible option.

5.5 Practical flight test

One factor that caused problems which we could not predict was the Pythonlibrary used for communicating with the drone, namely DroneKit. This commu-nication enabled the code to determine how the seeker drone should move. Thelibrary used one additional library, Mavlink, which operated the actual commu-nication to the drone’s motors. Thus the DroneKit library acted as a wrapper forthe communication with the drone’s motors. One problem that occurred withthis library was the time delay from the point when we sent the an instructionto the motors and until the seeker started to move according to it. This delaycould be as high as 10 seconds. DroneKit itself executed additional tasks besidesfrom sending the instruction via Mavlink, which added one more possible delaysource. However, we managed to work around it and reduced the time delay, butif there had been more time on our hands a communication solely with Mavlinkwould have been preferable. This solution would cut one intermediary step andconsequently reduce the amount of possible problems with the communication.

Page 88: Positioning and tracking of target drone
Page 89: Positioning and tracking of target drone

6Conclusion

In this chapter the problems statements from Chapter 1 are answered. A sectiondescribing tasks and improvements for future work is presented as well.

6.1 Problem statement

This report aimed to answer the questions stated in Section 1.3, namely the fol-lowing questions.

• What positioning method is most suitable for this task: received signalstrength, interferometry or Time Difference of Arrival (TDOA)?

• What method is most suitable for tracking the target drone?

• What antenna configuration is the most suitable for this task?

• How should the automatic controlling of the seeker be implemented in or-der to make direction changes smooth?

These questions are answered separately below.

6.1.1 Positioning method

In this project a relative bearing and signal strength have been used to solve thetask. From the results in Chapter 4 it has been proved that the combination ofbearing and signal strength works sufficiently for positioning a moving target.An interferometry solution yields both of these parameters and thus is the bestchoice.

79

Page 90: Positioning and tracking of target drone

80 6 Conclusion

6.1.2 Tracking method

For the majority of the test results the Particle filter performed better, however itdid perform worse for high noise levels in the bearing. Additionally, the Kalmanfilter parameters were tuned according to the noise levels, which required thelevel to be known. Therefore it is the Particle filter that is the most preferablefilter when the noise levels are unknown. However, if the noise levels are knownand are of a large magnitude and especially for the bearing then the Kalman filteris the best choice.

6.1.3 Antenna configuration

From the interferometry theory in Section 2.1.5 it is concluded that three anten-nas remove the fundamental ambiguity. This is the most viable solution sincemore antennas would increase the load on the drone.

6.1.4 Flight control

The MDP controller produced a more smooth seeker path compared to the sim-ple controller, but it did perform worse for badly estimated target positions. Ifthe estimation is refined then the MDP controller is the method that yields thesmoothest and shortest path towards the target drone.

6.2 Future work

One obvious improvement to this master thesis is to implement and test the an-tenna configuration in practice. Such results would prove even better which an-tenna configuration is the best match for this problem setup.

A future development for this project would be to improve both filters to makethem more robust for different noise levels. One more interesting thing would beto improve the state model and turn it into a non linear model where the actualposition is tracked.

Another improvement to this project would be to test even more how the commu-nication can be modified with the drone’s motors. This would have to be balancedbetween having a low rate of sent instructions but at the same time keeping themotors reactive to sudden alarming changes, such as collision handling.

Page 91: Positioning and tracking of target drone

Bibliography

[1] H. I. Ahmed, P. Wei, I. Memon, Y. Du, and W. Xie. Estimation of time differ-ence of arrival (tdoa) for the source radiates bpsk signal. IJCSI InternationalJournal of Computer Science Issues, 10(3):2, 2013.

[2] A. Alsayyari, I. Kostanic, C. E. Otero, and A. Aldosary. An empirical pathloss model for wireless sensor network deployment in a dense tree envi-ronment. In 2017 IEEE Sensors Applications Symposium (SAS), pages 1–6,2017.

[3] Börje Andersson, Hans Bergdal, Rolf Gustavsson, Peter Nagy, and FredrikOscarsson. Signalspaningsteknik del 1 Grunder samt radiosignalspaning.Institutionen för Telekrigsystem, first edition, 2004.

[4] M. S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp. A tutorial onparticle filters for online nonlinear/non-gaussian bayesian tracking. IEEETransactions on Signal Processing, 50(2):174–188, 2002.

[5] Britannica. Bessel function. https://www.britannica.com/science/Bessel-function. (accessed: 10.03.2021).

[6] Britannica. Gamma function. https://www.britannica.com/science/gamma-function. (accessed: 10.03.2021).

[7] Philip J Davis. Leonhard euler’s integral: A historical profile of the gammafunction: In memoriam: Milton abramowitz. The American MathematicalMonthly, 66(10):849–869, 1959.

[8] Randal Douc, Olivier Cappe, and Eric Moulines. Comparison of resamplingschemes for particle filtering. CoRR, abs/cs/0507025, 2005.

[9] A. Doukas and G. Kalivas. Rician k factor estimation for wireless commu-nication systems. In 2006 International Conference on Wireless and MobileCommunications (ICWMC’06), pages 69–69, 2006.

[10] VBS Srilatha Indira Dutt et al. A sensitivity analysis of extended kalmanfilter for gps position estimation with and without clock offset. MaterialsToday: Proceedings, 33:3626–3629, 2020.

81

Page 92: Positioning and tracking of target drone

82 Bibliography

[11] J. J. Egli. Radio propagation above 40 mc over irregular terrain. Proceedingsof the IRE, 45(10):1383–1391, 1957.

[12] A. El-Rabbany. Introduction to GPS: the Global Positioning System. ArtechHouse, second ed. edition, 2006.

[13] P. Ghosh, J. A. Tran, and B. Krishnamachari. Arrest: A rssi based approachfor mobile sensing and tracking of a moving object. In 2017 IEEE GlobecomWorkshops (GC Wkshps), pages 1–6, 2017.

[14] F. Gustafsson. Particle filter theory and practice with positioning applica-tions. IEEE Aerospace and Electronic Systems Magazine, 25(7):53–82, 2010.

[15] F. Gustafsson. Statistical Sensor Fusion. Studentlitteratur, third edition,2018.

[16] Andreas Höggren and Love Lindmark. Methods for locating signal jammerswith a uav. Technical report, Department of Science and Technology, Physicsand Electronics, Linköping University, 2018.

[17] J. D. Hol, T. B. Schon, and F. Gustafsson. On resampling algorithms for par-ticle filters. In 2006 IEEE Nonlinear Statistical Signal Processing Workshop,pages 79–82, 2006.

[18] Jeroen D. Holl. Resampling in particle filters. Technical report, Departmentof Electrical Engineering, Linköping University, 2004.

[19] S. M. Kay. Fundamentals of Statistical Signal Processing: Estimation Theory.Prentice Hall, first edition, 1993.

[20] S Kazemi and S Yatawatta. Robust radio interferometric calibration us-ing the t-distribution. Monthly Notices of the Royal Astronomical Society,435(1):597–605, 2013.

[21] M. J. Kochenderfer L. Dressel. Efficient and low-cost localization of radiosignals with a multirotor uav. In 2018 AIAA Guidance, Navigation, andControl Conference, pages 1–17, 2018.

[22] M. J. Kochenderfer L. Dressel. Hunting drones with other drones: Trackinga moving radio target. In 2019 International Conference on Robotics andAutomation (ICRA), pages 1905–1912, 2019.

[23] S. Lall. Markov decision processes. https://stanford.edu/class/ee365/lectures/mdp.pdf. (accessed: 25.01.2021).

[24] Lantmäteriet. Rt 90. https://www.lantmateriet.se/sv/Kartor-och-geografisk-information/gps-geodesi-och-swepos/Referenssystem/Tvadimensionella-system/RT-90/. (accessed: 08.12.2020).

Page 93: Positioning and tracking of target drone

Bibliography 83

[25] C. Luo, S. I. McClean, G. Parr, L. Teacy, and R. De Nardi. Uav positionestimation and collision avoidance using the extended kalman filter. IEEETransactions on Vehicular Technology, 62(6):2749–2762, 2013.

[26] S. Nadarajah and S. Kotz. Mathematical properties of the multivariate tdistribution. Acta Applicandae Mathematicae, 89:53–84, 2005.

[27] Nationalencyklopedin. Bäring. http://www.ne.se/uppslagsverk/encyklopedi/lång/bäring. (accessed: 11.09.2020).

[28] NATO. Sci-222 rtg electroinc warfare issues of software defined radio. Tech-nical report, 2013.

[29] Tan N Nguyen, Tran Hoang Quang Minh, Phuong T Tran, and MiroslavVozňák. Energy harvesting over rician fading channel: a performance anal-ysis for half-duplex bidirectional sensor networks under hardware impair-ments. Sensors, 18(6):1781, 2018.

[30] F. Peruani, A. Maiti, S. Sadhu, H. Chate, R. R. Choudhury, and N. Ganguly.Modeling broadcasting using omnidirectional and directional antenna in de-lay tolerant networks as an epidemic dynamics. IEEE Journal on SelectedAreas in Communications, 28(4):524–531, 2010.

[31] X. Shi, C. Yang, W. Xie, C. Liang, Z. Shi, and J. Che. Anti-dronesystemwith multiple surveillance technologies: Architecture, implementation, andchallenges. IEEE Communications Magazine, 56(10):68–74, 2018.

[32] H. Xia, H. L. Bertoni, L. R. Maciel, A. Lindsay-Stewart, and R. Rowe. Radiopropagation characteristics for line-of-sight microcellular and personal com-munications. IEEE Transactions on Antennas and Propagation, 41(10):1439–1447, 1993.

[33] Z. Zhang, S. Salous, H. Li, and Y. Tian. Optimal coordination method ofopportunistic array radars for multi-target-tracking-based radio frequencystealth in clutter. Radio Science, 50(11):1187–1196, 2015.