72
Modeling and Flying Thermal Tubes with an UAV Semester Thesis Report Erik Fonseka, 18.04.2007 Supervisor: Andr´ e Noth Autonomous Systems Lab Prof. Roland Siegwart ETH Z ¨ urich

Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Modeling and Flying Thermal Tubeswith an UAV

Semester Thesis Report Erik Fonseka, 18.04.2007Supervisor: Andre Noth Autonomous Systems LabProf. Roland Siegwart ETH Zurich

Page 2: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Contents

1 Introduction 4

2 Investigation and State of the Art 52.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Vocabulary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3.1 A Parametric Model of Cumulus Convection . . . . . . . . . . . . . 72.3.2 The Representation of Cumulus Convection in Numerical Models 72.3.3 Entwicklung eines Turbulenzmodells fur Auftriebsstromungen . . 72.3.4 Large-Eddy Simulation of Cumulus Convection . . . . . . . . . . . 82.3.5 The Paths of Soaring Flights . . . . . . . . . . . . . . . . . . . . . . . 82.3.6 Soaring Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3.7 Technik und Taktik des Segelfliegens . . . . . . . . . . . . . . . . . 82.3.8 Flight without Power . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3.9 Der Einfluss der Topographie der Erdoberflache auf die Vertikalsondierung

des Temperaturprofils . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3.10 Handbook of Meteorological Forecasting for Soaring Flight . . . . 9

2.4 Papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.1 A One-Dimensional Cumulus Model Including Pressure Pertur-

bations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.2 A Numerical Study of the Initiation of Cumulus Clouds over

Mountainous Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.4.3 An Introduction to Boundary Layer Meteorology . . . . . . . . . . 102.4.4 A Multiparcel Model for Shallow Cumulus Convection . . . . . . . 102.4.5 Heuristic Control of Dynamic Soaring . . . . . . . . . . . . . . . . . 102.4.6 Minimum Fuel Powered Dynamic Soaring of Unmanned Aerial

Vehicles Utilizing Wind Gradients . . . . . . . . . . . . . . . . . . . 102.4.7 Control Law Design for Improving UAV Performance Using Wind

Turbulence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4.8 Measurements of Thermal Updraft Intensitiy over Complex Ter-

rain Using American White Pelicans and a Simple Boundary-Layer Forecast Model . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1

Page 3: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.4.9 Ein Zweidimensionales Modell mit Variabler Horizontaler Auflosungzu Simulationen von Cumuluswolken: Aufbau und Anwendungen 11

2.4.10 Updraft Model for Development of Autonomous Soaring Unin-habited Air Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4.11 Guidance and Control of an Autonomous Soaring UAV . . . . . . . 122.4.12 Just Keep Flying: Machine Learning for UAV Thermal Soaring . . 122.4.13 Autonomous Dynamic Soaring Platform for Distributed Mobile

Sensor Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5 The Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.5.1 Cumulus Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5.2 Tips for Paraglider Pilots . . . . . . . . . . . . . . . . . . . . . . . . 13

2.6 Interviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.6.1 Model Aircraft Pilot - Markus Ninck . . . . . . . . . . . . . . . . . . 142.6.2 Model Aircraft Pilot - Christian Spengler . . . . . . . . . . . . . . . 152.6.3 Meteorological Scientist - Thomas Spengler . . . . . . . . . . . . . . 162.6.4 Paragliding Pilot - Erik Fonseka . . . . . . . . . . . . . . . . . . . . 17

3 Modeling Thermals 193.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 Analysing Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3 Elliptic Pipe Model of a Thermal Tube . . . . . . . . . . . . . . . . . . . . . 19

3.3.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3.2 Elliptic Pipe Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.4.1 Selecting Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.4.2 Integrating Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.5 First Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 Exploiting Thermals 304.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.2 Analysing Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.3 Extracting Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.3.1 Selection of Relevant Features . . . . . . . . . . . . . . . . . . . . . . 314.3.2 Discussion of Features . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.4 Elliptic Pipe Estimation Strategy . . . . . . . . . . . . . . . . . . . . . . . . 414.4.1 Thermal Exploiting Low Level Control (T-LLC) . . . . . . . . . . . 414.4.2 Thermal Exploiting High Level Control (T-HLC) . . . . . . . . . . . 41

4.5 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.5.1 T-LLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.5.2 Thermal Estimator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.5.3 T-HLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.6 First Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

2

Page 4: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

5 Results 575.1 Test Flights for the Sky-Sailor . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.1.1 The Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575.1.2 The Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6 Conclusions 64

7 Future Work 657.1 Modeling Thermals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657.2 Static Soaring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

7.2.1 T-LLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657.2.2 T-HLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

7.3 Dynamic Soaring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Appendices 70

A Formulas 70A.1 Tait-Bryant Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70A.2 Rotation of proj. Direction of Flight around z-axis . . . . . . . . . . . . . . 70

3

Page 5: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 1

Introduction

The Sky-Sailor is a fixed wing UAV which has got many sensors and solar pannels on thewings. The long term aim for the Sky-Sailor is it to have the ability to stay airbornedover long periods (possibly weeks), while charging the onboard battery during the daywith the solar pannels and using the motor during the night.Energy is the crucial part of the Sky-Sailor. It has been build with a very light construc-tion. In order to be able to reach the aimed task, every energy source which can beexploited has to be used.The aim of the current work is to gain more (potential) energy during the day by circlingin thermal tubes. These are tubes of warm air rising to the sky, having an warmth sourceon the ground, such as a dry corn field or rocks which have been warmed up by the sun.Or simply any surface with the ability to convert light into warmth and storing it.As the Sky-Sailor brings along a rich set of sensors which provide the controler withall 6DOFs (and their derivatives), the environment such as wind and updraft can beestimated and the Sky-Sailor controled accordingly. In this work the theoretical founda-tion for extracting relevant information from the sensors is given and a simple versionimplemented.The Sky-Sailor comes along with a simulator, which consists of both the simulation ofthe Sky-Sailor in the air and the controler. At the moment, the controller is able to flycircles around a fixed center, even under influence of some global wind. To extend theframework - which is written in Simulink - a model for thermal tubes is created andimplemented first. Then an appropriate strategy to exploit thermal tubes is developedand implemented too.

4

Page 6: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 2

Investigation and State of the Art

2.1 Overview

There are many things which might help get into this project faster. So I summarizedeverything I learned in the investigation which might help to speed up the ”warmingup” of future works.

During the investigation, I viewed several books and papers, which I will summa-rize w.r.t. the relevant information concerning this project. I would like to mention thatsome of these books were not useful, however, one doesn’t know this in advance. Today,I would suggest to concentrate more on approximations in fluid dynamics (which is agreate field in the computer graphics area) and less on meteorological simulations, asthey are far too macroscopic. Furthermore they need a lot of computational power.

The web has also a lot of relevant information about basic physics in fluid dynam-ics or thermal flying strategies. However, not knowing the terms used in meteorology,fluid dynamics or general physics, the search was quite tedious.

So I also have a list with the vocabulary in this field.

Several interviews were also held with glider pilots, paragliding pilots and meteo-rologists. The relevant information is also presented.

2.2 Vocabulary

In my investigation I was confronted with many technical and meteorological terms,which I will summarize here.

Buoyancy ”In physics, buoyancy is the upward force on an object produced by the surroundingfluid (i.e., a liquid or a gas) in which it is fully or partially immersed, due to the pressuredifference of the fluid between the top and bottom of the object...” from [en.07a].

5

Page 7: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Up-/Downdraft Often, these terms are used to refer to the vertical component of thewind.

Gust Gust is simply a blow of wind for a small time intervall.

Static Soaring This is the generalized expression for using thermal updrafts to gainmore energy. It refers to any strategy which aims for exploiting vertical windvelocities. In the literature, this is the complement to dynamic soaring and is shownto be much easier to handle.

Dynamic Soaring In contrast to thermal flying strategies, dynamic soaring uses globalhorizontal wind to gain height. This might look infeasible at the first glance,however, using the different velocities of the wind at different heights, there arestrategies to somehow in a dolphin-style manner iterativly convert speed intoheight and vice versa in an asymmetric manner, which continuously leads to morepotential energy.

Navier-Stokes Equations ”The Navier-Stokes equations [...] are a set of equations that de-scribe the motion of fluid substances such as liquids and gases...” from [en.07d].

Fully Developed Region In models for fluiddynamics in pipes, fully developped re-gions are these parts of the pipe where the flow is stabilized and has almost noturbulence. At the entry of the pipe this is often not yet the case.

Stabalized Region In models for fluiddynamics in pipes, this is a synonym for a fullydeveloped region which stands for these parts of the pipe where the flow isstabalized and has almost no turbulence.

Large Eddy Simulation (LES) LES is a numeric approach to calculate turbulent flowsfor liquids with big reynold numbers (such as air). It applies a lowpass to thenavier-stokes-equations to be able to approximate the calculations and thereforesimulate the evolution of the fluid with reasonable computational power.

Boundary Layer This is the first layer of the atmosphere.

Cumulus Clouds These are clouds with vertical development, often created over up-draft regions caused through warmed air.

UAV UAV stands for ”Uninhabited-” or ”Unmanned Aerial Vehicle”.

First Law of Thermodynamics ”The increase in the internal energy of a thermodynamicsystem is equal to the amount of heat energy added to the system minus the work done bythe system on the surroundings.” from [en.07c].

6

Page 8: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.3 Books

Several books might be of use for further works. Most of them were too complex forour purpose. I will give a short summary of them, so one can easily decide whether itmight serve ones purpose. However, the information presented here is not relevant forthe further understanding of the report and can be skiped.

2.3.1 A Parametric Model of Cumulus Convection

This work [Lop72] focuses on cumulus clouds, but as cumulus clouds are just a visiblesubsets of thermals and are a direct result of thermals, a lot of knowledge about thestructure of thermal tubes and there evolution in time is presented. Especially, one getsseveral types of cumulus clouds and their specific evolution in time presented, con-taining qualitative and quantitative information about the spatial character and windvelocities in the core of a cumulus. The model applied by this work takes several pa-rameters and inertial conditions as input, such as ”initial updraft radius” - which relatesto the area which creates a cumulus - or ”duration of initial forcing” - which relates tothe total time the area supports the creation of the cumulus.

However, this work analyses clouds with dimensions of several kilometers in heightand width. In the current semester thesis ”Exploiting Thermals” for the Sky-Glider, thethermals interesting are the ones with radius not exceeding a few hundred meters.

2.3.2 The Representation of Cumulus Convection in Numerical Models

This work [Ema93] parameterizes cumulus clouds, too. However, it is much moredetailed and mathematically expressed than the work from [Lop72]. It describes theevolution of a cumulus in time (in terms of humidity, pressure, wind, ...), the interactionbetween several cumulus and wheather phenomena such as rain and snow.

Again, this work is somewhat too macro scaled for our purpose in ”Exploiting Ther-mals”, but may contain some basics to understand the character of warm air interactingin colder environment. In addition, it holds information about the relation of down-draft und updraft in cumulus clouds. The most relevant part is about convective-scaledowndraft in [Ema93, p.49-53].

2.3.3 Entwicklung eines Turbulenzmodells fur Auftriebsstromungen

Here [Car96], Carteciano creates a model to simulate turbulences resulting from heatsources. It is applied for fluids, where air is supposed to be a fluid, too. In contradictionto the works presented before, the model developed applies to smaller systems, as thisis a work related to nuclear power security research. The author uses parameters likeviscosity, pressure, temperature and their transport.

7

Page 9: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Again, it’s quite detailed, but introduces some easy concepts which could possiblybe used for the purpose of ”Exploiting Thermals”, such as the transport of the mo-mentum and the temperature. However, one might be faster to gather this informationsomewhere from the web.

2.3.4 Large-Eddy Simulation of Cumulus Convection

This work [Cui94] simulates the evolution of clouds with given initial velocities (wind),liquid water potential temperature and humidity. It includes rainfall, too.

It does not seem to be targeting the interests of our project ”Exploiting Thermals”,but seems to have a good introduction into the basis of fluid dynamics. However, thereis no material that could just be ”consumed” to build up a realistic thermal for ourpurpose.

2.3.5 The Paths of Soaring Flights

This book [Irv] gives some simple hints of how a thermal may look like in the rough,based on various experiences made by sailplanes. Furthermore, these thermals are an-alyzed with some simple math concerning the optimal strategy (angel of bank) to fly aparabolic thermal.

For our project the idea of looking for the best angle to turn in is interesting. How-ever, the example presented is done only with a simple thermal model. The optimalspeed is presented on [Irv, p.65-66] as an important factor to climb as fast as possible.

2.3.6 Soaring Guide

This is an old book [Bow66] about flying with manned sailplanes. It tells one howthermals look like, how they can be spotted and how one is able to remain in a thermaltube.

For our project this book gives a hand full of very basic strategies of how to centera detected thermal. Thermals and clouds are described in [Bow66, p.52-66] and soaringtechniques in [Bow66, p.80-88].

2.3.7 Technik und Taktik des Segelfliegens

