OFDM System Implementation in DSP Platform TMS 320 C 6678

The Orthogonal Frequency Division Multiplexing (OFDM) system is already used in commercial applications and is capable to deal with Intersymbolic Interference (ISI) caused by multipath channels. This system gained popularity after the application of the Fast Fourier Transform (FFT) and its inverse (IFFT) to modulate the signal in many subcarriers. This paper discusses implementation aspects of an OFDM system; such system is characterized by considering real constraints, including the memory consumption and the processing time. The OFDM modulator, channel samples and OFDM demodulator were implemented entirely in the DSP TMS320C6678 platform. As a proof-of-concept, a 256-QAM OFDM BER performance is compared with theoretical values. Moreover, the memory size is not demanding, consuming very few resources. It was observed a very high number of DSP clock cycles needed for the OFDM signal modulation, corresponding to more than 4 times the number used in demodulating the signal.


Introduction
Signal processing is deployed in lots of equipment such as radars, cell phones, missiles, space buses, radars, and so on.Basic mathematical operations can be performed by using discrete digital components, e.g., a full adder circuit, while subtraction can be implemented using the same circuit with the subtrahend being represented by two's complement.Digital Signal Processing (DSP) platforms are integrated circuit boards designed aiming to optimize the implementability of the algorithms and mathematical operations including sums, multiplications and so on.The internal architecture of a floating DSP is more complex than a fixed point device [1].In some optimized libraries, the fixed point operations are preferred since this format reduces the DSP clock cycles necessary to perform some specific calculation, requiring the conversion between any existent float variables to fixed point variables inside the code.Currently, the powerful DSP hardware makes possible the construction and implementation of complex systems and signals, which require a great number of calculations and processing for real-time applications, where calculation and processing speed are critical.
Orthogonal Frequency Division Multiplexing (OFDM) is a transmission technique currently available in commercial applications, such as wireless networks (Wi-Fi 802.11) and cellular systems (LTE) [2].In early days of the OFDM, the analog implementations of such transmission technique have resulted in incredible complex due to the deployment of discrete sinusoidal oscillators and coherent demodulators.After sometime, such system gained popularity after the digital approach used the Discrete Fourier Transform (DFT) and the correspondent Inverse Discrete Fourier Transform (IDFT) to demodulate and modulate the OFDM signal in N subcarriers, respectively.These operations can be calculated in an efficient way with the Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) algorithms.
Among the three losses associated to the wireless radio channel, namely path loss, shadowing and fading terms, the OFDM system offers resistance to fading, when the number of subcarriers is large enough such that the flat fading condition is achieved.
The delay spread that occurs in channels with multipath can provoke some intersymbol interference (ISI).To completely eliminate this effect, OFDM uses the Cyclic Prefix (CP).The CP addition can be easily implemented digitally, because the CP addition is a simple vector concatenation.
In the literature, there are works discussing the implementation aspects of specific parameter of the OFDM system.Among them, [3] demonstrated an effectiveness of a PAPR reduction algorithm implemented in a C6713 DSP hardware.In [4], an optimization for FFT operations is implemented inside an iPROVE FPGA board and the results are compared with Carmel DSP and TMS320C62X.In [5], narrowband interference cancellation algorithms applied to multiband OFDM ultra-wideband systems are implemented in TMS320C6713 DSP and some implementation parameters are discussed.
This paper deals with the implementability of an OFDM transmission.For that, the DSP TMS320 platform receives data from a computer, data is processed and modulated using an OFDM modulator, the channel coefficients are generated and applied to the signal, the OFDM symbols are demodulated and sent back to the computer.The DSP TMS320C6678 platform deployed presents a high performance multicore processor The evaluation board available at UEL's laboratory is a TMDSEVM6678L, which has a RS232 UART for serial communication, 512 MB DDR3, Ethernet interface and some other features [7].This work will be structured as following: in Section 2, the theory of the OFDM system is presented.Block diagrams, mathematical relations and some OFDM design parameters are stated.In Section 3, some implementation details and tools utilized are shown.In Section 4, simulations are presented and results discussed.In Section 5, the conclusions of the work are highlighted.
Notation:  and

