• Nenhum resultado encontrado

Reconfigurable localization for AUVs based on Time of Arrival of encoded acoustic signals

N/A
N/A
Protected

Academic year: 2021

Share "Reconfigurable localization for AUVs based on Time of Arrival of encoded acoustic signals"

Copied!
70
0
0

Texto

(1)

F

ACULDADE DE

E

NGENHARIA DA

U

NIVERSIDADE DO

P

ORTO

Reconfigurable localization for AUVs

based on Time of Arrival of encoded

acoustic signals

Localização de AUVs reconfigurável baseada no Tempo de Chegada de sinais

acústicos

Tiago Coelho Brandão Pinto

Mestrado Integrado em Engenharia Eletrotécnica e de Computadores Supervisor: Professor José Carlos Alves

(2)
(3)

Resumo

Com o constante crescimento do interesse em explorar o oceano, a sistemas robóticos marinhos têm vindo a ganhar uma importância tanto a nível científico como industrial. Neste contexto, é claro que Veículos Autónomos Subaquáticos (AUV-Autonomous Underwater Vehicles) são meios relevantes para estas atividades de estudo oceânico devido à sua adaptabilidade face a diferentes missões, combinada com uma implementação do sistema custo e manutenção baixos quando com-parados com veículos operados remotamente. No entanto, o tempo de operação deste tipo de sistemas autónomos é limitado pela fonte de energia disponível (bateria). Desta forma, o uso desta energia disponível deve ser regrado de forma a que a precisão necessária para desempenhar corretamente a tarefa do AUV seja disponibilizada.

O trabalho apresentado faz parte de um projeto do INESC TEC e pretende explorar como o hardware reconfigurável disponível pode ser aproveitado de modo a implementar outras soluções baseadas em compromissos tais como beneficiar duma transmissão de dados duas vezes mais rápida com o custo agregado de uma probabilidade de erro maior.

O sistema implementa um processo de localização de baixo consumo baseado no Tempo de Chegada de 16 possíveis sequências de Kasami. Conforme a tarefa do AUV, o sistema consegue alternar entre duas modulações: BPSK e QPSK. Cada tipo de modulação adequa-se melhor a diferentes tipos de tarefas. Nomeadamente, se uma alta precisão é necessária e a taxa de transmis-são de dados é irrelevante, o sistema consegue reconfigurar-se de forma a que os sinais esperados estejam modulados em BPSK. Por outro lado, se transmitir dados a um débito superior apresenta uma maior prioridade, o sistema deve ser reconfigurado de forma a que os sinais epserados estejam modulados em QPSK apesar da precisão do sistema diminuir.

Uma vez que o sistema implementado já possui a alternativa de localização com sinais modu-lados em BPSK (solução desenvolvida numa tese anterior), esta dissertação foca-se na idealização, implementação e performance em tempo real do sistema com sinais transmitidos modulados em QPSK.

(4)
(5)

Abstract

With the growing interest in oceanic exploration, marine robotic systems are gaining a new impor-tance in diverse scientific fields and industrial domains. In this context, it is clear that Autonomous Underwater Vehicles (AUV) are relevant instruments for research activities in the sea because of their adaptability for different missions, combined with a low-cost deployment and maintenance in comparison with manned vehicles. The operation time of these systems is constrained by the limited source power available (battery). Therefore, its usage must be regimented in such a way that the necessary precision is derived to the AUV in order to perform its task correctly.

The work here presented is part of a INESC TEC project and intends to explore how the available system can benefit from the re-configurable capabilities of its hardware and propose other valid and advantageous solutions based on trade-offs such as trading a lower distance estimation precision for a higher data transmission rate.

The system implements a low power localization process based on the estimation of the Time of Arrival of 16 possible Kasami sequences. Depending on the AUV’s task’s needs, the system can alternate between two possible modulations: QPSK and BPSK. Each modulation is more adequate for a different type of task. For instance, if a high precision is needed and the data transmission rate is irrelevant, the system can reconfigure itself in order to transmit the expected signals in BPSK. On the other hand, if transmitting data to the receiver has a higher priority, the system can also reconfigure itself to the QPSK alternative and save time and energy.

Since the BPSK solution was already implemented in a previous thesis work, this dissertation is going to focus on the design, implementation and real-time performance of the QPSK alterna-tive.

(6)
(7)

Agradecimentos

Em primeiro lugar, agradeço ao Professor José Carlos Alves por todo o apoio despendido ao longo deste semestre.

Aos meus pais que me proporcionaram as condições necessárias para o meu sucesso escolar e aos quais estarei sempre grato.

À Ana Luísa Ribeiro que, apesar de áreas distintas, sempre se mostrou disponível para rever e dar a sua opinião sobre o que fui escrevendo. O teu apoio incondicional fez e fará sempre toda a diferença.

À icrto que, mesmo com mil e uma coisas para tratar na sua dissertação, se mostrou sempre disponível para ajudar.

Aos meus Pablitos pela vossa amizade eterna.

(8)
(9)

“It is paradoxical, yet true, to say, that the more we know, the more ignorant we become in the absolute sense, for it is only through enlightenment that we become conscious of our limitations. Precisely one of the most gratifying results of intellectual evolution is the continuous opening up of new and greater prospects.”

(10)
(11)

Contents

1 Introduction 1

1.1 Context . . . 1

1.2 Motivation . . . 1

1.3 Objectives . . . 2

2 State of the Art 3 2.1 Underwater Vehicles . . . 3

2.2 Localization Techniques . . . 4

2.2.1 Inertial Navigation System . . . 4

2.2.2 Geographic position . . . 4

2.3 Acoustic Localization . . . 5

2.3.1 Underwater Acoustic Communication Channel . . . 5

2.3.2 Range Measurement . . . 7

2.3.3 Underwater Acoustic Positioning Systems . . . 8

2.3.4 Time Difference of Arrival - TDoA . . . 10

2.3.5 Direction of Arrival - DoA . . . 11

2.3.6 Time of Arrival - ToA . . . 12

3 System Thinking 15 3.1 Solution Method . . . 15 3.2 Hardware Constraints . . . 16 3.3 QPSK Modulation . . . 17 3.4 Kasami Sequences . . . 19 3.5 Correlation Method . . . 19

3.6 Offline Validation and Results . . . 21

3.6.1 Improving the ToA Estimation - Hilbert Transform . . . 22

3.7 Summary . . . 24

4 Digital Implementation 25 4.1 Hardware Platforms . . . 25

4.1.1 Transmission . . . 25

4.1.2 Reception . . . 28

4.2 Digital System Developed . . . 31

4.2.1 32 RAMs . . . 32

4.2.2 Corr 00 and 11 . . . 34

4.2.3 RAM holding 16 Kasami Sequences . . . 37

4.2.4 Correlation Associator and Total Window Accumulator . . . 37

(12)

x CONTENTS 4.2.6 Implementation Results . . . 40 4.3 Software . . . 40 4.4 Summary . . . 40 5 Results 43 5.1 Simulation Results . . . 43

5.2 FEUP’s Tank Results . . . 46

5.2.1 First Test . . . 46

5.2.2 Second Test . . . 47

6 Conclusion 49 6.1 Objectives Completion . . . 49

(13)

List of Figures

2.1 Commercial AUv example - Iver 3 Standard model . . . 4

2.2 Multi-path . . . 5

2.3 Sound profile in seawater . . . 6

2.4 Example of an SBL positioning system . . . 8

2.5 Example of an USBL positioning system [11] . . . 9

2.6 Example of an LBL positioning system [8] . . . 10

2.7 Illustration of Multilateration . . . 11

2.8 Illustration of Trilateration . . . 12

