• No results found

Simulation of Collaborating Autonomous Gliders

N/A
N/A
Protected

Academic year: 2021

Share "Simulation of Collaborating Autonomous Gliders"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT COMPUTER ENGINEERING, FIRST CYCLE, 15 CREDITS

STOCKHOLM SWEDEN 2020,

Simulation of Collaborating Autonomous Gliders

Simulering av samarbetande autonoma segelflygplan

KAJSA BUCKARD AND OSCAR MEYER

(2)

Abstract

Drones today have a wide field of application, for example monitoring vast areas and pollination of fruit trees in Japan. Even though drones can do many different types of services today, they are still limited to power usage which results in that drones are not able to stay aloft for a very long time. To be able to improve the flight time an alternative could be to replace drone technology with autonomously gliders, since gliders do not require engines to stay aloft.

Instead of external power, gliders use air currents, such as columns of rising hot air know as thermals. Even if gliders would be a great alternative to drones in the future, gliders still cannot detect a thermal before it has entered it and therefore limiting its ability to stay aloft. The purpose for this thesis was to increase the gliders’ possibility of detecting thermals and use thermals by increasing the numbers of gliders in the air and then let them collaborate. In this thesis we tried to figure out a way for the gliders to collaborate and then verified its positive effect.

To be able to analyze the planes’ flight path, we used a simulation including a simple world, gliders, thermals, and a hard to reach global target for the gliders. When we had implemented five rules to increase the planes’ possibility to collaborate, we ran the simulation 10 000 times to be able to understand how the rules had changed the flights of the gliders. The result from the simulation was put into graphs that later was analyzed. The simulations without the collaboration rules showed that less than half a percent of the simulations ended with at least one glider reaching the global target. While the simulations with the collaboration rules resulted in a rise to over nine percent of the simulations ending with a glider or gliders that reached the global target. However, it was almost six percent of all simulations with rules that resulted in that all five planes reached the target. This resulted in that the collaboration between the planes, to be able to find thermals and use them, increased the flight time and the possibility for the planes to reach the global target.

(3)

Sammanfattning

Idag används drönare inom många olika områden, exempelvis till övervakning av stora svårtillgängliga områden och pollinering av fruktträd i Japan. Även om drönare klarar av en hel del arbetsuppgifter, är de fortfarande begränsade till en energikälla vilket gör att de inte kan stanna uppe i luften under en lång tidsperiod. Därför vore det ett bra alternativ i framtiden att använda sig av ett alternativ som klarar av att vara uppe i luften utan en begränsad energikälla.

Ett sådant alternativ skulle kunna vara att byta ut drönare mot segelflygplan då segelflygplan saknar motor och alltså inte kräver någon extern energikälla.

Istället för motor använder segelflygplan luftströmmar för att kunna hålla sig uppe i luften. En typ av dessa luftströmmar kallas för termiker, vilket bildas när lufen nära marken värms upp i olika hastigheter och sedan stiger.

Även om segelflygplan vore ett bra alternativ är deras flygtid begränsad till termikers lyft. Detta blir problematiskt då flygplanens enda möjlighet att hitta en termik är att vara i en termik och notera det vertikala lyftet. Syftet med det här arbetet var att öka segelflygplanens möjlighet att hitta termiker och använda dem genom att öka antalet segelflygplan i luften samt komma på ett sätt för flygplanen att samarbeta. I det här arbetet skapade vi ett sätt för att flygplanen samarbeta och därefter verifierade vi dess positiv effekt som samarbetet resulterade i.

För att kunna analysera flygplanens flygväg använde vi oss av en simulering.

Simuleringen var skapad genom att implementera en virtuell värld där termiker, segelflygplan och ett svårtillgängligt globaltmål för segelflygplanen var utsatt;

där flygplanen sedan kunde röra sig problemfritt. När vi hade implementerat de fem reglerna för att öka flygplanens möjlighet att samarbeta, kördes simulerin- gen 10 000 gånger för att kunna granska de positiva effekterna reglerna hade bidragit med. Resultatet från simuleringarna ritades in i grafer som senare blev analyserade. Vid simuleringarna utan samarbetsregler var det under en halv procent av dem som slutade i att minst ett segelflygplan nådde fram till målet.

Medan simuleringarna med samarbetsreglerna resulterade i en ökning till över nio procent av simuleringarna med minst ett segelflyg som nådde mål. I knappt sex procent av simuleringarna nådde alla plan fram till målet. Detta innebar att samarbetet mellan flygplanen för att hitta termiker och öka dess användning gav en ökning av både flygtiden samt möjligheten för flygplanen att nå slutmålet.

(4)

Acknowledge

We would like to express our deepest gratitude to Johan Montelius at The Royal Institute of Technology in Stockholm for his support and expertise during this thesis. He has given us an opportunity in carrying out an interesting work under fantastic guidance.

Stockholm, June 2020

Oscar Meyer and Kajsa Buckard

(5)

Contents

1 Introduction 6

1.1 Background . . . 6

1.1.1 Gliders . . . 6

1.2 Problem . . . 7

1.3 Purpose . . . 7

1.4 Goal . . . 7

1.5 Method . . . 7

1.6 Delimitation . . . 8

1.7 Outline . . . 8

2 Background 9 2.1 Thermals . . . 9

2.2 Swarm Intelligence . . . 10

3 Methodology 13 3.1 Previous Studies . . . 13

3.1.1 Infrared Optical Cameras . . . 13

3.1.2 Trained Robotic Gliders . . . 13

3.2 Qualitative and Quantitative Methods . . . 13

3.3 Research Method . . . 14

3.3.1 Pre Study . . . 14

