Simulation Program And Diagrammatic Representation

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

Chapter 5

The principal purpose of this project was to simulate and compare the performance of the cdma2000 systems with two different channel coding (convolutional code and turbo code) in fading channel which is characterized by Rayleigh fading and Additive White Gaussian Noise (AWGN).

This chapter gives details about the simulation steps involved in the software implementation for both convolutional code and turbo code in cdma2000 system. For the simulation purposes MATLAB 7.6 software is used and the bit error rate (BER) for each program given below is evaluated.

However, one of the limitations of the software is that the simulations are restricted by its processing ability. MATLAB software is also inefficient in terms of simulation time.

5.1 Simulation Program and Diagrammatic Representation

5.1.1 Main Program of cdma2000 In Fading Channel

The main program for implementing the cdma2000 system in fading channel is as described below.

First of all, pseudorandom bits must be generated.

These bits are then arranged in frames.

Frame Quality Bits and tail bits are included to the data in the frames.

Channel encoding, using either convolutional code or turbo code, is employed on each frame.

Then we performed the scrambling and interleaving process.

The next step is the orthogonal spreading with Walsh code. This Walsh code is normally 256-chip long.

After Walsh spreading, complex PN spreading followed by baseband filtering is carried out.

Next the resulting signal is subjected to fading by multiplying it with Rayleigh fading signal.

AWGN is included in the faded signal.

Demodulation of the signal then takes place at the receiver.

The following process is the despreading, descrambling and deinterleaving of the signal.

The resulting signal is then decoded using Viterbi Algorithm for convolutional decoding or Log-MAP algorithm for turbo decoding.

In the final step the BER is calculated so that the performance of cdma2000 can be evaluated.

The following flowchart gives a summary of the steps described above.

Start

Pseudorandom Bits are generated

Bits are arranged in frames

Frame Quality Bits and Tails bits are added

Channel Encoding (Convolutional or Turbo code)

Interleaving and Scrambling

Orthogonal Walsh Spreading (256-chip long)

Complex PN Spreading

Baseband Filtering

Demodulation

Deinterleaving

Despreading and Descrambling

Calculation of BER

Viterbi Decoding or Decoding Using Log-MAP Algorithm

End

∑

Rayleigh Fading

AWGN

Figure 5.1: Flowchart for Main Program of cdma2000 In Fading Channel

5.1.2 Program of cdma2000 with Convolutional Coding

The main program of cdma2000 system with convolutional coding in fading channel can be described as follows:

The number of frames is initialized. The parameters bit rate and chip rate are also defined. Here a bit rate of 9.6kbps and a chip rate of 3.6864 Mcps have been used.

Pseudorandom bits are generated using the PN Sequence Generator tool.

These bits are arranged in frames.

CRC bits and 8 tail bits are added to each frame.

Channel encoding using convolutional code is performed. The program is simulated for a code rate of 1/3 and 1/4, with both employing a constraint length of 9. In the MATLAB software the function ‘poly2trellis’ is used to create the trellis. The generator code, which is in octal, is [557 663 711] for the code rate of 1/3 and [765 671 513 473] for code rate of 1/4.

The interleaving process using the function ‘reshape’ is then performed. It takes a matrix as input and the data are taken column-wise from the matrix.

The process which followed is the scrambling of the interleaved frames and symbol mapping.

They are then demultiplexed into In-phase and Quadrature signals.

Orthogonal Walsh covering followed by complex PN spreading is done.

Next baseband filtering and up-sampling process is employed.

The signal is then subjected to the Rayleigh fading channel with AWGN.

The signal is then filtered using a Matched Filter (Square Root Raised Cosine Filter) and is downsampled.

The signal is then demodulated and Walsh re-covering is done.

The In-phase and Quadrature signals are multiplexed, descrambled and deinterleaved.

They are then quantized for soft decision decoding followed by Viterbi decoding.

Finally the BER is calculated.

These steps are reviewed in the flowchart given below.

Start

Number of Frames Is Initialized

Pseudorandom Bits are generated

Bits are arranged in frames

CRC Bits and 8 Tail Bits added

Convolutional Encoding

Interleaving

Scrambling and Symbol Mapping

Demultiplexing Into In-phase and Quadrature

Walsh Covering

Complex PN Spreading

Baseband Filtering and Upsampling

Rayleigh Fading Channel

AWGN

Filtering With Matched Filter and Downsampling

PN Demodulation

Walsh Recovering

Multiplexing of In-phase and Quadrature Signals

Descrambling

Deinterleaving

Quantization for soft decision decoding

Viterbi Decoding

Display Number of Bit Error for Specific SNR

Is Number of Errors = 0?

Yes

End

Increase SNR

No

Figure 5.2: Flowchart for Main Program of cdma2000 With Convolutional Coding

5.1.3 Program of cdma2000 With Turbo Coding

The main program of cdma2000 system with turbo coding is the same as that of the cdma2000 system with convolutional coding (as described above in 5.1.2). The only difference is that instead of convolutional encoding and decoding, turbo encoding and decoding is used.

