• Nenhum resultado encontrado

Platform for experimenting sensor nodes localization in WSN with UAV acting as mobile agent

N/A
N/A
Protected

Academic year: 2021

Share "Platform for experimenting sensor nodes localization in WSN with UAV acting as mobile agent"

Copied!
84
0
0

Texto

(1)

UNIVERSIDADE FEDERAL DE SANTA CATARINA GRADUATE PROGRAM IN AUTOMATION AND

SYSTEMS ENGINEERING

Juliano Grigulo

PLATFORM FOR EXPERIMENTING SENSOR NODES LOCALIZATION IN WSN WITH UAV ACTING AS

MOBILE AGENT

Florianópolis (SC) 2018

(2)
(3)

Juliano Grigulo

PLATFORM FOR EXPERIMENTING SENSOR NODES LOCALIZATION IN WSN WITH UAV ACTING AS

MOBILE AGENT

Master Thesis presented to the Gra-duate Program in Automation and Systems Engineering in partial ful-fillment of the requirements for the degree of “Master in Automation and Systems Engineering”.

Advisor: Prof. Leandro Buss Bec-ker, Dr. , DAS/UFSC.

Florianópolis (SC) 2018

(4)

Ficha de identificação da obra elaborada pelo autor,

através do Programa de Geração Automática da Biblioteca Universitária da UFSC.

Grigulo, Juliano

PLATFORM FOR EXPERIMENTING SENSOR NODES

LOCALIZATION IN WSN WITH UAV ACTING AS MOBILE AGENT / Juliano Grigulo ; orientador, Leandro Buss Becker, 2018.

85 p.

Dissertação (mestrado) - Universidade Federal de Santa Catarina, Centro Tecnológico, Programa de Pós Graduação em Engenharia de Automação e Sistemas, Florianópolis, 2018.

Inclui referências.

1. Engenharia de Automação e Sistemas. 2. Rede de Sensores Sem Fio (RSSF). 3. Localização. 4. VANT. 5. GNSS RTK. I. Buss Becker, Leandro. II. Universidade Federal de Santa Catarina. Programa de Pós-Graduação em Engenharia de Automação e Sistemas. III. Título.

(5)

Juliano Grigulo

PLATFORM FOR EXPERIMENTING SENSOR NODES LOCALIZATION IN WSN WITH UAV ACTING AS

MOBILE AGENT

This master thesis is recommended in partial fulfillment of the requirements for the degree of “Master in Automation and Systems En-gineering” which has been aproved in its present form by the Graduate Program in Automation and Systems Engineering.

Florianópolis (SC), November 14th 2018.

Prof. Werner Kraus Junior, Dr.

Coordinator of Graduate Program in Automation and Systems Engineering

Dissertation Committee:

Prof. Leandro Buss Becker, Dr. DAS/UFSC

Advisor

Prof. Paulo R. Ferreira Jr, Dr. INF/UFPEL (Por Videoconferência)

Prof. Gustavo Medeiros de Araujo, Dr. CIN/UFSC

Prof. Marcelo Ricardo Stemmer, Dr. DAS/UFSC

(6)
(7)

I dedicate this work to my parents and family, for their endless sup-port.

(8)
(9)

ACKNOWLEDGEMENTS

Thanks are given to PPGEAS/UFSC, the National Council for the Improvement of Higher Education (CAPES), and PROVANT (Un-manned Aerial Vehicles Project) team members, for their support on this research activity.

(10)

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to rank with those poor spirits who neither enjoy nor suffer much, because they live in the gray twilight that knows not victory nor defeat."

(11)

RESUMO

Redes de Sensores sem Fio (RSSF) e Veículas Aéreos não Tri-pulados (VANTs) se tornaram duas tecnologias muito utilizadas em aplicações de monitoramento, detecção de eventos, rastreamento de objetos e sensoreamento remoto. Uma RSSF consiste de centena ou até milhares de dispositivos compactos, alimentados por bateria, que possuem capacidade de medir e coletar dados do seu ambiente e en-caminhar os mesmos para outros sensores ou estação base por meio de rádiofrequência. VANTs, por sua vez, são plataformas excelentes para realizar coletas de dados remotos e podem facilmente carregar sensores aos locais de interesse. Este trabalho de dissertação foca no desenvolvimento de uma plataforma de experimentação de localização de sensores em uma RSSF, especialmente na validação experimental da técnica de localização geométrica eficiente (EGL), que proporciona um método de localização flexícel, escalável e distribuído para sensores estáticos em um campo arbitrário. O nó móvel (sensor responsável por coleta e encaminhamento de dados) será carregado por um VANT com capacidade de voo autônomo e embarcado com um sistema de loca-lização por satélite (GNSS) de baixo custo e com capacidade de alta acurácia por métodos de GNSS diferencial RTK, implementados neste trabalho. Resultados experimentais, conduzidos por meio da plata-forma desenvolvida, comparando acurácia da localização entre técnicas com e sem GNSS RTK validam a técnica EGL. A técnica de locali-zação EGL com RTK GNSS provou ter 4 vezes mais acurácia quando comparado com GNSS padrão (sem correção), provendo acurácia de centímetros ao posicionamento do VANT. Diferentes abordagens para o formato de propagação das ondas do rádio sem fio utilizado foram adotadas, o formato teórico para uma antena ominidiecional, um raio circular, e, baseado na experimentação da propagação real dos módulos utilizados, um formato elipsoidal. Ao final dos experimentos, a análise dos resultados mostrou que a acurácia de localização do sensor é melhor para a abordagem de propagação circular do sinal, com GNSS RTK e

(12)

rádios sem fio WiFi ESP8266, alcançando resultados em torno de 1 a 2 metros, para o caso de localização de 1 e 2 sensores, respectivamente.

Palavras-chave: RSSF, VANT, Sensoriamento Remoto, IEEE802.11, ESP8266, Pixhawk, RTK, Localização, GNSS, WiFi.

(13)

RESUMO EXPANDIDO

Introdução

Veículos Aéreos não Tripulados (VANTs) recentemente tornaram-se uma ferramenta valiosa para fins comerciais e civis. Dentre algumas aplicações recentes com tal tecnologia podemos citar monitoramento, inspeção, mapeamento, segurança pública, busca e resgate e agricultura de precisão. Redes de Sensores sem Fio (RSSF) consistem de vários dis-positivos compactos que coletam dados do ambiente ao qual estão in-seridos e encaminham para uma estação base. RSSF se tornou comum em várias aplicações nas áreas militares e civis, como rastreamento de objetos, operações de busca e resgate, logística, monitoramento de ati-vos e agricultura de precisão. Sensores compondo uma RSSF podem ser espalhados por uma área grande, aumentando a cobertura geográfica, mas também dificulta o acesso a informação coletada. Por isso que, em muitas aplicações, o VANT se encaixa bem como agente móvel do sen-sor coletor de dados, aumentado assim a capacidade e flexibilidade da RSSF. Em muitas das aplicações listadas anteriormente a localização dos sensores é de extrema importância, pois a informação coletada se torna incompleta quando não se sabe aonde o evento ocorreu. Assim, o problema de localização em RSSF é de grande importância. Caso os sensores pudessem ser manualmente inseridos a localização manual se tornaria viável, porém alguns lugares são de difícil acesso e muitas vezes perigosos a presença humana (vulções, costas e etc). Inserir um receptor GNSS em cada sensor pode inviabilizar o projeto por questões técnicas, consumo de bateria e custo dos receptores GNSS. Por isso, mé-todos de localização baseados na comunicação entre sensores deve ser empregado. Poucos trabalhos focam na experimentação de localização de sensores em RSSF e por isso faltam na literatura, ainda, o desenvol-vimento de uma plataforma para experimentar diferentes métodos de localização com nós móveis.

(14)

Objetivos