3.3.2 Problem Analysis . . . 14

3.3.3 Literature Study . . . 14

3.3.4 Implementation . . . 15

3.3.5 Evaluation . . . 15

3.4 Reliability and Validity . . . 15

3.5 Alternative Method . . . 16

3.6 Ethical Aspects . . . 16

4 Model Description 17 4.1 The World . . . 17

4.2 Thermals . . . 17

4.3 Planes . . . 18

4.4 Global Target . . . 20

5 Implementation 22 5.1 Print . . . 22

5.2 Rule I: In a Thermal . . . 23

5.3 Rule II: Avoid Collisions . . . 23

5.4 Rule III: Change Target . . . 23

5.5 Rule IV: Been Here Before . . . 24

5.6 Rule V: When Leaving a Thermal . . . 24

5.7 Plotting . . . 24

5.8 Hierarchy . . . 25

(6)

6 Evaluation 26

7 Result 28

7.1 Swarm Intelligence . . . 30 7.2 Implementation in Real Life . . . 30

8 Conclusion 31

8.1 Future Studies . . . 31

(7)

1 Introduction

This chapter introduces the thesis; section 1.1 describes the background, section 1.2 defines the problem, section 1.3 introduces the purpose of the thesis and section 1.4 defines the goal of the thesis followed by the method in section 1.5, section 1.6 about the delimitation and section 1.7 about the outline.

1.1 Background

Since 2013 the interest of drone technology has drastically increased. [21] Com- monly the main purpose of drone technology is military usage but civilian appli- cations has also increased since the technology was introduced. [19] Drones have a wide span of possibilities of application, especially since pictures and camera surveillance are cheaper with drones than aerial photography from manned air- craft and satellite images. [5]

Drones are useful in vast areas and today several countries use this tech- nology for border surveillance, which contributes to prevention of trafficking illegal drugs and illegal migration. Furthermore, drones can be used in many other areas as well, for example: delivery of mail, archaeology, collect research data and in agriculture. In Japan, 30 percent of all rice fields are sprayed with drones and in this field of application, drones contribute to scare away birds, plant seeds and pollination of fruit trees. [5] Another example where drones are used is Rwanda in Africa, where a system called Zipline is currently in use to deliver blood bags to hospitals in the country [22]. Even though drones are common and practical, they still have limitations since drones require energy to stay aloft and this energy source is limited. Since drones have this limitation, a system without an engine would be useful and might be able to replace the drones in the future. An example of a potential replacement could therefore be gliders since they operates without an engine [17].

1.1.1 Gliders

The first gliders came to use in 1853 but the sport of gliding did not emerge until after the first World War. Today’s manned gliders are able to fly for hours and commonly reach 500 kilometers without an engine [11] which gives the gliders many possibilities. One of the reasons why gliders are able to fly such distances without an engine is because they use warm air that rises, commonly called thermals, that contribute to a vertical rise [17]. A common point that is often discussed around the performance of a glider is its glide ratio. Glide ratio is how many units of measurement a glider can glide horizontally for every same kind of unit of measurement lost vertically and it is shown as 50:1 if a glider can move a distance of 50 meters for every one meter of altitude dropped [10].

Since this thesis focus on a replacement of drones, we have been focusing on the smaller sizes of unmanned gliders. Some of these smaller gliders have an autonomous soaring system that controls the glider’s reaction when it is in a thermal [2]. This glider has been equipped with sensors and software to

(8)

notice its vertical rise. If the glider notice a vertical rise, the plane starts to circulate to be able to find the center of the thermal, where the thermal is the strongest [2]. This type of glider has proved its capabilities by finishing third in the Montague cross-country challenge versus most of the best radio-controlled sail plane teams in the United States [7]. However, even if gliders are a great alternative for drones in some fields, they are limited to the need for thermals to be able to stay aloft.

1.2 Problem

Today gliders are not able to detect a thermal other than to notice if the glider is inside of a thermal or not. An idea of improving this possibility to detect a thermal might be to let several planes collaborate and therefore cover a larger area. The problem formulation chosen for this thesis was therefore chosen to be:

"Could a collaboration between gliders contribute to an improvement of glid- ers’ possibilities to detect and use thermals?"

1.3 Purpose

Drones today have a wide field of application and by increasing the flight time for gliders, they could be a great alternative to drones in the future. The purpose for this thesis is to increase gliders’ possibility of detecting and use thermals to be able to be an alternative for drones in some field.

An idea of a possible solution could be to implement several planes that individually take local decisions that affect the group of gliders in a positive way.

One idea of such technology that is known as swarm technology is explained in section 2.2.

1.4 Goal

The goals for this thesis can be summarized into two main goals:

• Figure out a way for the gliders to collaborate

• Verify the positive effects of collaboration between gliders

1.5 Method

The project started with a literature study to be able to gain information about the field of gliders and the autonomous soaring systems that a model glider can use. When we had gotten information about the subject we decided to keep working with this project with our main method, a simulation of the gliders’

behavior in the virtual world. The virtual world was first implemented and objects such as thermals and gliders were then added to the world. A more detailed explanation of the creation of the world and its objects is found in in chapter four, model description.

(9)

In the simulation we introduced rules for the gliders one by one and exam- ined how the rules effaced the gliders performance. The improvements of the gliders flight time were iterative analyzed for each added rule to the world. To verify that the collaboration had a positive effect the flight time and crash ratio difference with and without the collaboration rules was then examined. How the analysis was done is described in chapter three, methodology, in chapter five, implementation, and in chapter six, evaluation.

1.6 Delimitation

