13.07.2015 Views

Download report - Student Projects - ETH Zürich

Download report - Student Projects - ETH Zürich

Download report - Student Projects - ETH Zürich

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Autonomous Systems LabProf. Roland SiegwartSemester-ThesisDesign of a High Speed,Short Range UnderwaterCommunication SystemPart II - Implementation of theCommunication SystemSpring Term 2009Supervised by:Jérôme MayeAndreas BreitenmoserAuthor:Elias Hagmann


ContentsAbstractiii1 Introduction 11.1 Structure of the Report . . . . . . . . . . . . . . . . . . . . . . . . . 12 Related Work 33 Signal Processing 53.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1.1 Generic Digital Communication System . . . . . . . . . . . . 53.1.2 Underwater Acoustic Channel . . . . . . . . . . . . . . . . . . 53.2 Constant Frequency Modulation . . . . . . . . . . . . . . . . . . . . 63.2.1 Mathematical Basics . . . . . . . . . . . . . . . . . . . . . . . 63.2.2 PAM Signaling . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2.3 Baseband Representation of Passband Signals . . . . . . . . . 153.2.4 QAM Signaling . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2.5 Phase Shift Keying . . . . . . . . . . . . . . . . . . . . . . . . 183.3 S2C Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3.1 Fighting Multipath Propagation using S2C Carrier . . . . . . 203.3.2 Coherent S2C Receiption . . . . . . . . . . . . . . . . . . . . 223.3.3 The Chirp Transform - A new View on S2C Signals . . . . . 233.4 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4.1 Phase and Group Delay . . . . . . . . . . . . . . . . . . . . . 253.4.2 FIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.3 IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 The Communication System 274.1 System Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.1.1 DBPSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.1.2 M-ary PSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.2 Synchronisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.2.1 Filter for Signal Detection and initial Synchronisation . . . . 344.2.2 Signal Detection . . . . . . . . . . . . . . . . . . . . . . . . . 354.2.3 Initial Synchronisation . . . . . . . . . . . . . . . . . . . . . . 374.2.4 Synchronisation during Data Transmission . . . . . . . . . . . 434.3 S2C Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.3.1 Channel Types . . . . . . . . . . . . . . . . . . . . . . . . . . 504.4 Bandwidth Considerations . . . . . . . . . . . . . . . . . . . . . . . . 51i


5 Implementation of the System 535.1 DSP Program Architecture . . . . . . . . . . . . . . . . . . . . . . . 535.1.1 Program Architecture . . . . . . . . . . . . . . . . . . . . . . 535.1.2 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535.1.3 Data Link Layer . . . . . . . . . . . . . . . . . . . . . . . . . 545.1.4 Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . 545.1.5 EDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.1.6 McBSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.1.7 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.2 Speed Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.2.1 Compiler Optimisation . . . . . . . . . . . . . . . . . . . . . . 575.2.2 Fast Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 585.3 Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.3.1 System Frequency Response . . . . . . . . . . . . . . . . . . . 626 Results 636.1 Waterbox Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.1.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 636.1.2 DBPSK System . . . . . . . . . . . . . . . . . . . . . . . . . . 646.1.3 M-PSK System . . . . . . . . . . . . . . . . . . . . . . . . . . 646.2 Swimming Pool Tests . . . . . . . . . . . . . . . . . . . . . . . . . . 656.2.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 656.2.2 First Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 Conclusion and Outlook 698 Acknowledgement 71Bibliography 73ii


AbstractThe present <strong>report</strong> describes the second part of the development of an acoustic highspeed,short range underwater communication system to be used by the NAROfish. As the typical application area of the NARO fish are environments with alarge amount of possible acoustic wave reflectors, one of the main challenges of thecommunication system was found to lie in the resulting extremely strong multipathpropagation. To face this problem, sweep spread carrier signals were used enablingthe system to filter out most of the unwanted multipath signal energy. First testresults showed that the communication system is basically working but at the sametime revealed the necessity of further work on the system in order to decrease thebit error probability and to increase the data rate.iii


Chapter 1IntroductionThe acoustic underwater communication channel provides probably the most difficultconditions encountered in the communications world: Severe multipath propagationheavily distorts the received signal while the bandwidth of the involvedsystems is strongly limited due to the propagation characteristics of water. Furthermore,different frequencies suffer from varying attenuation and sound celeritygradients bend the acoustic waves away from their designated propagation paths.All this makes the development of an acoustic underwater communication systema very challenging but at the same time also a very interesting task. The present<strong>report</strong> describes the stony pathway towards the implementation of such a system.1.1 Structure of the ReportThe <strong>report</strong> is structured into five main chapters. In chapter two, the <strong>report</strong> startswith presenting some of the previous achievements in the underwater acoustic communicationsresearch. Chapter three then provides a theoretic view on the signalprocessing used in the developed system and chapter four describes the practicalconsequences of these theories. Subsequently, chapter five presents a low level viewon the implementation of the signal processing and finally chapter six summarisesthe results obtained during the system development.1


Chapter 1. Introduction 2


Chapter 2Related WorkFor a long time, the field of underwater communications played a niche role in thecommunications world. But in the recent years, together with the developmentof sensor networks and an increasing need to use such networks in underwaterenvironments, research on this topic was intensified. In table 2, some of the <strong>report</strong>edresults of acoustic underwater communication systems are presented.Developers Data Rate Range Carrier Modulation(bps) (km) Frequency(Hz)L.F. Yeung et al. [1] 10k 1 OFDM MFSKJ.A. Catipovic et al. [2] 10k 0.75 20k 128-FSKM. Stojanovic et al. [3] 10k 3 25k QPSKM. Chitre et al. [4] 5.3k 0.35 OFDM DPSKL.E. Freitag et al. [5] 5k 0.7 25k MFSKH.K. Yeo et al. [6] 4k 5 10k QPSKTable 2.1: Reported results of underwater communication systems.It is necessary to state that these systems are developed for ocean or at least oceanlikeenvironments and not for a swimming pool channel with its extremely strongmultipath propagation as the present work is concerned with. A system workingbesides the open sea channel also in environments with characteristics nearer tothose of a swimming pool is presented by [9]. They achieved data-rates of upto 15kbps over distances between one and two kilometres and with that stronglyinspired the present work.3


Chapter 2. Related Work 4


Chapter 3Signal ProcessingIn the following chapter, a theoretical view on the signal processing involved in anacoustic underwater communication system is presented.3.1 Introduction3.1.1 Generic Digital Communication SystemAs shown in figure 3.1, a generic digital communication system could be viewed asperforming a three stage operation on the transmitted data. The first stage, thesource coding, is responsible of removing data redundancy and thus reduces theamount of data to be processed by the subsequent two stages. The second stagenamed channel coding does the oposite of the source coding, it adds redundancy tothe data. This is done using special error correcting codes in order to decrease thesystem’s bit error rate. And only the last stage is concerned with physical operationsby modulating the data bits onto some waveforms matched to the specific channel.InputSourceEncoderChannelEncoderModulationChannelOutputSourceDecoderChannelDecoderDemodulationFigure 3.1: Generic digital communication system.3.1.2 Underwater Acoustic ChannelThe main application area of the present system are short-range acoustic underwaterchannels. Due to the relatively short involved distances, the channel geometryplays an outstanding role in the overall system behaviour, but at the same time,the system should work in environments involving completely different geometries.5


Chapter 3. Signal Processing 6Thus it is necessary to view the channel geometry as a random variable with characteristicsthat are left as open as possible. With that, the channel could be describedas shown in figure 3.2: A combination of a line-of-sight path with a large numberof multipaths produced by a scattering volume. If we describe this using formulas,we have for a transmitted signal s(t) and a received signal r(t):r(t) =N∑α n (t)s[t − τ n (t)] (3.1)n=0with N the total number of multipaths, α n (t) the time dependent attenuation andτ n (t) the time dependent propagation delay of the n-th multipath. The challengingtask is now to develop a system that works for a huge number of different multipathconfigurations.Figure 3.2: The underwater acoustic channel.3.2 Constant Frequency ModulationAs a first step towards our desired communication system, the well known constantfrequency carrier modulation is described. Most of the concepts presented in thissection could be found in [7] and [8], even though they were matched to the specificneeds of our communication system during the creation of this <strong>report</strong>.3.2.1 Mathematical BasicsIn the following, some fundamental mathematical concepts are presented that cannot be by-passed if one is concerned with information transfer. The concepts areonly briefly described and most of the proofs were omited.Inner ProductA very useful tool while working with signals is provided by the inner productbetween functions. As signals are always functions of time, we concentrate ourinterest on mappings R → R for real valued signals and R → C for complex valuedsignals. For these cases, the inner product is given by〈g,h〉 ∫ ∞−∞g(t)h ∗ (t)dt (3.2)where both g and h are in general complex functions of time f : R → C and ∗denotes complex conjugation.The next few formulas show some of the properties of inner products between complexfunctions:〈g,h〉 = 〈h,g〉 ∗ (3.3)〈αg,h〉 = α 〈g,h〉 ,α ∈ C (3.4)


7 3.2. Constant Frequency Modulation〈g,αh〉 = α ∗ 〈g,h〉 ,α ∈ C (3.5)〈g 1 + g 2 ,h〉 = 〈g 1 ,h〉 + 〈g 2 ,h〉 . (3.6)Furthermore, we can define the energy in a complex signal g by‖g‖ 2 〈g,g〉=∫ ∞−∞|g(t)| 2 d t(3.7)with ‖g‖ the so called L 2 -norm of the signal g.The Space of Energy Limited SignalsWe call two signals u and v to be L 2 -indistinguishable from each other if the normof their difference ‖u − v‖ equals zero. Under these circumstances, the signals withfinite L 2 -norm - the finite energy signals - form a vector space over the complexfield. That is, for every energy limited signal u ∈ L 2 (R) with L 2 (R) the set ofall distinguishable finite energy signals and every complex number α ∈ C we haveαu ∈ L 2 (R). Furthermore, if u ∈ L 2 (R) and v ∈ L 2 (R), then u + v ∈ L 2 (R) holdstoo.Now we are able to examine some of the geometric properties of the L 2 (R) space.First, we define a signal u to be orthogonal to a signal v if‖αu + v‖ 2 = ‖αu‖ 2 + ‖v‖ 2 ∀ α ∈ C. (3.8)Evaluating the inner products in this expression, this is equivalent to requiring that∫ ∞−∞u(t)v ∗ (t)dt = 0. (3.9)Using this concept of orthogonality, we call the function w to be the projection ofv ∈ L 2 (R) on u ∈ L 2 (R), if:1. w is L 2 -indistinguishable of αu for some α ∈ C.2. v − w is orthogonal to u.With that, we require that:which leads to w = 0 if u = 0 and for all other cases〈v − αu,u〉 = 0 (3.10)w = 〈v,u〉2u. (3.11)‖u‖It can be shown, that the projection w of the function v onto the function u isof least distance to v among all the functions w ′ that are scaled versions of u. Insymbols:‖v − w‖ = min ‖v − βu‖ . (3.12)β∈C