This is a very old book [Pog64] for flying sailplanes in the sixties. There are a lot of hintsof how to fly a sailplane including landing, starting and turning.

This book is of no use for our purposes.

8

Page 10: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.3.8 Flight without Power

This is a very old book [Bar40] with information about the planes in the forties.

For our purpose, the information is to sparse and not useable.

2.3.9 Der Einfluss der Topographie der Erdoberflache auf die Vertikalsondierungdes Temperaturprofils

This work [Pfi92] shows the influence of the topography on the temperature.

For our purpose this work is of no relevance as it models the temperature of wholecontinents, where we might only be interested in local temperature gradient estimation.

2.3.10 Handbook of Meteorological Forecasting for Soaring Flight

The main information of this book [Met93] is how to forecast the weather. Forecastingthermals and their strength is included.

For our project ”Exploiting Thermals”, this might not be very important at the mo-ment, but could be helpful for future work to be able to estimate the development ofthe conditions for thermals and react accordingly. However, for this purpose, a visualanalysis is necessary in advance to be able to detect clouds, mountains, trees, sunlightstrength and further information required for this task. Prediction of cumulus under aninversion is in [Met93, p.22], estimating the strength of thermals in [Met93, p.23-27] andthe analysis of thermals in mountainous terrain in [Met93, p.28-33].

2.4 Papers

In the following I will summarize the papers I checked. This section is not relevant forthe understanding of the work and can be skiped. However, it might help to get intothe field for further works.

2.4.1 A One-Dimensional Cumulus Model Including Pressure Perturbations

This [Hol72] is a small work which compares modeling a cumulus with and withoutpressure perturbations.

The model used might be relevant to the project ”Exploiting Thermals”. And [Hol72,Figures 1,2,3] may as well give some information on how a thermal looks like.

9

Page 11: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.4.2 A Numerical Study of the Initiation of Cumulus Clouds over Moun-tainous Terrain

This work [Orv65] describes the creation of cumulus clouds. It cares about velocity(wind), humidity, temperature and condensation which results in latent energy. Espe-cially the figures lead to a better understanding of the nature of cumulus developement.

Interesting for the project ”Exploiting Thermal” is the analysis of the stream function inthe figures with the eddy diffusion coefficient.

2.4.3 An Introduction to Boundary Layer Meteorology

This book describes in a good way the basics of simulating turbulent flows, fluxes andvariances. Furthermore, it puts it into the context of the first layer of the atmosphere,which could be relevant for the project ”Exploiting Thermals”.

2.4.4 A Multiparcel Model for Shallow Cumulus Convection

This work [Neg] simulates the evolution of a cumulus cloud, by computing the newparameters of an ensemble of parcels at every timestep. As a consequence, a dynamicalfeedback mechanism is established, based on many research papers from the last fewdecades. It computes parameters like the vertical dynamics and mass flux (=wind).

It seems that the model used could be understood in a reasonable time effort. Fur-ther more, algorithmic aspects are mentioned too (like discretizations). I think that thiswork could give some useful input to what we need in ”Exploiting Thermals”.

2.4.5 Heuristic Control of Dynamic Soaring

This work [Wha] models the strategy of dynamic soaring as an optimization problem.It is well understandable.

2.4.6 Minimum Fuel Powered Dynamic Soaring of Unmanned Aerial Vehi-cles Utilizing Wind Gradients

This work [Zha04] models the strategy of dynamic soaring as an optimization problem.The model aircraft is mathematically defined, as well as the environment. Then, the bestsolution is found by minimizing the cost integral.

As we are modeling thermals in ”Exploiting Thermals”, we do not need to go into thisfield right now, but understanding the mathematics which were done may give somehints how to describe the strategy as a mathematical optimization problem. It seemsto be a very practical approach too, and one might directly implement an algorithmaccording to the given formulas.

10

Page 12: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.4.7 Control Law Design for Improving UAV Performance Using Wind Tur-bulence

This work [Pat06] presents an optimization procedure to design control laws understochastic environment. It tries to make a small UAV to use turbulences as an additionalenergy resource. It states, that significant energy savings are possible.

For our project ”Exploiting Thermals”, this may not be very important at the moment,as we are aiming for bigger updraft regions. However, it could be suitable for furtherwork when optimizing the overall flight.

2.4.8 Measurements of Thermal Updraft Intensitiy over Complex TerrainUsing American White Pelicans and a Simple Boundary-Layer ForecastModel

This work [Sha01] tries to extract the structure of a thermal with respect to the updraftintensity (updraft average on a given height) by analyzing the flights of white pelicans.It comes up with a model to compute the updraft velocities according to the informationgathered. Then, it compares thermal structures over flat land with the structures overmountains. The difference of the structure turns out to be rather small. The model usedto compute the intensities at different heights is simple and validated in several otherpapers mentioned.

For our project ”Exploiting Thermals”, this may be a very important paper. Insteadof letting pelicans fly and gather the information to predict updraft intensities, this maybe done directly with the ”Sky-Sailor”. The horizontal structure may be computed rightaway and applied accordingly to an appropriate strategy. However, local turbulences,distortions and variations seem not to be modeled. This gap will have to be filled upwith other models.

2.4.9 Ein Zweidimensionales Modell mit Variabler Horizontaler Auflosungzu Simulationen von Cumuluswolken: Aufbau und Anwendungen

This work [Bad93] is a very mathematical description of the evolution of cumulus clouds.It takes into concern all meteorological phenomena such as wind, rain and snow.

For our project this book presents a far too complex model. On top of that, it isn’ta 3D simulation and can therefore not be directly used.

2.4.10 Updraft Model for Development of Autonomous Soaring Uninhab-ited Air Vehicles

This article [All06b] models thermal tubes in a simple way by giving average updraftvelocities and radius for a given height, and fitting velocity distributions on every height

11

Page 13: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

into these constraints. Results applying this model to an UAV for thermal detection ispresented in [All06a].

Compared to this project ”Exploiting Thermals”, it seems to be of a complexity whichcan easily be handled, but lacks in modeling characteristics like time dependent develop-ment or modeling turbulences. However, one might consider including the bell-shapedvertical velocity distribution [All06b, p.10] or the average velocity distribution as afunction of height [All06b, p.7], which is basicly a polynomial with a peak in the firstthird of the thermal tube. I won’t recommend to introduce the proposed radii for givenheights [All06b, p.8], as it seems to be totally wrong compared with the reality, where thethermal tube is wider at the bottom and at the top, compared with the radii in mediumheights.

2.4.11 Guidance and Control of an Autonomous Soaring UAV

This report describes how to use Energy acceleration as measure for soaring or thermalsearch and how one should substract the power (derivative of energy) of the motorfrom the derivative of the total energy. The report also shows how to scale the energyacceleration with the energy derivative. The updraft is estimated by the derivationof the energy at any point. The radius is estimated by fitting a thermal model to themeasured updrafts. The radius of the trajectory is set to 0.65 times the thermals radius.The steady-state roll is calculated for the circle around the thermal tube. Then the roll isadapted if there are errors. The trajectory is chosen in a way that it is orthogonal to theupdraft gradient.

This report is very helpfull and gives alot of inputs on how one could design or ex-tend a thermal flying strategy.

2.4.12 Just Keep Flying: Machine Learning for UAV Thermal Soaring

This work from Bower and Naiman [Bow06] uses a simple updraft model from Allen[All06b] working at NASA and provides a simple online learning strategy by using avalue function based algorithm to estimate the vertical updraft at each point within theflying area.

The presented strategy is somewhat too minimalistic. However, the simulation comesup with good results and the UAV was able to remain in thermal tubes once it has foundone.

2.4.13 Autonomous Dynamic Soaring Platform for Distributed Mobile Sen-sor Arrays

This report [Bos02] is a summary of a big project that has applied dynamic soaringfor UAVs by analysing birds, extracting strategies, optimizing them for the UAV and

12

Page 14: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

implementing it in various tests by simulations and real world realizations.

If one would extend the Sky-Sailor with dynamic soaring, this report should be lookedat in a more detailed way, as it presents a lot of results from serious investigations.

2.5 The Web

There are also some sources on the internet which could provide some useful infor-mation. Some of these are directly mentioned in the following and gives one a betterunderstanding of the report.

2.5.1 Cumulus Dynamics

These slides [Loh] from the lecture ”Cloud Dynamics: Hurricanes” give some basic con-cepts of the mathematical description of the dynamics of fluids with respect to pressure,humidity and temperature. As it is the foundation of describing hurricanes, it seems tome to be giving useful information needed for describing thermals.

Concerning the project ”Exploiting Thermals”, I think that this information presented isvery good to gain basic knowledge about the dynamics and - besides - build up a simplemodel.

2.5.2 Tips for Paraglider Pilots

This internet site [Dao] has a huge amount of tips for paragliding pilots. In the section”Thermals”, various situations which one may experience are presented and the optimalbehavior is suggested. However, it is not a scientific site.

For our project ”Exploiting Thermals”, this might be the major information resourcefor modeling thermals and creating strategies to fly them. The main work will be totranslate all this information into a formal notion. Here is a list of the points whichmight be interesting:

• ”If one follows the indications of his variometer : If it indicates an increase in the climbrate, open up your turn (you may even go straight). If the rate of climb diminishes, tightenyour turn as we would otherwise be moving away from the center of the thermal.”

• ”When you feel the thermal pushing up solidly, (or the vario indicates the strongest lift)you should tighten the turn and dig the wing into the thermal. Most pilots do not turntightly enough. When the vario indicates weaker lift or sink, having kept a mental pictureof the best lift location, you should widen the turn and anticipate repeating the procedureat the next surge.”

• ”...choose to fully re-enter or leave the strong thermal but don’t remain in the vertical shearzone.”

13

Page 15: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

• ”If you are rolled left, yawed left, and drifted right, you are below the thermal top in thein-flow region. The thermal is to your right. This is common in unstable conditions, forexample when there are cumulus about.”

• ”If you are rolled left and drifted left you are in the out-flow region above the thermal top,and the thermal is to your right.”

• ”If when flying upwind you observe an increase in ground speed (reduction in wind speed),you may be headed for a thermal blocking the wind.”

• ”When trying to find convergence low down, in that case the air will accelerate towards theconvergence and it is necessary to fight against your instinct. Follow the air’s accelerationto where the convergence lift is.”

2.6 Interviews

I contacted several persons which are somehow related to thermals and gliders. Inthe following I listed up all the relevant information I got from them. Central topicswhere the experiences while entering, being in and leaving a thermal tube with respectto change of pose and translation. Basic numbers about the spatial extend of a thermaltube were discussed. Also thermal flying strategies and unexpected behavior weretopics of the interview.

2.6.1 Model Aircraft Pilot - Markus Ninck

This interview with Mr. Ninck was taken on the 20th december 2006 in Bern. He wasabout to start his master thesis in physics and has many years experience with modelaircrafts.

2.6.1.1 Structure of Thermal Tube

• Often no downdraft is recognized at the borders. Expects the regulation to hap-pen in a bigger context, where one might find areas further away with a lot ofdowndraft.

• Less turbulent at the outer ring than in the center.

• No change of pitch when entering orthogonal into a thermal, only vertical trans-lation.

• Change of roll when touching a thermal on one side.

• When entering a thermal, no critical effect on the sailplane was ever experienced.

• The thermal tube gets wider and less intense with increasing altitude.

• A thermal tube with a radius of five meters can be enough to catch.

14

Page 16: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.6.1.2 Proposed Strategy

• Fly circles with the largest radius possible.

• Once centered in the thermal, the steering intensity is almost constant, even ifthere is a global wind.

• Turn towards the opposite direction of a roll caused by one sided updraft.

• To get better sink-rate (which is more preferable while flying thermal tubes thanbetter gliding-rate) slightly reduce speed by lifting the pitch.

• Reaching the top of a thermal is often quite easy.

• Observe the current change of pose and position and extrapolate for some secondslater. React upon the results in advance and recalculate the new scenario. Do thisiteratively.

2.6.2 Model Aircraft Pilot - Christian Spengler

This interview with Mr. Spengler was taken in January 2007 in Zurich. He is the chiefof the ”Modell Fluggruppe Unterland (MGUL)” of Zurich Oberland.

2.6.2.1 Structure of Thermal Tube

• The thermal has almost always a unique center and is not a set of centers withinthe overall radius.

• There is almost no downdraft at the border or near the thermal tube. Situationswhere one had a sink rate near the tube were rarely experienced.

• In flat regions there are almost no turbulences at the border of or in the thermaltube. The higher one gets, the more stable the thermal tube gets. At the heatinglocation where the thermal heats source is located (roof tops, dry fields, forest inthe evening) the turbulences are often at the strongest.

• Thermals are created at a heating source and do therefore not move at the bottom,but may get shared by the wind in higher altitudes. During the day these sourcesshould be dry and coarse, and for catching this thermal one really must performtight turns (angle = 75°) In the evening a forest may have a lot of energy storedand can create wide range, stable updraft regions where no strategy is needed toget a lift. These updrafts reach to maybe 200 meters averagely.

• A thermal can easily have a height of 1000m and is 5 - 15 meters wide in averageat the bottom.