The thesis is focusing on the planes collaboration and do not take environment obstacles to consideration. The report does not consider a specific type of plane, but instead take for granted that the plane is some sort of glider with an autonomous soaring system. We do not take the gliders power usage, start and landing or bad weather conditions to consideration. We are not going to consider any laws or rules about airspace or restricted areas.

Another important delimitation is that the thesis is focusing on the simula- tion of rules and not physic effects that environmental aspects could result in.

Such as how the flights would be affected depending on where in the world the planes are flying.

1.7 Outline

In chapter 2 the theoretical background will be described, for example explain thermals and swarm intelligence which for this thesis are main components.

The methods are described in chapter 3 followed by chapter 4 where the model description will be described. In the model description the world that have been created are described before chapter 5, implementation, that describes the process and the important decisions taken in this thesis. In chapter 6 the thesis evaluation is done, in this chapter some plotting of the simulations are illustrated before chapter 7 where the result is described. Finally, in chapter 8, the conclusion is stated and an analysis of possible future work within this field.

(10)

2 Background

This chapter gives a brief background about the subject: section 2.1 is about thermals and section 2.2 introduces swarm intelligence.

2.1 Thermals

When the sun heats the ground, different areas get heated faster than other areas. The air above darker and drier areas get heated faster than in light and wet areas. When the air gets heated, it will start to rise into smaller columns known as roots, illustrated in figure 1. When the warm air reaches around 100- 200m above ground, the small columns of warm air together forms a large blob of warm air. This results in blobs of warmer air that later rises and push colder air out of the way. This could sometimes lead to that the colder air get pushed to the ground, where it gets heated and rise themselves.

Figure 1: A simplified example of thermal roots [1]

The thermals are usually between one to two Celsius warmer than the sur- rounding air, which usually result in a rise at one to three meters per second.

Figure 2 below illustrates the movement of air when thermals are created. The large orange rising arrow illustrate the thermal and the blue arrows illustrate colder air getting pushed to the ground. [1]

(11)

Figure 2: An example of thermal

There is no average time for how long a thermal is alive since the duration time are dependent on how fast the air are moving. Furthermore, thermals live as long as there is a higher temperature on the air in the thermal than the air outside of the thermal. This means that the heated air continues to rise from the mixed layer until it reaches the top of the thermal. The top is defined as, where the air in the thermal has the same, or lower, temperature than the air outside of the thermal. One air segment’s movement through a thermal can vary from 100 seconds to 20 minutes and therefore has no average time. [1]

Since it is impossible to know where a thermal will appear when flying a glider, the pilots must use other techniques to guess where a thermal might be.

Some of these techniques are to fly toward hot spots’ like dark ground spots, look at flags to see how the wind is moving or by looking at surrounding birds.

[16] Birds can contribute to knowledge about the air currents, since some land birds use air currents like thermals to their advantage remain aloft with a good speed [8].

2.2 Swarm Intelligence

A swarm intelligence consists of a population of simple agents making decisions on a local level based on observations and interactions with each other. A set of simple local rules to follow needs to be in place for an agent in the swarm to know how to act in relation to the closest members of the swarm. As a member of the swarm you are only aware of a local proximity of yourself and do not receive a global sense of what is going on anywhere else. In the end, these local rules are meant to result in the completion of a large goal.[13]

A lot of the inspiration for this area comes from what humans can witness in nature, for example, how birds can fly in a tight formation doing sharp coordinated turns [9]. Birds are able to do this, without a leader and with

(12)

nothing more than a local awareness; since it is impossible for a bird in the back of the flock to know about what is happening in the front of the flock.

Swarm behavior is found in many places, for example: some species of fish where they move in schools, bees in beehives and ants in colonies. A swarm of individuals, with limited intelligence, work together to accomplish a common goal and solve complex problems.

The possibilities of this technology are still under exploration. By making use of basic local rules it is possible to induce a swarm behavior in autonomous systems like the behavior of a bird swarm. To get the swarm behavior you need three rules: one for separation, figure 3, one for alignment, figure 4, and one for cohesion, figure 5. [4] The rule of separation makes sure collisions are avoided, the rule of alignment makes sure to steer in the average heading of the local flock mates and the rule of cohesion steers towards the average position of local flock mates. This means that if one plane flies to the left and meets three other planes heading to the right, the first plane needs to turn around to follow the other planes to the right. These simple local rules, that every member of the swarm follows, give the possibilities of complex motions, not only in birds and fish but in autonomous vehicles as well. [4]

Figure 3: Example of a separation

(13)

Figure 4: Example of an cohesion

Figure 5: Example of an alignment

(14)

3 Methodology

The goal of this thesis was to be able to figure out a way for the gliders to collaborate to be able to detect thermals. When the collaboration was imple- mented the goal was to verify the positive effects of the collaboration between the gilders. The exact methodology for this thesis is explained in this chap- ter. Some previous studies are introduced in section 3.1, the qualitative and quantitative methods are explained in section 3.2, the research method on sec- tion 3.3 followed by a discussion about reliability and validity in section 3.4, an alternative method in section 3.5 and finally ethical aspects in section 3.6.

3.1 Previous Studies

This section gives an overview of some of the previous studies that have been done within the field of autonomous gliders.

3.1.1 Infrared Optical Cameras

Since thermals appear in heat differences, research has been done to be able to detect temperature differences that cause the appearance of thermals. This detection has been done with infrared and optical cameras mounted on the glider. But even if the infrared cameras were able to see some thermals it was not able to detect minute temperature variations in the air nor warm patches on the ground that cause thermals to rise. This resulted in that the issue about detecting thermals was still unsolved. [12]

3.1.2 Trained Robotic Gliders

