ELEC 471, Spring 2002
Prof. Rich Kozick

Homework 4

Date Assigned: Thursday, February 7, 2002
Date Due: Thursday, February 14 and Tuesday, February 19, 2002

*** Due date for Matlab part changed to February 26, 2002 ***

  1. Exam 1 will be on Thursday, February 21. The topics for the exam will include Chapter 1 of the text and the digital communication application.

  2. Reading: Please continue studying Chapter 1, particularly Sections 1.8 and 1.9.
    As you read Section 1.9, consider the following modification to the digital communication system. This question is explored further in item 5 below.
    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? For some hints on the analysis of this system, refer to Section 1.9, and Example 1.36 in particular. 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? From this, you should be able to compute the probability of an error.

  3. Please solve the following problems in the text, and submit your solutions on February 14:
    Chapter 1: 1.8.2, 1.9.1, and 1.9.6.
    (We will have a short quiz on February 14.)
  4. Each student should individually implement MATLAB simulations of the digital communication system that we discussed in class. Please submit your work on Tuesday, February 19.

    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 on February 7.

    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 5 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 submit printouts of your MATLAB programs, 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!

  5. 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.

    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!