2.9 Frequency selective system . . . 12

2.10 Comparison between pure tone cross correlation and pure tone with distortion cross-correlation [7] . . . 14

3.1 System architecture - transmitting sequence #16 . . . 16

3.2 Implemented constellation . . . 18

3.3 Modulated signal spectrum . . . 18

3.4 Symbols 01 and 11 of QPSK modulation with square approximation . . . 20

3.5 Square symbols 00 and 10 of QPSK modulation with square approximation . . . 20

3.6 Correlation with sequence #1 vs sequence #2 when transmitting sequence #1 . . 21

3.7 Original signal correlation vs Square signal correlation . . . 22

3.8 Original signal modulation vs Square signal modulation - ToA comparison . . . . 22

3.9 Absolute correlation values vs HT applied . . . 23

3.10 Absolute correlation values vs HT applied (close-up) . . . 23

4.1 Transmitter system overview . . . 25

4.2 FPGA used for the signal generation . . . 26

4.3 Signal amplifier board . . . 27

4.4 Signal amplifier schematic [5] . . . 27

4.5 Transducer hardware . . . 28

4.6 Reception schematic . . . 28

4.7 Hydrophone . . . 28

4.8 Analog filtering and amplifying . . . 29

4.9 RedPitaya on the left, Analog board on the right . . . 30

4.10 RedPitaya system_wrapper overview . . . 30

4.11 QPSK module - top level . . . 31

4.12 32 RAMs module organisation . . . 32

4.13 Information hold by counters . . . 33

4.14 Timing diagram . . . 33

(14)

xii LIST OF FIGURES

4.16 corr_11 module overview . . . 35

4.17 samples_adder module (present in corr_11 and corr_00) . . . 36

4.18 RAM holding kasami sequences . . . 37

4.19 corr_associator and total_window_accumulator overviews . . . 38

4.20 peak_finder module overview . . . 39

5.1 QPSK system result . . . 43

5.2 QPSK system result - close up . . . 44

5.3 Sequence #1 correlation result vs Sequence #2 correlation result . . . 45

5.4 QPSK module result . . . 45

5.5 Distances estimated for the four different positions . . . 47

5.6 Second test - Transmission timeline . . . 47

5.7 Second test - Distance estimated results . . . 48

(15)

List of Tables

4.1 Example of corr_00 logic operations when ram_index_rd = 2 . . . 35

4.2 Utilization percentage - Overall System . . . 40

(16)
(17)

List of Abbreviations

AUV Autonomous Underwater Vehicle

BPSK Binary Phase-Shift Keying

DSP Digital Signal Processing

QPSK Quadrate Phase-Shift Keying

GNSS Global Navigation Satellite Systems

TDoA Time Difference of Arrival

ToA Time of Arrival

ToF Time of Flight

LBL Long Base Line

SBL Short Base Line

USBL Ultra Short Base Line

SNR Signal to Noise Ratio

ADC Analog to Digital Converter

(18)
(19)

Chapter 1

Introduction

1.1

Context

Human kind has studied, travelled and achieved greatness in multiple areas but ocean’s exploration represents one in which there are still manifold questions to be answered. In fact, only 5% of the sea’s ground has been explored by Human beings. Consequently, the need to investigate such a large remaining area, in depth, arises and aims, for example, to discover new energetic, food, or medicinal resources, a better understand magnetic field changes, discovery of new species, etc.

This phenomenon is yet to be achieved due to appended costs and lacking of available and capable technologies. For example, on earth’s surface users are able to use cheap and efficient localization systems (GNSS - Global Navigation Satellite Systems) that allow them to check their global positions in a short time period. On the contrary, underwater localization and communica-tion bring new challenges. As standard methods used to communicate and locate on the earth’s surface use electromagnetic waves that suffer an unbearable attenuation underwater, other alterna-tives must be taken into consideration.

The work here presented has the goal of mitigating this need of developing and improving underwater localisation technologies.

1.2

Motivation

This project is part of a INESC TEC project and aims to continue a master thesis work [7], which

achieved promising preliminary results. These were accomplished when implementing a system based on signal processing to determine the time of arrival (ToA) of an acoustic signal, modulated

in BPSK, through correlation. The system developed in [7] was able to generate a sharp correlation

peak in adverse conditions (noise and multi-path) and, as a side effect, transfer data (low-debit) from the transmitter to the receiver (AUV).

The necessary precision for the localisation of an AUV varies from task to task. If a high precision is needed, the system should be able to reconfigure itself in order to achieve that higher precision. On the other hand, the system should also reconfigure its localization method when this

(20)

2 Introduction

higher precision is no longer needed (for example, open sea operation where no obstacles). Also, since power is a limited resource available on AUVs and the available hardware is re-configurable (FPGAs both responsible for the digital signal processing and transmission), the system can benefit from those hardware characteristics and alternate between multiple localization processes allowing advantageous trade-offs regarding the needs of each task to perform.

The work here presented intends to explore how the system can benefit from the re-configurable capabilities the hardware presents and propose a valid and advantageous solution.

1.3

Objectives

The main objectives of this work are:

1. Study and select multiple characteristics of the transmitted signals (modulation, codification and duration);

2. Implement signal decoding processes aiming for a low debit digital communications system; 3. Implement a system capable of switching between multiple localization processes.

4. Integrate the developed system on an infrastructure used for localization and on a vehicle to locate, using Long Base Line or Ultra Short Base Line architectures.

(21)

Chapter 2

State of the Art

This chapter highlights the available underwater vehicles and the multiple localization techniques to detect them.

Given the fact that this work is intended to continue João Magalhães’s work [7], the acoustic

localization topic and, more specifically, the Time of Arrival (ToA) technique will be the main focus of this chapter.

2.1

Underwater Vehicles

Typically, three types of vehicles can be found on underwater applications:

1. Manned Submersibles; 2. Remotely Operated Vehicles; 3. Autonomous Underwater Vehicles.

Motivated by military reasons, in 1775 there was a first attempt to build an underwater vehicle. David Bushnell designed and built an underwater vessel with the objective to, through it, attach explosive charges to enemy ships during the American Revolutionary War.

Secondly, the U.S. Navy funded the ROV technology development in the 1960s into what was then named a "Cable-Controlled Underwater Recovery Vehicle" (CURV). This created the capability to perform deep-sea rescue operations and to recover objects from the seabed. Building on this technology base, the offshore oil and gas industry created the work-class ROVs to assist in the development of offshore oil fields. Furthermore, ROVs became essential in the 1980s when much of the new offshore development exceeded the reach of human divers.

Finally, the first AUV was developed at the Applied Physics Laboratory at the University of Washington at 1957 by Stan Murphy, Bob Francois and later on, Terry Ewart. The "Special Purpose Underwater Research Vehicle", or SPURV, was built with the purpose to study diffusion, acoustic transmission, and submarine wakes. Since AUVs don’t require human control for their

(22)

4 State of the Art

actions and knowing that they were developed to perform long-range missions they have to present a low power consumption. Otherwise there’s time wasted when coming back again to the surface and descending again with a new battery, for example.

Figure 2.1: Commercial AUv example - Iver 3 Standard model

2.2

Localization Techniques

When going on a mission, it is necessary to know the vehicle’s position since one of the primary objectives is to collect valid data from the environment.

This following section will describe multiple existing techniques to estimate the vehicle coor-dinates. However, due to the importance of Acoustic Localization on this work, this approach will

be presented separately at2.3.

2.2.1 Inertial Navigation System

An inertial navigation system (INS) is a navigation device that uses a computer, motion sensors (accelerometers) and rotation sensors (gyroscopes) to continuously calculate by dead reckoning the position, the orientation, and the velocity (direction and speed of movement) of a moving object

