DSP IMPLEMENTATION OF OFDM ACOUSTIC MODEM A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF Master of Technology In Digital Signal Processing By MADHU.A Under the guidance of Prof.G.S.RATH Department of Electronics & Communication Engineering National Institute of Technology Rourkela 2008 1 National Institute of Technology Rourkela CERTIFICATE This is to certify that the Thesis Report entitled “DSP Implementation of OFDM Acoustic Modem” submitted by Mr. Madhu.A (20607021) in partial fulfillment of the requirements for the award of Master of Technology degree in Electronics and Communication Engineering with specialization in “Digital Signal Processing” during session 2007-2008 at National Institute Of Technology, Rourkela (Deemed University) and is an authentic work by him under my supervision and guidance. To the best of my knowledge, the matter embodied in the thesis has not been submitted to any other university/institute for the award of any Degree or Diploma. Prof. G.S.RATH Dept. of E.C.E National Institute of Technology Date:29-05-2008 Rourkela-769008 2 ACKNOWLEDGEMENTS First of all, I would like to express my deep sense of respect and gratitude towards my advisor and guide Prof. G.S.Rath, who has been the guiding force behind this work. I am greatly indebted to him for his constant encouragement, invaluable advice and for propelling me further in every aspect of my academic life. His presence and optimism have provided an invaluable influence on my career and outlook for the future. I consider it my good fortune to have got an opportunity to work with such a wonderful person. Next, I want to express my respects to Prof. S.K.Patra, Prof.G.Panda, Prof. K.K. Mahapatra, and Dr. S. Meher for teaching me and also helping me how to learn. They have been great sources of inspiration to me and I thank them from the bottom of my heart. I would like to thank all faculty members and staff of the Department of Electronics and Communication Engineering, N.I.T. Rourkela for their generous help in various ways for the completion of this thesis. I would also like to mention the name of Jithendra Kumar Das (Ph.D) for helping me a lot during the thesis period. I would like to thank all my friends and especially my classmates for all the thoughtful and mind stimulating discussions we had, which prompted us to think beyond the obvious. I’ve enjoyed their companionship so much during my stay at NIT, Rourkela. I am especially indebted to my parents for their love, sacrifice, and support. They are my first teachers after I came to this world and have set great examples for me about how to live, study, and work. Madhu.A Roll No: 20607021 Dept of ECE, NIT, Rourkela. 3 CONTENTS Acknowledgements i Contents ii Abstract v List of figures vi List of tables viii Abbreviations ix Nomenclature xi Chapter1 introduction 1.1 Introduction 2 1.2 Motivation 3 1.3 Background literature survey 3 1.3.1 Digital audio broadcasting 4 1.3.2 Digital video broadcasting 5 1.3.3 HperLAN2 and IEEE 802.11a 6 1.3.4 Under Water Sensor Networks 6 1.4 Thesis contribution 7 1.5 Thesis outline 8 Chapter2 Under Water Sensor Networks 2.1 Introduction 10 2.2 Characterstics of the Enviornment 11 2.2.1.Basics of Acoustic Communications 11 2.2.2. Underwater acoustic channels 12 2.2.3. Distinctions between mobile UWSNs and ground-based networks 13 2.2.4. Current underwater network systems 14 Chapter 3 OFDM 3.1 Introduction 16 3.2 The single carrier modulation system 16 3.3 Frequency division multiplexing modulation system 17 4 3.4 Orthogonality and OFDM 18 3.5 Mathematical analysis 19 3.6 OFDM generation and reception 20 3.6.1 Error correction codes 21 3.6.2 Data Interleaving 21 3.6.3 Sub carrier Modulation 22 3.7 OFDM symbol 25 3.7.1 OFDM Transmitter 26 3.7.2 Pilot Insertion 26 3.7.3 Preamable 26 3.8 Frequency to Time domain conversion 27 3.9 RF modulation 28 3.10 Guard period 28 3.10.1 Protection against time offset 29 3.10.2 Guard period overhead and subcarrier spacing 30 3.10.3 Intersymbol interference 30 3.10.4 Intrasymbol interference 31 3.11 Advantages and disadvantages of OFDM as compared to single carrier mod 33 3.11.1 Advantages 33 3.11.2 Disadvantages 33 Chapter 4 Digital Signal Processing 4.1 introduction to DSP 35 4.2 How DSP’s different fromohter Microprocessors 36 4.3 Introduction to the TMS320C6000 Platform of DSP’s 37 4.3.1 TMS320C6713 DSP Description 38 4.4 DSP Implementation 40 4.4.1 Tramsmitter Design 41 4.4.2 Channel Noise 42 4.4.3 Receiver Design 42 Chapter 5 Simulation results & discussions 5.1 Introduction 45 5 5.2 simulation model 45 5.3 OFDM Frame synchronization 46 5.4 Performance tests 51 5.5 conclusion 53 References 54 6 ABSTRACT The success of multicarrier modulation in the form of OFDM in radio channels illuminates a path one could take towards high-rate underwater acoustic communications, and recently there are intensive investigations on underwater OFDM. Processing power has increased to a point where orthogonal frequency division multiplexing (OFDM) has become feasible and economical. Since many wireless communication systems being developed use OFDM, it is a worthwhile research topic. Some examples of applications using OFDM include Digital subscriber line (DSL), Digital Audio Broadcasting (DAB), High definition television (HDTV) broadcasting, IEEE 802.11 (wireless networking standard).OFDM is a strong candidate and has been suggested or standardized in high speed communication systems. In this Thesis in first phase ,we analyzes the factor that affects the OFDM performance. The performance of OFDM was assessed by using computer simulations performed using Matlab7.2 .it was simulated under Additive white Gaussian noise (AWGN) ,Exponential Multipath channel and Carrier frequency offset conditions for different modulation schemes like binary phase shift keying (BPSK), Quadrature phase shift keying (QPSK), 16-Quadrature amplitude modulation (16-QAM), 64-Quadrature amplitude modulation (64-QAM) which are used for achieving high data rates. In second phase we implement the acoustic OFDM transmitter and receiver design of [4, 5] on a TMS320C6713 DSP board. We analyze the workload and identify the most timeconsuming operations. Based on the workload analysis, we tune the algorithms and optimize the code to substantially reduce the synchronization time to 0.2 seconds and the processing time of one OFDM block to 2.7235 seconds on a DSP processor at 225 MHz. This experimentation provides guidelines on our future work to reduce the per-block processing time to be less than the block duration of 0.23 seconds for real time operations 7 LIST OF FIGURES 2.1 Scenario of the mobile UWSN architecture 12 3.1 Single carrier spectrum 17 3.2 FDM signal spectrum 18 3.3 Block diagram of a basic OFDM transceiver 22 3.4. Convolutional encoder 23 3.5 ASK modulation 24 3.6 FSK modulation 25 3.7 IQ modulation constellation, 16-QAM 26 3.8 Sub carrier spacing 27 3.7 OFDM generation, IFFT stage 28 3.8 RF modulation of complex base band OFDM signal, using analog techniques 29 3.10 Addition of a guard period to an OFDM signal 30 3.11 Example of intersymbol interference. The green symbol was transmitted first, followed by the blue symbol. 32 4.1 Typical components of DSP system . 37 4.2 TMS320c6000 block diagram 40 4.3 Architecture os TMS320c6713DSK 41 4.4Implemented on TMS320c6713DSP using TMDSDSK6713 Evaluation Board 42 4.5. Stored speech signal in Buffer 44 4.6 Recovered speech signal 45 5.1 simulation model of OFDM 47 5.2 Inter Frame Interference 48 5.3 Detail of frame Synchronization Technique 50 5.4 Detail of frame synchronization technique under SNR=10,delay spread=50ms 51 5.5 Probability of synchronization failure curves under different channels 51 5. Variation of MSE Vs SNR under different channels 52 5.7 BER vs. SNR plot for OFDM using BPSK, QPSK, 16-QAM, 64-QAM 52 8 LIST OF TABLES 5.1 OFDM simulation parameters 48 5.2 Execution Time(in sec) Measured in CCS profiler 53 ABBREVIATIONS AWGN additive White Gaussian Noise ADSL asymmetric digital subscriber line BPSK binary phase shift keying CCK complementary code keying CCS code composer studio CDMA code division multiple access DSP digital signal processors DAB digital audio broadcasting DVB digital video broadcasting DFT discrete Fourier transform DSSS direct sequence spread spectrum ETSI European Telecommunications Standards Institute FFT fast Fourier transform FDM frequency division multiplexing FEC forward error correction HDTV high definition television IEEE Institute of Electrical and Electronics Engineers 9 IFFT inverse Fourier transform IDFT inverse discrete Fourier transform ISI inter symbol interference ICI inter carrier interference LAN local area network NTSC National Television Systems Committee OFDM orthogonal frequency division multiplexing QPSK quadrature phase shift keying QAM quadrature amplitude modulation SNR signal to noise ratio TDM time division multiplexing TDMA time division multiple access UHF ultra high frequency VLSI very large scale integration WLAN wireless local area networks 10 NOMENCLATURE A C (t) Amplitude of the carrier ωc (t) Carrier frequency φc (t) Phase of the carrier ss (t) Complex signal of OFDM Fc Carrier frequency FS Sampling rate TS Length of the symbol in samples TG Length of the guard period in samples TFFT FFT period in samples Lc Time of the channel in samples Lp Cyclic prefix length in samples x (n) original signal X (k) Fourier transform of x (n) WNkn Twiddle factors Δf Subcarrier spacing NFFT size of the FFT f1 (n) even numbered samples f2 (n) odd numbered samples F1 (k) N/2-point DFT of f1 (n) F2 (k) N/2-point DFT of f2 (n) 11 CHAPTER 1 INTRODUCTION 12 1.1 INTRODUCTION The ever increasing demand for very high rate wireless data transmission calls for technologies which make use of the available electromagnetic resource in the most intelligent way. Key objectives are spectrum efficiency (bits per second per Hertz), robustness against multipath propagation, range, power consumption, and implementation complexity. These objectives are often conflicting, so techniques and implementations are sought which offer the best possible tradeoff between them. The Internet revolution has created the need for wireless technologies that can deliver data at high speeds in a spectrally efficient manner. However, supporting such high data rates with sufficient robustness to radio channel impairments requires careful selection of modulation techniques. Currently, the most suitable choice appears to be OFDM (Orthogonal Frequency Division Multiplexing).The main reason that the OFDM technique has taken a long time to become a prominence has been practical. It has been difficult to generate such a signal, and even harder to receive and demodulate the signal. The hardware solution, which makes use of multiple modulators and demodulators, was somewhat impractical for use in the civil systems. OFDM transmits a large number of narrowband carriers, closely spaced in the frequency domain. In order to avoid a large number of modulators and filters at the transmitter and complementary filters and demodulators at the receiver, it is desirable to be able to use modern digital signal processing techniques, such as fast Fourier transform (FFT). The ability to define the signal in the frequency domain, in software on VLSI (very large scale integration) processors, and to generate the signal using the inverse Fourier transform is the key to its current popularity. Although the original proposals were made a long time ago, it has taken some time for technology to catch up.OFDM is currently being used for digital audio and video broadcasting. OFDM for wireless LANs is being used every where now, is operating in the unlicensed bands and is also being considered as a serious candidate for fourth generation cellular systems. This chapter begins with an exposition of the principle motivation behind the work undertaken in this thesis. Following this section 1.3 provides literature survey on 13 OFDM. Section 1.4 discusses the contribution in this thesis. At the end, section 1.5 presents thesis outline. 1.2 MOTIVATION OFDM is the modulation technique used in many new and emerging broadband communication systems including wireless local area networks (WLANs), high definition television (HDTV) and 4G systems. To achieve high data rates OFDM is used in wireless LAN standards like IEEE 802.11a, IEEE 802.11g. The key component in an OFDM transmitter is an inverse fast Fourier transform (IFFT) and in the receiver, an FFT. The increasing computational power and performance capabilities of DSPs make them ideal for the practical implementation of OFDM functions. The motivation for using OFDM techniques over TDMA techniques is twofold. First, TDMA limits the total number of users that can be sent efficiently over a channel. In addition, since the symbol rate of each channel is high, problems with multipath delay spread invariably occur. In stark contrast, each carrier in an OFDM signal has a very narrow bandwidth (i.e. 1kHz); thus the resulting symbol rate is low. This results in the signal having a high degree of tolerance to multipath delay spread, as the delay spread must be very long to cause significant inter-symbol interference. 1.3 BACKGROUND LITERATURE SURVEY Orthogonal Frequency Division Multiplexing (OFDM) is an alternative wireless modulation technology to CDMA. OFDM has the potential to surpass the capacity of CDMA systems and provide the wireless access method for 4G systems. OFDM is a modulation scheme that allows digital data to be efficiently and reliably transmitted over a radio channel, even in multipath environments. In a typical orthogonal frequency division multiplexing (OFDM) broadband wireless communication system, a guard interval using cyclic prefix is inserted to avoid the intersymbol interference and the intercarrier interference. This guard interval is required to be at least equal to, or longer than the maximum channel delay spread. This method is very simple, but it reduces the transmission efficiency. This efficiency is very low in the communication systems, which inhibit a long channel delay spread with a small number of sub-carriers such as the IEEE 14 802.11a wireless LAN (WLAN). The origins of OFDM development started in the late 1950’s [11]. with the introduction of Frequency Division Multiplexing (FDM) for data communications. In 1966 Chang patented the structure of OFDM [2] and published [13] the concept of using orthogonal overlapping multi-tone signals for data communications. In 1971 Weinstein [14] introduced the idea of using a Discrete Fourier Transform (DFT) for implementation of the generation and reception of OFDM signals, eliminating the requirement for banks of analog subcarrier oscillators. This presented an opportunity for an easy implementation of OFDM, especially with the use of Fast Fourier Transforms (FFT), which are an efficient implementation of the DFT. This suggested that the easiest implementation of OFDM is with the use of Digital Signal Processing (DSP), which can implement FFT algorithms. It is only recently that the advances in integrated circuit technology have made the implementation of OFDM cost effective. The reliance on DSP prevented the wide spread use of OFDM during the early development of OFDM. It wasn’t until the late 1980’s that work began on the development of OFDM for commercial use, with the introduction of the Digital Audio Broadcasting (DAB) system. 1.3.1 Digital audio broadcasting DAB was the first commercial use of OFDM technology [5]. Development of DAB started in 1987 and services began in U.K and Sweden in1995. DAB is a replacement for FM audio broadcasting, by providing high quality digital audio and information services. OFDM was used for DAB due to its multipath tolerance. Broadcast systems operate with potentially very long transmission distances (20 100 km). As a result, multipath is a major problem as it causes extensive ghosting of the transmission. This ghosting causes Inter-Symbol Interference (ISI), blurring the time domain signal. For single carrier transmissions the effects of ISI are normally mitigated using adaptive equalization. This process uses adaptive filtering to approximate the impulse response of the radio channel. An inverse channel response filter is then used to recombine the blurred copies of the symbol bits. This process is however complex and 15 slow due to the locking time of the adaptive equalizer. Additionally it becomes increasing difficult to equalize signals that suffer ISI of more than a couple of symbol periods. OFDM overcomes the effects of multipath by breaking the signal into many narrow bandwidth carriers. This results in a low symbol rate reducing the amount of ISI. In addition to this, a guard period is added to the start of each symbol, removing the effects of ISI for multipath signals delayed less than the guard period. The high tolerance to multipath makes OFDM more suited to high data transmissions in terrestrial environments than single carrier transmissions. The data throughput of DAB varies from 0.6 - 1.8 Mbps depending on the amount of Forward Error Correction (FEC) applied. This data payload allows multiple channels to be broadcast as part of the one transmission ensemble. The number of audio channels is variable depending on the quality of the audio and the amount of FEC used to protect the signal. For telephone quality audio (24 kbps) up to 64 audio channels can be provided, while for CD quality audio (256 kb/s), with maximum protection, three channels are available. 1.3.2 Digital video broadcasting The development of the Digital Video Broadcasting (DVB) standards was started in 1993. DVB is a transmission scheme based on the MPEG-2 standard, as a method for point to multipoint delivery of high quality compressed digital audio and video. It is an enhanced replacement of the analogue television broadcast standard, as DVB provides a flexible transmission medium for delivery of video, audio and data services [6]. The DVB standards specify the delivery mechanism for a wide range of applications, including satellite TV (DVB-S), cable systems (DVB-C) and terrestrial transmissions (DVB-T). The physical layer of each of these standards is optimized for the transmission channel being used. Satellite broadcasts use a single carrier transmission, with QPSK modulation, which is optimized for this application as a single carrier allows for large Doppler shifts, and QPSK allows for maximum energy efficiency [7]. This transmission method is however unsuitable for terrestrial transmissions as multipath severely degrades the performance of high-speed single carrier transmissions. For this reason, OFDM was 16 used for the terrestrial transmission standard for DVB. The physical layer of the DVB-T transmission is similar to DAB, in that the OFDM transmission uses a large number of subcarriers to mitigate the effects of multipath. DVB-T allows for two transmission modes depending on the number of subcarriers used [8].The major difference between DAB and DVB-T is the larger bandwidth used and the use of higher modulation schemes to achieve a higher data throughput. The DVB-T allows for three subcarrier modulation schemes: QPSK, 16-QAM (Quadrature Amplitude Modulation) and 64- QAM; and a range of guard period lengths and coding rates. This allows the robustness of the transmission link to be traded at the expense of link capacity. 1.3.3 Hiperlan2 and IEEE802.11a Development of the European Hiperlan standard was started in 1995, with the final standard of HiperLAN2 being defined in June 1999. HiperLAN2 pushes the performance of WLAN systems, allowing a data rate of up to 54 Mbps [9]. HiperLAN2 uses 48 data and 4 pilot subcarriers in a 16 MHz channel, with 2 MHz on either side of the signal to allow out of band roll off. User allocation is achieved by using TDM, and subcarriers are allocated using a range of modulation schemes, from BPSK up to 64-QAM, depending on the link quality. Forward Error Correction is used to compensate for frequency selective fading. IEEE802.11a has the same physical layer as HiperLAN2 with the main difference between the standard corresponding to the higher-level network protocols used.HiperLAN2 is used extensively as an example OFDM system in this thesis. Since the physical layer of HiperLAN2 is very similar to the IEEE802.11a standard these examples are applicable to both standards. 1.3.4 Underwater Wireless Sensor Networks (UWSN) Recently, there has been a growing interest in monitoring aqueous environments including oceans, rivers, lakes, ponds,and reservoirs, etc.) for scientific exploration, commercial exploitation, and protection from attacks. The ideal vehicle for this type of extensive monitoring is a networked underwater wireless sensor distributed system, 17 referred to as the Underwater Wireless Sensor Network (UWSN). Establishing effective communications among a distributed set of both stationary and mobile sensors is one key step toward UWSNs. Since electromagnetic waves do not propagate well in underwater environments, underwater communications have to rely on other physical means, such as sound, to transmit signals . Unlike the rapid growth of wireless networks over radio channels, the development of underwater communication has been at a much slower pace. The last two decades have witnessed only two fundamental advances in underwater acoustic communications. One is the introduction of digital communication techniques, namely, noncoherent frequency shift keying (FSK), in the early 1980s, and the other is the application of coherent modulation, including phase shift keying (PSK) and quadrature amplitude modulation (QAM) in early 1990s. Existing underwater coherent communication has mainly relied on serial single-carrier transmission and equalization techniques over the challenging underwater acoustic media . As the data rates increase, the symbol durations decrease, and thus the same physical underwater channel contains more channel taps in the baseband discretetime model (easily on the order of several hundreds of taps).This poses great challenges for the channel equalizer. Receiver complexity will prevent any substantial rate improvement with existing approaches. Due to its low equalization complexity in the presence of highly-dispersive channels, multicarrier modulation in the form of orthogonal frequency division multiplexing (OFDM) has prevailed in recent broadband wireless systems. Motivated by the success of OFDM in radio channels, there is a recent re-emergence of interest in applying OFDM in underwater acoustic channels. 1.4 THESIS CONTRIBUTION Multicarrier modulation in the form of orthogonal frequency division multiplexing (OFDM) has been quite successful in broadband wireless communication over radio channels, e.g., wireless local area networks (IEEE 802.11a/g/n). Motivated by this fact, researchers have long attempted to apply OFDM in underwater acoustic channels. Recently, we have seen intensive investigations on underwater OFDM, including [2] on a low-complexity adaptive OFDM receiver, and [3, 4] on a pilot-tone based block-by-block receiver. As a senior design project, an undergraduate team at University of Connecticut 18 has demonstrated multicarrier OFDM transmission and reception in air and in a water tank, where the algorithms in [3, 4] are implemented by Matlab programs in two laptops [5]. In this Dissertation, in the first phase we simulated the OFDM transmission and reception algorithms of [3, 4] in MATLAB 7.2.and compared the results. In the second phase we generated the “c” code to execute on a TI TMS320C6713 DSP board with a processor running at 225 MHz. In-wired communications are successfully tested. We analyze the workload and identify the most time-consuming operations.. 1.5 THESIS OUTLINE Following this introduction chapter, Chapter2 describe the motivations, features of aquatic environment, the difficulties of underwater acoustic channels, and the open questions in mobile underwater sensor network design. Chapter3 provides an introduction to OFDM in general and outlines some of the problems associated with it. This chapter describes what OFDM is, and how it can be generated and received. It also looks at why OFDM is a robust modulation scheme and some of its advantages and disadvantages over single carrier modulation schemes. It also discusses the some of the applications of OFDM. Chapter 4 starts with features of Digital Signal Processors especially TMS3206000 (TMS320c6713DSK) family device which we used for the current modem design, and also discusses the design parameters of Transmitter and Receiver. Chapter 5 provides the results obtained in this thesis, and their discussions. It provides the OFDM system model used in the simulation. It shows the results of bit error rate performance against signal to noise ratio for different modulation schemes used for the current design. it also discusses about the simulation results of OFDM Frame Synchronization and probability of error occurring under different channels. This chapter ends up with the achievement of the thesis work, limitations of the work, and future directions of the work. 19 CHAPTER 2. UWSN 20 2.1. INTRODUCTION The earth is a water planet. Currently, there has been a growing interest in monitoring underwater mediums for scientific exploration, commercial exploitation, and attack protection. A distributed underwater wireless sensor network (UWSN) is the ideal vehicle for this monitoring. A scalable UWSN is a good solution for exploring the aquatic environments. By deploying scalable wireless sensor networks in 3-dimensional underwater space, each underwater sensor can monitor and find environmental events. The aqueous systems are also dynamic and processes happen within the water mass as it disperses within the environment. In a mobile underwater sensor network, the sensor mobility has two major benefits: 1. Mobile sensors injected in the current in relative large numbers can help to track changes in the water mass, thus provide 4D (space and time) environmental sampling. 2. Floating sensors can help to form dynamic monitoring coverage and increase system reusability. The self-organizing network of mobile sensors produces better supports in sensing, monitoring, surveillance, scheduling, underwater control, and failing tolerance. Mobile UWSNs have to use acoustic communications, since radio does not work well in underwater environments. Due to the unique features of large latency, low bandwidth, and high error rate, underwater acoustic channels bring much defiance to the protocol design. Furthermore, the best parts of underwater nodes are mobile due to water currents. This mobility is another problem to consider in the system design. 21 Fig. 2.1 Scenario of the mobile UWSN architecture 2.2. Characteristics of the environment 2.2.1. Basics of acoustic communications Underwater acoustic communications depend on path loss, noise, multi-path, Doppler spread, and high and variable propagation delay. All these aspects establish the temporal and spatial variability of the acoustic channel. Therefore the available bandwidth of the underwater acoustic channel is severely limited and dependent on both range and frequency. In long-range systems and shortrange system these factors lead to low bit rates. In addition, the communication range is reduced as compared to the terrestrial radio channel.Underwater acoustic communication links can be classified depending on their range. M oreover, acoustic links are classified as vertical and horizontal, according to the direction of the sound ray. Their propagation attributes differ consistently, especially with respect to time dispersion, multi-path spreads, and delay variance. Now, we analyze the factors that influence acoustic communications in order to state the challenges posed by the underwater channels for underwater sensor networking. 22 Path loss: • Attenuation: Is mainly caused by absorption due to conversion of acoustic energy into heat, which increases with distance and frequency.It is also caused by scattering and reverberation, refraction, and dispersion. Water depth is determinant in the attenuation. • Geometric Spreading: This refers to the spreading of sound energy as a result of the expansion of the wave-fronts. It increases with the propagation distance and is independent of frequency. There are two types of geometric spreading: spherical (Omni-directional point source), and cylindrical (horizontal radiation only). The cylindrical spreading appears in water with depth less than 100m (shallow water) because acoustic signals propagate with a cylinder bounded by the surface and the sea floor. When sea is deep enough the propagation range is not bounded so that spherical spreading applies. Noise: • Man made noise: This is mainly caused by machinery noise and shipping activity. • Ambient Noise: Is related to hydrodynamics, seismic and biological phenomena. Multi-path: • Multi-path propagation: This may be responsible for severe degradation of the acoustic communication signal, since it generates Inter-Symbol Interference. • The multi-path geometry: It depends on the link configuration. Vertical channels are characterized by little time dispersion, while horizontal 4 Desenvolupament, proves de camp i anàlisi de resultats en una xarxa de sensors channels may have extremely long multi-path spreads, whose value depend on the water depth. High delay and delay variance: • Delay: The propagation speed in the underwater acoustic channels is five orders of magnitude lower than in the radio channel. This large propagation delay can reduce the throughput of the system considerably. 23 • Delay variance: The very high delay variance is even more harmful for efficient protocol design, as it prevents from accurately estimating the round trip time, key measure for many common communication protocols. Doppler spread: • The Doppler frequency spread can be significant in underwater acoustic channels, causing degradation in the performance of digital communications. High data rate communications cause many adjacent symbols to interfere at the receiver, requiring sophisticated signal processing to deal with the generated ISI. 2.2.2. Underwater acoustic channels Underwater acoustic channels are temporally spatially and variable due to the characteristics of the transmission medium and physical properties of the environments. The signal propagation speed in underwater acoustic channel is about 1.5 × 103 m/sec. The convenient bandwidth of underwater acoustic channels is limited and dramatically depends on both transmission range and frequency. The acoustic band under water is restricted due to absorption. The bandwidth of underwater acoustic channels working over several kilometers is about several tens of kbps, whereas short-range systems over several tens of meters can reach at hundreds of kbps. The path loss, noise, multipath, and Doppler spread affect the underwater acoustic communication channels. All these factors generate high bit-error and delay variance. 2.2.3. Distinctions between mobile UWSNs and ground-based sensor networks A mobile UWSN is very different from any ground-based sensor network in the following aspects: • Communication Method: Electromagnetic waves cannot propagate over a long distance in underwater environments. Each underwater wireless link features large latency and low-bandwidth. Due to such distinct network dynamics, communication protocols used in ground-based sensor networks may not be appropriate in underwater sensor networks. • Node Mobility: The sensor nodes in ground-based sensor networks are fixed, though it is possible to implement interactions between these static sensor nodes and a limit number of mobile nodes. However, the best part of underwater sensor 24 nodes are with low or medium mobility due to water current and other underwater activities. From experimental observations, underwater objects may move at the speed of 3-6 kilometers per hour in a typical underwater condition. 2.2.4. Current underwater network systems An underwater sensor network is a next step forward with respect to existing small-scale Underwater Acoustic Networks (UANs). UANs are associations of nodes that collect data using remote telemetry or assuming point-to-point communications. The different between UANs and underwater sensor networks are the following: • Scalability: A mobile underwater sensor network is a scalable sensor network, which relies on localized sensing and coordinated networking among large numbers of sensors. In contrast, an existing underwater acoustic network is a small-scale network relying on data collecting strategies like remote telemetry or assuming that communication is pointto- point. In remote telemetry, long-range signals remotely collect data. In point-to-point communication, a multi-access technique is not necessary. • Self-organization: Usually, in underwater acoustic networks nodes are fixed, while a mobile underwater sensor network is a self-organizing network. Underwater sensor nodes may be redistributed and moved by the aqueous processes of advection and dispersion. Thus, sensors should automatically adjust their buoyancy, moving up and down based on measured data density. In this way, sensors are mobile in order to track changes in the water mass rather than make observations at a fixed point. • Localization: In underwater acoustic networks sensors localization is not desired because nodes are usually fixed. In mobile underwater sensor networks, localization is required because the majority of the sensors are mobile with the current. Determining the locations of mobile sensors in aquatic environments is very challenging. We need to face the limited communication capabilities of acoustic channels. Moreover, we need improving the localization accuracy 25 CHAPTER 3 OFDM 26 3.1 INTRODUCTION The principle of orthogonal frequency division multiplexing (OFDM) modulation has been in existence for several decades. However, in recent years these techniques have quickly moved out of textbooks and research laboratories and into practice in modern communications systems. The techniques are employed in data delivery systems over the phone line, digital radio and television, and wireless networking systems [14]. What is OFDM? And why has it recently become so popular? This chapter is organized as follows. Following this introduction, section 3.2, 3.3 gives brief details about single carrier modulation, FDM modulation systems. Section 3.4 discusses definition of orthogonality, and principle of OFDM.section 3.5 discusses the how FFT maintains orthogonality.section 3.6 discusses the generation and reception of OFDM in detail. Section 3.7 addresses about the guard period used in OFDM systems. Section 3.8 presents the advantages, disadvantages and applications of OFDM. Finally section 3.9 concludes the chapter. 3.2 THE SINGLE CARRIER MODULATION SYSTEM Fig.3.1 Single carrier spectrum A typical single-carrier modulation spectrum is shown in Figure 3.1. A single carrier system modulates information onto one carrier using frequency, phase, or amplitude adjustment of the carrier. For digital signals, the information is in the form of bits, or collections of bits called symbols, that are modulated onto the carrier. As higher bandwidths (data rates) are used, the duration of one bit or symbol of information becomes smaller. The system becomes more susceptible to loss of information from 27 impulse noise, signal reflections and other impairments. These impairments can impede the ability to recover the information sent. In addition, as the bandwidth used by a single carrier system increases, the susceptibility to interference from other continuous signal sources becomes greater. This type of interference is commonly labeled as carrier wave (CW) or frequency interference. 3.3 FREQUENCY DIVISION MULTIPLEXING MODULATION SYSTEM A typical Frequency division multiplexing signal spectrum is shown in figure 3.2.FDM extends the concept of single carrier modulation by using multiple sub carriers within the same single channel. The total data rate to be sent in the channel is divided between the various sub carriers. The data do not have to be divided evenly nor do they have to originate from the same information source. Advantages include using separate modulation demodulation customized to a particular type of data, or sending out banks of dissimilar data that can be best sent using multiple, and possibly different, modulation schemes. Fig 3.2 FDM signal spectrum Current national television systems committee (NTSC) television and FM stereo multiplex are good examples of FDM. FDM offers an advantage over single-carrier modulation in terms of narrowband frequency interference since this interference will only affect one of the frequency sub bands. The other sub carriers will not be affected by the interference. Since each sub carrier has a lower information rate, the data symbol periods in a digital system will be longer, adding some additional immunity to impulse noise and reflections. FDM systems usually require a guard band between modulated sub carriers to prevent the spectrum of one sub carrier from interfering with another. These 28 guard bands lower the system’s effective information rate when compared to a single carrier system with similar modulation. 3.4 ORTHOGONALITY AND OFDM If the FDM system above had been able to use a set of sub carriers that were orthogonal to each other, a higher level of spectral efficiency could have been achieved. The guard bands that were necessary to allow individual demodulation of sub carriers in an FDM system would no longer be necessary. The use of orthogonal sub carriers would allow the sub carriers’ spectra to overlap, thus increasing the spectral efficiency. As long as orthogonality is maintained, it is still possible to recover the individual sub carriers’ signals despite their overlapping spectrums. If the dot product of two deterministic signals is equal to zero, these signals are said to be orthogonal to each other. Orthogonality can also be viewed from the standpoint of stochastic processes. If two random processes are uncorrelated, then they are orthogonal. Given the random nature of signals in a communications system, this probabilistic view of orthogonality provides an intuitive understanding of the implications of orthogonality in OFDM. OFDM is implemented in practice using the discrete Fourier transform (DFT). Recall from signals and systems theory that the sinusoids of the DFT form an orthogonal basis set, and a signal in the vector space of the DFT can be represented as a linear combination of the orthogonal sinusoids. One view of the DFT is that the transform essentially correlates its input signal with each of the sinusoidal basis functions. If the input signal has some energy at a certain frequency, there will be a peak in the correlation of the input signal and the basis sinusoid that is at that corresponding frequency. This transform is used at the OFDM transmitter to map an input signal onto a set of orthogonal sub carriers, i.e., the orthogonal basis functions of the DFT. Similarly, the transform is used again at the OFDM receiver to process the received sub carriers. The signals from the sub carriers are then combined to form an estimate of the source signal from the transmitter. The orthogonal and uncorrelated nature of the sub carriers is exploited in OFDM with powerful results. Since the basis functions of the DFT are uncorrelated, the correlation performed in the DFT for a given sub carrier only sees energy for that corresponding sub carrier. The energy from other sub 29 carriers does not contribute because it is uncorrelated. This separation of signal energy is the reason that the OFDM sub carriers’ spectrums can overlap without causing interference. 3.5 MATHEMATICAL ANALYSIS: With an overview of the OFDM system, it is valuable to discuss the mathematical definition of the modulation system. It is important to understand that the carriers generated by the IFFT chip are mutually orthogonal. This is true from the very basic definition of an IFFT signal. This will allow understanding how the signal is generated and how receiver must operate. Mathematically, each carrier can be described as a complex wave: SC (t) = A C (t)e j( ωc (t ) +Φc(t )) (3.1) The real signal is the real part of sc (t). Ac (t) and φc (t), the amplitude and phase of the carrier, can vary on a symbol by symbol basis. The values of the parameters are constant over the symbol duration period t. OFDM consists of many carriers. Thus the complex signal Ss(t) is represented by: 1 N −1 ss (t) = ∑ A N (t)e j[ ωn t +φn (t )] N n =0 (3.2) Where This is of course a continuous signal. If we consider the waveforms of each component of the signal over one symbol period, then the variables Ac (t) and φc (t) take on fixed values, which depend on the frequency of that particular carrier, and so can be rewritten: φn (t) = φn A n (t) = A n If the signal is sampled using a sampling frequency of 1/T(48kHz), then the resulting signal is represented by: ss (kT) = 1 N −1 A n e[ j( ω0 + nΔω)kT +φn ] ∑ N n =0 30 (3.3) At this point, we have restricted the time over which we analyze the signal to N(1024) samples. It is convenient to sample over the period of one data symbol. Thus we have a relationship: t=NT If we now simplify equation 3.3, without a loss of generality by letting ω0=0, then the signal becomes: 1 N −1 s s (kT) = ∑ A n e jφn e j(nΔω)kT N N =0 (3.4) Now equation 3.4 can be compared with the general form of the inverse Fourier transform: 1 g (kT ) = N In Equation 3.4 the function A n e jφ n 2π kn n N G ( )e ∑ NT n =0 N −1 (3.5) is no more than a definition of the signal in the sampled frequency domain, and s (kT) is the time domain representation. Eqns.4 and 5 are equivalent if: This is the same condition that was required for orthogonality Thus, one consequence of maintaining orthogonality is that the OFDM signal can be defined by using Fourier transform procedures. 3.6 OFDM GENERATION AND RECEPTION OFDM signals are typically generated digitally due to the difficulty in creating large banks of phase locks oscillators and receivers in the analog domain. Fig 3.3 shows the block diagram of a typical OFDM transceiver [15]. The transmitter section converts digital data to be transmitted, into a mapping of subcarrier amplitude and phase. It then transforms this spectral representation of the data into the time domain using an Inverse Discrete Fourier Transform (IDFT). The Inverse Fast Fourier Transform (IFFT) performs the same operations as an IDFT, except that it is much more computationally efficiency, and so is used in all practical systems. In order to transmit the OFDM signal the calculated time domain signal is then mixed up to the required frequency. 31 Fig 3.3 Block diagram of a basic OFDM transceiver. The receiver performs the reverse operation of the transmitter, mixing the RF signal to base band for processing, then using a Fast Fourier Transform (FFT) to analyze the signal in the frequency domain [16]. The amplitude and phase of the sub carriers is then picked out and converted back to digital data. The IFFT and the FFT are complementary function and the most appropriate term depends on whether the signal is being received or generated. In cases where the signal is independent of this distinction then the term FFT and IFFT is used interchangeably. 3.6.1 Error Correction Codes: When an OFDM transmission occurs in a multipath radio environment, frequency selective fading can result in groups of sub carriers being heavily attenuated, which in turn can result in bit errors. These nulls in the frequency response of the channel can cause the information sent in neighbouring carriers to be destroyed, resulting in a clustering of the bit errors in each symbol. Most Forward Error Correction (FEC) schemes(convolution code(constraint length 7,rate=1/2) tend to work more effectively if the errors are spread evenly, rather than in large clusters. 32 Figure 3.4. Convolutional encoder (K=7) 3.6.2 Data Interleaving Interleaving aims to distribute transmitted bits in time or frequency or both to achieve desirable bit error distribution after demodulation .All encoded data bits shall be interleaved by a block interleaver with a block size corresponding to the number of bits in a single OFDM symbol, NCBPS(288).The interleaver is defined by a two-step permutation. The first permutation ensures that adjacent coded bits are mapped onto nonadjacent sub carriers. The second ensures that adjacent coded bits are mapped alternately onto less and more significant bits of the constellation and, thereby, long runs of low reliability (LSB) bits are avoided. Deinterleaving is the opposite operation of interleaving; i.e., the bits are put back into the original order. 3.6.3 Subcarrier modulation • Modulation One way to communicate a message signal whose frequency spectrum does not fall within that fixed frequency range, or one that is otherwise unsuitable for the channel, is to change a transmittable signal according to the information in the message signal. This alteration is called modulation, and it is the modulated signal that is transmitted. The receiver then recovers the original signal through a process called demodulation. Modulation is a process by which a carrier signal is altered according to information in a message signal. The carrier frequency, denoted Fc, is the frequency of the carrier signal. 33 The sampling rate, Fs, is the rate at which the message signal is sampled during the simulation. The frequency of the carrier signal is usually much greater than the highest frequency of the input message signal. The Nyquist sampling theorem requires that the simulation sampling rate Fs be greater than two times the sum of the carrier frequency and the highest frequency of the modulated signal, in order for the demodulator to recover the message correctly. • Baseband versus Pass band Simulation For a given modulation technique, two ways to simulate modulation techniques are called baseband and pass band. Baseband simulation requires less computation. In this thesis, baseband simulation will be used. • Digital Modulation Techniques a) Amplitude Shift Key (ASK) Modulation Fig 3.4 ASK modulation In this method the amplitude of the carrier assumes one of the two amplitudes dependent on the logic states of the input bit stream. A typical output waveform of an ASK modulation is shown in Fig3.4. b) Frequency Shift Key (FSK) Modulation In this method the frequency of the carrier is changed to two different frequencies depending on the logic state of the input bit stream. The typical output waveform of an 34 FSK is shown in Fig 3.5. Notice that logic high causes the centre frequency to increase to a maximum and a logic low causes the centre frequency to decrease to a minimum. Fig. 3.5 FSK Modulation c) Phase Shift Key (PSK) Modulation With this method the phase of the carrier changes between different phases determined by the logic states of the input bit stream. There are several different types of Phase Shift Key (PSK) modulators. These are: 1 Two-phase (2 PSK) 2 Four-phase (4 PSK) 3 Eight-phase (8 PSK) 4 Sixteen-phase (16 PSK) etc. d) Quadrature Amplitude Modulation (QAM) QAM is a method for sending two separate (and uniquely different) channels of information. The carrier is shifted to create two carriers namely the sine and cosine versions. The outputs of both modulators are algebraically summed and the result of which is a single signal to be transmitted, containing the In-phase (I) and Quadrature (Q) information. The set of possible combinations of amplitudes is a pattern of dots known as a QAM constellation. Once each subcarrier has been allocated bits for transmission, they are mapped using a 35 modulation scheme to a subcarrier amplitude and phase, which is represented by a complex In-phase and Quadrature-phase (IQ) vector. Fig 3.6 shows an example of subcarrier modulation mapping. This example shows 16-QAM, which maps 4 bits for each symbol. Each combination of the 4 bits of data corresponds to a unique IQvector, shown as a dot on the figure. A large number of modulation schemes are available allowing the number of bits transmitted per carrier per symbol to be varied [17]. 64qam constellation diagram 8 6 4 2 0 -2 -4 -6 -8 -8 -6 -4 -2 0 2 4 6 8 Fig 3.6 IQ modulation constellation, 64-QAM Subcarrier modulation can be implemented using a lookup table, making it very efficient to implement. In the receiver, mapping the received IQ vector back to the data word performs sub carrier demodulation. 3.7 OFDM symbols The serial signal is transformed to parallel alter the modulation using a reshape block. 3.7.1 OFDM Transmitter OFDM (orthogonal frequency division multiplexing) transmission uses 1024 Sub carriers, 256 pilots,56 null carriers, 1024-point FFTs, and a 128-sample cyclic prefix. The figure illustrates the OFDM transmission. 36 The OFDM Transmitter subsystem performs the following task: • Pilots and preamble insertion • IFFT • Cyclic prefix addition 3.7.2 Pilot insertion: In each OFDM symbol, four of the sub carriers are dedicated to pilot signals in order to make the coherent detection robust against frequency offsets and phase noise. These pilot signals shall be placed equally in sub carriers .. Figure.3.8. 1024 sub carriers, 256 pilots equally spaced As explained, four pilots are inserted in each OFDM symbol. Pilots . Two fifty six pilots are inserted in each OFDM symbol in the required subcarriers. The insertion is achieved with a matrix concatenation block, pilots are inserted in its proper place in each symbol. 3.7.3 Preamble The preamble is used to detect the start of the packet and to synchronize the receiver as well. The OFDM symbols should be packed into frames before being sent. A preamble is added at the beginning of each frame.[23] It helps the receiver to estimate phase and amplitude errors, thereby allowing it to correct the received signal. In the simulation 37 exposed in this work a preamble consisting on two long training symbols, like the following one, has been used: L[-256,255}= {…..1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1,-1, 1, 1, -1,1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1,1, -1, -1, 1,-1, 1, -1, 1, 1, 1, 1………} A long OFDM training symbol consists of 512 sub carriers (including a zero value at DC). 3.8 Frequency to time domain conversion Fig 3.9. OFDM generation, IFFT(1024) stage After the subcarrier modulation stage each of the data sub carriers is set to amplitude and phase based on the data being sent and the modulation scheme. All unused sub carriers are set to zero. This sets up the OFDM signal in the frequency domain. An IFFT is then used to convert this signal to the time domain, allowing it to be transmitted. Fig 3.7 shows the IFFT section of the OFDM transmitter. In the frequency domain, before applying the IFFT, each of the discrete samples of the IFFT corresponds to an individual sub carrier. Most of the sub carriers are modulated with data. The outer sub carriers are unmodulated and set to zero amplitude. These zero sub carriers provide a frequency guard band before the nyquist frequency and effectively act as an interpolation of the 38 signal and allows for a realistic roll off in the analog anti-aliasing reconstruction filters. 3.9 RF modulation The output of the OFDM modulator generates a base band signal, which must be mixed up to the required transmission frequency. This can be implemented using analog techniques as shown in Fig 3.8 or using a Digital up Converter as shown in Fig 3.9. Fig 3.8 RF modulation of complex base band OFDM signal, using analog techniques 3.10 GUARD PERIOD For a given system bandwidth the symbol rate for an OFDM signal is much lower than a single carrier transmission scheme. For example for a single carrier BPSK modulation, the symbol rate corresponds to the bit rate of the transmission. However for OFDM the system bandwidth is broken up into NC sub carriers, resulting in a symbol rate that is NC times lower than the single carrier transmission. This low symbol rate makes OFDM naturally resistant to effects of Inter-Symbol Interference (ISI) caused by multipath propagation. Multipath propagation is caused by the radio transmission signal reflecting off objects in the propagation environment, such as walls, buildings, mountains, etc. These multiple signals arrive at the receiver at different times due to the transmission distances being different. This spreads the symbol boundaries causing energy leakage between them. The effect of ISI on an OFDM signal can be further 39 improved by the addition of a guard period to the start of each symbol. This guard period is a cyclic copy that extends the length of the symbol waveform. Each sub carrier, in the data section of the symbol, (i.e. the OFDM symbol with no guard period added, which is equal to the length of the IFFT size used to generate the signal) has an integer number of cycles. Because of this, placing copies of the symbol end-to-end results in a continuous signal, with no discontinuities at the joins. Thus by copying the end of a symbol and appending this to the start results in a longer symbol time. Fig 3.10 shows the insertion of a guard period. Fig. 3.10 Addition of a guard period to an OFDM signal The total length of the symbol is TS=TG + TFFT, where Ts is the total length of the symbol in samples, TG is the length of the guard period in samples, and TFFT is the size of the IFFT used to generate the OFDM signal. In addition to protecting the OFDM from ISI, the guard period also provides protection against time-offset errors in the receiver. The effects of multipath propagation and how cyclic prefix reduces the inter symbol interference is discussed in detail in chapter4. 3.10.1 Protection against time offset To decode the OFDM signal the receiver has to take the FFT of each received symbol, to work out the phase and amplitude of the sub carriers. For an OFDM system that has the same sample rate for both the transmitter and receiver, it must use The same FFT size at both the receiver and transmitted signal in order to maintain sub carrier orthogonality. 40 Each received symbol has TG + TFFT samples due to the added guard period. The receiver only needs TFFT samples of the received symbol to decode the signal [18]. The remaining TG samples are redundant and are not needed. For an ideal channel with no delay spread the receiver can pick any time offset, up to the length of the guard period, and still get the correct number of samples, without crossing a symbol boundary. Because of the cyclic nature of the guard period changing the time offset simply results in a phase rotation of all the sub carriers in the signal. The amount of this phase rotation is proportional to the sub carrier frequency, with a sub carrier at the nyquist frequency changing by 180° for each sample time offset. Provided the time offset is held constant from symbol to symbol, the phase rotation due to a time offset can be removed out as part of the channel equalization [19]. In multipath environments ISI reduces the effective length of the guard period leading to a corresponding reduction in the allowable time offset error. The addition of guard period removes most of the effects of ISI. However in practice, multipath components tend to decay slowly with time, resulting in some ISI even when a relatively long guard period is used. 3.10.2 Guard period overhead and sub carrier spacing Adding a guard period lowers the symbol rate, however it does not affect the sub carrier spacing seen by the receiver. The sub carrier spacing is determined by the sample rate and the FFT size used to analyze the received signal. Δf = FS N FFT (3.6) In Equation (3.6), Δf is the sub carrier spacing in Hz, Fs is the sample rate in Hz, and NFFT is the size of the FFT. The guard period adds time overhead, decreasing the overall spectral efficiency of the system. 3.10.3 Intersymbol interference Assume that the time span of the channel is Lc samples long. Instead of a single carrier with a data rate of R symbols/ second, an OFDM system has N subcarriers, each with a data rate of R/N symbols/second. Because the data rate is reduced by a factor of N, the 41 OFDM symbol period is increased by a factor of N. By choosing an Fig 3.11 Example of intersymbol interference. The green symbol was transmitted first, followed by the blue symbol. Appropriate value for N, the length of the OFDM symbol becomes longer than the time span of the channel. Because of this configuration, the effect of intersymbol interference is the distortion of the first Lc samples of the received OFDM symbol. An example of this effect is shown in Fig 3.11. By noting that only the first few samples of the symbol are distorted, one can consider the use of a guard interval to remove the effect of intersymbol interference. The guard interval could be a section of all zero samples transmitted in front of each OFDM symbol [20]. Since it does not contain any useful information, the guard interval would be discarded at the receiver. If the length of the guard interval is properly chosen such that it is longer than the time span of the channel, the OFDM symbol itself will not be distorted. Thus, by discarding the guard interval, the effects of intersymbol interference are thrown away as well. 3.10.4 Intrasymbol interference The guard interval is not used in practical systems because it does not prevent an OFDM symbol from interfering with itself. This type of interference is called intrasymbol interference [21]. The solution to the problem of intrasymbol interference involves a discrete-time property. Recall that in continuous-time, a convolution in time is equivalent to a multiplication in the frequency-domain. This property is true in discrete-time only if the signals are of infinite length or if at least one of the signals is periodic over the range of the convolution. It is not practical to have an infinite-length OFDM symbol, however, it is possible to make the OFDM symbol appear periodic. This periodic form is achieved by replacing the guard interval with something known as a cyclic prefix of length Lp samples. The cyclic prefix is a replica of the last Lp 42 samples of the OFDM symbol where Lp > Lc. Since it contains redundant information, the cyclic prefix is discarded at the receiver. Like the case of the guard interval, this step removes the effects of intersymbol interference. Because of the way in which the cyclic prefix was formed, the cyclically-extended OFDM symbol now appears periodic when convolved with the channel. An important result is that the effect of the channel becomes multiplicative. In a digital communications system, the symbols that arrive at the receiver have been convolved with the time domain channel impulse response of Length Lc samples. Thus, the effect of the channel is convolution. In order to undo the effects of the channel, another convolution must be performed at the receiver using a time domain filter known as an equalizer. The length of the equalizer needs to be on the order of the time span of the channel. The equalizer processes symbols in order to adapt its response in an attempt to remove the effects of the channel. Such an equalizer can be expensive to implement in hardware and often requires a large number of symbols in order to adapt its response to a good setting. In OFDM, the time-domain signal is still convolved with the channel response [22]. However, the data will ultimately be transformed back into the frequencydomain by the FFT in the receiver. Because of the periodic nature of the cyclicallyextended OFDM symbol, this time-domain convolution will result in the multiplication of the spectrum of the OFDM signal (i.e., the frequency- domain constellation points) with the frequency response of the channel. The result is that each sub carrier’s symbol will be multiplied by a complex number equal to the channel’s frequency response at that sub carrier’s frequency. Each received sub carrier experiences a complex gain (amplitude and phase distortion) due to the channel. In order to undo these effects, a frequency- domain equalizer is employed. Such an equalizer is much simpler than a time-domain equalizer. The frequency domain equalizer consists of a single complex multiplication for each sub carrier. For the simple case of no noise, the ideal value of the equalizer’s response is the inverse of the channel’s frequency response [24]. 43 3.11 Advantages and Disadvantages of OFDM as Compared to Single Carrier modulation 3.11.1 Advantages 1 Makes efficient use of the spectrum by allowing overlap. 2 By dividing the channel into narrowband flat fading sub channels, OFDM is more resistant to frequency selective fading than single carrier systems. 3 Eliminates ISI and IFI through use of a cyclic prefix. 4 Using adequate channel coding and interleaving one can recover symbols lost due to the frequency selectivity of the channel. 5 Channel equalization becomes simpler than by using adaptive equalization techniques with single carrier systems. 6 It is possible to use maximum likelihood decoding with reasonable complexity. 7 OFDM is computationally efficient by using FFT techniques to implement the modulation and demodulation functions. 8 Is less sensitive to sample timing offsets than single carrier systems are. 9 Provides good protection against co-channel interference and impulsive parasitic noise. 3.11.2 Disadvantages 1 The OFDM signal has a noise like amplitude with a very large dynamic range, therefore it requires RF power amplifiers with a high peak to average power ratio. 2 It is more sensitive to carrier frequency offset and drift than single carrier systems are due to leakage of the DFT. 44 CHAPTER 4 DIGITAL SIGNAL PROCESSING 45 4.1 INTRODUCTION TO DSP Digital Signal processing (DSP) is one of the fastest growing fields of technology and computer science in the world. In today's world almost everyone uses DSPs in their everyday life but, unlike PC users, almost no one knows that he/she is using DSPs. Digital Signal Processors are special purpose microprocessors used in all kind of electronic products, from mobile phones, modems and CD players to the automotive industry; medical imaging systems to the electronic battlefield and from dishwashers to satellites.[17] DSP is all about analysing and processing real-world or analogue signals, i.e. the kind of signals that humans interact with, for example speech. These signals are converted to a format that computers can understand (digital) and, once this has happened, process. The following diagram shows the typical component parts of a DSP system. Figure.4.1. Typical components of a DSP system In order to process analog signals with digital computers they must first be converted to digital signals using analog to digital converters. Similarly, the digital signals must be converted back to analog ones for them to be used outside the computer. 46 There are many reasons why we process these analog signals in the digital world. Traditional signal processing was achieved by using analogue components such as resistors, capacitors and inductors. However, the inherent tolerance associated with this components, temperature and voltage changes and mechanical vibrations can dramatically affect the effectiveness of analogue circuitry. On the other hand, DSP is inherently stable, reliable and repeatable.With DSP it is easy to chance, correct or update applications. Additionally, DSP reduces noise susceptibility, chip count, development time, cost and power consumption. 4.2 HOW DSPs ARE DIFFERENT FROM OTHER MICROPROCESSORS DSP has many unique properties. It is a Super Mathematician thanks to its arithmetic logic units and its optimized multipliers. DSPs do really well in application where the data to be processed is arriving in a continuous flow, often referred to as a stream. It uses almost no power compared to a PC microprocessor. Next, some features that make DSP different from other microprocessors are going to be described: 1. High speed arithmetic: Most DSP operations require additions and multiplications together. DSP proccesors usually have hardware adders and multipliers which can be used in parallel within a single instruction, so both, an addition and a multiplication, can be executed in a single cycle. Thus, DSP processors arithmetic speed is very high compared with microprocessors. 2. Data transfer to and from real world. In a typical DSP application the processor will have to deal with multiple sources of data from the real world. In each case, the processor may have to be able to receive and transmit data in real time, without interrupting its internal mathematical operations. These multiple communications routes mark the most important distinctions between DSP processors and general purpose processors. 3. Multiple access memory architectures: Typical DSP operations require many simple additions and multiplications. To fetch the two operations in a single instruction cycle the two memory accesses should be able to operate 47 simultaneously. For this reason DSP processors usually support multiple memory accesses in the same instruction cycle. 4. Digital Signal Processors also have the advantage of consuming less power and being relatively cheap. 4.3 INTRODUCTION TO THE TMS320C6000 PLATFORM OF DIGITAL SIGNAL PROCESSORS The DSP architecture is a well defined but quite complex hardware structure that needs much time to be explained in detail. An overview of this architecture is going to be exposed here in order to make it as much understandable as possible. The TMS320C6000 family of processors from the company Texas Instruments is designed to meet the real-time requirements of high performance digital signal processing. With a performance of up to 2000 million instructions per second (MIPS) at 250 MHz and a complete set of development tools, the TMS320C6000 DSPs offer cost effective solutions to higher-performance DSP programming challenges. The TMS320C6000 DSPs give the system architects unlimited possibilities to differentiate their products. High performance, easy use, and affordable pricing make the TMS320c6000 platform the ideal solution for a large number of applications (multichannel multifunction applications such as: pooled modems, wireless local loop base stations, multichannel telephony systems, etc). First of all, a DSP device must be considered as a specific microprocessor whose components have been linked in a clever way to process faster. The TMS320C6xxx family are processors currently running at a clock speed of up to 300MHz (225MHz in the TMS320C6713 case). The C62xx processors are fixed-point processors whereas the C67xx are floating-point processors. These refer to the format used to store and manipulate numbers withing the devices. Figure 24 shows the main components of the TMS320C6000 DSP under a block diagram form. It is composed of: 1. External Memory Interface (EMIF) to access external data at the specified address. 48 2. Memory, which is the internal memory where a set of instructions and data values can be stored (FFT algorithm for example). 3. Peripherals are the possible connectable devices that can be associated with the DSP (DMA/EDMA, Serial port, Timer/Counter…). 4. Internal buses; they allow the components to quickly communicate together differentiating addresses and data. 5. CPU, which is the most important component since it performs all the operation. Figure .4.2.TMS320C6000 block diagram 4.3.1 TMS320C6713 DSP Description The TMS320C67 DSPs (including the TMS320C6713 device) compose the floating– point DSP generation in the TMS320C6000 DSP platform. The TMS320C6713 (C6713) device is based on the high-performance, advanced VelociTI very-long-instruction-word (VLIW) architecture developed by Texas Instruments (TI), making this DSP an excellent choice for multichannel and multifunction applications. The DSK features the TMS320C6713 DSP, a 225 MHz device delivering up to 1800 million instructions per second (MIPs) and 1350 MFLOPS. This DSP generation is designed for applications that require high precision accuracy. The C6713 is based on the TMS320C6000 DSP platform designed to fit the needs of high-performing high-precision applications such as pro-audio, medical and diagnostic. Other hardware features of the TMS320C6713 DSK board include: 49 • Embedded JTAG support via USB • High-quality 24-bit stereo codec • Four 3.5mm audio jacks for microphone, line in, speaker and line out • 512K words of Flash and 8 MB SDRAM • Expansion port connector for plug-in modules • On-board standard IEEE JTAG interface • +5V universal power supply The DSP environment used in this project is the TMS320C6713 DSK. Figure 25 shows the architecture of the TMS320C6713 DSK. Key features include: Figure .4.3. Architecture of the TMS320C6713 DSK 50 4.4 DSP IMPLEMENTATION Fig.4.4.Implemented on TMS320c6713DSP using TMDSDSK6713 Evaluation Board In this work we used two 6713DSK’s for testing. One is used as Transmitter and other as Receiver. The boards connected by stereo cables for data transmission. CCS3.1v is used for code generation Normally Design Parameters for Designing a Wireless Modem are 1.Bandwidth 2.Multipath Delay Spread 3.Data rate Based on above parameters, The following specifications we considered for the current design of Acoustic Modem. 1. Carrier frequency 12.5kHz 2. Sampling rate 48kHz 3. 1024 sub carriers,256 pilot carriers,56 null carriers 4. Band width 5kHz 5. Guard Interval Tg=25 msec. 6. OFDM Symbol Duration T= 0.2298(0.2048+0.025) sec. 7. Preamable duration 0.266sec 8. Sub carrier frequency spacing is 5Hz(1/(T-Tg)) 51 9. Data rate 3.1kbps 10. QPSK sub carrier Modulation 11. FEC code (convoutional) 4.4.1 TRANSMITTER DESIGN We taken audio signal as input to the system,To sample audio signals, one of the multichannel buffered serial ports (McBSPs) is configured to connect the AIC23 codec. The audio data is transferred between the codec and the internal L2 memory through the enhanced direct memory access (EDMA) channel. To save the raw audio data from the AIC23 codec continuously, the commonly-known double-buffering method is used. When one of the two buffers is filled, a DMA interrupt is initiated and the data is passed to the interrupt service routine (ISR) and then is processed. At the same time, the codec keeps sampling and saves data into the other buffer. So data sampling and processing can be done simultaneously and no incoming signals are missed even if the DSP is processing previously received data. Processing steps: 1. The stored data to be converted into binary stream for transmission. 2. Forward error correction convolution code is considered with constraint length7,rate=1/2. decreased the data rate from 6.2 kbps to 3.1 kbps. 3. Block interleaving is taken place to avoid burst of errors .where adjacent bits mapped onto non adjacent sub carriers. 4. K/4(256) equally spacing pilots inserted with unit amplitude and zero phase for channel estimation. here search is one dimensional. 5. Kn(56)null sub carriers inserted in the middle portion for the over sampling and also to mitigate the effect of ICI and ISI.. 6. 1024 ifft provides tme domain complex output with real and imaginary values are cyclically extended by K/8 samples to avoid the mutipah effects. 52 7. To reduce the effct of ICI/ISI we do apply RRC windowing to provide constant envelope for the particular ofdm symbol duration . 8. At last that OFDM symbols get modulated by qpsk carrier(12.5kHz) to tranimit through the cable. 9. preamble appended to the OFDM symbol at the beginning for timing and frequency synchronization (to know ofdm frame starting). 10. all the above specifications adopted from IEEE802.11a Standard Figure 4.5. Stored speech signal in Buffer 4.4.2 CHANNELNOISE: 1. AWGN (Additive White Gaussian Noise) 2. Multipath channel noise(real world exponential channel with delay spread 50msec,max excess delay 276.3 msec,7tap filter) 3. Carrier frequency offset(0.2Hz,40%ppm of operating frequency(12.5khz) 4.4.3 RECEIVER: 1. Qpsk Demodultion takes place to extract the binay symols from carrier.(techinge applied PLL. 53 2. Autocorrelation and cross correlation peaks of long preamble of two period sequences with 60% cyclic prefix decide the starting symbol of OFDM frame.This technique provides us coarse frequency tuning for 50% overlap of sub carries. 3. FFT will be calculated to covert time domain symbols into frequency domain where already effected by Phase Noise and frequency noise 4. CFO estimation done by taking FFT of Kn sub carriers where minargJ(n) minimum then ICI would be greatly reduced. 5. One dimensional channel estimation done by calculating the FFT of K/4 Pilot sub carriers. 6. Corrupted qpsk symbols extracted by quantization technique. 7. Demapping (mapped symbols converted back into bits). 8. Vertebra decoder(hard decision algorithm) decodes the corrupted data and provides the output to the speaker. Figure 4.6 Recovered speech signal 54 CHAPTER 5 SIMULATION RESULTS 55 5.1 INTRODUCTION An OFDM system was modeled using Matlab to allow various parameters of the system to be varied and tested. The aim of doing the simulations was to measure the performance of OFDM under AWGN, Multipath(real world exponential channel considered) channels, Carrier frequency offset conditions, for different modulation schemes like BPSK, QPSK, 16-QAM, 64-QAM used in IEEE 802.11a wireless LAN standard. and in CCS for Modem design we considered only QPSK modulation in wired environment. Following this introduction, section 5.2 discusses model used in simulation, steps in OFDM simulation and parameters used for the Modem design. Section 5.3 presents one important block in receiver Frame Synchronization in detail. Section 5.4 provides the simulation results of OFDM system for different channel schemes. 5.2 SIMULATION MODEL The OFDM system that was simulated using matlab for the model shown in Fig 5.1. Fig 5.1 simulation model of OFDM 56 Following are the parameters used in simulation of OFDM system. Parameter value modulations used BPSK,QPSK,16-QAM,64-QAM FFT size 1024 Number of carriers used 1024 Guard time 128 samples Guard period type Cyclic extension of the symbol Table 5.1 OFDM simulation parameters 5.3 OFDM Frame Synchronization In order to properly demodulate the transmitted data, the start of each OFDM frame needs to be found with reasonably accuracy. This is the task of the OFDM frame synchronization subsystem. The OFDM frame synchronization subsystem ignores input before the preamble comes in and then aligns the input directly after the preamble on frame boundaries.. Figure 5.2 shows the need for frame synchronization Each OFDM symbol consists of a window interval, WI, a guard interval, the OFDM data,and then another WI. In order to properly demodulate the OFDM symbol, the FFT in the receiver needs to be filled with data from only one OFDM symbol. If it gets information from overlapping symbols, as shown in Figure 24, the data will be corrupt. 57 Since every symbol is the same length, if the start of the OFDM symbols can be found, then the decoding of the symbols can be properly performed. Theory A pseudo-random sequence has a unique property in that its autocorrelation is very peaked. This is very useful in determining the location of a sequence in s signal and can be used to implement frame synchronization in communication systems. The 802.16a specification defines an initial pseudo-random preamble sequence that is used for frame synchronization. What is given is 512 QPSK symbol pseudorandom in a sequence show in Equation 7 [2]. S–228, 227 = √(13/6) × {………..0, 0, 1+j, 0, 0, 0, –1–j, 0, 0, 0, 1+j, 0, 0, 0, –1–j, 0, 0, 0, –1–j, 0, 0, 0, 1+j, 0, 0, 0, 0, 0, 0, 0, –1–j, 0, 0, 0, –1–j, 0, 0, 0, 1+j, 0, 0, 0, 1+j, 0, 0, 0, 1+j, 0, 0, 0, 1+j, 0,0………} This long sequence, S, is then padded with zeros on either side to bring it to S-256,255, a 512 length vector. This padded vector is then fed into a 512point IFFT to bring it to the time domain and then cyclically extended to 1332(0.6*S+S+S) samples, according to specification. This set of 1332samples in the time domain, is then windowed to reduce inter symbol interference to create one longt symbol. This short symbol is then repeated 10 times to create the whole short preamble, r, that will be used to find the start of the OFDM frame. Sridhar Nandula and K Giridhar [26] detail a technique that can be used to synchronize with this preamble. Figure 25 from Nandula and Giridhar’s article shows this technique. timing synchronization under no noise 1.4 cross correlation auto correlation 1.2 amplitude 1 0.8 0.6 0.4 0.2 0 0 50 100 received samples 58 150 Figure 5.3 - Detail of frame synchronization technique The “dome” in Figure 5.3 shows the results of the signal being auto correlated with itself delayed by one symbol length (Equation 8). Equation 5.1 - Autocorrelation Equation In above Equation, L is the length of one short symbol, r is the whole transmitted preamble, and N is the length of the OFDM data (512 samples). The result of Equation 8 is rather noisy. It is then smoothed with a moving average filter as shown in below Equation. Equation 5.2 - Moving Average Equation In Equation The spikes in Figure 5.3 are generated by Equation 5.4. In this equation, the whole preamble, r, is cross correlated with one short symbol, s. S is the number of FFT samples, as in Equation 5.2 and M is the number of short symbols that the cross correlation is averaged over. Equation 5.4 - Equation for Cross Correlation with the Preamble The start of the OFDM symbol can then be found by timing off of the last large spike inside the flat part of the dome. In this way for frame synchronization we perform several tests under different channels and for different modulations, ploted the BER Vs SNR and MSE Vs SNR graphs. 59 Timing synchronization under SNR-10,delay spread=50ms 1 Cross corr Auto corr 0.9 0.8 0.7 amplitude 0.6 0.5 0.4 0.3 0.2 0.1 0 0 500 1000 received short preamble 1500 Figure 5.4. Detail of frame synchronization technique under SNR=10,delay spread=50ms Probability of synchronization failure curves 0 10 AWGN channel Multipath DS 50ms Multipath DS 50ms&Freq.offset 0.2Hz Probability of synchronization failure -1 10 -2 10 -3 10 -4 10 2 4 6 8 SNR(db) 10 12 14 Fig.5.5 Probability of synchronization failure curves under different channels 60 0 10 AWGN channel freq.offset 0.2Hz multipath channel DS 50ms &freq. offset 0.2Hz -1 10 -2 MSE 10 -3 10 -4 10 2 4 6 8 10 12 SNR(db) 14 16 18 20 Fig.5.6 Variation of MSE Vs SNR under different channels BER vs SNR 0 10 BPSK QPSK 16-QAM 64-QAM -1 BER 10 -2 10 -3 10 -4 10 0 5 10 15 SNR 20 25 30 Fig.5.7 BER vs. SNR plot for OFDM using BPSK, QPSK, 16-QAM, 64-QAM 61 FUNCTIONS COUNT EXECUTION TIME Convlution 2 6751552 mul_sum 1 10214 sum_seq 2 32764 Synchronization 1 3637253 Complex_conv 1 38546754 CFO_estimate 1 34080023 FFT 23 884811 VITERBI 1 1367923 Block_Processing 1 47262925 TOTAL 473578235 Table 5.2 Execution Time(in sec) Measured in CCS profiler The above simulation results exposed out the probability of occurring of Frame Synchronization errors under different noisy channels including (AWGN,Multi path, Carrier frequency offset) . On the DSK board corresponding MatLab programs converted into “c” code and loaded onto two boards and perform the following tests 5.4 Performance tests Base Band Modulation techniques: First Test: PCM: Speech input 16 bit converted into binary and transmitted though cable successfully received with out noise Maximum input frequency=1 kHz 62 Sampling frequency=48 kHz Second Test DPCM: Applied mu law for bit compression and used LPC coder to provide prediction error minimum to get less coded bits (reduced from 16 to 8) observed signal clearly . Maximum input frequency=1 kHz Sampling frequency =16 kHz Single carrier Modulation: BPSK,QPSK: Successfully tested, components band pass filter (16 kHz), multiplier,lowpass filter(4kHz)(with 30th order and FIR filter with Kaiser window),decimator Maximum input frequency=1 kHz Sampling frequency =8 kHz Filtering operations done by overlap add FFT method to improving the speed factor than convolution method Multi carrier Modulation: Tested Successfully in SIMULINK and that model Embedded into DSP target for execution. Frequencies separated by band pas filters (IIR design with 30 order) Input frequencies=1 kHz, 2 kHz, 3 kHz Sampling frequency =8 kHz OFDM: The code we generated Loaded onto the 2 DSKS (Transmitter, Receiver) And When tested we were hearing more noise than signal. We tried with all possible conditions but could not improve the system performance. and at last we measured all the subroutines code length and their execution time by using CCS profiler And we found that for one block OFDM our processor taking approxly 2.7235 sec Actually which could finish in OFDM symbol duration which is(0.2298sec) We tried our best at optimizing the code and utilize the resources to the maximum extent. 63 CONCLUSION We implemented the coherent OFDM algorithm on a TMS320C6713 DSP board for acoustic communications. Based on the program profiling, we identified the timeconsuming operations of the OFDM algorithms. We optimized the code and achieved significant speedups. We reduced the processing time per OFDM block to about 2.7235 seconds. Since the duration of an OFDM block is 0.23 seconds, the current implementation does not meet the real-time operation requirements yet. In the future, anyone can motivated to pursue a hybrid DSP/FPGA-based solution to construct a realtime OFDM modem. LIMITATIONS 1.We could not test the system in real time in air to air and in under water communication environments. 2.we did not consider Doppler spread in simulation. FUTURE WORK 1.the current implementation does not meet the real-time operation requirements yet. 2.In the future, we can motivated to pursue a hybrid DSP/FPGA-based solution to construct a real-time OFDM modem. 64 REFERENCES [1] Hai Yan, Shengli Zhou, Zhijie Jerry Shi, and Baosheng Li “DSP Implementaion of OFDM Acoustic Modem” in WUWNet’07, September 14, 2007, [2] M. Stojanovic, “Low complexity OFDM detector for underwater channels,” in Proc. of OCEANS, Sept. 2006. [3] B. Li, S. Zhou, M. Stojanovic, and L. Freitag, “Pilot-tone based ZP-OFDM demodulation for an underwater acoustic channel,” in Proc. of OCEANS, Sept. 2006. [4] B. Li, S. Zhou, M. Stojanovic, L. Freitag, and P.Willett, “Non-uniform Doppler compensation for zero-padded OFDM over fast-varying underwater acoustic channels,” in Proc. of OCEANS, June 2007. [5] S. Mason, R. Anstett, N. Anicette, and S. Zhou, “A broadband underwater acoustic modem implementation using coherent OFDM,” in Proc. of National Conference for Undergraduate Research, April 2007. [6] IEEE Standard 802.11a. IEEE Standards Board. 1999 Edition. Piscatawa, USA. [7] IEEE Standard 802.11a White Paper. IEEE Standards Board. [8] Digital Signal Processing and Applications with the C6713 and C6416 DSK” By Rulph Chassaing Worcester Polytechnic Institute. [9] TMS320C67xx: Code Composer Studio Tutorial. Texas Instrument. February 2005. [10] Robert Chang, “Orthogonal frequency division multiplexing”, US. Patent 3,488445, filed November 14, 1966, issued January 6, 1970. [11] R. R. Mosier and R. G. Clabaugh, “Kineplex, a bandwidth-efficient binary transmission system”, IEEE Transactions, Vol. 76, January 1958, pp. 723 – 728. 65 [12] Robert Chang, “Orthogonal frequency division multiplexing”, US. Patent 3,488445, filed November 14, 1966, issued January 6, 1970. [13] Robert Chang, “Synthesis of Band-Limited Orthogonal Signals for Multichannel Data Transmission”, the Bell System Technical Journal, December 1966, pp. 1775 -1796. [14] S. B. Weinstein, Paul M. Ebert, “Data Transmission by Frequency-Division Multiplexing Using the Discrete Fourier Transform”, IEEE Transactions on Communication Technology, Vol. COM-19, No. 5, October 1971, pp. 628 – 634. [15] Louis Thibault, Minh Thien Le, “Performance Evaluation of COFDM for Digital Audio Broadcasting Part I: Parametric Study”, IEEE Transactions on Broadcasting, Vol. 43, No.1, March 1997, pp. 64 – 75 [16] Ulrich Reimers, “Digital Video Broadcasting”, IEEE Communications Magazine, June 1998, pp. 104 - 110 [17] ETSI EN 300 421, “Framing Structure, channel coding and modulation for 11/12 GHz satellite services”, August 1997, pp. 6, Online: http://www.etsi.org [18] ETSI ETS 300 744, “Framing Structure, Channel Coding and Modulation for Digital Terrestrial Television”, March 1997, online: http://www.etsi.org [19] M. Johnsson, “HiperLAN/2 – The Broadband Radio Transmission Technology Operating in the 5 GHz Frequency Band”, Online: http://www.hiperlan2.com/site/specific/specmain/specwh.htm, 1999 [20] Yiyan Wu, William Y. Zou, “Orthogonal Frequency Division Multiplexing: A Multi Carrier Modulation Scheme”, IEEE Transaction on Consumer Electronics, Vol. 41, No. 3, August 1995, pp. 392 – 399 66

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement