Вы находитесь на странице: 1из 5

Developing Software Libraries to simulate Wireless

Components
Umesh Agarwal A. Ajay Kumar,
IV/IV B. Tech E.C.E, IV/IV B. Tech E.C.E,
Kakatiya Institute of Technology & Science, Kakatiya Institute of Technology & Science,
Warangal, India Warangal, India
(+91) 9347033338 (+91) 9849625000
umeshagarwal_27@yahoo.co.in ajayz15@yahoo.com

Abstract - There are various developers and students increasingly important part in people’s communication
who want to study the components of the wireless and digital lifestyles. This technology enables users to
system viz the modulation schemes, the demodulation access the internet, run email clients or share files over a
schemes, the encoding schemes, the decoding and local area network (LAN) all without cables.
error detection/correction schemes, the channel
models etc. Studying these components on actual ADVANTAGES
hardware would not be possible due to various ¾ Mobility
reasons, such as cost required to buy that hardware, ¾ Hard to wire environments
space for mounting those hardware element, etc., ¾ Increased reliability
Hence we are trying to provide an alternative solution In the paper the different modules will
to such people by implementing the software libraries contain specific functions which may be helpful for
of these components. These libraries will help them performing a comparative study or to check the efficiency
conduct their study in a more convenient manner. The of the particular modules. This paper has got the
different modules will contain specific functions which capabilities to be integrated with ns2, the network
may be helpful for a performing a comparative study simulator, and make it more convenient to reduce the
or to check the efficiency of the particular modules. errors in communicating procedures. For this purpose we
Due to the fast developing wireless technology, various have made two base class receiver and transmitter. From
developers require to test their products. They need this class many classes have been inherited. So you can
simulators for this purpose and more detailed testing say that our project is using the optimal features of OOPS.
and simulation is possible only with a software The software libraries available yet on the internet are not
simulation of the actual environment. There are much efficient to rectify and analyze the errors occurs
different network simulators for developers to during the transmission of data for a wireless component.
simulate a working environment for their products. The component libraries will be
But available simulators like ns2 don’t have all the developed in C++. These components libraries would
modulation schemes implemented. The purpose of this provide a software simulation of the actual components.
paper is to enhance the capabilities of simulators such
as ns2 by adding the necessary components. The various modules which will be developed under this
project are:
INTRODUCTION ¾ The classes for implementing various modulation
schemes
The term wireless refers to a ¾ The classes for implementing various encoders &
technology, in which radio waves, infrared waves or decoders, error detectors & correctors.
microwaves, instead of cables or wires, are used to carry a ¾ The classes for implementing various channel
signal to connect communication devices. Included in this simulation models.
field are devices such as mobile phones, portable digital
assistants, laptops and computer networks. The THE NEED FOR SIMULATORS
technology is evolving rapidly, and playing an
The need to simulate communication Each signal has a phase shift of π rad
system lead to building of various network simulator from the previous signal. There are two types of
software packages such as NS2, GLOMOSIM etc. But QPSK viz. Offset QPSK and Non Offset QPSK.
until now these packages contains only basic simulation There is an offset of one bit period between even
schemes like creating nodes, establishing connections, and odd bit streams that are combined together.
introducing errors and evaluation of performance of the When the even bit sequence is delayed by one bit
system, which are not sufficient for the real world systems period there will be no offset and the method is
like wireless communication system. Besides the called non offset QPSK. When the inherent delay
modulation schemes were of default type in these is left as is the method is called offset QPSK.
simulators (eg. BPSK is default for NS2), and even these ¾ Minimum shift keying (MSK): In QPSK the
schemes used mere probability values to simulate phase change creates abrupt amplitude changes
modulation and not actual calculations. in the waveform. Hence the bandwidth
requirement is more and does not remain
Thus main objective of this paper is to constant. MSK is used to overcome this problem.
create software libraries in C++ that can later be The modulated waveform is continues in phase,
incorporated into packages such as NS-2 to simulate and for MSK, hence there are no abrupt amplitude
develop wireless communication system by providing a changes.
software implementation of the following, ¾ M-PSK: When more bits are grouped together
¾ Implementation of Modulation Schemes the bandwidth requirement reduces. When M bits
¾ Encoding & Decoding are grouped together the binary phase shift
¾ Error Detection & Correction modulation technique is called M-PSK system.
¾ Channel Simulation. The phase shift is given by 2 π / M.
Euclidean distance between two symbols = 2
IMPLEMENTATION OVERVIEW sqrt (E) sin ( π /M)
Though the bandwidth requirement
The libraries consist of: reduces by combining more number of bits together
¾ Modulators & Demodulators there is a drawback, the Euclidean distance between
¾ Encoders & Decoders for Error Detection & the symbols reduces, and this causes more errors
Correction during detection. For achieving bandwidth reduction
¾ Channel Models. error detection capabilities need to be compromised
and vice versa.
Modulators & Demodulators ¾ PSK4: PSK4 is special case of M-ary PSK when
We have implemented BPSK, QPSK, MSK, 4-PSK, 8- two bits are combined together. PSK4 is different
PSK than QPSK, also in which two bits are combined
together. In PSK4 the symbols lie on the real and
imaginary axes where as in QPSK they lie on
¾ Binary Phase Shift Keying (BPSK): The two lines at π /4 rad from the real and imaginary
binary symbols modulate the phase of the carrier axes.
wave. As there are two symbols ( viz. 1 and 0) ¾ PSK8: PSK8 is special case of M-ary PSK when
the phase shift take place is the carrier wave two bits are combined together. The bit patterns
when symbol changes from 1 to 0 or 0 to 1 is by which the modulation takes place is given by
2 π rad. the gray code of that many number of bits. Here,
¾ Quadrature Phase Shift Keying (QPSK): The for example, the 8 symbols produced are
channel bandwidth is an important resource in obtained by modulating 3 bits of groups together
communication channel which must be used at which are given by first three numbers in gray
its maximum. That is we must reduce the code system.
signaling rate i.e. the number of signals sent per
second. By combining more than two bits in one Encoders & Decoders:
signal the signaling rate can be reduced. In We have implemented Convolution Codes, CRC
QPSK two successive bits are combined together Codes.
to form one signal, hence signaling rate is
reduced, hence reducing the bandwidth
requirements of the communication channel. CONVOLUTION CODES:
In a convolution code, the block of n code digits the elements, minimal polynomial, and generator
generated by the encoder in a time unit depends not only polynomial. By referring to the table, we can locate a
on the block of k message digits within that time unit, but proper generator polynomial for encoder. For example,
also on the preceding (N-1) blocks of message digits. when (n, k, t) = (15, 7, 2), a possible generator is
These codes are described as (n, k, m) codes, g ( x) = x 8 + x 7 + x 6 + x 4 +1. If we have a data
n: number of outputs to be multiplexed
k: number of inputs to be multiplexed stream d = ( d 0 , d1 , d 2 ,∧ d k −1 ), the codeword would be
m: Encoders memory g ( x) • d and have the style
n −1
Decoding: The Viterbi algorithm is used for decoding of v ( x ) = v0 + v1 x + ∧ + vn −1 x .
convolution codes. It is a maximum likelihood decoding
algorithm. The decoder of BCH is complicated because it has to
locate and correct the errors. Suppose we have a received
¾ CRC CODES: codeword r ( x) = r0 + r1 x + r2 x 2 + ∧ + rn −1 x n −1 ,
CRC stands for CYCLIC REDUNDANCY then r ( x) = v( x) + e( x) , where, v(x) is correct
CHECKING CODE. It has the ability to detect and codeword and e(x) is the error. First, we must compute a
correct errors. The CRC checksum is transmitted along syndrome vector S= ( s1 , s2 ∧ s21 ) , which can be
with the packet and at the receiving end the CRC
achieved by calculating r • H , where, H is parity-check
t
checksum is verified, if it is nonzero, then there is an error
in the packet hence the packet is discarded. matrix and can be defined as:

Encoder: CRC is a cyclic code. The encoding and


decoding is done with the help of various generator
⎡1 α α ∧α ⎤
polynomials. 2 n −1

⎢1 α 2 (α 2 ) 2 ∧ (α 2 ) n −1 ⎥
There are various standard generator polynomials. ⎢ ⎥
Eg. CRC-4:-x^4+x^3+x^2+x+1 H = ⎢M M ⎥
⎢ ⎥
Decoder: At the decoder, the same procedure as the ⎢ M M ⎥
encoder is carried out on the polynomial received. ⎢⎣1 α 2t (α 2t ) 2 ∧ (α 2t ) n −1 ⎥
⎦⎥
¾ BCH CODES:
Here α is the element of the GF field and can be located
The significant example of block code is BCH Code. in the GF table.
As other block code, BCH encodes k data bits into n code With syndrome, error location polynomial σ ( x) can be
bits by adding n-k parity checking bits for the purpose of
determined. Berlekamp’s iterative algorithm is one of the
detecting and checking the errors. Given the length of the
m solutions to calculate the error-location polynomial. By
codes is n= 2 -1 for any integer mi y3, we will have t finding roots of σ ( x) , the location numbers for the errors
m
(where t< 2 -1), is the bound of the error correction. That will be achieved.
is, BCH can correct any combination of errors (burst or
separate) fewer than t in the n-bit-codes. The number of Channel Models:
parity checking bits is n-k. We have implemented AWGN, Rayleigh, Rician channels
An important concept for BCH is Galois Fields ¾ AWGN: the most basic and common
(GF), which is a finite set of elements on which two approximation of a noisy channel is to use
binary addition and multiplication can be defined. For any additive white Gaussian noise (AWGN). In the
m
prime number ‘p’ there is GF (p) and GF ( p ) is called channel simulator, this requires that a Gaussian
m random variable (RV) be generated at every
extended field of GF (p). We often use GF (2 ) in BCH
example. Obviously, it is impossible to do this
Code. A GF can be constructed over a primitive
exactly (especially using a fixed-point
polynomial such as p ( x ) = x + x +1. Usually, GF
4
representation) since such a RV has a probability
table records all the variables, including expressions for density function (PDF) that is infinite in extent.
• Multipath transmission due to reflections from
The compromise used is to approximate (possibly moving) objects in the surroundings =>
a Gaussian RV with variance, say about 1/16 so multipath fading and inter-symbol interference
that the probability of the magnitude exceeding (frequency-selectivity).
−5 •
1 is approximately 6.3 ×10 . Relative transmitter-receiver motion => Doppler
Effect
• Noise in a communication system typically (=>time-varying, correlated random fading).
comes from a variety of mutually independent • Attenuation of signal power from large objects =>
sources: (slow) shadowing.
o Thermal noise in receiver equipment • Interference between different wireless carriers,
o Atmospheric noise transmitters and systems =>inter-channel/inter-
o Various kinds of random interference cell/inter-system interference.
• Noise is typically independent of the information • Spreading of radiated electromagnetic power in
signal, and of the fading characteristics of the space as function of distance =>path loss.
channel. • Thermal noise and background noise =>additive
• Thus it usually is modeled as Additive White noise.
Gaussian Noise (AWGN). Constant power
spectral density N 0 / 2 [W/HZ] over the total SYSTEM DESIGN
(two-sided) bandwidth 2B.
Design Decisions:
• i.e., total noise power N 0 .
The communication path is modeled using chain
The AWGN Channel adds white Gaussian noise of communicator sockets. Every modulation scheme,
to a real or complex input signal. When the input signal is channel model, encoder etc. is looked upon as a plug
real, it adds real Gaussian noise and produces a real which can be put in the communicator socket. The length
output signal. When the input signal is complex, it adds of the chain can be arbitrarily increased or decreased by
complex Gaussian noise and produces a complex output adding or removing plugs.
signal.
The additive random noise added depends
directly on the standard deviation of the noise and doesn’t Modulator
Plug
really simulate fading in the wireless multipath Input data
environment.
socket
¾ Rayleigh channel and Rician channel: channel
Communicator chain
We are mainly interested in small scale fading.
Small – scale fading manifests itself in two mechanisms, Demodulator
namely, time-spreading of the signal (or signal dispersion)
and time-variant behavior of the channel. For mobile
radio applications, the channel is time-variant because Output data
motion between the transmitter and receiver results in
propagation path changes. The rate of change of these
WIRELESS CONDITION
propagation conditions accounts for the fading rapidity
(rate of change of the fading impairments). Small scale
Problem 1: multipath introduces intersymbol interference
fading is also called Rayleigh fading because if the
(ISI) or delay spread.
multiple reflective paths are large in number and there is
no line of sight signal component, the envelope of the BUILDING
received signal is statistically described by a Rayleigh
PDF. When there is a dominant no fading signal
component present, such as a line of sight propagation ACCESS
path, the small-scale fading envelope is described by a
Rician PDF.