Esta dissertação tem como objetivo o desenvolvimento de uma plataforma de experimentação para localização de sensores em uma RSSF, com um VANT operando como nó móvel da rede. Também será implementado um método para aumentar a acurácia do sistema de localização do nó móvel, com o intuito de se aumentar a acurá-cia na localizalacão dos nós sensores estáticos, uma vez que receptores GPS sem correção, ou seja, operando em modo padrão, apresentam erro de metros. A plataforma desenvolvida será utilizada para testar o método Efficient Geometry-based Localization (EGL) de localização. Metodologia

O desenvolvimento da arquitetura experimental se baseia nos re-quisitos para atender a experimentação do método EGL proposto. os principais requisitos são: Conjunto VANT e bateria capazes de cubrir área para experimentação com pelo menos dois sensores; Computador embarcado e receptor GNSS capaz de executar algoritmos de melhoria de localização GNSS RTK; Controladora de voo do VANT com ca-pacidade de voo autonomo, por coordenadas de voo pré-programados no mapa; Estação base GNSS para correção RTK; Com base nes-tes requisitos e nas ferramentas disponíveis em laboratório foi pro-posto uma arquitetura de experimentação para localização de senso-res. A integração dos componentes é parte importante deste pro-cesso, bem como a execução de interfaces gráficas com o usuário. Resultados e Discussão

Resultados experimentais foram conduzidos para validar a pla-taforma experimental desenvolvida e o método EGL. Em um primeiro momento duas tecnologias de rádio foram testadas, rádios MICAz com protocolo IEEE 802.15.4, que é comum em aplicações de RSSF e rá-dios ESP8266 com protocolos WiFi e ESP-NOW (baixa latência e sem conexão). Os primeiros testes conduzidos com estas tecnologias de sen-sores foi no sentido de encontrar o formato da propagação do sinal de seu rádio, o que é um requisito da metodologia EGL. Após efetuado estes testes preliminares, a localização de sensores foi experimentada, primeiro com um sensor em um campo menor e, em seguida, com dois sensores em uma área maior. Também foram conduzidos testes para provar a acurácia do algortimo de correção do GNSS do nó móvel, com

(15)

acurácia de centímetros. Com base nos testes preliminares de pro-pagação de sinal notou-se que, na prática, o formato se aproxima de uma elipse, assim sendo o método de localização EGL foi aplicado com duas abordagens, propagação circular e propagação elipsoidal. Resul-tados experimentais comprovam a eficiência e acurácia do método em teste, com resultados de 2 metros de erro na localização de sensores. Considerações Finais

Neste trabalho de dissertação foi desenvolvida uma plataforma de experimentação para localização de sensores em uma RSSF. Um VANT foi utilizado para comunicar e coletar dados da RSSF, operando como nó móvel da rede. Ao final, foi possível validar a plataforma pro-jetada, alcançando o objetivo de localizar múltiplos sensores em uma campo arbitrário. Diferentes tecnologias de rádio foram comparadas e foi possível utilizar módulos WiFi de baixo custo como solução para a rede de sensores sem fio. O método implementado, RTK GNSS com algoritmo EGL, provou ser 4 vezes mais preciso do que quando compa-rado a métodos sem correção de GNSS.

Palavras-chave: RSSF, VANT, Sensoriamento Remoto, IEEE802.11, ESP8266, Pixhawk, RTK, Localização, GNSS, WiFi.

(16)

ABSTRACT

Wireless Sensor Networks (WSN) and Unmanned Aerial Vehicles (UAVs)have become two established technologies for applications such as monitoring, event detection, target tracking and remote sensing. WSN usually consists of hundreds and thousands of battery powered tiny devices that measure and collect data from its surrounding envi-ronment and forward it to a base station or sink. UAVs are a great platform for collecting remote data and can easily carry and deploy sensor nodes. The present research work focuses on the development of a platform for experimenting sensor nodes localization in WSN, spe-cially the experimental validation of the so-called Efficient Geometry-based Localization (EGL) technique, which provides a flexible, scalable, and distributed way to localize static sensor nodes on an experimental field. The mobile sink node will be carried by an UAV system with au-tonomous flight embedded with a low cost Global Navigation Satellite System (GNSS) receiver. Experimental results, carried out with the developed platform, comparing localization with standalone GNSS and Real Time Kinematic (RTK) GNSS technique validate the EGL tech-nique. The RTK GNSS implemented performed 4 times more precisely than standard GNSS techniques, with mobile node positioning errors in the order of centimeters. Different approaches for the communica-tion radius were compared, the tradicommunica-tional circular shape and, based on experimentation with the RF propagation shape, and ellipsoidal shape. The best results were achieved with circular shape for the RF propaga-tion, with RTK GNSS and WiFi ESP8266 radios, achieving accuracy as low as 1 meter for the static node on the field localization.

Keywords: WSN, UAV, Remote Sensing, IEEE802.11, ESP8266, Pixhawk, RTK, Localization, GNSS, WiFi .

(17)

LIST OF FIGURES

2.1 Types of range based localization . . . 6

4.1 Localization principle with three boundary points . . . . 20

4.2 WSN Scenario for Geometry-based Localization . . . 21

4.3 System architecture, showing main hardware and infor-mation flow . . . 24

4.4 EGL RTK process flowchart . . . 25

4.5 Graphical user interface status overlay . . . 27

4.6 Logs download for further analysis and PPK . . . 28

4.7 Left: Developed UAV prototype, based on PIXHAWK flight controller and SK450 frame. Right: wireless sensor prototype, based on ESP8266, log files are stored in an SD card . . . 34

5.1 Preliminary practical experiment for (SAYYED, 2016) EGL method. . . 37

5.2 Boundary communication points for each static node on ground(SAYYED, 2016) EGL method. . . 37

5.3 Sensor distance from boundary points. From left to right: 1) 13.44m 2) 17.71m 3) 8.87m 4) 10.42m (SAYYED, 2016) EGL method. . . 38

5.4 Signal strength measurements as a function of the dis-tance (X axis: disdis-tance in m, Y axis: received signal power in dbm). . . . 39

5.5 Static node position estimation. . . 41

5.6 Static node position estimation error (2.55m). . . 41

5.7 Spiral test: mobile node performs spiral test around the static node (located ath the black arrow) . . . 44

5.8 Comparison between RTK and single GNSS . . . 45

5.9 Mission Planner GCS and waypoint navigation for single node localization . . . 46

(18)

5.10 EGL technique applied with standalone GNSS position-ing in a sposition-ingle node scenario . . . 47 5.11 EGL technique applied using RTK GNSS positioning in

a single node scenario . . . 48 5.12 Mission Planner GCS and waypoint navigation for

mul-tiple node localization . . . 49 5.13 EGL technique applied using Ellipse for communication

radius, single GNSS . . . 51 5.14 Localization estimation error in relation to ellipse angle 51 5.15 EGL technique applied using circle pattern for

commu-nication radius . . . 52 5.16 Localization estimation error in relation to circle radius 53 5.17 EGL technique applied using Ellipse for communication

radius, RTK aided . . . 54 5.18 Localization estimation error in relation to ellipse angle 54 5.19 EGL technique applied using circle pattern for

commu-nication radius, RTK aided . . . 55 5.20 Localization estimation error in relation to circle radius 56

(19)

LIST OF TABLES

2.1 Errors in GNSS . . . 10 2.2 Comparison between wireless technologies for WSN . . . 15 5.1 Localization accuracy comparison . . . 42 5.2 Absolute error estimation . . . 48 5.3 Comparison between experimental runs . . . 57

(20)

CONTENT

1 INTRODUCTION 1 1.1 Project Scope . . . 2 1.2 Thesis Goals . . . 3 1.3 Thesis Organization . . . 4 2 RELATED TECHNOLOGIES 5 2.1 Localization Overview . . . 5 2.1.1 Range-based Localization . . . 6

2.2 Global Navigation Satellite System . . . 7

2.2.1 GPS . . . 7

2.2.2 GLONASS . . . 8

2.2.3 GNSS Augmentation - DGNSS and RTK . . . . 8

2.2.4 Data Communication Protocols for GNSS . . . . 11

