Lab5-DSP System Design and BER Analysis

19
Lab 5: DSP System Design and BER Analysis DSP System Design and BER Analysis Communication System Design is an important aspect of today’s complex system development. Main challenges which often designers face in this domain is to perform simulation of End-2- End System configuration which involved Baseband and RF subsystems together and to study the effect of various parameters onto system performance such as Coder/Decoder, RF Non- Linearities, Channel effects, AWGN noise and to compute system figure of merit such as EVM and Bit Error Rate (BER) and to check receiver sensitivity in terms of BER over various Eb/No levels. This chapter outlines the key steps involved in performing BER simulation for an End-2-End DSP communication system taking QPSK modulation as an example (Specifications are chosen as per convenience and designers can choose their own specifications), during the due course of this example, designers will be able to see some key benefits of SystemVue for Communication System Level as compared to other similar softwares. Step1: QPSK Baseband Source Design Using the knowledge designers have gained till now, arrange following blocks on the schematic from Algorithm Design library for baseband QPSK signal generation. In this case schematic name was modified to be QPSK Source instead of default Design1. Fig1. Baseband QPSK signal generation

Transcript of Lab5-DSP System Design and BER Analysis

Lab 5: DSP System Design and BER Analysis

DSP System Design and BER Analysis Communication System Design is an important aspect of today’s complex system development.

Main challenges which often designers face in this domain is to perform simulation of End-2-

End System configuration which involved Baseband and RF subsystems together and to study

the effect of various parameters onto system performance such as Coder/Decoder, RF Non-

Linearities, Channel effects, AWGN noise and to compute system figure of merit such as EVM

and Bit Error Rate (BER) and to check receiver sensitivity in terms of BER over various Eb/No

levels.

This chapter outlines the key steps involved in performing BER simulation for an End-2-End DSP

communication system taking QPSK modulation as an example (Specifications are chosen as per

convenience and designers can choose their own specifications), during the due course of this

example, designers will be able to see some key benefits of SystemVue for Communication

System Level as compared to other similar softwares.

Step1: QPSK Baseband Source Design Using the knowledge designers have gained till now, arrange following blocks on the schematic from Algorithm Design library for baseband QPSK signal generation. In this case schematic name was modified to be QPSK Source instead of default Design1.

Fig1. Baseband QPSK signal generation

Simulation Controller Settings:

Fig2. Simulation Controller Settings

Run simulation and add a graph on the workspace tree. For results, select Series Type = Constellation and select sink name (e.g. S1 as per Fig1) and change X and Y-axis to be Min=-1.2 and Max=1.2

Fig3. Plotting QPSK Constellation Fig4. Graph Properties setting Once done, Constellation graph as below should be visible:

Fig5. QPSK Constellation Graph

Step2: QPSK Modulator Design Basic building blocks of a QPSK modulator can be arranged as below from Algorithm Design library.

Fig6. QPSK Modulator Design

Root Raised Cosine Filter: Place Filter Design component from library and set the following properties in the Filter Designers window: Response Type = Lowpass Sample Rate= Sample_Rate (internal variable where SVue reads the sample rate from Simulation Controller) SymbolRate=Sample_Rate/2

RollOff=0.35 Square Root=YES Interpolation=8 IQ Modulator: Set the Frequency = 70E6 Hz Amp Sensitivity= sqrt(2) (This will provide 13dBm power at the modulator output)

Fig7. Filter Designer Window with Filter Response Graphs

Finished QPSK modulator should look as below with all blocks integrated.

Fig8. QPSK Modulator Design

Simulation Controller: Simulation controller for QPSK modulator can be set as per fig below

Fig9. Simulation Controller for QPSK Modulator

Simulation Results: Run simulation and plot Spectrum of QPSK Modulator output as shown below.

Fig10. QPSK IF Spectrum

Step3: QPSK Demodulator Similar to modulator design, use following blocks to design QPSK demodulator in SystemVue. RRC filter to modified to have Interpolation=1 and set Decimation=8 (same no. as used in QPSK modulator), rest of the properties of the filter will be kept same as in modulator design part.

Fig11. QPSK Demod Design

Step4: AWGN Channel Place AddNDensity component from Algorithm Design and we can define few equations to set the Noise Density of the AWGN Channel based on Eb/No so that we can sweep the value in order to compute BER later. Using Equations utility in SystemVue type the equations below to calculate the NDensity which can be then used in AWGN block on the system level design