However, to design the cdma2000 system with turbo coding some sub-programs need to be written. These sub-programs include turbo encoding and decoding processes. First of all, the main program for turbo coding is described. It is then followed by the program of turbo encoding and then turbo decoding.

The flowchart below described the main program of the cdma2000 system with turbo code.

Start

Number of Frames Is Initialized

Pseudorandom Bits are generated

Bits are arranged in frames

CRC Bits and 8 Tail Bits added

Turbo Encoding

Interleaving

Scrambling and Symbol Mapping

Demultiplexing Into In-phase and Quadrature

Walsh Covering

Complex PN Spreading

Baseband Filtering and Upsampling

Rayleigh Fading Channel

AWGN

Filtering With Matched Filter and Downsampling

PN Demodulation

Walsh Recovering

Multiplexing of In-phase and Quadrature Signals

Descrambling

Deinterleaving

Turbo Decoding with Log-MAP Algorithm

Display Number of Bit Error for Specific SNR

Is Number of Errors = 0?

Yes

End

Increase SNR

No

Figure 5.3: Flowchart for Main Program of cdma2000 With Turbo Coding

5.1.3.1 Turbo Encoding

Start

Number of Input Bits to Be Encoded Is Specified (m bits)

Bits Are Encoded With RSC Encoder 1 and K = 3

Input Bits Are Interleaved Pseudorandomly To Encoder 2

Encoding with RSC Encoder 2

Puncturing and Multiplexing of Bits from Both Encoders

Stop

Output systematic and parity bits

Figure 5.4: Flowchart for Turbo Encoding

5.1.3.2 Turbo Decoding

Two sub-programs must be written for turbo decoding since this process is quite long and complex.

The Log-MAP Algorithm for computing the LLR of symbols is illustrated.

Start

Forward and Backward Recursive State Are Initialized

Metric Is Computed Using Forward Recursion

Metric Is Computed Using Backward Recursion

Branch Metric Is Computed

Soft Output, LLR Is Computed

Stop

Display Information from Log-MAP Algorithm

Figure 5.5: Log-MAP Algorithm’s Flowchart

Next the iterative decoding process is explained via flowchart.

Start

Number of Iterations Is Initialized

Systematic and Parity Bits Sent To Encoder 1

Puncturing With Zeros Added To Parity Bits

Estimation of LLR by Decoder 1

Interleaved Systematic Bit with Parity Bit Sent To Decoder 2

Puncturing With Zeros Added To Parity Bits

Interleaved LLR from Decoder 1 Use as a-priori Information for Decoder 2

Estimation of a-posteriori LLR by Decoder 2

Has Required Number of Iterations Reached?

Stop

Yes

No

Figure 5.6: Flowchart for Iterative Decoding

Finally, the overall main program for turbo decoding can be explained via flowchart as given below.

Start

Transmission of Soft Inputs

Generation of Code Word of Each Encoder by Serial to Parallel Demultiplexing

Remove Parity Bits and Then Systematic Bits for Both Decoders

Set Up Trellis for the Given Code Generator

Apply Log-MAP Algorithm Process As Above

Scale Received Bits According To Channel Reliability Factor,

Extrinsic LLR Is Initialized

Iterative Turbo Decoding As Described Above

Output Decoded Bits

Stop

Figure 5.7: Flowchart for Turbo Decoding

Chapter 6

Results and Discussions

The graphical representations of the simulation results are presented in this chapter since they offer a more appropriate method for the comparison purposes. Comparison of performance in the cdma2000 system is more suitably described by the bit error rate with respect to varying signal to noise ratio ().

There are several parameters that affect the performance of the cdma2000 system which include number of iterations when using turbo codes, puncturing, interleaving and input data frame length. All the parameters mentioned are being considered to analyze the performance of cdma2000.

First of all the performance of cdma2000 with convolutional code in Rayleigh fading channel is discussed. It is then followed by the performance of turbo code in AWGN and Rayleigh fading channel without cdma2000 system and the effect of puncturing in the respective channel is observed. Turbo code in cdma2000 system is then investigated with the effect of interleaver shown. The effect of input data frame length is also considered. Finally the performance of cdma2000 with convolutional and turbo code in fading channel is compared. A brief discussion of the results is given after each graph.

6.1 Performance of cdma2000 with Convolutional Code in Rayleigh Fading Channel

Table 6.1: Parameters for Convolutional Coding In cdma2000

Bit Rate

9.6 kbps

Chip Rate

3.6864 Mcps

Channel

Rayleigh Fading

Parameters for Convolutional Code:

Code Rate of 1/3

Generator Code: and constraint length

Code Rate of 1/4

Generator Code: and constraint length

Decoder

Soft Decision Viterbi Decoding

Figure 6.1: Performance of cdma2000 with Convolutional Coding in Rayleigh Fading Channel

In the above figure, two different code rates together with the uncoded BER are compared. As seen, the use of interleavers realizes a significant coding gain since they are known to reduce effect of burst errors (as described in section 4.2.4).

