• Nenhum resultado encontrado

Acoustic system for ground truth underwater positioning in DEEC's test tank

N/A
N/A
Protected

Academic year: 2021

Share "Acoustic system for ground truth underwater positioning in DEEC's test tank"

Copied!
89
0
0

Texto

(1)

F

ACULDADE DE

E

NGENHARIA DA

U

NIVERSIDADE DO

P

ORTO

Acoustic system for ground truth

underwater positioning

in DEEC’s test tank

Sistema acústico para “ground truth” de posicionamento subaquático no tanque de ensaios do DEEC

Afonso Mateus Bonito

Master in Electrical and Computers Engineering Supervisor: Prof. Dr. José Carlos Alves

(2)
(3)

Resumo

Esta dissertação consiste no desenvolvimento de um sistema acústico de posicionamento sub-aquático para o tanque de ensaios do DEEC, de dimensões 4.55x4.40x1.68m. A obtenção desta posição "ground truth" é fundamental para o apoio a ensaios de sistemas de navegação subaquáti-cos e para o controlo de veículos robótisubaquáti-cos tais como AUV’s e ROV’s.

O sistema envolve o envio periódico e receção de sequências binárias de Kasami moduladas em BPSK e é baseado no tempo de chegada (Time of Arrival) destas, estimado através da cor-relação cruzada do sinal recebido por um sinal de referência. Um filtro de Hilbert é aplicado ao sinal desta correlação, com o intuito de calcular a envolvente do mesmo, de modo a melhorar a estimação do instante em que ocorre o máximo da correlação.

É utilizado um vetor de 4 hidrofones, sendo os tempos de chegada estimados em cada um deles conjugados, numa trilateração, de modo a obter a posição tridimensional da fonte acústica.

O sistema recetor, que adquire as entradas dos hidrofones, foi implementado numa placa Red-Pitaya, baseado num Xilinx Zynq-7010, que inclui um FPGA (Fclk= 125MHz) e um processador

dual-core ARM Cortex A9.

(4)
(5)

Abstract

This dissertation consists in the development of an acoustic positioning system, capable of estimating, in real time, the three-dimensional position of an object inside the DEEC’s test tank, whose dimensions are 4.55x4.40x1.68m. The ability to obtain this ground truth position is fun-damental to support tests of underwater navigation systems, and to the control of robotic vehicles such as AUV’s and ROV’s.

The system involves a periodic transmission and reception of BPSK-modulated Kasami se-quences and is based on their Time of Arrival, which is estimated through the cross correlation between the received signal and a reference signal. A Hilbert filter is applied to this correlation signal, in order to calculate its envelope, which improves the estimation of the instant at which the correlation maximum occurs.

An array of 4 hydrophones is used, and the times of arrival estimated through each one are conjugated, through a trilateration, in order to obtain the tridimensional position of the acoustic source.

The receiver system, that acquires the 4 hydrophone inputs, was implemented on a a RedPitaya board, which is based on a Xilinx Zynq-7010, that includes an FPGA (Fclk= 125MHz) and a

dual-core ARM Cortex A9 processor.

(6)
(7)

Agradecimentos

Gostaria de agradecer ao professor José Carlos Alves por toda a disponibilidade e apoio prestado ao longo desta dissertação.

Agradeço também aos meus pais pelo constante apoio e pelo investimento na minha educação. Finalmente, a todos os amigos que me acompanharam ao longo destes 5 anos na FEUP, que passaram a correr.

Afonso Mateus Bonito

(8)
(9)

“You should be glad that bridge fell down. I was planning to build thirteen more to that same design”

Isambard Kingdom Brunel

(10)
(11)

Contents

Agradecimentos v

1 Introduction 1

1.1 Framework . . . 1

1.2 Motivation and Objectives . . . 1

2 State of the Art 3 2.1 Range-based localization . . . 3

2.2 Time Delay Estimation . . . 4

2.2.1 Signal Models . . . 4

2.2.2 Time of Arrival (TOA) . . . 5

2.2.3 Time of Flight (TOF) . . . 5

2.2.4 Time Difference of Arrival (TDOA) . . . 6

2.3 Location Estimation . . . 8 2.3.1 Trilateration . . . 8 2.3.2 Multilateration . . . 9 2.4 Positioning systems . . . 9 2.4.1 Conventional systems . . . 9 2.4.2 Inverted systems . . . 11

2.5 Sound Speed Variation . . . 12

2.6 Doppler Effect . . . 13 3 Hydrophone Layout 15 3.1 System characterization . . . 15 3.2 Generic problem . . . 15 3.3 Proposed Layouts . . . 17 3.3.1 Layout A . . . 17 3.3.2 Layout B . . . 18 3.3.3 Layout C . . . 18 3.3.4 Layout D . . . 19 3.4 Precision Analysis . . . 20

3.4.1 Worst case scenarios . . . 24

4 Functional Implementation 29 4.1 BPSK Modulation . . . 29 4.2 Kasami sequences . . . 29 4.3 Correlation Method . . . 30 4.4 Correlation Envelope . . . 32 ix

(12)

x CONTENTS

4.4.1 Discrete Hilbert Transform . . . 32

4.5 Chosen parameters . . . 34 5 Implementation 37 5.1 Hardware . . . 37 5.1.1 Transmitter . . . 37 5.1.2 Receiver . . . 39 5.2 Digital implementation . . . 41 5.2.1 Transmitter . . . 41 5.2.2 Receiver . . . 44 5.3 Supporting Software . . . 54 5.3.1 Timestamp Script . . . 54

5.3.2 Envelope Buffer Script . . . 54

6 Results 55 6.1 Simulation results . . . 55

6.1.1 Recorded signals . . . 55

6.1.2 Correlation Results . . . 56

6.1.3 Envelope Results . . . 59

6.1.4 Peak Identification Results . . . 59

6.1.5 Envelope Buffer Results . . . 62

6.2 Empirical Results . . . 62

7 Conclusions 65 7.1 Future Work . . . 65

(13)

List of Figures

2.1 Illustration of the multipath model in an oceanic environment . . . 5

2.2 Illustration of the reverberation model in a room environment . . . 6

2.3 Illustration of the trilateration method on a 2D plane . . . 9

2.4 Illustration of the possible source positions, for a given TDOA . . . 10

3.1 Graphical representation of Layout A . . . 17

3.2 Graphical representation of Layout B . . . 18

3.3 Graphical representation of Layout C . . . 19

3.4 Graphical representation of Layout D . . . 20

3.5 Average measurement error across the x dimension . . . 25

3.6 Average measurement error across the y dimension . . . 25

3.7 Average measurement error across the z dimension . . . 26

4.1 Correlation result between a received signal and a reference signal corresponding to a different sequence (left) and the same sequence (right) . . . 30

4.2 Original reference signal and its square wave approximation . . . 31

4.3 Correlation result by a sinusoidal reference signal (top) and its square wave ap-proximation (bottom) . . . 31

4.4 Correlation result signal and its envelope . . . 32

4.5 Coefficients of the implemented Hilbert FIR filter . . . 33

5.1 Atlys board used to generate the signals [8] . . . 38

5.2 Simplified schematic of the transducer driver . . . 38

5.3 Analogue front-end . . . 40

5.4 Diagram of the analogue front-end . . . 40

5.5 Top level diagram of the transmitter . . . 41

5.6 PC application used to set the transmitter’s parameters . . . 42

5.7 Representation of a message with Nsequences= 3 . . . 42

5.8 Content of the DDS LUT . . . 43

5.9 Simplified block diagram of the RedPitaya architecture . . . 45

5.10 Incomplete block diagram of the Rx Top Level module . . . 46

5.11 Analog multiplexer selection signal and the triggers for the ADC Demux’s registers 46 5.12 Block diagram of the Samples Organizer module [18] . . . 47

5.13 Block diagram of the Correlator module . . . 48

5.14 Block diagram of a Correlator unit . . . 49

5.15 Magnitude response of the Hilbert filter . . . 50

5.16 Block diagram of the Hilbert filter implementation . . . 50

5.17 Block diagram of the Envelope Calculator module . . . 51

5.18 Block diagram of the Envelope Buffer module . . . 52 xi

(14)

xii LIST OF FIGURES

6.1 Expected correlation results of signal A . . . 56

6.2 Expected correlation results of signal B . . . 57

6.3 Expected correlation results of signal C . . . 57

6.4 Correlation results of signal A . . . 58

