Design

Published on August 2016 | Categories: Types, Research, Math & Engineering | Downloads: 340 | Comments: 0 | Views: 1300
of 5
Download PDF   Embed   Report

Comments

Content

Developing Software Libraries to simulate Wireless Components
Umesh Agarwal
IV/IV B. Tech E.C.E, Kakatiya Institute of Technology & Science, Warangal, India (+91) 9347033338 [email protected]

A. Ajay Kumar,
IV/IV B. Tech E.C.E, Kakatiya Institute of Technology & Science, Warangal, India (+91) 9849625000 [email protected]

Abstract - There are various developers and students who want to study the components of the wireless system viz the modulation schemes, the demodulation schemes, the encoding schemes, the decoding and error detection/correction schemes, the channel models etc. Studying these components on actual hardware would not be possible due to various reasons, such as cost required to buy that hardware, space for mounting those hardware element, etc., Hence we are trying to provide an alternative solution to such people by implementing the software libraries of these components. These libraries will help them conduct their study in a more convenient manner. The different modules will contain specific functions which may be helpful for a performing a comparative study or to check the efficiency of the particular modules. Due to the fast developing wireless technology, various developers require to test their products. They need simulators for this purpose and more detailed testing and simulation is possible only with a software simulation of the actual environment. There are different network simulators for developers to simulate a working environment for their products. But available simulators like ns2 don’t have all the modulation schemes implemented. The purpose of this paper is to enhance the capabilities of simulators such as ns2 by adding the necessary components. INTRODUCTION The term wireless refers to a technology, in which radio waves, infrared waves or microwaves, instead of cables or wires, are used to carry a signal to connect communication devices. Included in this field are devices such as mobile phones, portable digital assistants, laptops and computer networks. The technology is evolving rapidly, and playing an

increasingly important part in people’s communication and digital lifestyles. This technology enables users to access the internet, run email clients or share files over a local area network (LAN) all without cables. ADVANTAGES Mobility Hard to wire environments Increased reliability In the paper the different modules will contain specific functions which may be helpful for performing a comparative study or to check the efficiency of the particular modules. This paper has got the capabilities to be integrated with ns2, the network simulator, and make it more convenient to reduce the errors in communicating procedures. For this purpose we have made two base class receiver and transmitter. From this class many classes have been inherited. So you can say that our project is using the optimal features of OOPS. The software libraries available yet on the internet are not much efficient to rectify and analyze the errors occurs during the transmission of data for a wireless component. The component libraries will be developed in C++. These components libraries would provide a software simulation of the actual components. The various modules which will be developed under this project are: The classes for implementing various modulation schemes The classes for implementing various encoders & decoders, error detectors & correctors. The classes for implementing various channel simulation models. THE NEED FOR SIMULATORS

The need to simulate communication system lead to building of various network simulator software packages such as NS2, GLOMOSIM etc. But until now these packages contains only basic simulation schemes like creating nodes, establishing connections, introducing errors and evaluation of performance of the system, which are not sufficient for the real world systems like wireless communication system. Besides the modulation schemes were of default type in these simulators (eg. BPSK is default for NS2), and even these schemes used mere probability values to simulate modulation and not actual calculations. Thus main objective of this paper is to create software libraries in C++ that can later be incorporated into packages such as NS-2 to simulate and develop wireless communication system by providing a software implementation of the following, Implementation of Modulation Schemes Encoding & Decoding Error Detection & Correction Channel Simulation. IMPLEMENTATION OVERVIEW The libraries consist of: Modulators & Demodulators Encoders & Decoders for Error Detection & Correction Channel Models. Modulators & Demodulators We have implemented BPSK, QPSK, MSK, 4-PSK, 8PSK

Binary Phase Shift Keying (BPSK): The two binary symbols modulate the phase of the carrier wave. As there are two symbols ( viz. 1 and 0) the phase shift take place is the carrier wave when symbol changes from 1 to 0 or 0 to 1 is 2 π rad. Quadrature Phase Shift Keying (QPSK): The channel bandwidth is an important resource in communication channel which must be used at its maximum. That is we must reduce the signaling rate i.e. the number of signals sent per second. By combining more than two bits in one signal the signaling rate can be reduced. In QPSK two successive bits are combined together to form one signal, hence signaling rate is reduced, hence reducing the bandwidth requirements of the communication channel.

