Showing posts with label simulation. Show all posts
Showing posts with label simulation. Show all posts

Wednesday, 29 May 2013

example of simulate code matlab for BPSK, QPSK, 8 QAM, square root raised cosine filter

In this project we are simulating code matlab program three modulation schemes; those are namely BPSK, QPSK and 8-QAM.Firstly, we applied Rectangular pulse shaping (RPS) to BPSK, QPSK and 8 QAM. Secondly,we considered BPSK modulation scheme and simulated the system using Square Root Raised Cosine (SQRC) filter as pulse shaping filter and matched filter and we found minimum number of co-efficientsuch that the loss did not exceed 0.5db .Applied same filter to QPSK and 8-QAM and compared the results.We evaluated the coded performance of BPSK, QPSK and 8QAM with SQRC pulse shaping.Finally, we analyzed the transmitted signal spectrum in each case.


1 INTRODUCTION
In digital communication different types of modulations scheme are used to transfer the data from one place to another. Among these modulation schemes the most common modulation schemes are Binary Phase Shift Keying (BPSK), Quadrature Phase Shift Keying and Quadrature Amplitude Shift Keying (QAM). A brief description of these schemes are as follows.

2 Bit generation and mapping with SIMULATION MODEL

In this project we developed a general procedure for each modulation. The following block diagram shows the simulation model.












Fig 2.1: Simulation model

The brief description of each simulation block is follows.

2.1 Bit Generation
The Bit Generation block main function is to generate the bit with equal probability.

2.2 Mapping
The main function mapping is to covertthe bitstream into symbols according to each modulation scheme.
For BPSK each zero is mapped to +1 and ones are mapped to -1. In QPSK, the mapper block converts each two bits block into an in phase component and a quadrature component.

Table 2.1:
For QAM we took the blocks of three bits and mapped the bits according to the given gray coding.  

2.9 Encoder and Decoder

The encoder encodes the each 4-bit block into a 7-bit code word. This code word is fed into the system, at this time the output of the decision block will be the received code word rather than received bits. These code words may contain erroneous bits. The decoder will perform error check by taking 7bit blocks from the received bit stream of code words .It calculates the syndrome of each received code word. This syndrome is used to find the error pattern using syndrome LUT. Finally the corrected code word is generated and the data bits are recovered from each corrected code word.

3 Simulation Results
In this section we will discuss the simulation results of BPSK, QPSK, QAM and the obtained results are compared with theoretical values.

3.1 BPSK and QPSK with Rectangular Pulse Shaping Filter
The performance of BPSK and QPSK system in terms of BER vsEb/No is evaluated in Matlab. Both the QPSK and BPSK has same performance curves. The following figure show the BER curve for the simulated and theoretical system. It can be seen the two curves overlap each other. 
Fig3.1: Simulation results of BPSK & QPSK with Rectangular Pulse Shaping

There is no difference between the simulation and the theoretical curves of Eb/N0  vs  BER for three modulation schemes .In this context 8QAM  provides better performance than BPSK & QPSK .