Chapter One

Introduction to the DSP-OFDM Modulator Project

1.1 Introduction

The Orthogonal Frequency Division Multiplexing (OFDM) digital communication technique has been attracting a great concern of researchers all over the world, due to its unique characteristics. The designers and engineers of mobile wireless communication systems and wireless multimedia broadband are looking forward to exploit the OFDM to be the air interface of these devices and systems. This exploitation has already been done with several systems and standards such as Wireless Local Area Networks 802.11a and Digital Video Broadcast-Terrestrial (DVB-T).

The DSP-OFDM Modulator project studies the essential parts of the OFDM modulator and demodulator and implements the OFDM modulator and demodulator on two separate DSP boards. For the OFDM modulator, the project studies the hardware DSP implementation of the OFDM modulator's different parts such as the QAM mapper and the IFFT. This applies on the OFDM demodulator too. Additionally, for the OFDM demodulator, the project studies the carrier recovery issue to recover the OFDM information signal from the carrier signal and the OFDM symbol timing recovery issue to correctly pinpoint each OFDM symbol's boundaries.

The Projects involves several aspects of the digital communications and the theoretical and practical DSP and uses the MATLAB and the Code Composer Studio (CCS) to analyze and simulate the designs to be practically implemented.

1.2 The Aim and the Objectives

The aim of the DSP OFDM Modulator project is to implement OFDM modulator and demodulator on two separate DSP boards. The implementation is not tied to any existing OFDM standard such that used in the DVB-T or other standards.

The DSP hardware implantation comprises many DSP and digital communication operations to be implemented through writing the C codes that perform these operations i.e. the QAM mapping and de-mapping, the IFFT and FFT, the digital IIR filters and the synchronization.

Therefore, the implementation will be first simulated by MATLAB and the Code Composer Studio (CCS) part by part before and with the hardware implementation on the DSP boards. The CCS will be used to simulate not only the modulator and demodulator but also the subparts of the hardware implementation such as the FFT and IFFT C codes. For example, the C code that will be used to perform N-Point IFFT to a complex array containing N complex elements to produce N outputs. These N outputs or discrete values will be compared with those N outputs or discrete values obtained from performing N-Point IFFT to the same N element-complex array in MATLAB in order to check that this C code will work properly in the DSP real time implementation of the OFDM modulator.

1.3 The Research Background and Motivations

The good presentation of the theoretical and practical DSP during the taught part of the course encouraged me to tackle this project, as I had not done any practical DSP before I enrolled in the MSc Wireless Communication Systems course. The good understanding of the discrete Fourier transform (DFT) allows presenting the Conjugate Symmetric approach. The use of the Conjugate Symmetric distribution of the subcarrier vectors on the IFFT input points makes the IFFT produce a multicarrier signal with a real part (In-phase) (I) only in the time domain, as the imaginary part (Quadrature) (Q) is always set to zero. It is easier to modulate and demodulate the OFDM information signal with a real part only, as the quadrature modulation is no longer required. The Conjugate Symmetric proposal allows applying the FM modulation to transmit and receive the multicarrier OFDM information signal.

1.4 The Thesis's Organization

The thesis consists of five chapters. Chapter two is considered as a literature survey. Chapter two explains the OFDM spectrum and the principles of the OFDM modulator and demodulator. It illustrates how the OFDM information signal carries or represents the digital data bits and how the IFFT N outputs (discrete values) are actually the samples of the OFDM multicarrier information signal for the current OFDM symbol being generated. It will be shown how the OFDM symbol has longer duration than those of other digital communication modulation techniques without affecting the data rate to be more resilient with dispersive channels and many other aspects of the OFDM modulation technique. This project is not tied to any existing OFDM standard. However, it resembles these standards in terms of the general block diagrams of the OFDM systems and the use of the pilot carriers, hence the employment of the OFDM in the DVB-T and the WLAN 802.11a are described briefly in chapter two.

Chapter three shows and simulates by using MATLAB the approaches and ideas that will be used for the hardware DSP implementation. It discusses the (Conjugate Symmetric) proposal that has come out of this project to facilitate the modulation and demodulation of the OFDM information signal and the use of the squared cosine method to recover the OFDM information signal from the modulated carrier signal. The use of the cyclic prefix (CP) to recover the OFDM symbol timing is also discussed in chapter three.

Chapter four presents the hardware implementation of the DSP OFDM modulator and demodulator on two separate DSP boards and shows the different results of the hardware implantation on the oscilloscope's screen as well as it shows the results of the CCS simulation of the OFDM modulator and demodulator and compares the OFDM spectrum of the generated OFDM information signal generated by the Conjugate Symmetric approach with that generated from the traditional method.

Chapter five is for the conclusion points that have come out of this project and the further work to be implemented in the future.

The attached CD contains the real time DSP implantation CCS projects of the OFDM modulator (OFDM-TX project) and OFDM demodulator (OFDM-RX project) and the CCS simulation of the OFDM modulator and demodulator (Simulation project) as well as the MATLAB codes and an electronic copy of the thesis.

Chapter Two

OFDM Basics

2.1 Introduction

In the digital communications, the transmitted signal over a wireless channel is more preferred, when the symbol duration is significantly greater than the delay spread (s) of this channel to avoid the intersymbol interference (ISI) due to the time dispersion of transmitted symbols. But unfortunately, the symbol duration is reversely proportional to the bit rate which means a great constraint when high data rate transmission is required over a wireless channel with a relatively high delay spread due to the multipath environment of that channel [1].

The OFDM technique produces the solution to this problem, as it divides the high rate bit stream into (N) very low rate bit streams that are transmitted simultaneously using (N) orthogonal subcarriers for every OFDM symbol. Each of these low rate bit streams modulates an individual subcarrier. Therefore, the symbol duration is increased as many as (N) times without reducing the actual bit rate.

2.2 The Spectrum of the OFDM Subcarriers

Figure (2-1) y(t) (the dotted curve) is the algebraic summation of the 5 sinusoidal waves

Figure (2-2) the spectrum of y(t) in the frequency domain (five stems or tones)

Figure (2-3) the rectangular function with (?t) duration in the time domain

Figure (2-4) the spectrom of the rectangular function in the frequency domain

Figure (2-5) the spectrum of the OFDM symbol with five subcarriers

Suppose y(t) is a signal consisting of the algebraic summation of five sinusoidal waves (subcarriers) in the time domain with five different frequencies (f1, f2, f3, f4 and f5) respectively figure (2-1). Suppose these subcarriers have the same frequency spacing (?f) between each adjacent subcarriers in the frequency domain. The spectrum of y (t) in the frequency domain in terms of the magnitude has five stems at f1 to f5 respectively. Each stem (single tone) represents one of these five sinusoidal waves or subcarriers figure (2-2).

Now, suppose an OFDM symbol (with symbol duration = (?t)) consists of the same five sinusoidal subcarriers mentioned earlier. The spectrum of this OFDM symbol in the frequency domain does not now consist of five stems; instead the spectrum is like that one in figure (2-5). The spectrum in figure (2-5) consists of five overlapped sinc functions each of which represents an individual subcarrier.

Actually, our OFDM symbol is not identical to y(t). More precisely, it is a (truncated y(t)) with truncation duration equal to the OFDM symbol duration (?t). When a signal is truncated in the time domain with equal gain over all the truncated points within the period (?t), that means mathematically multiplying this signal with a rectangular function in the time domain with a time duration equal to (?t) figure (2-3). The shape of the spectrum of rectangular function in terms of the magnitude is single sinc wave in the frequency domain cutting the horizontal axis at points equal to the integer multiples of the reciprocal of the time duration (1/?t) figure (2-4). Basically, when any two signals are multiplied in the time domain, the resultant signal of this multiplication has a spectrum in the frequency domain equal to the convolution of the spectrums of the two original signals. Therefore the spectrum in figure (2-5) represents the resultant of the convolution operation between the five stems of y(t) figure (2-2) and the sinc of the rectangular function figure (2-4) in the frequency domain.

Looking at figure (2-5) again, it is easy to notice that the peak of each subcarrier sinc occurs at a point where all other four sincs have magnitudes equal to zero at which. This situation is the condition of the orthogonality between the subcarriers as it ensures the least interference between the subcarriers in the frequency domain. The orthogonality between subcarriers is not achieved, unless the frequency spacing between the subcarriers (?f) is equal to the reciprocal of the OFDM symbol duration (1/(?t)) [2].

2.3 The OFDM Modulator

The OFDM Modulator uses the Quadrature Amplitude Modulation (QAM) Mapper and the Inverse Fast Fourier Transformer (IFFT) to simultaneously generate and modulate the subcarriers of each OFDM symbol. Figure (2-6) shows a general block diagram of the OFDM modulator.

The OFDM modulator builds and transmits each OFDM symbol consisting of a number of subcarriers equal to N as follows. The QAM mapper maps the data bits to (N) QAM vectors. Each of these vectors has real and imaginary components and represents a single subcarrier. The number of data bits that are mapped to each QAM vector (subcarrier) depends on the QAM order (M) as shown in table (2-1). Using QAM mapper with higher order produces higher data rate. However, this will be at the cost of the reception quality as the constellation of higher order QAM allows higher Bit Error Rate (BER) for a given

  1. The QAM Mapper stage maps data bits to QAM vectors in accordance with the QAM constellation.
  2. The Serial to Parallel (S/P) buffers the QAM vectors of each OFDM symbol to prepare them for the IFFT operation.
  3. The IFFT stage converts the buffered QAM vectors (the subcarriers) from the frequency domain to produce an OFDM symbol sequence equivalent to the algebraic summation of these sinusoidal subcarriers in the time domain to be buffered in the next stage.
  4. Guard Interval Insertion and Parallel to Serial stages add the guard interval to each buffered OFDM symbol sequence and produces it serially to the next stage.
  5. The DSP Low Pass Filter (LPF) and The Digital to Analogue Convertor (DAC) stages are to smooth the signal and convert the digital sequence into analogue signal.
  6. The Up Conversion and The Power Amplification stages.

Figure (2-6) general block diagram of the OFDM modulator.

The 4-QAM constellation, which is identical to Quadrature Phase Shift Keying (QPSK) constellation, gives the receiver more tolerance to the changes of the amplitude and phase of any received QAM vector and allows the receiver to de-map it to the correct 2-bit-combination, as long as it still lies in the same quadrant from which it was originated at the transmitter, whereas 16 and 64 QAM constellations give less tolerance to the change in the phase and amplitude of the received QAM vector due to the noise and interference.

Not all subcarriers of an OFDM symbol are used to carry the data bits, some of which are used as pilot carriers for the synchronization and channel estimation purposes and for providing the receiver with specific information such as the order of QAM being used by the transmitter.

The Serial to Parallel (S/P) stage buffers the N vectors from the QAM stage for each OFDM symbol to produce them in parallel way to IFFT stage. The number of IFFT points is always greater than the number of the subcarriers (N), so the (S/P) pads the remaining IFFT points, which have not been assigned QAM vectors, with zeroes.