6.5 Correlation results of signal B . . . 58

6.6 Correlation results of signal C . . . 58

6.7 Expected envelope results of signal A . . . 59

6.8 Expected envelope results of signal B . . . 60

6.9 Expected envelope results of signal C . . . 60

6.10 Envelope results of signal A . . . 60

6.11 Envelope results of signal B . . . 61

6.12 Envelope results of signal C . . . 61

6.13 Output signals of the Envelope Buffer modules . . . 62

6.14 Measured distance values in each position . . . 63

(15)

List of Tables

5.1 Transmitter’s resource utilization . . . 44

5.2 Receiver’s resource utilization without the Rx Top Level module . . . 53

5.3 Available resources for the Rx Top Level module . . . 53

5.4 Receiver’s resource utilization . . . 53

6.1 Obtained correlation peaks relative to the received signal’s strength . . . 56

6.2 Timestamps of the envelope peaks . . . 61

(16)
(17)
(18)

xvi ABBREVIATIONS

Abbreviations

ADC Analog to Digital Converter ARM Advanced RISC Machine

AUV Autonomous Underwater Vehicle AXI Advanced Extensible Interface BPSK Binary Phase Shift Keying BRAM Block RAM

CC Cross-Correlation

DAC Digital to Analog Converter DDR3 Double Data Rate Type 3 DDS Direct Digital Synthesis

DEEC Departamento de Engenharia Electrotécnica e de Computadores DFT Discrete Fourier Transform

DSP Digital Signal Processor

DTFT Discrete-Time Fourier Transform FF Flip-Flop

FIR Finite Impulse Response

FPGA Field-Programmable Gate Array GCC Generalized Cross-Correlation GIB GPS Intelligent Buoy

GPS Global Positioning System GUI Graphical User Interface I2C Inter-Integrated Circuit IIR Infinite Impulse Response iLBL Inverted Long Baseline iSBL Inverted Short Baseline iUSBL Inverted Ultra-Short Baseline LBL Long Baseline

LMS Least Mean Squares LUT Look-Up Table

QPSK Quadrature Phase Shift Keying PC Personal Computer

PID Proportional–Integral–Derivative PL Programmable Logic

PMOD Peripheral Modules PSK Phase Shift Keying RAM Random Access Memory

RISC Reduced Instruction Set Computer ROM Read-Only Memory

ROV Remotely Operated Vehicle RSSI Received Signal Strength Indicator

(19)

ABBREVIATIONS xvii

SBL Short Baseline SD Secure Digital

SONAR Sound Navigation and Ranging TDE Time Delay Estimation

TDOA Time Difference of Arrival TOA Time of Arrival

UART Universal Asynchronous Receiver/Transmitter UDP User Datagram Protocol

USB Universal Serial Bus USBL Ultra-Short Baseline VLBL Virtual Long Baseline

(20)
(21)

Chapter 1

Introduction

This chapter approaches the framework for the dissertation, as well as its main objectives and motivation.

1.1

Framework

The ocean covers more than 70% of the Earth’s surface, being that more than 80% of it is yet to be explored, observed or mapped [20].

Due to the need of exploration, motivated by this lack of knowledge, oceanic robotics have been rapidly developing. For the navigation of vehicles such as ROV’s (Remotely Operated Vehi-cle) and AUV’s (Autonomous Underwater VehiVehi-cle), it is essential that rigorous localization mech-anisms are implemented.

Since in an underwater environment, electromagnetic waves are prone to very high attenuation, current underwater positioning systems are based on the transmission and reception of acoustic signals.

1.2

Motivation and Objectives

This dissertation will be developed following another [18], which consisted in the measure-ment of the distance between a transmitter and a hydrophone, based on the Time of Arrival (TOA) of an acoustic signal.

Since the results of that dissertation were promising (having been able to measure distances with a precision of millimetres), the aim is to comprehend, implement and calibrate the conceived methods for a more in-depth application.

The goal of this dissertation is to develop an infrastructure for the accurate positioning of objects inside the DEEC’s test tank. It should rely on an array of 3 or more hydrophones strategi-cally placed alongside the tank, allowing to estimate, in real time, the tridimensional position of an object of interest, to which 1 or more transmitters are coupled.

(22)

2 Introduction

This mechanism should, thus, allow to determine the absolute position of a submerged de-vice, being fundamental to supporting tests of navigation processes and the control of underwater robotic vehicles, which is the main motivation behind this work.

Underwater vehicle testing in confined spaces makes concerns such as acoustic reverberation and multipath even more relevant, so there is a niche for localization systems able to fit within the limitations of constrained vehicles in confined areas such as small tanks. The system to be developed could also, potentially, evolve into an infrastructure that could be used to support the navigation of AUV’s in other confined spaces. Possible applications are the inspection and inter-vention in wells, caverns or sunken ships.

The implemented mechanism could also be inverted, by having, instead, multiple installed transmitters and 1 receiver coupled to the AUV, which would allow the vehicle itself to know its location, rather than an external system.

(23)

Chapter 2

State of the Art

This chapter presents the study of the methodologies, algorithms and topologies currently being employed in the field of underwater acoustic positioning, and also of certain phenomena that affect acoustic signals that are particularly relevant in maritime environments.

2.1

Range-based localization

Range-based localization algorithms are usually divided into three steps [27]: • Range measurement

• Location estimation • Calibration

Range measurement consists, broadly, in the estimation of the distances between two of the system’s nodes. It can be theoretically performed with one of the two following methodologies:

• Received Signal Strength Indicator (RSSI) • Time Delay Estimation (TDE)

RSSI algorithms estimate distances by measuring the received signal’s strength and comparing it with a range dependent attenuation model. However, because path loss in underwater acoustic channels is time varying and the multipath effect, further explored, can result in significant energy fading, these methods are scarcely used in maritime localization. Therefore, this report will focus solely on Time Delay Estimation for range measurement.

The following step is the location estimation, in which one or more nodes’ relative positions are estimated based on the distance values obtained in range measurement.

Finally, calibration involves the refinement of the location estimate, which can be done, for instance, by using measurements from various iterations, or with measurement error models.

(24)

4 State of the Art

2.2

Time Delay Estimation

TDE methods calculate the distance to the source by having an a priori estimate of the speed of propagation of the signal, which is multiplied to the time delay. The instant in which a signal arrives can be estimated either by comparing the received signal with a model of the expected signal, or by comparing its amplitude with a certain threshold. Depending on the application, TDE can be divided into three categories: Time of Arrival (TOA), Time of Flight (TOF) and Time Difference of Arrival (TDOA) estimation.

2.2.1 Signal Models

TDE algorithms are based on a certain signal model, which is a mathematical model that describes the acoustic environment in which the signal travels. The three main signal models employed in TDE are the ideal single-path propagation model, the multipath model and the rever-beration model [4].

2.2.1.1 Single-path model

The single-path, or ideal propagation model assumes that there is only one path for the signal to propagate from the source to the sensor. As a consequence, the acquired signals are delayed and attenuated versions of the source signal, affected by additive noise. Considering an array of N receivers, these signals are expressed as

xn[k] = αns[k − t − fn(τ)] + wn[k], n= 0, 1, ..., N − 1 , (2.1)

where αn is the attenuation factor of the signal acquired by sensor n, s[k] is the original source

signal, t is the signal’s propagation time, fn(τ) is the relative delay between sensors 0 and n, and

wn[k] is the additive noise at sensor n.

The TDE problem consists in determining an estimate ˆτ of the true time delay τ .

2.2.1.2 Multipath model

The multipath model assumes that the sensors acquire multiple replicas of the source signal, caused by reflections on boundaries and objects, being mathematically represented as

xn[k] = M

m=1

αnms[k − t − τnm] + wn[k], n= 0, 1, ..., N − 1 , (2.2)

where M is the number of considered paths, αnmis the attenuation factor of the signal received in

sensor n, via the path m, and τnmis the relative delay between sensor 0 and n, through path m.

This model is often utilized in oceanic environments, where besides the direct-path, two ad-ditional paths are considered, which correspond to the reflection of the wavefront on both the sea surface and bottom, as illustrated in figure2.1.

(25)

2.2 Time Delay Estimation 5

Figure 2.1: Illustration of the multipath model in an oceanic environment

The main objective of this model is to obtain all τn1, which correspond to the difference

be-tween the arrival of the signal bebe-tween sensor n and 0, via the direct path. This model is, however, not valid for all environments, and for a large M, it is not feasible to estimate all τnm.

