Desain OFDM
Transcript of Desain OFDM
DESIGN OF AN OFDM TRANSMITTER AND RECEIVER USING FPGA
LOO KAH CHENG
A project report submitted in partial fulfillment of the
requirements for the award of the degree of
Master of Engineering (Electrical - Electronics and Telecommunications)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
NOVEMBER 2004
ABSTRACT
Orthogonal Frequency Division Multiplexing (OFDM) is a multi carrier
modulation technique. OFDM provides high bandwidth efficiency because the carriers
are orthogonal to each others and multiple carriers share the data among themselves.
The main advantage of this transmission technique is their robustness to channel fading
in wireless communication environment. The main objective of this project is to design
and implement a base band OFDM transmitter and receiver using FPGA. This project
focuses on the core processing block of an OFDM system, which are the Fast Fourier
Transform (FFT) block and the Inverse Fast Fourier Transform (IFFT). The 8 points
IFFT / FFT decimation-in-frequency (DIF) with radix-2 algorithm is analyzed in detail
to produce a solution that is suitable for FPGA implementation. The FPGA
implementation of the project is performed using Very High Speed Integrated Circuit
(VHSIC) Hardware Descriptive Language (VHDL). This performance of the coding is
analyzed from the result of timing simulation using Altera Max Plus II.
ABSTRAK
Orthogonal Frequency Division Multiplexing (OFDM) atau Pemultipleksan
Pembahagian Frekuensi Orthogonal adalah sejenis pemodulation pelbagai pembawa.
OFDM menyediakan kecekapan lebar jalur yang lebih tinggi kerana pemodulatan
pelbagai pembawa mempunyai ciri-ciri dimana setiap pembawa aalah ortoganal sesama
sendiri dan data di kongsi bersama setiap pembawa. Kebaikan utama jenis pemodulatan
pelbagai pembawa ini adalah ia tidak terjejas kepada channel fading dalam komunikasi
tanpa wayar. Tujuan utama projek ini adalah merekebentuk dan melaksanakan satu
penghantar (transmitter) and penerima (receiver) OFDM. menggunakan FPGA. Projek
ini tertumpu kepada struktur pemprosesan utama dalam satu OFDM system, iaitu, blok
Jelmaan Fourier Pantas atau Fast Fourier Transform (FFT) dan block Songsangan
Jelmaan Fourier Pantas atau Inverse Fast Fourier Transform (IFFT). 8 sampel blok
Jelmaan Fourier Pantas dan Blok Songsangan Jelmaan Fourier Pantas (IFFT)
menggunakan pembahagian dalam frekuensi (DIF) dengan pembahagian 2 atau radix-2
dikaji dengan teliti untuk menghasilkan satu kaedah yang sesuai untuk pelaksanaan
rekebentuk menggunakan FPGA. Komputer program ditulis menggunakan Very-High-
Speed-Integrated-Circuit (VHSIC) Hardware Descriptive Language (VHDL). Kod ini
diuji dan dianalisis dengan menggunakan keputusan daripada simulasi masa yang
dilaksanakan dengan menggunakan Altera Max Plus II.
IFFT PROCESSOR
3.6
3.7
3.8
3.9
CHAPTER 1
INTRODUCTION
1.1 Digital Communication System Structure
A digital communication system involves the transmission
digital form from one point to another point as shown in Figure 1.1
of information in
Figure 1.1 Digital Communication Systems
2
Regardless of the form of communication method, the three basic elements in a
communication system consist of transmitter, channel and receiver.
The source of information is the messages that are to be transmitted to the other
end in the receiver. A transmitter can consist of source encoder, channel encoder and
modulation. Source encoder employed an efficient representation of the information
such that resources can be conserved. A channel encoder may include error detection
and correction code. The aim is to increase the redundancy in the data to improve the
reliability of transmission. A modulation process convert the base band signal into band
pass signal before transmission.
During transmission, the signal experiences impairment which attenuates the
signals amplitude and distort signals phase. Also, the signals transmitting through a
channel also impaired by noise, which is assumed to be Gaussian distributed component.
In the receiver end, the reversed order of the steps in the transmitter is
performed. Ideally, the same information must be decoded in the receiving end.
1.2 Project Background
Figure 1.2 and 1.3 show a detailed OFDM transmitter and receiver
communications system. In this project, the main focus is in the FFT and IFFT part of
the OFDM system.
Figure 1.2 OFDM Transmitter
3
The input symbols are input into the transmitter in series at R symbols/second.
These symbols pass through a serial to parallel converter and output data on M lines in
parallel. The data rate on every M line is R/M symbols/second.
A symbol in this parallel stream of data is denoted as Xi,k. The index i refer to
which sub channel the symbol belongs to, and i ranges from 1 to M. The k denotes the
k-th collection of M symbols. The sub symbol collection from X1,k to XM,k makes up an
OFDM symbol.
The M symbols are sent to an Inverse Fast Fourier Transform (IFFT) block that
performs N-point IFFT operation. The IFFT transform a spectrum (amplitude and phase
of each component) into a time domain signal. An IFFT converts a number of complex
data points, of length that is power of 2, into the same number of points in time domain.
Each data point in frequency spectrum used for an FFT or IFFT operation is called a bin.
The output is N time-domain samples.
In order to preserve the sub-carrier orthogonality and the independence of
subsequent OFDM symbols, a cyclic guard interval is introduced. Time and frequency
synchronization can be established by means of cyclic extension in the prefix and the
postfix period.
In this case, assumed a cyclic prefix of length Lp samples is pre-pended to the N
samples to form a cyclically extended OFDM symbol. The cyclic prefix is simply the
last Lp samples of the N inverse Fast Fourier Transform output samples.
For example, assumed N=4 and Lp=2. If the outputs of a 4 point inverse Fourier
transform is [1 2 3 4]. The cyclic prefix will be [3 4]. The cyclically extended symbol
would be [3 4 1 2 3 4]. Therefore, the length of the transmitted OFDM symbol is N+
Lp.
4
Pre-pending the cyclic prefix aids in removing the effects of the channel at the
receiver. ISI can occur when multi path channel cause delayed version of previous
OFDM symbol to corrupt the current received symbol. If the value of Lp is greater than
or equal to the size of the transmission channel, the ISI will only affect the cyclic prefix.
The actual OFDM symbol will arrive unchanged.
The cyclic prefix makes the OFDM symbol appear periodic over the band of
interest. The cyclically extended symbols are passed through a parallel-to-serial
converter. They are transmitted in series across the channel response of the OFDM
symbol with the frequency response of the channel.
Figure 1.3 OFDM Receiver
The received symbol is in time domain and it is distorted due to the effect of the
channel. The received signal goes through a serial to parallel converter and cyclic prefix
removal.
After the cyclic prefix removal, the signals are passed through an N-point fast
Fourier transform to convert the signal to frequency domain. The output of the FFT is
formed from the first M samples of the output.
5
1.3 Project Objective
The project aim is to design an OFDM transmitter and receiver using FPGA.
The OFDM signal is generated by implementing the Inverse Fast Fourier Transform
(IFFT) function at the transmitter. At the receiver end, the Fast Fourier Transform
(FFT) is implemented.
The objective of this project is to use High-Speed-Integrated-Circuit (VHSIC)
Hardware Description Language (VHDL) to produce VHDL code that carry out FFT
and IFFT function.
The synthesis tool utilized is Altera Max Plus II to map the design to targeted
device. Validation of the result and timing simulation are also using Altera Max Plus II.
The main challenge in this project is to derive the algorithm that is to be used in
this project, for example, the algorithm for Fast Fourier Transform (FFT) and Inverse
Fast Fourier Transform (IFFT). There are many algorithms available that can
implement FFT / IFFT.
Second, the author finds it is very challenging on how software algorithm may
be mapped to hardware logic. After the simulation result is verified, the process of
converting the software statement into VHDL code is a major task. A variable may
correspond to a wire or a register depending on its application and sometimes an
operator can be mapped to hardware like adder, latches, multiplexers etc.
6
1.4 Project Scope
The scope of the project is focuses on the design and implementation of OFDM
base band transmitter and receiver. This project focuses on the core processing block of
the transmitter and receiver, which is the IFFT and FFT block. This design computes 8-
points IFFT and implements 8 inputs of real binary bits. The design will discuss on
optimization of computational time by using the direct mathematical derivation method.
The implementation of the IFFT and FFT block is using VHDL code. The
computation is done in separate sub modules for each output. Each sub module
computes a single output path. The combination of eight sub modules produces the
complete design of 8 points IFFT and FFT.
1.5 Project Outline
The project is organized into five chapters, namely introduction, literature
review, implementation of an OFDM transmitter and receiver based on 8- points inverse
Fast Fourier Transform and Fast Fourier Transform, result of VHDL simulation and
Conclusion.
Chapter 1 discusses the general idea of the project which cover the overview,
project objective, project background and scope of the project.
Chapter 2 shows the literature review of the OFDM system. The history and
principle of the OFDM system, Fast Fourier Transform introduction and VHDL
programming basic introduction is elaborate in this chapter.
7
Chapter 3 derives the Fast Fourier Transform and Inverse Fourier Transform
algorithm using direct mathematical method. The equations are optimized for digital
implementation.
Chapter 4 shows the VHDL simulation output. The results are presented in their
sub-modules and then all the modules are combined to give the final output. Then, the
VHDL output are compared with Matlab simulation output.
Chapter 5 consists of conclusion, problems encountered in completing this
project and suggestion to further improve this project.
CHAPTER 2
LITERATURE REVIEW
2.1 Orthogonal Frequency Division Multiplexing
OFDM system has inherent advantage over single carrier system in frequency-
selective fading channel. It has been adopted by various standards in recent years
including DSL and 802.11a wireless LAN standards. The principle of operation of
OFDM system is described in the chapter. The advantages of OFDM transmission are
discussed. Programmable logic devices (PLDs) playing a major role in implementing
OFDM system because making it easier for engineers to integrate complex intellectual
property (IP) blocks and utilize the benefits of high performance PLD architecture.
2.2 History of OFDM
OFDM can be viewed as a collection of transmission techniques. When this
technique is applied in wireless environment, it is referred as OFDM. In the wired
environment, such as asymmetric digital subscriber lines (ADSL), it is referred as
discrete multi tone (DMT). In OFDM, each carrier is orthogonal to all other carriers.
However, this condition is not always maintained in DMT [1]. OFDM is an optimal
version of multi carrier transmission schemes.
9
OFDM started in the mid 60’s, Chang [2] proposed a method to synthesis band
limited signals for multi channel transmission. The idea is to transmit signals
simultaneously through a linear band limited channel without inter channel (ICI) an inter
symbol interference (ISI).
After that, Saltzberg [3] performed an analysis based on Chang’s work and he
conclude that the focus to design a multi channel transmission must concentrate on
reducing crosstalk between adjacent channels rather than on perfecting the individual
signals.
In 1971, Weinstein and Ebert [4] made an important contribution to OFDM.
Discrete Fourier transform (DFT) method was proposed to perform the base band
modulation and demodulation. DFT is an efficient signal processing algorithm. It
eliminates the banks of sub carrier oscillators. They used guard space between symbols
to combat ICI and ISI problem. This system did not obtain perfect orthogonality
between sub carriers over a dispersive channel.
It was Peled and Ruiz [5] in 1980 who introduced cyclic prefix (CP) that solves
the orthogonality issue. They filled the guard space with a cyclic extension of the
OFDM symbol. It is assume the CP is longer than impulse response of the channel.
10
2.3 Basic Mathematical Principle of OFDM System
Figure 2.1 OFDM Structure
In the analog version of OFDM system, the base band transmits an OFDM signal
through i-th sub carrier in t=ts is
N1
i2
N
2
d iN exp[ j 2 t t } t t t Ts (t ) { s s sT (Equation 1)2
i
s (t ) 0 otherwise
where,
di = Symbol-mapped symbol of the i-th sub-channel at time interval [ ts
N = Number of sub channel
T = OFDM symbol duration
t ts T ]
When the k-th sub carrier is demodulated by down converting the signal with a
frequency k/T and then integrating the signal over T seconds, the result can be written as
11
N2
1t s T
t s
k
T
i dexp( j 2 N exp[ j 2 t(t t )[ t ]dts si TN
2
2i
N
2 t s T
t s
exp( j 2 k(t
Ti (Equation 2) Nd t )dts
iN
22i
d N Ti
2
A complex carrier is integrated over T seconds. When i is equal to k, the
integration give the desired output d N T . For all other sub carriers, the integration isi
2
zero.
The discrete version of OFDM system model using IDFT (IFFT) and DFT (FFT)
is shown below.
The IDFT output sequence of an OFDM symbol
N 11
N i j 2ni / N ) (Equation 3)x X exp(ni 0
The IDFT sequence of infinite OFDM symbol is
x n ,l n
1
N
N 1
i 0
j 2ni / N ) (Equation 4)X i ,l exp(
where,
Xi = data mapped
12
The DFT output sequence of a received OFDM symbol is
N 1
nx ' exp( j 2ni / N )Yk
i 0
[1
N
[1N
N 1
N 1
iX exp( j 2ni / N ] exp( j 2nk / N ) (Equation 5)n 0 i 0
N 1
i 0
N 1
n 0
X ] exp( j 2n ( i k ) / N )i
if i=k,
N 1 N 11 j 2 n (0 ) / N )Y [ X i ] exp(Nk
(Equation 6)n 0 i 0
1N X k X kN
if i is not equal to k, Y 0k
2.4 Basic OFDM Implementation
Figure 2.2 OFDM Transmission System
13
Figure 2.2 shows the block diagram of a OFDM transmission system. This is a
digital implementation of OFDM sub carrier modulator / demodulators based on discrete
Fourier transform (DFT). The number of sub carrier can be changed. This model is
suggested by [6].
The serial data stream is mapped to symbols with a symbol rate of 1/Ts using
modulation scheme like M-PSK, QAM. The resulting symbol stream is de-multiplexed
into N data symbols So to SN-1 (in this example). The parallel data symbol rate is 1/NTs.
This means the parallel symbol duration is N times longer than the serial symbol
duration Ts. The inverse FFT (IFFT) of the data symbol is computed and the output s0 to
sN-1 constitute an OFDM symbol. This symbol period is transmitted serially over the
channel with symbol rate of 1/Ts.
At the receiver, the received time domain symbols are decomposed by
employing FFT operation, the recovered data symbols are restored in serial order.
Assume the OFDM spectrum is finite, the corresponding time domain signal has
an infinite duration. Recall, the DFT operation assume the signal is periodic for infinite
duration. However, in practice, it is sufficient to repeat the time domain signal
periodically for the duration of channel delay spread [6]. Hence, for transmission over
dispersive channels, each time domain OFDM symbol is extended by cyclic extension
or guard interval of Ng samples duration in order to overcome ISI due to channel delay
spread. The disadvantage of cyclic extension is it’s reducing the OFDM transmission
rate by N/(N+Ng) assuming the transmission rate is N.
14
2.5 OFDM Advantages and Disadvantages
The major advantage of OFDM is its robustness against multi path propagation.
Thus, it is suitable to be implemented in wireless environments. The introduction of
cyclic prefix made OFDM system resistance to time dispersion. OFDM symbol rate is
low since a data stream is divided into several parallel streams before transmission.
This make the fading is slow enough for the channel to be considered as constant during
one OFDM symbol interval.
Cyclic prefix is a crucial feature of OFDM used to combat the inter-symbol-
interference (ISI) and inter-channel-interference (ICI) introduced by the multi-path
channel through which the signal is propagated. The basic idea is to replicate part of the
OFDM time-domain waveform from the back to the front to create a guard period. The
duration of the guard period Tg should be longer than the worst-case delay spread of the
target multi-path environment. The use of a cyclic prefix instead of a plain guard
interval, simplifies the channel equalization in the demodulator.
In wire system, OFDM system can offer an efficient bit loading technique. It
enables a system to allocate different number of bits to different sub channels based on
their individual SNR. Hence, an efficient transmission can be achieved.
One of the major disadvantages of OFDM is its requirement for high peak-to-
average-power ratio. This put high demand on linearity in amplifiers.
Second, the synchronization error can destroy the orthogonality and cause
interference. Phase noise error and Doppler shift can cause degradation to OFDM
system. A lot of effort is required to design accurate frequency synchronizers for
OFDM.
15
2.6 OFDM Applications
Initially, OFDM applications are scarce because of their implementation
complexity. Now, OFDM has been adopted as the new European digital audio
broadcasting (DAB) standard and for terrestrial digital video broadcasting (DVB) [6].
In fixed-wire applications, OFDM is employed in asynchronous digital
subscriber line (ADSL) and high bit-rate digital subscriber line (HDSL) systems. It has
been proposed for power line communications systems as well due to its resilience to
dispersive channel and narrow band interference.
Here is a brief discussion on 4 applications that has incorporated OFDM
technique [7]:
Digital Audio Broadcasting (DAB)
DAB is the first standard to use OFDM. DAB network is efficient in handling
multipath delay spread. As a result, improved CD quality sound, new data services and
higher spectrum efficiency can be achieved.
Terrestrial Digital Video Broadcasting (DVB)
DVB was created by a pan-broadcasting-industry group in 1993. DVB defined a
set of specifications for delivery of digital television over cable, DSL, and satellite. In
1997, Digital Terrestrial Television Broadcasting (DTTB) was standardized. It utilizes
OFDM system in the 2000 and 8000 sub carrier modes.
16
Magic WAND
Magic WAND (Wireless ATM Network Demonstrator) is a wireless OFDM-
based ATM network. This system operates in 5 GHz band is gaining acceptance for
OFDM in high-rate wireless communications. It also acts as basis for HiperLAN2.
IEEE802.11a/HiperLAN2 and MMAC Wireless LAN
All the above system operates in 5GHz band. 802.11a is selected by IEEE to be
used in US targeting a range of data rates up to 54 Mbps.
ETSI BRAN in Europe is working on 3 extensions for OFDM in HiperLAN
standard: (i) HiperLAN2, a wireless indoor LAN with a QoS provision; (ii) HiperLink, a
wireless indoor backbone; and (iii) HiperAccess, an outdoor fixed wireless network
providing access to a wired infrastructure.
MMAC is developed by Japan. It is a standard similar to IEEE and ETSI BRAN.
2.7 VHSIC Hardware Description Language
VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit)
Hardware Description Language. It is intended for documenting and modeling digital
systems ranging from a small chip to a large system. It can be used to model a digital
system at any level of abstraction ranging from the architectural level down to the gate
level.
17
VHDL language can be regarded as an integration of the following languages
[10],
Sequential Language
Concurrent Language
Net list Language
Timing Specifications
Waveform Generation
It allows user to model the system as an interconnection of components. Test
waveforms can be generated using the same constructs. All the above constructs may be
combined to provide a comprehensive description of the system in a single model.
The models written in VHDL can be verified using a VHDL simulator [11]. It
inherits extensive range of modeling capabilities that are difficult to understand.
Fortunately, it is possible to quickly assimilate a core subset of the language that is easy
and simple to understand without learning the complex features. This subset is
sufficient to model most applications. The complete language has sufficient power to
capture the description of the most complex chips to a complete electronics system.
2.7.1 Synthesis Process in VHDL
VHDL is a hardware description language that allows designers to model a
circuit at different level of abstraction, ranging from the gate level, RTL level,
behavioral level to the algorithmic level.
Synthesis process is to construct a gate-level net list from a model of a circuit
described in VHDL. The synthesis process is described in diagram below.
18
Figure 2.3 Synthesis Process in VHDL Environment
A synthesis program may alternately generate a RTL net list, which is consists of
register-transfer level blocks such as flip-flops, arithmetic-logic-units, an multiplexers
interconnected by wires. All these are performed by RTL module builder. This builder
is to build or acquire from a library predefined components, each of the required RTL
blocks in the user-specified target technology.
The above synthesis process produced an unoptimized gate level net list. A logic
optimizer can used the produced net list and the constraint specified to produce an
optimized gate level net list. This net list can be programmed directly into a FPGA chip.
2.8 Field Programmable Gate Arrays (FPGA)
By modern standards, a logic circuit with 20000 gates is common. In order to
implement large circuit, it is convenient to use a type of chip that has a large logic
capacity. A field-programmable gate arrays (FPGA) is a programmable logic device that
19
support implementation of relatively large logic circuits. FPGA is different from other
logic technologies like CPLD and SPLD because FPGA do not contain AND or OR
planes. Instead, FPGA consists of logic blocks for implementing required functions.
A FPGA contain 3 main types of resources: logic blocks, I/O blocks for
connecting to the pins of the package, and interconnection wires and switches. The logic
blocks are arranged in a two-dimensional array, and the interconnection wires are
organized as horizontal and vertical routing channels between rows and columns of
logic blocks. The routing channels contain wires and programmable switches that allows
the logic blocks to be interconnected in many ways. FPGA can be used to implement
logic circuits of more than a few hundred thousands equivalent gates in size. Equivalent
gates is a way to quantify a circuit’s size by assume the circuit is to be built using only
simple logic gates and then estimate how many of these gates are needed.
Each logic block in a FPGA typically has a small number of inputs and one
output. The FPGA products on the market feature different types of logic blocks. The
most commonly used logic block is a lookup table (LUT), which contains storage cells
that are used to implement a small logic function. Each cell is capable of holding a
single logic value, either 0 or 1. The stored value is produced as the output of the storage
cell. LUT of various sizes may be created, where the size is defined by the number of
inputs.
For a logic circuit to be realized in a FPGA, each logic function in the circuit
must be small enough to fit within a single logic block. In practice, a user’s circuit is
automatically translated into the required form by using CAD tools. When a circuit is
implemented in an FPGA, the logic blocks are programmed to realize the necessary
functions and the routing channels are programmed to make the required
interconnections between logic blocks.
20
FPGA is configured by using the in-system programming (ISP) method, the
FPGA can be programmed while the chip is still attached to its circuit board. The
storage cells in the LUTs in an FPGA are volatile, which means that they lose their
stored contents whenever the power supply for the chip is turned off. Hence the FPGA
has to be programmed every time power is applied. Of this, a small memory chip that
holds its data permanently, called a programmable read-only memory (PROM) is
included on the circuit board that houses the FPGA. The storage cells in the FPGA are
loaded automatically from the PROM when power is applied to the chips.
2.9 Fast Fourier Transform (FFT) / Inverse Fast Fourier Transform
The FFT/IFFT operates on finite sequences. Waveforms which are analog in
nature must be sampled at discrete points before the FFT/IFFT algorithm can be applied.
The Discrete Fourier Transform (DFT) operates on sample time domain signal
which is periodic. The equation for DFT is:
N 1
X (k ) x(n)e j 2k / N (Equation 7)n 0
X(k) represent the DFT frequency output at the k-the spectral point where k
ranges from 0 to N-1. The quantity N represents the number of sample points in the
DFT data frame. The quantity x(n) represents the n-th time sample, where n also ranges
from 0 to N-1. In general equation, x(n) can be real or complex.
The corresponding inverse discrete Fourier transform (IDFT) of the sequence
X(k) gives a sequence x(n) defined only on the interval from 0 to N-1 as follows:
21
N 1
x(n)1 X (k )e j 2k / N (Equation 8)N k 0
The DFT equation can be re-written into:
N 1
X (k ) x(n)W nk (Equation 9)Nn 0
The quantity W nk is defined as:N
j 2nk / NnkWN e
This quantity is called twiddle factor. It is the sine and cosine basis functions
written in polar form [13].
Examination of the first equation reveals that the computation of each point of
DFT requires the following computation. (N-1) complex multiplication, (N-1) complex
addition (first term in sum involves ej0=1). Thus, to compute N points in DFT require
N(N-1) complex multiplication and N(N-1) complex addition.
As the N increases, the number of multiplications and additions required is
significant because the multiplication function requires a relatively large amount of
processing time even using computer. Thus, many methods for reducing the number of
multiplications have been investigated over the last 50 years [12]. The next section
discussed in detail one of the method made popular by Cooley and Tukey.
The twiddle factor is the sine and cosine basis functions. By taking the
advantage of the symmetry and periodicity of the twiddle factors as shown:
22
N2r
W W rN N
W r N W rN N
The twiddle factor for N= 8 is calculated as shown in Table 2.1
Table 2.1 Symmetry properties of W m8
8
2.10 Decimation-in-frequency (DIF) FFT algorithm
In the decimation-in-frequency algorithm, the output
regrouped or subdivided. Consider the DFT equation
or frequency points are
N 1
X (k ) x(n)W nk (Equation 9)Nn 0
The DFT equation 9 can be divided into first half and last half in the following
manner.
m W m
0 +1
1 +0.7071 – j0.7071
2 -j
3 -0.7071 +j 0.7071
4 -1
5 -0.7071 + j0.7071
6 +j
7 0.7071-j0.7071
23
N1
N 1
x(n)W kn2
X (k ) x(n)W kn (Equation 10)N NN
2n 0
n
N N1 1 N
)2
2 2 N
2
k (n)WNX (k ) x(n)WN x(n
n 0
kn
n 0
N
2
N
21 1
N)X (k ) x(n)W kn W Nk / 2 x(n knWN (Equation 11)N N 2n 0 n 0
N1
2
(N
)]W nkX (k ) [x n 1) k x n (Equation 12)( ) ( N2n 0
Now, consider k as even and odd separately. Let k=2r (even) and k=(2r+1)
(odd).
N1
2
(N
)]W 2nr (Equation 13)X (2r) [x n( ) x n N2n 0
N
21
N)]W (2 r 1)nX (2r 1) [x(n) x(n
n 0
(Equation 14)N2
Given
W 2nr W nrN N / 2
W (2r 1)n W nr W nN N / 2 N
Equation 13 and Equation 14 can be simplified into:
N1
N2
X (2r) [x(n)n 0
nrN / 2x(n )]W
2
N1
2 NX (2r 1) [x(n) x(n )]WN / 2WN
nr n
2n 0
The above 2 equations are recognized as (N/2)-point DFT. The (N/2)-point DFT
can be subdivided until only two points are left in each DFT. The resulting flow graph
24
for this method for 8-point data is shown in Figure 2.4. Since the outputs were
subdivided to obtain this algorithm, it is referred to as decimation-in-frequency (DIF)
FFT algorithm.
x(0) X(0)
x(1) X(4)0WN
-1
x(2) X(2)0WN-1
x(4) X(6)0-1 WN
2 -1WN
x(5) X(1)0-1 WN
X(5)x6)1 0-1 WN WN
-1
X(3)x(7) -1 2 0WN WN-1
x(8) X(7)3 -1 2 0-1 WN WN
-1 WN
Figure 2.4 8-point DIF FFT flow chart
It is clear from Figure 2.4 that computation is carried out in three stages for N=8
and each stage requires 4 multiplication and hence a total of 12 complex multiplications
are required. In general, for N point sequence there is log2 N stages and each stage
requires N/2 complex multiplication hence a total of N/2 log2 N complex multiplications
are required. Number of additions required is N log2 N. Comparison on the computation
basis between the direct method and decimation-in-frequency is given in Table 2.1.
25
Table 2.2 Computation of DFT in direct method and decimation-in-frequency algorithm
As can be seen from Table 2.2, it is obvious that DIF FFT algorithm achieves
considerable reduction in the computation of DFT.
Direct Method Decimation-in-frequency FFTN Complex
multiplicationsN(N-1)
ComplexadditionsN(N-1)
ComplexmultiplicationsN/2 log2 N
ComplexadditionsN log2 N
4 12 12 4 88 56 56 12 24
16 240 240 32 6432 992 992 80 160
CHAPTER 3
IMPLEMENTATION OF AN OFDM TRANSMITTER AND RECEIVER BASED
ON 8-POINTS INVERSE FAST FOURIER TRANSFORM (IFFT) AND FAST
FOURIER TRANSFORM (FFT)
3.1 Introduction
This section discusses the approach and method that is chosen to design the core
processing block in an OFDM transmitter. The computational time between DFT and
FFT is faster using FFT method because the number of multiplications and additions
operation in FFT is less compared to DFT method as shown in Table 2.2. The FFT and
IFFT operation are almost identical except for scaling and conjugation of the twiddle
factor. Thus, it is assumed the computational time between FFT and IFFT is same.
There are two methods to implement the OFDM transmitter, namely structural method
and direct computation method. Both methods will be discussed in the following
section.
3.2 Algorithm of an 8-point Inverse Fast Fourier Transform (IFFT)
The core processing block in an OFDM transmitter is the Inverse Fast Fourier
Transform. The IFFT can be implemented using 2 methods, structural method or direct
mathematical method.
27
3.2.1 Structural Method of an 8-point IFFT
Structural method implements a single butterfly computation.
Figure 3.1 Single Butterfly Flow Chart in IFFT
In the digital implementation of an IFFT operation, the single butterfly
computation is implemented in the data path unit. A control unit controlling the data
path and determine the stage of operations. The control unit coordinates the appropriate
pairs of inputs into the butterfly computation and the output pairs is store in the memory.
Each pair of random input bits will undergo multiples of butterfly computation in stage
1. Assume the input string bits are x0, x1, x2, x3, x4, x5, x6, and x7 respectively, Stage
1 computation will store its result in certain memory location, assume memory A.
At stage 2, the result in memory A is feed into butterfly computation in paris.
The control unit acts as a selector to select the correct input for the butterfly
computation in every stage. The output from Stage 2 is stored in the same memory
location
For 8-point IFFT, the process ends at Stage 3. The output of the Stage 2 is
divided by 8 and the final output is the computed Inverse Fast Fourier Transform.
28
Stage 2 Stage3Stage 1
÷8x(0) X(0)
÷8
WN
÷8
x(1) X(4)0-1
x(2) X(2)0WN-1
÷80
x(4) X(6)-1 WN
-2 -1WN
÷8x(5) X(1)-1 0WN
÷8 X(5)x6)-1 0-1 WN WN
÷8
-1
x(7) X(3)-1 -2 0WN WN-1
÷8x(8) X(7)
-3 -1 -2 0WN WN-1 WN
-1
Memory location AMemory location A
Figure 3.2 Structural Implementation of IFFT
3.2.2 Direct Method of an 8-point IFFT
In the direct method, the final output is derived from the input directly. In a
structural method, the single butterfly and summation has to be carried out 12 times for
an 8-point IFFT. The multiplication and summation has to be carried out, although the
twiddle factor has value of 0 or 1. This introduces redundancy in the implementation.
29
For example, the implementation of structural approach is X=(0)a+(1)b, where
in the direct mathematical approach, the implementation is simply X=b. Multiplication
of the twiddle factor is skipped to avoid redundancy in and reduce computation time.
Thus, this method is optimized.
In the Figure 3.2, it is shown that there are 3 stages in an 8-point IFFT. Stage 1
accepts the input data directly. The Figure 3.3 shows the computation in Stage 1.
Figure 3.3 Stage 1 Computation Flow Chart of an 8-point IFFT Computation
It is shown the even samples and odd samples are processed separately. The
outputs of Stage 1 are feed as the inputs of the Stage 2. Stage 2 computation take place
and this process repeats at the final stage, Stage 3.
30
The output of Stage 1 is connected to the input of Stage 2. The complexity of
the output equations increases as the Stage number increases because twiddle factor
computations are involved. The twiddle factor includes multiplication and additions
operations.
The Figure 3.4 shows the Stage 2 computation. The even inputs are grouped
together and summed up in pairs. The other inputs are multiplied with their respective
twiddle factor. Each of these inputs will undergo butterfly operation. Some of the
outputs will have to multiply again with the twiddle factor. The outputs of the Stage 2
are fed into Stage 3. At Stage 3,
computations complexity is increased.
the butterfly computations are repeated. The
Figure 3.4 Stage 2 Computation Flow Chart of an 8-point IFFT Computation
31
Figure 3.5 Stage 3 Computation Flow Chart of an 8-point IFFT Computation
The final output equations derived from Figure 3.5 is shown as below (before
divide 8):
32
The final equations that are implemented using VHDL to produce an 8-point
IFFT processor is shown Table 3.1. The equations have been optimized for an efficient
implementation. The twiddle factors are represented b 8 bit binary number. There will
be slight error percentage in this design due to the approximation of the twiddle factor
values.
Table 3.1 Final equations for an 8-point IFFT processor
X(0)=x(0)+ x(4)+ x(2)+ x(6)+ x(1)+ x(5)+ x(3)+ x(7)
X(4)=x(0)+ x(4)+ x(2)+ x(6)- x(1)- x(5)- x(3)- x(7)
X(2)=x(0)+ x(4)- x(2)- x(6)+ jx(1)+ jx(5)- jx(3)- jx(7)
X(6)=x(0)+ x(4)- x(2)- x(6)- jx(1)- jx(5)+ jx(3)+ jx(7)
X(1)=x(0)- x(4)+ jx(2)- jx(6)+ 0.7071x(1)+ j0.7071x(1)- 0.7071x(5)- j0.7071x(5)- 0.7071x(3)- j0.7071x(3)+ 0.7071x(7)+ j0.7071x(7)
X(5)=x(0)- x(4)+ jx(2)- jx(6)- 0.7071x(1)- j0.7071x(1)+ 0.7071x(5)+ j0.7071x(5)+ 0.7071x(3)+ j0.7071x(3)- 0.7071x(7)- j0.7071x(7)
X(3)=x(0)- x(4)- jx(2)- jx(6)- 0.7071x(1)+ j0.7071x(1)+ 0.7071x(5)- j0.7071x(5)+ 0.7071x(3)- j0.7071x(3)- 0.7071x(7)+ j0.7071x(7)
X(7)=x(0)- x(4)- jx(2)- jx(6)+ 0.7071x(1)- j0.7071x(1)- 0.7071x(5)+ j0.7071x(5)- 0.7071x(3)+ j0.7071x(3)+ 0.7071x(7)- j0.7071x(7)
33
3.3 Implementation of an 8-point IFFT processor
The implementation of an 8 point IFFT processor involved few modules. All
this modules are combined together to produce an 8 point IFFT processor.
shows an 8 point IFFT block diagram and their interconnections.
Figure 3.5
Figure 3.6 Block diagram of an 8 point IFFT processor
This figure shows the complete functional block diagram where the inputs are
passed into the design synchronously at every positive egde triggered. Then, the path
module shows the arithmetic computation for each respective output.
In the IFFT algorithm (generally), the even and odd outputs are computed
separately in two main groups. The odd output blocks computation is more complex
compared to the even group computation. The odd output computations are represented
34
by Path 1, Path 3, Path 5 and Path 7. The even output computations are Path 0, Path 2,
Path 4 and Path 6.
In the even outputs, the twiddle factor at the output equations has been
simplified. The detailed block diagram of each sub-module is shown in the Appendix B.
In the sub-modules, few digital circuitries are implemented. The most important
components are adder, subtractor and unsigned divider. Multiplexers are used to
approximate the decimal values to the nearest integer. They are also used to convert the
summation to unsigned numbers which are connected to the divider. If the signed bit is
‘1’, then the quotient value will be converted into unsigned number. Conversion of
signed and unsigned numbers is not required for positive summation values.
The input range is from -15 to 15 to avoid overflow from occurring in Xout(0).
The maximum summation (before division) value which can be supported ranges from -
128 to +127. Any value which exceeds this range will contribute to overflow problem.
3.3.1 Pass module of 8 point IFFT processor
This module passes the inputs to the sub-modules that do the IFFT computations.
The Pass module consists of 8 D flip flop registers. The outputs of this block are 8 lines
of 8 bit output which are connected to Path 0, Path 1, Path 2, Path 3, Path 4, Path 5, Path
6 and Path 7.
The programming flowchart for this block is shown in Appendix B.
35
3.1.1 Path 0 and Path 4 module of 8 point IFFT processor
The function of Path 0 and Path 4 is to compute and display the result of these
computations. The outputs are Xout(0) and Xout(4) respectively. The arithmetic
operation for Xout(0) is summation. The Xout(4) arithmetic involves summation,
subtraction and division. The computation flowchart which implements equations
below is shown in Appendix B.
X(0)=x(0)+ x(4)+ x(2)+ x(6)+ x(1)+ x(5)+ x(3)+ x(7)
X(4)=x(0)+ x(4)+ x(2)+ x(6)- x(1)- x(5)- x(3)- x(7)
3.3.2 Path 2 and Path 6 module of 8 point IFFT processor
The function of Path 2 and Path 6 is to compute and display the result of these
computations. The outputs are Xout(2) and Xout(6) respectively. The arithmetic
operation for Xout(2) and Xout(6) involves real and imaginary operation. They are
performed separately. The arithmetic operation involves summation, subtraction and
division. The twiddle factor for this output is either j or –j which contributes to the
imaginary component for this path. The computation flowchart which implements
equations below is shown in Appendix B.
X(2)=x(0)+ x(4)- x(2)- x(6)+ jx(1)+ jx(5)- jx(3)- jx(7)
X(6)=x(0)+ x(4)- x(2)- x(6)- jx(1)- jx(5)+ jx(3)+ jx(7)
36
3.3.3 Path 1, Path 3, Path 5, Path 7 modules of an 8 point IFFT processor
The function of Path 1, Path 3, Path 5 and Path 7 is to compute and display the
result of these computations. The outputs are Xout(1), Xout(3), Xout(5) and Xout(7)
respectively. The arithmetic operations for all of these modules involve real and
imaginary operation. They are performed separately. The arithmetic operation involves
summation, subtraction and division. The computation flowchart which implements
equations below is shown in Appendix B.
The twiddle factor for all these modules consists of real an imaginary value of
sine 45 degree or cos 45 degree. The output of the twiddle factor is approximated to
0.7071. In this design, the value is approximated to 0.70703125 or in binary
0.110110101, including a most significant bit (MSB) to indicate the twiddle factor is a
positive number. Any decimal value after summation is approximate to integer ‘1’
when it is greater than 0.5.
The output equations implemented are as below:
37
X(1)=x(0)- x(4)+ jx(2)- jx(6)+ 0.7071x(1)+ j0.7071x(1)- 0.7071x(5)- j0.7071x(5)- 0.7071x(3)- j0.7071x(3)+ 0.7071x(7)+ j0.7071x(7)
X(5)=x(0)- x(4)+ jx(2)- jx(6)- 0.7071x(1)- j0.7071x(1)+ 0.7071x(5)+ j0.7071x(5)+ 0.7071x(3)+ j0.7071x(3)- 0.7071x(7)- j0.7071x(7)
X(3)=x(0)- x(4)- jx(2)- jx(6)- 0.7071x(1)+ j0.7071x(1)+ 0.7071x(5)- j0.7071x(5)+ 0.7071x(3)- j0.7071x(3)- 0.7071x(7)+ j0.7071x(7)
X(7)=x(0)- x(4)- jx(2)- jx(6)+ 0.7071x(1)- j0.7071x(1)- 0.7071x(5)+ j0.7071x(5)- 0.7071x(3)+ j0.7071x(3)+ 0.7071x(7)- j0.7071x(7)
38
3.4 Algorithm of an 8-point Fast Fourier Transform (FFT)
In this sub-section, the direct method algorithm of an 8 point FFT is developed.
The FFT equation is shown below.
N 1
X (k ) x(n)W nkN
n 0
With careful examination, the equation for FFT is similar to IFFT equation
except for the negative sign in the twiddle factor and the scaling factor. Thus, the
algorithm developed for the IFFT in the previous section can be used for FFT algorithm
development with minor modification.
3.4.1 Direct method of an 8 point FFT
In the Figure 3.6, it is shown that there are 3 stages in an 8-point FFT. Stage 1
accepts the input data directly. The Figure 3.7 shows the computation in Stage 1.
39
x(0) X(0)
x(1) X(4)0WN
-1
x(2) X(2)0WN-1
x(4) X(6)0-1 WN
2 -1WN
x(5) X(1)-1 0WN
X(5)x6)-1 1 0WN WN
-1
x(7) X(3)2 0-1 WN WN-1
x(8) X(7)3 -1 2 -1 0-1 WN WN WN
Figure 3.7 8-point FFT flow chart
The twiddle factor for N= 8 is calculated as shown in Table 3.2
mTable 3.2 Symmetry properties of W8
8m W m
0 +1
1 +0.7071 + j0.7071
2 +j
3 -0.7071 -j 0.7071
4 +1
5 -0.7071 - j0.7071
6 -j
7 +0.7071 + j0.7071
40
Figure 3.8 Stage 1 Computation Flow Chart of an 8-point FFT Computation
It is shown the even samples and odd samples are processed separately. The
outputs of Stage 1 are feed as the inputs of the Stage 2. Stage 2 computation take place
and this process repeats at the final stage, Stage 3.
The output of Stage 1 is connected to the input of Stage 2. The complexity of
the output equations increases as the Stage number increases because twiddle factor
computations are involved. The twiddle factor includes multiplication and additions
operations.
The Figure 3.4 shows the Stage 2 computation. The even inputs are grouped
together and summed up in pairs. The other inputs are multiplied with their respective
41
twiddle factor. Each of these inputs will undergo butterfly operation. Some of the
output will have to multiply again with the twiddle factor. The outputs of the Stage 2
are fed into Stage 3. At Stage 3, the
computations complexity are increased.
butterfly computations are repeated. The
Figure 3.9 Stage 2 Computation Flow Chart of an 8-point FFT Computation
42
Figure 3.10 Stage 3 computation flow chart of an 8-point IFFT Computation
The final output equations derived from Figure 3.10 is shown as below):
43
The final equations that are implemented using VHDL to produce an 8-point
IFFT processor are shown Table 3.1. The equations have been optimized for an
efficient implementation. The twiddle factors are represented b 8 bit binary number.
There will be slight error percentage in this design due to the approximation
twiddle factor values.
of the
Table 3.3 Final equations for an 8-point IFFT processor
X(0)=x(0)+ x(4)+ x(2)+ x(6)+ x(1)+ x(5)+ x(3)+ x(7)
X(4)=x(0)+ x(4)+ x(2)+ x(6)- x(1)- x(5)- x(3)- x(7)
X(2)=x(0)+ x(4)- x(2)- x(6)+ jx(1)+ jx(5)- jx(3)- jx(7)
X(6)=x(0)+ x(4)- x(2)- x(6)- jx(1)- jx(5)+ jx(3)+ jx(7)
X(1)=x(0)- x(4)+ jx(2)- jx(6)+ 0.7071x(1)+ j0.7071x(1)- 0.7071x(5)- j0.7071x(5)- 0.7071x(3)- j0.7071x(3)+ 0.7071x(7)+ j0.7071x(7)
X(5)=x(0)- x(4)+ jx(2)- jx(6)- 0.7071x(1)- j0.7071x(1)+ 0.7071x(5)+ j0.7071x(5)+ 0.7071x(3)+ j0.7071x(3)- 0.7071x(7)- j0.7071x(7)
X(3)=x(0)- x(4)- jx(2)- jx(6)- 0.7071x(1)+ j0.7071x(1)+ 0.7071x(5)- j0.7071x(5)+ 0.7071x(3)- j0.7071x(3)- 0.7071x(7)+ j0.7071x(7)
X(7)=x(0)- x(4)- jx(2)- jx(6)+ 0.7071x(1)- j0.7071x(1)- 0.7071x(5)+ j0.7071x(5)- 0.7071x(3)+ j0.7071x(3)+ 0.7071x(7)- j0.7071x(7)
CHAPTER 4
RESULT OF VHDL SIMULATION
4.1 Introduction
This chapter discusses the results obtained from the Altera Max Plus II
simulation with random input samples. Each of the input samples contains 8-bits of
input. The accuracy of the output is compared to the output from Matlab simulation.
The result is divided into 2 different sections, for FFT processor and IFFT
processor. The output from each of the modules is shown and followed b the overall
output.
4.2 FFT Processor Result
In this sub section, the output of each of the modules of FFT processor is
presented.
45
4.2.1 Pass Module Simulation Result for FFT Processor
This modules it to pass the input data at each positive clock edge to the different
modules of FFT processor with the condition the load signal is active high. One clock
signal is required to pass the data in.
The result is shown in Figure 4.1.
46
Figure 4.1 Pass Module Simulation Output for FFT Processor
47
4.2.2 Path 0 and Path 4 Module Simulation Result for FFT Processor
These modules implement almost the identical mathematical operation except
the mathematical operators are different. The equations are shown in Chapter 3. There
is no imaginary component present at the output.
The result is shown in Figure 4.2 and Figure 4.3.
48
Figure 4.2 Path 0 Module Simulation Output for FFT Processor
49
Figure 4.3 Path 4 Module Simulation Output for FFT Processor
50
4.2.3 Path 2 and Path 6 Module Simulation Result for FFT Processor
These modules implement almost the identical mathematical operation except
the mathematical operators are different. The equations are shown in Chapter 3. There
is imaginary component present at the output. Thus, Path 2 and Path 6 have more
complex mathematical expressions.
The result is shown in Figure 4.4 and Figure 4.5
51
Figure 4.4 Path 2 Module Simulation Output for FFT Processor
52
Figure 4.5 Path 6 Module Simulation Output for FFT Processor
53
4.2.4 Path 1, Path 3, Path 5 and Path 7 Module Simulation Result for FFTProcessor
These blocks are the most complicated among all the modules in the FFT
processors because it involves a number of mathematical operators, like, addition,
subtraction, and multiplication. The outputs contain real and imaginary components.
The imaginary components is resulted from the twiddle factor which involves sin 45
degree and cos 45 degree. This value is approximated to 0.70703125 which is
equivalent to 0.10110101 in binary form.
The result is shown in Figure 4.6, Figure 4.7, Figure 4.8 and Figure 4.9.
54
Figure 4.6 Path 1 Module Simulation Output for FFT Processor
55
Figure 4.7 Path 3 Module Simulation Output for FFT Processor
56
Figure 4.8 Path 5 Module Simulation Output for FFT Processor
57
Figure 4.9 Path 7 Module Simulation Output for FFT Processor
58
4.2.5 8-points FFT Simulation Result
This sub section shows the overall simulation result obtained by combining all
the modules that has been presented earlier. The result is shown in Figure 4.10.
59
Figure 4.10 FFT Processor Output
60
4.3 IFFT Processor Result
The IFFT processor has more complex mathematical operations because it has a
scaling factor (1/N). In the digital domain, this translates a division operation.
The simulation result will be presented in a similar fashion as the previous
section.
4.3.1 Pass Module Simulation Result for IFFT Processor
This module performs the same function as the Pass module in the FFT
processor. This modules it to pass the input data at each positive clock edge to the
different modules of FFT processor with the condition the load signal is active high.
One clock signal is required to pass the data in.
The result is shown in Figure 4.11.
61
Figure 4.11 Pass Module Simulation Output for IFFT Processor
62
4.3.2 Path 0 and Path 4 Module Simulation Result for IFFT Processor
These modules implement almost the identical mathematical operation except
the mathematical operators are different. The equations are shown in Chapter 3. There
is no imaginary component present at the output.
The result is shown in Figure 4.12 and Figure 4.13.
63
Figure 4.12 Path 0 Module Simulation Output for IFFT Processor
64
Figure 4.13 Path 4 Module Simulation Output for IFFT Processor
65
4.3.3 Path 2 and Path 6 Module Simulation Result for IFFT Processor
These modules implement almost the identical mathematical operation except
the mathematical operators are different. The equations are shown in Chapter 3. There
is imaginary component present at the output. Thus, Path 2 and Path 6 have more
complex mathematical expressions.
The result is shown in Figure 4.14 and Figure 4.15
66
Figure 4.14 Path 2 Module Simulation Output for IFFT Processor
67
Figure 4.15 Path 6 Module Simulation Output for FFT Processor
68
4.3.4 Path 1, Path 3, Path 5 and Path 7 Module Simulation Result for IFFTProcessor
These blocks are the most complicated among all the modules in the IFFT
processors because it involves a number of mathematical operators, like, addition,
subtraction, and multiplication. The outputs contain real and imaginary components.
The imaginary component is resulted from the twiddle factor which involves sin 45
degree and cos 45 degree. This value is approximated to 0.70703125 which is
equivalent to 0.10110101 in binary form.
The result is shown in Figure 4.16, Figure 4.17, Figure 4.18 and Figure 4.19.
69
Figure 4.16 Path 1 Module Simulation Output for IFFT Processor
70
Figure 4.17 Path 3 Module Simulation Output for IFFT Processor
71
Figure 4.18 Path 5 Module Simulation Output for IFFT Processor
72
Figure 4.19 Path 7 Module Simulation Output for FFT Processor
73
4.3.5 8-points FFT Simulation Result
This sub section shows the overall simulation result obtained by combining all
the modules that has been presented earlier. The result is shown in Figure 4.20.
74
Figure 4.20 FFT Processor Output
75
4.4 Verification of VHDL Simulation Output
The result presented in this chapter has to be verified. The VHDL output and the
Matlab simulation output using same random input number are compared to gauge the
accuracy of the result.
As shown in Table 4.1 and Table 4.2, the accuracy of the VHDL simulation
output has been rounded to the nearest integer. It is cause by the only 8 bit is used to
represent the output value.
76
Table
4.1M
atlabF
FT
Simulation
Output
X(0) X(1) X(2) X(3) X(4) X(5) X(6) X(7)
120 0 0 0 0 0 0 0
60 -9.71+j19.78 -3+j15 -8.29-j4.22 -2 -8.29+j4.22 -3-j15 -9.71-j19.78
58 6.95+j12.19 -7+j17 -2.95+j6.19 12 -2.95-j6.19 -7-j17 6.95-j12.19
66 -1.66+j4.586 -2-j2 9.66-j7.41 -6 9.66+j7.41 -2+j2 -1.66-j4.586
47 17.07-j7.58 1+j4 2.93+j10.4 7 2.93-j10.4 1-j4 17.07+j7.58
61 -5+j6.24 7-j8 -5+j2.24 -31 -5-j2.24 7+j8 -5-j6.24
51 3.29-j10.95 2-j1 4.71+j1.05 17 4.71-j1.05 2+j1 3.29+j10.95
59 5.29+j8.36 6+j3 6.71+j4.36 -23 6.71-j4.36 6-j3 5.29-j8.36
58 3.07+j5.9 -2+j16 -11+j13.9 18 -11-j13.9 -2-j16 3.07-j5.9
60 -17.54-j13.02 21-j3 -10.46-j11.02 2 -10.46+j11.02 21+j3 -17.54+j13.02
56 -5.05+j11.061 3+j3 -14.95+j9.61 18 -14.95-j9.61 3-j3 -5.05-j11.061
74 -7.24+j1.59 8-j12 1.24-j4.42 18 1.24+j4.42 8+j12 -7.24-j1.59
38 -0.54-j4.71 1-j3 6.54+j3.3 -4 6.54-j3.3 1+j3 -0.54+j4.71
58 -6.07-j15 -2+j4 8.07+j15 -2 8.07-j15 -2-j4 -6.07+j15
61 13.66-j5.83 -13-j8 2.34+j0.17 13 2.34-j0.17 -13+j8 13.66+j5.83
53 17.78-j5.19 6+j11 2.22-j13.2 -17 2.22+j13.2 6-j11 17.78+j5.19
77
Table
4.2M
atlabIFF
TSim
ulationO
utput
X(0) X(1) X(2) X(3) X(4) X(5) X(6) X(7)
15 0 0 0 0 0 0 0
7.5 -1.21-j2.47 -0.38-j1.88 -1.04+j0.53 -0.25 -1.04-j0.53 -0.38+j1.88 -1.21+j2.47
7.25 0.87-j1.52 -0.88-j2.13 -0.37-j0.77 1.5 -0.37+j0.77 -0.88+j2.13 0.87+j1.52
8.25 -0.21-j0.57 -0.25+j0.25 1.21+j0.93 -0.75 1.21-j0.93 -0.25-j0.25 -0.21+j0.57
5.88 2.13+j0.95 0.13-j0.5 0.37-j1.3 0.87 0.37+j1.3 0.13+j0.5 2.13-j0.95
7.63 -0.63-j0.78 0.88+j1 -0.63-j0.28 -3.88 -0.63+j0.28 0.88-j1 -0.63+j0.78
6.38 0.41+j1.37 0.25+j0.13 0.59-j0.13 2.13 0.59+j0.13 0.25-j0.13 0.41-j1.37
7.38 0.66-j1.05 0.75-j0.38 0.84-j0.55 -2.88 0.84+j0.55 0.75+j0.38 0.66+j1.05
7.25 0.38-j0.74 -0.25-j2 -1.38-j1.74 2.25 -1.38+j1.74 -0.25+j2 0.38+j0.74
7.5 -2.19+j1.63 2.63+j0.38 -1.31+j1.38 0.25 -1.31-j1.38 2.63-j0.38 -2.19-j1.63
7 -0.63-j1.45 0.38-j0.36 -1.87-j1.2 2.25 -1.87+j1.2 0.38+j0.36 -0.63+j1.45
9.25 -0.91-j0.2 1+j1.5 0.16+j0.55 2.25 0.16-j0.55 1-j1.5 -0.91+j0.2
4.75 -0.07+j0.59 0.13+j0.38 0.82-j0.41 -0.5 0.82+j0.41 0.13-j0.38 -0.07-j0.59
7.25 -0.76+j1.88 -0.25-j0.5 1.01-j1.87 -0.25 1.01+j1.87 -0.25+j0.5 -0.76-j1.88
7.63 1.71+j0.73 -1.63+j1 0.29-j0.02 1.63 0.29+j0.02 -1.63-j1 1.71-j0.73
6.63 2.22+j0.65 0.75-j1.38 0.28+j1.65 -2.13 0.28-j1.65 0.75+j1.38 2.22-j0.65
CHAPTER 5
CONCLUSION
5.1 Conclusion
This chapter discusses the overall contribution of the thesis. The objective of
this project is the implementing the core processing blocks of an Orthogonal Frequency
Division Multiplexing (OFDM) system, namely the Fast Fourier Transform (FFT) and
Inverse Fast Fourier Transform (IFFT).
The Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (FFT)
have been chosen to implement the design instead of the Discrete Fourier Transform and
Inverse Discrete Fourier Transform because they offer better speed with less
computational time. These methods requires the odd and even samples inputs are
process separately before they are combine to give the final output. The result of the
computation is in integer bits which might comprises of real and imaginary components.
The decimal value of the output if greater than 0.5 is approximated to 1 and vice versa.
The design implementation is done using VHDL coding. Direct mathematical
method is adopted because it is an efficient and optimized method instead of the
structural implementation which is based on butterfly operation. Altera Max Plus II is
use to generate the design netlist file (which has .edf format) and translate the design
into the target FPGA device. Then, the timing simulation is performed from Max Plus
79
II. The output of the timing simulation from the timing simulation matches the data
calculated from Matlab.
In conclusion, the main objective of this project has been successfully
accomplished and the result obtained from this project is valid.
5.2 Challenges and Issues
The main problem encountered in this design is the overflow issue. This is due
to the limited of bits allocated for the output bits. Overflow occurred when the output
bits are not sufficient to represent the correct value. In order to overcome this problem,
a dedicated circuitry can be design to detect overflow. When an overflow occurs, this
circuitry will output a signal to indicate the input are not valid.
Another issued is the signed bit problem that is encountered in the VHDL
coding. The unsigned dividers are implemented in this design resulted incorrect result
when dividing negative number. To overcome the issue, before division is performed,
the number is checked and converted to a positive number (if it is a negative number)
before division operation is performed.
The Altera Max Plus II is not able to compile a larger design with higher
computational points where the mathematical operation become complex.
80
5.3 Suggestion for Improvement
The design in this project can be upgraded to give better performance. To
increase the result accuracy, the number of bits in the output variables can be increased.
This will definitely give an accurate and precise samples representation compared to
current design.
This design can be modified to accept complex number. Additional digital
circuitry implementation can be performed such that this design can accept complex
number as inputs.
The design can be optimize for timing constraint and delay in signal. This can
be done by optimize the components used in the design and the place and route of the
logic cells. The interconnection between the logic cells which are situated far apart from
each other can contribute to a larger critical path, thus giving delay.
81
REFERENCE
1. Dusan Matiae, “OFDM as a possible modulation technique for multimedia
applications in the range of mm waves,” TUD-TVS, 30-10-1998.
R. W. Chang, “Synthesis of Bandlimited Orthogonal Signals for Multichannel Data
Transmission,” Bell System Tech. J., pp. 1775-1796, Dec, 1966.
B. R. Saltzberg, “Performance of an Efficient Parallel Data Transmission Sytem,”
IEEE Trans. Comm. , pp 805-811, Dec, 1967.
S. B. Weinstein and P.M. Ebert, “Data transmission by frequency division
multiplexing using the discrete fourier transform,” IEEE Transactions on
Communication Technology”, vol. COM-19, pp. 628-634, October 1971.
A. Peled and A. Ruiz, “Frequency Domain Data Transmission using Reduced
Computational Complexity Alogrithms,” In Proc. IEEE Int. Conf. Acoust., Speech,
Signal Processing, pp 964-967, Denver, CO, 1980.
L. Hanzo, M. Munster, B.J. Choi and T. Keller, “OFDM and MC-CDMA for
Broadband Multi-User Communications, WLANs and Broadcasting,” IEEE Press,
Wiley.
White paper, “Orthogonal Frequency Division Multiplexing (OFDM) Explained”,
Magis Networks, Inc. 2001
Eric Lawrey, "The suitability of OFDM as a modulation technique for wireless
telecommunications, with a CDMA comparison", 1997, BSEE thesis.
Erich Cosby, “Orthogonal Frequency Division Multiplexing (OFDM): Tutorial and
Analysis”, 11-12-2001, Virginia Tech. Northern Virginia Center.
2.
3.
4.
5.
6.
7.
8.
9.
10. J. Bhasker, “A VHDL Synthesis Primer”, 2nd Edition, Star Galaxy Publishing, 1998.
11. Yu-Chin Hsu, Kevin F. Tsai, Jessie T. Liu & Eric S. Lin, “VHDL Modeling for
Digital Design Synthesis.” Kluwer Academic Publishing, 1995.
82
12. Jeffrey H. Reed, “Software Radio A Modern Approach to Radio Engineering”,
Prentice Hall, 2002
13. Mark Zwolinski, “Digital System Design with VHDL”, Prentice Hall, 2000
APPENDIX A
FFT VHDL IMPLEMENTATION FLOW CHART
84
Flow chart for Pass module in FFT processor
START
Positive edgetriggered
Yes
END
Pass input value as output
No
Initialize input from Block Pass
85
Flow chart for Path 0 and Path 4 in FFT processor
86
Flow chart for Path 2 in FFT processor
87
Flow chart for Path 6 in FFT processor
START
END
outre6outre6
X2Im=x1- x3+ x5 -x7X2Re=x0- x2+ x4- x6
Odd InputEven Input
Initialize input from Block Pass
88
Flow chart for Path 1 in FFT processor
89
Flow chart for Path 3 in FFT processor
90
Flow chart for Path 5 in FFT processor
91
Flow chart for Path 7 in FFT processor
APPENDIX B
IFFT VHDL IMPLEMENTATION FLOW CHART
93
Flow chart for Pass module in FFT processor
START
Positive edgetriggered
Yes
END
Pass input value as output
No
Initialize input from Block Pass
94
Flow chart for Path 0 and Path 4 in IFFT processor
95
Flow chart for Path 2 in IFFT processor
START
Yes No Yes NoSign bit -ve Sign bit -ve
No NoYes Yes
Sign bit +veSign bit +ve
END
outre2outre2
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
Concatenate bit ‘0’Concatenate bit ‘0’
X2Im=x1- x3+ x5 -x7X2Re=x0- x2+ x4- x6
Odd InputEven Input
Initialize input from Block Pass
96
Flow chart for Path 6 in IFFT processor
START
Yes No Yes NoSign bit -ve Sign bit -ve
No NoYes Yes
Sign bit +veSign bit +ve
END
outre2outre2
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
Concatenate bit ‘0’Concatenate bit ‘0’
X6Im=-x1+ x3- x5+ x7X6Re=x0- x2+ x4- x6
Odd InputEven Input
Initialize input from Block Pass
97
Flow chart for Path 1 in IFFT processor
START
Yes No Yes NoSign bit -veSign bit -ve
No NoYes Yes
Sign bit +ve Sign bit +ve
END
outim1outre1
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
RealAdder
Imaginary
Re: X1Re= x0- x4Im: X1Re= x2- x6
X1dRe= x1- x3- x5+ x7X1dIm= x1-x3- x5+ x7
Multiply with 0.70703125
Odd InputEven Input
Initialize input from Block Pass
98
Flow chart for Path 3 in IFFT processor
START
Yes No Yes NoSign bit -veSign bit -ve
No NoYes Yes
Sign bit +ve Sign bit +ve
END
outim1outre1
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
RealAdder
Imaginary
Re: X3Re= x0- x4Im: X3Re= -x2- x6
X3dRe= -x1+ x3+ x5- x7X3dIm= x1- x3- x5+ x7
Multiply with 0.70703125
Odd InputEven Input
Initialize input from Block Pass
99
Flow chart for Path 5 in IFFT processor
START
Yes No Yes NoSign bit -veSign bit -ve
No NoYes Yes
Sign bit +ve Sign bit +ve
END
outim1outre1
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
RealAdder
Imaginary
Re: X5Re= x0- x4Im: X5Re= x2- x6
X5dRe= -x1+ x3+ x5- x7X5dIm= -x1+ x3+ x5- x7
Multiply with 0.70703125
Odd InputEven Input
Initialize input from Block Pass
100
Flow chart for Path 7 in IFFT processor
START
Yes No Yes NoSign bit -veSign bit -ve
No NoYes Yes
Sign bit +ve Sign bit +ve
END
outim7outre7
Invert to -veInvert to -ve
Unsigned Divider
Quo
Unsigned Divider
Quo
Invert to +veInvert to +ve
RealAdder
Imaginary
Re: X7Re= x0- x4Im: X7Re= -x2- x6
X7dRe= x1- x3- x5+ x7X7dIm= -x1+ x3+ x5- x7
Multiply with 0.70703125
Odd InputEven Input
Initialize input from Block Pass