2.2.5 NMEA-0183 . . . 11 2.2.6 RTCM 3.0 . . . 12 2.2.7 NTRIP . . . 12 2.3 WiFi 802.11n Standard in WSN . . . 14 2.3.1 ESP-NOW protocol . . . 14 3 RELATED WORKS 16 3.1 Discussion from previous works . . . 18

4 EXPERIMENTAL ARCHITECTURE DESIGN 19 4.1 EGL Technique . . . 19

4.2 Tests with MICAz Radios . . . 20

4.3 TinyOS and MICAz . . . 22

4.3.1 MICAz sensors programming . . . 22

4.4 TinyOS and GPS parser . . . 23

4.5 System Components Design . . . 23

4.5.1 Single Board Computer (SBC) . . . 25

(21)

4.5.3 WiFi Sensor Nodes . . . 29

4.5.4 GNSS receiver . . . 31

4.5.5 RTK Base Station (GNSS corrections) . . . 32

4.5.6 UAV Quadrotor . . . 33

4.6 Discussion . . . 34

5 EXPERIMENTAL RESULTS 36 5.1 Practical Experiments . . . 36

5.2 Preliminary Experiments Conclusion . . . 42

5.3 WiFi 802.11n Standard based platform . . . 43

5.4 Spiral test - RF propagation - ESP8266 . . . 43

5.5 RTKLIB validation . . . 45

5.6 Single Node Experiment . . . 45

5.6.1 UAV with Standard GNSS . . . 45

5.6.2 UAV Enhanced with RTK . . . 47

5.7 Multiple Nodes Experiment . . . 48

5.7.1 UAV with Standard GNSS . . . 49

5.7.2 UAV with Enhanced GNSS . . . 53

5.8 Final Considerations . . . 56

6 CONCLUSIONS 58 6.1 Future Work . . . 58

(22)

1 INTRODUCTION

Unmanned Aerial Vehicles (UAVs) turned out to be a valuable asset for commercial and civilian use. Applications such as monitoring, surveying, public security, search and rescue, remote inspection, preci-sion agriculture, aerial photogrammetry are some examples of current UAV’s usage.

Wireless Sensor Networks (WSNs) usually consist of hundreds, in some cases, thousands of battery operated tiny devices that measure and collect data from its surrounding environment and forward it to a base station or sink. WSNs became an established technology for a large number of applications in military and civilian use, such as target detection, logistics, security tracking, asset management, search and rescue operations, animal habitat, water quality monitoring, patient monitoring and precision agriculture (AKYILDIZ et al., 2002).

Recent advances in sensing, processing and communication made possible tight integration of a complete sensor node on a single chip (KAHN et al., 1999). On-chip integration enables inexpensive produc-tion of large numbers of such sensors. These, being deployed in large numbers results in better coverage of a geographical area, but also poses numerous challenges to the communication protocols(SICHITIU M. L.; RAMADURAI, 2004). In many applications UAVs may fit as a mobile agent for collecting data from the sensors in a WSN, increasing the network capacity and flexibility (WHITE et al., 2008).

One significant application is on the field of precision agriculture where spatio-temporal data from a widely distributed sensor network in a farm field carries useful meaning for the application only when it is associated with location information (SAHOTA, 2013). Another application is on the area of geomatics, some rural properties are partly covered by permanent preservation areas where the vegetation cannot be cleared off or changed, so the job of mapping the borders is very hard because traditional GNSS systems fail in acquiring position under heavy vegetation (lack of line of sight to satellites), so static sensors

(23)

2

could be used for monitoring the lands borders.

In most of these applications, location-awareness is an essential feature, because the collected information is often meaningless without location knowledge. Sensor nodes have to be aware of their location to be able to identify where the event takes place, enabling better interpre-tation of sensed data. Therefore, the problem of localizing the sensors is of great importance for many WSN applications. Sensor nodes aware of their position can help in applications like geographic routing or target movement monitoring (TANVIR, 2010), also improving routing efficiency.

On the other hand the main motivation for localization of sensor nodes arises from the need to provide an efficient way for collecting data, based on the sensor nodes position the mobile sink node can execute an efficient path at data collection from the WSN.

The position of each sensor node could be manually introduced if the sensors are hand-placed and if the deploy area is not a harmful on inaccessible environment. However, when the number of sensors is large it becomes a complex and error-prone method of localization. If the sensors are deployed from a plane, helicopter or UAV, localization method need to be employed, because it is not sure where the sensors will take place on the ground. If each sensor has a Global Navigation Satellite System (GNSS) receiver, the problem becomes trivial, since it already has the capability to calculate its own position, although this will not be sufficient in the case the sensor’s GNSS antenna fall upside down or below bushes and trees (GNSS reception is really sensible to physical obstacles). However, having a GNSS receiver on every node is a costly proposition in terms of power consumption, volume, and financial resources.

In an ideal world the mobile sink node GNSS receiver has no error, thus the location errors of sensor nodes may depend only on the algorithm used. In practice this is not possible, because the GNSS re-ceivers (especially low cost rere-ceivers such as single-frequency) reach at most accuracy of meters, that could lead to a low performance posi-tioning system.

1.1.

Project Scope

The present work is based on a PhD thesis previously developed in our research group (SAYYED, 2016). Sayyed proposed an innova-tive localization technique for efficient position estimation of the sensor nodes using an UAV as mobile beacon node and simple geometric

(24)

tech-3

niques. The scheme, called EGL, does not require extra hardware or data communication and does not make the ordinary sensor nodes to spend energy on any interaction with neighboring nodes. The posi-tion estimaposi-tion may tolerate obstacles and only requires broadcasting of beacon messages by the mobile node.

The current scheme of estimation localization requires three bound-ary points on each sensor node, which requires at least two passes of the mobile node through the coverage zone, that leads to high traverse time and energy consumption, which is a point to improve; the pro-posed technique make some assumptions in terms of communication range, assuming that the communication range of each static node fol-lows an ideal circle pattern with radius r; the communication interval between mobile node and static nodes (beacon interval) should be at least 200 ms, in order to guarantee acceptable error estimation (below 2 meters). Although EGL was tested under simulation analysis it was necessary to proof its real efficiency.

This work also relates with a Master thesis that took place in the same group. In (BODANESE, 2014) was developed a wireless com-munication infrastructure designed for a small-scale Unmanned Aerial Vehicle (UAV) providing a communication link between UAVs and a base station and also additional links that allow collecting data from a WSN. It makes use of IEEE 802.15.4 protocol. Despite the good results new technologies will be investigated and evaluated here.

The present paper focuses on the development and evaluation of a experimental platform to perform experiments with sensor nodes localization in WSN with UAV as mobile agent. The experimental plaftorm developed will be also used to test, and possibly validate, the EGL localization method.

Experimental results at the end shows the efficiency and accu-racy of the method in check with the developed platform, also, com-parisons between different experimental runs, with different technolo-gies employed, are made. This work was published at the IEEE 23rd International Conference on Emerging Technologies and Factory Au-tomation - ETFA 2018, that took place in Turin - Italy, from 4th to 7th September of 2018, as a full paper.

1.2.

Thesis Goals

The main objectives of this thesis are:

• Development of an experimentation architecture, a wireless sen-sor localization system based on an UAV as a mobile node;

(25)

4

• Perform tests on the architecture proposed for the sensor nodes localization;

• Perform of field tests with EGL technique proposed by (SAYYED, 2016), deep analysis and improvements;

1.3.

Thesis Organization

The reminder parts of this thesis are organized as follows. Chap-ter 2 presents the concepts and technologies that are related with this paper, the technique used for localization and the communication pro-tocol. Chapter 3 cite and compare with important and recent papers about mobile aided localization of WSN nodes. Chapter 4 states the ex-perimental setup developed and the architecture of the system. Chapter 5 shows experimental results in a real world scenario, single and mul-tiple sensor nodes localization are performed. Chapter 6 discusses the experimental results, comparing the solutions, and the future work in this research.

(26)

2 RELATED TECHNOLOGIES

