ELEC 471, Fall 2010
Prof. Rich Kozick

Homework 4

Date Assigned: Wednesday, Sept. 15, 2010
Date Due: Friday, September 24, 2010
(due on Friday so that I can help you in class on Wednesday, Sept. 22 at 3:00 PM)

  1. Reading: Please begin reading Chapter 2, Sections 2.1 - 2.3. We will discuss this material in class after we complete the digital communication example.

  2. We will meet in room Dana 221 on Wednesdays at 3:00 for the rest of the semester.

  3. Instead of a quiz on Wednesday, Sept. 22 at 3:00, I will look at your progress on the simulation program described in the next item. You should come to class on Sept. 22 with a good start on the program. (You will receive credit for a quiz grade if you come to class with a start on the program.) If you are finished, then you can leave after showing me your program. If you need help, I will provide help during the class on Sept. 22.

  4. Consider the following modification to the digital communication system discussed in class. This question is explored further in the simulation in the next item.
    Suppose that each bit is transmitted three times, with independent noise added on each transmission. Make your "overall" decision for each bit as the majority of the three individual decisions. What is the probability of a bit error for this system? You can analyze this system similarly to Example 1.41 in the text. Or, you can just look at the sample space of repeating the experiment three independent times. What are the probabilities of the outcomes in this sample space? Which outcomes correspond to an error when the majority rule is used?

  5. Each student should individually implement MATLAB simulations of the digital communication system that we discussed in class. Please submit your work in class on Friday, Sept. 24, and email your Matlab program to me before class.

    Recall that the observations at the receiver are modeled as

    x = s + n ,

    where the signal (s) and noise (n) are independent, and where s, n take on values with the following probabilities:

    n       P[n]    s     P[s]
    --      ----    --    ----
    
    -2      0.1     -1    0.5
    -1      0.2     +1    0.5
     0      0.4
    +1      0.2
    +2      0.1
    

    We discussed various "decision rules" in class, where the purpose of a decision rule is to decide whether a -1 or a +1 was transmitted based on the observation of the "noisy received signal," x = s + n. In class, we also calculated the probability of a bit error (also called bit error rate or BER) using mathematical analysis. Now we will use MATLAB to simulate the digital communication system and evaluate the BER for three situations, as described below.

    1. Simulate the system with a decision rule that always chooses signal +1 when the received data is x = 0. Recall that we showed in class that the BER should be 0.2 for this case. How many bit decisions must you simulate in order to get an accurate estimate of the BER? Compare your simulated BER with the analytical BER of 0.2.

      Sample MATLAB programs digcom1.m and digcom2.m are available to help you get started. These are the programs that we discussed in class.

    2. Modify your simulation program so that when x = 0 is received, your decision rule randomly chooses between +1 and -1, where +1 is chosen with probability r and -1 is chosen with probability 1-r. Run your program for the cases r = 1, 0.5, and 0. Does changing r have any effect on the BER? Explain how the analytical BER is calculated for this case, and compare your simulated BER with the analytical BER.

    3. Next, modify your simulation program from the previous item so that each bit is transmitted three times, with independent noise added on each transmission. Make your "overall" decision for each bit as the majority of the three individual decisions. (You can do the majority conveniently in MATLAB using the median function, as in the sample program digcom2.m.)

      What is the simulated BER for this system, for the cases of r = 1, 0.5, and 0 in your randomized decision rule? Does the BER vary with r?
      Compare your simulated BER with the analytical BER that you derive in item 6 below. Be sure to do enough runs in your simulation so that you can accurately compare the simulated and analytical BERs.

      Optional: If you would like, repeat this exercise using five transmissions of each bit, with majority decisions, and compare simulated and analytical BERs. (This is not required.)

    For each of these three simulation cases, please email your MATLAB programs to me. Then submit written materials that present the BER results from running your programs (including a listing of the number of "trials" or runs that were performed) and compare your simulated BER with the analytical BER. You should explain clearly and completely how the analytical BER is calculated for each case. If you do things correctly, you should obtain excellent agreement between the simulated and analytical BERs!

  6. Derive a formula for the analytical BER as a function of r for the third simulation case above: each bit is transmitted three times, the "randomized" decision rule is used for each bit decision, and the "overall" decision is the majority of the three bit decisions. Submit your analysis with the MATLAB results on Friday, Sept. 24.

    Hint: Derive the conditional probability of a bit error given that s = -1 was transmitted (as a function of r), and do the same given that s = +1 was transmitted. Then you should be able to combine these two conditional BERs to obtain the "total" BER, which will be a function of r.

Thank you and have fun!