without the need for external references. [2] Occasionally the inertial sensors are supplemented by

magnetic sensors (magnetometers) and speed measuring devices. INSs are used on vehicles such as ships, aircraft, submarines, guided missiles, and spacecraft.

A high quality INS system presents position drift rates in an order of few kilometres per day. However, a high cost and power consumption are associated. Thus, this localization technique becomes inadequate for an AUV system due to, for instance, its limited battery life.

2.2.2 Geographic position

Geographic position methods use a database that has certain characteristics related to the mis-sion’s operation area. Thus they are not adequate for the purpose of this work. Nevertheless, the most common techniques are image processing and sonar. These will be briefly explained in the following subsections.

(23)

2.3 Acoustic Localization 5

2.2.2.1 Image Processing

This method uses cameras to capture images of the surrounding area and tries to match them with the database images in order to navigate. Thus for optical systems in underwater environments the reduced range of cameras, the water turbidity, susceptibility to scattering and inadequacy of light-ing represent disadvantages for this strategy. In addition, visual odometry and feature extraction rely on the existence of static features in range of the vision systems and this is only achieved when navigating close to the sea floor. Therefore, optical underwater navigation methods are particularly

well suited to a small-scale mapping of environments rich in static features. [10]

2.2.2.2 Sonar

Sonar is used to detect, using acoustic waves, features in the environment that could be used as navigation landmarks. With bathymetric sonar, features can be extracted almost directly from the scans. With side-scan sonar (imaging), feature extraction is achieved through image

process-ing [10]. Similarly to the optical systems, after capturing the surrounding features, those can be

matched with the information present on the database.

2.3

Acoustic Localization

2.3.1 Underwater Acoustic Communication Channel

Multiple factors influence the communication quality when using the underwater environment as the communication channel. The main factors are Multi-path and variable sound speed. Thus,

communicating on the underwater acoustic channel is a real challenge. [16]

Following up, the influential factors are going to be described.

2.3.1.1 Multi-path

In such environment, the sound waves may suffer deviations. This is caused by the different temperature, salinity and pressure conditions provided in the various areas that the sound waves

go through. An example of this phenomenon is described in2.2.

TX Direct path RX

Ocean's surface

(24)

6 State of the Art

Multi-path raises problems mainly on communication systems, causing high Inter-Symbol

Interference (ISI), due to the delayed signals illustrated at 2.2. This negative effect presents is

severer in shallower waters due to their proximity to the surface boundary and is less noticeable if operating in deeper waters.

2.3.1.2 Sound Speed Profile

The sound speed is mainly affected by pressure, salinity and temperature. Taking into account

these parameters, an alternative to estimate the sound speed is presented bellow [13]:

C= 1449.2 + 4.6T + (1.34 − 0.01T )(S − 35) + 0.016Z (2.1)

Where C is the sound speed in seawater, T is the temperature in Celsius, S is the salinity in parts per thousands and Z is the depth of the water.

This means that at a temperature of 25◦C, normal salinity conditions and a depth of 300 meters

the sound speed in the water is 1482 m/s which is, approximately, 4.5 × the speed of sound in the air. This has a direct impact on the available bandwidth and on the latency of communications.

The underwater sound speed profile can be found in figure2.3.

Figure 2.3: Sound profile in seawater

2.3.1.3 Doppler Effect

The Doppler effect is the change in frequency or wavelength of a wave in relation to an observer who is moving relative to the source.

The following formula represents how this effect influences the frequency observed by a mov-ing or fixed target (AUV, for example).

f= c ± vr

c± vs



(25)

2.3 Acoustic Localization 7

Where vs represents the velocity of the source relative to the medium, vr the velocity of the

receiver relative to the medium and c the speed of the waves in the communication channel.

An algorithm was proposed in [7]. Even though it never has been implemented and tested in

real-time, the MATLAB simulations revealed that, when trying to calculate a correlation peak in underwater acoustic applications, the algorithm was able to compensate Doppler effect.

2.3.1.4 Channel Attenuation and Noise

Both attenuation and noise are present in underwater environments and have a negative effect on signal strength and SNR.

Noise is usually modelled as Gaussian, but not white since its power spectral density decays

at around 18 dB per decade [3].

When modelling the attenuation, the overall path loss is approximately given by:

A(L, f ) = Lkα fL [13] (2.3)

where L is the transmission distance, f is the signal frequency and k is the spreading loss (repre-sents the sound waves expansion in the form of a cylindrical wave when its value is k=1). Finally, α is the absorption coefficient in dB/Km and its value can be obtained from Thorp’s equation:

α = 0.11 f 2 1 + f2+ 44 f2 4100 + f2+ 2.75 × 10 −4f2+ 0.003 [13] (2.4)

where f is the signal frequency in kHz.

2.3.2 Range Measurement

The distance between the transmitter and the receiver is crucial when trying to achieve an under-water vehicle location. The following methods are the most commonly used to calculate the range. [16]

2.3.2.1 Received Signal Strength Indicator - RSSI

This technique consists on a node estimating its distance to the signal source by analyzing the sig-nal strength and comparing it to a range dependent sigsig-nal model. However, these models can’t be

relied on for high accuracy localisation systems. As explained in2.3.1, the path loss in

underwa-ter acoustic channels varies with several factors, and multi-path can result in considerable energy fading. Thus this methodology is not an efficient approach for underwater localisation systems.

2.3.2.2 Time of Flight - ToF

This method requires a transducer and a transponder. The transducer transmits a signal and, upon reception, the transponder sends a response. Once that response reaches the transducer, the

(26)

round-8 State of the Art

sight. As previously discussed, the sound speed on the water is susceptible to variations which can cause accuracy problems for range estimation.

2.3.2.3 Time of Arrival - ToA

This approach requires a receiver that knows when the signal was transmitted. Upon receiving the acoustic signal, the receiver calculates the delay and, once again, using the estimated underwater sound speed, calculates the distance to the reference point.

2.3.3 Underwater Acoustic Positioning Systems

An underwater acoustic positioning system is a system for the tracking and navigation of un-derwater vehicles or divers by means of acoustic distance and/or direction measurements, and subsequent position triangulation. There are three alternatives for underwater acoustic positioning systems: Short Baseline, Ultra Short Baseline and Long Baseline.

The next subsections will focus on the description of those three alternatives.

2.3.3.1 Short Baseline - SBL

SBL systems are characterized by an inter-baseline transponder distance of 20–50 m. These sys-tems are mounted on floating platforms like boats, ships or barges, and are used for tracking underwater targets. Like LBL systems, they use round-trip signal propagation time of acoustic signals between transponders and target to compute the distance and then trilateration to deter-mine the position, often with supplementary depth data from a pressure sensor. The accuracy of SBL system improves as the distance between baseline transponders increases and can achieve similar performance levels as seafloor mounted LBL systems. Conversely, when used on smaller

vessels that reduce the inter-baseline transponder distance, the accuracy also deteriorates. [19]

Figure 2.4: Example of an SBL positioning system

2.3.3.2 Ultra-Short Baseline - USBL

USBL is by far the most popular category of underwater positioning systems due to its ease of use. A USBL system comprises two elements, a transceiver with an array of transducers that are

(27)

2.3 Acoustic Localization 9