2.2.1.3 Reverberation model

The reverberation model is often used in room environments, and assumes that each sensor acquires a large number of the source signal’s replicas, resulting from reflections on objects, as well as on the room’s boundaries, such as walls, ceiling and floor. Figure2.2represents the model in said environment. The received signals are given by

xn[k] = hn∗ s[k] + wn[k], (2.3)

where hnis the channel impulse response between the source and sensor n.

Since the time delay is not explicitly expressed, the TDE problem is solved by estimating all N channel impulse responses and the time delay between any two receivers is obtained by identifying the two respective direct paths [4].

2.2.2 Time of Arrival (TOA)

Time of Arrival is the delay between the transmission of a pulse signal and its reception [9]. Given that the receiver needs to know the time instant in which the signal was transmitted, TOA methods require a synchronization between the transmitter and the receiver.

2.2.3 Time of Flight (TOF)

Time of Flight corresponds to the delay between the transmission of a pulse signal, and the re-ception of another pulse, transmitted as a response. While it is not the case for TOA, TOF methods

(26)

6 State of the Art

Figure 2.2: Illustration of the reverberation model in a room environment

require that both nodes are capable of both sending and receiving acoustic signals, but synchro-nization between them is not required, as it is considered that responses are sent immediately, or after a known delay, following the reception of the first signal.

2.2.4 Time Difference of Arrival (TDOA)

TDOA consists in the measurement of the travel time of a signal between pairs of spatially separated hydrophones [9]. Unlike TOA, synchronization with the transmitter is not required. In TDOA methods, one of the sensors is considered the master (reference), while the remaining are the slaves (auxiliary) [1]. Throughout this report, when considering an array of N hydrophones, each with its index n = 0, 1, ..., N − 1, the reference is the one with n = 0.

TDOA can be obtained by a variety of methods. This section focuses on some of the most used, which are cross-correlation and least-mean-square based.

2.2.4.1 Cross-correlation (CC)

The cross-correlation method is based on the single-path model, and considers only 2 re-ceivers. For a block of K observation signals at time instant k,

xn[k] =xn[k], xn[k + 1], ..., xn[k + K − 1]

T

, n= 0, 1 , (2.4)

the delay estimate corresponds to the lag time that maximizes the cross-correlation function (CCF) between two observation signals:

ˆ

(27)

2.2 Time Delay Estimation 7

where

ΨCC= E{x0[l]x1[l + m]} (2.6)

is the CCF between x0[l] and x1[l] and E{·} is the mathematical expectation.

2.2.4.2 Generalized cross-correlation (GCC)

The generalized cross-correlation (GCC) method unifies various correlation-based algorithms into one general framework [4]. It can be seen as an improvement over the CC, since it provides a mechanism to incorporate knowledge in order to improve the TDE’s performance. In this method, the delay estimate is similar to2.5:

ˆ

τGCC= argmax Ψm GCC[m], (2.7)

however, ΨGCCis the generalized cross-correlation function (GCCF), which is given by

ΨGCC[m] = K0−1

k0=0 Φ[k0]Sx0x1[k 0]ej2πmk0/K0 = K0−1

k0=0 ςx0x1[k 0]ej2πmk0/K0, (2.8) where Sx0x1[k 0] = E{X

0[k0]X1∗[k0]} is the cross-spectrum (Xn[k0] being the discrete Fourier

trans-form (DFT) of xn[k]), Φ[k0] is a weighting function (or prefilter), K0is the length of the DFT, and

ςx0x1[k

0] is called the weighted cross-spectrum.

In practice, Sx0x1[k

0] has to be estimated, which is usually done by using its instantaneous value,

thus Sx0x1[k

0] = X

0[k0]X1∗[k0].

The GCC comprises multiple algorithms, depending on the used Φ[k0]. Amongst the most used weighting functions are:

• Constant weighting function (which turns the GCC into a frequency-domain implementation of the CC)

• Smoothed coherence transform [3] • Roth processor [23]

• Echart filter [16]

• Phase transform (PHAT) [16] • Maximum-likelihood processor [16] • Hassab-Boucher transform [10]

(28)

8 State of the Art

2.2.4.3 Least Mean Squares

This method is also based on the single-path model and considers 2 sensors, however, ap-proaches the TDE problem by minimizing the mean-square error between x0[k] and a filtered

(FIR) version of x1[k] and obtaining the delay estimate as the lag time associated with the largest

component of the FIR filter [22].

For a signal vector x1[k], at time instant k

x1[k] =x1[k − L], x1[k − L + 1], ..., x1[k + L]

T

(2.9) and a FIR filter of length 2L + 1

h[k] = [h0, h1, ..., h2L]T, (2.10)

where L is the maximum possible time delay, then an error signal can be expressed as

e[k] = x0[k] − hT[k]x1[k]. (2.11)

An estimate of the filter’s impulse response can be achieved by minimizing E{e2[k]} using the least-mean-square (LMS) adaptive algorithm, being

h[k + 1] = h[k] + µe[k]x1[k], (2.12)

where µ is the adaptation step size. The time delay can, then, be estimated as ˆ

τLMS= arg

l

max|hl| − L. (2.13)

2.3

Location Estimation

In general, the two most common location estimation techniques are angulation and lateration [9]. Angulation uses the geometric principles of triangles, whilst lateration is based on the distance between two nodes, being the most appropriate for complementing range measurements, and thus the one used in underwater acoustic positioning systems.

2.3.1 Trilateration

In general, trilateration is a technique in which the location of a point is calculated using the distances from said point to a series of known geometrical entities [5].

On a 2D plane, the location of the point of interest is simply obtained from the intersection of three circumferences, being that the intersection of only two provides two potential positions, with the third circumference indicating the correct one, as represented in figure2.3. The circumfer-ences’ radii correspond to the measured ranges. In acoustic localization, trilateration is generally used alongside Time of Arrival or Time of Flight estimation. It is usually employed in order to

(29)

2.4 Positioning systems 9

Figure 2.3: Illustration of the trilateration method on a 2D plane

estimate the location of an object across 2 dimensions, the third being its depth, which can be accurately measured through pressure sensors.

2.3.2 Multilateration

Multilateration is a generalization of trilateration, where n coordinates can be estimated by using n+1 nodes, not contained within a subspace of dimension inferior to n, with known positions [9].

It can be employed in conjunction with TDOA estimation, having n TDOA’s being able to find ntarget coordinates. By multiplying a TDOA by the signal’s propagation speed, the difference in the true ranges between the target and the two sensors involved is obtained. For a pair of sensors, this results in an infinite number of possible target locations that satisfy the TDOA, which, when plotted, form a hyperbolic curve [1], as illustrated in figure2.4. The estimation of the target’s location is, then, based on the intersection of those hyperboles.

2.4

Positioning systems

Commercially available underwater acoustic positioning systems have existed since the 1960’s and their main applications include oil and gas exploration, salvage operations, marine science and archaeology as well as security and military operations [27].

2.4.1 Conventional systems

These systems can be used for tracking and navigation of underwater vehicles, using a set of transponders referred to as baseline stations. Based on the distance between said transponders, they can be categorized into: Long Baseline (LBL), Short Baseline (SBL) and Ultra-Short Baseline (USBL).

(30)

10 State of the Art

Figure 2.4: Illustration of the possible source positions, for a given TDOA

2.4.1.1 Long Baseline (LBL)

The LBL technique involves the use of an array of, at least, 3 transponder beacons, that are fixed on the seabed, and a transducer that can be fixed to a vessel. The distance between these beacons is in the order of 50 to 2000 metres [24].

These positioning systems are based on Time of Flight estimation, being that the transducer transmits an acoustic signal that is received by the transponders, which then transmit a response. The distance between the vessel and each transponder is, then, calculated, based on the time difference between the transmission of the first signal and the reception of its response. The vessel’s two-dimensional position is computed through a trilateration of these distances, while its depth is determined by pressure gauges. Whilst the vessel’s computed position is relative to the beacons, its geo-referenced coordinates can potentially be obtained, by having a priori knowledge of the beacons’ positions. Though the minimum number of beacons that guarantees the obtention of an unambiguous position is 3, a fourth one is normally used, in order to provide redundancy and quality check.

LBL systems are designed to provide uniformly high levels of accuracy (always better than 1m, with the possibility of achieving accuracies of a few centimetres [27]) over a wide area, independently from the vessel’s depth. Their major limitation is the time and cost required to setup the network.