The IFFT stage is the heart of the OFDM modulator. It gives the QAM vectors the mathematical ability to be considered as the OFDM subcarriers in the frequency domain and converts them to the time domain to form the multi-subcarrier information signal. In other words, as all the (N) QAM vectors of each OFDM symbol are the parallel inputs of the IFFT operation, the IFFT stage considers these QAM vectors as tones or stems in the frequency domain and converts them into correspondent subcarriers in the time domain for the given OFDM symbol duration. Each QAM vector has a specific phase and amplitude which corresponds to the bit combination this vector represents in accordance with the QAM constellation. The IFFT coverts each QAM vector into a correspondent sinusoidal subcarrier in the time domain with amplitude and phase directly related to those of that vector and a frequency that is directly proportional with the sequence of IFFT point, to which the vector has been assigned. That means if a QAM vector with sequence (n) (assigned to an IFFT point with sequence n) generates a subcarrier with frequency equal to (f), the vector with sequence (n-1) generates a subcarrier with a frequency equal to (f - ?f) and the vector with sequence (n+1) generates a subcarrier with a frequency equal to (f + ?f). The IFFT stage can simultaneously produce all the N-subcarriers for each OFDM symbol as it performs the conversion from the frequency domain to the time domain for N (QAM vectors) in one parallel operation for each OFDM symbol. The OFDM symbol signal in the time domain represents the algebraic summation of all subcarriers of that symbol. Now, it is obvious how the OFDM modulator divides the high rate bit stream into (N) lower rate bit streams which are simultaneously transmitted over (N times higher OFDM symbol duration) without reducing the actual bit rate.

The Guard Interval Insertion stage appends a guard period at the beginning of each OFDM. The Guard Interval (GI) (also called the Cyclic Prefix (CP)) makes a separation between the consecutive OFDM symbols to contribute in the ISI reduction and to eliminate the Intercarrier Interference (ICI) between the subcarriers. The guard interval must be greater than the highest path difference duration. As a result, multipath signals with delay smaller than the GI cannot cause ICI [3]. The guard interval is generally equal to or less than the quarter symbol duration [4]. Practically, the guard interval is generated by taking an exact copy of the end part of the OFDM symbol and adding it to the beginning of the symbol. The guard interval (GI) can be used by the receiver to determine the beginning and end of each received OFDM symbol through the cross correlation operation.

Now, the sequence of the OFDM symbol is converted into serial sequence. The Guard Interval Insertion and the Parallel to Serial (P/S) stages are shown as one stage in figure (2-6). The DSP LPF smoothes the information signal.

The Digital to Analogue Convertor (DAC) converts the incoming digital sequence into analogue signal.

Finally, the Up Conversion and Power Amplification stage mixes the information signal with a locally generated carrier and boosts the resulted signal to be transmitted.

The input data bits to the OFDM modulator in figure (2-6) may be first scrambled for the security purposes, encoded for the Forward Error Correction (FEC) purposes and interleaved (to randomize the bursts of error [5]). Therefore, scrambler, encoder and interleaver blocks may precede the other stages to provide the OFDM modulator with scrambled, encoded and interleaved coded bits [6].

It is also possible to up convert the signal whilst it is still in the digital signal processing domain before converting it to the analogue form.

  1. The Carrier Recovery and the Down Converting stage recovers the information signal from the carrier signal.
  2. The Sample and Hold circuit and the Analogue to Digital Convertor (ADC) stage converts the information signal from the analogue form to produce the digital sequence for the DSP processing.
  3. The Guard Interval Removal and the Serial to Parallel (S/P) stage removes the cyclic prefix (CP) and produces all the useful samples of the current OFDM symbol being processed to the FFT stage simultaneously.
  4. The FFT stage converts the subcarriers of the OFDM symbol from the time domain to the frequency domain and produces them to the QAM De-mapper as vectors through the (P/S) buffer. One tap Equalizer can be used to equalize the vector constellation after the FFT stage.
  5. The Parallel to Serial (P/S) stage buffers the vectors of each OFDM symbol to produce them serially to the QAM De-mapper.
  6. The QAM De-mapper assigns each vector to the correspondent bit combination to produce the data bits.

Figure (2-7) general block diagram of the OFDM demodulator.

2.4 The OFDM Demodulator

The OFDM modulation operation is completely reversed in the demodulator. At first, the information signal must be recovered from the carrier. This is done by the carrier recovery and down converting stage. Figure (2-7) shows a general block diagram of the OFDM demodulator.

The analogue to digital convertor (ADC) converts the information signal into a digital sequence.

The guard interval removal stage removes the inserted guard interval or cyclic prefix from the beginning of each OFDM symbol. The OFDM demodulator could use the cyclic prefix at the beginning of each OFDM symbol to pinpoint the beginning and end of each symbol, as the cyclic prefix at the beginning of each OFDM symbol is identical to the end part of that symbol within a duration equal to the cyclic prefix duration.

Now, the digital sequence of each OFDM symbol, which represents the algebraic summation of the subcarriers' signals in the time domain, is simultaneously presented to the FFT stage to convert these subcarriers into their correspondent vectors in the frequency domain. The parallel presentation of the symbol's digital sequence to the FFT stage involves the idea of serial to parallel conversion of this sequence.

The subcarriers may also be equalized before being presented to the QAM de-mapper using a one tap equalizer.

The QAM de-mapper assigns each vector in the frequency domain to the correspondent binary bit combination in accordance with the QAM constellation being used in the transmitter and receiver.

The serial sequence of the received coded bits must be de-interleaved and then decoded and descrambled, if the scrambling, encoding and the interleaving are applied in the transmission side.

The number of data bits per each OFDM symbol can be easily calculated by multiplying the number of subcarriers that are used to carry the data bits (Payload subcarriers) by the number of bits represented by the QAM vector in accordance with the QAM constellation table (2-1). The carrier recovery operation can also be done after the sample and hold stage within the digital signal processing unit.

2.5 Digital Video Broadcasting-Terrestrial (DVB-T)

The DVB-T employs the OFDM due to its excellent performance in the multipath environments which are common in the terrestrial broadcasting, as the OFDM distributes a high bit stream over a high number of orthogonal subcarriers, each of which carries a low bit rate stream simultaneously, which makes the symbol duration much higher than the delay of the indirect paths [7].

The DVB-T has two modes 2K and 8K. As 2K and 8K modes have the same data rata, selecting which mode should be used depends on the requirements. The 2K mode has about 250 µ S symbol duration and 4 KHz spacing between its subcarriers, whereas the 8K mode has about 1 m S symbol duration and 1 KHz spacing between its subcarriers. These characteristics make the 8K mode with its higher symbol duration more resilient with multipath situations and channels with a high delay spread but the 2K mode resists better the shift in the frequency caused by Doppler effects due to the relative mobility between the transmitter and receiver, as it has higher frequency spacing between its subcarriers. The DVB-T has (FEC) similar to that of the DVB-S (Satellite) [8]. It has the following code rates (1/2, 2/3, 3/4, 5/6 and 7/8). Not all subcarriers are used as payload carriers to carry the coded bits (data bits + redundant bits); some subcarriers are used for channel estimation and correction. These subcarriers are the pilot carriers which have vectors lying on the I (In-phase) axis of the QAM constellation with angles equal to either 0 degrees or 180 degrees, hence they have only real components unlike the payload vectors which have real and imaginary components in order to recognize between them. The mapping of the pilot carriers to be delivered as vectors to the IFFT stage in the OFDM modulator is achieved through the BPSK modulation which uses the I (in-phase) axis of the constellation. Figure (2-8) shows the locations of DVB-T subcarriers on the 4-QAM constellation.

  1. The locations of the payload carriers
  2. The locations of the continual and scatter pilot carriers
  3. The locations of the TPS pilot carriers

Figure (2-7) general block diagram of the OFDM demodulator.

The DVB-T uses 4, 16 or 64 QAM to modulate the coded bits to be represented as payload subcarrier vectors, therefore each payload subcarrier can carry 2, 4 or 6 coded bits every OFDM symbol respectively. The DVB-T uses a guard interval length equal to (1/4, 1/8, 1/16 or 1/32) of the OFDM symbol duration [8].

2.5.1 The DVB-T OFDM Subcarriers

The DVB-T 2K mode has 2048 subcarriers, but it only uses 1705 subcarriers and sets the rest to zero. The 1705 carriers are numbered from 0 to 1704. It uses 1512 subcarriers as payload carriers and the remaining 193 subcarriers as pilot carriers. There are three types of the pilot carriers the continual pilots, scatter pilots and the (Transmission Parameter Signaling) (TPS) pilots. The continual pilots have fixed positions in the OFDM symbol spectrum. For example the sequences 0, 48, 969, 1683 and 1704 in the range (0 - 1704) are reserved as positions for the continual pilots. The continual pilots are used by the receiver to estimate the amount of phase rotation of the received QAM vectors. Every group of 12 subcarrier vectors has only one scatter pilot. The scatter pilots do not have fixed positions. Among each 12 carriers' positions there is one variable position for one scatter pilot. The position of each scatter pilot regularly varies from symbol to symbol by jumping 3 positions forward with respect to its position in the previous symbol. The scatter pilots are used to estimate the channel too. The TPS pilot carriers have fixed positions and are used by the transmitter to inform the receiver about the transmission parameters such as.

  1. The DVB-T mode (2K or 8K)
  2. Modulation type of the payload subcarrier vectors (4, 16, or 64) QAM
  3. FEC code rate (1/2, 2/3, 3/4, 5/6 or 7/8)
  4. Length of the guard interval (1/4, 1/8, 1/16 or 1/32)

Like the continual and scatter pilots, the TPS pilot carriers lie on the I (in-phase) axis. Each OFDM symbol in the 2K mode has 17 TPS pilot carriers with fixed positions. Within the same symbol all the 17 TPS pilots are either at 0 degrees or 180 degrees. The receiver determines the state of TPS pilots whether the TPS pilots of the received symbol are at 0 degrees or 180 degree based on the majority voting rule. Through the TPS pilots, the transmitter sends the receiver 67 information bits every OFDM frame. The OFDM frame consists of 68 OFDM symbols. The TPS pilots are Differential Bi-Phase Shift Keying (DBPSK) modulated. That means the receiver considers receiving an information bit = (0), if the state of the TPS pilots change from the previous symbol to the current symbol and considers receiving an information bit = (1), if the phase or state of the TPS pilots does not change from the previous symbol to the current symbol. 68 OFDM symbols are required to transmit the 67 information bits, as the first symbol is used to determine the initializing state of the TPS pilots. The 67 bits inform the receiver about the transmission parameters, for example:

  • Bits 26 and 27 represent the QAM order (00=4, 01=16, 10=64)
  • Bits 31, 32 and 33 represent the code rate (000=1/2, 001=2/3, 010=3/4, 011=5/6, 100=7/8)

The DVB-T 8K mode has 6817 subcarrier per each OFDM symbol. The subcarriers of the 8K have the same principles and use of those of 2K with difference in their numbers only. Table (2 - 2) shows the different subcarriers of both 2K and 8K modes.

The scatter pilot carriers have two different numbers of the subcarriers, as the scatter pilot carriers coincide with fixed locations of the continual pilot carriers due to their jumping [8].

2.6 WLAN 802.11a