typically less than 10 cm apart, thus giving the ultra short baseline, and a transponder/responder. The transceiver sends an acoustic pulse and when the transponder (mounted on the tracked object) detects this pulse, it replies with its own acoustic pulse. The round-trip propagation time of the initial acoustic pulse and the reply is used to compute the distance between them. To measure the direction of the transponder from the transceiver, the transceiver uses a method called phase-differencing within this transducer array to calculate the angle to the underwater transponder. The position of the undersea object (transponder) is then obtained using the range and angle from the transceiver to the transponder. What the system gains in ease of use and deployment, it loses in

the level of positioning accuracy. [19]

An example of an USBL system is illustrated at2.5.

Figure 2.5: Example of an USBL positioning system [11]

2.3.3.3 Long Baseline - LBL

The name derives from the fact that the distance between the baseline stations is long or similar to the distance between object and transponders. Baseline distance typically ranges from 50 m to

more than 2000 m ([15]). The baseline transponders are typically deployed on the seafloor along

the edge of the area of operation. An interrogating signal from the object (transponder) is sent. Upon receiving it, the transponder (object) sends a reply. The signal propagation times are then used to compute the distances between the object and transponders. Together with depth data from pressure gauges, the position of the object can then be computed using trilateration. This position is relative to the baseline transponders, but can be easily converted into geo-referenced coordinates if the geographic positions of the baseline transponders are known a priori.

The baseline transponders can also be mounted in fixed relative positions on a moving platform like a ship for applications like in-water ship hull inspections and other specialized tasks. LBL systems are independent of water depth and provide an accuracy higher than 1 m (can achieve an accuracy of a few centimetres). Thus this architecture exceeds the accuracy provided by USBL

(28)

10 State of the Art

The positioning system is demonstrated at2.6.

Figure 2.6: Example of an LBL positioning system [8]

Derivered from LBL devices, GPS Intelligent Buoys (GIB) can be viewed as an inverted LBL structure. Instead of deploying the baseline transponders on the seafloor, they are installed on

GPS equipped sonobuoys that are either drifting or moored [17] [1]. In a typical deployment

scenario, several GIBs are deployed over a given area of operation where the total number required is determined by the size of the operation area and the desired accuracy (an accuracy between centimeters and meters is achievable in real-time). The position of the tracked object is calculated in real-time based on the acoustic signals transmitted by the underwater object. GIB uses one-way acoustic signal transmission from object (emitter) to buoys as compared to the round-trip transmission of LBL, SBL and USBL, making it less susceptible to reflections from surface or other undersea structures.

2.3.4 Time Difference of Arrival - TDoA

The time difference of arrival (TDOA) method has been used many times for passive acoustic source positioning by measuring the time difference between signals arriving in two or more hy-drophones and then use that result to infer the relative position of the acoustic source. One of the methods used for estimating the time difference of arrival is the generalized cross-correlation,

GCC [4] [14]. The process consists in detecting the peak position of the correlation function

be-tween the received signal on both hydrophones, as the delay or time shift bebe-tween them. Even though it is a computationally intensive method, it is widely used because it can compensate the impact of the ambient noise on the accuracy of the signal lag estimation.

(29)

2.3 Acoustic Localization 11

2.3.5 Direction of Arrival - DoA

In localisation systems it is important to be able to determine the direction of the signal source. When the TDoA is known, the following are the two main strategies used:

2.3.5.1 Multilateration

The multilateration strategy is based on hyperbolic positioning (common approach for a passive source localization) and uses the time delays between pairs of sensors to derive a curve of a

con-stant time difference, which is an hyperbola [6]. Considering that the source distance is a lot

higher compared to the sensor spacing, it is acceptable to acknowledge that the wave, relative to the sensors, is plane. Therefore, the direction of propagation can be described by the asymptote of the hyperbola, and the slope of the asymptote will then define the direction relative to the axis of the sensors.

Figure2.7illustrates the method described.

Figure 2.7: Illustration of Multilateration

2.3.5.2 Trilateration

This method depends, once again, on first determining TDoA. For simplicity reasons, the receiver

in the configuration found in figure 2.8 uses two sensors, which are sufficient to determine the

angle between the sensors axis and the transmitter on a two dimensional plane. One more sensor in the receiver cluster would allow three dimensional localisation. The red point represents sensor number one, the blue point represents sensor number two and the green point represents the trans-mitter. The distance between the transmitter and sensor number two is R, the distance between the transmitter and the sensor number one is (R+r), where r is equivalent to the distance a sound wave travels during TDoA.

The following equations can be found at [18].

(30)

12 State of the Art Y = ±1 4 r −16d4+ 8d2r2− r4+ 16d2rR− 4r3R+ 16d2R2− 4r2R2 d2 (2.6) α = arctanX Y (2.7)

All the variables are represented at figure2.8.

Figure 2.8: Illustration of Trilateration

2.3.6 Time of Arrival - ToA

The time of arrival of the signal is crucial, in every approach, to determine the vehicle’s position. It is a very similar approach to ToF but it implies a synchronization between the transmitter and the receiver.

2.3.6.1 Frequency Selective Amplification

This system was developed by INESC Tec and it is currently used by its AUVs. It detects the time of arrival of a set of pure tones transmitted by different buoys (each buoy has a different tone associated). The pure tone is detected when the output of one amplifier reaches the predefined threshold.

The system is described in figure2.9.

(31)

2.3 Acoustic Localization 13

The amplifiers in2.9have a high gain to saturate the filtered signal. The intention is to

guar-antee the detection of the specific frequency after applying the threshold.

As stated before, this feature is useful because, as the system is frequency selective, multiple commands may be associated to those frequencies allowing a one-way communication.

2.3.6.2 Correlation method

The correlation method consists in correlating the expected source signal with the actual received signal. The correlation result presents a maximum value when the correlated signals are equal.

This method represents the most common approach when calculating the ToA. However the results’ precision depends on the type of signals used.

Both at [9] and [12] were proposed methods based on the correlation of signals encoded by

Pseudo-Noise (PN) sequences but the objectives established for each one of them were clearly different.

In [9], the main goal was to have a system capable of detecting a transmitted signal over

large distances. Therefore, once the attenuation of the acoustic signal increases inversely to the increase of the signal’s frequency, the channel frequency used was 264 hertz and the signal had a bandwidth of 3 Hz. Since the higher the duration of a signal the higher the signal’s energy, the characteristics of the transmitted signals were: 32 seconds duration and a modulation of 1024 bits. The main objective of increasing the transmitted signal’s energy was to also increase the chances of detecting those signals over large distances and, in fact, the implemented system showed that it was capable of detecting signals transmitted at distances over 1000 km with a distance estimation error in the order of a few hundred meters.

One of the main goals in [12] was to develop a system that should be able to work with a cheap

low power consumption piezzo-electric cristal oscillator (wich presents an unstable frequency re-sulting in transmitting signals with frequency deviations). Thus, this work proposes the use of dual PN sequences to estimate the time of arrival. In this setup, the transmitted signals consist in trans-mitting a modulated PN sequence followed by a guard time followed by the same PN sequence. The time of arrival estimation is derived from correlating the two PN sequences transmitted per signal. This idea was also explored in an attempt to diminish the problems associated with the Doppler effect, multi-path and clock drift. The presented results show that this setup is capable of yielding a clear correlation peak.

(32)

14 State of the Art

Figure 2.10: Comparison between pure tone cross correlation and pure tone with distortion

cross-correlation [7]

As shown in2.10, the results obtained, when the pure tone suffers deviations from the original

signal due to noise, multipath and Doppler effects, are far from ideal considering that no clear correlation peak to infer the ToA is found.

(33)

Chapter 3

System Thinking

Since a BPSK system was already implemented ([7]) and achieved good results, taking advantage

of the re-configurable capabilities of the system, switching between other signal modulations, duration or even repetition was the next step to take.