Fading results mainly from:


Problem 2: moving receiver induces fading effects
(Doppler shift) for each ray path. Today rapid developments in the Information
Technology and Telecommunication have made wireless
devices such as mobiles, PDA’s, and Laptops etc. all
pervading. The large market for wireless hardware has
made the production of software products for this
hardware an important field. The researches and
MOVING OBJECT MOVING OBJECT
programmers need simulators to design, implement and
test their software. This is where our project comes into
the picture.
This paper provided us the opportunity in understanding
the different topics of Digital Communication & C++
SYSTEM TESTING
coding have been greatly enhanced by this experience.
We hope that our paper is extended and carried further, by
Once the code has been generated, Object
anyone who is interested in this subject. We also believe
Oriented testing begins with class testing. A series of tests
that our work will be found immensely useful by
are designed that exercise class operations & examine
application developers, researches and people who will
whether errors exists as one class collaborates with other
use our libraries in future.
classes.
We hope that the project was worth the effort in
Once the classes are integrated to form a
the sense that it achieves its primary purpose of being a
subsystem, thread-based, use-based & cluster testing,
“base” for others to work upon. We wish that this project
along with fault-based approaches, are applied. Use-cases
stays alive, and that new improvements are made on it at
are used to uncover errors at the validation level.
regular intervals, because we feel that this project – in
keeping with the true spirit of the source movement – is
FUTURE SCOPE
something that will have wide – ranging applications &
should therefore be analyzed, studied and enhanced by
Though the present implementations will be very
experts in the field.
basic, it serves the purpose of acting as a base for future
projects in the same field. The class libraries for the
REFERENCES
wireless components will be developed and made
available online along with extensive documentation on
[1] John G.Proakis ,Dimitris G.Manolakis, ”Digital Signal
the classes. Wireless Application Developers could Processing,” Pearson Education.
further modify the existing classes to increase the
comprehensiveness of testing possible. [2] William Stallings, “Data and Computer Communication”,
Developers wanting to study the channel Prentice Hall Publisher.
characteristics and the effect of various channel models on
data transfer can customize the various channel [3] E.Balaguruswamy “Object Oriented Programming with
simulations made available in the library, to best suit their C++”,Tata Mc-Graw Hill.
needs.
[4] Simon Haykin, “Digital Communication”, John Wiley
Developers working on NS2 or any other
Publishers.
Network Simulators can also benefit from these libraries,
because they are designed to be an enhanced form of the
corresponding modules that are found in current releases
of NS2, they too can modify & enhance these basic
modules to suit their needs. Individual users who want to
compare the various modulation schemes for specific
applications can also use these libraries.
Future enhancements could include highly
detailed versions of the current modules, and also the
addition of new modules such as Encryption &
Decryption schemes, Compression-Decompression
schemes etc.

CONCLUSION

Вам также может понравиться