In this chapter the basic concepts of localization techniques are introduced, following by the study of the main available localization services, such as american GPS and russian GLONASS Global Nav-igation Systems. In this work the mobile node carries a GNSS sys-tem capable of tracking the main GNSS services, so it is important to know its coverage and limitations in order to implement a prototype for worldwide use and experimentaton. Also differential GNSS tech-niques are discussed, mainly focusing on Real Time Kinematics (RTK) method for increasing the mobile node GNSS receiver accuracy. GNSS receivers suffer of lack of accuracy when operating standalone, because of multipath, shadowing, lack of line of sight, single frequency, iono-sphere errors and so on. Such of factors that can be mitigated using RTK techniques. The EGL scheme together with RTK augmentation is presented and explained. At the end, the main wireless technologies adopted in this work for the WSN communication are introduced and explained.

2.1.

Localization Overview

Localization is estimated through communication between lo-calized node and unlolo-calized node for determining their geometrical placement or position. Location is determined by means of distance and angle between nodes. There are many concepts used in localiza-tion such as the following.

(i) Lateration: occurs when distance between nodes is measured to estimate location. (ii) Angulation: occurs when angle between nodes is measured to estimate location. (iii) Trilateration: Location of node is estimated through distance measurement from three nodes. In this concept, intersection of three circles is calculated, which gives a single point, which is the position of the unlocalized node. (iv) Multilat-eration: In this concept, more than three nodes are used in location

(27)

6

Figure 2.1: Types of range based localization

estimation. (v) Triangulation: In this mechanism, at least two angles of an unlocalized node from two localized nodes are measured to estimate its position. Trigonometric laws, law of sines and cosines are used to estimate node position (YOUSSEF; YOUSSEF, 2007).

Localization schemes are classified as anchor based or anchor free, centralized or distributed, GNSS based or GNSS free, fine grained or coarse grained, stationary or mobile sensor nodes, and range based or range free.

Range-free methods use radio connectivity to communicate be-tween nodes to infer their location. In range-free schemes, distance measurement, angle of arrival, and special hardware are not used (HE et al., 2003).

2.1.1.

Range-based Localization

Range-based schemes are distance-estimation and angle-estimation-based techniques. Figure 2.1 shows important techniques used in range-based localization , they are: received signal strength indication (RSSI), angle of arrival (AOA), time difference of arrival (TDOA), and time of arrival (TOA)(LIU et al., 2005).

In RSSI, distance between transmitter and receiver is estimated by measuring signal strength at the receiver (YOUSSEF; YOUSSEF,

(28)

7

2007). Propagation loss is also calculated, and it is converted into distance estimation. As the distance between transmitter and receiver is increased, power of signal strength is decreased.

In Angle of Arrival (AOA), unlocalized node location can be esti-mated using angle of two anchors signals. These are the angles at which the anchors signals are received by the unlocalized nodes (YOUSSEF; YOUSSEF, 2007). Unlocalized nodes use triangulation method to es-timate their locations (MANZOOR, 2010).

Time Difference of Arrival (TDOA) technique measures the dif-ference between the arrive time of two signals in the receiver (PEREIRA, 2011). While in TOA, speed of wavelength and time of radio signals traveling between anchor node and unlocalized node is measured to es-timate the location of unlocalized node (MANZOOR, 2010). GPS uses TOA, and it is a highly accurate technique; however, it requires high processing capability.

2.2.

Global Navigation Satellite System

The Global Navigation Satellite System (GNSS) is a system that uses satellites to provide autonomous geo-spatial positioning. It al-lows small electronic receivers to determine their location (longitude, latitude, and altitude/elevation) to a certain precision (within a few meters) using time signals transmitted along a line of sight by radio from satellites. The United States’ Global Positioning System (GPS), Russia’s GLONASS, China’s COMPASS, and the European Union’s Galileo are global operational GNSSs. It is present in a wide range of real applications: navigation, agriculture, surveillance and etc.

In this work the mobile sink node carries a GNSS capable of simultaneously track GPS and GLONASS satellites.

2.2.1.

GPS

The United States’ Global Positioning System (GPS) consists of up to 32 medium Earth orbit satellites in six different orbital planes, with the exact number of satellites varying as older satellites are retired and replaced. Operational since 1978 and globally available since 1994, GPS is currently the world’s most utilized satellite navigation system. The GPS system begun as an experiment conducted by U.S. Navy in the late 60s, at that time it was used to localize American sub-marines that carried nuclear missiles and used radio signals offset from satellites as localization technique, known as Doppler effect. Latter,

(29)

8

at 70s, this system was adopted and enhanced by the DoD (Depart-ment of Defense of United States) that launched in 1978 the NAVSTAR (Navigation System with Timing and Ranging), with 24 satellites since 1993.

GPS is controlled by the U.S. government and operated by U.S. army. It offers two operation layers, the Standard Positioning Ser-vice (SPS), available or civilian use and the Precise Positioning SerSer-vice (PPS) with U.S. army restrict use. The GPS uses TOA technique to determine position in space.

2.2.2.

GLONASS

The formerly Soviet, and now Russian, Global’naya Navigat-sionnaya Sputnikovaya Sistema, (Global NAvigation Satellite System or GLONASS), is a space-based satellite navigation system that pro-vides a civilian radio navigation-satellite service and is also used by the Russian Aerospace Defense Forces. GLONASS has full global coverage with 24 satellites.

2.2.3.

GNSS Augmentation - DGNSS and RTK

Augmentation of a global navigation satellite system (GNSS) is a method of improving accuracy, reliability, and availability from nav-igation systems, through the integration of external information into the calculation process. Some systems transmit additional information about sources of error (such as clock drift, ephemeris, or ionospheric de-lay), others provide direct measurements of how much the signal was off in the past, while a third group provide additional vehicle information to be integrated in the calculation process.

Satellite-based augmentation systems (SBAS) support wide-area or regional augmentation through the use of additional satellite-broadcast messages. Using measurements from the ground stations, correction messages are created and sent to one or more satellites for broadcast to end users as differential signal. SBAS is sometimes synonymous with wide-area differential GNSS (DGPS). SBAS is used in this work to increase the single positioning accuracy and convergence.

In order to achieve high accuracy with a standard GNSS receiver there is the need to use Differential GNSS (DGNSS) techniques, such as the Real-Time Kinematics (RTK). RTK method can provide high accu-racy positioning in the presence of a GNSS base station. The adopted technique is based on the use of carrier-phase measurements in addition to code-phase measurements and the transmission of corrections from

(30)

9

the base station, whose location is well known to the rover, so that the main errors from the single positioning are corrected through a sophis-ticated algorithm. It relies on determining the number of wavelengths between the satellite and receiver, also referred to as integer ambigu-ity resolution. The closest the RTK base station is from the rover the better is the quality of the positioning, and a real time communication channel is needed connecting base and rover.

Services providing base station corrections through Internet, such as NTRIP CASTERs, makes RTK setup simpler and faster compared to a traditional base station and radio to send correction data to a rover. RTK, which achieves performances in the range of a few cen-timeters, and even millimeters, is also a technique commonly used in surveying applications.

Inspired by (SPOCKELI, 2009), the present work uses RTK posi-tioning for achieving high accuracy posiposi-tioning of the Unmanned Aerial Vehicle (UAV) that plays the rover role. As further discussed, it helps to reduce the error of the location algorithm under evaluation on this work.

2.2.3.1. Code and Phase Pseudoranges

In principle, the observables used in satellite navigation are ranges which are deduced from measured time or phase differences based on a comparison between received signals and receiver-generated signals. As there are two clocks involved, one in the satellite and one in the receiver, the ranges contain clock errors and are therefore denoted pseudoranges. Pseudoranges can also be obtained from carrier phase measurements. 2.2.3.2. Bias and Noise

The error sources of a GNSS-receiver may be classified into three groups: satellite related errors, propagation-medium-related errors and receiver-related errors, shown in Table 2.1.

2.2.3.3. RTKLIB