2.4.1.2 Short Baseline (SBL)

SBL systems have the same operation principle as LBL, however, the transponders are mounted on floating platforms, and the distance between them ranges from 20 to 50 metres [27]. The longer this distance, the higher is the calculated position’s accuracy, being even able to achieve the same performance as some LBL systems. That being said, SBL has the disadvantage of its positional accuracy being dependent on the dimensions of the platform on which it’s installed.

(31)

2.4 Positioning systems 11

2.4.1.3 Ultra-Short Baseline (USBL)

USBL systems are different from LBL and SBL in the sense that comprise a transceiver cou-pled to an array of transducers, and a single transponder, mounted to the object to be tracked. Their baseline distances are usually shorter than 10 centimetres, and they are, by far, the most popular category of positioning systems [27], since they are easily deployed and used. Similarly to LBL and SBL, USBL’s range measurement is based on the Time of Flight Estimation of an acoustic pulse and its response. Nevertheless, due to the fact that the baseline is so short, a trilateration, on its own, does not provide sufficient accuracy, so a phase-differencing method is employed, in order to calculate the angle to the transponder. The angle and range data are then combined to compute the object’s relative position. Even so, USBL’s accuracy is low, when compared to LBL or SBL.

2.4.1.4 Single Fixed Beacon

A major downside of LBL systems lies on the cost and time required for the installation of the beacons and georeferencing them. By using a single beacon, these requirements are significantly reduced.

These systems’ concept is that the baseline is simulated by propagating the ranges from the beacon in time until the next level is received [21]. This technique has, thus, been referred to as Virtual LBL (VLBL). This approach has, however, several limitations, since long tracks directly towards or away from the beacon cause an unbounded growth in the position error. A way to face this is by planning the vessel’s trajectory, in order for it to be approximately tangential to the range circles emanating from the beacon. This, along with the limitations regarding observability make these systems viable in only some applications.

2.4.2 Inverted systems

The previously presented positioning systems are considered conventional, in which the re-ceiver array is typically installed in a large mothership [12], with the goal being for the submersible to know its position relative to the mothership. However, in different applications it is desirable to reverse the problem, with the goal being for an external system to track the position of the submersible.

2.4.2.1 Inverted Long Baseline(iLBL)

The concept of iLBL is to locate a submerged transceiver at the surface [30]. The most com-mon iLBL systems are GPS Intelligent Buoys (GIB).

GIB systems comprise surface buoys equipped with GPS receivers and submerged hydrophones, whereas a synchronized pinger is installed on the underwater vessel. The distance between the transponders is in the same order as conventional LBL systems.

(32)

12 State of the Art

These systems’ principle is that the vessel’s pinger periodically transmits acoustic impulses that are received by the buoys, that record the respective times of arrival, and then send them, via radio, to a central station, where the vessel’s position is computed. The vehicle’s depth is also obtained through pressure gauges, but since the position is not estimated by the vessel itself, that information has to be sent to the GIB system, which is done by coding it in the emission pattern. A possible solution is one in which the pinger emits two pulses in each emission cycle, being the delay between them proportional to its depth [13]. The system’s one-way communication, when compared to the conventional systems’ round-trip transmission, makes it less prone to reflections from the surface or other underwater structures.

2.4.2.2 Inverted Ultra-Short Baseline(iUSBL)

Inverted Ultra-Short Baseline systems estimate the vessel’s position similarly to conventional USBL, however, the transducer array is mounted on the vessel, while the transponder is on the surface [11], and for that reason it is the external system that knows the vessel’s position rather than the vessel itself.

2.4.2.3 Inverted Short Baseline(iSBL)

Inverted Short Baseline systems are very similar to iUSBL, with the exception that the trans-ducers that are mounted on the vessel are as far apart from one another as possible [26]. It is named iSBL since it shares with SBL the property that the baseline lengths are limited by the dimensions of the vehicle in which the transducer array is installed.

2.5

Sound Speed Variation

The propagation speed of acoustic waves in oceanic environments is far from being constant, as it depends on three factors [19]:

• Temperature • Salinity • Pressure/Depth

Several sound speed equations have been empirically formulated. One of the most accurate [7] has 19 terms and coefficients with up to 12 significant figures. In this report, a simpler formula, with 9 terms, is presented, with a standard error of 0, 07m/s for salinity between 25 and 40 ppm [17]:

c= 1448, 96 + 4, 591T − 5, 304 × 10−2T2+ 2, 374 × 10−4T3 + 1, 340(S − 35) + 1, 630 × 10−2z+ 1, 675 × 10−7z2 − 1, 025 × 10−2T(S − 35) − 7, 139 × 10−13T z3

(33)

2.6 Doppler Effect 13

where c is the sound speed, in m/s, T is the temperature, in °C, S is the salinity, in parts per thousand and z is the depth, in metres.

2.6

Doppler Effect

The Doppler Effect is a change in perceived frequency of a wave caused by the motion of either the source or the receiver, being that this phenomenon’s practical consequence can be the change in the apparent time interval between two events [29]. It can be mathematically expressed as

f0= f c± u

c∓ v, (2.15)

where f is the source frequency, f0is the frequency perceived by the receiver, c is the propagation velocity of the wave in a stationary medium, and u and v are the velocities of the receiver and the source, respectively, in respect to the medium.

While it’s not the case with electromagnetic waves, the relative speed between the source and the receiver can be significant in comparison with the propagation speed of sound, therefore, the Doppler Effect is a concern when it comes to acoustic systems. One way to account for this phenomenon is to complement the system with velocity measurements. In underwater acoustics, current devices that do this include Doppler navigation sonars, that measure the speed of the ship relative to the sea bottom, Doppler current profilers and Doppler velocity logs, which measure the ship’s speed in relation with the water [28].

(34)
(35)

Chapter 3

Hydrophone Layout

This chapter characterizes the system, comparing it with the taxonomies explored in the State of the Art (section2.4) and presents the study that was done in order to determine the most ad-vantageous layout for the hydrophone array to be installed inside the test tank, going over how the position is estimated and analyzing the precision that can be achieved with each one.

3.1

System characterization

The system to be developed cannot be fully characterized as one of the positioning systems explored in section2.4, however, it is similar to iUSBL (2.4.2.2) and iSBL (2.4.2.3), since it con-sists of an external system on the surface which estimates the position of a submerged transmitter (or transmitter array). That being said, there are 2 major differences between this system and the aforementioned ones:

• The Time Delay Estimation is Time of Arrival based, rather than Time of Flight.

• Instead of it being comprised of one receiver on the surface and multiple transmitters mounted on the vessel, it involves multiple receivers installed on the walls of the tank and a single transmitter coupled to the vessel.

Despite these structural differences, the calculations involved in estimating the position of the vessel are similar.

3.2

Generic problem

Given an array of 4 hydrophones H0 (reference), H1, H2 and H3, with the respective generic

coordinates: r0= h 0 0 0 iT r1= h x1 y1 z1 iT r2= h x2 y2 z2 iT r3= h x3 y3 z3 iT , (3.1) 15

(36)

16 Hydrophone Layout

the goal is to estimate the tridimensional position of the acoustic signal source, relative to H0:

rs=

h

xs ys zs

iT

(3.2) Let Dibe the distance between hydrophone Hiand the source, and δibe the difference between Di

and D0. Dican be expressed as

Di= ||ri− rs||, (3.3)

and, thus

Di2= Ri2− 2riTrs+ Rs2, (3.4)

where Ri= ||ri||. By replacing Diwith Rs+ δi, the following 3 equations are obtained:

Ri2− δi2− 2Rsδi− 2riTrs= 0, i= 1, 2, 3. (3.5)

Since the measured Di’s have associated errors, an error equation is formulated, being an estimate

of the source position achieved by minimizing it in a least squares sense [25]. Considering εithe

error to be minimized, the 3 error equations can be expressed as

εi= Ri2− δi2− 2Rsδi− 2riTrs, i= 1, 2, 3 , (3.6)

which can be written in matrix notation as

ε = δ − 2Rsd− 2Srs, (3.7) in which δ =    x12+ y12+ z12− δ12 x22+ y22+ z22− δ22 x32+ y32+ z32− δ32   , d =    δ1 δ2 δ3   , S =    x1 y1 z1 y1 y2 y3 z1 z2 z3   , and ε =    ε1 ε2 ε3   .

The least squares solution for rsis given by

