Development of a Java Based Simulator for OFDM System
Md. Sharif Hossen
Dept. of Information and Communication Engineering University of Rajshahi
Rajshahi-6205, Bangladesh [email protected]
Sabbir Ahmed
Dept. of Information and Communication Engineering University of Rajshahi
Rajshahi-6205, Bangladesh [email protected] Abstract—Wireless communications these days are more data-
centric than ever before. And with the advent of diverse range of applications such as broadcast or multicast video, HDTV, high speed internet access, interactive gaming etc., the demand for higher data rate in wireless communication is increasing day-by- day. Orthogonal Frequency Division Multiplexing (OFDM) is considered by many as one of the most promising technologies that can cater to this demand of high-data rate wireless communication. The objective of this project is to develop a simulator for OFDM system which may be used as an assistive teaching tool at undergraduate level. Since aimed at undergraduate level, the scope of the simulator is restricted to the basic functional blocks only. Based on a full Graphical User Interface (GUI), the developed simulator may help students to visualize and understand the functionalities of the fundamental blocks of an OFDM system. As the development tool, Sun Java has been chosen considering its various advantages, e.g., 100%
object oriented architecture, platform independency and so forth.
Hence, the developed system is pluggable, extendable and runnable on different platforms with no or little modification.
Index Terms—OFDM, Java, Simulator, GUI.
I. INTRODUCTION
These days, high-speed wireless data transmission is essential to guaranty the quality of service for most of the wireless applications that are on the market. But in wireless environment signals are generally affected by fading and multipath delay spread where single carrier communication system does not work well. In this case, excess fading of the signal amplitude occurs and Inter Symbol Interference (ISI) due to the frequency selectivity of the channel appears at the receiver side. This yields a high probability of errors and makes the system’s overall performance very poor. Channel coding and adaptive equalization have been greatly used to solve these problems. But these techniques tend to increase the hardware cost.
An alternative way is to utilize a multicarrier system. The basic idea of such system is to divide the incoming bitstream into many different substreams and send them over many different subchannels. The data rate and bandwidth of the corresponding subchannels is much less than the total data rate and total system bandwidth respectively. The number of substreams is selected to ensure that each subchannel’s bandwidth is less than the coherence bandwidth of the channel, so the subchannels undergo comparatively flat fading. Thus,
this technique works for avoiding ISI on each subchannel which is a major problem in high speed communication under multipath environment. However, the subchannels in multicarrier modulation need not be contiguous, so a large continuous block of spectrum is not necessary for high rate multicarrier communications. Moreover, multicarrier modulation is reliably implemented digitally [1].
Orthogonal Frequency Division Multiplexing (OFDM) is an example of it, which is emerging as leading technology for high data rates [2]. It is based on multicarrier transmission which transforms a wide-band channel into a number of narrowband channels [3]. OFDM has two fundamental advantages. One is its robustness against channel dispersion and second is ease of phase and channel estimation in a time- varying environment. OFDM is benefited from the fact that it is using digital signal processing of Fast Fourier Transforms (FFTs) to obtain high sub-carrier density and computationally efficient phase and amplitude equalization [4].
The goal of this endeavour is to develop an educational software with graphical user friendly interactive interface that simulates the basic operation of OFDM system. Though OFDM simulators based on MATLAB are widely available, most of them run through command line interfaces. Graphical representations of the overall system with Graphical User Interface (GUI) are hard to find. Thus the scope of understanding the internal functionalities of various steps using MATLAB is limited in undergraduate level. Besides, there are various equations in the operation of OFDM that makes it fearful to many students. In this work, these equations have been avoided and Java has been used as simulation tool considering its various advantages, e.g., 100% object oriented architecture, platform independency, multithreading, look and feel, portability, simplicity, modularity, modifiability, extensibility, maintainability, re-usability and so forth. In developed system, through an interactive GUI, users can select different modes of input data generation, baseband modulation scheme and Signal-to-Noise-Ratio (SNR) of the channel.
User’s given data are saved on a file which is retrieved by the simulator for subsequent OFDM operations. Each and every fundamental stages of an OFDM system is presented through graphical representation. Finally performance metric in terms of Bit-Error-Ratio (BER) and Peak-to-Average Power Ratio (PAPR) is plotted.
International Conference on Materials, Electronics & Information Engineering, ICMEIE-2015 05-06 June, 2015, Faculty of Engineering, University of Rajshahi, Bangladesh
www.ru.ac.bd/icmeie2015/proceedings/
ISBN 978-984-33-8940--4
II. OFDMPRINCIPLE
OFDM is a multicarrier transmission technique, which divides the available spectrum into many carriers, each one being modulated by a low rate data stream. OFDM is similar to FDMA in that the multiple user access is achieved by subdividing the available bandwidth into multiple channels, which are then allocated to users. However, OFDM uses the spectrum much more efficiently by spacing the channels much closer together. This is achieved by making all the carriers orthogonal to one another, preventing interference between the closely spaced carriers [5] [6].
The concept of OFDM actually dates back to the 1960’s but became realistic with the development of simple and cheap implementation of Discrete Fourier Transform (DFT), i.e., Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT). The transmitted data are the frequency domain coefficients and the samples at the output of the IFFT stage are time domain samples of the transmitted data [7].
Implementation of OFDM multicarrier modulation scheme is explained below. Here, at first the high rate input data stream is baseband modulated by either Phase-Shift Keying (PSK) or Quadrature Amplitude Modulation (QAM) to generate complex symbols. This symbol stream is then divided into N number of parallel symbols (S/P) that correspond to the symbols to be transmitted over each of the subcarrier. These N symbols are considered as the discrete frequency components of the OFDM modulator output. The frequency components are converted into time samples by performing an inverse DFT on these symbols which is efficiently implemented by using IFFT algorithm. The IFFT yields the OFDM symbol consisting of the sequence x[n] = x [0], x [1] … x [n-1] of length N, where
The PAPR of the baseband OFDM signals can be defined as
Where, max |x[n]| is the peak power and E |x[n]| is the average power of x[n]. Output of IFFT is passed through parallel-to-serial (P/S) converter. This results in the baseband OFDM signal which is then transmitted through the channel and results in noisy symbols.
The receiver part of the system works in the reverse manner of the transmitter. The subsequent blocks perform S/P conversion, FFT, P/S conversion and baseband demodulation respectively and thus data are finally retrieved [1] [8].
III. SIMULATION MODEL AND PARAMETERS
Modeling and simulation are important in research.
Representing the real systems either via physical reproductions, or via mathematical models that allow representing the dynamics of the system via simulation, allows exploring system behavior in an formulated way which is often either not possible, or too high-risk in the real world. Simulation under this research tends to the following model shown in Fig. 1.
Fig. 1. Simulation model on java
In the generation of OFDM signal, binary data from Input Operation block is obtained and saved on a File. These binary data values are recovered by Retrieval block and mapped to QPSK symbols by Modulation block [2]. Constellation of the modulated symbols are plotted by Constellation Diagram block. These frequency domain samples are converted to time domain samples by 128-bit IFFT block, which are also plotted.
SNR range is selected from SNR ComboBox. Selected SNR range from SNR block is applied in determining the noise level channelized by Additive White Gaussian Noise (AWGN) block. The output of the channel is passed through FFT block to convert time-to-frequency domain samples, which are also plotted. Resulting samples are QPSK demodulated by Demodulation block. BERs are calculated via Retrieval and Demodulation block. SNR vs. BER diagram is plotted by the values of SNR and BER block. Finally, PAPR is calculated from IFFT block and then plotted.
IV. SYSTEM WORKFLOW
This section is reporting the simulation results for some parameters of OFDM system.
Our application can be run on three different ways. Hence each one needs different system requirements.
Step 1: It can be run by only double clicking the executive jar file ‘OFDM.jar’. In this step user must satisfy the following system requirements:
i. Any operating system, e.g., Windows, Mac etc.
ii. Java Runtime Environment (JRE).
Step 2: It can be run by double clicking the executable bat file
‘OFDM.bat’. In this step user must satisfy the following system requirements:
i. Only windows operating system.
ii. JRE.
Step 3: It can be run by executing the class file ‘OFDM.class’
writing ‘java OFDM’ command on the command prompt. In this step user must satisfy the following system requirements:
i. Any operating system, e.g., Windows, Mac etc.
ii. JRE.
Therefore, Java applications can be run on any platform having JRE. The step by step process to run the application is discussed below:
Step 1: After double clicking the java executable bat file
‘OFDM.bat’, user will notice the following window shown in Fig. 2. Hence, only one button will be enabled at a time. When any button is clicked, then corresponding button’s operation x[n] = 1
√N X[i]e / , 0 ≤ n ≤ N − 1 (1)
PAPR ≜ max |x[n]|
E |x[n]| (2)
International Conference on Materials, Electronics & Information Engineering, ICMEIE-2015 05-06 June, 2015, Faculty of Engineering, University of Rajshahi, Bangladesh
www.ru.ac.bd/icmeie2015/proceedings/
ISBN 978-984-33-8940--4
will be performed. After completing the button’s work, it will be disabled but next button will be enabled.
Fig. 2. Initial interface
Step 2: Input is fed by clicking Generate Input Data button shown in Fig. 2. User will then notice the following window shown in Fig. 3(a). From this, user can select one of two options to give input. If user wants to feed manually input data from keyboard, user must choose the Input from Keyboard button. After choosing this, user will notice the following window shown in Fig. 3(b). If user’s input is invalid, then the window shown in Fig. 3(c) will be appeared. After pressing Ok button shown in Fig. 3(c), user can give input again as shown in Fig. 3(b). If user presses Cancel button shown in Fig. 3(b), the window shown in Fig. 3(b) will be disappeared but Generate Input Data button shown in Fig. 2 will be enabled again.
Fig. 3. Input types, Input from keyboard, Message for wrong input
If user wants to feed randomly generated input data bits, user must choose the Auto-Random Generation button shown in Fig. 3(a). After choosing this, user will notice the following window as shown in Fig. 4(a). Pressing Ok or Cancel button shown in Fig. 4(a) involves the similar occurrences discussed above. We consider that user enters 32768 as the number of bits. Clicking Ok button, randomly generated binary numbers are saved in the following direction as shown in Fig. 4(b).
After pressing Ok button shown in Fig. 4(b), block diagram of OFDM system shown in Fig. 2 is replaced by the transmitter and receiver part of OFDM system as shown in Fig. 5.
Fig. 5. Transmitter and receiver part of OFDM system
Step 3: After finishing the operation of Generate Input Data button, user will click Apply QPSK Modulation button to apply Quadrature Amplitude Phase Shift Keying (QPSK) modulation. Then a waiting window will be appeared if user needs to wait. After exiting this, user will notice the constellation diagram before noise addition as shown in Fig. 7.
Step 4: Then user will press Apply IFFT button shown in Fig.
5 to convert frequency domain to time domain samples with IFFT length 64. Since the given number of bits is 32768 and QPSK modulation is used, there are 256 OFDM symbols. But first IFFT block (Size 64) shown in Fig. 7 will show only first block of subcarriers and other 63 subcarriers are hidden. Plots of constellation diagram before noise addition and first IFFT block are placed in the OFDM transmitter part.
Step 5: Clicking Select SNR Range button shown in Fig. 5, user will notice SNR’s range shown in Fig. 6. We consider that user selects 1 to 30 dB as the range of SNR.
Fig. 6. SNR range
Step 6: User clicks Apply Channel Noise button shown in Fig.
5 to perform FFT, demodulation and BER calculation. Then following windows, i.e., first FFT block (Size 64) and constellation diagram after noise addition shown in Fig. 7 will be appeared, which are placed on receiver part.
Fig. 4. Randomly generated input number and Path of file Fig. 7. Graphical representation of OFDM transceiver International Conference on Materials, Electronics & Information Engineering, ICMEIE-2015
05-06 June, 2015, Faculty of Engineering, University of Rajshahi, Bangladesh www.ru.ac.bd/icmeie2015/proceedings/
ISBN 978-984-33-8940--4
Step 7: Finally, user will press Show BER Diagram button to plot BER vs. SNR graph. Then a waiting window will be appeared if user needs to wait. After exiting this, user will notice the following window shown in Fig. 8.
Fig. 8. BER vs. SNR plot
Step 8: Now user will click Estimate PAPR button to show the performance of peak-to-average power ratio as shown in Fig. 9.
Fig. 9. PAPR
Step 9: If user wants to repeat the above process again, user must press Refresh button shown in Fig. 9. After doing this, the entire diagram shown in Fig. 9 will be similar to Fig. 2.
V. CONCLUSIONS
The basic principle of OFDM is to split a high-speed serial data into a number of lower-speed parallel data that are modulated on separate subcarriers where this parallelization reduces the effect of ISI. Our goal was to develop a simulator that can be used as an assistive tool in teaching the principle of OFDM to understand students.
In our simulator at first user will notice the simplified block diagram of OFDM as initial interface. Pressing each button on GUI using queuing process, user can easily understand the corresponding button’s operation. For example, the button Generate Input Data leads the user to give input. Pressing this button, user have an option to select his own types of choice to give input as either manually given binary data or automatically generated binary data that are stored into and retrieved from a file giving a particular message each time an operation is performed. After giving data input, user could easily understand that these data are being modulated by QPSK modulation technique because the next button is Apply QPSK Modulation button. Again the modulated symbols are plotted in
the transmitter portion (OFDM TRANSMITTER) of the interface from which user can easily be able to understand visually about the format of data input whether this is corrupted or not. Next button is Apply IFFT which indicates that frequency domain samples are converted into time domain samples which is also graphically represented. In similar way pressing corresponding buttons, user will easily understand the coming functionalities which are selecting SNR range and applying the resultant data stream through channel where reverse operations like transmitter portion are done and plotted the corresponding graphical representation into the receiver portion (OFDM RECEIVER).
Besides, user can easily understand the overall performance of OFDM system observing BERs in terms of SNRs and PAPR visually and graphically by pressing the button Show BER diagram and the button Estimate PAPR respectively. Since there are two user friendly options, i.e., (1) giving input data which is done in two ways one is manually given input data from keyboard and other is randomly generated input data as well as (2) selecting SNR range which is done in three ways:
(i) 1 – 15 dB, (ii) 1 – 25 dB, and (iii) 1 – 30 dB, user can clearly understand the performance metric in terms of BERs and PAPR based on these given values. In turn, the basic idea of OFDM will easily be understood graphically and visually at undergraduate level.
REFERENCES
[1] Goldsmith, “Wireless Communication”, Cambridge University Press, 2005.
[2] H. Kaur and M. Singh, "Modelling and Reporting Parameters of Optical OFDM System Using Different Modulation Techniques," Optics and Photonics Journal, Vol.3, June2013.
[3] V. J. Amirtha Vijina and J. Jayalakshmi, “Modelling and Performance Analysis of Optical OFDM System Using 16- QAM and 64-QAM Modulation Technique Using Simulink Tool,” International Journal of Systems, Algorithms &
Applications, Vol. 2, No. 5, 2012, pp. 9-12.
[4] A. Lowery and J. Armstrong, “Orthogonal-Frequency Division Multiplexing for Dispersion Compensation of Long-Haul Optical Systems,” Optics Express, Vol. 14, No. 6, 2006, pp.
2079-2084. doi:10.1364/OE.14.002079.
[5] J. Samuel, A. Emmanuel, I. Frank, N. Charles, A. Bayonle,
"Modeling of Orthogonal Frequency Division Multiplexing (OFDM) for Transmission in Broadband Wireless Communications", Journal of Emerging Trends in Computing and Information Sciences, ISSN 2079-8407, Vol. 3, April 2012.
[6] R. Chandrawanshi, R. Mohan, S. P. Chandrawanshi, "Signal Transmit Comparison between MIMO & OFDM System", International Journal of Scientific & Engineering Research, ISSN 2229-5518, Vol. 3, Oct-2012.
[7] Gordon L. Stüber, fellow, ieee, John R. Barry, member, IEEE, Steve W. Mclaughlin, senior member, IEEE, Ye (Geoffrey) Li, senior member, IEEE, Mary Ann Ingram, senior member, IEEE, and Thomas G. Pratt, member, IEEE,“Broadband MIMO- OFDM Wireless Communications”.
[8] Manushree Bhardwaj, Arun Gangwar, Devendra Soni, “A Review on OFDM: Concept, Scope & its Applications”, IOSR Journal of Mechanical and Civil Engineering (IOSRJMCE), ISSN: 2278-1684, Vol. 1, (May-June 2012), PP 07-11.
International Conference on Materials, Electronics & Information Engineering, ICMEIE-2015 05-06 June, 2015, Faculty of Engineering, University of Rajshahi, Bangladesh
www.ru.ac.bd/icmeie2015/proceedings/
ISBN 978-984-33-8940--4