Power_dBm = 13 % modulator output power in dBm SymbolRate = Sample_Rate/2 BitsPerSymbol = 2 % Eb/No = energy per bit / noise density Eb_dBm = Power_dBm - 10*log10( SymbolRate * BitsPerSymbol ) EbN0 = ?10 %? Is used to make this value Tunable No_dBm = Eb_dBm - EbN0 NDensity = No_dBm

Fig12. AWGN Channel Component Fig13. Equation window Step5: QPSK System Design With all these individual blocks already designed end-2-end system can be designed as shown below:

Fig14. QPSK System Design Schematic

Simulation Controller: Setup the simulation controller as below and run simulation to plot Transmitter and Receiver spectrum to observe the data.

Fig14a. QPSK System Simulation Controller

Fig15. Transmitter Spectrum Fig16. Receiver Input Spectrum (after AWGN)

Understanding BER: In digital transmission, the bit error rate or bit error ratio (BER) is the number of received bits that have been altered due to noise, interference and distortion, divided by the total number of transferred bits during a studied time interval. BER is a unitless performance measure, often expressed as a percentage number. As an example, assume this transmitted bit sequence: 0 1 1 0 0 0 1 0 1 1, And, following is the received bit sequence: 0 0 1 0 1 0 1 0 0 1, The BER is in this case is 3 incorrect bits (underlined) divided by 10 transferred bits, resulting in a BER of 0.3 or 30%. The bit error probability pe is the expectation value of the BER. The BER can be considered as an approximate estimate of the bit error probability. This estimate is accurate for a long studied time interval and a high number of bit errors.

Fig17. Reference Bit-error rate curves for BPSK, QPSK, 8-PSK and 16-PSK in AWGN channel

In a noisy channel, the BER is often expressed as a function of the normalized carrier-to-noise ratio measure denoted Eb/N0, (energy per bit to noise power spectral density ratio), or Es/N0 (energy per modulation symbol to noise spectral density).

For example, in the case of QPSK modulation and AWGN channel, the BER as function of the Eb/N0 is given by: BER = 1 / 2erfc(Eb / N0).

Designers usually plot the BER curves to describe the functionality of a digital communication system. In optical communication, BER (dB) vs. Received Power (dBm) is usually used; while in wireless communication, BER (dB) vs. SNR (dB) is used.

Step6: BER Simulation for QPSK System

For proper BER simulation, reference and test signals have to time synchronized. SystemVue offers Cross Correlation function to find out the delay between the 2 signals and we can use the same in our design.

In order to find delay using Cross Correlation function in ADS we can use 2 sinks: 1st sink after Gray Encoder block and 2nd one after QPSK Demapper as shown below

Fig18. QPSK System Setup for Cross Correlation

Simulation controller is setup pretty much like previous step. Run simulation to plot the Cross Correlation as shown below by selecting Series Type = Cross Correlation

Fig19. Setting up Cross Correlation Fig20. Cross Correlation graph From the cross correlation graph we can calculate the delay required to synchronize the reference Tx and receiver test data. Ideally, the cross correlation peak should appear at the simulation sample (8191 in our case) else the difference between correlation peak and no of simulation samples outlines the delay required to synchronize the data. Delay required = No. of Simulation samples – Cross Correlation Peak Based on our simulation, we can find delay as below: Delay required = 8191-8175 = 16 In order to synchronize delay between Tx_Ref and Rx_Test, insert Delay component with 16 samples delay as shown. Run the simulation to ensure cross correlation peak appears at 8191 which is equal to simulation sample.

Fig21. QPSK BER Schematic with Delay block Fig22. Cross Correlation Graph after delay

As we can observe the “Ref” and “Test” are now synchronized properly hence we can perform BER analysis. Insert BER sink onto schematic and connect Ref and Test pins to transmitter bit sequence and receiver output respectively as shown below

Fig23. QPSK BER Schematic with Delay and BER Sink Double click on the BER sink and change the StartStopOption=Samples as shown below

Fig24. BER Sink Properties

Before running BER analysis:

1. Deactivate all the sinks placed on the design except BER sink 2. Increase number of samples under simulation controller

Why Increase Number of Samples: For proper BER analysis, it is also important to have enough samples during simulation to calculate BER as a figure of merit. E.g. As a general rule, for BER=0.1, min. samples required is 10. Double click on simulation controller and increase the No. of samples to something like: 8388608 as shown below.