rs= 1 2S ?(δ − 2R s), (3.8) where S?= (STS)−1ST (3.9)

The source position estimate is, then, given by: ˆ rs= 1 2S ?(δ − 2D 0d), (3.10)

(37)

3.3 Proposed Layouts 17

Figure 3.1: Graphical representation of Layout A

which can be rewritten as    ˆ xs ˆ ys ˆ zs   = 1 2a    y2z3− y3z2 y3z1− y1z3 y1z2− y2z1 x3z2− x2z3 x1z3− x3z1 x2z1− x1z2 x2y3− x3y2 x3y1− x1y3 x1y2− x2y1          x12+ y12+ z12− δ12 x22+ y22+ z22− δ22 x32+ y32+ z32− δ32   − 2D0    δ1 δ2 δ3      , (3.11) where a= x1y2z3− x1y3z2− x2y1z3+ x2y3z1+ x3y1z2− x3y2z1. (3.12)

3.3

Proposed Layouts

In the context of the study of the different layouts, the tank has the generic width, length and depth of xM, yM and zM, respectively. The potential layouts that were considered are indexed as

follows:

3.3.1 Layout A

In this layout the hydrophone coordinates are the following: r0=h0 0 0 iT r1=hxM 0 0 iT r2=h0 yM 0 iT r3=h0 0 zM iT . (3.13) Each auxiliary hydrophone has 2 coordinates in common with the reference, which allows each coordinate of the source to be estimated independently, through each of the 3 auxiliary-reference

(38)

18 Hydrophone Layout

Figure 3.2: Graphical representation of Layout B

hydrophone pairs. This layout results in the calculation with the least computational burden, being the position estimate of the source given by:

   ˆ xs ˆ ys ˆ zs   = 1 2    1 xM 0 0 0 y1 M 0 0 0 z1 M          xM2− δ12 yM2− δ22 zM2− δ32   − 2D0    δ1 δ2 δ3      . (3.14) 3.3.2 Layout B

Layout B comprises hydrophones placed in the following coordinates: r0= h 0 0 0 iT r1= h xM yM 0 iT r2= h 0 yM zM iT r3= h xM 0 zM iT . (3.15) They form a tetrahedron in which the vertices are as far apart as possible. The position of the source is calculated by the equation:

   ˆ xs ˆ ys ˆ zs   = 1 4    1 xM 1 xM − 1 xM 1 yM − 1 yM 1 yM −1 zM 1 zM 1 zM          xM2+ yM2− δ12 yM2+ zM2− δ22 xM2+ zM2− δ32   − 2D0    δ1 δ2 δ3      . (3.16) 3.3.3 Layout C

Layout C is similar to Layout B, however the hydrophones are closer to the center of the tank, across its length. Considering yo the distance between each hydrophone and the closest vertex of

(39)

3.3 Proposed Layouts 19

Figure 3.3: Graphical representation of Layout C

the tank, the coordinates (relative to the vertex of the tank closest to H0) are as follows:

r0= h 0 yo 0 iT r1= h xM yM− yo 0 iT r2= h 0 yM− yo zM iT r3= h xM yo zM iT . (3.17) The position estimate is calculated by considering a referential whose origin is r0, and then

subtracting ˆysby y0, so the reference is the same as the one used in other layouts:

   ˆ xs ˆ ys ˆ zs   = 1 4    1 xM 1 xM − 1 xM 1 yM−2yo − 1 yM−2yo 1 yM−2yo −1 zM 1 zM 1 zM          xM2+ (yM− 2yo)2− δ12 (yM− 2yo)2+ zM2− δ22 xM2+ zM2− δ32   − 2D0    δ1 δ2 δ3      −    0 yo 0   . (3.18) 3.3.4 Layout D

Finally, Layout D has three hydrophones on the surface and only one on the bottom of the tank. The hydrophones’ coordinates are:

r0= h 0 0 0 iT r1= h 0 yM 0 iT r2= h xM y2M 0 iT r3= h xM 2 yM 2 zM iT . (3.19)

(40)

20 Hydrophone Layout

Figure 3.4: Graphical representation of Layout D

The position is estimated with the following equation:

   ˆ xs ˆ ys ˆ zs   = 1 2    − 1 2xM 1 xM 0 1 yM 0 0 − 1 4zM − 1 2zM 1 zM          yM2− δ12 xM2+yM 2 4 − δ2 2 xM2 4 + yM2 4 + zM2− δ3 2   − 2D0    δ1 δ2 δ3      . (3.20)

3.4

Precision Analysis

The analysis of the precision of each layout is done assuming that each measurement has an error of εi, that is:

Di= ˆDi+ εi, (3.21)

where Diis the real distance value between hydrophone Hi and the source and ˆDi is the distance

value actually measured by Hi. This error is, in the worst case, εM:

|εi| ≤ εM, ∀i ∈ {0, 1, 2, 3}, (3.22)

that corresponds to half of the sampling period multiplied by the speed of sound, which, for a decimation factor of 512 (later explained in chapter4) is:

εM= c

512 2Fclk

= 1480 512

(41)

3.4 Precision Analysis 21

In order to compare the precision of these layouts, error formulas are calculated for each, such that:

cs(L) = ˆcs(L) + εc(L), (3.24)

where cs(L) is the real value of the source’s c coordinate, ˆcs(L) is the estimate of the source’s c

coordinate and εc(L) is the error formula for coordinate c, for layout L. All cs(L) correspond to

equations3.14,3.16,3.18and3.20, while ˆcs(L) are obtained by substituting, in those equations,

all Di with ˆDi+ εi. Error formulas can be obtained by subtracting the former by the latter and are

the following: εx(A) = ε0(2D0+ 3ε0− 4(D1− ε1)) + ε1(2D1+ ε1) 2xM (3.25) εy(A) = ε0(2D0+ 3ε0− 4(D2− ε2)) + ε2(2D2+ ε2) 2yM (3.26) εz(A) = ε0(2D0+ 3ε0− 4(D3− ε3)) + ε3(2D3+ ε3) 2zM (3.27) εx(B) = ε0(2D0+ 3ε0− 4(D1+ D2− D3+ ε1+ ε2− ε3)) 4xM + +ε1(2D1+ ε1) + ε2(2D2+ ε2) − ε3(2D3+ ε3) 4xM (3.28) εy(B) = ε0(2D0+ 3ε0− 4(D1− D2+ D3− ε1+ ε2+ ε3)) 4yM + +−ε1(2D1+ ε1) + ε2(2D2+ ε2) + ε3(2D3+ ε3) 4yM (3.29) εz(B) = ε0(2D0+ 3ε0− 4(−D1+ D2+ D3+ ε1+ ε2− ε3)) 4zM + +ε1(2D1+ ε1) + ε2(2D2+ ε2) − ε3(2D3+ ε3) 4zM (3.30)

(42)

22 Hydrophone Layout εx(C) = ε0(2D0+ 3ε0− 4(D1+ D2− D3+ ε1+ ε2− ε3)) 4xM + +ε1(2D1+ ε1) + ε2(2D2+ ε2) − ε3(2D3+ ε3) 4(yM− yo) (3.31) εy(C) = ε0(2D0+ 3ε0− 4(D1− D2+ D3− ε1+ ε2+ ε3)) 4yM + +−ε1(2D1+ ε1) + ε2(2D2+ ε2) + ε3(2D3+ ε3) 4yM (3.32) εz(C) = ε0(2D0+ 3ε0− 4(−D1+ D2+ D3+ ε1+ ε2− ε3)) 4zM + +ε1(2D1+ ε1) + ε2(2D2+ ε2) − ε3(2D3+ ε3) 4zM (3.33) εx(D) = ε0(2D0+ 3ε0− 4(−D1+ 2D2− ε1+ 2ε2)) − ε1(2D1+ ε1) + ε2(4D2+ 2ε2) 4xM (3.34) εy(D) = ε0(2D0+ 3ε0− 4(D1+ ε1)) + ε1(2D1+ ε1)) 2yM (3.35) εz(D) = ε0(2D0+ 3ε0− 4(−D1− 2D2+ 4D3− ε1− 2ε2+ 4ε3)) 8zM + +−ε1(2D1+ ε1) − ε2(4D2+ 2ε2) + ε3(8D3+ 4ε3) 8zM (3.36)

Since the measurement errors are orders of magnitude lower than the distances between the source and the hydrophones, the following approximations are considered:

