project attached
Project1.dvi ECE5312 WPI ECE 5312 Digital Communications Project 1: BPSK & QAM Performance Maximum Points - 125 The objective of this project is to use MATLAB to implement modulation and demodulation stages of an idealized complex-baseband communications system. Specifically, the focus is on performance analysis of ML reception assuming equal prior probabilities over the symbols of BPSK and 16-QAM. Probability of symbol error expressions for these two constellations are experimentally evaluated using Monte-Carlo simulations and compared with theory. 1. A BPSK Communications System (a) In this part of the project, you will implement a BPSK communication system according to the CT-AWGN channel model depicted in Figure 4.1-1 of Proakis and Salehi. The transmitted signal, sm(t) is generated in a manner similar to Figure 3.2-6. Remember however that this diagram corresponds to the generation of a real passband signal whereas in this project, we only simulate a complex baseband signal. Referring to Figure 3.2-6, you may directly generate random symbols Am and map them to discrete orthonormal basis signals. (b) Assume that the CT baseband pulse is g1(t) = 4 I[0, T ] ∗, where the symbol period, T = 16 × 10−4 seconds. The use of a rectangular pulse indicates that this system uses NRZ signaling for communication. Due to the fact that a CT signal is impossible to store and process on a computer, we will utilize the idea of sampling and instead use the DT baseband waveform, g1[n] = 4 ∑15 k=0 δ[n − kTs], where the sampling interval, Ts = 10 −4 seconds. In other words, each BPSK symbol is repeated 16 times every 10−4 seconds. (c) Let us denote the energy of g1[n] as Eg †. Recall that the energy of a DT signal is defined as, Eg = ∞ ∑ n=−∞ |g1[n]| 2 The minimum number of BPSK symbols you will need to generate in order to observe the desired probability of symbol error characteristics is N = 106. Deliverable D1(a): Use the stem function and plot the DT signal associated with the first 5 BPSK symbols. Make sure that the time-axis and the scaling of each sample is correct. (d) Consider Eb/N0 values in decibels (dB) in the range {−2, −1, 0, 1, ..., 10}. For each value in this range, generate a DT Gaussian noise waveform whose variance is adjusted according to the corresponding Eb/N0 in linear scale. Add this noise waveform to the DT signal waveform obtained at the end of step 1(c). Let us denote the resulting waveform as r[n]. ∗In other words, φ1(t) = √ 2 Eg g1(t) is the corresponding orthonormal basis function. †For convenience, we are using Eg to denote the energy of a CT baseband pulse as well as a DT baseband pulse. 1 ECE5312 WPI (e) Recall from the lecture that subject to the impulse response having a fixed energy, the SNR at the output of a filter acting on an input signal is maximized when the filter response is matched to the input. Implement a matched filter receiver to process r[n]. See Figure 4.2-8 for reference. Utilize the MATLAB function, intdump to integrate-and-dump the received waveform. The demodulation step for BPSK should be straight-forward considering the fact that we only require the sign of symbols at the output of the integrate-and-dump operation. Deliverable D1(b): Use the hist function and plot the pdf of r[n] after it has been processed through a matched filter for Eb/N0 = 1, 5 and 9 dB. For a fine resolution, generate histograms that show the distribution of r[n] over 200 bins. What is your interpretation of the results? (f) For each value of Eb/N0, count the number of symbols that have been erroneously demodulated and divide this number with N to give the experimental probability of error. Plot these values on a logarithmic scale. Use the function, semilogy for this purpose. On the same figure, plot the curve corresponding to the the theoretical probability of error obtained according to the formula: Pe,BPSK = Q ( √ 2Eb N0 ) Verify that these two curves overlap perfectly. Deliverable D1(c): Provide a plot showing the experimental probability of error and the theoretical probability of error vs Eb/N0 for this BPSK communication system. 2. A 16-QAM Communications System (a) In this part of the project, you will implement a 16-QAM communication system according to the CT-AWGN channel model depicted in Figure 4.1-1. (b) Similar to Figure 3.2-6 and similar to part 1(b), use DT baseband pulses, g1[n] = 4 ∑15 k=0 δ[n− kTs] and g2[n] = 4 ∑15 k=0 δ[n − kTs], where the sampling interval, Ts = 10 −4 seconds. Again, remember that Figure 3.2-6 corresponds to the generation of a real passband signal whereas in this project. You will need to adapt this diagram in order to simulate a complex baseband signal. (c) Similar to part 1(c), you will need to generate at least N = 106 symbols in order to observe the desired probability of symbol error characteristics. Deliverable D2(a): Use the stem function and plot the real and the imaginary parts of the complex-DT signal separately for the first 5 16-QAM symbols. Make sure that the time-axis and the scaling of each sample is correct. (d) Consider Eb/N0 values in decibels (dB) in the range {−2, −1, 0, 1, ..., 14}, (the number of Eb/N0 values is greater in this case). As before, for each value in this range, generate a DT Gaussian noise waveform whose variance is adjusted according to the corresponding Eb/N0 in linear scale. Add this noise waveform to the DT signal waveform obtained at the end of step 2(c). Let us denote the resulting waveform as r[n]. (e) Implement a matched filter receiver to process r[n]. The demodulation step for 16-QAM will involve the computation of minimum-distance for each observation at the output of intdump. 2 ECE5312 WPI See slide 5 of lecture-17 for reference. Deliverable D2(b): Provide a scatterplot of r[n] (i.e., plot the real part of r[n] on x-axis and the imaginary part of r[n] on y-axis) after it has been processed through a matched filter for Eb/N0 = 1, 5, 9 and 13 dB. What is your interpretation of the results? (f) Similar to part 1(f), for each value of Eb/N0, count the errors and divide this number with N to give the experimental probability of error. Plot these values using semilogy on a logarithmic scale. On the same figure, plot the curve corresponding to the theoretical probability of error obtained according to the formula: Pe,16−QAM ≈ 3Q ( √ 4Eb 5N0 ) Verify that these two curves overlap reasonably well. For higher values of Eb/N0, the curves will overlap perfectly. Deliverable D2(c): Provide a plot showing the experimental probability of error and theo- retical probability of error vs Eb/N0 for this 16-QAM communication system. Several Suggestions: • In order to generate random symbols according to a constellation, an easy-to-use function is randsrc. • The function, rectpulse applies rectangular pulse shaping to produce an output signal having the desired number of samples per symbol. • The function, randn generates Gaussian random values with mean, 0 and variance, 1. In order to generate N Gaussian random values with mean, m and variance, v2, we perform the following operation in MATLAB, m+ v. ∗ randn(1, N) • The function, qfunc produces values evaluated according to the CCDF of standard normal random variable. Project Submission: Submit the following via Canvas. • A report in .pdf format, not exceeding 6 single-sided pages, explaining your methodology, your code and summarizing the main results. The font-size must not be smaller than 10 points. You are encouraged to include block diagrams and any other plots (in addition to those indicated) necessary to explain your work. • Your well commented and properly indented final MATLAB code (a separate .m file for each part). Please include your name in the header. If you wrote any custom function, they should be included as well. Your code should run without errors. 3