OFDM System
A block diagram representing an OFDM transmitter is depicted in Figure 1.Bits of information are mapped into constellation symbols (for example, BPSK, QPSK, or QAM), passed on a serial to parallel (S/P) converter, the IDFT is performed, the cyclic prefix (CP) is added and data is converted from parallel to serial (P/S), converted to analogical signal (D/A), converted to passband with carrier frequency C f and finally sent to the receiver via a wireless radio fading channel.
The OFDM receiver is depicted in Figure 2. The signal that reaches the receiver antenna is converted to baseband (coherent multiplication with a local oscillator with frequency C f and filtered), the signal is discretized via analogical-to-digital (A/D) converter, the cyclic prefix is removed and data is parallelized; after that, the DFT is calculated, the elements are converted to serial and finally demapped respectively with adopted constellation to obtain the demodulated bits.
OFDM systems use a great number of orthogonal subcarriers to transmit information; hence, the data rate on each subchannel is much less than the system data rate [8].
Mathematically, two signals are orthonormal if they satisfy the orthogonality condition: 1 for , 0 for .
where n T represents an OFDM symbol period.So, two subcarriers i ϕ and j ϕ are  orthogonal if the integral on the interval of one period of the multiplication of the signals is zero.In [8], it is proven that the subcarriers can be overlapped by a factor of 50% without lose of orthogonality.
The transmitted OFDM signal can be represented in time domain as: and N is the number of subcarriers.In the discrete form, the OFDM can be represented as: In Figure 3, a representation for the Equation ( 2) with N = 4 subcarriers is sketched in the frequency domain with x-axis representing the frequencies and y-axis the Power Spectrum Density (PSD).Substituting the index k with its respective range of values (k = 0, ..., 3), we can see the spectrum of 4 subcarriers with overlap.As depicted in this figure, the carrier frequency is not in the center of the spectrum occupied by the OFDM transmitted symbol, and each subcarrier is separated by a factor of Hence, the original signal s[n] can be recovered in the frequency domain using frequency equalization: as: where  and  represents the direct and inverse Fourier transform, respectively.
To obtain a satisfactory performance, the OFDM must achieve flat fading condition.
In other words, the channel coherence band ( ) c B ∆ needs to be considerably greater than the channel of each subcarrier SC BW as: ( ) where W represents the OFDM system bandwidth and N the number of subcarriers.
Note that the right side of Equation (6) considers a system without spectral superposition.So, the number of subcarriers is a parameter of the OFDM system and can be increased to achieve the flat fading condition.
Another channel parameter that exerts influence in the OFDM system design is the delay spread ( RMS τ ), which is related to the power delay profile (PDP).Considering a multipath channel, the signal is reflected on countless surfaces resulting in delayed versions of the original signal, causing ISI.The average power of received replica and the associated delay is represented in the PDP graphs.There are different models to represent the PDP, for example the uniform, or the decreasing exponential models, such as the IEEE 802.11, as discussed in [9].
To eliminate the ISI caused by multipath channel, the CP is added to the signal vector.Considering h[n] the discrete channel impulse response with length 1 µ + , and s[n] the discrete form of the information signal, the CP addition can be easily performed by concatenating the last µ samples of s[n] onto the beginning of the vector.
In Figure 4, a graphic representation of the CP addition operation is presented; the last µ samples are concatenated to the beginning of the vector to create the OFDM sym- bol [ ] s t  in the discrete form and ready to be transmitted.If the CP length µ ≥ , the ISI can be eliminated at the receiver side.platform utilities [10].The code was written in C language and the serial interface was utilized to communicate the DSP board TMDSEVM6678 with the personal computer (PC), as represented in Figure 5.The information bits from the PC are passed to the DSP platform, where the data are processed to form the OFDM symbols, while channel distortions are taken in account; the OFDM symbols are demodulated and sent back to the computer.Another aspect considered is that the noise values were generated inside the DSP platform via Box Muller transform, which is described in Section 3.1.The modulation used was an M-QAM using Gray codification and a conventional slicer for hard decision region.