εx(A) ≈ ε0(2D0− 4D1) + 2ε1D1 2xM (3.37) εy(A) ≈ ε0(2D0− 4D2) + 2ε2D2 2yM (3.38)

(43)

3.4 Precision Analysis 23 εz(A) ≈ ε0(2D0− 4D3) + 2ε3D3 2zM (3.39) εx(B) ≈ ε0(2D0− 4(D1+ D2− D3)) + 2ε1D1+ 2ε2D2− 2ε3D3 4xM (3.40) εy(B) ≈ ε0(2D0− 4(D1− D2+ D3)) + 2ε1D1− 2ε2D2+ 2ε3D3 4yM (3.41) εz(B) ≈ ε0(2D0− 4(−D1+ D2− D3)) − 2ε1D1+ 2ε2D2+ 2ε3D3 4zM (3.42) εx(C) ≈ ε0(2D0− 4(D1+ D2− D3)) + 2ε1D1+ 2ε2D2− 2ε3D3 4xM (3.43) εy(C) ≈ ε0(2D0− 4(D1− D2+ D3)) + 2ε1D1− 2ε2D2+ 2ε3D3 4(yM− 2yo) (3.44) εz(C) ≈ ε0(2D0− 4(−D1+ D2− D3)) − 2ε1D1+ 2ε2D2+ 2ε3D3 4zM (3.45) εx(D) ≈ ε0(2D0− 4(−D1+ 2D2)) − 2ε1D1+ 4ε2D2 4xM (3.46) εy(D) ≈ ε0(2D0− 4D1) + 2ε1D1 2yM (3.47) εz(D) ≈ ε0(2D0− 4(−D1− 2D2+ 4D3)) − 2ε1D1− 4ε2D2+ 8ε3D3 8zM (3.48) By analyzing these error formulas, it can be seen that, as expected, the further apart the hy-drophones are, across a certain dimension, the more precise its respective measurements tend to be. For instance, by comparing εy(B) (3.41) and εy(C) (3.44) it is clear that Layout C results in

a larger measurement error across the y dimension, since the fact that the hydrophones are closer together results in a smaller denominator of the error formula. On the other hand, Layout C pro-vides an overall better precision across the x and z dimensions, since, despite εx(B) (3.40) being

the same as εx(C) (3.43) (and εz(B) (3.42) the same as εz(C) (3.45)), in Layout C the distances

between hydrophones and source would be inferior, so the errors would be smaller compared to those of Layout B. So, if the layout choice were to be made between Layout B and C only, the for-mer should be used when all of the source’s coordinates have the same relevance while the latter (or variances of it, where the hydrophones are closer across the x or z dimensions) should be used in applications in which a coordinate is not as relevant as the other two. Likewise, if an application needed the most precision in only one coordinate, with the other two not being as relevant, a layout in which the hydrophones are as further apart as possible across the dimension of interest, while being closer in the other two would be the most adequate.

(44)

24 Hydrophone Layout

Despite Layout A leading to a simpler computation of the position estimate, it clearly provides the worst overall precision out of all the proposed options.

Unlike the other layouts, in which all Di have an equal weight on the error formula, in Layout

D, D3has double the weight of D2and quadruple the weight of D1. It seems to provide a precision

across the width (x) of the tank similar to that of Layout B, and a precision across its length (y) somewhat similar to that of Layout A. Regarding precision across the depth of the tank, by analyzing its error formula , εz(D) (3.48), it is expected to be better than of any other layout when

the source is closer do H3, but for it to rapidly decrease as it moves closer to the surface.

In order to better illustrate the expected precision of each layout across the different dimen-sions of the tank, a Matlab script was created in order to simulate different measurements, with a given uncertainty, across different locations of a tank, for all the considered layouts. The error of each measurement is randomly generated, according to a uniform distribution on the inter-val [−εM, εM]. The script simulates a high number (n = 1000) of measurements in 5832 (183)

positions, evenly distributed inside a cubic tank. For each of these positions, the simulated mea-surement value for each coordinate is subtracted to their respective real value, and the average of the absolute value of these differences is computed. By calculating the average across all 5832 positions, the overall precision across the tank can be quantified. The obtained values for these error averages were:

hεxi(A) ≈ 0, 6685εM hεyi(A) ≈ 0, 6689εM hεzi(A) ≈ 0, 6927εM

hεxi(B) ≈ 0, 4714εM hεyi(B) ≈ 0, 4793εM hεzi(B) ≈ 0, 4810εM

hεxi(C) ≈ 0, 4264εM hεyi(C) ≈ 0, 8657εM hεzi(C) ≈ 0, 4351εM

hεxi(D) ≈ 0, 5281εM hεyi(D) ≈ 0, 6685εM hεzi(D) ≈ 0, 4402εM

For Layout C, the value of yo was yo= y4M. Figures 3.5, 3.6and3.7 show how the average

measurement error varies across the x, y and z dimensions, respectively. Each is calculated for median values of the other two dimensions, that is, for instance, figure3.5shows how the average error evolves when x goes from 0 to xM, while y = y2M and z = z2M. The y-axis of these figures

corresponds to the ratio between the average measurement error and εM.

It is clear that, precision-wise, Layout A is strictly worse than Layout B. It can also be seen that the loss of precision regarding the y dimension by going from Layout B to C is quite high, when compared with the precision that is gained across x and z. Layout D seems to provide an overall poor precision, and even though hεzi(D) is close to hεzi(C), its precision across z varies

strongly with the source’s depth.

3.4.1 Worst case scenarios

In this subsection is presented an estimation of the worst case errors for each layout. These happen in situations in which |εi| = εM, ∀i ∈ {0, 1, 2, 3}.

(45)

3.4 Precision Analysis 25

Figure 3.5: Average measurement error across the x dimension

(46)

26 Hydrophone Layout

Figure 3.7: Average measurement error across the z dimension

3.4.1.1 Layout A

In Layout A, the worst case scenarios for the x, y and z measurements are when the source is as far away as possible from the hydrophones H1, H2and H3, respectively:

εx(WC)(A) ≈ εM − 2 p yM2+ zM2+ 6 p xM2+ yM2+ zM2  2xM (3.49) εy(WC)(A) ≈ εM − 2 p xM2+ zM2+ 6 p xM2+ yM2+ zM2  2yM (3.50) εz(WC)(A) ≈ εM − 2 p xM2+ yM2+ 6 p xM2+ yM2+ zM2  2xM (3.51) 3.4.1.2 Layout B

In Layout B, the maximum error values occur when the source is closest to the auxiliary hydrophone whose distance measurement has a weight in the error formula opposite to the other two: εx(WC)(B) ≈ εM − 2 p xM2+ zM2+ 6 p yM2+ zM2+ 6 p xM2+ yM2  4xM (3.52) εy(WC)(B) ≈ εM − 2 p yM2+ zM2+ 6 p xM2+ zM2+ 6 p xM2+ yM2  4yM (3.53)

(47)

3.4 Precision Analysis 27 εz(WC)(B) ≈ εM − 2 p xM2+ yM2+ 6 p xM2+ zM2+ 6 p yM2+ zM2  4zM (3.54) 3.4.1.3 Layout C

Layout C’s worst case scenarios are similar to those of Layout B:

εx(WC)(C) ≈ εM  − 2pxM2+ zM2+ 6p(yM− 2yo)2+ zM2+ 6 p xM2+ (yM− 2yo)2  4xM (3.55) εy(WC)(C) ≈ εM  − 2p(yM− 2yo)2+ zM2+ 6 p xM2+ zM2+ 6 p xM2+ (yM− 2yo)2  4(yM− 2yo) (3.56) εz(WC)(C) ≈ εM  − 2p xM2+ (yM− 2yo)2+ 6 p xM2+ zM2+ 6p(yM− 2yo)2+ zM2  4zM (3.57) 3.4.1.4 Layout D

In Layout D, the worst case for the x coordinate is when the source is closest to H1 and for

the y coordinate is when it’s closest to the tank’s corner directly opposite to H1. Regarding the z

coordinate, the error is largest when the source is closest to the surface, and in the middle of the tank, that is, xs=x2M and ys=y2M.

εx(WC)(D) ≈ εM  − 2yM+ 12 q xM2+ (y2M)2  4xM (3.58) εy(WC)(C) ≈ εM  − 8pxM2+ zM2− 12x2M+ 24zM  2yM (3.59) εz(WC)(C) ≈ εM  − 2q(xM 2)2+ ( yM 2 )2+ 6 p xM2+ zM2+ 6p(yM− 2yo)2+ zM2  8zM (3.60)