For a long time RTK algorithms were proprietary, but since 2006 it is available an open source GNSS toolkit for performing standard and precise positioning. It is named Real-Time Kinematic Library RTKLIB.

RTKLIB is an open source program package for standard and precise positioning with several GNSS, among them GPS, Galileo, GLONASS

(31)

10

Table 2.1: Errors in GNSS Satellite Clock Bias,

Orbital Errors Signal Prop-agation Ionospheric refraction, Tropospheric refraction Receiver Antenna phase center variation, Clock bias and Multi-path

and BeiDou. RTKLIB supports several positioning modes for real-time and postprocessing applications. The RTKLIB program package con-sists of several GUI APs (graphical user interface application programs) for both Windows and CUI (command-line user interfaces) applications for UNIX/LINUX, where one of the latter will be described in this sec-tion.

2.2.3.4. RTKRCV

rtkrcv is RTKLIB real-time positioning applications and sup-ports kinematic and moving-baseline positioning modes that may be used for high-precision positioning of UAVs, with fixed and moving base-station respectively. The application is configured to obtain raw observation data from the base and rover GNSS receivers through NTRIP and serial connections, respectively. The input streams con-tains raw pseudorange and phase measurements and are double dif-ferenced to eliminate common errors. These double difdif-ferenced phase and pseudorange measurements form the measurement vector of an Extended Kalman Filter (EKF) that estimates the position and inte-ger ambiguities. The estimated rover position from the EKF is re-ferred to as a float solution, i.e. a solution with unresolved ambiguity. The estimated carrierphase ambiguities are formulated as an Integer Least-Squares (IRL) problem and is solved using the LAMBDA and MLAMBDA methods (TAKASU; YASUDA, 2009).

(32)

11

2.2.3.5. RTK operation and setup

RTKLIB code may be download from http://www.rtklib.com/. The library can be used in any windows and linux operating systems. The executable binary applications included in the package from the website require Microsoft Windows environment. On the other OS or environment (such as Linux OS), it is necessary to compile and build the applications.

In the case of using linux OS, it is only necessary to download the source code from https://github.com/tomojitakasu/RTKLIB. Us-ing the followUs-ing commands.

git clone https://github.com/tomojitakasu/RTKLIB.git cd RTKLIB

sudo make #Compile all the applications

2.2.4.

Data Communication Protocols for GNSS

Mobile phone systems (GSM, GPRS and UMTS) are used in this work for data transmission between the mobile node and the GNSS base station. Several different data communication protocols exist for GNSS applications but two protocols have become standard, NMEA 0813 and RTCM. The abbreviations show the origin of these two protocols: NMEA is developed by the National Marine Electronics Association and RTCM by the Radio Technical Commission for Maritime Services.

2.2.5.

NMEA-0183

The NMEA standard defines an electrical interface and data protocol for communication between marine instrumentation. This in-cludes also GNSS equipment. Under the NMEA standard all characters used are printable ASCII text. Most processing programs providing real-time positioning information understand and expect data to be in NMEA format. This data includes the complete position, velocity and time solution computed by the GNSS receivers. The data is packed in form of so called sentences. Each sentence starts with a $ and ends with a carriage return/line feed sequence and can not be longer than 80 characters. In this work the NMEA standard is adopted as the RTK output protocol, to broadcast positioning data between sensor nodes in the WSN.

(33)

12

2.2.6.

RTCM 3.0

The internationally accepted data transmission standards for DGNSS are defined by the Radio Technical Commission for Maritime Services organization (RTCM). The protocol is a binary one designed to optimize the communication throughput. The RTCM version 3.0 is designed to support real-time kinematic (RTK) operations. The rea-son for emphasizing RTK operations is that these operations involve broadcasting a lot of information and hence benefits from an efficient data format. The broadcasted information include data for GPS and GLONASS RTK operations with code and carrier phase observations, antenna parameters and additionally system parameters. The format is designed to make it possible to modify the specifications in order to in-clude new signals such GPS L2c and L5 signals and signals of GALILEO positioning system. The higher efficiency of RTCM 3.0 makes it pos-sible to support RTK services with significantly reduced bandwidth (RIETDORF et al., 2006). This is an advantage especially in wire-less networks and mobile applications where the available bandwidth is considerably smaller than in wired networks. For clients using mobile communication which are charged by the amount of transferred data a reduced bandwidth means reduced operating costs. In February 2004, RTCM released the third version of their protocol of their recommended standards for differential GNSS. RTCM 3.0 has been developed as more efficient alternative to previous versions and is more efficient, easy to use, and more adoptable to new situations.

2.2.7.

NTRIP

Ntrip stands for an application-level protocol for streaming Global Navigation Satellite System (GNSS) data over the Internet. It is a generic, stateless protocol based on the Hypertext Transfer Protocol HTTP/1.1. The HTTP objects are enhanced to GNSS data streams. Ntrip is an RTCM standard designed for disseminating differential cor-rection data or other kinds of GNSS streaming data to stationary or mo-bile users over the Internet, allowing simultaneous PC, Laptop, PDA, or receiver connections to a broadcasting host. It supports wireless In-ternet access through Mobile IP Networks like GSM, GPRS, EDGE, or UMTS. Ntrip is implemented in three system software components: NtripClients, NtripServers and NtripCasters. The NtripCaster is the actual HTTP server program whereas NtripClient and NtripServer are acting as HTTP clients (LENZ, 2004).

(34)

13

2.2.7.1. RBMC - IBGE

The RBMC acts as known coordinates belonging to the Brazilian Geodetic System (SGB), preventing the user from the risk of placing a fixed receiver at, sometimes, dangerous or difficult areas to reach. Be-sides, RBMC stations are equipped with high-performance receivers, providing observations of great quality and reliability. The GNSS sta-tions are made of forced centering pins, specially designed, and threat-ened on stable pillars. Most of the network receivers can track GPS and GLONASS satellites, whereas some of them can only trace GPS. These receivers constinuously collect and store the code and phase ob-servations of the carrier waves transmitted by satellites of the GPS or GLONASS constellations.

Each station has a receiver and a geodetic antenna, Internet connection and constant power supply which enables the continuous operation of the station. The coordinates of the RBMC stations are another very important aspect to the production of the final results of the surveys referenced to them. Moreover, the major advantage of the RBMC is that all of its sations integrate the Reference Network SIRGAS (Geocentric Reference System for the Americas), whose final coordinates are ± 5 mm-precise, making it one of the most accurate networks in the world. Another relevant role of RBMC is that its obser-vations have been contributing, since 1997, to the regional densification of the IGS network (International GPS Service for Geodynamics), as-suring, thus, a better precision of the IGS products – such as precise orbits – on the Brazilian territory.

The operation of the RBMC stations is thoroughly automated. The observations are organized, in daily files, corresponding to sessions starting at 00h 01min and ending at 24h 00mim (Universal Time), with track intervals of 15 sec. After the end of a session, the files with the respective observations are transfered from the receiver to the Control Center of the Brazilian Network System of Continuous Monitoring of the GNSS Systems – RBMC - Kátia Duarte Pereira, in the Department of Geodesy (Rio de Janeiro-RJ). At this point, new files of the standard format RINEX2 are created, with observation quality control. Then, data files RINEX2 and the orbits are transmitted and made available in the download area in the IBGE portal.(IBGE, 2018)

In this work the RBMC service is used in order to obtain GNSS measurements from base stations all over the Brazilian territory, de-pending where the UAV flight takes place. For any tests surrounding Florianópolis city, two base stations are available, one is located at the Federal University of Santa Catarina (UFSC) and the second one at

(35)

14

the Federal Institute of Santa Catarina (IFSC).

2.3.

WiFi 802.11n Standard in WSN

Motivated by the concept of Internet of things and new low power/low cost open source wireless modules it was proposed the study and implementation of a new protocol for the sensor nodes, the WiFi 802.11n Standard together with ESP-NOW realtime and connectionless protocol (TEAM, 2016). WiFi modules became cheap, power efficient and customizable in a way one can access the lower WiFi IEEE 802.11 protocol layers. Another good advantage of WiFi is that it is easy to integrate with internet and cloud services, which is a great step up for WSN applications in a way the data can be delivered faster and distributed, without the need of gateways as such needed in Zigbee modules.