Wireless Local Area Networks (WLANs) 802.11a employ OFDM as a digital communication technique for reliable and high data rate transmission. Each OFDM symbol is expressed by 64 subcarriers, but the actual used subcarriers are (52) (64 - 52 =12 subcarriers are set to zero). There are 48 payload carriers to carry the coded bits (data and redundancy bits) and 4 pilot carriers. The frequency spacing between the subcarriers is (?f = 312.5 KHz). The required channel bandwidth can be calculated by multiplying the total number of subcarriers by the frequency spacing = 312.5 K * 64 = 20 MHz. To achieve the orthogonality between the subcarriers the OFDM symbol duration (?t) must be equal to the reciprocal of (?f) (?t = 1/ ?f), hence ?t = 1/312.5 KHz = 3.2 µs. 802.11a appends a guard interval (GI) equal of (1/4) the OFDM symbol duration at the beginning of each OFDM symbol (GI = 0.25 * 3.2 µs = 0.8 µs), therefore each OFDM symbol occupies (3.2 µs + 0.8 µs = 4 µs) time interval. That means a wireless device transmits 250,000 OFDM symbol per second. 802.11a allows wireless devices to have (8) transmission data rates or modes (6, 9, 12, 18, 24, 36, 48 and 54) M bits/sec. 802.11a uses (BPSK, QPSK, 16-QAM or 64-QAM) to modulate the payload carriers and uses (1/2, 2/3 or 3/4) code rate for the FEC in accordance with transmission data rate being used.

The different (8) modes use different modulation types and different code rates as shown in table (2-3) [6]. 802.11a uses BPSK modulation to modulate the payload carries in modes 1 and 2 unlike the DVB-T which only uses QAM modulation to modulate the payload carriers. For each mode, the OFDM symbol has the same total duration (4 µs) (250,000 OFDM symbol/Sec) and the same channel bandwidth (20 MHz), as it has the same number of subcarriers (48 payload carriers and 4 pilot carriers).

Looking back at table (2-3) (Mode (8) 54 Mbps), as the 64-QAM modulation is used to modulate the payload carriers, each payload carrier in the OFDM symbol carries (log2 (64) = 6 coded bits). Each OFDM symbol carries (48 payload carriers/OFDM symbol * 6 coded bits/payload carrier = 288 coded bits / OFDM symbol). The number of data bits per each OFDM symbol = 288 * (code rate = 3/4) = 216 data bits / OFDM symbol. There are 250,000 OFDM symbols / Sec, hence the data bit rate = 216 * 250,000 = 54 Mbps.

Chapter Three

The MATLAB Analyses for the Hardware Implementation Approaches

3.1 Introduction

Throughout this chapter the ideas and approaches that will be used for the DSP hardware implementation of the OFDM modulator and demodulator on two separate DSP boards will be discussed and simulated by using the MATLAB.

There are mainly three approaches.

  • The use of the (Conjugate Symmetric) with the carrier vectors which are the inputs of the IFFT stage in the OFDM modulator to produce an OFDM information signal in the time domain with a real part only for easier modulation and demodulation, which is the proposal that has come out from this project.
  • The use of the squared cosine to recover the OFDM information signal from the carrier signal in the receiver (the synchronization of the carrier frequency signal).
  • The make use of the guard interval (GI) or the cyclic prefix (CP) for the synchronization of the OFDM symbol (i.e. The Symbol Clock Recovery) to allow the receiver to know the correct boundaries of each received OFDM symbol to set the FFT window at the correct positions of the received OFDM signal.

3.2 The Mathematical Analysis of a Multicarrier Signal

To understand the idea of the (Conjugate Symmetric) and the role of the IFFT and FFT in the OFDM system, let's consider y(t) as a continuous multicarrier signal with a real part only in the time domain consisting of the algebraic summation of five sinusoidal waves or subcarriers which have the following frequencies (1, 2, 3, 4 and 5) KHz and phase shifts (p4,,3p4, 5p4, 7p2, 9p4) respectively with equal amplitude = (28) for each. For our y(t), each two adjacent subcarriers (in the frequency domain) have 90 degrees phase shift. y(t) can be expressed in the time domain as in Eq. (3-1)

It is not necessary for the five subcarriers forming y(t) to have the same magnitude. It is just to simplify this discussion.

Now, if y(t) is sampled with sampling frequency (Fs). Fs must be greater than (2 * 5 KHz = 10 KHz), where 5 KHz is the highest frequency of y(t) according to the Nyquist-Shannon theorem. Nyquist-Shannon theorem stipulates that the sampling rate or frequency must be at least two times greater than the highest frequency of the sampled signal to avoid the aliasing which prevents providing the DSP system with a right copy of the sampled signal [9]. When a continuous signal in the time domain is sampled, a sample is taken at every (t = n * Ts). Ts is the sampling interval (Ts = 1 / Fs) and n is zero or positive integer number representing the sequence of the sample. y(t) is no longer continuous. Now, y(t) represents a sequence of discrete values. In Eq. (3-1), y(t) is replaced by y(n) in the left hand side and (t) is replaced by (n * Ts) or (n / Fs) in the right hand side as in Eq. (3-2).

If Fs is set to 16 KHz (16 KHz > 10 KHz) and 16-point FFT operation is performed to y(n) to produce y(n)'s spectrum in the frequency domain in order to study it.

The 16 point FFT operation needs 16 discrete values or samples of y(n) for n = 0, 1, 2,...13, 14, 15. The results of 16 point FFT operation are 16 complex vectors in the frequency domain. The 16 discrete values (samples) of y(n) are the inputs of the FFT in the time domain and the outputs are 16 complex vectors of Y(m) which represents y(n)'s spectrum in the frequency domain. Table (3-1) lists the 16 discrete values of y(n) in the time domain and table (3-2) lists the 16 vectors of Y(m) in the frequency domain.

MATLAB code (3-1) gives the 16 discrete values of y(n) in the time domain and the 16 vectors of Y(m) in the frequency domain.

Note: - The MATLAB does not start the indexing of arrays with zero. It starts with one, hence the first location in array has index=1 instead of 0 and the second location has index=2 instead of 1 and so on.

* Zero vectors do not have specific phase.

Looking at table (3-2), Y (0) = 0+j0 as y(n) has no DC component in the time domain. The points m = 1 to m = 5, have five vectors with equal magnitudes. Each vector has 90 degrees phase shift with respect to the previous one. These five vectors represent the five sinusoidal waves which form y(n) and have equal magnitude and phase shifts of 90 degrees between each other. The magnitude of each vector is not equal to its correspondent sinusoidal wave's amplitude, but it is proportional to it. The five vectors at points m=15 back to m=11 completely depend on the vectors of points m = 1 to m = 5. The vectors of points m = 15 back to m = 11 are the conjugates of the vectors at points m = 1 to m = 5 respectively, as Y (m).real = Y (16-m).real and Y(m).imag = - Y(16-m).imag in terms of real and imaginary components or R(m) = R(16 - m) and ?(m) = - ?(16 - m) in terms of the magnitude and phase. Y(m).real and R(m) have even symmetry around point m=8 whereas Y(m).imag and ?(m) have odd symmetry around point m = 8. The points of spectrum where m < 8 are called the independent portion of the spectrum while the points of the spectrum where m > 8 are called the dependent portion of the spectrum because all the spectral information can be read from Y(m) for m < 8 while the vectors of Y(m) for m > 8 are just the conjugate vectors of their counterparts at m < 8 portion.

This applies for any number (N) of the FFT points when y(n), as in equation (3-2), has only real part. The spectrum will be symmetric around point m = N/2. That means for m < N/2 every Y(N-m) vector is the conjugate of Y(m) vector and vice versa.

This type of symmetry is called the Conjugate Symmetric in the literature [10].

Now, if we provide the inputs of 16 point IFFT with the 16 values of Y(m) in table (3-2), there is no doubt that the output sequence will be identical to y(n) sequence in table(3-1), which has real part only.

From the above discussion, performing the FFT operation for a signal in the time domain with a real part only produces a spectrum of conjugate symmetric vector set, hence performing the IFFT operation to a symmetric conjugate vector set produces a signal in the time domain with a real part only.

The main conclusion of this section is “providing the IFFT stage with the OFDM symbol carrier vectors having a conjugate symmetric distribution at the IFFT input points, will generate a sequence representing the OFDM symbol multicarrier signal in the time domain with a real part only”.

For the conjugate symmetric, it is not necessary that all the non-zero vectors have the same magnitudes. The conjugate symmetric is achieved as long as each vector (A + jB) at point (m) of the spectrum has its conjugate vector (A - jB) at points (N - m) of the spectrum, where A and B can be any real numbers (negative, zero or positive).

This project proposes and uses the conjugate symmetric distribution of vectors to generate every OFDM symbol as this distribution assures the generation of a multicarrier information signal in the time domain with a real part only. Any other distribution of the subcarrier vectors on the inputs of the IFFT stage of the OFDM modulator generates a multicarrier information signal in the time domain with real and imaginary parts, which requires more complexity to modulate the transmitted signal and to demodulate the received signal.

Although, the conjugate symmetric approach does not require the use of the quadrature modulation to modulate the transmitted signal, it makes use of the spectral efficiency given by the quadrature modulation [11], because it uses the QAM modulator to modulate the payload carriers before the IFFT stage.

The pilot carriers are always represented with vectors lying on the (in-phase) axis, therefore the conjugate of a vector representing a pilot carrier is identical to that vector, as they both have imaginary components equal to zero (the conjugate of A +j 0 = A +j 0).

The above discussion has also shown the role of the IFFT stage in OFDM modulator. For each OFDM symbol being generated, the IFFT stage looks at the carrier vectors of that symbol arranged at its input points as the spectrum of a multicarrier signal in the frequency domain and produces the discrete samples of this multicarrier signal in the time domain. This also implies the serial to parallel conversion as the serially coming data bits are mapped to the set of the payload vectors of each OFDM symbol and the IFFT operation is performed to this set simultaneously.

The FFT stage at the reception side reverses this operation. It takes the samples of each received OFDM symbol in the time domain and produces its carrier vectors in the frequency domain.

3.3 The OFDM Information Signal Recovery

The previous section shows that producing of each OFDM symbol's carrier vectors to the IFFT stage with the conjugate symmetric distribution ensures that the output OFDM information signal has only real part I(t), as the imaginary part Q(t) is always set to zero.

As the quadrature modulation is no longer needed to modulate the OFDM information signal I(t). A traditional modulation technique can be used to modulate I(t) such as the AM or FM. This project uses the (DSB-LC) AM to modulate the information signal.

First a DC offset value should be added to I(t) to form the message signal M(t). M(t) is multiplied by the carrier frequency signal cos(wct) to be transmitted, where wc = 2 p fc and fc is the carrier frequency.

M(t) = I(t) + DC

The transmitted signal Tx(t) = Gain * M(t) * cos(wct), where Gain is the transmitter's gain. M(t) can be considered as the envelope of the carrier signal.

The received signal Rx(t) = K * M(t) * cos(wct), where K is a constant proportional to Gain.

Many techniques can be used to recover M(t) from Rx(t) i.e. the Costas loop or the Hilbert based AM receiver [12] and [13].

This project uses the squared cosine technique to recover M(t) signal. The receiver directly squares the received signal Rx(t).

Rx2(t)= K2 * M2(t) * cos2(wct) = K2/2 * M2(t) * (1 + cos(2wct)) (3-3)

The cos(2wct) portion of Eq. (3-3) can be removed by using an optimum LPF. The LPF's output = K1 * M2(t), where K1 = K2/2 * LPF's gain. Taking the square root to the LPF's output yields f(t) = K2 * M(t), where K2 = K1.