At the University of California in San Diego have physicist trained robotic glid- ers to be able to soar like a bird. To be able to train the gliders they used reinforcement learning to train gliders to autonomously navigate atmospheric thermals. Reinforcement learning is a technique within the field of machine learning that are inspired of behavioral psychology. The technique is based on that the agent learns how to behave in an environment that are based on preformed actions and results. [6]

3.2 Qualitative and Quantitative Methods

There are basically two research approaches to be able to collect and analyze data: qualitative and quantitative methods. [14] Quantitative research is ex- pressed in graphs and numbers. This method is usually used to test or confirm assumptions and theories. When collecting data, one can use surveys, content analysis or experiment research. Qualitative method is less controlled and are used to gather in-depth insight on topics that are not well understood. Some examples of this qualitative methods could be interviews or discourse analysis.

[18]

(15)

The data that was needed to be able to verify the positive effects of the collaboration between the planes was how the flight time and amount of simula- tions ending in a reach of the global target had improved when the collaboration was implemented compared with no collaboration. This result would easiest be analyzed in displayed graphs and therefore was the quantitative method chosen for this thesis.

3.3 Research Method

Figure 6 illustrate the work process for this thesis, all stages are explained below. In this section, you will be able to find; the pre study in section 3.3.1, the problem analysis in section 3.3.2, the literature study in section 3.3.3, the implementation in section 3.3.4 and the evaluation in section 3.3.5.

Figure 6: An illustration of the research method used for this thesis.

3.3.1 Pre Study

In the pre study we did research about the subject to be able to get an overview of potential issues that could be relevant for the future work. During this phase we tried to get in contact with pilots that are competing with gliders today to be able to gain information about what techniques that they are using today to find thermals.

3.3.2 Problem Analysis

When the pre study was done, we had gained a lot of information about the subject and we had gotten a good understanding of potential issues that later could be developed to problem formulations. It was obvious that the chosen project was more complex than we first thought. This resulted in that we needed to scale down the project to make it possible to implement within the limited time that was set for the thesis.

3.3.3 Literature Study

The literature study was made to understand already known techniques within the subject and what techniques that might be usable for the project. The

(16)

research was for the most part found through Google and KTH’s electronic library [20]. Most of the information was gathered through research papers and literature within the field.

3.3.4 Implementation

Since we wanted to simulate the planes’ flights, we decided to implement a virtual world. In this virtual world we added thermals, planes, and a global target. The global target would be used to be able to decide the direction of the planes. In this virtual world could we later add rules to the planes to be able to see how their flights was affected of the added rule.

During the implementation of the simulation program continues discussions where held of this thesis to ensure the next planned rule was needed. We checked if any changes to the planned rule were needed both before and after implemen- tation. The next rule was worked on after the previous one was controlled and approved, making sure we implemented one working rule at the time.

3.3.5 Evaluation

Evaluation was done continuously with a check preformed after every implemen- tation of a rule to ensure the wished result. The evaluations of the rules were done through 2D and 3D graphs from the flight paths the planes took during a given simulation. To be able to test the planes and their flights we decided to run the simulations 10 000 times. Since the gliders should not be implemented in real life, we decided that 10 000 times of simulations would be enough to get an overview of the result. If the collaboration should have been implemented to real gliders, we would have done more simulations to make sure that the gliders would not be a danger for others.

For each of the 10 000 different simulations, we tracked and displayed the simulations run time and how many planes that had crashed in every simulation.

The result was later analyzed to be able to understand how the planes flights had improved with rules compared with the simulations without rules. The analysis was done by comparing the different simulations and discuss the reason for the improvements. The result the analysis was supposed to reach was the positive effects that the implementations of the rules had.

3.4 Reliability and Validity

Reliability is commonly used in research to be able to evaluate the quality of the research. [15] Reliability describes the consistency of a measure [15] and since we have used a virtual world when simulating this thesis the conclusion of this work would be considered reliable if an identical world would have been built again. However, an implementation of the thesis could be implemented in many ways such as different number of thermals, which could change the result of the thesis. Therefore, is the result of this thesis considered reliable if the world is created in the same way.

(17)

Another commonly used tool to be able to evaluate the quality of research is validity, which describes the accuracy of a measure [15]. The work that is presented in this thesis could be implemented in the real world with some changes and additions of rules. We did not focus on the environment in this project, which results in that an implementation of this with real gliders would require considerations for example, trees or flying objects. Furthermore, would we consider this project valid even though it would require some additions to the project when implementing it physically. The system would still probably work even if the gliders had to include more information when flying in the air.

3.5 Alternative Method

There are different ways this project could have been implemented, for example we could have programmed real gliders to be able to collaborate. However, this would require a lot of technique and equipment. Since the time was limited for this project, we chose the method that was the most fitting for the time limitation.

3.6 Ethical Aspects

There is always important to consider ethics when a project like this is done.

Before, during and after the project ethical aspect was put to consideration.

The purpose of this thesis was to be able to replace drones in some fields, like for boarder surveillance to be able to prevent illegal activities. Of course, this could be used in a wrong way but after discussion we concluded that that no ethical aspects have been violated in this thesis.

(18)

4 Model Description

This chapter explains the implementation of the world. In section 4.1 the world will be described, in section 4.2 the thermals will be described followed by section 4.3 about the planes.

4.1 The World

A coordinate system was used to implement the world for the simulation. The coordinates were needed to be able to keep track of the objects in the world during the simulation. To be able to keep the coordinate system concurrent with the gliders’ glide ratio, a step in the coordinate system was defined as twenty-four meters horizontally and one meter vertically. In figure 7 below, the coordinates that was used are illustrated. These coordinates were considered as the world that later should contain different objects.

Figure 7: The world

4.2 Thermals