(48)
(49)

Chapter 4

Functional Implementation

This chapter explains the concepts and algorithms behind the system’s implementation, as well as its most relevant parameters and the reason for which they were chosen.

4.1

BPSK Modulation

The signals transmitted by the transducer are BPSK-modulated. BSPK stands for Binary Phase Shift-Keying and is the simplest form of Phase Shift-Keying (PSK), as it uses only two phases, separated by 180°. A BPSK-modulated signal can, then, be expressed as

sBPSK(t) = A cos(ωct+ ϕk), (4.1)

where ϕkis the carrier’s phase, which is 0° for the data value, k, of 0, or 180° for the value of 1. It

can, thus, be reformulated [6] as

sBPSK(t) =    A cos(ωct), if k = 0 −A cos(ωct), if k = 1 , (4.2)

since the 180° shift can be done by inverting the carrier’s amplitude.

4.2

Kasami sequences

The transmitted signals are from a small set of Kasami sequences, which are binary sequences of length N = 2n− 1, in which n is an even integer, and they were chosen due to their high autocorrelation values [15]. A small set of Kasami sequences is a set of 2n2 sequences of length

N= 2n− 1, in which n is the degree of the primitive polynomial used to generate the set [2]. The polynomial that was used is:

p(z) = z8+ z4+ z3+ z2+ 1 , (4.3) 29

(50)

30 Functional Implementation

Figure 4.1: Correlation result between a received signal and a reference signal corresponding to a different sequence (left) and the same sequence (right)

which generates 16 sequences of 255 bits each. For each hydrophone, the system would calculate the correlation of the received signal with 16 different reference signals, each corresponding to a different Kasami sequence. Out of the 16 signals that result from these correlations, the one that has the maximum value would be considered the received sequence.

Figure4.1 shows the correlation result between a received Kasami sequence and a reference signal corresponding to a different sequence, on the left, and a reference signal corresponding to the received sequence, on the right. As can be seen, the peak value of the latter is about 6 times higher than that of the former, which shows how, by using Kasami sequences, there is virtually no risk of misidentifying the received signal and also how the usage of sequences with high autocorrelation values can improve the ToA estimation, since the correlation peak can be detected with a better precision.

4.3

Correlation Method

Since computing an actual correlation between the received signal and a BPSK-modulated sine wave would be too resource-consuming, the reference signal is approximated by a square wave, which results from converting positive values to 1 and negative values to -1, as depicted in figure 4.2.

Since BPSK modulation is being implemented, all information is in the signal’s phase, so even though the amplitude values of the correlation result will be different, the time instant in which the correlation peak occurs is not altered, as can be seen in4.3, which shows the correlation result of a signal by both the original sinusoidal reference and its square wave approximation.

(51)

4.3 Correlation Method 31

Figure 4.2: Original reference signal and its square wave approximation

Figure 4.3: Correlation result by a sinusoidal reference signal (top) and its square wave approxi-mation (bottom)

(52)

32 Functional Implementation

Figure 4.4: Correlation result signal and its envelope

By correlating with a square wave, as opposed to with a sine wave, the need for multipliers is eliminated, as the correlation result can be stored in an accumulator, to which the incoming samples are added or subtracted, depending on whether the reference square wave is positive or negative, respectively.

4.4

Correlation Envelope

By considering the correlation peak the instant of arrival, the ToA estimation is being limited to a precision of the carrier wave’s period, since, in reality, the time of arrival is between the instants of the two highest correlation values. By calculating the envelope of the correlation result signal, the precision can be improved to the sampling period, as can be seen in figure4.4.

4.4.1 Discrete Hilbert Transform

The Discrete Hilbert Transform of a discrete function u[n] where n = (−∞, ..., −1, 0, 1, ..., ∞) is given by [14] : ˆ u[n] =      2 π ∑ nodd u(n) k−n, for k even 2 π ∑ neven u(n) k−n, for k odd . (4.4)

(53)

4.4 Correlation Envelope 33

Figure 4.5: Coefficients of the implemented Hilbert FIR filter

For a function, u[n], with a discrete-time Fourier transform U (ω) and a discrete Hilbert trans-form ˆu[n], the DTFT of ˆu[n] is:

DTFT( ˆu) = U (ω) · (− j · sgn(ω)). (4.5) ˆ

u[n] can be obtained from4.5by using the convolution theorem :

ˆ u[n] = DTFT−1(U (ω)) ∗ DTFT−1(− j · sgn(ω)) = u[n] ∗ Z π −π(− j · sgn(ω)) · e jωn = u[n] ∗ h[n], (4.6) where h[n] =    0, for n even 2 π n, for n odd, (4.7)

which is an infinite impulse response (IIR), that can be approximated to a FIR. Figure 4.5 shows the coefficients of the implemented FIR filter (with an order of 64), that calculates the Hilbert Transform of the correlation signal.

Considering the analytic signal uA[k] that is given by:

(54)

34 Functional Implementation

in which u[k] is the correlation result signal and ˆu[k] is its Hilbert transform, that corresponds to the output of the FIR filter, the instantaneous amplitude of u[k], A[k], is given by |uA[k]|, so, in

other words, the envelope of the correlation result signal can be expressed as:

A[k] = q

u[k]2+ ˆu[k]2. (4.9)

Figure4.4shows a correlation result signal and its envelope, calculated through the previously explained method.

It should be noted that the implementation of the square root present in4.9 would be very resource-consuming, and not at all necessary regarding the time of arrival estimation, as the peak of A2[k] occurs at the same instant as that of A[k], the actual envelope. For that reason, the square root was not implemented, and in chapters5and6, the term "envelope" is used for short, referring, in fact, to the envelope squared (A2[k]).

Another concern is the group delay of the Hilbert filter, that corresponds to half of its order (32 samples). In order to align u[k] with ˆu[k], the former must be delayed by 32 samples, which is done through a shift register, as further explored in chapter5.

4.5

Chosen parameters

The system is implemented on an FPGA with a clock frequency of Fclk= 125MHz. As

pro-cessing samples at the clock frequency would be very resource-consuming, the input signals must be decimated. The decimation factor must be, then, selected by considering the trade-off between the desired system’s precision and its resource usage. Ultimately, the chosen decimation factor was 512, so the effective sampling frequency is given by:

Fs=

Fclk

512≈ 244, 141 kHz. (4.10)

The carrier’s frequency choice was based on the acoustic transducer that was used, presented in5, which is designed to work in frequencies between 16 kHz and 30 kHz.

Fc=

Fs

10 ≈ 24, 414 kHz, (4.11)

so each carrier’s period has 10 samples. Each transmitted symbol corresponds to 4 periods of the carrier, so each sequence has a total of:

Nsamples per sequence= Nsymbols per sequence× 4Nsamples per period= 255 × 4 × 10 = 10200 samples,

(4.12) which corresponds to a signal duration of:

tsequence=

Nsamples per sequence

Fs

(55)

4.5 Chosen parameters 35

The considered value for the underwater sound speed was c = 1480 m/s which was chosen taking into account that the test tank is filled with fresh water.

(56)
(57)

Chapter 5

Implementation

In this chapter the hardware that was used is presented, the system’s digital implementation and supporting software are explained and the implementation’s results regarding resource usage are presented.

5.1

Hardware

5.1.1 Transmitter

The signals to be transmitted are modulated by an FPGA, whose output connects to a board that drives a piezoelectric transducer.

5.1.1.1 Digital Platform

The transmitter is implemented on an Atlys board , which includes a Xilinx LX45 FPGA. Its 2 outputs that are connected to the transducer driver are part of the PMOD port highlighted in figure 5.1.

5.1.1.2 Transducer driver

A simplified schematic of the board used to drive the transducer is present in figure 5.2. It has has two inputs that are connected to the gates of two transistors. Driving both of them with opposite logical values allows current to flow through the transformer. A signal very close to a sine wave can be generated at the board’s output by alternating the logic values of the inputs as further explored in section5.2.

The board is powered by a 12V power source. Its large capacitance charges while no signal is being transmitted and discharges when high surges of power are requested during transmission, which reduces the peaks of current requested from the power source.

(58)

38 Implementation

Figure 5.1: Atlys board used to generate the signals [8]

(59)

5.1 Hardware 39

5.1.1.3 Transducer