Now f(t) = K2 * M(t) = K2 (I(t) + DC) = (K2 I(t) + K2 DC) is the time domain input signal to the FFT stage of the OFDM modulator. The FFT will convert f(t) from the time domain to the frequency domain. The FFT's output of point m=0 will be proportional to the DC portion of f(t) (K2 DC). The multicarrier information portion (K2 I(t)) will be converted into vectors at the FFT's output points identical to those vectors used as the inputs of the IFFT stage in the modulator in terms of number and locations and proportionate to them in terms of the magnitude. For example, if the number of the IFFT and FFT points is 16 and each OFDM symbol has 6 carriers. Hence each 6 carrier vectors will be assigned to points (1 to 6) of the IFFT input points and there conjugates to points (15 back to 10 respectively) to assure the conjugate symmetric at the modulator. At the demodulator after reception, the outputs of the FFT will be a vector at point (0) representing the DC and vectors at points (1 to 6) and (15 back to 10) representing their counterparts at the modulator and proportional to them. Fortunately, unlike the normal AM receiver, there is no need to use any technique to remove the DC from the received M(t) such as the notch filter [12] and [13], since the FFT stage in the OFDM demodulator expresses this DC component as the output at point (m=0).

The benefit of the DC offset is to prevent the negative values of I (t) to become positive after being squared, as the square root operation always gives the positive root. For example at specific time if I(t) = -5, I2(t) = + 25 and +25 = 5 (not - 5) but if a DC offset value = 9 is added to I(t) = -5 then I(t) + DC = -5 + 9 = 4 = M(t), M2(t) = 16 and 16 = 4 and 4 - 9 = (- 5). Therefore, the DC offset value must be greater than the highest absolute value of the negative values of I(t) to protect the negative values of I(t) from the square and square root operations. This project resembles the OFDM modulation used in the DVB-T and Wi-Fi 802.11a with a very simple manner in terms of using the payload and pilot carriers and the CP.

The MATLAB code (3-2) simulates OFDM modulator and demodulator with 16 IFFT and FFT points, with 6 subcarriers. 4 subcarriers are used as payload carriers and 2 as pilot carriers. One of the 2 carriers is a continual pilot carrier and the other is a scatter pilot carrier. Unlike the DVB-T, the scatter pilot does not change its position in the frequency domain; instead it changes its phase between 0 and 180 degrees from symbol to symbol (to be discussed next section). For each OFDM symbol the 4 payload carriers are mapped to points m = 1, 2, 4, and 5 and their conjugates at points m = 15, 14, 12 and 11 respectively. The continual pilot carrier is mapped to point m = 3 and its conjugate is mapped to point m = 13 while the scatter pilot carrier is mapped to m = 6 and its conjugate is mapped to m = 10. Producing this distribution of the OFDM symbol's subcarriers as the input of the 16 point IFFT assures that the 16 output values of IFFT, representing the 16 samples of the OFDM symbol in the time domain having only real parts (Q = 0). As 4-QAM is used to modulate the payload carriers, each payload carrier carries 2 data bits. Each OFDM symbol carries 4 * 2 = 8 data bits. The pilot carriers do not carry any data bits and they are BPSK modulated.

Below is MATLAB code (3-2) with its explanation.

  1. Lines (5-21) initialize the variables.
  2. Lines (25-68) represent the OFDM modulator.
  3. Line (25) indicates the sequence of the OFDM symbol being transmitted and received to simulate the transmission and reception of a number of OFDM symbols equal to (OFDM_Symbols) which is set to 100 in the initialization.
  4. Lines (26-29) compel the last two OFDM symbols (99 and 100) to carry the same data (to be discussed next section). Line (27) randomly generates 8 data bits for each OFDM symbol.
  5. Line (30) maps each 2 bits of the 8 bits to the one of the 4 payload carrier vectors in accordance with the 4-QAM constellation.
  6. Lines (36-51) distribute subcarrier vectors on the IFFT input points with Conjugate Symmetric arrangement to assure that the IFFT output has only real part in the time domain.
  7. Lines (36-43) distribute the payload carrier vectors and their conjugates on the IFFT inputs points (the arrays in MATLAB do not have index equal to zero, hence the array (IFFT_Inputs), whose length = FFT_Points = 16 from the initialization, has 16 complex variable indexed from 1 to 16).
  8. Lines (45-46) assign the continual pilot vector and its conjugate to points (3 and 13) respectively (in MATLAB (4, 14)).
  9. Lines (48-51) assign the scatter pilot vector and its conjugate to points (6 and 10) respectively (in MATLAB (7, 11)). If the OFDM symbol's sequence is odd the scatter pilot vector = 2 + J0 and if it is even the scatter pilot vector = -2 + J0 (to be discussed next section)
  10. Line (52) performs the IFFT operation to produce the 16 samples of the 6-subcarrier signal or the multicarrier information signal in the time domain.
  11. Lines (55-57) slice the signal in the time domain by repeating each sample 20 times [14] to overcome the distortion in the signal due to the group delay of the digital filters. The slicing operation can be done by using a unity impulse response FIR filter [14] but this way is more optimized.
  12. Line (58) adds the DC offset.
  13. Lines (60-64) insert the guard interval (GI) or the cyclic prefix (CP). In this simulation the duration of the CP is set to 1/4 of the OFDM symbol duration in the initialization. Therefore last quarter of the OFDM symbol is copied and append to the beginning of the symbol. The duration of the OFDM symbol with the CP is equal to 1.25 of the original OFDM symbol duration.
  14. Lines (66) LPF filters the signal. Butterworth IIR filters are used in OFDM modulator and demodulator. The generation of the coefficient of these filters is done in the initialization. The IIR filters will be discussed next chapter.
  15. Line (68) boosts and modulates the transmitted signal by multiplying the LPF's output signal by the transmitter's gain and the cosine signal of the carrier frequency.
  16. Lines (74-94) represent the OFDM demodulator.
  17. Line (74) receives the transmitted signal after being exposed to the AWGN with SNR = 25. The study of the effects of the channel on the received signal is outside the scope of this project.
  18. Lines (76-79) recover the information signal and the DC offset from the carrier signal as was illustrated earlier in this chapter. In this simulation the OFDM demodulator resembles the practical separate DSP OFDM demodulator, as it does not has any knowledge about the carrier signal (the Cosine) used by the modulator.
  19. Line (81) removes the CP from the beginning of the OFDM symbol.
  20. Lines (83-85) de-slice of the received signal by peaking up one sample from every group of 20 samples. It would better to peak a sample from the last five samples of each group as they are less affected by the group delay of the digital filters.
  21. Line (87) perform the FFT to the received OFDM symbol which contains a DC offset to produce a set of vectors at the FFT output points similar to that set of vectors used as the input to the IFFT in the modulator with proportional magnitudes and a vector at point (0) (in MATLAB (1)) proportional to the DC offset, hence there is no need to any circuit before the FFT stage to remove this DC offset such as the notch filter.
  22. Lines (89-92) extract the independent payload carrier vectors. The output of the FFT is a set of 13 non-zero vectors in the frequency domain with the following positions. The DC is at (0) and 4 payload carriers are at (1, 2, 4 and 5) and the conjugates are at (15, 14, 12 and 11) respectively and 2 pilot carriers and their conjugates are at (3, 6, 13, 10) respectively. However, to recover the data bits we only need to the payload carrier vectors in the independent portion of the spectrum (at the positions 1, 2, 4 and 5). For the MATLAB notation, please add one to each frequency position mention above.
  23. Line (94) de-maps the 4 payload carrier vectors to produce the received data bits. Each vector is de-mapped to 2 data bits in accordance with the 4-QAM constellation. Each 8 bits generated at the modulator carried by an OFDM symbol is received at this point in the demodulator.
  24. Line (96) compares the transmitted and the received data bits of each OFDM symbol to find the number of bits being in error and the BER of the currently received symbol.
  25. Lines (98-99) calculate the total number of bits being in error for the entire received OFDM symbol and accumulate the independent payload vectors for all the received OFDM symbols for scatter plotting them.
  26. Lines (101-104) hold the 2 last OFDM symbols (99 and 100 in this simulation) for the CP Comparison plots (figures (3-3 & 4)) to study the CP Comparison operation (to be discussed next section).
  27. Lines (106-108) display the total number of received bits being in error and calculate and display the total BER. The total BER is equal to (total number of received bits being in error) divided by (the total number of received bits which is equal to number of the received OFDM symbols multiplied by the number of data bits per OFDM symbol). For this simulation the total number of bits being in error and the BER are zero.
  28. Lines (109-110) scatter plot the constellation of the payload carrier vectors of all received OFDM symbols in figure (3-1).
  29. Lines (111-129) plot figures (3-3) and (3-4) to study the CP Comparison operation (to be discussed next section)

Figure (3-1) the scatter plot of the received payload carriers of 100 OFDM symbols

3.4 The Synchronization of the OFDM Symbols

The practical separated OFDM demodulator requires not only to recover the information multicarrier signal from the carrier frequency signal but to also know the beginning and end of each OFDM symbol in the received signal. Without the knowledge of the exact boundaries of the received OFDM symbol, the OFDM demodulator is likely to perform the FFT operation for the received time domain signal in such a way that the adjacent parts of two successive symbols are involved in the FFT operation which yields wrong FFT output carrier vectors and consequently wrongfully received data bits.

This project utilizes the guard interval (GI) or the cyclic prefix (CP) of the received OFDM signal to know the boundary of each received OFDM symbol, as the cyclic prefix at the beginning of each OFDM symbol is an identical copy to the end part of that symbol for the same duration of the cyclic prefix.

When the DSP receiver has received a number of samples equal to those of the entire OFDM symbol and its cyclic prefix, the DSP receiver makes a comparison between the beginning of this symbol and its end part for a number of samples equal to those of the cyclic prefix duration. If the beginning and end parts are identical the receiver removes the cyclic prefix or the guard interval from the beginning of the OFDM symbol to introduce the correct OFDM symbol to the FFT stage to transform it to the frequency domain and produce the correct payload carrier vectors to the QAM de-mapping stage. Let's call this comparison operation the CP Comparison.

If the beginning and end parts of the received OFDM are not identical, the receiver skips one DSP sample and repeats the operation again till it captures the exact boundaries of the OFDM symbol. The DSP receiver does this comparison operation in the time domain.

Figure (3-2) illustrates the CP Comparison operation. A and B are two buffers, each of which has a duration equal to the CP's duration. The distance between A and B is equal to the distance between the CP appended at the beginning of an OFDM symbol and the end part of that symbol which has the same CP's duration. The CP Comparison operation always compares the part of the received signal being held by A with that being held by B. If these two parts are not identical, A and B buffers step forward one DSP sample duration and the comparison is done again. When the CP Comparison operation gives an indication that the two parts being held by A and B are identical, this indication means that A is holding the CP of an OFDM symbol and B is holding the end part and as a result; the receiver is capturing the correct OFDM symbol and the FFT window is in the right position to perform the FFT operation on the information signal to produce the subcarrier vectors in the frequency domain. In figure (3-2), the current positions of A and B make A and B hold two correspondent parts of two consecutive OFDM symbols ((n-1) and (n)). As these two parts have different shapes in the time domain, the CP Comparison operation will show that the two parts are not identical. A and B will step one DSP sample duration forward and the comparison is repeated. This stepping forward will continue till A holds the entire CP of symbol (n) and B holds the entire end part of symbol (n). At this moment, the receiver is locking on the right boundaries of the OFDM symbol. The CP is removed and the original OFDM portion (the multicarrier information signal) is handed to the FFT stage to produce all the subcarriers vectors simultaneously.

Figure (3-2) the CP Comparison operation to lock on the right boundaries of the received symbol