When the shell of the world was created, illustrated in figure 7, the next step was to implement thermals and place them in the coordinate system. When the thermals were added to the coordinate system, their coordinates were random- ized but still limited to a specific part in the coordinate system. The limitation was needed to be able to collect the thermals in the part of the world that would be of use for the simulation. However, the thermals were implemented as cylin- ders and to be able to illustrate the thermals’ natural appearance in nature, they got a randomized radius between 48 to 144 meters and a specific strength, which was randomized between one to three meters per second. The world con- sisted of one hundred thermals with these mentioned properties randomly was

(19)

placed out between the start of the planes and the global target.

In section 2.1 thermals was explained and the section described that thermals are created at the height of 100 to 200 meters. Even if thermals do not exist below this height, we decided to implement the thermals in the simulation from the ground to a fixed height between 500 to 1 000 meters. The reason for this implementation was that we accounted the roots in the simulation since the roots also could affect the movement of the air. In figure 8 the world containing thermals are illustrated.

Figure 8: The world containing thermals

4.3 Planes

When the world was created and contained thermals, the next step was the implementation of planes. The planes were implemented in a similar way as the thermals, but in comparison to the thermals, the planes were only one dot in the coordinate system. The planes were placed in the world, at the same x and z coordinates, illustrated in figure 9, but the y coordinate was randomized. The reason for the fixed x coordinate was that we wanted the planes to start from the same line but exactly where, at that line they started, was not relevant. Like the thermal, the planes were also limited and could not be spread out too far on the y-axis. The reason for this was the probability that the planes probably would be started at the same local area and not at different continents.

(20)

Figure 9: The world containing thermals and planes

The planes height was implemented as a number that, during the simulation, gradually dropped until reached zero. When the plane reached zero in height, the plane was considered crashed since a vertical value of zero was classified as the ground.

To be able to get a height drop, as similar as it would be in nature, we decided to redefine the coordinates. To be able to redefine the coordinates, we used a previous study about autonomous gliders and their sink rate. In the pre- vious study, The Montague Cross-Country Challenge [7], a sink rate has been shown as 0.47 meters per second when the glider’s horizontal velocity has been 11.2 meters per second [7]. Since we have chosen to not focus on what type of model glider that is being used in the thesis, we decided to use the sink rate and velocity displayed in The Montague Cross-Country Challenge. This could easily be changed if future studies would require other numbers. Equation (1) below concludes that for almost every horizontal 24 meters, the glider drops about one meter in height.

horizontal

vertical = 11.2

0.47= 23.83 ≈ 24 (1)

To facilitate the numbers to this report, we decided to simplify the equation with even numbers. In this thesis, one step in the horizontal plane equals twenty- four meters and a drop of one step in the vertical plane equals one meter. This height drop is illustrated in figure 10, which also shows the world that was used during the simulation.

(21)

Figure 10: Planes’ movement in the world

4.4 Global Target

The thing that was implemented to the world before the rules for the plane was implemented was the global target. The global target was used to be able to steer the planes towards one specific direction. In figure 11 a 2D illustration describes the movement of the planes. Imagine a field that the planes should scan over, the planes should start at one specific x-coordinate, but exactly where on the y-axis is not relevant since the most important thing is to scan the field.

The target was set in the same way but way down the x-axis as illustrated in 11. In conclusion, the planes should just move down to the global target that was set as the ’end of the field’ that should be scanned.

The global target that these simulations used was at the horizontal x-coordinates 4000 and y-coordinates 300. This global target was chosen as it was impossible for the gliders to reach without finding several thermals during flight and the x-coordinate is bigger to increase the readability of the flight graphs.

(22)

Figure 11: Movement towards the global target

(23)

5 Implementation

This chapter explains the implementation of the rules that have been used to make the planes collaborate with each other. Section 5.1 introduces the im- plementation stage with how the print functions was implemented, followed by section 5.2 that introduces the first rule about the planes’ reactions when they are in a thermal. The second rule about avoid collisions is covered in 5.3. Rule number three, change target, is introduced in section 5.4 followed by rule num- ber four, been here before, explains in section 5.5. Then the last rule, when leaving a thermal, explains in section 5.6 we explain the plotting in section 5.7 and finally the hierarchy in section 5.8.

5.1 Print

When the world was defined and the planes could travel through it, the natural next step was to create a reasonable print that would show all information needed to be able to analyze the planes’ flights. The only information that was shown during the simulation, was if a plane crashed. This information was given as shown below.

• Plane n crashed at x, y after m minutes

The simulation could be stopped in two ways: if all planes crashed or if the time limit were reached. The information given when the simulation was done, was displayed as shown below.

• Duration time

• Plane 1 crashed at the coordinates x1, y1 after m1 minutes.

• Plane 2 crashed at the coordinates x2, y2 after m2 minutes.

• Plane n crashed at the coordinates x, y after m minutes.

When the basic prints were implemented and worked, we decided to add another print to the simulation. Later in the process we wanted to plot the planes to get a clearer overview of the planes’ decisions and flight paths. To be able to analyze the planes’ flight further, the simulation also wrote the planes coordinates to a data file giving the location rounded off to one decimal for every glider and simulation step as illustrated in figure 12. This was done to be able to create a plotting later in the process. The columns in figure 12 represent the x-, y- and z-coordinates for each plane in that order left to right.

Figure 12: Example of how the coordinates data is formed

(24)

5.2 Rule I: In a Thermal

When the print functions worked, the next step was to add the first rule to the simulation. The rule was about the planes’ reaction when it was in a thermal.