The used transducer has the reference T217 and is from Neptune Sonar, Ltd. As stated in section 4.5, it can transmit signals with frequencies ranging from 16kHz and 30 kHz and has a maximum transmission power of 400W.

5.1.2 Receiver

The four hydrophones are connected to an analogue front-end that filters and amplifies the captured acoustic signals. The signals are then sampled and processed on a digital platform.

5.1.2.1 Digital Platform

The used digital platform was a RedPitaya board, which is based on a Xilinx Zynq-7010, that includes an FPGA (Fclk= 125MHz) and a dual-core ARM Cortex A9 processor. The ARM

processor runs Linux, uses DDR3 RAM, has Ethernet and USB interfaces and a SD flash memory. It possesses a dual high-speed ADC and a dual high-speed DAC, both with a sampling frequency of 125 Msps. This platform provides PL (Programmable Logic) hardware interfaces, an oscilloscope application, an arbitrary signal generator and a general purpose PID. The hardware design of the PL section is provided as an open source project for the XILINX Vivado design tool.

5.1.2.2 Analogue front-end

The analogue front-end is comprised of two boards: a primary and a secondary one. Each board has 2 hydrophone inputs, each connected to a two-stage amplifier chain, followed by a low-pass filter with a cutoff frequency of 250 kHz. The first stage of the amplifier chain was adjusted to a gain of 20X, while the second stage has two amplifiers regulated by I2C digital potentiometers that can be programmed, allowing an overall gain range of 0,1X-2500X.

Since the RedPitaya board only contains 2 analog inputs, the 4 hydrophone inputs have to be multiplexed. For that reason, the primary board includes 2 high-speed analog switches, that input into the ADC’s either the signals from the primary or secondary board, based on a selection signal that is output from the RedPitaya board. The inputs of the hydrophones H0 and H2 are

multiplexed into the channel A of the RedPitaya, while H1and H3are multiplexed into channel B.

The analogue front-end can be seen in figure5.3and its diagram is shown in figure5.4.

5.1.2.3 Hydrophones

The utilized hydrophones are of the model "H2a" and were produced by "Aquarium audio products". They have a frequency range between 20 Hz and 100 kHz and interface with the analogue front-end through a 3,5 mm jack connector.

(60)

40 Implementation

Figure 5.3: Analogue front-end

(61)

5.2 Digital implementation 41

Figure 5.5: Top level diagram of the transmitter

5.2

Digital implementation

5.2.1 Transmitter

Figure5.5shows the top level diagram of the transmitter’s FPGA implementation. It is com-posed of 4 modules : Sequencer, Address Generator, PSK Modulator and DDS.

The transmitter has two operating modes: it can transmit a single message, with parameters defined externally on a PC application that communicates with the FPGA through an UART inter-face; or it can cyclically iterate through a list of messages that has been previously uploaded into a RAM of the FPGA. The operation mode is selected through the input "External Selection". Figure 5.6shows the GUI of the PC application.

A message consists of a sequence that is repeated a certain number of times. That number of repetitions is determined by the Nsequences parameter. Tsequence is the time interval between the

sequences of a message and Tsequenceis the time interval between messages. Figure5.7illustrates

a message with 3 repetitions being periodically transmitted.

The transmitter is capable of modulating in both BPSK and QPSK, being the modulation type set by the parameter Modulation.

(62)

42 Implementation

Figure 5.6: PC application used to set the transmitter’s parameters

5.2.1.1 Sequencer

The Sequencer module has as inputs Tsequence, Trepetition(in clock enable (2MHz) periods) and

Nsequences. Its function is to output the signals Sequence and Message, that indicate to the module

Address Generator that a sequence or a message is to be transmitted. It does so by having a counter that resets every Tsequence clock enable periods, being that Sequence is at a logical high

for 1 clock enable cycle after each of these resets, provided there are still sequences to transmit in that message, which is done by keeping count of the number of already transmitted sequences and comparing it to Nsequences. The Message output behaves and is implemented similarly to Sequence.

5.2.1.2 Address Generator

This module contains a 256x64 RAM, that stores the parameters of up to 64 messages. It receives as input the Sequence and Message signals from Sequencer. The module has a counter for the address of its RAM, and it outputs the parameters (Modulation, Symbol Duration, Start Address, Nwordsand Carrier Frequency) of the message that corresponds to the current address.

Whenever the Sequence input is set to high, the module activates the Start TX output, that indicates to the PSK Modulator that a sequence is to be transmitted. When Message is set to high, the same is done, however the address counter is previously incremented, thus updating the parameters

(63)

5.2 Digital implementation 43

Figure 5.8: Content of the DDS LUT

relative to the new message to be transmitted. Start TX is also an output of the top level module, being sent to the receiver as a synchronization message.

The module also provides an interface that allows its RAM to be written into by a PC applica-tion, through UART.

5.2.1.3 PSK Modulator

The PSK Modulator module is the one that performs the modulation. It contains a 32x1024 RAM, storing the data relative to the sequences that are to be transmitted. It has 2 outputs: Load Symbol, which indicates to DDS that a new symbol is to be transmitted, and Symbol Phase, con-taining the phase jump of that symbol relative to the previously transmitted one. When Start TX is set to high, it starts reading Nwords32-bit words from its RAM, starting at Start Address. The

period of Load Symbol and the phase increment information are derived from the data to be sent, the type of modulation (BPSK or QPSK) and the duration of each symbol.

Just like the RAM containing the message parameters, this module’s RAM interfaces with the PC application.

5.2.1.4 DDS

DDS stands for Direct Digital Synthesis. This module contains a LUT that associates each phase value with the logical values to be input into the Transducer Driver in order to generate a sinusoidal signal with said phase. It receives Carrier Frequency, Load Symbol and Symbol Phase as inputs and it has a register that stores the current phase. Whenever Load Symbol is active, Symbol Phase and the carrier’s period are added to the current phase. The resulting phase is looked up in the LUT and its respective TP and TN are output.

The LUT is implemented on a 128x2 RAM. Figure 5.8 shows the values of the TP and TN outputs for each entry of the LUT.

(64)

44 Implementation

5.2.1.5 Application

The transmitter has been designed in a way that allows it to be useful for a variety of applica-tions. In this specific system, the PSK Modulator’s RAM is loaded with the data of the 16 Kasami sequences of 255 bit, which correspond to 512 32-bit words, occupying only half of the available RAM. Since each sequence is stored in 8 32-bit words, the Nwordsparameter is always 8 and Start

Addressis the multiple of 8 corresponding to the sequence to be sent. Each sequence is only trans-mitted once per message, so Nsequences = 1. Only BPSK modulation is used, the symbol duration

is of 4 carrier periods, and the carrier frequency is as close to the one calculated in section4.5as its precision allows (its period corresponds to a 22-bit wire), being effectively: Fc≈ 24413, 59 Hz.

5.2.1.6 Resource Utilization

The transmitter uses very few resources, comparatively to the receiver. It was also imple-mented on a board with far more resources than necessary. For that reason, the resource utilization, in percentage, was very low, as shown in table5.1

Resource Utilization

LUT 5%

FF 1%

BRAM 10%

DSP 1%

Table 5.1: Transmitter’s resource utilization

5.2.2 Receiver

The digital implementation of the receiver was based on the provided open source design. All modules of that original design that were not necessary, such as the PID controller and the function generator were removed, so as not to waste some of the system’s resources, and the module implementing the oscilloscope application was modified in order to perform the system’s signal processing.

The FPGA shares data bidirectionally with the ARM processor through an AXI interface. Figure5.9shows a simplified block diagram of the RedPitaya architecture. As explained in section 4.5the desired decimation factor for each hydrophone input is 512, so the outputs from both 14-bit ADC’s are decimated by a factor of 256, since each corresponds to the multiplexing of 2 hydrophone inputs. The resulting decimated signal is input into the Digital Signal Processing (DSP) module.

The DSP, besides implementing the necessary interface with the ARM processor, contains a module called Rx Top Level, which is responsible for all of the signal processing required to estimate the time of arrival of each hydrophone. Figure5.10shows the block diagram of a part

Imagem

Figure 2.1: Illustration of the multipath model in an oceanic environment
Figure 2.2: Illustration of the reverberation model in a room environment
Figure 2.3: Illustration of the trilateration method on a 2D plane
Figure 2.4: Illustration of the possible source positions, for a given TDOA 2.4.1.1 Long Baseline (LBL)
+7

Referências

Documentos relacionados