The bandwidth required by QPSK, for the same bit error rate, is reduced to half when compar-ing with BPSK. Consequently, the reduced bandwidth allows a higher transmission rate of infor-mation (exactly 2× higher when comparing with BPSK) and a more efficient use of the available bandwidth.

Thus, this chapter describes a solution to implement a QPSK system, explores the hardware constraints, the QPSK modulation, the correlation method to be used, and, lastly, the results ob-tained (offline) in order to validate the system.

3.1

Solution Method

The work here developed is based on the correlation method. Even though it is a good approach, the underwater acoustic channel presents noise and multipath effects creating an unclear

correla-tion peak (as seen in2.10). Therefore, encoding the transmitted signals is a solution. As previously

referred in [7], a system capable of estimating the ToA of an acoustic signal modulated in BPSK

was developed and the results obtained were far better than when only using a pure sine wave as the transmitted signal. Taking that into consideration, the possibility to extend the available BPSK system to a QPSK system was put into practice.

Benefiting from the idea already present on the implemented system, the use of a set of PRBS, 16 sequences with low cross correlation and high auto-correlation, allows the system to exchange multiple messages/PRBS sequences (equal to the number of sequences) with a low probability of detecting a wrong message.

Furthermore, maintaining the time per symbol (Ts), the necessary time to send a symbol is

reduced by half when using a QPSK modulation instead of BPSK. Thus, the same PRBS can be sent in half the time, use half the bandwidth and the system is still able to detect the correct

(34)

16 System Thinking

Taking advantage of the fact that the transmitter is flexible (able to transmit BPSK and QPSK messages), only the receiver switches between the two modulations.

A system overview can be found at3.1.

Transmitter BPSK/QPSK ADC's x(t) x[n] BPSK Correlator QPSK Correlator

...

Multipath Direct path Underwater Microphone #16 #2 #1

Figure 3.1: System architecture - transmitting sequence #16

3.2

Hardware Constraints

The target hardware (explained in detail later on4) has a maximum sampling frequency of 125MHz.

This represents a maximum precision available of: vs

Fs

= 0.01184mm (3.1)

However, receiving samples at 125MHz would be high resource consuming, it would imply cal-culating a correlation result for each one of the 16 sequences per clock cycle. Thus, in order to allow the system to have sequential logic and still be able to provide a good precision, the receiver decimates the samples by a factor of 320 (once more, the decision will be further ahead explained

on4). Therefore, the new sampling frequency is set on:

new_Fs=

Fs

Df

= 390.625KHz (3.2)

And the precision that the system provides is equal to:

precision= vs

new_Fs

= 3.7888mm (3.3)

With this new sampling frequency, the system has 320 clocks available to output the 16 correlation values and the addition of sequential logic is possible.

(35)

3.3 QPSK Modulation 17

Finally, the transmitter hardware presents a good frequency response (not attenuated) between

the 20kHz-30kHz interval (also described on4). Therefore, this characteristic limits the available

bandwidth.

3.3

QPSK Modulation

As stated at the beginning of this chapter, the QPSK modulation was chosen, for its characteris-tics, to complement the reconfigurable system. Those characteristics become advantageous when compared to the BPSK modulation due to:

1. A reduced bandwidth usage: 2× lower;

2. A higher transmission rate of data: 2× higher;

However, those advantages have a trade off:

1. A higher probability of error: Pe= er f c

q Eb N0  >12er f c q Eb N0  ;

That was considered insignificant since the obtained results (in both offline validation3.6and

practical results5) were positive.

The adopted values for the carrier frequency and time per symbol were, respectively, fc =

24.414kHz and Ts= 4 ∗ 1f

c in order to provide a significant reduction of complexity on the DSP

system because these values result in an integer number of samples per symbol:

#samples_per_carrier_period = f pga_clock_ f requency Df fc = 125×106 320 24.414 × 103 ≈ 16 (3.4) #samples_per_symbol = #samples_per_carrier_period × 4 = 64 (3.5)

(36)

18 System Thinking

Figure 3.2: Implemented constellation

As seen in3.2, an integer number of samples per symbol, 64, is achieved. Furthermore, the

chosen constellation represents symbol 00 at phase φ , symbol 01 at φ +π

2, symbol 10 at φ + π and

symbol 11 at φ +3π2 .

The following plot shows the modulated signal spectrum and its respective bandwidth.

Figure 3.3: Modulated signal spectrum

As evidenced above, the bandwidth used by the QPSK modulation is approximately 12kHz

which is validated by: B = fb=T1

b =

1

(37)

3.4 Kasami Sequences 19

3.4

Kasami Sequences

There are two sets of Kasami sequences: the small set and the large set. The large set contains all the sequences in the small set. Only the small set is optimal in the sense of matching Welch’s lower bound for correlation functions.

The QPSK system uses a set of Kasami sequences which belong to the small set generated by the following polynomial:

p(z) = z8+ z4+ z3+ z2+ z0 (3.6)

This way, the system is able to transmit:

#sequences = 2d2 = 282 = 16, d = polynomial_degree = 8 (3.7)

16 messages/sequences with a low cross-correlation (between sequences of the small set) and high auto-correlation values.

Each sequence is composed by:

#length = 2d= 255, d = polynomial_degree = 8 (3.8)

255 bits. However, as a QPSK symbol is composed by 2 bits and the resulting length is not an ever number, a bit valued 0 was added to the end of each one of the 16 set of sequences. Thus, the

transmitted sequences are composed by 256 bits (128 symbols) represented, as section3.3defines,

by 8192 samples at the receiver end.

3.5

Correlation Method

At 3.1 it is stated that the QPSK system also uses a set of 16 PRBS sequences but moduled in

QPSK. Knowing that each sequence has 8192 samples, 128 symbols, the DSP system needs to calculate: nsequences× nsamples_per_sequence Df = 16 ×8192 320 ≈ 410 (3.9)

calculations/cycle (multiplication and additions). Considering that the implemented system

would use the original modulation,3.2, and do the amount of operations calculated above, a high

amount of resources would be needed. In order to limit the usage of the available resources, a

similar approach to [7] was followed.

The correlation method consists in multiplying the expected result (size x) with a window of received samples (holding the last x samples) and, subsequently, adding those partial results. When a positive maximum value happens, the expected signal and the last x samples received present the highest similarity possible. In this application, the system considers that when a correlation

(38)

20 System Thinking

that both signals are real and limited in time, can be found bellow:

(y ∗ x)[n] =

N−1

m=0

(y[m − n]x[m]) (3.10)

As stated above, a similar approach to the BPSK correlation method was followed. This method consists in: instead of using the real signal (cosine wave modulated) use square signals (valued

at 1 or -1) as described in3.5 and3.4. This allows the system to not only replace the products

by additions and subtractions (both resource friendly when compared to multipliers) but also take advantage of the similarity between the symbols.

Figure 3.4: Symbols 01 and 11 of QPSK modulation with square approximation

Figure 3.5: Square symbols 00 and 10 of QPSK modulation with square approximation

(39)

3.6 Offline Validation and Results 21

with symbol at phase φ (result β ) is equal to the negative value of the same operation between those 32 samples and symbol at phase φ + π (result −β ), two symbols can share the same correlation calculus (but inverted). Therefore, this correlation method becomes efficient since it shares the available resources and still provides the same pretended result on time (later described in detail

on4).

3.6

Offline Validation and Results

Using real data captured on the FEUP’s tank (4m×4m×1.6m), an offline validation was per-formed. Since it is such a small environment, multipath effects are noticeable.

Two objectives were established to consider this solution valid:

1. A sequence, when transmitted, was clearly detected (higher correlation value); 2. The square signal approximation did not compromise the ToA detection.