Fig25. Setting Simulation Controller Properties for BER Simulation Why Deactivating other Sinks: For BER analysis we will be using large number of samples during simulation and this will cause dataset size to increase tremendously if the sinks are activated on the design which can cause Error like: “Out of Memory”. It is actually not needed to plot Spectrum etc as that has been already done and verified in previous steps and currently we are only interested in running BER simulation hence by deactivating the other sinks we will save ourselves from lot of memory and potential “Out of Memory error”.

Deactivation on sinks can be done in SystemVue by using this icon on the toolbar: Run Simulation and double click on the dataset under the workspace tree to observe BER obtained from the simulation:

Fig26. BER Simulation Output

**Please note your BER results can be different than shown above as BER sink used is based on Monte Carlo techniques and because it is an statistical number it may not be exactly the same as shown above but as long as you are close to above number it is good enough.

BER Waterfall Curve Simulations: Often in communication systems, it is desirable to characterize the system performance metrics such as BER over noisy channel and the BER is often expressed as a function of the normalized carrier-to-noise ratio measure denoted Eb/N0, often referred to as Waterfall curve to its typical characteristic as shown in Fig. 17. In order to perform BER vs. Eb/No simulations, we will use the Equations which we wrote to calculate NDesnity for AWGN channel and this can be simply done by setting a Sweep Evaluation in SystemVue which makes it very easy to sweep any parameter and plot the resulting graph for it. The only condition to sweep the parameter in SystemVue is that it should be defined as tunable. To set the sweep right click on the appropriate folder under the workspace tree and select Add->Evaluation->Add Sweep

Fig27. Setting Sweep for EbN0 In the Sweep properties window enter the parameters as shown below, take care in selecting the right analysis name which is set for BER simulation so that for each value of EbN0 variable BER simulation can be performed as shown below:

Fig28. Setting the Sweep Properties Once done Sweep will be visible on the workspace tree, right click and select Calculate Now to run BER sweep over various values of EbN0.

Fig29. Running Sweep Analysis Once simulation is finished, add a graph and select Series type as Y versus X. For X data, select Equation1_EbN0_Swp_B2_BER_Index under Sweep1_Data which gives you swept value of EbN0 during sweep simulation For Y data, select B2_BER under Sweep1_Data which will give BER value for each EbN0 sweep point. In the graph select Logarithmic scale for Y-axis.

Fig30. Adding results on the graph

Fig31. BER vs EbN0 Graph after simulation

In order to perform comparison of the simulation QPSK BER curve with the theoretical curve of QPSK BER in AWGN channel we can use Equations utility in SVue to write the equations related to theoretical BER calculation and then plot the same on the above graph. Right click on workspace tree and select Add -> Add Equation…Here we have selected the name of the Equation page as: Ideal_BER_QPSK and write following equations on this page:

k = 2 %Number of Bits per Symbol M = 2^k using('Sweep1_Data'); %Eb/No Sweep Dataset EbN0_eqn = Equation1_EbN0_Swp_B2_BER_Index %From Fig30. We can see that this is the EbN0 sweep value EbNo_ratio = 10.^(EbN0_eqn/10) EsNo_ratio = k * EbNo_ratio x = sqrt( 3 * EsNo_ratio / ( M - 1 ) ) Qx = 0.5 * erfc( x/sqrt(2) ) SER_theory = 1 - ( 1 - 2 * ( 1 - 1 / sqrt( M ) ) * Qx ).^2 BER_theory = SER_theory / k

Once done, click on Go to compute the results of this Mathlang script.

Fig32. Writing Ideal QPSK BER equations using Mathlang in SystemVue Workspace To add the theoretical BER curve computed above on to same graph as our simulated BER response, double click on the graph and click on Add and select the X and Y variables as below:

Fig33. Adding Theoretical BER curve to the simulated BER graph

Once done the graph should like as below, please note extra effort was put in to define trace labels and Graph Title as can be seen below, by default the trace labels will appear as ‘y’.

Fig34. Simulated and Theoretical BER Curve for QPSK in AWGN channel It can be noted that the simulated result is very close to the theoretical curve calculated using mathematical equations and some minor differences can be seen and that can be attributed to the RRC filters used in transmitter and receiver which are not ideal.