Initially the performance of the uncoded BER outperforms that of the coded BER. However, as the SNR increases, there is a dramatic improvement in the performance of the coded BER. It is also noted that that the performance in terms of the bit error rate for the code rate of 1/4 is better than that of code rate 1/3. The coding gain for these two code rates is about 1.2 dB.

6.2 Performance of Turbo Code in AWGN Without cdma2000

Table 6.2: Parameters of Turbo Coding in AWGN without cdma2000

Channel

AWGN

Modulation

BPSK

Recursive Systematic Convolutional (RSC) parameters

n = 2, k = 1 and K = 3

Polynomial Code:

Interleaver

Pseudorandom Interleaver

Puncturing

Code Rate of 1/2

Decoder

Log-MAP Algorithm

6.2.1 Performance of Turbo Code in AWGN for Different Number of Iterations

Figure 6.2: Performance of Turbo Code in AWGN with Different Number of Iterations

From this figure, it can be observed that at low SNR the performance of convolutional code is better than the performance of turbo code. As the value of increases the performance of turbo codes recovers rapidly. Hence, at high values turbo code provides a more superior performance than convolutional code. In addition, it is seen that turbo code performs much better as the number of iteration increases but there is only a slight improvement in the performance with 16 iterations compared to 8 iterations since there is enough information in the decoders. The coding gain is only about 0.2 dB.

6.2.2 Effect of Puncturing of Turbo Code in AWGN

Figure 6.3: Effect of Puncturing of Turbo Code in AWGN

In figure 6.3, the performance of turbo code in AWGN with a code rate of 1/3 is compared to a code rate of 1/2. A code rate of 1/3 signifies that no puncturing has been done while code rate 1/2 implies that half parity bits from each encoder are punctured.

The performance when using a code rate of 1/3 is much better than when using a code rate of 1/2. The coding gain is approximately 0.3 dB. If puncturing is carried out the performance degrades. However if all the parity bits are transmitted, i.e., a code rate of 1/3 is used, it will require a larger bandwidth. Hence, there is a trade-off between the performance and the required bandwidth.

6.3 Performance of Turbo Code in Rayleigh Fading Channel without cdma2000

Table 6.3: Parameters of Turbo Coding in Rayleigh Fading Channel without cdma2000

Channel

Rayleigh Fading

Modulation

BPSK

Recursive Systematic Convolutional (RSC) parameters

n = 2, k = 1 and K = 3

Polynomial Code:

Interleaver

Pseudorandom Interleaver

Puncturing

None

Decoder

Log-MAP Algorithm

6.3.1 Performance of Turbo Code in Rayleigh Fading Channel for Different Number of Iterations

Figure 6.4: Performance of Turbo Code in Rayleigh Fading Channel with Different Number of Iterations

As the number of iteration increases, the performance of turbo code in Rayleigh fading channel improves significantly. Here, the assumption made is that the fading amplitude and phase difference caused by the channel are estimated accurately by the receiver.

6.3.2 Effect of Puncturing of Turbo Code in Rayleigh Fading Channel

Figure 6.5: Effect of Puncturing of Turbo Code in Rayleigh Fading Channel

The code rate of 1/3 (unpunctured) offers a better performance than the code rate of 1/2 at the expense of the required bandwidth. If all parity bits are transmitted (code rate 1/2) there is a significant degradation in the performance. The coding gain is about 1 dB which is quite large if we compared it to the AWGN channel (Figure 6.3)

6.4 Performance of cdma2000 With Turbo Code in Rayleigh Fading Channel

Table 6.4: Parameters for Turbo Coding in cdma2000

Channel

Rayleigh Fading

Modulation

BPSK

Recursive Systematic Convolutional (RSC) parameters

n = 2, k = 1 and K = 3

Polynomial Code:

Interleaver

Pseudorandom Interleaver

Puncturing

None

Decoder

Log-MAP Algorithm

Frame Length

1024

6.4.1 Effect of Interleaver in the Performance of cdma2000 with Turbo Code

Figure 6.6: Effect of Interleaver in Performance of cdma2000 with Turbo Code

In this figure, turbo code with 5 iterations has been used to show the effect of interleaver. There is a considerable improvement in the performance of turbo code if interleavers are employed. Here the coding gain is about 2 dB. Interleavers reduce the effect of burst errors and hence fading effects also are reduced.

6.4.2 Effect of Frame Length in the Performance of cdma2000 with Turbo Code

Figure 6.7: Effect of Frame Length in the Performance of cdma2000 with Turbo Code

The performance of turbo code enhances as the frame length increases. However with increasing frame length there is a considerable time delay being introduced. Hence large frame lengths cannot be used when transmitting voice, but they can be acceptable if only data is being transmitted.

6.5 Comparison of the Performance of cdma2000 with Convolutional Code and Turbo Code in Fading Channel

Figure 6.8: Comparison of the Performance of cdma2000 with Convolutional Code and Turbo Code in Fading Channel

The uncoded BER, convolutional code with a rate of 1/4 and turbo code with 5 iterations are compared in the above figure. Turbo code has a higher coding gain than convolutional code. It has an advantage of about 4dB over convolutional code. Hence, the performance of cdma2000 with turbo code is much better than that of convolutional code.



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now