DSP Implementation
There are some specific functions implemented in an optimized way for specific DSP platforms.For the TMDSEVM6678 platform, the TI C6000 DSPLIB library of signal processing provides some routines for signal processing.In this work, the FFT, IFFT and convolution operations were performed using the DSPLIB optimized functions.In the DSPLIB documentation [11] for the FFT and IFFT functions used in this work, the input vectors must be a short type and with the format Q.15, which means one bit representing the integer part and 15 representing the fractional part.The user should be careful about the overflow that can occur and its variation depending on the FFT order.
To verify the DSP clock cycles consumed in executing a piece of the code, the CCS provides the necessary tools to this verification.The user can obtain the clock information going to the clock menu and enabling it, or using the Profiler tool.Another method is calling the function itoll provided by the header c6x.h, which returns the DSP clock count value that can be stored inside a variable.

Random Number Generation
In [12], a method to generate random variables with Gaussian distribution with zero mean and unitary standard deviation is described.The method used is the Marsaglia polar approach of the Box Muller transformation [13].This method considers two random variables (r.v.) R A A = + , applying the transformation: in which the random variables of such transformations follow a normalized Gaussian distribution: ( ) Finally, to obtain different values of mean ( µ ) and variance ( 2 σ ) considering ( ) , a simple linear transformation is applied: Resulting in ( )

Results and Discussion
In this section, some experiments using the DSP platform are described and analyzed.

Validation
The OFDM system performance was measured verifying the bit error rate (BER) in two different channels: a) multipath fading channel; and b) pure additive white Gaussian noise (AWGN), just for noise power calibration purpose.Simulation parameters are summarized in Table 1.On the receiver side, the perfect channel information (CSI) has been considered and the channel fading effect was removed using frequency equalization, as indicated in Equation (5).
The BER performance simulated on the DSP platform and the theoretical curves of the 256-QAM are presented in Figure 6.As expected, for fading and AWGN channel, the OFDM 256-QAM performances converge to the 256-QAM at AWGN and Fading channels.The BER results obtained were consistent with the theory.

Image Data
The image data sent in this experiment was the Lenna, an image commonly used in image processing [14].The parameters used in this experiment are the same presented in Table 1

DSP Resources
The OFDM DSP-based system implementability was verified by measuring the DSP platform resource allocated to the entire code execution.To perform this task, the number of DSP clock cycles was counted.For modulation, it was taken in to account the 256-QAM modulation, IFFT calculation and CP addition.On the demodulation, it was considered the CP removal, FFT calculation, channel equalization and 256-QAM demodulation.The mean values measured are presented in table Table 2.The number of cycles of one OFDM symbol was different from the others due to QAM modulation and demodulation implementation.To demodulate the signal, the implemented code separates/classifies the constellation map into decision regions and  verified if the received symbol was inside or not a specific region to demodulate/demapping the symbol.On the modulation, it has two "for" loops to convert the information to components in phase and quadrature, and that part of the code was responsible for a great part of the total cycles consumed in the modulation process.
Even with more components needed to the signal demodulation, including mainly channel equalization, the number of cycles consumed in the OFDM demodulation process was smaller than the number necessary for the OFDM modulation.
To measure the code size, the file created by the compiler with extension .mapwas verified, as discussed in [15].The memory parameters are presented at Table 3.
Consulting [7], the memory address 0x0C000000 corresponds to the DDR3 memory with size of 256 Mbytes.In Table 3, the memory MSMCSRAM shows a lower size, 0x00200000, which was caused by some definitions in linker.cmdfile inside the CCS project.Converting the memory used to decimal value, it corresponds to 457,490 bytes.
The percentage consumed was very low comparing with the total 256 Mbytes available on the address 0x0C000000, not being a critical parameter for the system implementation.