Chapter 3. Signal Processing 8Linear Sub-SpacesIn order to be able to define the signal space of the signals involved in the communication,we need to consider linear sub-spaces of the L 2 (R)-space. In the following,some properties of linear sub-spaces are presented:• A set of functions U in the L 2 (R)-space form a linear sub-space if they areclosed under scalar multiplication and superposition. This means that for twofunctions u ∈ U and v ∈ U, αu + βv ∈ U ∀ α,β ∈ C.• A sub-space U of L 2 (R) is spanned by the functions u 1 ,...,u n ∈ U if all functionsin U can be epressed as a linear combination ∑ nl=1 α lu l of the functionsu 1 ,...,u n for some choice of complex numbers α 1 ,...,α n .• Given a linear sub-space U, a set of functions u 1 ,...,u d form a basis of U ifu 1 ,...,u d are linearly independent and span U. If u 1 ,...,u d form a basis ofU, U is said to have dimension d.Orthonormal BasesThus, if we have a basis of a linear sub-space, every function of this sub-spacecan be represented using a linear combination of the basis functions. But findingthe corresponding coefficients α 1 ,...,α d is generally a sophisticated task. However,things can be greatly simplified using an orthonormal basis. A set of functionsφ 1 ,...,φ d is called an orthonormal basis of a linear sub-space U if φ 1 ,...,φ d spanU and if the following holds for all l,l ′ ∈ {1,...,d}:{0 if l ≠ l ′〈φ l ,φ l ′〉 =1 if l = l ′ (3.13)Now we still have the representation of u ∈ U asu ≡d∑α l u l (3.14)l=1where ≡ means L 2 -indistinguishability, but we can easily calculate the coefficientsα 1 ,...,α d by computing the inner products between u and the orthonormal basisfunctions φ 1 ,...,φ d . This can be verified by evaluating〈 d∑〉α l φ l ,φ νl=1〈u,φ ν 〉 =Thus, we getd∑= α l 〈φ l ,φ ν 〉l=1= α ν. (3.15)d∑u ≡ 〈u,φ l 〉 φ l . (3.16)l=1We are now able to calculate the energy of the signal u ∈ U asd∑‖u‖ 2 = |〈u,φ l 〉| 2 . (3.17)l=1


9 3.2. Constant Frequency ModulationProjectionsWe only considered the representation of a member function u of a sub-space U sofar, but the most important advantage of the orthonormal basis representation offunctions lies in the possibility to project functions v ∈ L 2 (R) that need not to becompletely inside U onto U. Using the definition of the projection of a function ontoanother function in 3.10, we can derive the projection w of v onto U to getw ≡d∑〈v,φ l 〉 φ l . (3.18)l=1This projection is equal to all the L 2 -indistinguishable functions in the linear subspaceU that are closest to v.With the projection w we get a lower bound on the energy contained in v as‖v‖ 2 ≥d∑|〈v,φ l 〉| 2 . (3.19)l=1Equation 3.19 illustrates the important fact that the projection of a signal onto alinear sub-space diminishes its energy as long as the signal contains parts that areorthogonal to the sub-space.The Gram-Schmidt ProcedureOne may ask the question whether there exists an orthonormal basis for every linearsub-space of the L 2 (R)-space. The answer is yes - as long as the sub-space is finitedimensional. This can be shown using the Gram-Schmidt procedure which actuallycalculates an orthonormal basis.The procedure starts with a basis u 1 ,...,u d for the sub-space U that can alwaysbe found if we consider only finite dimensional sub-spaces. It begins with thecomputation of the first orthonormal basis function asφ 1 = u 1‖u 1 ‖ . (3.20)If we think now of having already constructed m basis functions φ 1 ,...,φ m , wecould project the m+1-th basis function u m+1 on the orthonormal functions foundso far to getm∑〈u m+1 ,φ l 〉 φ l . (3.21)l=1Using this result, we define the orthogonal part of u m+1 to φ 1 ,...,φ m to beu ⊥ m+1 = u m+1 −If we normalise u ⊥ m+1, we get the m + 1-th basis function asm∑〈u m+1 ,φ l 〉 φ l . (3.22)l=1φ m+1 = u⊥ m+1∥∥ u⊥ . (3.23)m+1After all basis functions u 1 ,...,u d are considered, it can be shown that the resultingfunctions φ 1 ,...,φ d are orthonormal and span U.


Chapter 3. Signal Processing 10Signal SpaceAt this point, we get a little less theoretic by considering a communication systemthat transmits a stream of messages out of an alphabet of M equiprobable messagesm 1 ,...,m M . The transmitter maps every message to its own unique signals 1 (t),...,s M (t) with duration t s . We state that the signals s 1 (t),...,s M (t) form afinite dimensional sub-space S ⊂ L 2 (R). Thus we can construct an orthonormalbasis φ 1 ,...,φ d of S using the Gram-Schmidt procedure to get for every signals i ,i ∈ {1,...,M}s i ≡=d∑〈s i ,φ l 〉 φ ll=1(3.24)d∑s il φ ll=1where the s il could be interpreted as the signal coordinates. We thus could definea signal vector for all signals s i ,i ∈ {1,...,M}:⎡⃗s i =⎢⎣⎤s i1. .s id⎥⎦ . (3.25)In our communication system, on one side the transmitter needs to generate thesignal s i out of its vector ⃗s i by multiplying the vector components with the correspondingbasis functions. And on the other side, the receiver computes the differentreceived vector components by evaluating the inner products of the received signal˜s i with the orthonormal basis functions.If we take an additive white gaussian noise (AWGN) channel into consideration,we receive signals of the form˜s i ≡ s i + n (3.26)where n is a sample function of the white gaussian noise process. With that, thereceived signal vector looks like⎡⃗˜s i =⎢⎣⎤s i1 + n 1.s id + n d⎥⎦ (3.27)with n 1 ,...,n d the projected noise components. Due to the propagation in thechannel, the received signal now has parts orthogonal to the signal space S thatdepend only on the noise function n. These orthogonal noise parts are filtered outby projecting the received signal onto S, thus the signal-to-noise ratio of the systemis in general drastically increased.Matched FilterA structure of great importance when working with signal spaces is the matchedfilter, which is commonly used to implement the inner product operation.A filter is called the matched filter for the complex waveform φ(·), if its impulseresponse at time t isφ ∗ (−t) (3.28)or using ˇ· to denote time reversion


11 3.2. Constant Frequency ModulationWith 3.29, we get(u ∗ ˇφ ∗ )(t 0 ) ==∫ ∞−∞∫ ∞−∞ˇφ ∗ . (3.29)u (τ) ˇφ ∗ (t 0 − τ) dτu (τ) φ ∗ (τ − t 0 ) dτ= 〈u,φ(· − t 0 )〉(3.30)where ∗ denotes convolution in time and u and φ are both of finite energy. Therefore,it is sufficient to evaluate 3.30 at time t 0 to get the inner product between u andφ(· − t 0 ).If we think now of having a set { } Jφ j of J energy limited functions that are allj=1time shifts of each other, that isφ j (·) = φ(· − t j ) ∀ j ∈ {1, · · · ,J} (3.31)we could compute the inner products of an energy limited function u with thefunctions { φ j} Jj=1 by using only one filter, the matched filter of the signal φ 1. Wejust have to evaluate the output of this filter fed by the signal u at the differenttime instances t 1 , · · · ,t J .3.2.2 PAM SignalingNow we are able to make the first step towards the desired communication systemby investigating the mapping of bits to waveforms. Since a bit is not a physicalentity, this is a necessary step in order to be able to transmit digital informationover a physical channel.This mapping is typically done in two steps:1. First, a block of k bits is mapped to a block of n real or complex numberscalled symbols. Thus, we define the mapping ϕ asϕ : {0,1} k → R n ,ϕ : (d 1 ,...,d k ) → (x 1 ,...,x n ) .(3.32)With that, we get a rate of k nbits per real or complex symbol with k the totalnumber of bits transmitted by the system.2. In the second step, the symbols are modulated onto waveforms with the constraint,that every possible chain of symbols produces its own distinct signal.If we think of the possible lifetime of our communication system to be as largeor even larger than 10 9 symbol durations and we use a mapping of one bitper symbol, we get a number of 2 1000000000 different waveforms. Even if everyparticle in the universe would be able to store one of these waveforms, it wouldnot be possible to have all possible waveforms in memory. Thus we need toadd some additional structure to the modulator.Consider again that we have mapped k bits {D j } k j=1 to n symbols {X l} n l=1 -both sets consist of random quantities - and we wish to transmit the n symbols.If we assume that we have access to n real waveforms {g l (·)} n l=1 , wecould linearly modulate our symbols onto these waveforms by calculatingX (t) = An∑X l g l (t) , t ∈ R (3.33)l=1


Chapter 3. Signal Processing 12where X (t) is a stochastic process and A is the amplitude of the transmittedsignal with A 2 having units of power. It can be shown that there is no loss ingenerality when the waveforms {g l (·)} n l=1are assumed to be orthonormal.At this point, we still have the problem that we need to store or to generate apossibly huge set of n different waveforms. But as will be shown in the next sections,the difficulties connected with this task can be defused.The Pulse Amplitude ModulationWe now restrict the symbols {X l } n l=1to be real and adapt 3.33 to getX (t) = An∑X l φ l (t), t ∈ R (3.34)l=1with the only change that we used a set of orthonormal waveforms {φ l (·)} n l=1 insteadof general waveforms {g l (·)} n l=1. If we think of the transmitted signal X (t)being received on receiver side without any distortions, we could perfectly recover atransmitted symbol X l ,l ∈ 1,...,n by evaluating the scaled inner product betweenX and φ l :X l = 1 A 〈X,φ l〉 . (3.35)In order to facilitate the task of generating the waveforms {φ l (·)} n l=1, we assumethat they are time shifts of each other:φ l (·) = φ(· − t l ) ∀ l ∈ {1,...,n} (3.36)for some function φ(·). With that, we not only have an easy way to find the nnecessary waveforms but we are also able to compute all n inner products needed inthe calculation of the {X l } n l=1by using one matched filter that is fed by the receivedsignal and evaluated at the different time instances {t l } n l=1 .This finally leads to the pulse amplitude modulation (PAM) schemeX (t) = Awhere T s is the symbol duration.n∑X l φ(t − lT s ) , t ∈ R (3.37)l=1Nyquist CriterionIn the last section, we assumed the knowledge of a waveform φ(·) that is orthonormalto its time shifts by non-zero integer multiples of T s . If we think of φ(·) being thebrickwall function bb {|t| ≤ T s /2} ={1/T s if t ∈ [−T s /2,T s /2]0 else(3.38)we have such a waveform, but since the brickwall function has infinitly steep edgesit uses an infinitely large bandwidth. To be more precise, the frequency response ofa brickwall function with pulse length T s has the form:


13 3.2. Constant Frequency ModulationF {b {|t| ≤ T s /2}} =∫ ∞−∞b {|t| ≤ T s } e − i 2πft d t= 1 ∫ Ts/2e − i 2πft dtT s=−T s/2∣i 2πfte− ∣∣∣T s/2−i2πfT s−T s/2(3.39)T s= ei πfTs −e − i πfTsi 2πfT s= sin πfT sπfT s= sinc T sfsin πfwith F {·} denoting the Fourier transform and sincf =πf. This spectrum isillustrated in figure 3.3 for the academic case of a symbol duration T s of 1 second.1ˆφ(f)0.50−0.5−20 −15 −10 −5 0 5 10 15 20f [Hz]Figure 3.3: Spectrum of the brickwall function for T s = 1s.The problem of the large bandwidth usage of the brickwall functions lies in the fact,that a communication system usually has strong bandwidth restrictions. Since thebandwidth of the single pulses gets larger as the pulse duration decreases, a largebase bandwidth of the pulses together with the system’s bandwidth restriction leadsto a long necessary symbol duration T s to concentrate most of the pulse energy insideof the usable bandwidth. Thus, the data rate of the system is small comparedwith the optimal case.Even though the brickwall functions represent the functions with the sharpest spectralenergy distribution among all functions that are orthonormal to their time shiftsbut do not overlap in time, there are functions that are orthonormal to their timeshifts and do overlap in time. To find such functions, we could apply the NyquistCriterion for an arbitrary positive symbol duration T s .Let ˆφ be the spectrum of the pulse φ. The Nyquist Criterion states that if, andonly if,holds, the functions1∞∑T sj=−∞are all orthonormal to each other.∣∣ˆφ(f − j )∣ ∣∣∣2= 1 (3.40)T s{t ↦→ φ(t − lT s )} l∈Z(3.41)Thus we are looking for pulse waveforms for which the squared absolute of the


Chapter 3. Signal Processing 141shifted versions of their spectra by integer multiples ofT sadd up to a constant.This is not possible if the bandwidth of the pulses is smaller than 12T s. Thereforewe require for the pulse bandwidth W:W ≥ 1 . (3.42)2T sIn 3.42, equality is achieved for all pulse waveforms where the absolute value of thespectrum forms a brickwall function with height √ T s . That is{√∣Ts if f ∈∣ˆφ(f) ∣ =0 else[ ]− 1 12T s,2T s. (3.43)If we look at a special case of 3.43 where ˆφ(f) equals the brickwall function and wecalculate the corresponding pulse shape by applying the inverse Fourier transform˜F(ˆφ(f)) = ∫ ∞ ˆφ(f) e i 2πft d f, we get:−∞φ(t) = 1 √Tssinc( tT s)(3.44)where the calculation is done in a very similar fashion as 3.39. Figure 3.4 shows thespectrum for the case of φ(t) being the sinc function and again with T s equal to 1second.1ˆφ(f)0.50−2 −1.5 −1 −0.5 0 0.5 1 1.5 2f [Hz]Figure 3.4: Spectrum of the sinc function for T s = 1s.Since the minimal pulse bandwidth W min equals12T s, we could transmit at a symbolrate 1/T s not larger than twice the available system bandwidth as long as wewish to keep our pulses orthonormal to their time shifts. This is equal to a spectralefficiency of two symbols per Herz.If we increase the symbol rate over this barrier, we create pulses that are no longerorthonormal to their time shifts. With that, the single symbols overlap in timewhich is called intersymbol interference (ISI). Since ISI could drastically decreasethe signal-to-noise ratio, one generally tries to avoid this form of symbol overlappingas much as possible.We have seen in 3.44 that it is possible to achieve the optimal spectral efficiency oftwo symbols per Herz by using sinc-pulses. The problem with this kind of pulseslies in the fact that through the sharpness in the frequency domain they decay onlyslowly proportional to the pulse time t. This leads to longer necessary delay timesin the system to make the pulses causal and furthermore the transmission energyincreases and can even become unbounded since the different pulse shifts add up inthe time domain.If we consider again the Nyquist criterion 3.40, we could see that if the pulse bandwidthis larger than the minimal bandwidth W min and smaller than 2W min , thesquared absolute values of the time shifted pulse spectra add up to T s if the bandedgesymmetry condition


15 3.2. Constant Frequency Modulation( )∣ ∣ 1 ∣∣∣2( )∣ ∣ˆφ − f + ∣ 1 ∣∣∣22T s∣ˆφ + f = T s , 0 ≤ f ≤ 1 (3.45)2T s 2T sis fulfilled. Figure 3.5 illustrates the band-edge symmetry condition.∣ ∣∣ˆφ(f)∣ ∣∣2[Ts]10.5−1 −0.5 0 0.5 1f [ 1 T s]Figure 3.5: Pulse fulfilling the band-edge symmetry condition.Using the band-edge symmetry condition we are able to find pulse shapes with abandwidth that is larger than W min but with pulses that decay much faster in timethan the sinc-pulse do. The raised cosine family, for example, with spectra of theform⎧√ Tsif 0 ≤ |f| ≤⎪⎨1−β2T√ [ ( )]sˆφ(f) =T sπT2√1 + cos sβ|f| − 1−β2T sif 1−β2T s≤ |f| ≤ 1+β (3.46)2T s⎪⎩0 if |f| > 1+β2T swith 0 ≤ β ≤ 1 use a bandwidth of (1 + β)W min but the pulses decay like 1/t 3 forall β > 0. With that, the raised cosine pulses, which have in the time domain theformφ(t) =[2β cosπ √ T s(1 + β)π t1 −+ sin[(1−β)π t ] Ts4β tTs( ) 2, t ∈ R (3.47)4β tT sseem to be a very good choice for our communication system. In figure 3.6, the raisedcosine spectrum is plotted with a rolloff-factor β of 0.5 and the symbol duration T sequal to 1 second.T s]1ˆφ(f)0.50−2 −1.5 −1 −0.5 0 0.5 1 1.5 2f [Hz]Figure 3.6: The raised cosine spectrum with β = 0.5 and T s = 1s.3.2.3 Baseband Representation of Passband SignalsSo far, we concentrated our interest on baseband signals, that is somewhat looselyspeaking on functions with relatively low frequencies localised around 0 Hz. But


Chapter 3. Signal Processing 16in many information transfer applications including the present case, there is agiven frequency band available for the system where all the communication has totake place. In such cases, the information signal with a relatively small bandwidthsatisfying the physical or technical constraints could be viewed as being centeredaround a carrier frequency typically arranged in the middle of the usable frequencyband. We call such signals passband signals. Since only real signals could betransfered over a physical channel, we only consider real passband signals in thefollowing. In figure 3.7 the Fourier transform ˆx of an imaginary passband signal xis plotted.ˆx(f)−Carrier FrequencyfCarrier FrequencyFigure 3.7: Fourier transform of an imaginary passband signal.For real passband signals, there exists a carrier frequency independent complexbaseband representation of the passband signal which we will use in the next sectionto derive the quadrature amplitude modulation (QAM). We get this basebandrepresentation by shifting the passband spectrum to the left until the positive signalfrequencies are centered around 0 Herz and then lowpass filtering the resultingfunction with half the passband bandwidth as cutoff frequency. This comes fromthe fact that only the positive frequencies are considered in the bandwidth determinationof baseband or passband signals, thus a passband signal has twice thebandwidth of its baseband representation. Using the property, that a shift of f c inthe frequency domain is equal to the multiplication of a signal with e − i 2πfct in thetime domain, we get for the baseband representation x BB of a passband signal x PBx BB = [ x PB (t)e − i 2πfct] ∗ LPF W/2 (3.48)with LPF W/2 the impulse response of an ideal lowpass filter with cutoff frequencyW/2. If we split the baseband representation of a real passband signal into its realand imaginary part, we get the so called in-phase component corresponding to thereal and the so called quadrature component corresponding to the imaginary part:Re(x BB ) = [x PB (t)cos 2πf c t] ∗ LPF W/2 (3.49)Im(x BB ) = [−x PB (t)sin 2πf c t] ∗ LPF W/2 . (3.50)On the other hand, we could think of the passband signal having a spectrum persistingof a f c -shifted version of the baseband signal together with its complexconjugate mirror image. This comes from the fact that in spectra of real signals thenegative frequency parts are always the mirrored complex conjugate versions of thepositive frequency parts. This leads to the following representation of the passbandspectrum:ˆx PB (f) = ˆx BB (f − f c ) + ˆx ∗ BB(−f − f c ), f ∈ R. (3.51)With that, we get in the time domain


17 3.2. Constant Frequency Modulationˆx PB (t) = ˜F {ˆx BB (f − f c ) + ˆx ∗ BB(−f − f c )}= x BB (t)e i 2πfct +x ∗ BB(t)e i 2πfct= 2Re [ x BB (t)e i 2πfct] , t ∈ R(3.52)where we used some properties of the inverse Fourier transform.With equations 3.52 and 3.48 we have the possibility to switch between the basebandand passband representation of the signal. Since these are very importantoperations, a block-diagram illustrating the upmodulation to passband and thesubsequent downmodulation to baseband is presented in figure 3.8.Re[x BB ]Im [x BB ]×cos 2πf c t90 ◦×+x PB×cos 2πf c t90 ◦×LPF W/2LPF W/2Re[x BB ]Im [x BB ]Figure 3.8: Upmodulation to passband and subsequent downmodulation to baseband.3.2.4 QAM SignalingHaving the PAM modulation scheme and the baseband representation of passbandsignals in mind, it seems to be a natural approach to combine this two schemes totransmit information over a system with limitations on the usable frequency band.And indeed, if we think of the baseband representation as being a stochastic processof the formX BB (t) = An∑C l φ(t − lT s ) (3.53)l=1where the pulse shape φ(·) is orthonormal to all its time shifts by non-zero integermultiples of T s and the C l are complex symbols to be transmitted, we find thepassband stochastic process X PB (t) to beX PB (t) = 2Re [ X BB (t)e i 2πfct][]n∑= 2Re A C l φ(t − lT s )e i 2πfctl=1l=1n∑n∑= 2A Re(C l )φ(t − lT s )cos 2πf c t − 2A Im(C l )φ(t − lT s )sin 2πf c tl=1.(3.54)


Chapter 3. Signal Processing 18The scheme presented in 3.54 is called quadrature amplitude modulation (QAM)and could be viewed as two independent PAM operations carried out on the realand imaginary part of the complex symbols {C l } n l=1with the result then beingmapped to passband. It can be shown that the functions φ(t − lT s )cos 2πf c t andφ(t − lT s )sin 2πf c t are orthogonal to each other, thus we produce no intersymbolinterference by applying the QAM scheme.On receiver side, the real and complex part of the symbols {C l } n l=1could be obtainedby using the procedure presented on the right-hand side of figure 3.8 andthen applying a matched filter sampled at the proper time instances.We found in our studies of PAM signals, that a spectral efficiency of two real symbolsper Herz is possible by using sinc-functions as pulse waveforms. Since the upmodulationto passband doubles the signal bandwidth, our spectral efficiency is halfed.But as we are able to transmit one complex symbol equal to two real symbols perchannel use in the QAM scheme, we regain the original spectral efficiency of tworeal symbols per Herz and thus are happy with this modulation scheme.3.2.5 Phase Shift KeyingNow lets take a closer look on the symbols {C l } n l=1used in the QAM scheme. Sincethese complex numbers could be represented by the formula C l = R l e i 2πΦ l,l ∈{1, · · · ,n}, with R l the absolute value of the complex number and Φ l its argument,we could differentiate the two cases where R l changes its magnitude and where itis constant for all symbols. While the former case leads to a bit mapping withchanging amplitude and phase and is often called a QAM mapping, the later caseonly modulates the carrier phase and is called phase shift keying (PSK). Eventhough in many cases higher signal vector distances - the distance between twosymbols - could be achieved using a QAM mapping, in the present work phaseshift keying is used. The reason for this lies in the necessity in the QAM mappingcase to keep track of the signal amplitude, which is generally a hard task in acousticunderwater applications. Thus PSK presents the simpler and more robust approach.In figure 3.9 a PSK alphabet containing three symbols is presented, where thesymbols have arguments Φ l ∈ { 0, 2π 3 , 4π 3}.Re(C l )Im(C l )Figure 3.9: PSK symbols for 3-PSK.Non-coherent and coherent Phase Shift KeyingThere are basically two ways PSK can be implemented. In the first case, the receiverhas no idea about the phase of the carrier signal which is called non-coherent PSK.


19 3.2. Constant Frequency ModulationIn the second case, the receiver is a proud owner of a local oscillator or a similarmechanism which enables him to keep track of the signal carrier phase. In this casewe speak of coherent PSK.Differential Binary Phase Shift KeyingThe simplest method one could think of concerning PSK is despite its long namethe non-coherent differential binary phase shift keying (DBPSK). Since this methodis non-coherent, the receiver is not able to determine the phase of a symbol but hasto observe the phase change between two symbols to decide about what symbol hasbeen transmitted. This raises some constraints on the bit-to-symbol coding. Thereare many differential PSK mappings, but this section solely treats the binary case -that is, the case where there are exactly two different symbols c 0 and c 1 separatedby a phase difference of π. For this case, the bit-to-symbol coding could be done inthe following way:If C l−1 stands for the previously transmitted symbol and C l is the symbol that thetransmitter is willing to transmit, the DBPSK method sets C l = C l−1 if the actualbit is 0. However, if the actual bit is 1, then the method sets C l = C l−1 e i π , that is,the symbol to be transmitted is the previous symbol phase shifted by π. Using thisscheme, the receiver could always guess the transmitted bit without further codingmethods and bit error propagation is avoided.The main disadvantage of all non-coherent communication schemes and thus alsoof the DBPSK method lies in the fact that there is no absolute phase reference onthe receiver side but that the receiver has to use the previous received symbol asreference. Since this symbol is distorted by noise, it can be shown that the overallsignal-to-noise ratio of a non-coherent system is decreased by 3dB compared withthe same system using a coherent receiver. Nevertheless, DBPSK is a good startingpoint while developping a communication system since it is remarkably easier toimplement compared with other methods.M-ary Phase Shift KeyingThe decreased signal-to-noise ratio of the non-coherent differential PSK systemsleads to the coherent M-ary PSK receiver. Here, the transmitter maps bit-blocksof some length to one of M symbols as illustrated before in figure 3.9 for the caseof M = 3. Since the receiver is coherent, he divides the phase space [0,2π] into Mequally sized bins and estimates the received symbol by selecting the one that isclosest to the received phase.Carrier Recovery for coherent M-PSK SystemsIn coherent systems, a mechanism has to be provided that enables the receiver tokeep track of the received signal carrier phase. Often the passband to basebanddemodulation is done using analog electronics. In such cases the carrier recoveryhas also to be done analogously with for example a Costas Loop [10]. In the presentsystem, however, to keep the system design flexible, most of the signal processingincluding the passband to baseband demodulation is done digitally. With that, thecarrier recovery for M-ary PSK could be conducted by concluding that if we takethe incoming passband signal that is roughly oscillating at the carrier frequency f c ,increase its frequency by a factor of M and bandpass filter it with a very sharp filteraround M × f c , we get a clean, modulation free oscillation at M times the carrierfrequency that is in phase with the received signal. This could be seen by lookingat the symbol alphabet { c m = r m e i 2πm/M} M−1m=0 :


Chapter 3. Signal Processing 20If the frequency of the passband signal is increased by a factor of M, the symbolphases become {Arg(c m ) = 2πm} M−1m=0which are all multiples of 2π. Since theargument of a complex number is 2π-periodic, this is equal to all symbols havinga phase of 0 rad. Thus the phase modulation is removed. If we divide now theobtained signal by the same factor M, we have computed the signal carrier out ofthe passband signal. In figure 3.10, where ↑ and ↓ means frequency multiplicationand frequency division respectively and BPF |f−fc| < ∆ is an ideal bandpass filteraround f c with bandwidth 2∆, this carrier recovery procedure is illustrated.X PB (t) ↑ M BPF |f−fc| < ∆ ↓ M CarrierFigure 3.10: Carrier recovery for M-ary PSK.3.3 S2C ModulationThe biggest difficulty one observes when trying to implement an acoustic underwatercommunication system is the multipath propagation of the acoustic waves. Sincethe speed of sound in water of about 1500 m/s leads to path delays that are usuallymuch larger than the period lengths of the involved signals, the different pathscould be viewed as having an equally distributed random phase shift θ ∈ [0,2π]compared with each other. With the different path signals adding up at the receiverhydrophone, no phase information could be gained out of the received signal ifno additional signal processing is used to fight the multipath propagation. Onepossibility to face the multipath problem lies in the usage of sweep spread carrier(S2C) signals [9].3.3.1 Fighting Multipath Propagation using S2C CarrierThe S2C modulation equals the multiplication of a signal with the S2C carrier. Itcould be viewed as a complex baseband signal being QAM modulated as describedin section 3.2 but with a different carrier signal than just e i 2πfct . In the S2C case,we havewith the S2C carrier c S2C (t) given byX PB (t) = 2Re [X BB (t)c S2C (t)] (3.55)c S2C (t) = e i 2π [f l(t−⌊ tTsw ⌋Tsw)+ς(t−⌊ tTsw ⌋Tsw)2] , t ∈ R (3.56)where T sw is the sweep duration, ς = f h−f lT swis the sweep steepness, f l and f h denotethe lowest and highest S2C carrier frequencies and ⌊·⌋ means rounding ( ⌊to the ⌋ next )tlower integer. If we look at the argument of c S2C (t) divided by 2π t −T swT swto get something called the instantaneous frequency of the carrier, we see how theS2C carrier basically works. We get( ⌊ ⌋ )Arg [c S2C (t)]t( ⌊ ) = f l + ς t − T sw , t ∈ R. (3.57)t2π t − T T sw swT sw⌋Plotting 3.57 against the time t, we see that the instantaneous frequency forms asawtooth function, thus a complex baseband signal forms after multiplication withthe complex S2C ( carrier ⌊ a signal that has a frequency varying linearly with thetperiodic time t − T sw). This is shown in figure 3.11.T sw⌋


21 3.3. S2C Modulationf hfinstf lT swtFigure 3.11: Instantaneous frequency of the S2C carrier.With that, we can view the S2C modulation as a modulation with a carrier of constantfrequency e i 2πf lt as used in the case of systems with no multipath propagationfollowed by the modulation on a linearly varying frequency carrier e i 2πfvar(t)t wheref var (t) denotes the varying frequency.Now we consider the consequences of a S2C modulated signal arriving at the receiver:We assume that all the different transmitter-receiver paths have their own distinctpath delay. Furthermore, we presume the system being properly designed, whichmeans in the S2C case that the sweep time T sw is selected in a way that it is largerthan the channel delay spread. That is, the sweep time T sw has to be larger than thedelay difference between the longest and the shortest path. If this is the case, everysingle path signal arriving at the receiver is located on its own instant frequency,thus we are able to identify the different path arrivals in the frequency domain.Now we apply the procedure described on the right-hand-side of figure 3.8 using theS2C carrier synchronised on the main multipath arrival (the transmitter-receiverpath containing the most energy) instead of the constant frequency carrier to getthe baseband representation of the received signal. In the S2C case, this procedureis called despreading of the received signal. But we still have the problem that thissignal is heavily distorted by the different multipaths, thus we have to filter out alldistorting path arrivals before we are able to estimate the transmitted symbol usinga matched filter. This is the point where the S2C carrier plays its most importantrole. We already stated that every single multipath arrival has its own frequencysweep at the receiver with the different sweeps separated by some amount of Herzcorresponding to the relative path delays. After despreading, the sweeps disappearand the different arrivals are now all on their own constant frequency with the mainmultipath arrival situated at 0 Hz. Thus if we apply a lowpass filter with a cutofffrequency that is smaller than the minimal frequency difference ∆f min of two pathsminus half the pulse bandwidth, we filter out all distorting multipaths and isolatethe interesting main energy arrival. With that, we transformed our communicationsystem from a multipath system to a single path system that is much easier tohandle and significantly more robust. The multipath arrivals and their despreadrepresentation is visualised in figures 3.12 and 3.13.


f 2f 3Chapter 3. Signal Processing 22f hff lT swtFigure 3.12: Four multipath sweeps arriving at the receiver.T swff 10tFigure 3.13: The main and three side multipaths after despreading.3.3.2 Coherent S2C ReceiptionBefore the present work, only non-coherent S2C systems were implemented. Thismay come from the difficulties involved with recovering a carrier of varying frequencyand the need for additional, very precise synchronisation methods to keepthe S2C despreading synchronous with the main energy arrival. In the presentproject, however, a trick was used to avoid the necessity of recovering carriers withunconstant frequencies even when using a coherent receiver. This trick is motivatedby viewing the modulation not as one but as a two stage operation: The first stageresponsible for modulating the signal on a carrier with constant frequency f if andthe second stage implementing the S2C modulation. On the receiver side, first thedespreading of the received signal is done non-coherently and then the carrier recoveryis conducted using the resulting constant frequency passband signal. With


23 3.3. S2C Modulationthat, we get a complex baseband signal that can be coherently decoded.The second problem involved with coherent S2C systems - the synchronisation -can be solved by using a precise measurement of the frequency the recovered carrierhas. Since the despreading leads to a shift of this frequency whenever the receiveris not perfectly synchronous to the transmitter, small deviations of the carrier frequencymeasurement could be used to resynchronise the system. This procedure isdescribed in detail in section 4.2.4.3.3.3 The Chirp Transform - A new View on S2C SignalsThe chirp transform is a generalisation of the Fourier transform to signals withchanging frequencies (“Chirp signals” ). After [11], it is given bytogether with its inverseˆx ψ (f) = 1T sw∫ Tswx(t) =∞∑0k=−∞ψ ′ (t)x(t)e i 2πfψ(t) dt (3.58)ˆx ψ ( kT sw)e i 2π kTsw ψ(t) . (3.59)Here, the function ψ(t) is a warping time function defined in the interval [0,T sw ]with the following properties:• It increases monotonically in [0,T sw ].• Its derivative ψ ′ (t) is continuous in [0,T sw ].• ψ(0) = 0 and ψ(T sw ) = T sw .At this point, a new view of the S2C signals is suggested by considering basebandsignals in the frequency domain. If we set the time warping function toψ(t) = [1 + ς(t − T sw )]t,t ∈ R, (3.60)we have linearly frequency-modulated sinusoids with modulation steepness ς in thetransform 3.58. Thus we could think of the chirp transform with a ψ(t) as in 3.60as being a mapping from a domain we call S2C domain to the frequency domain.On the other hand, the inverse chirp transform could represent in this case themapping from the frequency domain into the S2C domain. Therefore, the wholeS2C modulation could be represented using the chirp transform and its inverse.This becomes useful when we wish to determine error probabilities in our communicationsystem. [12] presented a way of how phase error limits in a S2C systemcould be estimated without being able of giving an analytical solution to the problem.The author thinks that using the chirp transformation, at least in the case ofan additive white gaussian noise (AWGN) channel with a BPSK or QPSK mappingan analytical expression for the symbol error probability could be found. This ismotivated as follows:Since the symbol error probability of BPSK and QPSK in an AWGN channel for agiven signal-to-noise ratio (SNR) is well-known, the main problem lies on one sidein the proof that the channel could still be viewed as being AWGN while workingwith S2C signals. And if the channel could be shown to be still AWGN, the seconddificulty lies in the determination of the receiver noise variance to compute the SNR.Both problems seem to be solvable using the chirp transform.If we think of x(t) being the transmitted signal with x(t) the output of the inverse


Chapter 3. Signal Processing 24chirp transform 3.59, then we receive at the other end of an AWGN channel thesignal˜x(t) = x(t) + n(t) (3.61)where n(t) is a sample function of a zero-mean gaussian noise process with varianceσ 2 n. In a S2C system, the function ˜x(t) is now fed the chirp transform 3.58to compute the despread signal. Thus we have to investigate, how the despreadinginfluences the noise process.The Wiener-Khinchin theorem states that the power spectral density of a widesensestationary random process - as white gaussian noise is - is given by the fouriertransform of its autocorrelation function. Thus it lies near to think of the powerspectral density of a noise process that undergoes the S2C despreading operationto be the chirp transformation of its autocorrelation function. Since the autocorrelationfunction of a noise process equalsr nn (τ) = σ2 nδ(τ) (3.62)2where δ(τ) is the dirac delta distribution, we get the chirp transform of the noiseautocorrelation function asPSD {n} (f) = 1T sw∫ Tsw0ψ ′ (τ)r nn (τ)e i 2πfψ(τ) dτ= 1 ∫ Tsw[1 + ς(τ − T sw ) + ςτ] σ2 nT sw 02 δ(τ)ei 2πf[1+ς(τ−Tsw)]τ dτ= σ2 n21 − ςT swT sw(3.63)where we used ψ(τ) = [1 + ς(τ − T sw )]τ and ∫ ∞f(τ)δ(τ)dτ = f(0).−∞If this result is true, we have shown two very important things:1. The despread noise process is still white since its power spectral density isconstant. Thus we still have additive white gaussian noise.2. The noise PSD is decreased through the despreading by a factor of 1−ςTswT swsince the PSD of the AWGN noise in the channel is σ2 n2.Using this results, one would be able to give an analytical expression of the symbolerror probability in BPSK and QPSK systems. But as this whole section is basedon assumptions, we are far away from having proved anything. A further analysisof the correctness of the above statements is necessary that would break the scopeof the present project. Thus this section should be viewed as a proposal for furtherwork on this topic.3.4 FiltersThere is nearly no signal processing that does not involve filtering and the presentcommunication system is no exception. There exist two basic forms of filters, thefinite impulse response (FIR) and the infinite impulse response (IIR) filters. Whilethe former use coefficient vectors that are convolved with the signal of interest, thelatter are the digital counterpart to analog filters and are implemented using morecomplex block structures.


25 3.4. FiltersBut despite of the differences between the two filter types, the important filter parametersremain the same. Besides the obvious parameter, the magnitude frequencyresponse that shows how amplitudes of different frequencies are attenuated by thefilter, two a little less obvious parameters are the phase and group delay describedin the next section.3.4.1 Phase and Group DelayIf we look at a quasi-sinusoidal signal s(t) - a signal with slow changing amplitude -described by s(t) = A(t)sin (2πft + θ) that is fed to a filter with impulse responseh(t), we get as the filter output y(t)y(t) =∣∣ĥ(f) ∣ ∣∣ A(t − τg )sin [2πf(t − τ φ ) + θ] (3.64)∣∣ ∣∣where ∣ĥ(f) is the mentioned magnitude response and τg and τ φ are the filter’sgroup and phase delay. Thus, the group delay could be seen as delaying the datasignal, while the phase delay shifts the carrier phase.Since both goup delay and phase delay could depend on the sinusiodal’s frequency,they could heavily distort the signal if a system is designed without taking care ofthese values.3.4.2 FIR FilterAs mentioned, a fir filter is implemented using a coefficient vector h[·]. Often, thecoefficients of h[·] are found by using the window method, that is, one firstly computesthe impulse response of the ideal filter he needs and then applies a window ofsome shape on it to get a finite number of cefficients. Examples of windows are therectangle (brickwall) window and the raised cosine window, which have both beanmentioned before in this <strong>report</strong>.All FIR filter used in the present work are computed by employing the windowmethod.FIR filters are usually less powerful compared with IIR filters, but there are twoadvantages they have which make them useful or even necessary in some situations:• Group and phase delay:The largest advantage FIR filters have compared with IIR filters is that theyhave a constant group delay and a linear phase delay. With that, there is nosignal distortion caused by variations of these parameters over the frequency.• Stability:FIR filters are always stable.3.4.3 IIR FilterIIR filters are implemented using a combination of multiplicative coefficients anddelay elements. There are different structures the same IIR filter can be represented,which have all their separate advantages and disadvantages. Thoughoutthis work, cascaded second order structure (SOS) filters in the direct form II areused. These filters persist of a specific number of cascaded sections that all havethe form presented in figure 3.14 with 1 f sdenoting a delay by one sample.


Chapter 3. Signal Processing 26α 0s(t) + × + y(t)−β 11f sα 1+ × × +−β 21f sα 2+ × × +Figure 3.14: IIR direct form II second order structure.


Chapter 4The Communication SystemIn this chapter, the design of communication system based on the insights found inthe signal processing part of this <strong>report</strong> is presented.4.1 System StructureThere are basically two communication system structures developed during thepresent project, where the first structure - based on DBPSK - could be viewed asa starting point implementation being less robust and lacking of a synchronisationprocedure during the information transfer. The second structure, however, beingmore robust and powerful in terms of the possible data-rate is near to a final systemdesign. Throughout this section, the initial synchronisation described in 4.2 isassumed to be carried-out successfully.4.1.1 DBPSKThe differential binary phase shift keying (DBPSK) structure is given by the blockdiagrams presented in figures 4.1 and 4.2.φ(· − Ts)2Re [c S2C (·)]b l b l XOR b l−11 → s NRZ (t) = +10 → s NRZ (t) = −1× ×UWAChannelFigure 4.1: DBPSK system transmitter structure.27


Chapter 4. The Communication System 28Re[c S2C (·)]T s×∫ Ts0...dt ×UWAChannel+ ≷ 0 ˆbl×∫ Ts0...dt ×Im [c S2C (·)]T sFigure 4.2: DBPSK system receiver structure.The transmitter starts with comparing the next bit to be transmitted b i with thelast transmitted bit b i−1 by using the XOR rule. This leads to a so called differentialencoding which allows the system to decouple the bits even if they are coupled bythe differential modulation. Therefore, the arriving bits on the receiver side do notdepend on each other and hence a bit error is not propagated through the bits. Afterthe bit is differentially encoded, it is modulated by a non-return-to-zero (NRZ)modulator which simply produces a function s NRZ (t) equal to one if the block isfed by 1 and equal to -1 if it is fed by 0. This procedure could be regarded as thebit-to-symbol mapping described in chapter 3.The signal s NRZ (t) is then multiplied with a time delayed version of the appliedPAM pulse, where the time delay Ts2is used to have a causal signal. The result isa baseband PAM signal, which is upmodulated on the S2C carrier to get the finaltransmitted waveform fed to the channel. In the present system, despite of theirsuboptimality, brickwall pulses were used as PAM waveforms due to the simplicityin their implementation.On the receiver side, the signal processing begins with receiving the signal fromthe channel. The received signal is then despread using the in-phase and quadraturecomponents of the S2C carrier. But despite of the despreading operation, wedon’t have a baseband signal as output of this operation since we didn’t lowpassfilter the result. This is implicitly done by the subsequent matched filtering, whichidentifies the pulse waveform inside of the despread signal and filters out the harmonicsof the S2C carrier.At this point, the output of the in-phase and quadrature branch could be viewed asforming a complex number with its argument being the received phase. Since wewish to compare this phase with the previous value, both branches are multipliedwith their past values and then added up. If the resulting value is larger than zero,we have no phase shift between the two received symbols and the estimated bit ˆb iis equal to 0. In the other case, we assume that a phase shift of π has occured andthus our bit estimation ˆb i is set to 1.


29 4.1. System Structure4.1.2 M-ary PSKAs the block diagrams 4.3 and 4.4 suggest, things are slightly more complicated inthe case of coherent M-PSK compared with the non-coherent DBPSK.φ(· − Ts)2Re [c S2C (·)]Re(·) × ×b l b l → C l +UWAChannelIm(·) × ×φ(· − Ts)2−Im [c S2C (·)]Figure 4.3: M-PSK system transmitter structure.Re[c S2C,fif (·)] ×∫ Ts0...dtUWACh.× BPFCarrierRec.AdaptTimingĈ l → ˆb lˆbl90 ◦×∫ Ts0...dtFigure 4.4: M-PSK system receiver structure.The first step the transmitter untertakes involves the mapping of the incoming bitvector b l of size log 2 M to one of the M complex symbols with unit absolute valueand phases that differe by an amount of 2π M. Then, the real and imaginary partof the complex symbol are independently PAM modulated with the delayed causalpulse waveform φ(· − Ts2). Now, the branch corresponding to the real part of thesymbol to be transmitted is multiplied with Re[c S2C (t)] = Acos [2πf S2C (t)t] andthe branch corresponding to the imaginary part of the same symbol is multipliedby −Im[c S2C (t)] = −Asin [2πf S2C (t)t]. These to branches are subsequently addedup to form the signal that is fed to the channel.


Chapter 4. The Communication System 30The receiver begins with despreading the received signal by multiplying it withthe real part of the S2C carrier Re[c S2C,fif (·)] that has a frequency sweep that is avalue of f if higher compared with the transmitted S2C sweep. If the receiver is synchronisedwith the transmitter, the despreading mirrors the received signal on oneside onto the constant carrier frequency f if and on the other side into the frequencyband [f if + 2f l ,f if + 2f h ] where f l and f h are the lowest and highest frequencies ofthe transmitted sweep. Since we are only interested in the signal around f if andfurthermore wish to filter out all side-multipaths, a bandpass filter is applied onthe despread signal with the passband around f if limited to a bandwidth whichis smaller than the smallest possible frequency difference between two multipaths.This ensures that no side-multipath interferes with the main energy arrival. Thus,this bandpass filter needs to be pretty narrow, which produces in the case of an IIRfilter large group-delay differences inside of the filter’s passband that would distortthe information signal. Therefore, despite of its smaller performance, a high orderFIR filter with constant group delay is applied at this point. Figure 4.5 shows theimpulse response of such a FIR bandpass filter for the case of f if = 10kHz and aminimal frequency difference between two multipath arrivals of 1kHz.After the signal is despread and bandpass filtered, it is fed to the carrier recoveryblock which computes a clean carrier signal with the PAM modulation removed outof the incoming information signal. The carrier recovery is described in detail inthe next section.The recovered carrier signal is used in two completely different procedures: On oneside, together with the two matched filters, its once unshifted and a second time90 ◦ -shifted version multiplied with the despread and bandpass filtered informationsignal produces the real and imaginary part of the symbol estimation Ĉl. Andon the other side, it enables a continuous synchronisation during the informationtransfer as it is described in section 4.2.4.In the end, after the symbol estimation Ĉl is computed, the symbol is unmappedto its corresponding bit vector b l .0−20Magnitude [dB]−40−60−80−1000 20 40 60 80 100 120Frequency [kHz]Figure 4.5: Magnitude frequency response of a rectangle window FIR bandpassfilter of order 1000 with cutoff frequencies 9.5kHz and 10.5kHz.Carrier RecoveryThe carrier recovery for M-PSK is basically a three part operation consisting of anupmodulation of the signal to M times its carrier frequency, followed by a narrowbandpass filter and then the downmodulation of the signal back to its original carrier


31 4.1. System Structurefrequency.The present system is designated to work with up to 8-PSK and since the 8-PSKrecovery produces better results also for 4-PSK and 2-PSK, the procedure describedin the following matched to 8-PSK is the one always employed.Asin x × × ×ABPF 8cos (8x)128Figure 4.6: Upmodulation to eight times the carrier frequency and bandpass filtering.The first two parts of the carrier recovery are visualised in figure 4.6. The incomingsignal, here represented by the sinusoidal Asin x, is multplied three times with itselfto produceA 8[35 − 52cos(2x) + 22cos(4x) − 4cos(6x) + cos(8x)] (4.1)128where we used the identity sin 2 x = 1 2[1 − cos(2x)]. Now, a very narrow bandpassfilter around 8 × f if is applied to filter out the harmonics at 0,2,4 and 6 timesthe base frequency and at the same time to eliminate signal distortions caused bythe PAM modulation. In the present system, a constant carrier frequency f if of10kHz is used together with a bandpass filter around 80kHz with a bandwidth of800Hz. This narrow bandwidth is sufficient to filter out the PAM distortions butstill allows the carrier frequency to vary by 50Hz around f if , which will be used inthe synchronisation procedure.After the bandpass filter is applied, our sinusoidal signal is transformed to a signalvery near (or even equal in the case of an ideal bandpass filter) toA 8cos(8x). (4.2)128Now, this signal needs to be downmodulated back to f if . This is described in thetwo following block diagrams 4.7 and 4.8.2 2× LPF ×√· ×√·A 48A 8128 cos (8x) Delay+τ g,LPF√·|sin (·)|↓sin (·)A 48cos (4x)Figure 4.7: First frequency division.The frequency division is basically done by using the identity√1 + cos x(∣ x)∣ ∣∣= ∣cos(4.3)2 2


Chapter 4. The Communication System 32and by mirroring ∣ ( cos x ∣2)∣to its negative counterpart for allx2mod 2π ∈ [π,2π].But there are some difficulties involved with doing this.First, since we wish to frequency divide A8128cos (8x) by calculating√A 4A 88 |cos(4x)| = 64 + A864cos (8x), (4.4)2we need to know the value A 8 128. This could be calculated by squaring A8128 cos(8x),lowpass filtering the result, multiplying it by a factor of 2 and then taking the squareroot. This equals{ [ ] } √√ A8 2 { }A 2128 cos(8x) 16[1 + cos(16x)]∗ LPF = 2128 2 ∗ LPF2√A16(4.5)=128 2= A8128with LPF the impulse response of an ideal lowpass filter.In the present system, a lowpass filter as presented in figure 4.10 was used. Aproblem that comes with this approach is caused by the group delay of the involvedlowpass filter. Due to this group delay, the calculated value A8128is always delayedcompared with A8128cos (8x) and we don’t get the correct frequency division result.But as visible in figure 4.11, the group delay in the present case for values of verylow frequency like A8A8128is around 11 samples. Thus, if we delay128cos (8x) by these11 samples, our frequency division works.As the last step in the first frequency division of A8 cos (8x), we need to computeA 48A 48A4cos(4x) out of8|cos(4x)|. This is done by stating that the lowest values of|cos(4x)|, the quasi-zeros which we will use to identify the points where thecos(4x) sign changes, are nearly a constant value of samples apart. Therefore theassumption is made, that as seen from an actual quasi-zero the next next quasi zerohas to lie on one of three samples that are an estimated value of the carrier’s halfperiod away from the actual quasi-zero. Then, the lowest value of the three selectedsamples is chosen to be the next sign change point. With that, the first frequencydivision is completed.1282A 48×√·A 48 cos (4x) + √·|sin (·)|↓sin (·)+-√·|sin (·)|↓sin (·)Asin xFigure 4.8: Second and third frequency division.At this point, most of the brain work is done and the only thing that remains isto repeat the frequency division twice after the first division is completed. Sincewe already have a branch that contains a constant function of the amplitude, we


33 4.1. System Structureneed not to do the lowpass filtering again but we can just calculate the next neededamplitude value by doubling the last value and then taking the square root. Onelast thing to state is that during the last frequency division, we didn’t make use of√1+cos x2= ∣ ( cos x2same sinusoidal at the end as is fed to the carrier recovery at the beginning.)∣ ∣ but we used√1−cos x2= ∣ ∣ sin( x2)∣ ∣ instead. This is to have theMagnitude [dB]0−20−40−60−80−100−120−140−160−1800 20 40 60 80 100 120Frequency [kHz]Figure 4.9: Magnitude frequency response of a sixth order elliptic bandpass filterwith cutoff frequencies 79.6kHz and 80.4kHz.Magnitude [dB]0−10−20−30−40−50−60−70−80−900 20 40 60 80 100 120Frequency [kHz]Figure 4.10: Magnitude frequency response of a second order butterworth lowpassfilter with cutoff frequency 5kHz.


Chapter 4. The Communication System 34Group delay [Samples]141210864200 20 40 60 80 100 120Frequency [kHz]Figure 4.11: Group delay of a second order butterworth lowpass filter with cutofffrequency 5kHz.4.2 SynchronisationOne of the most important tasks in the communication system is the synchronisationbetween the transmitter and the receiver. If the synchronisation fails, nocommunication at all would be possible.The synchronisation is divided into three parts:1. First, the receiver has to detect that the transmitter is willing to start atransmission. The receiver has therefore to be provided with a mechnism thatallows him to detect a signal in the channel.2. Secondly, after the receiver has detected a signal, he has to make an initialsynchronisation in order to start the signal receiption in a proper fashion.3. And as a third step, during the receiption, the receiver has to make sure thatthe synchronisation is not lost.But before the single synchronisation steps are considered, a filter that is extremelyimportant in the connection establishment between transmitter and receiver is presented.4.2.1 Filter for Signal Detection and initial SynchronisationSince all the signals involved in the communication lie in the frequency region above30 kHz and at the same time most of the channel noise is concentrated in the audiblefrequency range below 20 kHz, it makes sense to filter out as much of the signalparts below 30 kHz as possible during all steps of the signal detection and initialsynchronisation. This is done by using a sixth order butterworth highpass filterwith a cutoff frequency of 28 kHz. In figure 4.12 the computed magnitude frequencyresponse of the filter (blue) together with the ideal filter response (red) is plotted.


35 4.2. Synchronisation100−10Magnitude [dB]−20−30−40−50−60−70−800 20 40 60 80 100 120Frequency [kHz]Figure 4.12: Magnitude frequency response of a sixth order butterworth bandpassfilter with cutoff frequency 28 kHz.4.2.2 Signal DetectionIn the beginning of a transmission, the transmitter sends a preamble signal thatenables the receiver to detect that soon a transmission will start and at the sametime makes an initial synchronisation between transmitter and receiver possible.Thus, as a first step, the receiver has to constantly sense the channel to detect thepreamble signal as soon as it is transmitted.The detection of the preamble is conducted by measuring the signal energy in thechannel over a period of N d timesteps, with one timestep being one sample thereceiver takes from the channel. The measured energy is then compared with aprecomputed barrier and if it is above this barrier, the receiver decides that a signalis in the channel and thus proceeds with the further synchronisation steps. Butin order to define a proper barrier, the receiver must first measure the backgroundnoise in the channel.Noise MeasurementThe noise in the channel is characterised by the variance of the samples taken fromthe channel while no signal is present. The transmitter is therefore only allowedto begin its transmission after the receiver has conducted the noise measurement.This is ensured by an initial delay on the transmitter side.While measuring the noise, the receiver collects a large amount N n of samples characterisedby the random variables S i ,i ∈ {1,...,N n } and continuously computesandE[S] = 1 ∑N nS i (4.6)N ni=1E[S 2 ] = 1 ∑N nSi 2 . (4.7)N nBy the continuous computation of these two values it is avoided that we have tostore all N n samples which would overextend by far the memory capabilities of thereceiver.At the end, we have a very good approximation of the values E[S] and E[S 2 ] andwith that we are able to compute the empirical variance asi=1


Chapter 4. The Communication System 36Var e [S] = E[S 2 ] − E[S] 2 . (4.8)Barrier ComputationNow we need to compute a barrier b s out of the measured noise variance Var e [S]that minimises the overshoot probability p o of the channel noise producing a signalenergy that is larger than this barrier.We havep o = Pr[Nd]∑Si 2 ≥ b si=1(4.9)where N d is the number of samples taken to compute the energy in the channeland S i ,i ∈ {1,...,N d } are again the random variables corresponding to the singlesamples. We assume that the S i ,i ∈ {1,...,N d } are pairwise independent zeromeangaussian distributed with the variance σ 2 n equal to the previously computedempirical noise variance 4.8. That isS i ∼1√2πσ2 ne −s2 i /(2σ2 n ) ,i ∈ {1,...,N d } . (4.10)Therefore, we have to compute the distribution of ∑ N di=1 S2 i to be able to select abarrier with a very low probability that ∑ N di=1 S2 i overshoots it.As a first step, we state thate the distribution of the Si 2,i ∈ {1,...,N d} isS 2 i ∼{ 1 √2πσ2n s ie −si/(2σ2 n ) if s i ≥ 00 otherwise . (4.11)This is equal to the Γ-distribution with k = 1 2 and θ = 2σ2 nΓ(s i ;k,θ) = s k−1ie −si/θθ k Γ(k) . (4.12)Since the S 2 i ,i ∈ {1,...,N d} are independent and identical distributed (i.i.d) andfor sums of i.i.d Γ-distributed random variables Z ∼ Γ(k z ,θ z )holds, we get(n∑ n)∑Z i ∼ Γ k z ,θ zi=1i=1( )∑N d∑N dSi 2 ∼ Γ s i ; k,θi=1Now the probability p o can be computed aswherep o = Pr[Nd∑i=1(4.13)i=1(= Γ s i ; N ) . (4.14)d2 ,2σ2 n] ∫ bs(Si 2 ≥ b s = 1 − Γ s; N )d−∞ 2 ,2σ2 n d s (4.15)


37 4.2. Synchronisation∫ bs−∞((Γ s; N ) γNdd2,2 ,2σ2 n ds =)b s2σn2Γ ( N d2) (4.16)with γ(·, ·) the lower incomplete gamma function.At this point we have an analytical expression for the overshoot probability, butone that is very difficult to evaluate on a DSP. To circumvent this problem, wecan make use of another property of Γ distributions, the scaling property. Thisproperty states that if a random variable Z is Γ distributed, then αZ,α ∈ R + isalso Γ distributed but with the θ value scaled by α. That is for Z ∼ Γ(k z ,θ z ) wehaveαZ ∼ Γ(k z ,αθ z ) ,α ∈ R + . (4.17)Since the S i ,i ∈ {1,...,N d } are gaussian random variables, we find a slightlydifferent representation of the sum ∑ N di=1 S2 i in stating that∑N d∑N dSi 2 = σn2 Ni 2 (4.18)i=1where the N i ,i ∈ {1,...,N d } are standard normal distributed random variables.By taking 4.16 into consideration, we could therefore conclude that computing abarrier b s for an arbitrary noise variance σ 2 n is equal to compute a barrier b 0 forstandard normal distributed random variables and then setting b s = b 0 σ 2 n.i=1The relation between b 0 and p o could be computed using Matlab. In figure 4.13 theovershoot probability p o is plotted for different barrier values b 0 with the samplenumber N d equal to 100, as is used in the communication system.10.80.6po0.40.200 20 40 60 80 100 120 140 160 180 200b 0Figure 4.13: Probability that 100 samples generate a signal energy larger than b 0 .In the system, b 0 was chosen to be 210 leading to an overshoot probability of8 × 10 −12 .4.2.3 Initial SynchronisationAt this point, we assume that the receiver has successfully conducted the signaldetection using a scan window of size N d . The goal is now to establish a proper


Chapter 4. The Communication System 38synchronisation during a timing window time consisting of N t samples includingthe previously collected scan window samples. In this section, three different waysto set up a synchronised link between transmitter and receiver are presented.Sinc SynchronisationThe idea between the sinc-synchronisation is to use a preamble signal consisting ofa pulse that is as sharp as possible.While the synchronisation is conducted, the receiver constantly computes the discretecross-correlation for real functionsN p∑R˜sp (j) = ˜s i p i−j (4.19)between the received signal and the preamble pulse. Thus if the used pulse is reallysharp, the cross-correlation function decays fastly with an increased shift betweenan arriving pulse and the precomputed pulse at the receiver. With that, sharperpulses lead to a better time resolution in the estimation of the arrival times of thedifferent multipaths.The sharpest possible pulse is the discrete time equivalent to the dirac δ-distribution,the kronecker-δ with{1 if i = 0δ i =0 otherwise . (4.20)Since the kronecker-δ is in the frequency domain equally distributed over all frequencies|f| ≤ fs2but our communication system is restricted to a frequency bandof f min ≤ |f| ≤ f max , the sharpest realisable pulse equals the kronecker-δ appliedto an ideal bandpass filter with cutoff frequencies f min and f max . Thus our desiredpulse waveform p(t), t ∈ R looks asi=1p(t) = 2f max sinc 2πf max t − 2f min sinc 2πf min t (4.21)where 2f max sinc2πf max t and 2f min sinc2πf min t are the impulse responses of ideallowpass filter with cutoff frequencies f max and f min .With that, our pulse choice is the sampled and raised-cosine windowed versionof p(t) as plotted in figure 4.14 with f min equal to 30kHz and f max equal to 80kHz.The kinks in the plot are caused by the sampling with the sampling frequencyf s = 250kHz and are removed by the analog lowpass filter on transmitter side.In figure 4.15 a plot of the cross-correlation between the received signal and thesinc-pulse p computed at the receiver while communicating in a small waterbox ispresented. The distinct pulse arrivals are clearly visible.Even though the sinc-synchronisation works, it was occasionally observed that thesynchronisation was not established on the main energy path between transmitterand receiver. This is a consequence of the sharp pulse used, that is not able tobring the channel to steady state as it is the case during the subsequent informationtransfer. Thus, further synchronisation methods using long preamble signals wereexamined.FFT SynchronisationAnother way to establish a synchronous system could be found by using a synchronisationpreamble that consists of a series of unmodulated S2C sweeps with lowestfrequency f l , highest frequency f h , sweep bandwidth ξ = f h − f l , sweep duration


39 4.2. Synchronisation0.40.30.2Magnitude0.10−0.1−0.2−0.30 10 20 30 40 50 60 70 80 90 100SamplesFigure 4.14: Sinc synchronisation pulse bandlimited to 30kHz ≤ |f| ≤ 80kHz sampledwith 250kHz.T sw and sweep steepness ς = ξT sw.If the receiver waits long enough after he sensed the first sweep, the channel couldbe assumed to be in steady state. Now the receiver starts despreading the preamblesignal, but not with the same sweep the transmitter uses but with a S2C sweep thatis ξ above the transmitted sweep. This is done to ensure that all arrivals, no matterat which delay they arrive, are demodulated to the frequency band [0,2ξ].At this point, a lowpass filter is applied to filter out all unwanted signal componentsabove 2ξ and below −2ξ. Since we have now a signal restricted to the frequencyband [−2ξ,2ξ], we could reduce the sample rate by a factor of⌊fs4ξ⌋without producingaliasing or loosing any information. This is necessary to minimise the numberof samples that need to be stored in memory and at the same time speeds up thesubsequent calculations.Now we are ready to perform the fast fourier transform (FFT) on the collectedsamples x PB to get a picture in the frequency domain of the despread signal. Sincewe are interested in the path energies, we compute|ˆx PB | 2 = |FFT {x PB }| 2 . (4.22)We state that if a path arrival is not perfectly synchronuous with the despreadingfunction, its despread energy is distributed among two frequencies that are ξ apart,as illustrated in figure 4.16. We assume that the energy on the higher frequencycorresponds to the “true” energy, which means that all paths have a positive delaycompared with the despreading function. This assumption can be motivated by thefact, that the despreading function is synchronised on the time instant at which thereceiver first sensed a signal in the channel, which is equal to a rough synchronisationon the shortest path between transmitter and receiver. Thus we add the lowerfrequencies of |ˆx PB | 2 to its upper frequencies, to gete(f) = |ˆx PB (f)| 2 + |ˆx PB (f − ξ)| 2 , f ∈ [ξ,2ξ]. (4.23)If we transform now the frequency in e(f) to a delay variable τ by using τ = f−ξς,we get a delay-energy profile e(τ) withe(τ) = e(f)| τ=f−ξς. (4.24)


Chapter 4. The Communication System 400.150.1Cross-correlation0.050−0.05−0.10 200 400 600 800 1000 1200 1400 1600 1800 2000SamplesFigure 4.15: Computed cross-correlation between the received signal and the sincpulse while establishing the synchronisation.With that, the time instant τ sync we synchronise on is given byτ sync = max {e(τ)} . (4.25)τThe disadvantage of the FFT synchronisation lies in the fact, that for a frequencyresolution of ∆f we need at least a signal of length 1∆fin our fourier transform. Ifwe consider the present communication system with a sweep bandwidth ξ of 20kHzand a sample rate f s of 250kHz and we wish to have a frequency resolution of theFFT of 20Hz which is necessary to get a good synchronisation, we have to collect10.05×fssamples during20Hz= 0.05s. This is equal to a number of3= 4167 sampleswe have to store in memory and use in the FFT calculation. The division by threecomes ⌋ from the fact that we are able to decrease the sample rate by a factor of= 3. But despite this decrease of the sample rate, we still have a large number⌊fs4ξof samples compared with the 100 samples used during the sinc synchronisation.This is the reason why this synchronisation method was not implemented after thesinc synchronisation was found to be suboptimal in some cases and what gives themotivation for the next method - the Maximum Amplitude Synchronisation.Maximum Amplitude SynchronisationThe maximum amplitude synchronisation is best described by considering its blockdiagram given in figure 4.17.In the beginning, the N s samples of the signal vector v s are collected. Only thesesamples are used in the subsequent synchronisation.For the following operations, we set the desired frequency resolution in the synchronisation- that is the maximum frequency deviation of the despread informationsignal compared with the expected passband frequency - to ξ N bwith ξ being thesweep bandwidth and N b the number of different frequeny bins we wish to comparetheir amplitude.As a first synchronisation step, the samples of the signal vector are despread withN b different time shifts {τ i } N bi=1 , where τ 1 = 0 and τ Nb = T sw , using the time delayedreal part of the S2C carrier Re[c S2C,if (t − τ i )] ,i ∈ {1,...,N b } with c S2C,ifbeing equal to the sweep function that is f if above the transmitted sweep frequency.


41 4.2. SynchronisationT swξff 2τf 1tFigure 4.16: Despreading function (blue), one multipath arrival with delay τ (solidred) and the corresponding despread passband signal on frequencies f 1 and f 2 .Since we only used the real part of the carrier and thus created an upper harmonicand we also want to have a signal that is as clean as possible in the subsequentprocessing, the despreading operation is finalised by bandpass-filtering the signalaround f if using the sixth order elliptic IIR bandpass filter BPF 1 with the magnitudeof its frequency response visible in figure 4.18 for the implemented case of f ifequal to 10kHz.Following to the despreading operation, the signal is three times multiplied withitself and then bandpass filtered again to filter out all unwanted harmonics and torestrict the signal spectrum to the frequency bin we are interested in. This leads inthe ideal case to an upshift of its frequency by a factor of 8, since we have for anysinusiodal signal Asin (2πf 0 t + θ) with amplitude A, frequency f 0 and phase shift θ{ [A 2 sin 2 (2πf 0 t + θ) ] 2 } 2∗ BPF8f0 =A 8128 {35 − 52cos[2(2πf 0t + θ)]+22cos[4(2πf 0 t + θ)] − 4cos[6(2πf 0 t + θ)]= A8128 cos[8(2πf 0t + 8θ)]+cos[8(2πf 0 t + 8θ)]} ∗ BPF 8f0(4.26)where BPF 8f0 is the impulse response of an ideal bandpass filter with a narrowpassband around 8f 0 .In the present system, a second order butterworth bandpass filter with a very smallpassband-bandwidth of 400Hz around the center frequency of 80kHz is used, asplotted in figure 4.19 and figure 4.20 with a detailed view. Since we upmodulatedthe signal originally concentrated around a frequency of f if = 10kHz by a factor of8, we get a frequency resolution of 400Hz8= 50Hz in the case of an ideal filter and aneven better resolution in the case of the real filter. This comes from the fact, thatfor the used butterworth filter, the passband is not of unity gain for all passbandfrequencies but starts tho stronger attenuate the signal with an increasing differencebetween the frequency of interest and the center frequency of the bandpass filter.Since we wish to compare amplitudes, an attenuation difference smaller than 1dB


Chapter 4. The Communication System 42Re [c S2C (t − τ 1 )]v s ×BPF 1 × × × u 1.Re [c S2C (t − τ Nb )]× BPF 1 × × × u Nbu 1BPF 2 × LPF..Select Largestτ syncu Nb BPF 2 × LPFFigure 4.17: Block diagram of the maximum amplitude synchronisation method.is already sufficient to differentiate between two measures, leading to an effectiveresolution smaller than 200Hz8= 25Hz in the present case.After the signal vector samples are despread, upmodulated by a factor of 8 andbandpass filtered to implement the frequency bin, we measure the halfed squarevalue of the amplitude in the frequency bin by squaring the signal and then lowpassfiltering it. This operation is again best understood by considering general sinusiodalsignals Asin (2πf 0 t + θ):[Asin (2πf 0 t + θ)] 2 ∗ LPF fc≪2f 0= A22 {1 − cos[2(2πf 0 + θ)]} ∗ LPF fc≪2f 0= A22(4.27)where LPF fc≪2f 0is the impulse response of an ideal lowpass filter with a cutofffrequency clearly lower than 2f 0 as the one plotted in figure 4.10 in section 4.1.2.Now we have a measure of a number N b of different amplitudes corresponding to thedifferent frequency bins which correspond again to the different time delays used inthe despreading. Thus by selecting the branch in the block diagram 4.17 that resultedin the maximum output value, we find the delay value τ sync that correspondsto the largest energy path.Now the only remaining problem is the determination of the size of the signal vectorv s that leads to a reliable synchronisation. A lower bound on this size can be foundby concluding that this vector should be larger than the accumulated group delaysof all involved filter. But tests showed that this lower bound is too low, thus empiricalresults were used to determine a good size of the signal vector. Figure 4.21


43 4.2. SynchronisationMagnitude [dB]0−10−20−30−40−50−60−70−80−900 20 40 60 80 100 120Frequency [kHz]Figure 4.18: Magnitude of the frequency response of a sixth order elliptic bandpassfilter with cutoff frequencies 9kHz and 11kHz.Magnitude [dB]0−10−20−30−40−50−60−700 20 40 60 80 100 120Frequency [kHz]Figure 4.19: Magnitude of the frequency response of a second order butterworthbandpass filter with cutoff frequencies 79.8kHz and 80.2kHz.shows an extract of the normalised bin values generated during a test with threedifferent vector sizes. It is clearly visible that a vector size of 100 samples leads to aresult that is not satisfying, whereas the measurements using 800 and 1500 samplesare very similar. Further tests showed that a signal vector size of 700 samples issufficient to get reliable measurements.But despite of the clearly identifiable different paths using the maximum amplitudesynchronisation as shown again in figure 4.21 for the whole bin spectrum, it was notpossible to establish a proper synchronisation. The reasons for this are still unclearat the time this <strong>report</strong> is written.4.2.4 Synchronisation during Data TransmissionWhile the initial synchronisation is used to establish a connection between thetransmitter and the receiver, it is not guaranteed that this connection remains synchronous.If for example the receiver starts moving, the path delay of the maximumenergy arrival could increase or decrease and with that, the communication couldfail from one time instant to another by the receiver becoming completely out ofsynchronisation with the transmitter. Thus, we have two alternatives in our com-


Chapter 4. The Communication System 440−0.5Magnitude [dB]−1−1.5−2−2.5−379.5 79.6 79.7 79.8 79.9 80 80.1 80.2 80.3 80.4 80.5Frequency [kHz]Figure 4.20: Detail view of figure 4.19.Normalised quadratic amplitude10.80.60.40.20100 Samples800 Samples1500 Samples1650 1700 1750 1800 1850 1900 1950BinFigure 4.21: Impact of different vector sizes.munication system:1. We could reestablish the connection every T sync seconds, where T sync is thechannel coherence time (the time, the channel could be viewed as being timeinvariant).2. We could use the S2C property that time delays are converted to frequencydelays to keep the communication synchronised while the data is transmitted.While the first method seems to be unsatisfactory since the initial synchronisationcould take a lot of time and we therefore notably decrease the data rate, the secondmethod is a promising solution and thus implemented in the system and presentedin the following.The S2C SynchronisationAs mentioned before, the S2C synchronisation method makes use of the despreadingoperation of an S2C modulated communication system. If the system is implementedin a coherent fashion, the despread incoming data signal that is concentrated


45 4.2. Synchronisation1.2Normalised quadratic amplitude10.80.60.40.20−0.20 200 400 600 800 1000 1200 1400 1600 1800 2000BinFigure 4.22: Complete bin spectrum generated during the maximum amplitudesynchronisation.somewhere around f if is used to recover the signal carrier which is on the same frequencyas the information signal but has the modulation removed. If we measurethe deviation of this carrier’s frequency f cr compared with the expected frequency,we have a measure of the synchronisation error time τ ǫ asτ ǫ = f cr − f ifςwhere ς is the S2C sweep steepness.(4.28)The carrier recovery is presented in section 4.1.2, thus the main difficulty at thispoint is how to measure the carrier frequency in way that is as little computationintensive as possible. We have to keep in mind that we are working with sampledsignals that are defined only on discrete time instants. Since we typically work with20-30 samples per carrier period, the precision of the frequency measurement is alsoan issue.It was found that with computing the time between two zeros of the carrier, wherethe zero crossings are linearly interpolated between two sample points, we get botha fast and reliable frequency measurement procedure. This procedure is briefly presentedin figure 4.23.In a more formal view, we get for the zero crossing time t 0 corresponding to thetwo samples s k and s k+1 that are 1 f sapart and which enframe a zero, that issgn(s k ) = −sgn(s k+1 ):t 0 = k +s ks k − s k+11f s. (4.29)The half period length used to measure the frequency is then determined by computingthe difference between two adjacent zeros.Carrier Frequency Measurement ErrorThrough the linear interpolation between two sample points in the frequency measurementdescribed in the previous section, we produce an error of ǫ 0 seconds in thezero determination. If we look at a carrier oscillation located exactly on f if and weset without loss of generality the zero crossing of interest to happen at time t = 0,this error computes as


Chapter 4. The Communication System 4610.80.60.4sin t0.20−0.2T cr2−0.4−0.6−0.8−10 1 2 3 4 5 6 7 8 9 10tFigure 4.23: Measurement of the recovered carrier’s half period length.x 10 −94321ǫ0 [s]0−1−2−3−40 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1t 1 f sFigure 4.24: Error in the zero determination between two samples using linearinterpolation.sin(2πf if t 1 ) 1ǫ 0 = t 1 +(4.30)sin(2πf if t 1 ) − sin(2πf if t 2 ) f swhere t 1 ∈ [− 1 f s,0) and t 2 ∈ [0, 1 f s) are the time instants where the samples enframingthe zero are located, measured in continuous time.Looking at figure 4.24, where a plot of this error versus t 1 for f if = 10kHz andf s = 250kHz is presented, we see that the maximum error ǫ 0,max is slighly lowerthan 4 × 10 −9 seconds.Therefore, the error in the half period calculation could be bounded by 2ǫ 0,max ≈8 × 10 −9 leading to a maximum carrier frequency measurement error ǫ f,max of∣ ǫ f,max =∣ f 1 ∣∣∣if −T if ± 2 × 8 × 10 −9 ≈ 1.6Hz (4.31)where T if = 1f ifis the carrier period length. This maximum value of ǫ f,max issufficient small to build up a propper synchronisation.


47 4.2. SynchronisationKalman FilterSince the carrier frequency value undergoes disturbances originating from a notcompletely eliminated modulation in the carrier recovery, from multipaths that arenot entirely filtered out and from other error sources, the frequency measurementoutput needs to be filtered before it is fed to a controller that adapts the synchronisation.This is done using a multi-state Kalman filter with the first state beingthe frequency deviation f dev = f meas − f if and the further states given by the differentderivatives of f dev which should take care mainly of the movement betweentransmitter and receiver. Thus we first have to think of how many derivatives weneed in our filter. For this, we consider the case where we have f dev and its derivativef ˙ dev = f dev,k − f dev,k−1 available. We assume that the acceleration a betweentransmitter and receiver is never larger thana max = 100 m s 2 (4.32)and that the worst case delay between the occurence of a timing shift and its measurement∆τ meas,max is∆τ meas,max = 350 samples (4.33)which could be motivated by considering the system implementation. Furthermore,we presume the sweep steepness ς of the S2C sweeps being always smaller than 20MHz which is a valid value for all target channels. Using this values, we get theworst case distance ∆d max the transmitter and receiver could move with respect toeach other until this movement is measured as∆τmeas,max2 ∆d max = a max2This corresponds to a frequency error of= 96µm. (4.34)ǫ f = ∆d maxc sς = 1.28Hz (4.35)where c s is the underwater sound speed. This is an acceptable value computedunder harsh constraints, thus we conclude that using a two state Kalman filter withthe states f dev and f ˙ dev is sufficient for our system.In the remainder of this section, to stay consistent with the common notations,bold capitals do not correspond to random entities as they do in the rest of this<strong>report</strong>, but they denote matrices of some size.We get the discrete state space as[ ] [1 1 γx k = x0 1 k−1 + u0]k + n p,k ,[ ] (4.36)1 0z k = x0 1 k + n m,kwith the state x k equal tox k =with the process noise vector n p,k obeyingn p,k ∼ N(0,Q), Q =[ ]fdevf˙, (4.37)dev k[ ]1 1σ 21 2p (4.38)


Chapter 4. The Communication System 48where σp 2 is the noise variance of the f dev process and Q is the process noise covariancematrix, with the measurement noise vector n m,k distributed as[ ]1 1n m,k ∼ N(0,R), R = σ 21 2m (4.39)where σ 2 m is the noise variance of the f dev measurement and R is the measurementnoise covariance matrix and finally γ being the mapping from the k-th timingadaption u k in samples to a frequency asγ = ςf s (4.40)where ς is the sweep steepness and f s is the sampling frequency.Now, we are able to give the predict and the update stage of the Kalman filter:• Predict:ˆx k|k−1 = F ˆx k−1|k−1 + Bu k−1P k|k−1 = FP k−1|k−1 F T (4.41)+ Q[ ]1 1with the state transition matrix F = , the control input matrix B =0 1[ ] T, γ 0 the error covariance matrix P k|k and the process noise covariancematrix Q as presented before.• Update:ỹ k = z k − Hˆx k|k−1S k = HP k|k−1 H T + RK k = P k|k−1 H T S −1(4.42)kˆx k|k = ˆx k|k−1 + K k ỹ kP k|k = (I − K k H)P k|k−1with the innovation ỹ k together with its covariance S k , the Kalman gain K kand the observation matrix H = I. Since H is equal to the unity matrix, wecan simplify 4.42 by leaving away H everywhere it occurred. Furthermore wehave a two state model, thus all matrices are of size 2 × 2. With that, we cangive the inverse of the innovation covariance S −1kas[ ]S −1 1 s22 −sk=12(4.43)s 11 s 22 − s 12 s 21 −s 21 s 11.At this point we have a working Kalman filter that lacks only on the initial valuesof ˆx 0|0 and P 0|0 as well as the noise variances σp 2 and σm. 2 We assume the carrierfrequency being on its desired value f if in the beginning without any movement ofthe system, thus we do the initialisation as[ ]fifˆx 0|0 =(4.44)0and to notify the filter that we perfectly know the inital state we set[ ]0 0P 0|0 = . (4.45)0 0The noise variances are chosen empirically in way to have the desired filter behaviour.


49 4.3. S2C ProfilesController DesignEven though we have perfect knowlegde of the controlled system which is basicallyformed by the carrier recovery procedure, we have the problem that we have a delaybetween our controlling actions and the reaction of the system. This delay is causedby the group delays of the filter involved in the carrier recovery. We have to considerthis delay in the controller in order to dispose over a working synchronisation.Since our frequency state in the Kalman filter automatically reflects the delayedvalues, the only problem we have is how to include the last input u k−1 into ourmodel in order to have a proper state prediction on which we base our next controldecision. The carrier frequency reacts directly on the input and in the present casethe measurement delay ∆τ meas is smaller than the time t f between two filter steps,hence we could calculate our model input asu k−1 = (t f − ∆τ meas )δ k−1 + ∆τ meas δ k−2∆τ meas(4.46)where δ k−1 and δ k−2 are the two previous timing adaptions.With that, we have considered the measurement delay of the system and the controllercould just take the output of the Kalman filter to compute the next necessarytiming adaption δ k .4.3 S2C ProfilesThe present communication system is supposed to work under different conditions,that is, in channels with completely different geometries and signal-to-noise ratios.Since the selection of the S2C parameters is up to a certain extent depending onthe channel geometry, different profiles are used to handle the various environments.These profiles are based basically on three measures:• The channel delay spread ∆τ max . That is, the time difference between theshortest and the longest path containing as much energy that it can’t beignored.• The shortest time difference between two arriving paths ∆τ min .• The signal-to-noise ratio in the channel.The first measure, the channel delay spread, is used to determine the minimumsweep duration T sw,min , since the sweep duration is not allowed to be smaller thanthe maximum time difference between two paths in order to be able to distinguishthem in the frequency domain. The shortest time difference between two arrivingpaths ∆τ min is used to compute the maximum possible bandwidth W max a passbandsignal is allowed to use, as two arrivals should never overlap in the frequency domain.If we use T sw,min as the sweep duration, we haveW max = ξ∆τ minT sw,min(4.47)with ξ the S2C sweep bandwidth. Equation 4.47 holds only if the system is capableof transmitting in the frequency range [f l − Wmax2,f h + Wmax2] with f l and f h thelowest and highest S2C frequencies. If we use PAM signaling with sinc-pulses, wecan compute the maximum possible symbol-rate as being equal to W max as shownin section 3.2.2.The signal-to-noise ratio in the end gives a constraint on the usable PSK schemes,


Chapter 4. The Communication System 50as 2-PSK offers a higher tolerance to noise than an 8-PSK scheme does. Despite ofthis fact, in the following all channels are assumed to work with 8-PSK.We could therefore compute the maximum achievable data-rate r max asr max = 3 × W max bits/s. (4.48)In the next section, five different channel types are presented.4.3.1 Channel TypesIn the following, always a sweep bandwidth ξ of 20kHz is assumed.Waterbox ChannelThis channel type requires the use of small water-containing boxes with the parameters∆τ min ≥ 10cmc s= 7 × 10 −5 s and ∆τ max ≤ 5mc s= 0.0033s. This leads toand thusW max = 20kHz × 7 × 10−5 s0.0033s= 420Hz (4.49)r max = 1260bits/s. (4.50)Pessimistic Swimming Pool ChannelIn the pessimistic swimming pool channel model, the parameters are set in a way toallow a very robust communication by decreasing the maximum possible data-rate.The shortest and longest path length differences are assumed to be 0.5m and 30m,which is equal to ∆τ min ≥ 0.5mc s= 3 ×10 −4 s and ∆τ max ≤ 20mc s= 0.013s. With that,we have a maximum bandwidth ofW max = 20kHz × 3 × 10−4 s0.013sleading to a maximal possible data-rate of= 460Hz (4.51)r max = 1384bits/s. (4.52)Optimistic Swimming Pool ChannelThe optimistic swimming pool channel model presumes some measures being takento ensure that the minimal path length difference is never smaller than 2m and themaximal path length difference never exceeds 10m. Thus, we have ∆τ min ≥ 2mc s=0.0013s and ∆τ max ≤ 10mc s= 0.0067s and getandW max =20kHz × 0.0013s0.0067s= 3881Hz (4.53)r max = 11642bits/s. (4.54)


51 4.4. Bandwidth ConsiderationsLake ChannelIf the system is used in a lake environment, we basically have the line-of-sight pathtogether with the surface and ground reflections. If we assume that the receiveris near to the surface or to the ground, that is one of the two multipaths containsmuch less energy than the other and can thus be ignored, we have ∆τ max = ∆τ minleading toW max = 20kHz2as the two multipaths have to share the overall 20kHz bandwidth and thus(4.55)r max = 30000bits/s. (4.56)Optimal ChannelIn the optimal channel there is no multipath propagation. Thus we haveandW max = 20kHz (4.57)4.4 Bandwidth Considerationsr max = 60000bits/s. (4.58)The last section showed, that the maximal achievable symbol rate is proportionalto the S2C sweep bandwidth ξ. The present system uses a value ξ of 20kHz dueto the systems frequency response being best in the region [70kHz,90kHz], mainlycaused by the transmitter characteristics. Therefore, if we could use a transmitterthat is able to transmit in a larger frequency interval, the symbol- and data-ratewould increase with the factor this interval is larger than 20kHz. [9] for exampleused sweep signals with frequencies between 30kHz and 80kHz which would in thepresent case increase the data-rate by a factor of 2.5 if the system is capable oftransmitting in the interval [30khz − Wmax2,80khz + Wmax2].


Chapter 4. The Communication System 52


Chapter 5Implementation of theSystem5.1 DSP Program ArchitectureThe development of the DSP programs started with one basic problem: The necessityof having a combination of a slow interface of the DSPs to the PC on one sideand a fast interface to the analog hardware connecting the DSPs with communicationchannel on the other side. It was found that this difficulty is best overcome byusing a multitasked program architecture based on the embedded operating systemDSP/BIOS provided by Texas Instruments. In the following, the basic concepts ofthe developed program architecture are described.5.1.1 Program ArchitectureIn the subsequent sections only the transmitter is described. But as the programarchitectures for the transmitter and receiver are very similar, the concepts alsoapply for the receiver program.Figure 5.1 describes the basic transmitter program architecture.The transmitter architecture basically consists of three main tasks, one correspondingto the data link layer in the OSI reference model and two corresponding to thephysical layer of the same model. Furthermore, a FIFO message box provides theinterface between the data link layer and the physical layer and one of the two physicallayer tasks is responsible for communicating with the enhanced direct memoryaccess (EDMA) of the DSP. Data fed to the EDMA is then transfered to a specificmemory location where the multichannel serial bus of the DSP takes the data andmoves it to the connected digital-to-analog converter. The remaining subsectionsdescribe the single parts of this architecture.5.1.2 UARTThe UART interface is implemented using standard libraries shipped together withthe used DSP boards. It communicates at a rate of up to 115200 bps with theconnected PC and uses a buffer able to store up to 256 characters. Writes andstores to or from this buffer could be done using a pointer set on the correct memorylocation, while the actual communication is conducted by two idle functions (taskswith very low priority) working in the background. Thus, data transmission overthe UART is only possible while nothing else is running on the DSP.53


Chapter 5. Implementation of the System 54Data InUARTData Link LayerFIFOPhysical LayerEDMAMcBSPData OutFigure 5.1: DSP Program Architecture.5.1.3 Data Link LayerThe data link layer task on the transmitter side is responsible of receiving the databits from the PC and storing them in a message box provided by the operatingsystem. If this message box is full, the data link layer task blocks and waits untilthere is again free space inside of the box.In future implementations, the data link layer task will also be responsible for doingthe source and channel coding.5.1.4 Physical LayerAs already stated, the physical layer consists of two tasks responsible for differentoperations inside of this layer.The upper task is the one that does most of the signal processing work of the transmitter.It is here where the synchronisation preamble is generated and where thedata signal is computed using the single bits. With that, it is also the critical taskregarding computation speed.The lower task of the physical layer on the other hand basically takes the valuescomputed by the upper task and puts them into the ping or pong transmissionbuffer as described in the next section.As the upper and lower tasks need to communicate with each other, a specialstructure is necessary to provide a protected memory space both tasks could access.There are some requirements on this communication buffer: On one hand, the up-


55 5.1. DSP Program Architectureper task, responsible for generating signal values, is not allowed to overwrite valuesthat are not yet transmitted and has to block if the buffer between upper and lowertask is full. And on the other hand, the lower task is never allowed to block, sincethe EDMA unit needs a continuous data stream. This was originally solved usinga message box configured in the operating system, with a blocking writer and anon-blocking receiver that just uses a value of zero if the reading fails. But testsshowed that the message box is far too slow by using up to 500 CPU cycles perwrite access, which is more than a third of the total number of cycles available perdata sample.The reasons for this lie in the internal implementation of the message box usinga semaphore that is called during every write and read access to or from the box.This creates a large system overhead leading to this huge number of CPU cyclesused.With that, it was necessary to implement a special buffer structure that minimisesthe semaphore accesses as much as possible. It was found, that the only time instanta semaphore is necessary is when the writer task needs to be blocked andsubsequently unblocked. Thus, a circular buffer was used with a pointer pointingon the next position to read from and a variable storing the difference betweenthe writing position and this reading pointer. The writer task blocks only if thedifference variable becomes zero and as soon as there is again free space inside thebuffer the writer is unblocked again. And as the reading task has a higher prioritycompared with the writing task, the situation where the writer is unblocked andblocked again in the next time instant is very unlikely to happen.5.1.5 EDMAThe interface between the lower task in the physical layer and the EDMA controlleris formed by two buffers, both capable of storing 1024 signal values. They are usedin a so-called ping-pong structure as shown in figure 5.2. This allows the physicallayer task to continuously write to one of the two buffers while the EDMA controllerreads values from the other buffer. With that, the sample computation and sampletransmission are decoupled enabling the physical layer to use more time for a specificoperation witch can be catched up subsequently. But it has to be guaranteedin all situations that the physical layer has finished the sample computation beforethe EDMA has completed a buffer transfer in order to keep the system in correctoperation.As the EDMA has finished transfering the values of one buffer, it signals the correspondingsemaphore using a special interrupt and thus allows the already waitinglower physical task to write to this buffer. At this point, the whole procedure startsover again.5.1.6 McBSPAs the last step on the digital side, the McBSP transfers the data received from theEDMA controller to the digital-to-analog converter using the standard SPI protocol.5.1.7 SchedulingIn a multitasked real-time system there must always exist a feasible scheduling inorder to guarantee a correct system operation. As described in the EDMA section,the transmitter program works in a rythm dictated by the 1024 values inside theping and pong buffers. Thus, a feasible scheduling could be guaranteed as long asthe four transmitter computation units, the lower and upper physical layer taskswith highest priority, the data link layer task with intermediary priority and the


Chapter 5. Implementation of the System 56InputSEMSEMPingBufferPongBufferEDMAControllerMemoryOutputFigure 5.2: EDMA structure.LowerPhysical TaskUpperPhysical TaskData LinkLayer TaskUARTTransmissionUnusedTimePriorityFigure 5.3: Task scheduling during one transfer block.UART communication tasks with lowest priority all are processed in a time less than1024 × 1 f swith 1 f sthe length of one sample. With a sampling frequency of 250kHz,the following constraints on the average usable number of cycles for a computationunit were set:• Lower physical layer task: ≤ 100 CPU cycles• Upper physical layer task: ≤ 800 CPU cycles• Data link layer task: ≤ 100 CPU cycles• UART transmission: ≤ 200 CPU cycles.5.2 Speed ConsiderationsAs there is with 1200 cycles at a sample frequency f s of 250kHz only a relativelysmall number of CPU cycles the transmitter and the receiver can use to process


57 5.2. Speed Considerationsone signal sample, the speed at which all the signal calculations are done becomesan important issue. There are basically two ways to make the program code thatimplements the signal processing faster: One is to implement fast functions forcalculations that occur many times and the other is to write c code that the compileris able to transform to fast assembler code that exploits the specific advantages ofthe DSP.5.2.1 Compiler OptimisationThere are many possible steps to increase the performance of the assembler code thecompiler produces, but by far the largest increase of computation speed is achievedby writing c code that the compiler could software pipeline. Software pipelininguses the fact that DSPs generally dispose over several functional units of the sametype to execute the program instructions. In the case of the TI C6713 used in thepresent project, these are:• Two multiplication units• Two units to perform loads and stores• Two units to do shifts, branches and compares• Two units that implement logical and arithmetic operations.When a code is software pipelined, the compiler tries to rearrange the assemblerinstructions in a way that different operations can be executed in parallel underthe constraint that a functional unit is only able to execute one instruction at atime. Since software pipelining is primarily effective in situations where the codeis repeated many times, the compiler used in the present project limits itself topipeline instructions inside a loop.In order to enable the compiler to use software pipelining in an effective way, thefollowing things have to be considered:• Dependencies:As instructions that depend on each other can not be ececuted in parallel, thedependencies inside a pipelined loop have to be reduced as much as possible.This is especially important when working with pointers, as the compiler doesusually not know whether two pointers point to the same location in memoryor not. Thus, the compiler assumes the worst case and adds a dependencybetween the pointers that often makes pipelining impossible. In order tocircumvent this problem, the pointers could be defined using the “restrict”qualifier to tell the compiler that they will never point to the same memorylocation. As arrays are implemented using pointers, this is a very commonnecessity. Other strategies to avoid dependencies are more situation-specificand are not described here.• Function calls:A loop containing a function call can not be software pipelined. Therefore,function calls have to be avoided in all situations where speed is relevantinside a loop. For operations that repeatedly occur, function inlining is thesolution as with that a function call is avoided. Type conversions and similaroperations are also function calls, but there exist so-called compiler intrinsicsthat map to special assembler functions the compiler is able to include directlyin the code as with inlined functions. Hence in these cases, always the compilerintrinsics and not the typical c operations have to be used.


Chapter 5. Implementation of the System 58• Control Code:Complex control code as nested“if”clauses could also disable software pipelininginside a loop. Special care has to be taken in those situations and oftenthe “if” clauses have to be replaced by some sophisticated operations.• Pragmas:As the compiler often is able to improve the instruction pipelining if he hasadditional information over the program execution, the pragma statementscould be used to provide such information. The pragma “MUST ITERATE”for example is used to tell the compiler the minimal and maximal number aloop body is executed.• Loop complexity:Since a loop complexity that is too high prevents the compiler from pipeliningit, it is a good strategy to keep the loops in the program short and to splitcomplex loops into different parts.ParallelisationAs described above, the primary advantage of the C6713 DSP lies in its ability tosoftware pipeline loops. In order to have such pipeline candidates, the code must bewritten having software pipelining in mind, which often leads to completely differentresults compared with code that is written without thinking of the possibility thatit could be pipelined. In the present work, the program was structured in a waythat always sample blocks of 250 samples are processed in parallel, that is, if welook at the receiver code, first 250 samples are read in, then they are despread usinga “for” loop with 250 iterations and so on. With that, the loops are kept simple andremain good software pipeline candidates.Using this strategy, the overall program speed was approximately doubled.5.2.2 Fast FunctionsUsing the compiler to optimise the generated assembler code is only one strategy tomake the resulting program faster. Another strategy lies in creating functions forspecial tasks as the computation of a sine value that have a little lack of accuracybut with that could be much faster. In the present work this was done for a sineand a square root function.Fast SineAn approximation of the sine function in the interval [−π,π] could be found byconsidering its Taylor polynomial around the value x 0 = 0. This Taylor polynomialis given bysinx =∞∑n=0(−1) n(2n + 1)! x2n+1 . (5.1)If we cut off the sine Taylor polynomial after the seventh degree, we getsin x ≈ x + c 1 x 3 + c 2 x 5 + c 3 x 7 (5.2)with the coefficient vector c = [− 1 6 , 1120 , − 15040 ]T . This approximation is plotted infigure 5.4 together with the approximation error ǫ in figure 5.5.Since in our communication system the most important thing concerning sine functionsis that their zeros are on the right place, the presented taylor approximation is


59 5.2. Speed Considerations1.51sin xTaylor approximation0.50−0.5−1−1.5−π −π/2 0 π/2 πFigure 5.4: Seventh degree taylor approximation of sinx.0.10.05ǫ0−0.05−0.1−π−π/20 π/2πFigure 5.5: Approximation error of sinx using a seventh degree taylor approximation.not optimal as it has the largest error in the interval [−π,π] on the interval boundarieswhich are zeros of the sine function.Our goal is now to have a sine approximation with exact zeros that is otherwiseas near to the taylor approximation as possible. Thus, we are looking for a secondcoefficient vector a = [a 1 ,a 2 ,a 3 ] T withπ + a 1 π 3 + a 2 π 5 + a 3 π 7 = 0, (5.3)which ensures that our approximation of sinx is zero at −π, 0 and π, and‖a − c‖ 2 → min (5.4)where ‖·‖ is the euclidean norm.This minimisation problem could be solved using the Lagrange procedure withh(a,λ) = ‖a − c‖ 2 + λ(π + a 1 π 3 + a 2 π 5 + a 3 π 7 ) (5.5)where the linear system of equations


Chapter 5. Implementation of the System 601.51Approximationsinx0.50−0.5−1−1.5−π−π/20 π/2 πFigure 5.6: Improved seventh degree taylor approximation of sinx.0.010.005ǫ0−0.005−0.01−π−π/20 π/2πFigure 5.7: Approximation error of sinx using an improved seventh degree taylorapproximation.⎡⎢⎣∂h∂a 1∂h∂a 2∂h∂a 3∂h∂λneeds to be solved. Solving this equation system leads to⎤= 0 (5.6)⎥⎦a = [−0.166666,0.008336, −0.000174] T . (5.7)In figure 5.6 and 5.7, this new approximation and its approximation error are plotted.It can be seen that now the maximum approximation error in the interval[−π,π] is 6.25 × 10 −3 which is much better than 7.75 × 10 −2 the error was before.Furthermore, the zeros are now exact.Now the bottleneck of the whole sine function is the phase calculation since ourfunction is only working for phase values of [−π,π] but we will need sine values of


61 5.2. Speed Considerationsphases far away of this interval. This problem can be solved by using an integervariable as phase where the minimal value that can be stored in the variable correspondsto −π and the maximal value corresponds to π. With that, the overflow ofthe integer variable guarantees that our phase never leaves the interval [−π,π].A benchmark of the resulting sine function using a “for” loop with 100 iterationsresulted in 19 cycles per iteration. If we compare this value with the sine functionprovided by Texas Instruments that takes 73 cycles per iteration, we are a factor of3.8 faster!Fast Square RootThe fast square root function developed in the present work is inspired by the waythe electronic game “Quake” computes square roots.If we are interested in the square root of x, this function basically computesy = 1 √ x(5.8)and then returns y ×x using the identity √ x = x 1 √ x. The reason for this lies in thenewton method used to approximate the square root.The newton method uses a guess y 0 for a zero of a function f(·) to find a betterguess y 1 by calculatingy 1 = y 0 − f(y 0)f ′ (y 0 ) . (5.9)If we wish to calculate square roots, our function f(·) has the form f(y) = y 2 − xwhere x is the value we try to find the square root of. Now putting this into 5.9,we gety 1 = y 0 − y2 0 − x2y 0(5.10)thus we need a division to compute the result. But divisions are very costly in thedigital world and we wish to avoid them. If we look at the inverse square root, ourfunction f(·) becomes f(y) = y −2 − x and inserting this into 5.9, we havey 1 = y 0 − y−2 0 − x−2y0−3. (5.11)= 3y 0 − xy 3 02We are therefore able to compute the square root of a value x without doing anydivisions if we have a good initial guess y 0 of this square root.This guess could be found by looking at the floating point representation of x, whichis formed by mantissa × 10 exponent . If we take the bits representing the exponent,divide them by two using a bit shift and taking the negative value of it, we getmantissa × 10 − exponent2 which is pretty close to the actual square root of x. Bysetting the mantissa to a special value as described in [13], we can further decreasethe estimation error and thus get a really good initial guess. With that, one roundof the newton method already described suffices to get a square root value satisfyingour needs.


Chapter 5. Implementation of the System 621.4Normalised Amplitude1.210.80.60.4AverageMaximumMinimum0.200 10 20 30 40 50 60 70 80 90 100Frequency [kHz]Figure 5.8: Magnitude frequency response of the communication system’s hardware.5.3 ElectronicsThe description of the involved electronics is beyond the scope of this <strong>report</strong>. Theonly thing presented here is the magnitude frequency response of the system’s hardware,since this response is very important for the development of the signal processingof the communication system.5.3.1 System Frequency ResponseThe magnitude of the frequency response of the hardware used in the communicationsystem was determined using 15 measurements with frequency sweeps between 1kHzand 100kHz in 1kHz steps with different transmitter-receiver distances to avoidnegative or positive interferences influencing the measurement. In figure 5.8, theaverage value of all these measurements is presented together with the maximumand minimum values found for every frequency in the sweep. As the shape of thethree curves is very similar, the measurement results seem to be trustable.It is visible from the plot that the magnitude of the frequency response has twopeak regions, one in the frequency band between 45kHz and 55kHz and the otherbetween 70kHz and 90kHz. Since a larger frequency band leads to a higher possibledata-rate, the band between 70kHz and 90kHz was selected to be the band in whichthe communication system will do its work.


Chapter 6ResultsIn the following chapter, results of tests conducted during the development of thecommunication system are presented.6.1 Waterbox TestsMost of the development time, the transmitter and receiver of the system weremounted inside of box filled with water. This forms some kind of worst case channeldue to its immense multipath propagation that can’t be avoided regarding the smallchannel dimensions.6.1.1 Experimental SetupFigure 6.1 shows the setup used during the waterbox experiments. The box composedof some form of plastics had the dimensions of approximately 1m×0.7m×0.7mand was filled with tap water. Due to the slightly flexible box walls, a small decreasein the multipath propagation caused by a larger signal attenuation at the box wallswas assumed, but nevertheless, strong multipath propagation was observed duringthe tests.The transmitter used in the tests was a directed LSE 297 transducer from ELACNautik with its 3dB main beam concentrated withing 30 degrees, while the deployedreceiver was an omnidirectional TC 4013 hydrophone from Reson.In order to guarantee the minimal path length difference between the main arrival,which was assumed to be the line-of-sight path, and the first arriving side multipathto be larger than 15cm, the transmitter and receiver were positioned as presentedin figure 6.1.Figure 6.1: Experimental setup used during the waterbox tests.63


Chapter 6. Results 646.1.2 DBPSK SystemDuring the first phase of the system development, the DBPSK structure describedin 4.1.1 was implemented. It was shown that data transmission at 100bps is possibleusing this structure, even though the bit error rate (BER) in the region of10 −2 was large. However, this large amount of bit errors is not surprising sinceno additional filter between the despreading and the subsequent matched filteringwas added and thus all the multipaths contributed to the signal fed to the matchedfilter. Furthermore, the use of sinc-pulses in the PAM modulation with their broadspectrum played also their part in increasing the bit error rate. Thus, it could beexpected that at larger symbol rates which lead to an even broader PAM spectrum,no communication at all would be possible. This was shown during further testsusing symbol rates of 250Hz and 500Hz, which both lead to a BER of nearly 0.5,which is equal to throw a dice to decide over the received bit.But despite these disillusioning results, the tests could be viewed as a success sincethe basic signal processing and the in particular the initial synchronisation wasshown to work even under harsh conditions.In figure 6.2, the fast fourier transform of the despread signal received during a testof the synchronisation is plotted. Here, in contrast to the DBPSK structure, anintermediary frequency f if = 30kHz was used. It is clearly visible that the mainarrival lies exactly on f if , implying a successful synchronisation.201816Main Arrival14Magnitude1210864200 25 50 75 100 125Frequency [kHz]Figure 6.2: FFT of the despread passband signal using f if = 30kHz.6.1.3 M-PSK SystemAfter the DBPSK system structure was shown to be working but at the same timeseemed to be only a suboptimal system solution, the development of an M-PSK systemstructure was started. As a first step after the introduction of an intermediaryfrequency f if of 10kHz, a bandpass filter around f if between the despreading operationand the matched filtering was added to dispose over an additional mechanismto eliminate the side multipaths, since this previously was the main cause of the biterrors. Figure 6.3 illustrates the effect of such a filter in a low SNR regime. Theupper part of the picture shows the despread bandpass signal previous to the bandpassfiltering, while in the lower picture part the same signal with the multipathsstrongly attenuated is plotted.After the despreading on f if = 10kHz with a subsequent bandpass filtering wasfound to be a very promising approach, coherent detection using a carrier recovery


65 6.2. Swimming Pool Tests0.2Magnitude0.10−0.1−0.20 50 100 150 200 250 300 350 400 450 500Samples0.2Magnitude0.10−0.1−0.20 50 100 150 200 250 300 350 400 450 500SamplesFigure 6.3: Low SNR passband filtering around f if .procedure was implemented. In figure 6.4, the consequences of a coherent receiverduring the receiption of one bit including a phase shift are presented. In the upperpart of the picture, the bandpass filtered passband signal is plotted, now underhigher SNR conditions compared with figure 6.3. In the figure’s middle section,the carrier recovered out of the passband signal is shown and it is clearly visiblethat the modulation is completely removed. And the lower part of the image is themultiplication of the passband with the carrier signal corresponding to the branchin figure 4.4 with the unshifted carrier which will be fed to a matched filter todecide over the received bit together with the branch of 4.4 computed using thephase shifted carrier.The last picture of this section, figure 6.5, shows the symbol receiption of 9 symbolsat 500 symbols per second using a coherent receiver. The symbols are differentiallyencoded and NRZ mapped bits, thus if the signal sign remains the same while atransfer from one symbol period to the next occurs, the received bit is estimated tobe 0 and otherwise it is set to 1. In the case of figure 6.5, the bit sequence“0101010”was transmitted and received without error. Nevertheless, the signal distortionscaused by side multipaths are visible illustrating the fact, that not a completemultipath elimination is possible due to the strong multipath characteristics of thewaterbox channel.6.2 Swimming Pool TestsAfter the waterbox tests showed that the communication system is principally workingbut at the same time a large amount of bit errors was observed due to the immensemultipath propagation in the waterbox channel, first tests in a swimming poolwith wave propagation characteristics closer to the target channel were conducted.6.2.1 Experimental SetupFigure 6.6 illustrates the experimental setup used while testing the system in theswimming pool channel. The swimming pool had dimensions of 25 × 8 meters with


Chapter 6. Results 661Magnitude0.50−0.5−1400 450 500 550 600 650 700 750 800Samples1Magnitude0.50−0.5−1400 450 500 550 600 650 700 750 800Samples1Magnitude0.50−0.5−1400 450 500 550 600 650 700 750 800SamplesFigure 6.4: Coherent bit receiption.around a third of the swimming pool being deeper compared with the remainingtwo thirds. The system was mounted in the deep swimming pool part as shown infigure 6.6 leading to a shortest path length difference of around 2 meters.Figure 6.6: Experimental setup used during the swimming pool tests.6.2.2 First ResultsAs a first step, again a DBPSK system configuration was used with a datarate of200 bits per second and a static sinc-synchronisation that was repeated every twobytes of data. In order to have a small bandwidth usage of the single bit pulsesand thus a reduction of intersymbol interference, raised cosine pulses with a rollofffactor β = 1 were introduced as shown in figure 6.7.


67 6.2. Swimming Pool Tests201510Magnitude50−5−10−15−200 500 1000 1500 2000 2500 3000 3500 4000 4500 5000SamplesFigure 6.5: The first nine bits received using coherent 2-PSK.1086Magnitude420−2−0.05 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05t [s]Figure 6.7: Raised cosine pulse with a rolloff factor β of 1 designed for a symbolrate of 200 Hz.Even though the raised cosine pulses with small bandwidth were used, large intersymbolinterference was observed leading to a bit error probability of around 0.1.The reasons for this are currently unclear but they seem to be connected with abad S2C sweep duration/receiver filter configuration.


Chapter 6. Results 68


Chapter 7Conclusion and OutlookIn the last section, it was shown that the communication system is basically workingbut that at the same time a large amount of bit errors is produced as a consequenceof the heavy multipath propagation in realistic channels. The author believes thatboth a drastic reduction of the bit error probability as well as a significant increasein the data rate of the system compared with the current results is possible.To achieve this, the following next steps are suggested:1. Usage of the existing results to find an optimal PSK setting together with agood S2C/symbol pulse shape/receiver filter configuration.2. Implementation of a working version of both the maximum amplitude and theFFT initital synchronisation and comparison of both procedures in terms ofaccuracy and time until the synchronisation is set up.3. Implementation of a powerful error correcting code in order to further decreasethe bit error rate.4. Replacement of the single S2C sweeps by two crossing sweeps where one sweepstarts at f l and ends at f h and the other does the opposite. This should doublethe possible date rate with only a slight increase in the bit error probabilityas cross sweeps are nearly uncorrelated.5. Employement of a sound projector that allows the usage of a larger transmissionfrequency band.69


Chapter 7. Conclusion and Outlook 70


Chapter 8AcknowledgementThe author would like to thank Jérôme Maye and Andreas Breitenmoser for theirconstructive and pleasant supervision. And a special thanks goes to Thomas Baumgartnerfor the outstanding job he did with designing and implementing the analogelectronics.71


Chapter 8. Acknowledgement 72


Bibliography[1] L.F. Yeung, R.S. Bradbeer,E.T.M. Law,A. Wu,B. Li and Z.G. Gu:Underwater Acoustic Modem Using Multi-Carrier Modulation. Oceans 2003,vol. 3, pp. 1368-1375, September 2003.[2] J.A. Catipovic and L.E. Freitag: High Data Rate Acoustic Telemetry forMoving ROVS in a Fading Multipath Shallow Water Environment. Proceedingsof the Symposium on Autonomous Underwater Vehicle Technology, pp. 296-303, 1990.[3] M. Stojanovic, L.E. Freitag and M. Johnson: Channel-Estimation-Based Adaptive Equalization of Underwater Acoustic Signals. OCEANS ’99,Riding the Crest into the 21st Century, vol. 2, pp. 985-990, 1999.[4] M. Chitre, S.H. Ong and J. Potter: Performance of Coded OFDM invery Shallow Water Channels and Snapping Shrimp Noise. Oceans 2005, vol.2, pp. 996-1001, September 2005.[5] L.E. Freitag and J.A. Catipovic: A Signal Processing System for UnderwaterAcoustic ROV Communication. Proceedings of the 61th InternationalSymposium on Unmanned Untethered Submersible Technology, pp. 34-41,1989.[6] H.K. Yeo, B.S. Sharif, A.E. Adam and O.R. Hinton: Multiuser Detectionfor Time-Variant Multipath Environment. Proceedings of the 2000 InternationalSymposium on Underwater Technology, pp. 399-404, 2000.[7] A. Lapidoth: Information Transfer. Signal and Information Processing Laboratory(ISI), <strong>ETH</strong> Zürich, Summer 2006.[8] A. Wittneben: Kommunikationssysteme.[9] K.G. Kebkal and R. Bannasch: Sweep-spread carrier for underwater communicationover acoustic channels with strong multipath propagation. Journalof the Acoustic Society of America, vol. 112, issue 5, pp. 2043-2052, November2002.[10] J.P. Costas: Synchronous Communications.. Proceedings of the IRE, vol. 44,pp. 1713-1718, December 1956.[11] L. Weruaga and M. Kepesi: Speech Analysis with the fast Chirp Transform.Proceedings of the EUSIPCO, pp. 1011-1014, September 2004.[12] K.G Kebkal et al.: Estimation of Phase Error Limits for PSK-modulatedsweep-spread Carrier Signal. OCEANS ’04, 2004.[13] Chris Lomont: Fast Inverse Square Root.www.lomont.org/Math/Papers/2003/InvSqrt.pdf, February 2003.73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!