• A thermal does not start on the ground, but needs a offset height of maybe 50meters before the sum of updrafts form a thermal tube.

• It is realistic to rise up to 600 meters in only 3 minutes (about 4m/s average updraft)

15

Page 17: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2.6.2.2 Proposed Strategy

• One should turn on this side where the wing tip gets a lift. The strength of thisturn should be proportional (in some way) with the strength of the lift itself.

• Turning in the tube, one should also turn upwards (instead of only turning to theleft), as the airplane gets faster and faster and this kinetic energy should directlybe transformed in height.

• To develop a strategy, one can focus on the roll of the sailplane, as the change ofpitch and the yaw is hardly ever observed w.r.t. the influence of thermal updraft.

2.6.3 Meteorological Scientist - Thomas Spengler

This interview with Thomas Spengler was taken in January 2007 in Zurich. He is aparagliding pilot, too.

2.6.3.1 Structure of Thermal Tube

• The thermal can be approximated by the flow of fluids in a pipe. There, thevelocities w.r.t. the radius is quadratic in the fully developed region (stabilizedregion).

• The downdraft caused by the updraft (under the viewpoint of conservation ofmass) is often spread out over a large region. Therefore the velocities are verysmall and can hardly be measured. Modeling a thermal tube, it is not reallyimportant to conserve mass by downdraft, as one can argue that the balancingis taken care of in a region far away of the current location.

• On can calculate the current width of the tube by the vertical flow through the tubeat any given position. At every height, the total flow through the surface must beequally big. Therefore the area times the velocity-average is equal at every height.For given velocities at the center, the area can then be defined in order to conservemass and under assumption of same pressure everywhere (which means that wesimulate incompressible fluids like water instead of compressible fluids like air)

• For a given global horizontal wind, the tube itself is almost not affected in terms ofthe velocities in the tube itself. The wind just flows around the tube as if it wouldbe a fixed pipe. However, the whole thermal tube may get bent in direction ofthe wind. The modeling of this flow around the tube can be computed locallywithin a small distance, where there is no need to compute the effect on the globalwind in regions further away than this distance.

• The border of the thermal can be modeled with small perturbations - added to thevelocities - in random direction and with random strength.

16

Page 18: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

• One should model the thermal within a given bottom to a given top. The thermalshould not start directly at the height of the ground.

• The total height and the velocities at any given height in the thermal tube can bedirectly calculated from a given temperature graph. In this graph the temperatureof the atmosphere w.r.t to the height is given. Given the temperature of an air parcelat the bottom, one can calculate the total height the parcel will reach and with thetemperature difference between the air parcel and the current environment alsothe speed. (So if one could measure the current temperature inside and outsidea thermal tube at two heights, a coarse estimation about the total thermal heightcould be performed and convexly weighted with the estimation by looking at theradius and velocities at two heights)

• To simulate a cloud base (that’s where a cloud is at its lowest), one has to calculatethe height where the temperature of the air parcel cools down to exactly thetemperature of the dew point, which is again derived by the amount of watervapor in the parcel.

• Normally, the updraft velocities are somewhat constant until some height andthen start to go over in decreasing linearly until the top of the thermal tube - wherethe updraft velocity is zero - is reached.

• The temperature of an air parcel normally cools down with 1° per 100 meters. If itcondensates, this energy turns into warmth and the parcel only cools down with0.7° (0.3° - 0.9°) per 100 meters.

2.6.4 Paragliding Pilot - Erik Fonseka

As I am Mr. Fonseka, no interview was held. However, as I am a paragliding pilot, I listup my experiences with thermal tubes.

2.6.4.1 Structure of Thermal Tube

• When entering orthogonal into a thermal tube, one experiences two main lifts.The first one occurs when entering the thermal tube at the boarder, then after afew seconds (about maybe 30m) again the lift increases.

• If one enters a thermal tube sideways, one part of the wing will lift earlier than theother part. If no action is taken, then this results in the paraglider to turn awayfrom the thermal tube.

• If there is a global horizontal wind component, then the thermal tube is pushedaway and it will not be going up straight but will change its position with thewind the higher it gets. However, the position where the thermal tube is createdremains stable, as the source of the heat stays fixed.

17

Page 19: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

• Once in a thermal, flying is quite smooth and calm, where at the boarders thereare turbulences which may also close one side of the wing.

2.6.4.2 Proposed Strategy

• If there is a lift on one side of the wing, then one should turn in this direction.However, a sink on one side should not be misinterpreted as a lift on the otherside.

• Using the differences of lifts of the wings can be used to for relative estimationof updrafts. However, only the absolut vertical translation should be considered,and less sink shouldn’t be mistaken with lift. So, one should consider the changeof total energy of the glider as a measure whether a thermal is found or not. Thiswill also help not to mistake a conversion of cinetic energy into potential energyas thermal updraft.

• Having measured several features at different points in space, one could estimatethe center of the thermal tube at the given height or even for a range of heights.Given a model of a thermal tube, the parameters could be fitted in a maximumlikelihood sense to the measured features, where the features at every point couldbe current updraft speed, strength of turbulences, change of yaw, change of relativevelocity and build upon them estimations of the direction of the center and strengthof the thermal tube.

• One should keep away from the boarder of a thermal tube, as there are manyturbulences there.

• Keep turning in only one direction to minimize the loss of energy during a ”tran-sition state”.

18

Page 20: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 3

Modeling Thermals

3.1 Introduction

For the modeling of the thermal tube I first had to get into some basics of fluid dy-namics. Then a simple circular pipe model was created, which then was extended tothe presented elliptic pipe model. A problem which came up with this task was howone could calculate the horizontal wind components having a pipe which gets larger inheight. The model presented does not consider this possible modification and assumesonly vertical updraft components, but still allowing thermal tubes changing in widthand length.

3.2 Analysing Investigation

I was inspired the most from the talk with Spengler, see (2.6.3). Modeling a thermal tubeas a pipe was chosen for three reasons. First, it is simple enough to be understood andsimple enough to be simulated in reasonable time, in contrary to large eddy simulations(LES) which simulate the weather in a very detailed manner. Second, it allows one tofulfill basic physical rules like conservation of mass. And third it is extendable in manyways to improve the gap between model and reality.

3.3 Elliptic Pipe Model of a Thermal Tube

3.3.1 Assumptions

3.3.1.1 Closed Boarders

The air is assumed to be flowing through a pipe with no diffusion through the boardersat any height z. So if

~V(x, y, z) =

vxvyvz

19

Page 21: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

denotes the velocity vector of the wind at any position (x, y, z)T then

V(x, y, z)T· ~p(x, y, z) = 0 (3.1)

with (x, y, z)T∈ ∂Ω

where ~p(x, y, z) is the unit vector vertical to the boarder ∂Ω. The vertical constraints ofthe tube are fixed by two cross section areas at Hmin and Hmax. Diffusion is allowed onlythrough these areas.

3.3.1.2 Quadratic Velocity Distribution

The vertical component of the velocity through a cross section area in a circular thermaltube with velocity vmax

z at the center (0, 0) is assumed to be of the form

vz(x, y) =−vmax

z

R2 (x2 + y2) + vmaxz (3.2)

For modeling elliptic tubes the formula is extended to

vz(x, y) = −vmaxz

(x2

a2 +y2

b2

)+ vmax

z (3.3)

This model is commonly used as a basis for describing laminar flow of fluid velocitiesin pipes.

3.3.1.3 Incompressible Fluid

For simplification, we assume the pressure in the whole tube to be constant in space andtime.

∇p(x, y, z) = 0 ∧ ∂tp(x, y, z) = 0 (3.4)

3.3.1.4 Conservation of Mass

The mass within the boundaries of the tube is assumed to remain constant in time.With the previously stated assumption of constant pressure (3.4) we introduce a looseconstraint which ensures conservation of mass in a more global manner than fullfilling itat every differential cubic volume element by setting the vertical flow rate at the bottomequal to the one at the top of the tube with∫

∂ΩHmin

vz(x, y, z) =∫∂ΩHmax

vz(x, y, z)

We then tighten the constraint a little more by requiring any pair of cross section area atheights z′, z′′ ∈ [Hmin,Hmax] to have the same flow rate.∫

(x,y,z)∈Ω:z=z′vz(x, y, z) =

∫(x,y,z)∈Ω:z=z′′

vz(x, y, z) (3.5)

20

Page 22: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

−50

0

50

100

150

−150−100

−5000

1

2

3

4

5

6

x [m]y [m]

updr

aft v

z [m/s

]

Figure 3.1: Quadratic Velocity Distribution

3.3.1.5 Stable Velocities

We assume all the velocities to be invariant with respect to time.

∂tV = 0 (3.6)

3.3.2 Elliptic Pipe Model

3.3.2.1 Parameters

Our model of a thermal tube is fully defined with the two ellipse parameters a0 and b0defining the radius in direction of x and y respectivly at position P0 = (x0, y0, z0)T withvertical constraints Hbottom and Htop and with a continous definition of the maximumvertical velocities vmax

z (z) with z ∈ [Hbottom,Htop] in the center of the thermal tube. Toconstrain the elliptic shape at every height, either a or b has to be fixed. We thereforein addition introduce the ratio κab(z) = a(z)

b(z) along the vertical axis ~ez, which has to bedefined for every z ∈ [Hbottom,Htop].

3.3.2.2 Calculation of the Velocities

Let α denote the ratio of the vertical flow rate Qz at height z0 to a0 ·b0 ·πvmaxz (z0). One can

show that α is constant for any velocity distribution according to the quadratic velocitydistribution in (3.3).Then, to keep conservation of mass (3.5), the following must hold.

α · a0 · b0 · π · vmaxz (z0) = α · a(z) · b(z) · π · vmax

z (z)

21

Page 23: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Which results in

a(z) · b(z) =a0 · b0 · vmax

z (z0)vmax

z (z)(3.7)

With the given constraint κab(z), a(z) and b(z) can be directly calculated at any height z.Now, with the parameters fixed, one has completly defined the vertical updraft of thethermal tube by extending 3.3 to

vz(x, y, z) = −vmaxz (z)

((x − x0)2

a(z)2 +(y − y0)2

b(z)2

)+ vmax

z (z) (3.8)

3.4 Implementation

In order to have a concrete implementation of the elliptic pipe model one had to fix theopen parameters. Then one had to insert the thermal tubes into the simulation modelof the Sky-Sailor. In this step the calculation of the forces had to be adapted in such away that all seven wing units were treated in an independent manner by calculating thecurrent wind velocity for each wing unit separatly.

3.4.1 Selecting Parameters

3.4.1.1 Core Velocity Distribution

For every height in [Hbottom,Htop] one has to define the maximum updraft velocity, whichis located in the core of the thermal tube. Based on Spengler (2.6.3), the velocity was setto a constant updraft somewhere in the lower third.For the upper region a smooth translation into an almost linear decrease of updraftvelocity was selected. In addition the velocities at the top and the bottom where set tovmin instead of zero to avoid singularities in the model. To meet these constraints, twoquadratic and a linear polynom were fitted, where the bounderies had to show the samederivative.

p1(z) = a1z2 + b1z + c1 with z ∈ [Hbottom,Hlower]p2(z) = a2z + b2 with z ∈ [Hlower,Hupper]

p3(z) = a3z2 + b3z + c3 with z ∈ [Hupper,Htop]

22

Page 24: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

The boundry constraints are

p1(Hbottom) = vmin

p2(Hlower) = vmax

p2(Hupper) = vmax

p3(Htop) = vmin

p1(Hlower) = p2(Hlower)p2(Hupper) = p3(Hupper)

ddz

p1(Hlower) =ddz

p2(Hlower)

ddz

p2(Hupper) =ddz

p3(Hupper)

where vmin is the smallest core velocity and vmax the biggest one. The lower heightconstraint Hlower and the upper height constraint Hupper define the height of the transitionfrom one polynom to the other. This leads to the final vertical velocity distribution.

vmax(z) =

if z ∈ [Hbottom,Hlower]vmin−vmax

(Hbottom−Hlower)2 z2− 2Hlower

(vmin−vmax)(Hbottom−Hlower)2 z + vmax −H2

lowervmax−vmin

(Hbottom−Hlower)2

if z ∈ [Hlower,Hupper]vmax

if z ∈ [Hupper,Htop]vmin−vmax

(Htop−Hupper)2 z2− 2Hupper

(vmin−vmax)(Htop−Hupper)2 z + vmax −H2

uppervmax−vmin

(Htop−Hupper)2

(3.9)

The thermals used had parameters set within following ranges.

vmin = 0.1[m/s]vmax ∈ [2, 8][m/s]

Hbottom = 50m

Hlower = Hbottom +15

(Htop −Hbottom)

Hupper = Hbottom +25

(Htop −Hbottom)

Htop ∈ [300, 1000]m

Figure (3.2) shows an example of such a distribution with vmax = 8[m/s] and Htop =600[m]. Note that like derived in (3.3.2.2) at every height the flow through the cross-section area is the same, with adapted widths and lengths to fulfill this constraint.

23

Page 25: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