If two consecutive OFDM symbols carry the same the data bits, they will be identical in the time domain and the frequency domain, because they have the same payload carriers. In other words, any part in the middle of one of the OFDM symbols is identical to its counterpart in the other symbol, so the receiver is not able to recognize the right boundaries of each of these two consecutive and identical OFDM symbols by using the CP Comparison. A and B are always holding two identical parts. However, they are not always the CP and the end part of one of these two identical OFDM symbols.

To overcome this problem, the shape of each two consecutive OFDM symbols must not be identical, even when they carry the same payload data. The way to do so is to use some pilot carriers that change their positions in the frequency domain or their phases from symbol to symbol to assure that there are no two consecutive symbols identical, even when they carry the same data bits.

At this point we understand why the scatter pilot carrier in the lines (49-51) of MATLAB code (3-2) changes its phase from symbol to symbol to be 0 or 180 degrees consecutively. This assures that even when two consecutive OFDM symbols carry the same data bits, their shapes in the time domain are different from each other because their spectrums are not identical in the frequency domain. The practical OFDM demodulator will never wrongfully consider the two parts of consecutive OFDM symbols under the CP Comparison the beginning and end of an OFDM symbol, as they are different, even when their OFDM symbols carry the same payload.

Lines (26-29) of MATLAB code (3-2) are to compel the last two OFDM symbols in the simulation to carry the same payload data bits. MATLAB code (3-2) simulates the transmission and reception of 100 OFDM symbols (numbered from 1 to 100). Therefore symbols numbered 99 and 100 carry the same data bits. However, they have different shapes, because their scatter pilots have different phases in the frequency domain.

In lines (101-104) of MATLAB code (3-2) the Symbol_Holder array with two rows holds the samples of the last two received OFDM symbols (99 and 100), each of which in the columns of one row. We will make use of these two symbols to compare the CP of each symbol with its end part and to compare the two symbols.

Figure (3-3) shows the absolute difference between the CP of symbol 99 and its end part and the CP of symbol 100 and its end part. The transmitter generates the CP of each OFDM symbol as an identical copy to the end part of that symbol for the CP duration. However, figure (3-3) does not show zero differences over the whole CP duration, as it is theoretically expected. The reasons behind that are the group delay of the digital filters and the effects of the noise. The first (5 to 10) samples show very great differences; therefore the receiver should practically skip the first samples of the CP duration of the two parts under the CP Comparison and accept an absolute difference within a narrow limit as an indication of the similarity in the CP Comparison process.

Figure (3-3) the absolute difference between the CP of symbol 99 and its end part and the CP of symbol 100 and its end part in the time domain

Figure (3-4) shows the absolute difference between the shapes of the last two received OFDM symbols in the time domain. Even though they carry the same data bits (the same payload carriers), the phase change of the scatter pilot from symbol to symbol makes their shapes different in the time domain. Therefore the CP Comparison operation will not make a mistake while it is comparing two parts of such consecutive symbols, thanks to scatter pilot carrier which change from symbol to symbol to assure such a difference. MATLAB code (3-2) does not use the CP Comparison, as the transmitted OFDM symbol is directly handed to the receiver in the same code. However, the hardware implementation uses it, because the transmitter and receiver are on separate DSP boards.

Figure (3-4) the absolute difference between consecutive symbols 99 and 100 in the time domain

Chapter Four

The Real Time DSP Hardware Implementation

4.1 Introduction

This chapter shows the hardware implementation of the OFDM modulator and demodulator on two separate laboratorial DSP boards figure (4-1). Each board is programmed by using the C programming language and the Code Composer Studio (CCS) software. The CCS provides an Integrated Development Environment (IDE) for real time digital signal processing applications based on C programming language. It incorporates a C compiler, an assembler, and a linker. It has graphical capabilities and supports real time debugging [15].

Figure (4-1) the OFDM modulator & demodulator DSP boards

Each laboratorial DSP board is a Texas Instruments DSP starter kit (DSK) board. The DSK board is a circuit board mainly containing a digital signal processor (either a 255-MHz C6713 floating point digital signal processor or 1-GHz C6416 fixed point digital signal processor), a 16-bit stereo Codec (Coder-Decoder) TLV320AIC23 (AIC23) and other peripherals. The AIC23 codec uses (sigma-delta technology [16]) which provides signed 16-bit analogue to digital conversion (ADC) to the input analogue signal to be processed by the DSP system and provides signed 16-bit digital to analogue conversion (DAC) to the output digital signal after being processed by the DSP system [15].

The ideas and approaches which have been discussed and simulated by MATLAB in the last chapter will be implemented. Real time DSP implementation is more complex than MATLAB simulation. However, it is more interesting, as it allows you to realize how DSP theories are practically implemented.

Most communication and digital signal processing operations such as QAM, FIR, IIR, FFT and IFFT are executed in MATLAB with one line commands, whereas our real time DSP implementation requires writing a specific C code for each of these operations and maintaining a special kind of harmony and synchronization among the whole parts, operations and mathematical expression of the C program written for real time DSP implementation.

4.2 The FFT and IFFT Hardware Implementation