Conclusions
The signal processing in the OFDM system had an important role in simplifying its implementation using the FFT and IFFT to modulate the signal in multicarrier-based systems instead of using analogical huge number of discrete oscillators.In this work, a The 256-QAM OFDM BER system performance was obtained via Monte-Carlo simulation and these values were corroborated with a theoretical curve of a conventional 256-QAM modulation single-carrier system.In attaining the flat fading condition, the M-QAM OFDM performance converged to the M-QAM modulation and the code implemented on the DSP behaved as expected.
By verifying the clock cycles, the number of DSP cycles consumed to modulate the OFDM signal was greater than the number used to demodulate the signal.The reason is that the M-QAM modulation function was responsible for a great part of the cycles used.In the future work, assembly language optimization aspects should be implemented, while the processing gain concerning DSP clock cycles should be evidenced.
By analyzing the memory requirement of the entire implemented baseband OFDM, the amount memory allocated had size of 457,490 bytes of the memory block that corresponded to the address 0x0C000000 and was not a critical issue for the deployed DSP platform.
With the increase of new technologies, for example, Internet of Things, with countless chips communicating with each other, there is great appeal and interest of investigation around the viability of the implementation of sophisticated but efficient wireless transmission-modulation schemes on chip with scarce resources availability.This paper provides a multi-functional analysis of the implementability of an OFDM baseband system on a robust DSP platform, which can be extended for another DSP, FPGA or microprocessors platforms.
where x[k] represents the k-th modulation symbol, OFDM T the OFDM symbol period, c f the carrier frequency, OFDM k T represents the k -th subcarrier frequency sepa- rated by a factor of OFDM 1 T
Figure 4. Cyclic Prefix (CP) addition on the OFDM symbol.

Figure 5 .
Figure 5. Block diagram representing the communication between the computer and the DSP platform.

First, the 256
-QAM OFDM algorithm is validated comparing the bit error rate (BER) values obtained via Monte Carlo simulation with the theoretical curves of a 256-QAM modulation.At the flat fading condition, the 256 QAM OFDM BER performance should be close as possible to the conventional 256-QAM BER performance.After this Tx-Rx OFDM code validation, an experiment sending an image data to the DSP platform was performed aiming to corroborate the effectiveness of the proposed OFDM DSP-based system implementation.The image data generated at PC was sent to the DSP platform, it was modulated and converted to OFDM symbols and sent to the receiver through a simulated wireless radio fading channel in discrete-time domain.Besides, the additive thermal noise effects were included at the receiver input; after that, the OFDM symbols were demodulated and sent back to the PC, where the original data were compared with the recovered data aiming to determine the average BER.As a figure-of-merit of implementability, the DSP resources allocated to the Tx-Rx OFDM execution were determined in therms of memory occupation and DSP clock cycles.
Figure 6.DSP BER performance of a 256-QAM OFDM system.
unless the channel condition; it was considered only the flat fading channel condition.To recover the Lenna image at receiver side, it was considered two different values of 0 B E N : 0 and 18 dB; the quality of recovered images is shown in Figure 7(a) and Figure 7(b), respectively.The BER measured after the channel effects were 0.2424 and 0.0203, respectively.Due to the Monte-Carlo simulations, the obtained BER values were consistent with the ones observed in Figure 6 for the corresponding 0 B E N .Observing the figure on the left side, the image with high BER is more blurred than the image on the right side, with lower BER.

Figure 7 .
Figure 7. Same image recovered in the DSP platform after the fading channel emulation effect considering two different values of noise powers; respective BER is highlighted.(a) Relation 0 0 dB

Table 2 .
Mean values of DSP cycles count for 256 QAM OFDM with FFT size N = 256.

Table 3 .
DSP Memory addresses and memory occupation obtained consulting the .mapfile.QAM DSP-based baseband OFDM was implemented and analyzed in terms of BER performance, qualitative recovered image performance, DSP clock cycles and DSP memory requirement.