0 1 2 3 4 5 6 7 80

100

200

300

400

500

600

Velocity ν [m/s]

Hei

ght h

[m]

Figure 3.2: Core Velocity Distribution

3.4.1.2 Width and Length

As the thermal tube has an elliptic cross section area, for every height the width andlength has to be specified.The implementation was set up in such a way that one has to define the semimajoraxisa for a fixed height z0 and the ratio κ = a

b for every height. With this, the flow which hasto be equal on every height and the corresponding a and b could be calculated.In the implementation a constant κ for every height was selected. The parameters werealways used in the following range.

z0 = 200[m]a0 = [20, 200][m]

κconst = [1, 3]

Figure (3.3) shows an example of such a thermal tube with a0 = 60[m] and a κconst =1.2, which results in b0 = 50[m] for the height z0 = 200[m].

3.4.2 Integrating Model

3.4.2.1 Adding Calculation of Wind

The old model was only able to define a fixed global. It was extended by the Matlab filewind wings.m, see figure (3.4) and (3.5).

24

Page 26: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Figure 3.3: Thermal tube of 550 meters height and maximum updraft of 4 m/s

25

Page 27: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

wind_total.m thermal_tube(i)

thermal_config.m

creates

looks upwind_wings.m

queries all

wing parts

Figure 3.4: The Matlab file wind wings.m returns for every wind part the relative speedw.r.t the updrafts.

Vb

V1 - V7

5

omega

4

Vb

3

phi-theta-psi1

2

Ve

1

Xe

MATLABFunction

wind

MATLABFunction

Propeller Thrust

Forces

Moments

Xe

Ve

Phi-theta-psi

Vb

omega

dphi-dtheta-dpsi

Lagrange my 6DoF

MATLABFunction

Aerodynamic forces & Moments

1

U_control

Figure 3.5: Simulating the Sky-Sailor: The block wind was added to simulate the thermaltubes. It calls wind wings.m and returns for every wing part the relative speed.

26

Page 28: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

It takes the position, orientation and speed of the Sky-Sailor and returns the relativewind velocities of all seven wing parts, defined in [Mat06, p.14] and hands it over tothe force and moment calculation unit. It looks up possibly multiple thermal tubes whichwhere defined in the Matlab file thermal config.m as shown in figure (3.6).

4/15/07 4:31 PM D:\Semesterarbeit\Controller\Simulator and Co...\thermal_config.m 1 of 2

%thermal_config Defining the thermal tubes in the simulation by

% defining the (vertically fixed) shapes and positions

% of the reference ellipse which define an

% elliptical pipe to model themal tubes.

%

% REMARK:

% To make changes valid, type 'clear global thermal_tube'

% in command window befor start of simulation.

%

% For every new thermal tube, one has to define three functions in order

% to change the ratio from width to length or the core velocities.

%

% The definition of the 'velocity' field has to be done by copy paste of

% thefunction 'thermal_tube_velocity_1'. Do change the number to the

% number of the thermal tube for more clarity. Sorry for this

% additional work... :-)

%

% The other functions in the field 'kappa' or 'velocity_max' may be

% reused in other thermal tubes.

%

% Here, the right hand coordinate system with the z-axis showing UP is

% used, like it is visualized in Matlab.

%

% AUTHOR:

% Erik Fonseka, ST Exploiting Thermals, 07.04.2007

% Defining the thermal tubes.

global thermal_tube

% Defining the first thermal tube.

thermal_tube(1).x0 =

thermal_tube(1).y0 =

thermal_tube(1).z0 =

thermal_tube(1).z_min =

thermal_tube(1).z_max =

thermal_tube(1).a0 =

thermal_tube(1).kappa = @thermal_tube_kappa_constant

thermal_tube(1).velocity_max = @thermal_tube_velocity_max_realistic_1

thermal_tube(1).velocity = @thermal_tube_velocity_1

% % Defining the second thermal tube.

%

Figure 3.6: One can define a thermal tube w.r.t all the parameters in thermal config.m.

3.4.2.2 Modifying Calculation of Forces and Moments

The old force and moment calculation unit assumed the same velocities for all wing parts.As thermals introduce a gradient with respect to the updraft (see figure 4.3), this assump-tion was no more valid and an adaptation in the Matlab file calculate force and moment.mwas necesary. The whole frame was already set up for this purpose, so the extensionwas only a minor implementational detail.One can see in figure (3.5) that now there are seven wind velocities V1 −V7 in additionto the velocity Vb that enter the force and moment calculation unit.

3.5 First Results

When the Sky-Sailor flies through a thermal tube, it get a sideways slip (see figure 3.7),which is caused through unequal updraft values on the different wing parts. Further-more, if the thermal tubes aren’t too narrow and not too strong (vmax < 4[m/s]), then theorientation of the Sky-Sailor remains quite stable while entering and while flying in thethermal tube, as one can see in figure (3.8). In that case, the increase of potential is quitebig and the the trajectories in figure (3.9) look quite realistic.

27

Page 29: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Figure 3.7: The Sky-Sailor ”Slips off” the thermal tube.

Figure 3.8: Roll and pitch remain quite stable flying a thermal tube with vmax < 4 andnot too short axis a and b.

28

Page 30: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Figure 3.9: The lift is quite big while passing the thermal tube. And it looks quiterealistic.

29

Page 31: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 4

Exploiting Thermals

4.1 Introduction

In this chapter different information units - the features - will be extracted during flight.By combining these features (like the different energy types) to bigger features (like anupdraft estimation), one gets hopefully more usefull information about the structure ofthe thermal tube. Under this basis a trajectory is calculated to exploit the thermal tube.Then one calculates the roll φ in order to follow this trajectory and passes it on the theLow Level Control (LLC).

4.2 Analysing Investigation

The following heuristics are the basis on which the strategy to exploit thermals willbuild upon. They are all (partially) gathered from the investigation described in chapter(2).

• Fly circles as large as possible in order to have a minimal roll.

• Fly as close to the core of the thermal tube in order to have a maximum updraft.

• Turn towards the opposit direction of a roll and yaw.

• The strength of a controlled reaction should be in a proportional relation to thestrength of a measured action.

• Turn inversely proportional to the change of rate of climb.

• Avoid flying on the boarder of a thermal tube to avoid turbulent flows.

• Having a force from or to the center of a thermal tube indicates whether one islocated at the top or at the bottom of it respectively.

• A local minima of global wind might indicate a thermal blocking the wind. In thiscase, fly against the global wind direction.

30

Page 32: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

• In a thermal, fly as slow as possible in order to stay at the optimal position as longas possible.

There is a conflict between turn inversely proportional to the change of rate of climb andfly circles as big as possible in order to have a minimal roll. The first statement is a greadystrategy and tries to find the position of the maximum updraft as fast as possible, wherethe second statement tries to circle around this point. The second statement is a morestable approach and tends to result in a higher average lift. One therefore tends to dropthe first statement, however splitting these rules into high and low level controls couldprovide one with the benefit of both.

4.3 Extracting Features

The following features are needed to be extracted in order to estimate the currentenvironment.

4.3.1 Selection of Relevant Features

In this section all relevant features are selected and defined in a precise way.

4.3.1.1 Low Level Features

The low level features dealing with the energy of the Sky-Sailor are all calculated onthe basis of the dynamic model used for the Sky-Sailor, defined in the Master Thesisof Andrea Mattio in Modelling and Control of the UAV Sky-Sailor [Mat06, p. 11], whereespecially a diagonal intertia matrix for the Sky-Sailor is assumed.

Change of Linear Kinetic Energy The change of kinetic energy can be estimated withthe change of velocity, where the velocity is calculated with the change of position.

Ekin(lin) =ddt

(12

m‖X‖2)

= m · 〈X, X〉 (4.1)

where X = (x, y, z)T is the position and m the total mass of the Sky-Sailor.

Change of Rotational Kinetic Energy The change of rotational kinetic energy can becalculated with the change of orientation - the rotational speed ω = (ωx, ωy, ωz)T -,which is directly given by the IMU sensor in the Sky-Glider.

Ekin(rot) =ddt

(12

(Ixxω

2x + Iyyω

2y + Izzω

2z

))= Ixxωxωx + Iyyωyωy + Izzωzωz (4.2)

31

Page 33: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Change of Potential Energy The change of the absolute potential energy can be esti-mated with the change of the vertical position component.

Epot =ddt

(m · g · z(t)

)= m · g · z(t) (4.3)

Acceleration of Roll The acceleration of roll can be directly calculated with the givenrotational speed ω.

ωx = ωx (4.4)

Turbulence Strength The environment is assumed to be turbulent, if the sum of theweighted accelerations of all 6 DOFs (that is, the acceleration of linear and rota-tional kinetic energy) reaches a certain threshold.

τ = αT1|x| · αT2|y| · αT3|z| · α4T|ωx| · αT5|ωy| · αT6|ωz| (4.5)

where∑

i αTi = 1.

Relative Speed The relative speed xbrel in flight direction can be directly read from the

airspeed sensor. We assume that there are no more windcomponents in otherdirections, that is why we neglect drifts in y and z-direction.We now translate the windspeed into earth coordinates, using the current orien-tation of the Sky-Sailor. As the angles are Tait-bryant angles, we use the rotationmatrix R(φ, θ, ψ) like the one described by Mattio in [Mat06, p. 10] and shown inthe Appendix (A.1).

Xrel = R(φ, θ, ψ) · Xbrel (4.6)

with

Xbrel =

xb

rel00

where xb

rel is positiv in normal flight and the subscript b refers to the body coordinateframe.

4.3.1.2 State Features

The calculation of the states is based on the extracted features defined in (4.3.1.1).Whenever the sky-sailor is in the flying mode to exploit thermals, there are three featureswhich represent the current state of the sky-sailor.

32

Page 34: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

On boarder

Outside thermal tube

X

Y

Inside thermal tube

Figure 4.1: The features ΛI, ΛB and ΛO are extracted during flight to improve theestimation of the structure of the thermal tube.

Inside Of Thermal Tube The sky-sailor is assumed to be inside a thermal tube, when-ever there is an increase of potential energy and the sum of the increase of linear kinetic,rotational kinetic and potential energy is positiv. Further more, there are not too manyturbulences.

ΛI =

1(Epot > 0

)∧

(Ekin(lin) + Ekin(rot) + Epot > 0

)∧ (τ < τlow)

0 else(4.7)

where τlow is a threshold value for deciding whether there are turbulences or notand has to be determined empiricaly.

On Boarder Of Thermal Tube The sky-sailor is assumed to be on the boarder of a ther-mal tube, whenever there are some turbulences.

ΛB =

1 τ ≥ τlow

0 else(4.8)

Outside Of Thermal Tube The sky-sailor is assumed to be outside of a thermal tubein any other case. Normally, there will only be few turbulences and decreasingoverall energy (potential and kinetic energy). However, this is not a necessary.

ΛO = ¬ΛI ∧ ¬ΛB (4.9)

33

Page 35: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

4.3.1.3 Thermal Estimation Features

These features are based on the low level features in (4.3.1.1) and the state features in(4.3.1.2).

Updraft The updraft feature estimates the total vertical component of the current wind.It is computed with the change of potential, change of linear kinetic and rotationalkinetic energy (4.3.1.1), as one assumes that the only energy supplier is the updraftcomponent of the thermal tube.Note, that the updraft should not be zero even if the change of total energyis zero. That is the case because the Sky-Sailor continuously looses energy dueto drag. Therefore, the energy from the updraft is put into the total energy ofthe Sky-Sailor and into the environment in form of turbulences. To calculate theupdraft, one therefore has to assume the change of the appropriate energy to bethe change of total energy plus this lost energy due to drag.We first define the energies used.

Ekin = Ekin(lin) + Ekin(rot)

Etot = Epot + Ekin

Eupdra f t = Etot + Edrag (4.10)

where Edrag is approximated by the steady-state energy loss. For the Sky-Sailor,this is

Esky−sailordrag ≈ m · g · z

where z ≈ 0.3m/s according to Mattio in [Mat06, p.35]. Having the appropri-ate energy Eupdra f t, one can now estimate the updraft velocity which must havecaused this change of energy. We first assume that all the additional energy isput into potential energy, which is not the case for pitch angles unequal to zeroand for horizontal wind gusts components. However, it would NOT be the samesimplification if one would only regard the additional potential energy as energysource.

Eupdra f t =ddt

(m · g · zadd

)= m · g · zadd

zadd =Eupdra f t

m · g(4.11)

where zadd is the additional height of the Sky-Sailor gained through the additionalenergy. One assumes that in horizontal flight the additional vertical velocitycomponent of the Sky-Sailor is proportional to the updraft velocity vz.

vz ∝ zadd (4.12)

34

Page 36: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

If the Sky-Sailor is oriented in an other way, say the z-axis shows to~ez = (ex, ey, ez)T

with an angle β between the plane z = 0 and the axis ~ez, then we assume that dueto the reduction of the area of attack which is the projected area of the wings on thehorizontal plane, the updraft will have to increase in an cosinus way to preservethe same vertical velocity of the Sky-Sailor.