When a plane was in a thermal their vertical coordinates raised since the thermal used its strength to add height to the plane. This was used when we implemented rule number one. The planes constantly checked if their vertical position was rising or not, and if the vertical position raised, then the plane was in a thermal.

The information about where the thermal was in the coordinate system, was then saved to the planes’ shared memory. The position that was saved was the coordinates of the plane’s present position. This was done, only if the position was not previously in the memory, otherwise no information was saved to avoid excessive amounts of data.

5.3 Rule II: Avoid Collisions

In section 2.2, swarm intelligence occurrences in nature and three rules that can be implemented to achieve this in autonomous entities was introduced. The three rules, mentioned in section 2.2, was put to consideration in this stage.

Even if separation, alignment, and cohesion was important when implementing a swarm behavior, we decided to focus on the separation. Since when planes were not in a thermal, they should spread out to be able to cover as large area as possible. If the planes always stayed in a swarm the idea of detecting larger areas would fail. The most important step in the thesis was to avoid collisions and therefore a rule of separation was introduced.

When considered the future potential usage of this technology, to discover larger areas, we decided that the minimal distance between the planes should be dependent on the planes’ present goals. If the planes current local goal was the global target, the distance between the planes should be at least four steps.

This distance was chosen to be able to discover a larger area when traveling from point A to B. This rule would change if the local goal were to visit a thermal. When the planes were in a thermal it might not be possible with four steps away from the closest plane. In that situation all the planes needed to be able to use the thermal’s energy to vertically rise and therefore it was enough with one step. Important to notice is that when the planes reach the top of a thermal, they were going to separate and spread out to the distance of four steps.

5.4 Rule III: Change Target

The goal for the planes was to reach the global target, but in some cases the planes could not be able to reach the goal before the plane crashed. Therefore it was important that the planes was able to take local decisions about when it was worth to keep flying towards the global target and when it was necessary to fly towards a thermal to gain height. After discussion we decided that, if the plane could not reach the goal with the current height, the plane should set the

(25)

local goal to the closest thermal if it was reachable before crashing. This was made by applying some extra functions to the planes motion, which resulted in that the planes checked how far the planes could reach with the current height and speed.

5.5 Rule IV: Been Here Before

When implementing the fourth rule to stop the plane from entering and exiting the same thermal repeatedly, we decided to implement a memory for each plane.

In the memory, we stored information about what thermals that the plane visited. This information could later be used to avoid that the plane would revisit the same coordinates as before. When the plane noticed that it could not reach the target from the current position, it would start to check for thermals in the shared memory. If the closest thermal were one that also existed in the plane’s own memory, the thermal should be avoided and the second closest thermal would be considered as the closest one.

5.6 Rule V: When Leaving a Thermal

After the planes received the ability to move to a thermal discovered by another plane, they would exit from similar coordinates and move towards the global target. As this resulted in that several planes took the same route and therefore nullified the benefit of collaboration, we decided that the planes needed to spread out after a thermal. So, after exiting a thermal the planes should disperse in a coordinated matter. To cover a wider area whilst not moving to far of the target course. One plane should continue straight towards the target while the other planes’ horizontal global target coordinates needed to be manipulated for a time. The planes that steered of also needs to do it with different angels on the different sides.

5.7 Plotting

To receive a clear understanding of how the gliders moved in the created world and how the decisions effected the gliders during the flight, a visual plotting of the gliders flight was decided upon. To be able to do the plotting, the simulation wrote the coordinates of the gliders to columns in a data file. The data file was later used in a plotting program that illustrated the planes appearance. Given the x- and y-coordinates for 2D graphs or the x-, y- and z-coordinates for 3D graphs, the plotting program was able to show the flight path of every glider.

In the formatted data file produced by the simulation, the plotting program read the first value as the x-coordinate, the second as the y-coordinate, and if it was a 3D graph, the third was the z-coordinate for plane number one. The coordinates for the second plane was followed in the same manner and did so until the last plane.

(26)

5.8 Hierarchy

To be able to get a better visual understanding of the simulation, a hierarchy graph was created. The graph illustrates how the individual plane thought from the start of each step. How it moved down the decision tree dependent on the information it had of its current situation and made its next move dependent of this.

Figure 13: A overview of the rules hierarchy

(27)

6 Evaluation

To be able to analyze the potential improvements of the flight time, we ran the simulations 10 000 times with and without collaboration rules. From each simulation, we got how many planes that crashed and the time in minutes it took for all the planes to either reach the target or crash. This data was represented in the graphs below.

In figure 17, figure 18 and in figure 19, the y-axis was scaled to represent percentages of results for the simulations. Figure 17 is a cumulative graphs that goes from zero to 100 percent of the results. Whilst figure 18 and figure 19 are bar graphs representing the amount of planes that crashed in every simulation.

In these figures the purple color represents the simulations without rules. Whilst the green color is for the simulations with rules.

Figure 17 below, in a bit above twenty percent of the simulations none of the planes found a thermal and therefore crash after about 33.5 minutes. In the graph we see that around 40 percent of the planes has crashed before 60 minutes of flight time. At 100 minutes about 70 percent of the simulations with rules has stopped whilst a bit over 85 percent of the simulations without rules has ended. No simulation without rules lasted longer than 220 minutes and for the simulations with rules; no simulation lasted for longer than 265 minutes.

Figure 14: Purple line = No Collaboration, Green line = With Collaboration Figure 17 and figure 19 shows two bar graphs of how many planes that crashed in every simulation. When a plane reached the global target, it is not seen as crashed. Figure 19 illustrates that in around 5.86 percent of the simulations with the rules, all five planes reached the target. Whilst it only

(28)

happened a 0.35 percent that planes reached the target for the simulations without rules in the first graph, illustrated in figure 17 below.