Each signal has a phase shift of π rad from the previous signal. There are two types of QPSK viz. Offset QPSK and Non Offset QPSK. There is an offset of one bit period between even and odd bit streams that are combined together. When the even bit sequence is delayed by one bit period there will be no offset and the method is called non offset QPSK. When the inherent delay is left as is the method is called offset QPSK. Minimum shift keying (MSK): In QPSK the phase change creates abrupt amplitude changes in the waveform. Hence the bandwidth requirement is more and does not remain constant. MSK is used to overcome this problem. The modulated waveform is continues in phase, for MSK, hence there are no abrupt amplitude changes. M-PSK: When more bits are grouped together the bandwidth requirement reduces. When M bits are grouped together the binary phase shift modulation technique is called M-PSK system. The phase shift is given by 2 π / M. Euclidean distance between two symbols = 2 sqrt (E) sin ( π /M) Though the bandwidth requirement reduces by combining more number of bits together there is a drawback, the Euclidean distance between the symbols reduces, and this causes more errors during detection. For achieving bandwidth reduction error detection capabilities need to be compromised and vice versa. PSK4: PSK4 is special case of M-ary PSK when two bits are combined together. PSK4 is different 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 lines at π /4 rad from the real and imaginary axes. PSK8: PSK8 is special case of M-ary PSK when two bits are combined together. The bit patterns by which the modulation takes place is given by the gray code of that many number of bits. Here, for example, the 8 symbols produced are obtained by modulating 3 bits of groups together which are given by first three numbers in gray code system. Encoders & Decoders: We have implemented Convolution Codes, CRC Codes.

CONVOLUTION CODES:

In a convolution code, the block of n code digits generated by the encoder in a time unit depends not only on the block of k message digits within that time unit, but also on the preceding (N-1) blocks of message digits. These codes are described as (n, k, m) codes, n: number of outputs to be multiplexed k: number of inputs to be multiplexed m: Encoders memory Decoding: The Viterbi algorithm is used for decoding convolution codes. It is a maximum likelihood decoding algorithm. CRC CODES: CRC stands for CYCLIC REDUNDANCY CHECKING CODE. It has the ability to detect and correct errors. The CRC checksum is transmitted along with the packet and at the receiving end the CRC checksum is verified, if it is nonzero, then there is an error in the packet hence the packet is discarded. Encoder: CRC is a cyclic code. The encoding and decoding is done with the help of various generator polynomials. There are various standard generator polynomials. Eg. CRC-4:-x^4+x^3+x^2+x+1 Decoder: At the decoder, the same procedure as the encoder is carried out on the polynomial received. BCH CODES: The significant example of block code is BCH Code. As other block code, BCH encodes k data bits into n code bits by adding n-k parity checking bits for the purpose of detecting and checking the errors. Given the length of the codes is n= 2 -1 for any integer mi y3, we will have t (where t< 2 -1), is the bound of the error correction. That is, BCH can correct any combination of errors (burst or separate) fewer than t in the n-bit-codes. The number of parity checking bits is n-k. An important concept for BCH is Galois Fields (GF), which is a finite set of elements on which two binary addition and multiplication can be defined. For any prime number ‘p’ there is GF (p) and GF ( p ) is called extended field of GF (p). We often use GF (2 ) in BCH Code. A GF can be constructed over a primitive polynomial such as p ( x ) = x + x +1. Usually, GF table records all the variables, including expressions for
4 m m m m

the elements, minimal polynomial, and generator polynomial. By referring to the table, we can locate a proper generator polynomial for encoder. For example, when (n, k, t) = (15, 7, 2), a possible generator is

g ( x) = x 8 + x 7 + x 6 + x 4 +1. If we have a data stream d = ( d 0 , d1 , d 2 ,∧ d k −1 ), the codeword would be g ( x) • d and have the style n −1 of v ( x ) = v0 + v1 x + ∧ + vn −1 x .
The decoder of BCH is complicated because it has to locate and correct the errors. Suppose we have a received codeword r ( x) = r0

+ r1 x + r2 x 2 + ∧ + rn −1 x n −1 , then r ( x) = v( x) + e( x) , where, v(x) is correct

codeword and e(x) is the error. First, we must compute a syndrome vector S= ( s1 , s2 ∧ s21 ) , which can be achieved by calculating r • H , where, H is parity-check matrix and can be defined as:
t

2 n −1 ⎤ ∧α ⎡1 α α ⎢1 α 2 (α 2 ) 2 ∧ (α 2 ) n −1 ⎥ ⎥ ⎢ ⎥ M H = ⎢M ⎥ ⎢ M M ⎥ ⎢ ⎢1 α 2t (α 2t ) 2 ∧ (α 2t ) n −1 ⎥ ⎣ ⎥ ⎦