β = arccos 〈~ez, (0, 0, 1)T〉 (4.13)

vz = α′

v1 ·zadd

cos(β)(4.14)

where α′v1 is a weight which has to be adjusted to the Sky-Sailor. Now, by inserting(4.11) into (4.14), we have a complete estimation for the vertical updraft velocityvz given the change of the total and drag energy Eupdra f t.

vz = α′

v1

Eupdra f t

m · g · cos(β)(4.15)

Gathering all the constants into one variable αv1, we simplify to

vz = αv1Eupdra f t

cos(β)(4.16)

One might introduce a small bias by adding a constant to the denominator. Thisprevents divisions by zero. In return, a small error must be accepted.

+ Epot

- Ekin

- Epot - Epot

Figure 4.2: If there is zero updraft, potential energy can still be increased with the kineticenergy and shall not be mistaken with updraft. Furthermore, having a stable state sinkrate should not be mistaken with downdraft. And having bigger sink rates caused bystrong turns should also not be misinterpreted as downdraft.

Updraft Gradient This feature can be estimated with the change of potential and linearkinetic energy and with the acceleration of roll, see figure (4.3). The acceleration(instead of change) is selected to minimize the influence of the controller onboard.The controller is not able to create big rotational accelerations, where a one sidedupdraft while flying into a thermal tube creates a good response. With this gradi-ent, a further hint with respect to where the center of the thermal tube might liewill be given.

35

Page 37: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

+ Epot

+ Erot

Figure 4.3: Given the change of potential and rotational energy one can estimate anapproximation of the updraft gradient.

We first calculate the torque (the rotational force) which causes the change ofmotion. Note that we are only interested in the roll, that is in the componentaround the x-axis of the Sky-Sailor.

Mx = Ixx · ωx (4.17)

where Mx is the torque and Ixx the inertia of moment. Now, using (4.17), wecan calculate how strong a force would have to be if attacked uniformly over thewing of the Sky-Sailor. For this, we assume that on every line on the wing withequidistant points from the x-axis the force is dFx. These forces are the cause ofthe torque.

Mx =

∫ l

0r · dFxdr

= dFx ·l2

2

dFx =2Mx

l2(4.18)

where r is the shortest distance to the x-axis of the Sky-Sailor and l is the wingspan.To calculate the total force on the wing we integrate over the whole wing length.

Fx =

∫ l

0dFxdr

= dFx · l

=2Mx

l2l

=2Mx

l

=Ixx · ωx

12 l

(4.19)

36

Page 38: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

For the Sky-Sailor, we only consider the two main wings. That means, the force isdistributed on both wings and are therefore halfed.

Fle f tx = Fright

x =Fx

2(4.20)

Note that Fle f tx and Fright

x attack the wing in the opposit direction. Furthermore,these forces are additional forces attacking the wing which cause the rotation. Theoverall updraft is not included, which will be taken care of in a later step.Knowing the additional force on one wing inducing the rotation and assuming auniform distribution of the updraft velocity over the whole wing, one can calculatethe updraft velocity needed to induce this force, as proposed by the drag equation,see [en.07b]. Like already applied for the updraft feature, the projected area has tobe considered whenever the Sky-Sailor is not in a horizontal orientation, using βfrom (4.13).

Fle f tx = ρ · Cd · A · v2

z,add

vle f tz,add = ±

√‖Fle f t

x ‖

ρ · Cd · cos(β) · Awing(4.21)