Figure 15: Y-axis = Percentage of simulations, Purple bars = No Collaboration

Figure 16: Y-axis = Percentage of simulations, Green bars = With Collabora- tion

(29)

7 Result

To be able to analyze the potential improvements of the flight time, we ran the simulations 10 000 times with and without collaboration rules. From each simulation, we got how many planes that crashed and the time in minutes it took for all the planes to either reach the target or crash. This data was represented in the graphs below.

In figure 17, figure 18 and in figure 19, the y-axis was scaled to represent percentages of results for the simulations. Figure 17 is a cumulative graphs that goes from zero to 100 percent of the results. Whilst figure 18 and figure 19 are bar graphs representing the amount of planes that crashed in every simulation.

In these figures the purple color represents the simulations without rules. Whilst the green color is for the simulations with rules.

Figure 17 below, in a bit above twenty percent of the simulations none of the planes found a thermal and therefore crash after about 33.5 minutes. In the graph we see that around 40 percent of the planes has crashed before 60 minutes of flight time. At 100 minutes about 70 percent of the simulations with rules has stopped whilst a bit over 85 percent of the simulations without rules has ended. No simulation without rules lasted longer than 220 minutes and for the simulations with rules; no simulation lasted for longer than 265 minutes.

Figure 17: Purple line = No Collaboration, Green line = With Collaboration Figure 18 and figure 19 shows two bar graphs of how many planes that crashed in every simulation. When a plane reached the global target it is not seen as crashed. Figure 19 illustrates that in around 5.86 percent of the simulations with the rules, all five planes reached the target. Whilst it only happened a 0.35

(30)

percent that planes reached the target for the simulations without rules in the first graph, illustrated in figure 18 below.

Figure 18: Y-axis = Percentage of simulations, Purple bars = No Collaboration

Figure 19: Y-axis = Percentage of simulations, Green bars = With Collabora- tion

(31)

7.1 Swarm Intelligence

When the implementation was done for this thesis and the simulations with all the rules had showed its results it was discussed if the thesis really was implementing swarm intelligence. As described in previous chapters we had only implemented one rule of Boids which means that the swarm intelligence never was implemented. Important to notice is also that the birds in a swarm take local decisions independently of other birds, which is also not the case in this project. To be able to increase the gliders possibilities to detect and use thermals, a global memory was created in this thesis to be able to gather information about thermals close by.

With this taken to consideration, we would still argue that the thesis had a positive outcome since the addition of rules to the gliders increased the gliders usage of thermals and possibility to detect them. The result for this thesis could therefore be classified as that the gliders was with the rules able to detect more thermals since there were more planes available to share information to the other planes about where thermals were positioned. The other goal about the improvement of usage of thermals could also be classified as complete since the increased knowledge of where thermals were positioned in the close by area increased the usage of the thermals.

7.2 Implementation in Real Life

To be able to implement this project to the real world some more rules have to be put to consideration. In this thesis we have not been focusing on the gliders’

surroundings like trees, cliffs or other planes or birds close by. If extra rules to make the planes adjust to the real life surroundings do not get implemented this would probably result in collisions.

Another important thing is that before the system gets implemented in real life it would also be preferable to run the simulations more than 10 000 times to be able to get as exact data as possible to prevent possible accidents.

Even if some extra rules have to be implemented to be able to develop a secure system that is able to soar in real life, we believe that it would be possible to implement the collaboration rules in a system for real life use. Birds, like common swift, are able to stay aloft for ten months without landing [3] so by inspiration from their techniques could result in gliders that are able to stay aloft for a very long time period.

(32)

8 Conclusion

In this thesis we have created a virtual world to be able to simulate gliders. The goal of the thesis was to find a way for the planes to collaborate to be able to im- prove the planes availability to detect and use thermals. We have implemented five different rules for the planes to be able to make this improvement.

We saw that all five rules were essential for the planes to properly benefit from the collaboration. The improvements in flight time and the steep increase in how often the planes could reach the global target shows the positive effects these simple rules have. It showed during the implementation that the believed need for a swarm behavior in the group of planes was exaggerated, as the planes needed to spread out on a line to cover a more optimal area instead of cluster- ing in a circle like formation. So, we ended up only implementing the rule of separation out of the three rules that Boids [4] had brought forward.

In chapter 7, the results were presented, which showed that the planes’ flight time had improved. After 150 minutes of the simulation it was 16 percent more simulations that ran when the rules were used, compared with no collaboration rules at all. The simulations that ran for the longest time was improved by 40 minutes.

When looking at the number of planes that had reached the global target the results had gone from 0.35 percent to 9.82 percent with the five rules im- plemented. 5.86 percent out of these 9.82 percent was where all five planes had reached the global target. This concludes that, given that thermals exist close by the planes and the global target, the implementation of all five rules resulted in a way for the planes to collaborate. This collaboration had improved the planes’ possibility to detect and use thermals which was the goal for this thesis.

8.1 Future Studies

This field has more to discover and the development of autonomously commu- nicable gliders could result in an interesting and sustainable future within many fields. Some suggestions for future studies could be to handle more planes to be able to detect a larger area and improvement of how to implement the ther- mals to the world. In this thesis the thermals have been constants formed like cylinders, but in the reality the thermals are more complicated than that. For example, do thermals’ appearance have a limited time.

Another suggestion for future work would be to implement the planes and some functions of the planes by using different processes. It would be interesting to see the difference between processes and the implementation used in this thesis.

A real-world implementation of these rules in autonomous gliders could also be an idea for future work within this field. To see if this thesis can be the base for real world implementations.

(33)

References

[1] Wayne M. Angevine. “Thermal Structure and Behavior”. In: (). url: http:

//www.rcsoaring.com/docs/thermals_2006.pdf. (accessed:20.03.2020).

[2] ArduPilot. Soaring. 2019. url: https://ardupilot.org/plane/docs/

soaring.html. (accessed:19.03.2020).

[3] Helena Bergqvust. Swifts are born to eat and sleep in the air. 2020. url:

https://www.science.lu.se/article/swifts- are- born- to- eat- and-sleep-in-the-air. (accessed: 06.06.2020).

[4] Boids. url: http://www.red3d.com/cwr/boids/. (accessed:18.03.2020).

[5] Bart Custers. The Future of Drone Use. 2215-1966. T.M.C. Asser press, The Hauge, 2016. isbn: 978-94-6265-132-6.

[6] Cynthia Dillon. Physicists Train Robotic Gliders to Soar like Birds. 2018.

url: https://ucsdnews.ucsd.edu/pressrelease/physicists-train- robotic-gliders-to-soar-like-birds. (accessed: 05.06.2020).

[7] Daniel J. Edwards and Larry M. Silverberg. “Autonomous Soaring: The Montague Cross-Country Challenge”. In: Journal of Aircraft 47.5 (2010), pp. 1763–1769. doi: 10.2514/1.C00028. url: https://arc-aiaa-org.

focus.lib.kth.se/doi/pdf/10.2514/1.C000287. (accessed:19.03.2020).

[8] Paul R. Ehrlich, David S. Dobkin, and Darryl Wheye. birdStand. url:

https : / / web . stanford . edu / group / stanfordbirds / text / essays / Soaring.html. (accessed:28.05.2020).

[9] Peter Friederici. How a Flock of Birds Can Fly and Move Together. 2009.

url: https://www.audubon.org/magazine/march- april- 2009/how- flock-birds-can-fly-and-move-together. (accessed:18.03.2020).

[10] Glider Handbook, chapter 3. url: https://www.faa.gov/regulations_

policies / handbooks _ manuals / aircraft / glider _ handbook / media / gfh_ch03.pdf. (accessed:28.05.2020).

[11] Stockholm Segel Flyglklubb Gloria. Vad är segelflyg ? 2017. url: https:

//www.ssfk.se/UtbildningochProvapa/Vadarsegelflyg/. (accessed:19.03.2020).

[12] Andrey Kolobov. Autonomous soaring – AI on the fly. 2019. url: https:

//www.microsoft.com/en- us/research/blog/autonomous- soaring- ai-on-the-fly/. (accessed:19.03.2020).

[13] Yang Liu and Kevin M. Passino. “Swarm Intelligence: Literature Overview”.

In: (Mar. 2000). url: https : / / pdfs . semanticscholar . org / 9e25 / 311e91fd1e3d1cd2e1249a6509bcc7433c0f.pdf.

[14] Shona McCombes. methodology1. 2020. url: https://www.scribbr.com/

dissertation/methodology/. (accessed:28.05.2020).

[15] Fiona Middleton. Reliability vs validity: what’s the difference? 2020. url:

https://www.scribbr.com/methodology/reliability-vs-validity/

#:~:text=Reliability%20and%20validity%20are%20concepts, the%

20accuracy%20of%20a%20measure.. (accessed: 05.06.2020).

(34)

[16] Modellsegelflyg.se. findT. url: http : / / www . modellsegelflyg . se / StaticContent.aspx?pageid=48. (accessed:28.05.2020).

[17] NASA. Gliders. url: https://www.grc.nasa.gov/www/k-12/airplane/

glider.html. (accessed:19.03.2020).

[18] Raimo Streefkerk. methodology2. 2020. url: https://www.scribbr.com/

methodology/qualitative-quantitative-research/. (accessed:28.05.2020).

[19] Anam Tahir et al. “Swarms of Unmanned Aerial Vehicles — A Survey”. In:

(Apr. 2020). url: https://www.sciencedirect.com/science/article/

pii/S2452414X18300086.

[20] the Royal Institute of Technology’s (KTH) electronic library. url: https:

//kth- primo.hosted.exlibrisgroup.com/primo- explore/search?

sortby=rank&vid=46KTH_VU1_L&lang=sv_SE. (accessed: 17.03.2020).

[21] Stephen Wilkerson et al. “Aerial swarms as asymmetric threats”. In: (Apr.

2020). url: https : / / ieeexplore - ieee - org . focus . lib . kth . se / document/7502615.

[22] Zipline drone delivery system. url: https : / / flyzipline . com/. (ac- cessed:24.04.2020).

(35)

TRITA-EECS-EX-2020:250

References

Related documents

What is interesting, however, is what surfaced during one of the interviews with an originator who argued that one of the primary goals in the sales process is to sell of as much

However, for the initial development of meshless numerical methods for the diaphragm simulations, we use linear elasticity test

Enligt de australiensiska förskollärarna kan föräldrarna ibland behöva akut hjälp av utbildad förskolepersonal för att lära sig hur de skall hantera sina barn, enligt svensk

In the second part of the interviews, the feature of a monetary compensation was introduced. The attempt was to find an answer to the second research question of this thesis,

Felice, Dorcas friend, does not take up a lot of the novel, but when it comes to the narrator she is important, because she is the only one in the book to speak almost exclusively

The data for the application is separated in three parts: A list of the components in the beam stored as an array of structs, the initial data of the beam also stored as a struct

These flow pattern data are used as inlet data to a flow simulation program in order to obtain a detailed flow pattern picture inside the flow meter under consideration.. The

In this section the statistical estimation and detection algorithms that in this paper are used to solve the problem of detection and discrimination of double talk and change in