The N-point FFT is a faster way to implement N-point (Discrete Fourier Transform (DFT), (when N = 2k where k is a positive integer) to convert the discrete signal from the time domain to the frequency domain [17]. The general expression for the N-point DFT for m= 0, 1... N-1 is given in Eq. (4-1)

X[m] = n=0N-1 xne-j2pmn/N = n=0N-1 xn WNmn (4-1)

The (Twiddle Factor) notation WN = e-j2p/N is used for more compact notation. The general expression for the N-point Inverse DFT can be expressed as in Eq. (4-2) [18].

x[n] = 1N m=0N-1 Xmej2pmn/N = 1N m=0N-1 Xm WN-mn (4-2)

In our implementation the constant factor 1/N has no effect, as the signal is multiplied by other constants i.e. the gain. Therefore the same C code used for calculating the N-point FFT outputs can be used for calculating the N-point IFFT outputs with just changing the twiddle factor's sign. [18] provides a C code for non-real time calculating of N-point FFT. This code has been modified for real time N-point FFT and IFFT calculations for this implementation. In this implementation, the C code of the modulator calls the IFFT function to convert the subcarrier vectors in the frequency domain into a multicarrier signal's samples in the time domain. The C code of the demodulator reverses the operation by calling the FFT function.

4.3 The IIR LPFs Hardware Implementation

This project uses Butterworth IIR filters as LPFs in both the modulator and demodulator. The main advantage of the IIR filters over the FIR filters is that IIR filters require far fewer multiplications (have much lower number of coefficients) to achieve the same output's characteristics [19].

If x[n] holds the current input sample and y[n] holds the current output sample of a Butterworth IIR filter with order M. y[n] and x[n] have the following relation

y[n]x[n] = k=0k=Mbk*z-kk=0k=Mak*z-k (4-3)

The M-order Butterworth filter has two sets of coefficients b[k]s and a[k]s. each set has (M+1) coefficients. Let's denote the b[k]s as the numerator coefficients and a[k]s as the denominator coefficients. a[0] is always = 1, hence the current output sample y[n] can be expressed as in Eq. (4-4)

y[n] * a[0] = (k=0M xn-k*b[k]) - (k=1M yn-k*a[k]) (4-4)

y[n] = (num) - (den) (4-5)

num represents the sum of products (SOP) of the buffered inputs (x[n-k]s) and the numerator coefficients (b[k]s). den represents the sum of products (SOP) of the buffered outputs (y[n-k]s) and the denominator coefficients (a[k]s) except y[0]*a[0] which is on the left hand side of Equations (4-4) and (4-5). Equations (4-4 and 5) can be depicted in figure (4-2) for IIR filter with M = 3. Figure (4-2) and equations (4-4 and 5) facilitate writing the C code for a third order (M=3) IIR filter or any order. In figure (4-2) b[k]s and a[k]s hold the numerator and denominator coefficients respectively. x[0] holds the current input sample (x[n]) and x[1] hold the previous sample (x[n-1]) and x[2] and x[3] hold the previous samples x[n-2] and x[n-3] respectively. y[0] holds the current output y[n] and y[1, 2 or3] hold the previous output samples y[n-k] for k=1, 2 or 3 respectively.

Figure (4-2) the third order Butterworth IIR digital filter block diagram

x[k]s and y[k]s are called the delays or the buffers of the IIR filter. x[k]s and y[k]s must be shifted after producing each output to be prepared for the next input. The shift is done in a consecutive way, so x[3]=x[2], x[2]=x[1] and x[1]=x[0] and the same way for y[k]s, hence all the previous value are shifted and now x[0] and y[0] are ready to receive or hold the next input and output respectively. This method is called the circular buffer and also can be done with the FIR filters [20].

For each new input sample, x[0] buffer receives or holds this input and the products between x[k]s and their correspondent b[k]s for k=0, 1, 2 and 3 are performed. The sum of these products is stored in the variable (num); this operation is called the feed-forward calculations [19]. Variable (den) stores the sum of products between y[k]s and a[k]s for k=1, 2 and 3; this operation is also called the feed-back calculations [19]. The product of y[0]*a[0] is not involved in the feed-back calculations, as it is on the left hand side of equations (4-4 and 5). a[0] is always equal to one, hence y[0] is equal to (num - den) which is given to the output and the circular buffer operation is done to update the delays and to prepare them to next sample to be filtered. C code (4-1) execute the third order Butterworth IIR filter routine

#include<math.h>

#include “coef.h” /* Call the file (coef.h) which stores the IIR filter's coefficients */

//Variable Declaration

short x[4], y[4]; //The delays or buffers of the IIR filter

float Input, Output; // The input & output samples

float num, den; // Store the feed-forward & feed-back calculations

short j, k; // Index the loops

/*Both b[4] and a[4] are declared as float type variables and store the IIR filter's coefficient in the separate file (coef.h) which is called in the execution*/

//The C routine to implement the DSP IIR filter

Input = input_sample ( ); //read a new sample from the ADC

x[0] = Input; //The current input sample

y[0] = 0; num = 0; den = 0; /*Initialize the variables [(y[0]*a[0]) will not be involved in the feed-back calculations]*/

for (k=0;k < 4;j++)

{num+ = x[k] * b[k]; //(SOP) Feed-forward calculations

den+ = y[k] * a[k] ;}//(SOP) Feed-back calculations

y[0] = num - den; // Store the filtered sample in y[0]

for (j=3; j > 0; j++)

{x[j] = x[j-1] ; y[j] = y[j-1] ;} // Update the delays of the IIR filter

Output = y[0]; //The current output filtered sample

output_sample ((short) Output); // The codec AIC23 is 16-bit

//The end of the C routine

The C code (4-1) for the Butterworth IIR filter

Certainly the coefficients of the filter specify its type LPF, HPF, BSF or BPF. In the C code (4-1), zero is assigned to y[0] in order that the product (y[0] * a[0]) will not be involved in the feed-back calculations. To derive the coefficients of a Butterworth IIR LPF the following MATLAB command can be used

[b,a] = butter (M, Fc)

([b,a] = butter (M, Fc)) designs an Mth order low-pass digital Butterworth IIR filter and returns the filter coefficients in lengths (M+1) numerator coefficients (b) and (M+1) denominator coefficients (a). The coefficients are listed in descending powers of z. The normalized cutoff frequency Fc must be 0 < Fc < 1, with 1 corresponding to half the sampling frequency Fs [21]. Therefore the cutoff frequency must be normalized through dividing it by Fs/2. The digital IIR LPF in our modulator is used to smooth the OFDM information signal and it is possible to not use it, as the DAC in the DSP board has a reconstruction filter to smooth the DAC's output [22]. However the digital IIR LPF in the OFDM demodulator is very important, because it participates in the recovery of the OFDM information signal from the carrier signal. The laboratorial practical experience led to use M=3 and Fc=1/2 for the modulator's IIR LPF and M=3 and Fc=1/4 for the demodulator's IIR LPF.

In this implementation The C code for the OFDM modulator (OFDM-TX.c) file includes the file (Tx.h) which contains the coefficients of IIR LPF (the two arrays b and a for the numerator and denominator respectively) used by the modulator to smooth the OFDM information signal as well as (Tx.h) contains the real (In-phase) and imaginary (Quadrature) values of the 4-QAM constellation to map the payload carrier vectors (the two arrays qr and qi for the (In-phase) and (Quadrature) values respectively). MATLAB Code (4-1) builds (Tx.h) file in figure (4-3).

MATLAB Code (4-1) to build (Tx.h) file.

//This file is to provide the 4-QAM Constellation and

//the IIR LPF coefficients for the DSP implementation

//of the OFDM Modulator

//The 4-QAM Constellation

short qr[4]={-1, -1, 1, 1 }; //In-phase (real)

short qi[4]={1, -1, 1, -1 }; //Quadrature (imaginary)

//The IIR LPF Coefficients

float b[4]={ 1.6667e-001, 5.0000e-001, 5.0000e-001, 1.6667e-001 };

float a[4]={ 1.0000e+000, -4.9960e-016, 3.3333e-001, -1.8504e-017 };

Figure (4-3) Tx.h file contains the 4-QAM constellation & IIR LPF coefficients

With a similar way the (Rx.h) file which contains the OFDM demodulator's IIR LPF coefficients is created for the OFDM demodulator C code (OFDM-Rx.c) file by MATLAB code (4-2) in the attached CD.

4.4 The DSP OFDM Modulator

Figure (4-4) shows the flow chart of the DSP OFDM Modulator's algorithm of the Interrupt Service Routine (ISR) to generate and transmit the OFDM signal's samples. The ISR is an infinite loop to which the execution of the code jumps after the global declaration and the initialization of the different variables. The execution of the code starts the ISR loop, when the codec interrupts the digital signal processor to read and/or write a new sample within the sampling duration Ts. Each OFDM symbol's samples must be generated during its first sample duration due to the parallel nature of the IFFT operation (serial to parallel). For N-IFFT points, each generated OFDM symbol has originally N discrete values or samples in the time domain generated simultaneously and stored in an array during its first sample duration which is certainly equal to the sampling duration (Ts = 1/Fs). Additionally, the OFDM symbol is sliced in the time domain in such a way that each sample of those N samples is repeated 20 times during the first sample duration [14]. This explains the serial to parallel property of the OFDM modulator.

Figure (4-4) the DSP OFDM modulator's algorithm of the ISR flow chart

The OFDM symbol duration is 20 * N * Ts without the CP duration. For a CP duration equal to quarter the OFDM symbol duration, the CP duration is equal to 5 * N * Ts (5 = 20 * 1/4) and the total guarded OFDM symbol duration is 25 * N * Ts. The ISR is started, when the codec interrupts the digital signal processor. C1 or (counter1) is the samples' counter of the OFDM symbol being generated. It is initialized with zero and incremented by one each time the ISR loop is executed. When it is equal to the number of samples of one OFDM symbol with its CP (25 *N), it is reset to zero and repeats the same operation to generate a new OFDM symbol. When C1 is zero, this is the indication to generate a new OFDM symbol. The data bits, which are generated on board are mapped to the payload carrier vectors in accordance with the 4-QAM constellation and the continual pilot carrier vector is inserted. As it was discussed in the last chapter the scatter pilot is used to assure that every two consecutive generated OFDM symbols will have different shape in the time domain as the receiver uses the CP Comparison operation to know the correct boundaries of each OFDM symbol in the received OFDM signal. For this job, C2 or (counter2) is the OFDM symbols' counter and it is employed to be incremented by one with each new OFDM symbol being generated. For every new symbol being generated the C2 value is tested to be either even or odd. If it is even the inserted scatter pilot's phase is 0 degrees else the scatter pilot's phase is 180 degrees. This way assures that there will be no two consecutive OFDM symbols carrying the same data are identical in the time domain, as the scatter pilot assures that they have different spectrums in the frequency domain in the terms of the phase. C2 is initialized with zero and there is no need to reset it. It will reset automatically, when it reaches its maximum allowable positive value and increments again. If C2 is declared as a short type variable (16-bit), its maximum positive allowable value to reach is (2(15) - 1) = 32767. The short data type variable has 16 bits and is represented as 2's complement with a range from -215 to (215 - 1) [23]. Now, the payload carrier vectors and pilot carrier vectors with their conjugates which represent the spectrum of the OFDM symbol being generated are stored in a complex array (real & imaginary) with one dimension = N. The complex array is the input of the N-point IFFT function. The IFFT function returns the N discrete values of the multicarrier OFDM symbol in the time domain (the information signal) with a real part only, as the conjugate symmetric is presented in the frequency domain. The OFDM symbol is sliced and a DC offset is added. The CP is appended at the beginning of the OFDM symbol and it is LPF filtered. The information OFDM symbol is ready to be transmitted during its first sample duration. The OFDM symbol is transmitted sample by sample within each time the digital signal processor is interrupted (parallel to serial operation). The output sample is calculated by multiplying the current OFDM symbol's sample by the gain and the correspondent carrier signal's sample. The output sample is written to the codec's DAC to produce the analog output. From the programming point of view, it is also possible to put the slicing and adding DC-offset operation, appending the CP operation and the filtering operation outside the (C1=0) conditional loop in order that these operations are done sample by sample to reduce the number of the processing cycles needed during the first sample duration. However the practical tests show that this algorithm provides better performance besides that the cycles need for the operations mentioned above are few.

The DSP hardware implementation uses N = 16 (IFFT and FFT points) and 6 subcarriers. 2 subcarriers are the continual and the scatter pilot carriers and 4 are the payload carriers. The payload carriers have the following locations in the spectrum at m = 1, 2, 4 and 5 and their conjugates at N - m = 15, 14, 12, 11 respectively. The continual pilot and its conjugate are at m = 3 and 13 respectively. The scatter pilot and its conjugate are at m = 6 and 10 respectively. This conjugate symmetric of the subcarrier vectors in the frequency domain assures that the output of the IFFT function is the multicarrier information OFDM symbol signal in the time domain with an imaginary part always equal to zero, hence the complex quadrature modulation and demodulation is no longer needed.

Each OFDM symbol carries 8 data bits, because it has 4 payload carriers each of which carries 2data bits according to the 4-QAM constellation.

The OFDM modulator project folder (OFDM-TX) containing the C code file (OFDM-Tx.c) is in the CD-ROM attached with this thesis.

4.5 The DSP OFDM Demodulator

There is no doubt that the implementation of the demodulator is more complex than the that of modulator, because the synchronization issues of recovering the OFDM information signal from the carrier signal and the OFDM symbol timing synchronization in the terms of the demodulator's ability to pinpoint the beginning and end (the boundaries) of each OFDM symbol in the recovered OFDM information signal to perform the FFT operation to the correct samples of each received OFDM symbol (the OFDM symbol timing recovery).

The approaches used to recover the OFDM information signal from the carrier signal and the use of the CP Comparison to enable the demodulator to lock on the right boundaries of each received OFDM symbol were discussed last chapter. Figure (4-5) shows the DSP OFDM demodulator's algorithm of the ISR flow chart. Every ISR loop, the Skip_Sample is checked. If it is zero, a new received sample is read from the codec's DAC. The received sample is squared and stored in an array (Sq in this flow chart) with one dimension equal to

Figure (4-5) the DSP OFDM demodulator's algorithm of the ISR flow chart

(25*N) which represents the total number of samples per each OFDM symbol with its appended CP. C1 is the samples' counter. C1 is incremented by one and checked. If it is equal to the number of OFDM symbol's samples, C1 is reset and the Sq's values are LPF filtered and square rooted. The operations of squaring each OFDM symbol's samples, filtering and square rooting them are to recover the information OFDM signal from the carrier signal. The CP Comparison operation is done to check whither the receiver is holding a correct OFDM symbol. If this comparison gives negative indication, the receiver sets Skip_Sample to one. This assures that the next coming sample of the received signal will be skipped. This skipping operation will be repeated, until the receiver holds the correct OFDM symbol (The CP Comparison indicates positive). The correct Received OFDM symbol is de-sliced and the CP is removed. The OFDM symbol is ready for the FFT operation. The output of the FFT is the spectrum of the OFDM symbol in the frequency domain plus a component representing the DC Offset and proportional to it which was added in the transmitter. The magnitudes of the received subcarrier vectors and their conjugates are proportional to those correspondent ones generated by the transmitter and nearly have the same phases. The important vectors are now at the spectrum points m =1, 2, 4 and 5, as they represent the payload carriers in the frequency domain. The receiver de-maps each of those 4 payload carrier vectors to its corresponding 2 data bits in accordance with the 4-QAM constellation. As it was illustrated in figure (3-2) in the last chapter, the CP Comparison operation always compares the beginning part of each received symbol with its end part for the CP duration.

The OFDM demodulator project folder (OFDM-RX) containing the C code file (OFDM-Rx.c) is in the CD-ROM attached with this thesis.

4.6 The CCS Simulation of the OFDM Modulator and Demodulator

The CCS provides good tools to simulate the C-codes in order to estimate the results of the real time DSP practical implementation. Before the hardware implementation, the OFDM modulator and demodulator were simulated by use of the CCS. The aims of this simulation are to check that the demodulator correctly receives the transmitted data bits and to visualize the CP Comparison operation. The 8 data bits to be carried by each OFDM symbol are represented by data1 and data2, each of which represents 4 bits from (0 to 15). The simulation set data1 = 3 and data2 = 11. The 8 bits combination is the concatenation of [data2@data1] = [11@3] = [1101@0011] = [11010011] to be carried by each OFDM symbol. The simulation generates 5 OFDM symbols, each of which carries the same bit combination of data1 and data2. Figure (4-6) shows the values of received data for the five symbols. All the 5 symbols were received correctly. The simulation of these 5 OFDM symbols' transmission and reception takes about 18 seconds. This is an important point to stop at. In the real time implementation, the digital signal processors of the transmitter and receiver process even 10 OFDM symbols too much faster than 18 seconds, because digital signal processors are a specialized form of microprocessors. Their architecture and instruction set are optimized for real time DSP. The optimization includes hardware multiply accumulator (MAC), the Harvard architecture which consists of a central processing unit (CPU) and two independent memory systems (one to store the program and the other to store the data [24]) and hardware bit reversed and circular addressing capabilities (for efficient implementation of data buffers and FFT and IFFT computations) [15].

Figure (4-6) the received data of the five simulated OFDM symbols

Figure (4-7) the positions of the all received subcarriers on the 4-QAM constellation except the DC offset components (m =0). The pilot carriers are on the real (In-phase) axis for (m=3 & 6) and their conjugates (m=13 & 10) respectively. The payload carriers are on the four quadrants for (m=1, 2, 4 & 5) and their conjugates (m=15, 14, 12 & 11) respectively. The zero (unused) carriers are on the origin point of the constellation for (m=7, 8 & 9).

Figure (4-7) shows the positions of the received subcarriers of the 5 OFDM symbols on the 4-QAM constellation except the DC offset components. The continual and scatter pilot carrier vectors at spectrum points (m = 3 and 6) respectively and their conjugates at (m = 13 and 10) respectively are on the real (In-phase) axis. The payload carrier vectors at (m = 1, 2, 4 and 5) and their conjugates at (m = 15, 14, 12 and 11) respectively are on the 4 quadrants. The unused points of the spectrum (m=7, 8 and 9) (the zero carrier vectors are on the origin point of the constellation).

Figure (4-8) shows the absolute difference between the appended CP and the end part of the fifth received symbol. For a CP duration equal to 1/4 the original information OFDM symbol, CP = 5 * N = 80 samples long. In figure (4-8), the absolute differences between the first samples are not equal to zero due to the group delay of the digital filters. These results also agree with figure (3-3) in chapter (3). Therefore in our real time implementation the CP Comparison ignores the first 25 samples and allows to a maximum tolerant difference equal to (5) as an indication that the CP and the end part of the received symbol are identical. If the absolute difference between a sample in the CP part of the received OFDM symbol and its correspondent sample in the end part is greater than 5, the CP Comparison loop will be quit (broken) and the CP comparison will be considered negative in the C code of the OFDM demodulator (OFDM-Rx.c file). The absolute difference value equal to 5 was estimated from the results of figure (4-8). However, the tolerance of this value must be calculated by the receiver depending on the received SNR and other circumstances of the channel for more realistic receivers. The samples after sample 21 give zero differences, as the noise effects are not taken into account in this CCS simulation.

The simulation of the OFDM modulator and demodulator project folder (CP-SIM) containing the C code file (CP-SIM.c) is in the CD-ROM attached with this thesis.

Figure (4-8) the absolute differences between the 80 CP part's samples and their correspondent 80 end part's samples of the fifth received OFDM symbol to study the CP Comparison operation of the CCS simulation

4.7 The Use of the Pilot Carriers

It has been shown how the scatter pilot is used to assure that the envelopes of every two consecutive OFDM symbols are different in the time domain even when they carry the same data patterns. This difference allows the CP Comparison operation to work properly. The continual pilot is inserted too, but it is not used by the receiver.

In reality the earlier OFDM demodulator's C codes of this implementation made use of the continual pilot for the OFDM symbol recovery's decision. That means the FFT operation was needed to be performed each time a number of samples equal to one OFDM symbol length were received to check whether the continual pilot was in its correct position in the spectrum in order to decide wither the receiver was locking on the correct boundaries of the received OFDM symbol. When the receiver found that it was holding the incorrect symbol's boundaries, the receiver skipped a sample and repeated the operation again till it locked on the correct OFDM symbol's boundaries. Unlike the CP Comparison operation, the FFT was performed, even when the receiver did not hold the correct information OFDM symbol. The CP Comparison operation needs much fewer processing cycles to allow the receiver to recover the OFDM symbol's timing than those required by the FFT operation, when the continual pilot is used for this purpose.

4.8 The Hardware DSP Implementation's Practical Results

This section shows the different outputs of the OFDM modulator and demodulator DSK boards on the oscilloscope's screen.

Figure (4-9) shows the OFDM information multicarrier signal (consisting of 6 subcarriers) in the time domain before the slicing. According to our conjugate symmetric proposal this multicarrier signal has only the real part carrying the entire OFDM symbol's information and can be modulated by any conventional modulation method to be transmitted, which gives a new proposal to use the OFDM with such a way (real part only) in the satellite digital communications instead of any other quadrature modulation through allowing the OFDM information signal to modulate the frequency of the carrier signal (FM), as the detection operation of FM signal at the receiver is not affected by the signal amplitude's distortions due to the noise. This is one advantage and another more interesting advantage is the ability of the OFDM symbol to represent tens or even hundreds QAM symbols (vectors) (much higher data rate). The spectrum in figure (4-10) represents the multicarrier OFDM signal of figure (4-9) in the frequency domain, which confirms that each OFDM symbol is the algebraic summation of 6 subcarriers in this implementation. The third and sixth tones from the left hand side (LHS) are the continual and scatter pilot carriers respectively. The other 4 subcarriers are the payload carriers, each of which carries 2 bits. In the C code, the absolute value of the QAM constellation is one for the in-phase or quadrature axes, hence the magnitude of each payload carrier is (12 + 12)1/2 = 21/2. Each of the 2 pilot carriers has an absolute real component = 2 and an imaginary component = 0, hence the absolute magnitude of each pilot carrier is 2. Figure (4-10) shows how the 2 pilot carriers' magnitude is greater than that of the payload carriers. This difference of the magnitudes can be useful to pinpoint the positions of the pilot carriers and to make use of them for the synchronization purposes. The output of the OFDM modulator in the time domain and its spectrum in frequency domain are shown in figures (4- 11&12) respectively. Figure (4-11) asserts again the role of the scatter pilot to change the signal's profile from symbol to symbol. Since each cosine carrier cycle has 4 samples, in figure (4-12) the measured carrier frequency is = Fs/4 = 16 KHz / 4 = 4 KHz.

Figure (4-9) the IFFT output. The OFDM information multicarrier signal in the time domain before the slicing (The consecutive symbols are not identical, even though they carry the same data bits.). The (Sync) signal is generated to show the start and end of each OFDM symbol on the oscilloscope's screen.

Figure (4-10) the spectrum of the IFFT output multicarrier signal (the 6 subcarriers). The 3rd and 6th are the continual and the scatter pilots respectively (from the LHS) and the other 4 are the payload carriers. The pilot carriers' magnitude is greater than the payload carriers' magnitude.

Figure (4-11) the transmitted OFDM signal. The consecutive modulated OFDM symbols have different shape or profile. Each OFDM symbol carries the same 8 data bits though

Figure (4-12) the OFDM modulator's output signal in the frequency domain. The carrier frequency (Fc) is 4 KHz. (The sampling rate is 16 KHz & the cosine carrier signal has 4 samples per cycle.)

Figure (4-13) the received OFDM modulated signal and the received data bits. The transmitted data bits are data2 = 7 = [0111] & data1 = 15 = [1111]. The 8 data bits carried by each OFDM symbol are [data2@data1] = [01111111] from LHS to the RHS on the oscilloscope's screen.

Figure (4-14) the received data bits are [01111111] from LHS to RHS (data2 = 7 & data1 = 15) for each received OFDM symbol.

Figure (4-15) the received data bits are [10110011] from LHS to RHS (data2 = 11 & data1 = 3) for each received OFDM symbol.

Figure (4-16) the received data bits are [00100101] from LHS to RHS (data2 = 2 & data1 = 5) for each received OFDM symbol.

Figure (4-17) the received data bits are [10101010] from LHS to RHS (data2 = 10 & data1 = 10) for each received OFDM symbol.

Figure (4-18) the eye diagram is used to measure the best timing sequence to make the hard decision for the ML circuit. The best time to make the hard decision is when the eye has the maximum opening [25].

Figures (4-13 to 17) show the correctly received data bits for different transmitted 8 bits data patterns.

Unlike the maximum likelihood (ML) circuit which uses the eye pattern figure (4-18) to estimate the correct timing sequence to make the hard decision in order to decide that the received bit is either 0 or 1 in the impulse modulated BPSK receiver [25], the correct reception of the data bits in the OFDM receiver directly depends on providing the FFT in the receiver with the OFDM symbol with the right boundaries and the perfect channel estimation which is to estimate the amount of the phase rotation of the all subcarrier vectors (due to the effects of the channel) in order to allow the received payload carrier vectors to appear in the same QAM constellation part from which they were originally initiated in the OFDM transmitter.

4.9 The Bandwidth Calculations

In the DVB-T and the other standards, the amount of the spectrum (the bandwidth) occupied by the OFDM information signal is calculated by multiplying the frequency spacing (carrier spacing) between the adjacent subcarriers in the frequency domain and the number of the used subcarriers (the payload and pilot carriers). The 2K DVB-T has a carrier spacing = 4.464 KHz and 1705 used carriers, so the bandwidth = 4464 * 1705 = 7.61 MHz [14].

For our Conjugate Symmetric approach, the spectrum has two portions. The independent portion (f < Fs/2) reveals all the information of the multicarrier signal (i.e. the number of the subcarriers (the sinusoidal waves) forming the multicarrier signal, each carrier's frequency, the amplitude and phase of each carrier (sinusoidal wave) with respect to the other carriers. The dependent portion (f > Fs/2) has the conjugates of the vectors (the carriers) of the independent portion; hence the dependent portion does not reveal any information. It just confirms that the signal in the time domain has a real part only as long as the conjugate symmetric exists between the two portions. Therefore, the bandwidth required to accommodate the multicarrier information signal is calculated by multiplying the number of the used carriers and the frequency spacing between the adjacent carriers. To confirm this conclusion, the multicarrier signal of Eq. (3-1) is the algebraic summation of five sinusoidal waves or carriers with frequencies equal to 1, 2, 3, 4 and 5 KHz respectively. The multicarrier signal's spectrum in table (3-2) shows the 5 tones (m <N/2) and their 5 conjugates (m>N/2) (N=16). N/2 corresponds to Fs/2. If the dependent portion were taken in to account to calculate the bandwidth, the signal of Eq. (3-1) would have ten subcarriers (sinusoidal) waves rather than 5, which contradicts the reality. Therefore the conjugate vectors are not taken into account to calculate the bandwidth.

Figure (4-10) shows the spectrum of the 6 subcarriers of our practically implemented multicarrier OFDM signal which uses the conjugates symmetric. The spectrum analyzer does not display the dependant portion, which confirms that it is not used to calculate the bandwidth. In our hardware implantation, Fs is set to 16 KHz and the number of IFFT points N = 16, so the frequency spacing = Fs/N = 1 KHz figure (4-19). 6 subcarriers are used at m = 1, 2, 3, 4, 5 and 6 and their conjugates are at (N-m) = 15, 14, 13, 12, 11 and 10 respectively. The multicarrier signal in the time domain of figure (4-9) is the algebraic summation of the 6 sinusoidal waves having frequencies of 1, 2, 3, 4, 5 and 6 KHz for each. Figure (4-20) measures the bandwidth (the frequency span) between the first carrier and sixth carrier which is equal to (6 KHz - 1 KHz = 5 KHz). This means that the bandwidth between the first carrier and last carrier is equal to ((the frequency spacing) * (No. of the used carriers - 1)). However, (frequency spacing) * (No. of the used carriers (without (-1)) is used to calculate the bandwidth in order to accommodate all the main lobes of the overlapped sincs like those of figure (2-5).

Figure (4-19) the frequency spacing (carrier spacing) between the subcarriers = 1 KHz

Figure (4-20) the frequency span between the first carrier and the sixth carrier = 5 KHz

Therefore the bandwidth of the multicarrier signal generated by the Conjugate Symmetric approach is equal to that of the multicarrier signal generated by the traditional method for the same number of the used subcarriers and the same frequency spacing.

In our hardware implementation, the OFDM information signal (the multicarrier signal) has a total bandwidth equal to (6 used subcarriers * 1 KHz frequency spacing = 6 KHz) before the slicing operation. As the slicing operation repeats each sample of the multicarrier OFDM information symbol 20 times, the total bandwidth of the sliced OFDM symbol will be reduced 20 times.

4.10 The Bit Rate Calculations

The DSP hardware implementation uses sampling rate Fs = 16 KHz and IFFT & FFT points N = 16. For each OFDM symbol being generated, the IFFT produces 16 discrete values representing the 16 samples of the OFDM symbol in the time domain. After the slicing operation, each sample is repeated 20 times and a CP equal to the 1/4 of the (20 * 16) samples is appended. The transmitted OFDM symbol eventually has (20 * 16 * (1+1/4) = 400 samples per symbol). The OFDM symbol duration = (No. of samples per symbol * Ts) = (400 * 1/16000 = 25 m Sec.). Each OFDM symbol carries 8 bits, so the bit rate = 8 bits / 25 m sec = 320 bits/sec.

The practical OFDM systems produces too much higher data rates because they use much higher sampling rate than 16 KHz and FFT size greater than 16 and may not use the slicing operation which enlarges the OFDM symbol duration and consequently reduces the bit rate.

Chapter Five

Conclusions, Further Work and Physical Outcomes

5.1 The Conclusions

The following points are the conclusions that have come out of the DSP-OFDM Modulator project.

  • The IFFT in the OFDM modulator deals the vectors, which are generated by the QAM mapping (for the payload carriers) and the BPSK mapping (for the pilot carriers), at its input points as the spectrum of a multicarrier signal consisting of the algebraic summation of sub-signals or subcarriers with different frequencies in the time domain, so the IFFT converts this spectrum from the frequency domain to the time domain to generate this multicarrier signal (the information OFDM signal) in the time domain.
  • Presenting the subcarrier vectors to the IFFT's input points with the conjugate symmetric arrangement produces an OFDM information multicarrier signal in the time domain with a real part only (Q(t) = 0), which is the proposal that has come out from this project. It is easier to modulate and demodulate a signal in the time domain with a real part only than modulating and demodulating a signal in the time domain with real and imaginary part.
  • The payload carriers are QAM modulated, whereas the pilot carriers are BPSK modulated. However, the payload carriers can be BPSK modulated but this reduces the spectral efficiency provided by the QAM modulation, as the BPSK modulation allows each payload carrier in the OFDM symbol to carry one data bit only (one bit per vector or subcarrier). However, digital modulation schemes with less spectral efficiency can survive better with channels having very low SNR.
  • The FFT in the OFDM demodulator converts the information multicarrier OFDM signal for each OFDM symbol from the time domain to produce its spectrum in the frequency domain. This spectrum is originally the subcarrier vectors which were QAM mapped from the data bits for the payload subcarriers and BPSK mapped for the pilot subcarriers in the OFDM modulator.
  • Even though this project successfully implements the OFDM modulator and demodulator on two separate DSK boards, the practical OFDM systems especially the receivers are more complex in terms of use of accurate phase looked loops (PLLs) to look not only at the phase of the received signal but its frequency also to avoid the error resulting from the frequency offset of the transmitter and receiver's local oscillators.
  • In this implementation, the receiver does not use a local oscillator for the carrier recovery (to recover the OFDM information signal from the carrier signal); instead the squared cosine method is used. This assures that the receiver is not affected by any frequency offset in the sampling frequency (Fs) of either the transmitter DSP board or the receiver DSP board or the both of which.
  • The OFDM symbol is able to carry much more data bits than the QAM symbol. It is a proposal for future studies to study the use of the OFDM modulation in the satellite digital communications instead of the QPSK used in the DVB-S. If the method of the symmetric conjugate used in this implementation is used for the satellite digital communications and the FM modulation is used to modulate and demodulate the OFDM information signal instead of the cosine carrier of the AM modulation. (There is no sine carrier and the quadrature modulation is no longer needed, as the OFDM information signal consists of a real part only). This may produce a signal with more immunity to the noise, as the FM signal's detection is not affected by the distortion of signal's envelope due to noise which gives FM modulation the superiority over the AM and the quadrature modulation schemes in this side. This means that each multicarrier OFDM symbol carries hundreds of data bits and the OFDM information signal in the time domain (figure (4-9)) is FM modulated to be transferred from the transmitter to the receiver which in terms uses the FM demodulation to recover the OFDM information signal in the time domain from the carrier signal. This may yield a satellite digital communication system with very higher throughputs and very higher robustness towards noise.
  • Although, the quadrature modulation is no longer needed to modulate the information OFDM signal in the time domain with a real part only, the OFDM communication system makes use of the benefits of the quadrature modulation in terms of the spectral efficiency provided by the quadrature modulation as long as the data bits are mapped to the payload carrier vectors through the QAM constellation.
  • The OFDM modulator and demodulator involve the serial to parallel and the parallel to serial conversions. In the OFDM modulator the mapping of the data bits to QAM vectors is a serial to parallel operation and simultaneously performing of the IFFT to the subcarrier vectors of each OFDM symbol is also another serial to parallel conversion, whereas transmitting the samples of the modulated OFDM signal required to be done serially. This operation is reversed in the OFDM demodulator.
  • The appended CP at the beginning of each OFDM symbol provides a great benefits not only to mitigate the effects of the multipath channel but also it can be used by the receiver to recover the correct OFDM symbol-timing with an efficient way in terms of use less number of the digital signal processor's cycles than those needed if the pilot subcarriers are used for this purpose.
  • If we compare the theoretical spectrum of the multicarrier OFDM signal like that in figure (2-5) with the practical one like that on the oscilloscope's screen of figure (4-10), we can notice they are different, because in practical spectrum analyzers show only the heads (peaks) of the overlapped sincs where at each sinc's peak point the other sincs have magnitudes equal to zero.
  • Unfortunately, slicing the OFDM signal in the time domain to overcome the delays and distortion of the digital filters is on the account of the data bit rate. However, practical systems may use analogue filters to avoid slicing the OFDM information signal.
  • The multicarrier OFDM information signal generated either by the traditional way or by the Conjugate Symmetric approach has a bandwidth equal to the multiplication of the number of the used subcarriers and the carrier spacing.
  • The study and understand the DSP OFDM system allows the student to support their knowledge and experience in the digital communications and the theoretical and practical digital signal processing as this subject involves many aspects of the digital communications and the digital signal processing.
  • Due to the huge and continuous development in the digital signal processing technology and the great advantages of the OFDM digital modulation technique in terms of channel fading immunity and high throughputs, the OFDM will be the most prevalent digital communication technique.

5.2 Further Work

As it was discussed in point (7) of the conclusions, there is further work to study the employment of the OFDM as a digital communication technique in the satellite communications. The producing of the payload and pilot carrier vectors of each OFDM symbol with conjugate symmetric arrangement to the IFFT input points assures that the output discrete values, which are the samples of the multicarrier OFDM information symbol, have only real parts or components (Q = 0) in the time domain as in figure (4-9). It is possible to use the FM modulation to transmit the OFDM information signal and use the FM demodulation to recover it. The study can be started as a MATLAB simulation to determine the properties and characteristics of this method to determine wither it may precede the currently used standards such as DVB-S and DVB-S2.

5.3 The Physical Outcomes

The DSP-OFDM Modulator project has produced the following physical outcomes.

  • The MATLAB codes which are discussed in chapters three and four.
  • The C codes for the OFDM modulator and demodulator for the CCS simulation and the practical DSP implementation on two separate DSK boards. (The Simulation, OFDM-TX and OFDM-RX projects).
  • The DSP-OFDM Modulator dissertation thesis.

References

  1. Qiang Ni ‘Advanced Digital Communications (EE5511)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, Section 4 Wireless Channels and Channel Models (2).
  2. W. Fischer ‘Digital Video and Audio Broadcasting Technology a Practical Engineering Guide', Second Edition, Springer-Verlag Berlin Heidelberg, 2008, pp. 316-320.
  3. R. V. Nee and R. Prasad ‘OFDM for Wireless Multimedia Communications', Artech House, London, 2000, pp. 39-40.
  4. H. Benoit ‘Digital Television MPEG-1, MPEG-2 and Principles of the DVB System', second edition, Focal Press, London, 2002, p. 101.
  5. R. Nilavalan ‘Satellite and Optical Communications (EE5554)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, Part 4a Signals and Multiple Access.
  6. H. S. Al-Raweshidy ‘Advanced Mobile Systems (EE5512)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, OFDM section.
  7. H. Benoit ‘Digital Television MPEG-1, MPEG-2 and Principles of the DVB System', second edition, Focal Press, London, 2002, pp. 99-109
  8. W. Fischer ‘Digital Video and Audio Broadcasting Technology a Practical Engineering Guide', Second Edition, Springer-Verlag Berlin Heidelberg, 2008, pp. 333-345.
  9. K. K. Loo ‘DSP For Communications (EE5555)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, Analogue Interfacing section.
  10. R. G. Lyons ‘Understanding Digital Signal Processing', second edition, Prentice Hall PTR, Upper Saddle River, New Jersey 07458, Publisher: Bernard Goodwin, 2004, pp. 45-60.
  11. H. Benoit ‘Digital Television MPEG-1, MPEG-2 and Principles of the DVB System', second edition, Focal Press, London, 2002, p. 92.
  12. T. B. Welch, C. H. G. Wright and M. G. Morrow, ‘REAL-TIME DIGITAL SIGNAL PROCESSING from MATLAB to C with the TMS320C6X DSK', first edition, CRC Press, USA, 2006, pp. 206-222.
  13. K. K. Loo ‘DSP For Communications (EE5555)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, Wireless Signal Processing section.
  14. M. A. Ingram “OFDM Simulation Using MATLAB”, Georgia Institute of Technology, August, 2000.
  15. R. Chassaing and D. Reay ‘Digital Signal Processing and Applications with TMS320C6713 and TMS320C6416 DSK', second edition, published by Wiley & Sons, Inc., Hoboken, New Jersey, USA, 2008, pp 1-45.
  16. T. L. Floyd ‘Digital Fundamentals', tenth edition, Pearson Education, Inc., Upper Saddle River, New Jersey 07458, USA, 2009, pp 691-693.
  17. R. G. Lyons, ‘Understanding Digital Signal Processing', second edition, Prentice Hall PTR, Upper Saddle River, New Jersey 07458, Publisher: Bernard Goodwin, 2004, pp 125-150.
  18. T. B. Welch, C. H. G. Wright and M. G. Morrow, ‘REAL-TIME DIGITAL SIGNAL PROCESSING from MATLAB to C with the TMS320C6X DSK', first edition, CRC Press, USA, 2006, pp. 117-130.
  19. R. G. Lyons, ‘Understanding Digital Signal Processing', second edition, Prentice Hall PTR, Upper Saddle River, New Jersey 07458, Publisher: Bernard Goodwin, 2004, pp 211-240.
  20. K. K. Loo ‘DSP for Communications (EE5555)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, FIR section.
  21. The help of MATLAB program.
  22. T. L. Floyd ‘Digital Fundamentals', tenth edition, Pearson Education, Inc., Upper Saddle River, New Jersey 07458, 2009, p. 702.
  23. R. Chassaing and D. Reay ‘Digital Signal Processing and Applications with TMS320C6713 and TMS320C6416 DSK', second edition, published by Wiley & Sons, Inc., Hoboken, New Jersey, USA, 2008, pp 124-126.
  24. T. L. Floyd ‘Digital Fundamentals', tenth edition, Pearson Education, Inc., Upper Saddle River, New Jersey 07458, USA, 2009, pp 708-710.
  25. K. K. Loo ‘DSP for Communications (EE5555)', for MSc Wireless Communication Systems Course (2008 - 2009), Electronic and Computer Engineering, School of Engineering and Design, Brunel University, UK, Real-Time Digital Signal Processing and Systems Laboratory.