2.3.1.

ESP-NOW protocol

ESP-NOW is a fast, connectionless communication technology featuring short packet transmission. ESP-NOW is ideal for smart lights, remote control devices, sensors and other applications. It ap-plies the IEEE 802.11 Action Vendor frame technology, along with the IE function developed by Espressif, and CCMP encryption technology, realizing a secure, connectionless communication solution.

A comparison between different wireless communication tech-nologies suitable for WSN application is shown in Table 2.2. In this scope, The ESP8266 WiFi module, together with ESP-NOW protocol, it is the best choice for our WSN application. It has low power con-sumption, big open source community, possibility of custom program-ming with large variety of operational systems and protocols, incredible range even with PCB antenna (1 km from tests) and high data rate.

(36)

15

Table 2.2: Comparison between wireless technologies for WSN

Section ESP8266 LoRa Zigbee Bluetooth

feature WiFi +

ESP-MESH

+

ESP-NOW

Star Ad-hoc, peer to peer, star or mesh Ad-hoc, very small networks range 1 km >15 km 100 m 10 m data rate 10 Kbps -10 Mbps 300 Kbps 250 Kbps 1 Mbps frequency 2.4 Ghz -2.5 Ghz 433, 868, 915 Mhz 2.4 Ghz 2.4 Ghz power com-sunption

Low Very Low Very Low Medium

(37)

3 RELATED WORKS

In this chapter the previous works performed and related to the thesis topics will be briefly introduced. As this is a new trend, most of the related works are recent and represent great contribution in the field. Works regarding localization methods using different mobile nodes (robots and generic MNs) and alternative localization algorithms will be summarized here.

One of the first attempts of using a mobile node to locate the static nodes of a wireless network can be found in (SICHITIU M. L.; RAMADURAI, 2004). The authors use a remotely controlled truck equipped with a GPS to move a hand-held device outdoors that broad-casts messages containing information about the location of the truck, similar as in (SAYYED, 2016). The nodes receiving these messages construct probabilistic constraints based on the location of the beacon and distance estimates from RSSI. The reported localization error was less than three meters.

(SICHITIU M. L.; RAMADURAI, 2004) propose a localization algorithm using Bayesian inference to process information from one mobile beacon. The unknown node uses the beacon’s position and the RSS measurement to construct a constraint on its position estimate, and then it applies Bayesian inference to compute its new position estimate. In a nutshell, it infers the distance between the device and the mobile anchor from the strength of the received messages, and hence derive the position by trilateration. Methods based on the received signal strength usually are poorly secure and inaccurate.

In (CABALLERO et al., 2008a), a robot equipped with DGPS moves in an outdoor parking lot measuring RSSI from neighboring nodes. The localization algorithm applies at first a particle filter for an initial approximation of the position of the nodes using measurements from the robot, and then an inverse filter for refining the estimates using measurements among the nodes. The likelihood of the measurements is modeled as a Gaussian, whose mean and standard deviation increase

(38)

17

with the distance. The model is calibrated before the experiments and, to account for the differences among the nodes,the authors intentionally inflate the standard deviation. A similar particle filter and model for the RSS are used in (CABALLERO et al., 2008b), but this time a helicopter is used as a mobile beacon to estimate the position of the nodes in 3D.

In (PINOTTI et al., 2016), one of the first research works that face the localization of WSN using a drone, a localization algorithm based on trilateration using a drone equipped with an omni-directional antenna has been studied. Such algorithm logically tessellates the de-ployment area by diamonds. For each sensor, the drone sends a message to it and waits for its acknowledgment (ack). The drone derives the distance between itself and the sensor, evaluating the round-trip time of the exchanged message and then, the drone sends the measurement to the sensor. Acquired enough measurements, each sensor performs two trilaterations: one to locate the diamond where it resides, and another to refine its position and to bound its position error.

In (HUANG; ZARUBA, 2007), another mobility model called, CIRCLES, is formed based on circular path movement. The main goal of CIRCLES is to overcome the collinearity problem. However, this model is unable to reach the nodes located in the corners of the net-work, thus, affecting negatively the localization ratio. This problem can be solved by adding more outer circles to the path, however, this will bring another issue about the path length. In order to overcome the collinearity problem, (GUANGJIE et al., 2014) proposed a mo-bile anchor-assisted localization algorithm based on a regular hexagon (MAALRH). MAALRH is a static path planning technique that starts from the centre of the network and its movement path is based on a hexagon-shape movement. However, similar to CIRCLES, MAALRH is unable to localize some of the sensors nodes especially those around in the corners of the monitored area.

Also (SHARMA et al., 2018) presented a framework for multi-UAV guided ground ad hoc networks. The authors have discussed how the network is formed among the multiple UAVs and an efficient mech-anism for making the search non-redundant. Bayesian Kalman filtering is employed for the purpose of estimating the location of the Concepts which in turn is used for updating previous maps. The new concept of Topology Organizing Maps is also introduced by the authors who determine the positioning of the nodes with respect to the introduced Virtual Concepts which are identified during cognitive mapping. The authors have successfully demonstrated the cooperative network

(39)

for-18

mation with the help of constant prediction and estimation with the help of neural models and Kalman filtering.

(SONG et al., 2018) presented a mobile sensor network system for monitoring of unfriendly environments. The author’s proposes a wheel-based robotic node architecture for adding mobility to wireless sensor network, also, some prototype nodes have been implemented. The motion performance of the mobile nodes and the autonomous de-ployment capability of the proposed mobile sensor network was tested by some experiments performed on a tabletop testbed. Experimental results showed that the proposed mobile sensor network system success-fully brings mobile sensing, network self-deployment and event tracking capabilities to wireless sensor networks. Outdoor tests were not per-formed, and the system was only validated in a particular environment, the author testbed.

In (SILVA et al., 2018) presented a study of the energy consump-tion of a WSN, that perform data collecconsump-tion, in an UAV. It analyses the energy consumed while communicating between sensor nodes. Also, it analyzes the energy consumption of an UAV in hold position while communication with a sensor node in the field. Experimental results showed that the current drained for the sensor is around 40 mA to 60 mA, while the UAV drains up to 23 A. Hence, it is concluded that it is feasible to use an UAV to collect data in a WSN, the sensor nodes does not perform significant impact in the energy consumption, com-pared to the UAV electronic.

3.1.

Discussion from previous works

Most of the previous works presented here lack of experimental results and propose complex solutions which makes it harder to im-plement in a real world scenario. Also, some of the previous works in localization of sensor nodes make use of proprietary and specific hard-ware, sometimes making it easier for experimentation but costly when considering a large network. No related work found proposed an ar-chitecture for experimentation on the topic of localization, which is a gap and an opportunity for considerable contribution on the field. The EGL technique is chosen among then in order to validate the experi-mental platform, because it poses inumerous advantages compared to other works cited here (no need for special hardware, scalable to big-ger WSN without modifications, simple solution based on trigonometry and robust).

(40)

4 EXPERIMENTAL ARCHITECTURE DESIGN

In this chapter it is going to be discussed the different cases that have been worked on in order to reach a final design setup. In order to do so, it is necessary to explore the diversity of technologies and alternatives to implement the WSN proposed.

4.1.

EGL Technique

A method named EGL for estimating unknown node positions in a sensor network was proposed in (SAYYED, 2016). Such technique is based on the fact that whenever the radius of a circle and three boundary points on that circle is known, the center of the circle (the location of sensor node) can be estimated, like shown in Figure 4.1. EGL promises to provide a flexible, scalable and distributed localization method for WSNs by adopting only one mobile node.

It assumes that the mobile node is equipped with a GNSS unit and that it has enough energy resources (battery) to broadcast mes-sages while covering all the area where the nodes are located. Also, it makes an assumption regarding the radio-frequency propagation of nodes, where all the static nodes are assumed to have rotationally sym-metric communication range and the mobile node communicates with nodes that fall within a circle of radius r centered on the node.