Here α is the element of the GF field and can be located in the GF table. With syndrome, error location polynomial σ ( x) can be determined. Berlekamp’s iterative algorithm is one of the solutions to calculate the error-location polynomial. By finding roots of σ ( x) , the location numbers for the errors will be achieved. Channel Models: We have implemented AWGN, Rayleigh, Rician channels AWGN: the most basic and common approximation of a noisy channel is to use additive white Gaussian noise (AWGN). In the channel simulator, this requires that a Gaussian random variable (RV) be generated at every example. Obviously, it is impossible to do this exactly (especially using a fixed-point representation) since such a RV has a probability density function (PDF) that is infinite in extent.

• The compromise used is to approximate a Gaussian RV with variance, say about 1/16 so that the probability of the magnitude exceeding 1 is approximately 6.3 ×10 . • Noise in a communication system typically comes from a variety of mutually independent sources: o Thermal noise in receiver equipment o Atmospheric noise o Various kinds of random interference Noise is typically independent of the information signal, and of the fading characteristics of the channel. Thus it usually is modeled as Additive White Gaussian Noise (AWGN). Constant power spectral density N 0 / 2 [W/HZ] over the total (two-sided) bandwidth 2B. i.e., total noise power N 0 .
−5

• • • • •

• •

Multipath transmission due to reflections from (possibly moving) objects in the surroundings => multipath fading and inter-symbol interference (frequency-selectivity). Relative transmitter-receiver motion => Doppler Effect (=>time-varying, correlated random fading). Attenuation of signal power from large objects => (slow) shadowing. Interference between different wireless carriers, transmitters and systems =>inter-channel/intercell/inter-system interference. Spreading of radiated electromagnetic power in space as function of distance =>path loss. Thermal noise and background noise =>additive noise. SYSTEM DESIGN



Design Decisions: The communication path is modeled using chain of communicator sockets. Every modulation scheme, channel model, encoder etc. is looked upon as a plug which can be put in the communicator socket. The length of the chain can be arbitrarily increased or decreased by adding or removing plugs.
Modulator
Input data socket Communicator chain Plug

The AWGN Channel adds white Gaussian noise to a real or complex input signal. When the input signal is real, it adds real Gaussian noise and produces a real output signal. When the input signal is complex, it adds complex Gaussian noise and produces a complex output signal. The additive random noise added depends directly on the standard deviation of the noise and doesn’t really simulate fading in the wireless multipath environment. Rayleigh channel and Rician channel: We are mainly interested in small scale fading. Small – scale fading manifests itself in two mechanisms, 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 motion between the transmitter and receiver results in propagation path changes. The rate of change of these propagation conditions accounts for the fading rapidity (rate of change of the fading impairments). Small scale fading is also called Rayleigh fading because if the multiple reflective paths are large in number and there is no line of sight signal component, the envelope of the 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 path, the small-scale fading envelope is described by a Rician PDF. Fading results mainly from:

channel

Demodulator

Output data

WIRELESS CONDITION Problem 1: multipath introduces intersymbol interference (ISI) or delay spread.
BUILDING

ACCESS

Problem 2: moving receiver induces fading effects (Doppler shift) for each ray path.

MOVING OBJECT

MOVING OBJECT

SYSTEM TESTING Once the code has been generated, Object Oriented testing begins with class testing. A series of tests are designed that exercise class operations & examine whether errors exists as one class collaborates with other classes. Once the classes are integrated to form a subsystem, thread-based, use-based & cluster testing, along with fault-based approaches, are applied. Use-cases are used to uncover errors at the validation level. FUTURE SCOPE Though the present implementations will be very basic, it serves the purpose of acting as a base for future projects in the same field. The class libraries for the wireless components will be developed and made available online along with extensive documentation on the classes. Wireless Application Developers could further modify the existing classes to increase the comprehensiveness of testing possible. Developers wanting to study the channel characteristics and the effect of various channel models on data transfer can customize the various channel simulations made available in the library, to best suit their needs. Developers working on NS2 or any other 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

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 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++ coding have been greatly enhanced by this experience. We hope that our paper is extended and carried further, by anyone who is interested in this subject. We also believe that our work will be found immensely useful by application developers, researches and people who will use our libraries in future. We hope that the project was worth the effort in the sense that it achieves its primary purpose of being a “base” for others to work upon. We wish that this project stays alive, and that new improvements are made on it at regular intervals, because we feel that this project – in keeping with the true spirit of the source movement – is something that will have wide – ranging applications & should therefore be analyzed, studied and enhanced by experts in the field. REFERENCES
[1] John G.Proakis ,Dimitris G.Manolakis, ”Digital Signal Processing,” Pearson Education. [2] William Stallings, “Data and Computer Communication”, Prentice Hall Publisher. [3] E.Balaguruswamy “Object Oriented Programming with C++”,Tata Mc-Graw Hill. [4] Simon Haykin, “Digital Communication”, John Wiley Publishers.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close