Firstly, the test that was driven was transmitting the #1 sequence of the 16 and performing the

correlation between the received signal and both #1st and #2nd sequences of the set. Figure3.6

illustrates the first objective being fulfilled.

Figure 3.6: Correlation with sequence #1 vs sequence #2 when transmitting sequence #1

Secondly, the test performed to validate the second objective was comparing the maximum

value of the correlation result of both square and original signals. As shown in 3.8 (a closeup

(40)

22 System Thinking

Figure 3.7: Original signal correlation vs Square signal correlation

Figure 3.8: Original signal modulation vs Square signal modulation - ToA comparison

3.6.1 Improving the ToA Estimation - Hilbert Transform

F(HT(s(t)))(ω) = − jsgn(ω) · F(s(t))(ω) (3.11)

The Hilbert transform (3.11illustrates its Fourier transform) derives the analytic representation

of a real-valued signal s(t). Specifically, the Hilbert transform of s(t) is its harmonic conjugate

sT(t) and the resulting analytic signal is:

(41)

3.6 Offline Validation and Results 23

Since the analytic signal is complex valued, it can also be represented by:

sA(t) = A(t)ejψ(t)s (3.13)

Where A(t) represents the instantaneous amplitude (envelope of the signal) and ψ(t) represents the instantaneous frequency.

Since the main objective is to find the maximum correlation value within 16 possible

se-quences, only the instantaneous amplitude is useful. In figure3.9, it is presented a comparison

between only calculating the absolute value of the correlation and calculating the absolute value of the analytic received signal (using Matlab’s hilbert function which provides the analytic signal).

(42)

24 System Thinking

As illustrated in3.10, the maximum correlation value presents a higher precision if searched

within the absolute value of the analytic signal.

However, the HT presents a high computing power associated since the system has to work with imaginary numbers and calculate the amplitude of the analytic signal.

3.7

Summary

This chapter described the generic solution proposed, the hardware constraints to consider, the QPSK modulation, the correlation method, the offline validation performed, and, at last, a possible optimization to have a higher precision when detecting the maximum correlation value.

(43)

Chapter 4

Digital Implementation

The following chapter starts with the description of the hardware platforms used for the

transmis-sion and reception of the acoustic encoded signals used in the system illustrated in3and, lastly,

describes the digital system used for the ToA calculation.

4.1

Hardware Platforms

This section presents the hardware platforms used in the developed system and its characteristics.

4.1.1 Transmission

The transmitted signals are generated by an FPGA. The output of the FPGA drives a signal am-plifier. The amplified signal serves as input to the piezoelectric acoustic transducer producing the acoustic waves transmitted.

An overview of the transmission system is represented at4.1.

FPGA Signal

Amplifier

piezoelectric transducer

Figure 4.1: Transmitter system overview

4.1.1.1 FPGA

The board used by the system for the signal generation is an Atlys that includes a Xilinx LX45

(44)

26 Digital Implementation

Figure 4.2: FPGA used for the signal generation

Circled is the 12-pin PMOD wich outputs the created signal.

4.1.1.2 Signal Amplifier

At the input of the amplifier is a square signal derived from the previous board (Atlys). This board, besides amplifying the signal at the input transforms it in a sinusoidal wave. This is achieved by two transistors that conduct at opposite logical values (0V or 3.3V) and create a current flow-ing through the transformer in opposite directions. Thus, the signal generated at the output is controlled by logical values, generates a sinusoidal wave and amplifies the signal as intended.

(45)

4.1 Hardware Platforms 27

Figure 4.3: Signal amplifier board

Figure 4.4: Signal amplifier schematic [5]

4.1.1.3 Piezoeletric Transducer

Figure4.5shows the used transducer. This specific model, T217, also presents the capability to

work as an hydrophone. However, this feature was not used on the system.

As it was referred in3.2, the transducer presents a good frequency response between 16kHz

and 30kHz.

(46)

28 Digital Implementation

Figure 4.5: Transducer hardware

4.1.2 Reception

The reception end is composed by an hydrophone connected to a board which filters and amplifies the received signal. The board’s output serves as input to the RedPitaya (where the DSP was developed).

Figure4.6illustrates the described reception connections.

Filtering and

Amplifying  RedPitaya 

Hydrophone

Figure 4.6: Reception schematic

4.1.2.1 Hydrophone

H2a hydrophone was the model used to record the received signals. It includes a 3.5mm jack interface and a working frequency range between 20Hz and 100kHz.

Figure4.7represents the used device.

(47)

4.1 Hardware Platforms 29

4.1.2.2 Analog Filtering and Amplifying

Figure4.8illustrates the path followed by the signal since it is received until being outputted to

the RepPitaya’s ADC.

I2C adjustable gain (0.1-2500 X) Lowpass Filter: Fc=250kHz Adjustable amplifier (10X) received signal 0 1 S0 Secondary board 1'b1    RedPitaya's ADC input

Figure 4.8: Analog filtering and amplifying

The signal starts by being amplified with an amplifier with a an adjustable gain of 10× the input signal. Then it enters another amplifiers but, this time, controlled by I2C and with a gain range between 0.1 and 2500. After being amplified, the signal is filtered by a lowpass filter with a cut-off frequency equal to 250kHz. Finally, the filtered and amplified signal passes through a multiplexer which allows the output to be either the one described or the alternate channel provided by the analog board. In this application, only one channel is needed.

The interface provided by the analog board is a female 3.5mm jack as input and a female SMA jack.

4.1.2.3 RedPitaya

The digital platform used to perform the digital signal processing is the RedPitaya represented at

4.9.

This board integrates a Zynq device that includes a dual-core ARM Cortex A9 processor and an FPGA. The ARM processor runs Linux, uses DDR3 RAM, has an Ethernet interface, SD flash memory and three USB interfaces. The RedPitaya has two ADC’s, available to sample at 125 Msamples/s, and two DAC’s connected to the FPGA.

(48)

30 Digital Implementation

Figure 4.9: RedPitaya on the left, Analog board on the right

Figure4.10 illustrates how the RedPitaya’s system is organised internally. AXI represents

the existing communication interface responsible by establishing the communication between the digital signal processing system and the ARM processor.

ZYNQ ARM

DSP (BPSK & QPSK)

DAC FIR

AXI

(49)

4.2 Digital System Developed 31

4.2

Digital System Developed

RAM 0 RAM 31 RAM 1 ... Corr. 00 Corr. 11 Corr . Associator Correlation History seq. transmitted [3:0] time det. [31:0] Peak Finder ... max. sample [31:0] valid result oldest pos. [8:0] 32 RAMS ... ... ... ... QPSK Module idata [15:0] ien_data rd addr rd addr wr addr FSM RAM kasami seq.

new transmission

current time [31:0]

detection threshold [31:0]

T

otal Window Accumulator

...

...

...

Figure 4.11: QPSK module - top level

This section details how the developed system is organized, all the decisions taken when designing and implementing it and the reasons that motivated them.

The top level receives a new sample every 320 clock cycles and outputs, within the interval waiting for a new sample:

1. the maximum correlation value detected;

2. the time since the signal was transmitted until it being detected by the receiver; 3. the number of the sequence transmitted;

4. a trigger that indicates the outputted result is valid.

Figure4.11illustrates the top level module’s organization. The main sub modules are:

1. 32 RAMs; 2. Corr. 00; 3. Corr. 11;

4. Corr. Associator;

5. Total Window Accumulator; 6. RAM Kasami seq.;

(50)

32 Digital Implementation

8. Peak Finder.

The following sub-sections are going to detail, in depth, the modules enumerated above.

4.2.1 32 RAMs ... 0 1 255 ... 0 255 ... 0 255 ... RAM 31 RAM 2 RAM 1 1 2 1 2 FSM rd_addr wr_addr rd_addr rd_addr

Figure 4.12: 32 RAMs module organisation

This section describes how the 32 RAMs module operates and is organized. Figure4.12illustrates

that this module is composed by 32 RAMs (256 positions × 16 bits each) and a FSM machine that provides both write and read addresses.

The chosen size and number of RAMs was defined by the available number of clock cycles between a new sample arrival. As stated before, 320 clock cycles available to perform a cor-relation of a window holding the latest sample with all the 16 expected sequences. Therefore, outputting 32 samples per cycle leads to 256 clock cycles needed to output all samples stored in the RAMs: #clock_cyles × #RAMS = 256 × 32 = 8192. Thus, this implementation leads to #clock_cycles_available = 320 − 256 = 64clock_cycles allowing a sequential (pipelined) imple-mentation to save the limited existing resources.

(51)

4.2 Digital System Developed 33

4.2.1.1 RD and WR operations

The global write and read addresses for the 32 RAMS module are defined by a set of two counters,

13 bits each, that is controlled by the Finite State Machine (represented at4.12).

One of the counters is responsible for providing the read address and the respective RAM index holding the oldest sample present in all the 32 RAMs. This counter starts incrementing (32

units each clock cycle) when a new sample is received and stops at the 256thclock cycle.

The remaining counter provides the write address (the global address where the newest sample is stored). It has a simpler implementation: increments, by one, when a new sample arrives.

The decoding of the reading counter follows the next rules:

1. Bits [12:5] indicate the start reading address inside the RAM being pointed by bits [4:0]; 2. Bits [4:0] indicate the RAM’s index holding the oldest sample.

The decoding of the writing counter follows the next rules: 1. Bits [12:5] indicate the position to be written inside each RAM;

2. Bits [4:0] indicate the RAM’s index where the newest sample received must be written.

Bellow,4.14and4.13illustrate, respectively, the temporal behaviour and the decoding of both

counters for the writing and reading processes.

Address [12:5] RAM index[4:0]

Figure 4.13: Information hold by counters

... 256 cycles ... 320 cycles clk new_data counter_rd ... ... time counter_wr counter_wr + 1 ...

newest sample position

(52)

34 Digital Implementation

4.2.2 Corr 00 and 11

Modules Corr 00 and Corr 11 are responsible for calculating, permanently, the correlation of 64 samples (outputted from the 32 RAMs, after 2 clock cycles of reading operations) with symbols 00 and 11 (represented by 64 samples).

As explained in3.5, from the correlation results of both symbols (00 and 11), the remaining

possible symbols correlations, 01 and 10, can be obtained by inverting the results of the 64 received samples × 64 samples of the reference signals because: symbol_00 = -symbol_10 and symbol_11 = -symbol_01.

An overview of both module’s implementation can be found at figures4.15and4.16.

rel[_pos[5:0] -rel_pos[5:0] -rel_pos[5:0] -... 0 1 31 ram_index_rd[4:0] 0 1 S0 0 1 S0 0 1 S0 rel_pos[2] rel_pos[3] rel_pos[2] rel_pos[3] rel_pos[2] rel_pos[3] ... -do_31 do_1 do_0 par_res_0 par_res_1 par_res_0 samples_adder ... + total_res[22:0] total_par_res

Figure 4.15: corr_00 module overview

As illustrated above, corr_00 receives: 32 samples, stemming from the 32 RAMs, and the

ram_index_rd (derived from the reading counter that, as explained in4.2.1, indicates which ram

has the oldest position). Thus, a relative position is calculated by subtracting the RAM index of the received samples (the index of the RAM from which each sample was outputted from) with the ram_index_rd. Having a relative position of the 32 received samples, it is possible to establish

an order and perform a subtraction or keep the received sample. As depicted in 4.15, the select

signal on each multiplexer of the 32 set is defined by the XOR operation between bits 2 and 3 of rel_pos_i (where i indicates what ram it is referring to). For example, if ram_index_rd = 2, the relative positions and XOR operations for symbol_00 present the following results:

(53)

4.2 Digital System Developed 35

Table 4.1: Example of corr_00 logic operations when ram_index_rd = 2

Ram index (i) rel_pos_i = i − ram_index_rd rel_pos_i[3] ⊕ rel_pos_i[2]

+/-0 -2 0 + 1 -1 0 + 2 0 0 + 3 1 0 + 4 2 0 + 5 3 0 + 6 4 1 -7 5 1 -8 6 1 -9 7 1 -10 8 1 -11 9 1 -12 10 1 -13 11 1 -14 12 0 + 15 13 0 + 16 14 0 + 17 15 0 + 18 16 0 + 19 17 0 + 20 18 0 + 21 19 0 + 22 20 1 -23 21 1 -24 22 1 -25 23 1 -26 24 1 -27 25 1 -28 26 1 -29 27 1 -30 28 0 + 31 29 0 + rel[_pos[5:0] -rel_pos[5:0] -rel_pos[5:0] -... 0 1 31 ram_index_rd[4:0] 0 1 S0 0 1 S0 0 1 S0 rel_pos[3] rel_pos[3] rel_pos[3] ... -do_31 do_1 do_0 par_res_0 par_res_1 par_res_0 samples_adder ... + total_res[22:0] total_par_res

(54)

36 Digital Implementation

The same logic is applied to the correlator of symbol 11. But, instead of calculating the XOR operation between bits 2 and 3 of the result derived from the relative position computation, only

bit 3 of rel_pos_i is relevant to decide if the sample is kept or subtracted (see figure4.16).

Both correlators share a sub-module, samples_adder (depicted in 4.17), that is responsible

for adding the first and second set of 32 partial results. This way, the 64 samples corresponding to one symbol are summed and a result is ready to move forward to the following module, the corr_associator.

+ + +

...

par_res_0 par_res_1 par_res_2 par_res_3 par_res_30 par_res_31

+

... 1st level - 16 adders and 16 registers

... 2nd level - 8 adders and 8 registers

3rd level - 4 adders and 4 registers

4th level - 2 adders and 2 registers

5th level - 1 adders and 1 registers + ... ... ... ... total_par_res

Figure 4.17: samples_adder module (present in corr_11 and corr_00)

The data size hold on each register increases by one unit each level the higher the pipeline level is. This decision was made to avoid the risk of an overflow occurring, since the maximum value of the sum of two operands with x bits is represented by x+1 bits.

(55)

4.2 Digital System Developed 37

4.2.3 RAM holding 16 Kasami Sequences

The module, illustrated in4.18, holds the 16 expected sequences. It is a 32 bit × 128 lines RAM,

in order to be able to output 16 symbols (32 bits) when a reading operation is complete.

128 lines 32 bits ... ... ... ...

seq 16 seq 15 seq 2 seq 1

bits 255 and 256 of the 16 seq bits 2 and 3 of the 16 seq bits 0 and 1 of the 16 seq

... ...

Figure 4.18: RAM holding kasami sequences

As described in4.18, bits 0 and 1 of each sequence are stored on the first line, bits 2 and 3 on

the second line, etc.

The reading process will be described later in4.2.4.

4.2.4 Correlation Associator and Total Window Accumulator

This section aggregates the description of two modules: the correlation associator and the total window accumulator.

Mentioned in 3.5, figure 4.19 illustrates how the system takes advantage of the symmetry

between the symbols and, consequently, the symmetry of the correlation results.

The results calculated by both corr_00 and corr_11 serve as input to each one of the 16 mul-tiplexers present on the correlation associator module. Thus, the inputs of the 16 mulmul-tiplexers are: total_res_11, -total_res_11, total_res_00 and -total_res_00. They are selected according to

the outputted symbols derived from the previously described module (4.2.3). The sym_16[1] and

sym_16[0] are attributed, respectively, to the MSB and LSB of the first of the 16 multiplexers’ set. Following the same idea, the remaining multiplexers are attributed with the rest of the sym-bols outputted in the sym_16 array. The multiplexers’ select signal, corresponding bits of array

(56)

38 Digital Implementation

Once the results are associated to the symbol with each Kasami sequence, a total symbol cor-relation is ready to be stored in the total_window_accumulator module. This module is composed by a set of 16 accumulators, each one composed by a register (once again, with enough size to avoid an overflow) and an adder, that adds 256 valid results from the corr_associator. The 256 valid results summed represent a full correlation window result of the received signal with the expected signal, the Kasami sequence.

Mux sym_16[1] sym_16[0] -total_res_11 MSB LSB total_res_00 corr_res_seq1 Mux sym_16[31] sym_16[30] -total_res_11 MSB LSB total_res_00 corr_res_seq16 ... D Q D Q + + total_window_corr_seq1 [31:0] total_window_corr_seq16 [31:0] ... corr_associator total_window_accumulator

(57)

4.2 Digital System Developed 39

4.2.5 Peak Finder

This section describes the main objective of the Peak Finder module and its implementation. A

module overview is illustrated in4.20.

...

total_window_corr_seq16 total_window_corr_seq1

If 3rd register from shift is higher than all remaining four, store value hold on the 3rd register and current_time

If 3rd register from shift is higher than all remaining four, store value hold on the 3rd register and current time

Compares all max

values max_value_seq16 max_value_seq1

...

new_transmission time_max_value_seq16 time_max_value_seq1

...

time_det seq_det max_det valid_res enable enable curr_time curr_time enable enable sift[2] sift[2]

Figure 4.20: peak_finder module overview

The Peak finder’s main objective is to find a maximum correlation value among the 16 possible sequences, in order to determine which sequence was transmitted.

To achieve its objective, the module receives all the total window results from the expected sequences (derived from the total window accumulator) and feeds them as inputs to a set of sixteen 5 level shift-registers. New values are shifted to the set every time a valid total window result is ready.

For any of the shift-registers, once the third register holds a value above the pre-defined thresh-old (input/parameter) and that same value is higher than all the remaining values held in the shift register, the current time and maximum values are stored.

Finally, when a new transmission occurs all maximum values detected for each sequence are compared. Once the 16 values stored are compared, the module outputs the number of the

(58)

trans-40 Digital Implementation

result is ready.

4.2.6 Implementation Results

After post place and route, the developed QPSK system and the remaining RedPitaya’s system together presented the following occupation of resources:

Table 4.2: Utilization percentage - Overall System

Resource Utilization %

LUT 45.87

FF 22.27

BRAM 50.83

The QPSK system, isolated and post place and route, occupies the following percentages of resources:

Table 4.3: Utilization percentage - Developed DSP

Resource Utilization %

LUT 13.2

FF 5.7

BRAM 1

As seen in4.3, the use of resources diminishes when comparing with the percentages described

at4.2. This is due to the logic the system wrapper4.10has associated besides the DSP module

developed.

4.3

Software

This subsection analyzes the developed software to read, in real-time, the outputted results from the DSP described on this chapter.

The software, running at the ARM processor represented at 4.10, starts by initializing the

system with all the parameters present in a configuration file. Then, in order to communicate with the FPGA, it opens a mounted character device and instantiates a memory map that corresponds to the addresses used in the FPGA. Once the system is running, the software reads, by polling, the address that corresponds to the trigger signaling that a valid correlation result was calculated. After the trigger, the software reads the maximum value of the correlation, the timestamp and number of the associated received sequence.

4.4

Summary

This chapter analyzed, in depth: the hardware platforms used for the transmission and reception of the acoustic encoded signals used in the system, the digital system developed used for the ToA

(59)

4.4 Summary 41

estimation and its implementation results and, lastly, the software developed in order to read the results derived by the system.

(60)
(61)

Chapter 5

Results

This chapter analyzes the results obtained from both verification and real-time performance of the implemented system.

5.1

Simulation Results

The following results were obtained while verifying the digital system developed in4and using

real data captured in a 4×4×1.6m3tank.

The main objective of the first presented result, was to validate the correlation result derived

by the QPSK system when a sequence was transmitted. Figure 5.1 presents the output of the

transmitted sequence.

(62)

44 Results

There are two clear correlation peaks. However, only one (first peak) represents the arrival of the transmitted signal and is used for determining the AUV’s position. The second correlation

peak is derived from the multi-path suffered from the transmitted message (as referred in3.6, since

it is such a small testing environment, the multi-path effects are noticeable).

Figure 5.2: QPSK system result - close up

Figure5.2evidences both correlation peaks. The time difference between the second peak,

de-rived from multi-path, and the first peak is equal to: 0.0462 − 0.04426 = 1.94 × 10−3s.

Multiply-ing the time difference by the sound speed (considered 1480m/s) results in: 1.94 × 10−3× 1480 =

2.8712m. The calculated difference can be justified by the transmitted signal suffering multi-path within the testing environment.

The next plot, 5.3, evidences the clear detection of the transmitted sequence (in this case,

(63)

5.1 Simulation Results 45

Figure 5.3: Sequence #1 correlation result vs Sequence #2 correlation result

The following test’s objective was to confirm that the QPSK system is able to detect, cor-rectly, all 16 possible Kasami sequences transmitted. Therefore, guaranteeing the synchronization between the transmitter and receiver, the following results were obtained, once more, using the FEUP’s fresh water tank as the test environment.

(64)

46 Results

Plot 5.4illustrates the 16 binary sequences being transmitted in round-robin and the QPSK

system being able to correctly detect them.

5.2

FEUP’s Tank Results

Once the simulation results were validated by the developed testbench, the bitstream generated by the QPSK system was uploaded to the RedPitaya’s FPGA (responsible for the digital signal processing). In order to read the estimated distances by the developed QPSK module in real time,

the developed software, described in4.3, was used.

The following considerations were taken:

1. The considered sound speed was: 1480m/s;

2. Synchronism between TX and RX was guaranteed with a wired connection;

3. Precision imposed by sampling frequency and decimation factor: 125×1061

320

× 1480 ≈ 3.79mm.

5.2.1 First Test

The first test’s objective was to determine if the QPSK system was able to correctly and consis-tently determine the relative distance between the receiver and transmitter.

The experiment performed presented the following configuration:

1. 4 different relative distances – 1.2m, 2.3m, 3.4m and 4.4m;

2. Same sequence being transmitted;

3. 100 transmissions for each position;

4. Transmission period: 1s.

Figure5.5illustrates how the QPSK system was able to consistently estimate the four different

(65)

5.2 FEUP’s Tank Results 47

Figure 5.5: Distances estimated for the four different positions

5.2.2 Second Test

The second test’s objective was to Determine if the QPSK system is able to correctly detect the different transmitted sequences in a short time period.

The experiment performed presented the following configuration: 1. 4.4m x 4.55m x 1.6m sized tank;

2. Position – 2.3m;

3. All sequences being transmitted in Round-Robin; 4. 100 transmissions;

5. Transmission period between 16 sequences: 2s.

Figure5.6illustrates how the sequences were transmitted in time.

time(s)

...

RP (2s) MD (20.9ms) MP (80ms) #1 #2 #16 #1 #2

...

Referências

Documentos relacionados