Figure 4.2 illustrates a scenario where several static sensor nodes are deployed randomly in the sensing field. A mobile node (UAV) will be used to scan the network area and help sensor nodes to determine their locations.

The mobile node is equipped with a GNSS receiver in order to find its precise location and need to have enough energy (i.e. battery resources) to move and broadcast beacon messages during the localiza-tion process. Sensor nodes, which are in the range of beacon messages, estimate boundary points on its communication circle and try to deter-mine its own location. The boundary points are measured with a simple

(41)

20

Figure 4.1: Localization principle with three boundary points

algorithm that takes as valid boundary points the first point recorded by the static sensor, the second and third boundary points are mea-sured when there is a large time difference between beacon messages, and the last boundary point recorded is the last beacon received.

4.2.

Tests with MICAz Radios

As the first wireless technology under study in this project it was adopted IEEE 802.15.4 (GROUP, 2015) as communication proto-col, with MICAz modules already available for use at the laboratory, to perform communication between the sensor nodes and the mobile agent, like in (BODANESE, 2014). IEEE 802.15.4 technology is com-monly used in WSN, this one has some nice features like low power consumption, allow long range communication with low overhead.

The aim of the tests with MICAz is to perform communication between at least two nodes, one representing the mobile node and a second one representing the static node, to proceed to the EGL exper-imentation.

(42)

21

(43)

22

these technology it is necessary to first investigate how the program-ming is done. MICAz modules operate over TinyOS operating system, which will be discused further in this topic.

4.3.

TinyOS and MICAz

TinyOS is an open source, BSD-licensed operating system de-signed for low-power wireless devices, such as those used in sensor net-works, ubiquitous computing, personal area netnet-works, smart buildings, and smart meters. The TinyOS 3 framework allow code development for MicaZ sensors, including libraries and example codes. The MI-CAz radios used for tests in this thesis were programmed with tinyOS (BERKELEY, 2012) operating system under nesC programming lan-guage.

4.3.1.

MICAz sensors programming

The first step was to install the TinyOS 3 framework, available at Github (https://github.com/tinyos), in a host computer. For this task was used a laptop executing Ubuntu 14.04.05 LTS. TinyOS also disposes application in Java platform for communication between a host PC and the MICAz modules, using USB interface.

Based on the previous work from (SAYYED, 2016) and (BO-DANESE, 2014) it was developed a software using python language in the host PC to read GNSS data from a UBLOX M8N GNSS receiver and transmit it to the MICAz through USB interface. The packects are processed in the MICAz mobile node and forwarded a second static node, that logs the beacons (containing coordinates and timestamp information).

The first MicaZ (representing the sensor on the mobile node) is programmed with an application that reads packets from the serial of the host PC and forward it through the radio interface to another MICAz sensor. In this case, the GNSS module is connected directly to the host PC and an application forward the packets from the GNSS to the MICAz module. The software programmed at the MICAz nodes is based on the applicaton BaseStation, available in the tinyOS package. The second MicaZ (meant to be the remote sensor on field) is programmed with an application that logs packets it receives from the radio to its flash memory. On a subsequent power cycle (e.g. hardware reset), the application transmits any logged packets, erases the log, and then continues to log packets again. This application is based on the

(44)

23

the applicaton Listen, available in the tinyOS package.

4.4.

TinyOS and GPS parser

In order to gather GPS data from the computer’s USB port and forward it to the serial interface of the MicaZ micro-controller there are three commonly used java programs that come packaged in TinyOS. The first application is the serial forwarder. As its name implies, this program can forward the data from the serial port to other applications (such as Matlab or python) and vice versa. This is done at the Linux command line by typing:

javanet.tinyos.sf.SerialF orwarder−port9002−commserial@/dev/ttyU SB(X) : micaz

In this implementation, the command above forward any packet received by the localhost at port 9002 to the USB port where the sensor is connected.

After that the python language code for the GPS (named gp-sRead.py and programmed by the author) is executed from the com-mand line. It starts reading and parsing the data from the serial port where the GPS is connected and send latitude, longitude and times-tamp data to localhost at port 9002 (where an application called se-rialForwarder, part of the TinyOS package, is listening for incoming packets).

4.5.

System Components Design

In order to test the EGL localization technique with the proposed technology it is necessary to define the main components that will be part of the experimentation platform (hardware and software). To choose the best platform for experimentation it is necessary to have the system requirements in mind. The main requirements are listed below:

• UAV and battery set capable of covering the area to full fill at least two sensor nodes experiment;

• Embedded computer capable of executing RTK algorithm and; • GNSS receiver capable of RAW measurements;

• UAV capable of waypoint autonomous navigation;

• Base station corrections service provider, for RTK computations; Based on the requirements listed and the components already present in the laboratory, the Figure 4.3 shows the main configuration and communication architecture proposed for implementing the

(45)

pro-24

posed localization technique platform. The system is composed by the main hardware components listed below :

1. Single Board Computer; 2. Flight Control;

3. WiFi sensor nodes; 4. GNSS receiver;

5. RTK Base Station (GNSS corrections) 6. UAV quadrotor;

Figure 4.3: System architecture, showing main hardware and infor-mation flow

The flowchart in Figure 4.4 explains the sequence of the proposed EGL RTK system. As soon as the system, embedeed in the UAV, is turned on, it starts processing the GNSS data to generate high accurate coordinates. These coordinates are broadcast to the sensors in the field, whenever a sensor is in the range of the mobile node it logs the coordinates for further post process of its position.

Detailed explanation of each system component is assessed as following. Some of the used electronics were already available, and were chosen for this reason. Others were chosen taking into account

(46)

25

Figure 4.4: EGL RTK process flowchart

technical specifications, price, and availability.

4.5.1.

Single Board Computer (SBC)

This computer is embedded on the UAV and perform GNSS read, GNSS corrections (when RTK techniques are applied) and positioning

(47)

26

logs. Moreover it is responsible for processing data to/from static nodes and communicate with the ground station.

Because it is necessary a board capable of running LINUX/UNIX operating system in order to execute RTKLIB code and the code that configure the GNSS module, the Beaglebone Black board was chosen as the single board computer. It is an open hardware computer running at 1GHz capable of doing real time tasks, low cost, reliable and was available at the laboratory. The Beaglebone executes RTK GNSS cor-rections and communicate with the sensors through UART interfaces. In order to turn the operation easier for the client side, it was developed a web user interface for the RTK status. The procedure to ac-cess this interface is explained in more details here. Acac-cessing the Bea-glebone hotspot named "RTKPPK" at IP addresshttp://172.24.1.1/ it is possible to see status such as in Figure 4.5.

The Figure 4.5 represents the right-side overlay from the GUI developed. There are two icons: Satellite icon and localization icon. When the satellite icon is green it means that the system clock has been synchronized, if it is not there, then it is not synchronized yet. Only after it turns green (which means it is synchronized to GPS clock) is when RTK starts processing data and once the RTK algorithm starts, the Positioning symbol will first turnRED, thenYELLOWand finally GREEN(RTK Fix status), these last two states will be achieved only in the presence of a base station and already represent a good accuracy.

(48)

27

Figure 4.5: Graphical user interface status overlay

Also, continuing the explanation of RTK procedure with the de-veloped GUI from Figure 4.5, RED color stands for SINGLEsolution, that is the GNSS in standalone mode, i.e. without corrections, the er-rors are in the range of meters in this status. the YELLOW stands for FLOAT solution, that means that although one has a high precision localization at this point the accuracy could be on the order of decime-ters and centimedecime-ters. The GREEN stands forFIXsolution, that’s the best solution and at this point the accuracy is in the range of centime-ters and millimecentime-ters. TheAGE information shows the delay in seconds from the base station signal (the lower the better). TheRATIO shows the quality of the RTK positioning, should be higher than 3.0 factor (value chosen through experimentation) to get the FIX precision. All the logs are stored in the system flash memory, under LOGS folder.

(49)

28

It is also possible to download all the logs from the web interface to perform the post processing analysis. Post Processing Kinematics is important in areas where the real time communication with the base stations is not possible, in these cases the GNSS logs are important to perform this analysis.

Figure 4.6: Logs download for further analysis and PPK

4.5.2.

Flight and Navigation Control

In 2010, "DIY Drones" community released the open-source Ar-ducopter, featuring more advanced flight modes, and even autonomous flight. It did still involve compiling code and flashing it to the controller though.

In 2011, DJI started to get visibility with the NAZA controller, which showed remarkable stability, and later got upgraded with a GNSS receiver allowing the drone to return to home and hold position in the air. The controller was often sold with a standard frame and mo-tors, which improved stability as the board was pre-tuned to the sold equipment. Shortly after, DJI began to manufacture the DJI Phantom drones, which is now the main player in the market.

Nowadays, three major controllers coexist: MultiWii was ported to 32bits architecture processors and lives on as Baseflight and Clean-flight, mostly on quadcopter racing boards; DJI leads the aerial photog-raphy market with their phantom quadcopters; and on the autonomous fields, Ardupilot, PX4, Mikrokopter, and DJI are still competing for the better solutions.

The Flight Controller board chosen is a PixHawk. The main reasons to choose this controller here are: Huge open source commu-nity and support; Waypoint autonomous navigation capability; Price and availability; RTK ready; Reliability and integration with different platforms and devices; Customization;

(50)

Ardupi-29

lot is a more mature, tested, open, and community-based platform, and thus it was chosen here, running latest release of ArduCopter (designed for rotary-wing aircrafts).

4.5.3.

WiFi Sensor Nodes

The ESP8266 is a WiFi plus microcontroller combo module that came up in the market in 2014 as an extremely low cost sensor module and now has a huge open source community supporting its develop-ment. This module presents a lot of advantages over the MicaZ zigbee 802.15.4 radios such as: Higher data rate (up to 72 Mbps vs 250 Kbps); multiple topologies (mesh, point to point, Ad-hoc, AP, station, station + AP); Wide communication range (up to 1 km); very low power con-sumption (as low as 5.6uA in deep sleep mode); more internal flash storage for program and logs (up to 32 Mbit vs 512 kb), better CPU (32-bit @160Mhz) and lower cost per unit (as low as US 1.50 dollars). WiFi based systems are not commonly used in WSN applica-tions, because of main reasons: big overhead of communication, re-quire a lot more power from source, takes more time do send beacons. The difference between ESP8266 and ESP32 modules from the others is that they allow two or more ESP modules to communicate without using WiFi in infrastructure mode (as in, station - STA - connecting to an access point - AP -), using a library called ESP-NOW one can have access to the lower layers of the WiFi radio, allowing to send beacons in broadcast mode without requiring any connection between then.

Another advantage of this module is its capability of operating in Access Point plus Station Mode together with ESP-NOW real-time protocol. RSSI measurements are only possible using WiFi stack, thus, in this work, the radio modules were programmed to operate in both modes. The mobile node broadcasts its position to the static nodes while searching for their access point service set identifiers (SSID), it was adopted the SSID named "slave" for all the static nodes. As one guarantee that there will be no communication between the mobile node and two static nodes at the same time, this strategy solves the problem of getting RSSI measurements. RSSI measurements are used to correct wrong boundary points in the EGL method.

4.5.3.1. Module programming

Two firmwares are required in order to realize the communica-tion in the sensor network. One is programmed at the mobile node and the other repeats for all the static nodes. The ESP8266 modules

(51)

30

were programmed using Arduino programming interface, with custom libraries for the ESP8266 modules and ESP-NOW protocol.

4.5.3.2. Mobile Node - MN

The mobile node plays the master role from the ESP-NOW pro-tocol. It knows each static sensor node by its unique MAC address, al-though it already has the broadcast option, each static ESP8266 MAC address is programmed into the master’s code in order to address pack-ets to the specifically static sensor nodes, like in lines (1) and (2) below. (1) uint8_t no1[] = {0xA0, 0x20, 0xA6, 0x16, 0xB0, 0xB2};//esp1 (2) uint8_t no2[] = {0xA0, 0x20, 0xA6, 0x16, 0xB0, 0x90};//esp2

In the MN the RTK GNSS coordinates are parsed and sent to the static nodes using a common data structure. The MN also acts as client of the static nodes, this is required for RSSI measurement at the slave.

Algoritmo 1: EGL: Mobile Node algorithm

Result: Mobile Node: Periodically generate and broadcast beacon message

1 Initialize serial at 115200 baud;

2 Set WiFi mode to Access Point and Station; 3 Configure static IP address;

4 Configure WiFi station mode; 5 Configure WiFi Access Point mode; 6 Initialize ESP-NOW;

7 Set MASTER role; 8 Register SLAVE devices;

9 Configure ESP timer to trigger every 200ms; 10 while Timer not triggered do

11 Wait for timer interruption; 12 if Timer triggered then 13 Restart timer T;

14 Read GNSS data from Serial;

15 Send latitude, longitude and timestamp to SLAVES; 16 Blink Status LED;

17 else 18 Sleep; 19 end 20 end

(52)

31

4.5.3.3. Static Node - SN

The static nodes plays the slave role from the ESP-NOW pro-tocol. Finding their location is the most important task in this thesis. These nodes are responsible to log GNSS and timestamp data coming from the MN, they are always listening for incoming packets. Also, in order to obtain RSSI measurement at the static nodes, ESP-NOW protocol does not offer RSSI measurement support yet, the static nodes were programmed as access point, besides the slave role.

Algoritmo 2: EGL: Static node algorithm

Result: Static Node: Listen for beacon message and log to SD card

1 Initialize serial at 115200 baud;

2 Set WiFi mode to Access Point and Station; 3 Configure WiFi Access Point mode;

4 Initialize SD card; 5 Initialize ESP-NOW; 6 Set SLAVE role; 7 while True do 8 Status LED on;

9 if Data received from MN then 10 Status LED off;

11 Record data from MN and RSSI to SD card; 12 else

13 Sleep; 14 end 15 end

4.5.4.

GNSS receiver

The GNSS module used in this project is the U-BLOX NEO-M8N, coupled with an external compass sensor. The external compass is important because the high currents flowing close to the Pixhawk con-troller affect the readings of the internal compasses (the GNSS module is placed far from the Pixhawk and batteries to avoid that interfer-ence). This module was chosen because of the following reasons: It supports carrier phase and code pseudorange output measurements for RTK computations (provided by the UBLOX UBX proprietary pro-tocol (UBLOX, 2015)); It is widely used with Pixhawk controller and totally supported by it; It is capable of concurrent reception of up to 3 GNSS (among GPS, Galileo, GLONASS and BeiDou); Lowest cost

Referências

Documentos relacionados

A primeira passa pelo que designamos “Macroeconomia Benevolente” de finais dos anos 90: redução das taxas de juro de referência atingindo mínimos históricos, o

In the case of this sensor network, the Arduino board simultaneously represents a sink node and several sensor nodes since the data of each digital sensor is sent to the board

To attempt to solve the localization of a mobile robot, with an inertial sensor as the main reference, will be implemented and tested two methods: an algorithm

murinus are used in popular medicine in the state of Amazonas (Rodrigues 2006) and Roraima (Pinto and Maduro 2003) to treat inflammatory processes; these same therapeutic

The MHA/MFA has to floods a Mobile Node Elect Advertisement throughout the network for DRMIPA nodes to be aware of the elected PASSIVE agent IP address. This

Based on the present disadvantages of current localization systems and having in mind the presence of the security lasers in most mobile robots, unlike the other systems this paper

The three dimensional model used finite solid elements, with eight nodes and three degrees of freedom in each node (translations). The dimension of the mesh was defined based

Universities have been restructuring their curricula to direct medical practice onto the Brazilian Unified Health System, driven by the publication of the National