where ρ is the density of the air, Cd the drag coefficient, A the projected area andAwing the unprojected area of the wing and β ∈ [0, π2 [ . Inserting (4.19) and (4.20)into (4.21) leads us to the additional updraft velocity on one side of the Sky-Sailor.

vle f tz,add = ±

√Ixx · ‖ωx‖

ρ · Cd · cos(β) · Awing · l(4.22)

The most important observation is that the updraft velocity is proportional to theroot of the acceleration. Further, if one gathers together all constants into onevariable αv2 and adds the overall updraft velocity (4.16) of the Sky-Sailor to thistherm, then the formula results in

vle f tz =

vz + αv2 ·

√ωx

cos(β) if wx > 0

vz − αv2 ·

√‖ωx‖

cos(β) else(4.23)

One should note that this updraft velocity vle f tz,add is computed with the acceleration

of roll and not with the change of roll and therefore does not include the constantupdraft velocity. This is requested because the controller must not to influence theresponse too much with its roll-ailerons.Having an estimate of the updraft velocities in x-direction with the updraft featureand having now an estimate of the updraft velocity vle f t

z in y-direction with respectto the center of the Sky-Sailor, the steepest gradient (and with that a hint of the

37

Page 39: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

direction of the center of the thermal tube) can be calculated - first with respect tothe body coordinate frame projected on the horizontal plane.

Υb =

d

dxb vzd

dyb vz

0

(4.24)

with

ddxb

vz ≈vz(i + 1) − vz(i)

∆xb

ddyb

vz ≈vz(i) − vle f t

z (i)l2

where i refers to the discretized values in the i′th timestep and ∆x is the distancemoving in this time. Note that we assume the change of updraft to be zero in thelocal environment. Everything left is to rotate the gradient in a horizontal fashioninto the earth coordinate system.

Υ = Rhoriz(ψhoriz) · Υb (4.25)

where Rhoriz (A.2) andψhoriz (A.4) are defined in the appendix. Of course, this holdsonly under the assumption that the thermals updraft velocities do not change intime. Furthermore, the derivative in x-direction can only by calculated if the Sky-Sailor is flying in this direction, what, however, should be the case in normal flight.Note that the derivative in y-direction can be directly computed in one timestep,as at every timestep vz and vle f t

z can be computed. In contrast, the derivative inx-direction must have two values vz, which are not collected at the same time butwith a small time difference.

Global Wind Keeps track of the current strength and direction of the global wind. Thiscan be directly calculated with the change of position and the current relative speedfeature.

We assume that the Sky-Sailor is flying in the direction of his x-axis and we neglectdrifts in y- and z-directions. Then, using the formula (4.6) from the relative speedfeature, the global wind V′global results in

V′global = X − Xrel

As we define the global wind as an horizontal wind, the vertical velocity com-ponent is of no relevance and we set it formaly to zero. We therefore finallyget

Vglobal =

x − xrely − yrel

0

(4.26)

38

Page 40: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

vrel

vglob

v

Figure 4.4: The Global Horizontal Wind can be directly calculated with the currentabsolut and relative velocity.

4.3.2 Discussion of Features

The selected features are very intuitive to understand. However, the definition of theresponse of these features might not always match the intuitiv understanding, and thetheoretical basis might not be representing the real world. One has several aspectswhich have to be considered. That is, the sensors might lack on accuracy and precision,the parameters (like weights used in sums) are to be determined or the selected featuresmight not be the most relevant information needed. In the following these aspects arediscussed in a more detailed manner.

4.3.2.1 Low Level Features

High Accuracy and Precision The Inertia Measurement Unit (IMU), which providesall 6 DOFs, is combined with the onboard GPS. The combination of the lowpassfiltered GPS coordinates with the highpass filterd altimeter and linear 3D accel-eration results in a very high accuracy and precision of the position in space andtime. The combination of the rotational accelerations with the already in the IMUintegrated 3D magnetometer results in a very high accuracy and precision of theorientation in space and time. Therefore, the calculation of the features are put ona very solid basis.

Suboptimal Weights The calculation of the weights for the feature turbulence strengthcannot be done easily. These parameters have to be set either intuitively or adaptedwith simulations and real live tests.

Feature List Uncomplete The selected features are not optimal for the purpose of de-termining the current state (4.3.1.2) and position of the thermal tube (4.4.2), butare rather selected intuitively. Another way to select optimal features could bea machine learning approach, which extracts the relevant information from thesensors by reinforcement learning.

39

Page 41: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Biased Features It is important to emphasis that all these features should be measuredand then adapted in a way that the controller itself does not influence the features.If the controller changes directions in very small intervalls, then this should notbe interpreted as a turbulent environment. There are several ways to attack thistask: One can estimate the influence of the controller and substract it from themeasured response. This strategy is not trivial and is not applied here. Or oneturns off the influence of the controller, like it is done by turning of the motor ofthe sky-sailor when flying thermals and therefore not influencing the total energy.A third possibility is to select features which are only influenced in a negligibleway. By selecting accelerations like it is done with the response of the roll, one canassume that it is barely influenced by the roll-aileron.

4.3.2.2 States

One should note that not being in a thermal tube is not necessary disadvantageous. Onecould imagine that the linear kinetic energy increases very much while loosing somepotential energy through a blow of downdraft. This energy might be used later to reachan even higher potential. The inserted constraint of the potential energy to increasein the inside thermal tube feature serves exactly this purpose to not mistake increasingenergy by other energy supplier with a thermal tube.

4.3.2.3 Thermal Estimation Features

Biased Features The reasoning about biased features by the controller which was de-scribed before of course propagates from the low level features to the high levelfeatures. That is, if the sky-sailor is flying in a very wide and smooth thermal,then a constant lift on one side of the sky-sailor is compensated by the controllerby correcting the roll into the opposit direction. Therefore, no acceleration of theroll can be measured and an estimation of the updraft gradient orthogonal to theflight direction cannot be detected. However, as big and smooth thermals giveone enough time to turn a few rounds, this information can be neglected as it isgathered by the change of energy after a 90° turn.

Updraft It is assumed that the only energy source for the Sky-Sailor to gain energyis the vertical component of the thermal tube. This may be true in a normalflight, however, like works in dynamic soaring show, one can extract energy fromhorizontal wind. If these flying strategies where implemented additionaly or ifthese transitions of energy happen ”by accident”, the estimation of the verticalupdraft velocity is inaccurate. In that case, this energy should be substracted fromthe total energy used in the calculation.

Updraft Gradient The simplifications made are suitable for normal situations. As weuse the acceleration for the one-sided updraft estimation, the constant value is notincluded. One might estimate this with the current state of the controller. If onecould estimate the force on the wing when having the amplitude of the roll-aileron,

40

Page 42: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

this constant could be estimated and reduce the bias.One also has to consider the different results of the updraft feature and the steepestdescent features with respect to the orientation. In the updraft feature β enters in acosinus manner, where in the steepest descent feature it enters in a rooted cosinusmanner. One might have to investigate a little more to decide which version ismore appropriate, where I prefer the rooted version, as the assumptions made aremore likely to map the reality.

4.4 Elliptic Pipe Estimation Strategy

4.4.1 Thermal Exploiting Low Level Control (T-LLC)

4.4.1.1 Turn Propeller Off

When flying in a thermal tube, one should set the the propeller off. This helps toextract more easily the external effects of the environment on the sky-sailor withoutbeing influenced from the sky-sailor itself. Furthermore, reducing the speed helps thesky-sailor to remain in optimal regions for a longer time.

4.4.1.2 Remove Height Constraint

The current LLC makes sure that the sky-sailor remains on a certain height. Thisconstraint has to be relaxed. Whenever the sky-sailor is in the mode of exploitingthermals the aimed height is set to infinit.

4.4.2 Thermal Exploiting High Level Control (T-HLC)

The Thermal Exploiting High Level Control (T-HLC) sends the aimed roll angle φ tothe T-LLC, which tries to reach this angle with a PID. In the following, the approach tocalculate φ is presented.

4.4.2.1 Estimation of Structure of Thermal Tube

During flight, the sky-sailor extracts the features from (4.3) after every timestep. Thesefeatures are the basis of estimating the parameters of the thermal tube, which is assumedto be approximated by an elliptic pipe as defined in chapter (3).

The feature responses vary in time. The variance can also be very high for smalltimesteps. The component which estimates the structure of the thermal tube and sup-plies the T-HLC with this information has to deal with this in a way, so that the featureresponses gathered some time ago may be used as well as the features of the near past.Apart from the problem that the features themselves are not informativ enough to fullyreconstruct the thermal tube, one has to find a way to decide how far the responses

41

Page 43: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

can be trusted with respect to their age as well as to their relevance in general. There-fore, every feature response has to be weighted (general relevance) and filtered (timedependency) accordingly.

Relevance of Features in General Deciding whether feature responses are relevant ornot is highly related to the type of the feature which relies on them. To estimate thestructure of a thermal tube one might consider the following thoughts.

Updraft Gradient Feature Having big variances in small time ranges makes this mea-sure unreliable for estimating the center of a thermal tube. Having a set of smoothyvarying responses is much more informativ and thrustworthy. Even if the smoothresponses are a little older, they should be marked with higher weights and thethermal structure calculated accordingly. Therefore, the weight should be in-versely proportional to the variance in the near past.

wgen(grad) =1σ2

t

where σ2t is the variance of the feature responses in the near past.

Turbulence Strength There is no justification of weighting certain feature responcesmore than others. This measure is quite stable and should always return trustablevalues.

wgen(turb) = 1

To estimate the global wind direction and strength, the following feature should beweighted this way.

Global Wind Feature One can detect global wind very easily if the Sky-Sailor is not ina thermal tube and not in any turbulences. Therefore, this feature should not haveany influences on the calculation of the global wind when the Sky-Sailor is in oron the boarder of the thermal tube. The weights will be defined in the followingway.

wgen(wind) =

1 if ΛO

0 else

Relevance of Features in the Past A simple approach to decide for the relevance wagewith respect to the age of a feature is done by defining a maximum timespan told, whichrejects all features which are older than told and fits an appropriate distribution betweenthe current time t and the time (t−told). As a thermal tube often builds up, remains stableand calms down in some time which can be about 10 minutes up to a few hours, told hasto be selected somewhere in this span. However, due to computational constraints one

42

Page 44: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

On boarder

Outside thermal tube(With global wind)

X

Y

Inside thermal tube(No global wind)

Global Wind

Figure 4.5: The global wind flows around the thermal tube, comparable with a pipewith closed boundaries in a fluid. Therefore only the global wind detected outside ofthe thermal tube is relevant for its estimation.

might have to set this variable much smaller. The weights in the active time range arecalculated with one ”half” of a binomial distribution.

wage(t f ) =

B(⌈

t f (n+1)2told

⌉+ n−1

2 ; n, p)

if (t f ≥ 0) ∧ (t f <= told)

0 else(4.27)

where the probability p is set to p = 0.5, t f is the age of the feature response andn ∈ N+ is odd and is the parameter of the binomial distribution, and is set to thenumber of features being inspected. n is constrained to an odd number to simplify theformula. Then, summing up all weights will give

∑t f

wage(t f ) = 1. Figure (4.6) showsthe weighting for told = 20[s].

Set of Strategies to Fit Elliptic Pipe Model Given all the high level features (StateFeatures and Thermal Estimation Features), one has to combine them to fit the ellipticpipe model optimaly. There are several possible approaches, which I will discuss first.Then one of them will be selected.

Simple Fitting If one has enough updraft velocities given, fitting the elliptic pipe modelin the least square sense is easy and robust. No other features would be needed.Figure (4.7) shows an example of a flight with a history length over 100 seconds.

43

Page 45: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

0 5 10 15 20 250

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

time tf [s]

Wei

ght w

(t f)

n = 3n = 21n = 57n = 39

Figure 4.6: Binomial Distribution for weighting features with told = 20[s]: The further ameasured features lies in the past, the smaller its weight gets when entering a calcualtion.Be aware that this is actually a discrete distribution.

−500

50

100150

−150

−100

−50

0−1

0

1

2

3

4

5

6

7

x [m]y [m]

updr

aft v

z [m/s

]

Measured updraftFitted Pipe Model

Figure 4.7: Simple Fitting: Given a long enough history of updraft values (here 100s)makes it easy to fit the elliptic pipe model to the dataset.

44

Page 46: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Simple Centering If one has almost no positiv updraft velocities given, then one canonly rely on the steepest gradient feature responses, which shows in the preferreddirection of the center like illustrated in figure (4.8). This is done by continualycalculating the intersection point of these gradients in the least square sense, giventhe constraints dmin ≤ dinters ≤ dmax, where dinters is the distance from the sky-sailorto the proposed center.Note that one may need a little more computing if not assuming circular butelliptic thermals. This will allow quite optimal solutions even if the gradients donot intersect at the same point. And also, if one additionaly uses the state featureΛB, an estimation of the width and length of the thermal is possible.

On boarder

Outside thermal tube

X

Y

Inside thermal tube

Figure 4.8: Simple Centering: Having updraft gradients along the flight path lets oneestimate the center of the thermal tube.

First Center Then Fitting One could combine the simple fitting with the simple centeringapproach, by first estimating the center of the thermal tube with the simple centeringand then apply the simple fitting with this constraint. The updraft velocity in thecore of the thermal could then be estimated with

vmaxz = 1.1max(vi

z)

where viz are all the estimates of vz along the trajectory in the near past, as it is

done by Allen [All07].

Hybrid Centering Another approach is to estimate the center of the thermal tube withthe simple centering and with the simple fitting approach. This would then resultin a convex weighted averaged center between the two estimates. In this case,enough updraft feature responses have to be provided to be able to perform thefitting in a stable manner, like mentioned in simple fitting.

45

Page 47: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Having this hopefully stable and more accurate position of the center, the fittingof the elliptic pipe model could be again be done with the given updraft data.

Adaptiv Fitting If one has enough updraft data, the fitting of the elliptic pipe model isstable and robust and one does not have to include the steepest gradiant feature.Estimation of the center with simple centering is most usefull if one has not yetcollected much data within a thermal tube. Therefore the simple fitting approachwould be applied when having alot of updraft feature responses, the first centerthen fitting approach might be usefull when the sky-sailor has not been flying muchin the thermal tube in the near past and the simple centering approach if almost noupdraft feature responses are available. Instead of simple fitting, the hybrid centeringapproach might be more accurate.

Adaptiv Fitting in Detail The adaptiv fitting approach applies different fitting algo-rithms to the collected data set, dependent on how much one already knows about thecurrent thermal tube. There are several situation which should be distinguished in orderto choose the appropriate fitting algorithm.

Majority in Thermal If the majority of the features with age t f >= told where collectedwhile being in a thermal tube, that is when the feature inside thermal tube (4.3.1.2) isbigger than 1

3 , then the simple fitting is performed, as one assumes only one thermaltube.

Half in Thermal If more or less half of the features are from inside and outside ofthe thermal tube, respectively, then one assumes more than one thermal tubeand therefore first applies a clustering algorithm to the updraft feature responses.Having the number of clusters n and their corresponding feature responses, onecan do n times a first center then fitting iteration. This results in n thermals, whichthe sky-sailor could go for.

Minority in Thermal If only a minority of the feature responses are in the thermal tube,then again only one thermal is assumed and one directly applies the first centerthen fitting approach.

Few in Thermal If there are hardly any updraft responses, then a simple centering isperformed.

None in Thermal Having no updraft information, then there is nothing else to do asbelieving that there is no thermal tube existent and no hints can be given so far,until a hopefully clever controller mode will somehow guide the sky-sailor inregions with thermal tubes.Note that there is the possibility to estimate the position of a thermal tube withouthaving any updrafts, that is, when one experiences a reduction of the global windwithout being in a thermal tube. In this special case, a center can be assumeddirectly against the wind, because one might be in the wind shadow of one, likedescribed in (2.5.2) or partially in the interview with Mr. Spengler (2.6.3).

46

Page 48: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Selection of Fitting Approach: Simple Fitting The adaptiv fitting approach seems to bevery suitable in terms of robustness and estimation error. However, it assumes a quitelong history of features. The half in thermal estimation version applies a clustering tothe data to detect multiple thermals. In this case, one would have to apply a strongsmoothing to the features and resample from it in order to reduce the amount of historydata for a time periode.

Due to time constraints, only the simple fitting approach was considered for further inves-tigation and implementation. One could first think of minimizing the error of updraftvalues with the elliptic pipe model in the least square sense.

edata =

∑Nhisti=1

(vz(i) − v(xi, yi, z1; Sz1)

)2

Nhist(4.28)

where vz(i) is the i’th from the latest Nhist updraft values estimated by the Sky-Sailor atthe position (xi, yi, zi)T with vz(1) being the latest one and v(xi, yi, z1; Sz1) is the updraftcalculated by the model with the current thermal structure Sz1 where

Sz =

x0y0z

a(z)b(z)

vmaxz (z)

So for every updated dataset of the Nhist latest updraft values the five structure param-eters x0, y0, a, b, vmax

z have to be computed. Note that the error measure edata assumes allNhist estimated updraft values to be located at height z1, which is the latest measuredheight, that is the current height of the Sky-Sailor. This simplifies the three dimensionalthermal fitting problem into a set of two dimensional problems by estimating the partialmodel on different heights.The current error measure edata is not yet sufficient because it lacks to follow differentconstraints. That is, κ = a

b could be very big which would lead to a thermal tube whichis a very long ridge. We want the tube to be an ellipse, but only in some range. So weintroduce an additional error measure which forces the minimization process to findresults which are as circular as possible.

ecircular = (a − b)2 (4.29)

We further assume the thermal tubes to have some average parameters for the width a,length b and maximum core velocity vmax

z . We do not want the minimization process tocome up with results with the thermal tube being hundreds of meters long or havinghuge core updraft values - or even negative ones.

ewidth = (a − aaim)2 (4.30)

elength = (b − baim)2 (4.31)

evmax = (vmaxz − vmax

z aim)2 (4.32)

47

Page 49: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

where aaim is width, baim the length and vmaxz aim the core velocity which one wants to get

as near as possible.Finally, we constrain the center of the estimated thermal tube as close as possible to theposition of the biggest updraft value in the close past.

ecenter = (xsimple0 − x0)2 + (ysimple

0 − y0)2 (4.33)

where

(xsimple0 , ysimple

0 ) = (xi, yi) : vz(i) = maxi

(vz(i)) i ∈ 1..Nhist

With all this parial error measures, one can define the total error etot which is to beminimized.

etot = αe1edata + αe2ecircular + αe3ewidth + αe4elength + αe5evmax + αe6ecenter (4.34)

The α’s are the weights for the different error measures with∑

i αei = 1. They are tobe determined empiricaly by investigating several minimization processes and increasethe weight where the constraint is violated too much. We now have a measure for howgood we grade an estimate of the thermal structure with respect to the latest updraftvalues on the path of the Sky-Sailor and therefore have set the basis to find an optimalthermal tube. This error measure may be minimized with any minimization algorithm.

Discussion of Elliptic Pipe Fitting We always assumed that the updraft velocitiesgathered in the near past are either on the same height or equal for all heights of thesky-sailor in this time. For small histories of features this approximation is well suitedand allows a reduction of the fitting problem onto a three dimensional surface fittingproblem.

4.4.2.2 Defining trajectory

Having fitted the elliptic pipe model to the features gathered, we define a simple circulartrajectory around the estimated center, adapting the distance to to center according tothe estimated length and width of the thermal tube.The trajectory is defined by the desired position, velocity and acceleration of the Sky-Sailor. Given the center (x0, y0, z0)T, the semimajoraxis a and the semiminoraxis b, thenwe define the radius rtraj to be

rtraj =

αt ·min(a, b) if αt ·min(a, b) ≥ rmintraj

rmintraj else

(4.35)

where αt ∈]0..1[ and rmintraj is the lower bound of the radius which the Sky-Sailor is still

able to fly in a stable manner. With this we have totally described the path which the

48

Page 50: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Sky-Sailor should follow. We now define the trajectory following this path like alreadydone by Mattio in [Mat06, p.50-51].

(xtrajytraj

)= rtraj

cos(

vsp·trtraj

)sin

(vsp·trtraj

) +

x0y0z0

(4.36)

where vsp is the set point velocity, the velocity the Sky-Sailor is aiming for. Given theposition (4.36), one can directly derive the velocity and acceleration.

(xtrajytraj

)= vsp

− sin(

vsp·trtraj

)cos

(vsp·trtraj

) (4.37)

(xtrajytraj

)=

v2sp

rtraj

− cos(

vsp·trtraj

)− sin

(vsp·trtraj

) (4.38)

Now we have defined the trajectory in terms of position, velocity and acceleration withrespect to time. Next, we have to controll the roll φ to follow this trajectory.

4.4.2.3 Controling the roll φ

To follow the trajectory the controller already developed and implemented by Mattio in[Mat06, p.49-51] is used. One can simply hand over the previously defined trajectory.Then the controller outputs the desired roll φ and passes it on to the low level controller.It was originally used by Mattio [Mat06] for following a fixed trajectory around thepoint (0, 0). One should note that here the trajectory is redefined continuously, alwaysadapting to the latest information the Sky-Sailors has about the thermal tube. However,in [Mat06] it has also been used under the influence of constant horizontal wind, whichis equivalent to a constant move of the center. It has been shown in [Mat06, p.53-54] thatthe controller is able to handle this situation in a stable manner.

4.5 Implementation

The Controler was extended by the Thermal Strategy High Level Controler (T-HLC), asone can see in figure (4.9). To supply the T-HLC with all the information needed,the 6DOF-d6DOF-dd6DOF block was created, which simply returns all six degrees offreedom (position and orientation) and their first and second derivativ. The LLC wasonly adapted in a minor way. The adapted LLC block, the Thermal Estimation block andthe T-HLC were built as presented in the following sections.

49

Page 51: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

1

U_control

X

dX

ddX

phi-theta-psi

Omega

dOmega

rel_speed_x

thermal x-y-z-w-l-vmax

Thermal Estimator

X

dX

thermal x-y-z-w-l-vmax

roll_out

T-HLC

Xe

Ve

phi-theta-psi

Vb

omega

x

y

altitude

dx

dy

dz

phi

theta

psi

wind_speed

glissade

gyrX

gyrY

gyrZ

Signals gestion

roll

pitch

gyrX

gyrY

gyrZ

glissade

wind_speed

altitude

set_point_roll

u_ail_l

u_ail_r

u_vtail_l

u_vtail_r

u_motor

LLC control

HLC / T-HLC

x

y

dx

dy

roll_out

HLC

x

y

z

dx

dy

dz

phi

theta

psi

omega_x

omega_y

omega_z

X

dX

ddX

phi-theta-psi

Omega

dOmega

6DOF_d6DOF_dd6DOF

5

omega

4

Vb

3

phi-theta-psi

2

Ve

1

Xe

Figure 4.9: Controler: The T-HLC was added to control the roll φ such that thermal tubesare exploited.

4.5.1 T-LLC

LLC.m The LLC was adapted by setting the altitude saturation [Mat06, p.52] to a con-stant of 5 [m], which means that the Sky-Sailor is given the command to try tocontinuously climb 5 meters higher. So now the Sky-Sailor will always try to gainas much height as possible. In additon the change of the motor voltage as well asthe aimed set point motor voltage in the Matlab file set point file.m was set to zero toforce the motor not turning on.

4.5.2 Thermal Estimator

The Thermal Estimator (see figure 4.10) takes the six DOFs and their first and secondderivatives at every timestep (here 0.04 seconds) from the Sky-Sailor estimates thestructure of the thermal tube with the simple fitting approach like like described in (4.4.2.1).

4.5.2.1 Low Level Features

The Low Level Features where implemented in Matlab files. These are the following.

thermal exploit dE pot.m Calculates the change of potential energy Epot like definedwith formula (4.3).

50

Page 52: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

1

thermal x-y-z-w-l-vmax

dE_kin_lin

dE_kin_rot

dE_pot

tao

phi-theta-psi

dOmega

X

dX

dX_rel

states I-B-O

updraft

steepest gradient

global wind

Thermal Estimation Features

states I-B-O

updraft

steepest gradient

global wind

X

thermal x-y-z-w-l-vmax

Thermal Estimation

dX

ddX

phi-theta-psi

Omega

dOmega

rel_speed_x

dE_pot

dE_kin_lin

dE_kin_rot

tao

dX_rel

Low Level Features

7

rel_speed_x

6

dOmega

5

Omega

4

phi-theta-psi

3

ddX

2

dX

1 X

Figure 4.10: Thermal Estimator: First the Low Level Features are extracted, which supplythe Thermal Estimation Features, which then again are the basis for fitting the elliptic pipemodel in the Thermal Estimation block.

thermal exploit dE kin lin.m Calculates the change of linear kinetic energy Ekin(lin) likedefined with formula (4.1).

thermal exploit dE kin rot.m Calculates the change of rotational kinetic energy Ekin(rot)like defined with formula (4.2).

thermal exploit turbulence strength.m Calculates the turbulence strength τ like de-fined with formula (4.5). All six weights where chosen αTi =

16 and could still be

optimized.

thermal exploit relative speed.m Calculates the relative speed Xrel of the Sky-Sailorlike defined with formula (4.6). Note that only the windspeed sensor in flightdirection is currently used and does not include speed in y and z directions.

4.5.2.2 Thermal Estimation Features

The Thermal Estimation Features are all implemented in the following Matlab files. Theyare calculated for every timestep, but may have some delay caused by the calculation ofintegrations and derivatives, as everything is done in discrete timesteps.

thermal exploit states.m Calculates the current state ΛI,ΛB and ΛO like defined withthe formulas (4.7, 4.8 and 4.9). The threshold value to decide whether it is turbulentor not was chosen by inspection of several flights and set to τlow = 0.6.

51

Page 53: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

thermal exploit updraft.m Calculates the vertical updraft velocity vz like defined withformula (4.16). The scaling factor was not calculated analyticaly and was deter-mined by comparing the modeled updraft with the detected updraft. It was set toαv1 = 0.04. Also a saturation was introduced to smoothen unstable initial condi-tions by constraining the maximum possible updraft to vmax

z <= 20. Furthermore,the denominator in the formula was biased by εbias = 0.01 to prevent divisions byzero. But this should not happen at the moment because the Sky-Sailor would thenhave 90° roll or pitch, what we hope will never happen with the current model.

thermal exploit updraft gradient.m Calculates the updraft gradient Υ of the updraftvelocity field like defined with formula (4.25). Here again the denominator of thecalculation of vle f t

z in formula (4.23) was biased by εbias = 0.01 to prevent divisionsby zero.

thermal exploit global wind.m Calculates the current estimation of the global windVglobal like defined with formula (4.26).

4.5.2.3 Thermal Estimation

To estimate the structure of the thermal tube the features are previously filtered andresampled like shown in figure (4.11). The filtering is done with a moving average oflength 10 and weights wage = 0.1. The constant weight instead of the proposed binomialdistribution (see formula 4.27) was chosen because the storage capacity is limited andtherefore, as only the features not older than told = 100 seconds where analyzed, all ofthem are highly relevant.After the filtering, a resampling after every 10’th timestep (here 0.4 seconds) was per-formed. This made it possible to cover an acceptable time range of about 1:30 minutes,still only having 256 features in the storage.

Having the history of all thermal estimation features, the estimation of the structurewas implemented in the Matlab file.

thermal exploit adaptive fitting.m Calculates the structure S of the thermal tube byapplying the simple fitting approach described in (4.4.2.1), which minimizes theerror defined with formula (4.34). The Matlab function fminsearch was chosenfor this task. The current naming of the Matlab file was chosen because it is aframework which can be extended to the adaptiv fitting approach, having only thesimple fitting approach implemented upto now. The weights were chosen accordingto several manuel tests.

52

Page 54: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

1

thermal x-y-z-w-l-vmax

MATLABFunction

adaptiv_pipe_fitting

Zero-Orderupdraft gradient

Zero-Orderupdraft

Zero-Orderposition

Zero-Orderglobal wind

Zero-OrderHold states I-B-O

DelayLine

Updraft History

DelayLine

Updraft Gradient History

DelayLine

State History

DelayLine

Position History

Moving Average z

Moving Average y

Moving Average x

Moving Average w

Moving Average vmax

Moving Average l

ToSample

Matrix Updraft Gradient

ToSample

Matrix Updraft

ToSample

Matrix State

ToSample

Matrix Position

ToSample

Matrix Global Wind

Horiz Cat

MatrixConcatenation

DelayLine

Global Wind History

Average wind z

Average wind y

Average wind x

Average updraft z

Average position z

Average position y

Average position x

Average gradient z

Average gradient y

Average gradient x

Average Outside Thermal

Average On Boarder

Average In Thermal

5

X

4

global wind

3 updraft gradient

2

updraft

1

states I-B-O

Figure 4.11: Filtering Features: To estimate the structure of the thermal tube a history ofthe latest features is occupied. To reduce the amount of storage needed and to increasestability, they are filtered by a uniform moving average with weights wage = 0.1 andlength 10. Then they are resampled every 10’th timestep.

53

Page 55: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

αe1 = 1 −∑i=2:6

αei

αe2 = 0.03αe3 = 0.01αe4 = 0.01αe5 = 0.1αe6 = 0.05

The estimated structure, which contains center (x0, y0, z0)T, the width a, length b andthe core updraft strength vmax(z0) is then filterd by a moving average of length 10 andpassed on to the Trajectory Calculation block which is in the T-HLC block presented thenext section.

4.5.3 T-HLC

The T-HLC block first calculates the trajectory in the Trajectory Calculation block and thencalculating the aimed roll φ to meet this trajectory, which is then handed over to theLLC.

1

roll_out

X

dX

thermal x-y-z-w-l-vmax

trajectory X-dX-ddX

Trajectory Calculation

X

dX

trajectory

roll inter

Roll Calculation3

thermal x-y-z-w-l-vmax

2

dX

1

X

Figure 4.12: T-HLC: The T-HLC gets an updated structure estimation from the ThermalEstimator block every 0.4 seconds and recalculates the roll φ to be sent to the Low LevelControl (LLC).

These calculations are all done in the following Matlab files.

thermal exploit trajectory.m Calculates the trajectory like defined with formula (4.36,4.37 and 4.38). The radius is saturated to rmin = 30[m] and the desired speed is setto vsp = 8.2[m/s].

54

Page 56: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

The calculation of the roll φ for a given trajectory was already described by Mattioin [Mat06, p.49-51] and implemented with the Matlab files HLC.m and my PID.m. Forthe T-HLC, this was directly reused.

4.6 First Results

At the beginning, the fitting of the elliptic pipe model to the data was done withoutconstraining the parameters at all. This lead to unstable predictions of the structure ofthe thermal tube, like illustrated in figure (4.13).

Figure 4.13: Fitting the Elliptic Pipe Model: The first version of the fitting process did onlyminimize the error of the extimated updraft values with the ones from the estimatedthermal tube. Not constraining the parameters at all made the result quite unstable andunrealistic. Left: The blue crosses indicate the estimated centers of the thermal tube.Right: A two dimensional view of the fitting process. The velocity distribution wasestimated the wrong way round and should be upside down with maximum velocitiesin the middle.

Having the error measure etot, the fitting is more stable. However, this goes on thecost of biased models, like one can see in figure (4.14).

55

Page 57: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

−120−100

−80−60

−40−20

020

−100−80

−60−40

−200

2040

−0.5

0

0.5

1

1.5

2

2.5

3

3.5

x [m]y [m]

updr

aft v

z [m/s

]

Figure 4.14: Fitting the Elliptic Pipe Model with the constrained error measure: This leads toa biased model, but on the other hand one gains more stable results.

56

Page 58: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 5

Results

5.1 Test Flights for the Sky-Sailor

To be able to get a picture of how well the elliptic pipe estimation strategy works with thesimple fitting approach, the following test setup was chosen.

5.1.1 The Setting

The thermal tube was positioned in such a way that after a few seconds of flight theSky-Sailor automatically entered it. In the following, the whole configuration of a testflight will be encoded in the following way.

con f igFlighti =

semimajoraxis asemiminoraxis b

vmaxz

testmodek

further, more specific changes

where a, b and vmax

z are the parameters of the thermal tube. a and b are evaluated atz0 = 200. The testmode states how the Sky-Sailor entered the thermal tube. It wasdistinguished between right, front and left like illustrated in figure (5.1). k is a parameterto adjust the Roll Controling block and is used in the Matlab file HLC.m written by Mattio[Mat06] and has an influence on the stability of the Sky-Sailor.Each flight was two minutes long, except the Sky-Sailor had crashed before at time tcrash.For every flight, the following numbers where calculated.

resultFlighti =

enorm

distanceewidthelength¯znorm

tcrash

57

Page 59: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

where enormdistance is the average error of the center estimation, normalized to the semimajo-

raxis a at height z0 = 200. ewidth and elength is the average error of the estimation of a andb respectively and ¯znorm is the normed average vertical velocity of the Sky-Sailor. Thenorming is done with the maximum average updraft velocity which would have beenpossible in an ideal world, that is when the Sky-Sailor could remain in the exact centerof the thermal tube for the whole time tcrash. The normalizations for edistance and ¯z makesit possible to compare the values with a range of thermal tubes with different strengthand dimensions.A summary of all configurations of all test flights and their results are presented in figure(5.1). Note, that every change and more specific configuration stays valid for all thefollowing test flights. For example, all flights after flight 4 have got the αe5 and αe6 likedefined in flight 4 itself.

On boarder

Outside thermal tube

X

Y

Inside thermal tube

right

frontleft

Figure 5.1: Test Configurations: For every thermal tube, at least three tests where per-formed. Each test had another starting point to make the Sky-Sailor either entering thethermal tube from right, from the front or from the left.

58

Page 60: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Flight config. a, b, vmaxz , testmode, k enorm

distance ewidth elength ¯znorm tcrash

1 60, 50, 4, front, 0.10 0.42 28.13 19.07 0.24 78.002 60, 50, 4, right, 0.10 0.59 36.09 24.40 0.16 77.803 60, 50, 4, left, 0.10 0.37 25.65 19.14 0.21 -4 60, 50, 4, left, 0.10, αe5 = 0.1, αe6 = 0.05 0.31 27.34 21.05 0.19 -5 40, 33, 4, front, 0.10 0.40 15.73 10.57 0.07 -6 40, 33, 4, front, 0.20 0.28 14.74 8.11 0.11 -7 40, 33, 4, right, 0.25 0.43 17.84 13.23 0.17 -8 40, 33, 4, left, 0.27 0.52 17.56 13.47 0.05 71.929 100, 83, 4, front, 0.25 0.19 49.34 31.34 0.56 -10 100, 83, 4, right, 0.20 0.39 64.83 48.13 0.55 38.4411 100, 83, 4, left, 0.15 0.39 62.46 51.98 0.35 -12 100, 83, 4, front, 0.1 0.39 62.89 47.90 0.33 -13 100, 83, 4, front, 0.27 0.12 44.26 26.31 0.68 -

Table 5.1: Errors and normalized average vertical velocities.

5.1.2 The Results

5.1.2.1 Updraft Estimations

In figure (5.2) the updraft values of flight 1,3,5,7,9 and 10 are presented. The estimatedvalues fit very well the actual updraft values. However, one can see that this is onlytrue for stable flight conditions. Flight 1 and 10 have both got wrong values as soon asthey surpass their tcrash.

5.1.2.2 Thermal Center Estimation

The estimation of the center on a given height is quite stable, like one can see in figure (5.4)for the test flight 9. In figure (5.3) the average of enorm

distance over all flights was computed.One can see that enorm

distance is around [0.3, 0.5]. Therefore, the center is estimated at leastin the inner half of the thermal tube in average. Note, that we even have a small biasin these results, as the estimator was already tampered on the flight from the startingpoint to the boarder of the thermal tube.One could analyse in further steps the infuence of changing the length of the featurehistory stored in the cash, or more interesting, the effect of averaging the values withlarger windows and longer resampling steps. I think that again alot of computationalspace could be saved by analyzing this issue.

5.1.2.3 Trajectory Calculation and Following

For radii smaller than rmin = 30, it could be observed in supplementary analysis that theSky-Sailor easily falls into an uncontroled orientation. This is not the case if there is nowind, however the updraft gradients an also their change changes the roll too fast for

59

Page 61: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

0 10 20 30 40 50 60 70 80−20

−15

−10

−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

0 20 40 60 80 100 120 140−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

0 20 40 60 80 100 120−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

0 20 40 60 80 100 120 140−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

0 20 40 60 80 100 120 140−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

0 5 10 15 20 25 30 35 40−20

−15

−10

−5

0

5

10

15

20

time t [s]

Estimated updraft

Actual updraft

Figure 5.2: Updraft values: The estimated values (here flight 1,3,5,7,9,10)are aligned quite well with the actual values from the thermal tube.

64

Figure 5.2: Updraft values: The estimated values (here flight 1,3,5,7,9,10) are aligned quitewell with the actual values from the thermal tube.

60

Page 62: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

2 4 6 8 10 120

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

flight number i

aver

age

norm

ed c

ente

r er

ror

e d−no

rm

Average Center Error of FlightsOverall meanStandard deviation

Figure 5.3: Center Error: Here, all enormdistance and the overall average with the corresponding

variance are ploted. One can see that the center is always in the inner half of the thermaltube.

61

Page 63: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Figure 5.4: Center Estimation: The estimation of the center (here flight 9 and 13) is quitestable, as long as there are a at least a few values gathered from the thermal tube.

62

Page 64: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

the LLC to be able to handle the situation accordingly.The flights 1,2,8 and 10 crashed before reaching 2 minutes. The problem lies in the HLC,where the roll for given trajectory is calculated. The Sky-Sailor showed some problemsto follow the trajectory. Either it doesn’t circle around the center (for small k) or it reactsfar to unstable (for big k). The LLC cannot prevent this malfunction. This should beanalyzed in a more detailed manner and an adapted HLC and LLC should be written,as this is the biggest drawback the Sky-Sailor currently has.

63

Page 65: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 6

Conclusions

I have investigated books, experts, works and the net. According to the information I gotan elliptic pipe model for the thermal tube was developed and added to the simulation.Now, every wing part is threated seperatly with different wind velocities. Having thethermal model, I built up a set of features which finally led to the estimation of thethermal structure. All features where implemented, however only few actually enterinto the calculation.I then flew 13 flights in the simulator with thermal tubes varying in size. The testsshowed that the LLC has still got some problems in stabalizing the Sky-Sailor whilefollowing a (possibly unconsistend) trajectory. However, the estimation of the thermaltubes center is quite good. In average, the center was always predicted in the inner ringof the thermla tube, with acceptable variance.The updraft gradient feature is not stable. Further investigations are necessary todetermine the cause of this result. Only by inspection one could see that the estimateddirection for the thermal tube was not quite right, as the direction seemed to be changingevery now and then. The other featuers, such as the state feature, give quite goodresponses. However, with adapting the weights, one could maybe get even more betterresults.

64

Page 66: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Chapter 7

Future Work

7.1 Modeling Thermals

There are several improvements which could be done to close the gap between themodel and reality. At the moment, the thermal tubes are static with respect to time.One could think of extending the model for them to be able to grow and die, or evenchange position in higher altitudes, like bending in the global wind. So the structure ofthe thermal tube would change in time. If one would extend this, then a model for theflow of the global wind around the thermal tube could be implemented.One could add turbulences at the boarder of the thermal tube, which would make themodel much more realistic.One could include a change of pressure with respect to the height and adapt the conser-vation of mass accordingly. This would lead to a widening of in heigher altitudes.At the moment, the core windvelocities have to be supplied for each definition of athermal tube. One could think of giving the temperature gradient with respect to theheight and the temperature and dimension of the thermal tube at zero altitude. Thenthe velocities could be derived.

7.2 Static Soaring

7.2.1 T-LLC

There are a few aspects which were not addressed by the presented solution, but wherementioned as a favorable control property. That is, the Sky-Sailor should stay as longas possible in an updraft region, see section (4.2) on page (30). To adress this problem,one should be able to control the speed of the Sky-Sailor. Flying at a minimal speedin the thermal tube, the Sky-Sailor can perform tighter turns and therefore fly nearerto the thermal tubes center, where the updraft is assumed to be bigger. Furthermore,being longer in the thermal tube leads to more energy gained by the Sky-Sailor. Al-though flying at smaller speeds is not optimal with respect to the gliding angle, theabove mentioned advantages are often more than enough to have a total increase in

65

Page 67: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

performance.

7.2.2 T-HLC

7.2.2.1 Implementation of Adaptiv Fitting

The adaptiv fitting strategy to estimate the structure of the thermal tube like describedin (4.4.2.1) could be implemented and analysed. At the moment only the subpart withthe simple fitting approach was realized. However, the features needed are all alreadyimplemented in Matlab.

7.2.2.2 Control Height

In the high level control, the motor should be able to be controlled in order to gainspecific heights which are optimal to exploit a thermal tube. Or it should be used to beable to bridge the time where there no thermal is found. One should be able to use themotor in an active way.

7.2.2.3 Calculate Optimal Path

In the current version of the Sky-Sailor, a simple circular trajectory is defined around theestimated center of the thermal tube. However, there are more optimal solutions withrespect to the radius around the thermal tubes center which might be even calculatedanalyticaly. For this, one could maximize the gained energy for flying one round.Furthermore, the trajectory is always orientated in the same direction, it always turnsright. This decision should be adapted according to the updraft gradient feature or thermalcenter estimation (see 4.3.1.3 and 4.4.2).

7.2.2.4 Estimate Structure under Global Wind

The current thermal model has no change of the center of the thermal tube with respectto its height. If this would change, knowing the global horizontal wind would help topredict the structure and position at different heights. Note that the responses of thealready implemented Matlab file thermal exploit global wind.m should then be weightedas described in section (4.4.2.1).

7.2.2.5 Optimize Averaging Weights

The features used to calculate the structure as well as the estimated structure itself isweighted by an moving average filter of length 10, which corresponds to a timestep of0.4 seconds. One could analyse the error and the variance of the error of the estimatedstructure and find an optimal weighting length. Smoothing data goes on the cost ofhaving precise data, while gaining more stability. These two aspects could be optimizedagainst each other.

66

Page 68: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

7.2.2.6 Add other Features

The currently selected features have different advantages and drawbacks. For example,their calculation could be delayed (when integrating) or just not relevant. They couldbe looked at in a more detailed manner and other features selected accordingly. Onemight gain a lot of improvement by gathering together optimal pieces of information.

7.3 Dynamic Soaring

”Dynamic soaring is flight sustained through the power gained by coordinated manoeuvering inwind gradients.” [Wha]. Dynamic soaring can be used to extract energy from horizontalwind, as long as the direction or strength varies in space. When combining normalthermal flight with vertical wind gradients (up- and downdrafts), one refers to semi-dynamic soaring. A very good introduction is presented in [Wha].

67

Page 69: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Bibliography

[All06a] M.J. Allen. Autonomous soaring flight results. Technical report, 2006.

[All06b] M.J. Allen. Updraft model for development of autonomous soaring uninhab-ited air vehicles. page 19, 2006.

[All07] M.J. Allen. Guidance and control of an autonomous soaring uav. Technicalreport, NASA Dryden Flight Research Center, February 2007.

[Bad93] J.D. Bader. Ein Zweidimensionales Modell mit Variabler Horizontaler Auflosung zuSimulationen von Cumuluswolken: Aufbau und Anwendungen. PhD thesis, ETHZurich, Switzerland, 1993.

[Bar40] L.B. Barringer. Flight without Power. 1940.

[Bos02] M.B.E. Boslough. Autonomous dynamic soaring platform for distributed mo-bile sensor arrays. Technical report, Sandia National Laboratories, 2002.

[Bow66] P.M. Bowers. Soaring Guide. 1966.

[Bow06] A. Bower, G; Naiman. Just keep flying: Machine learning for uav thermalsoaring. Technical report, 2006.

[Car96] L.N. Carteciano. Entwicklung eines turbulenzmodells fur auftrieb-sstromungen. Master’s thesis, University of Karlsruhe, 1996.

[Cui94] J.W.M. Cuijpers. Large-Eddy Simulation of Cumulus Convection. PhD thesis,University of Technology Delft, Netherlands, 1994.

[Dao] J. Daoust. Tips for paraglider pilots.

[Ema93] D.J. Emanuel, K.A. Raymond. The representation of cumulus convection in numer-ical models. Boston, Mass.: American Meteorological Society, 1993.

[en.07a] en.wikipedia.org. Buoyancy, February 2007.

[en.07b] en.wikipedia.org. Drag equation, March 2007.

[en.07c] en.wikipedia.org. First law of thermodynamics, February 2007.

68

Page 70: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

[en.07d] en.wikipedia.org. Navier-stokes equations, February 2007.

[Hol72] J. R. Holton. A one-dimensional cumulus model including pressure perturba-tions. Master’s thesis, University of Washington, 1972.

[Irv] F. Irving. The Paths of Soaring Flights.

[Loh] Ulrike Lohmann. Cumulus dynamics.

[Lop72] R.E. Lopez. A parametric model of cumulus convection. Master’s thesis,COLORADO STATE UNIVERSITY, 1972.

[Mat06] A Mattio. Modelling and control of the uav sky-sailor. Master’s thesis, EPFLausanne, Switzerland, 2006.

[Met93] Handbook of Meteorological Forecasting for Soaring Flight. World MeteorologicalOrganization, 1993.

[Neg] A.P. Neggers, R.A.J. Siebesma. A multiparcel model for shallow cumulusconvection.

[Orv65] H.D. Orville. A numerical study of the initiation of cumulus clouds overmountainous terrain. Master’s thesis, University of Arizona, 1965.

[Pat06] I. Patel, C.K. Kroo. Control law design for improving uav performance usingwind turbulence. Master’s thesis, Stanford University, California, 2006.

[Pfi92] A. Pfister. Der einfluss der topographie der erdoberflache auf die ver-tikalsondierung des temperaturprofils, 1992. Institut fur Meteorologie undKlimaforschung.

[Pog64] D. Poggott. Technik und Taktik des Segelfliegens. ???, 1964.

[Sha01] G.S. Yates M.A. Fuller M.R. Seegar W.S. Shannon, H.D. Young. Measurementsof thermal updraft intensitiy over complex terrain using american white peli-cans and a simple boundary-layer forecast model, 2001.

[Wha] J.M. Wharington. Heuristic control of dynamic soaring.

[Zha04] Y.C. Zhao, Y.J. Qu. Minimum fuel powered dynamic soaring of unmannedaerial vehicles utilizing wind gradients. Master’s thesis, University of Min-nesota, Menneapolis, 2004.

69

Page 71: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Appendix A

Formulas

A.1 Tait-Bryant Angles

The angles used in this work represent the Tait-Bryant angles, like introduced by Mattioin [Mat06, p. 10]. The corresponding rotation matrix R is the following one.

R(φ, θ, ψ) = (A.1)

cosψ cosθ cosψ sinθ sinφ − sinψ cosφ cosψ sinθ cosφ + sinψ sinφsinψ cosθ sinψ sinθ sinφ + cosψ cosφ sinψ sinθ cosφ − sinφ cosψ− sinθ cosθ sinφ cosθ cosφ

A.2 Rotation of proj. Direction of Flight around z-axis

Rhoriz(ψhoriz) =

cos(ψhoriz) − sin(ψhoriz) 0sin(ψhoriz) cos(ψhoriz) 00 0 1

(A.2)

To calculate ψhoriz, one first calculates the unit vector of the x-axis of the Sky-Sailorin the earth frame and projects it onto the horizontal plan z = 0.

~eprojxb =

1 0 00 1 00 0 0

· R(−φ,−θ − ψ) ·

100

1 0 00 1 00 0 0

· R(−φ,−θ − ψ) ·

100

‖(A.3)

70

Page 72: Modeling and Flying Thermal Tubes with an UAV · subsets of thermals and are a direct result of thermals, a lot of knowledge about the structure of thermal tubes and there evolution

Now, the angle φhoriz between this projected x-axis ~e′xbproj and the earth frame x-axis

is given by

ψhoriz =

arccos

100

,~eprojxb 〉

if ~eprojxb (2) > 0

2π − arccos

100

,~eprojxb 〉

else

(A.4)

71