CS 336 - Exercise 2 -- The Physical Layer + Error Detection

Due: Wednesday, Feb. 18, 1998
This assignment is a combination of problems about aspects of the physical layer (now that you are experts on the subject) and problems involving error correction/detection codes (to get you ready for the discussion of that topic).

First, I must admit I goofed. I should have included §3.3 of Shay in the readings associated with last weeks assignment. There is some material on multiplexing in that section.

For the coming week(s), you should be reading sections of chapters 4 and 5. First we will discuss coding techniques for error detection and correction. This is covered in §4.1 through §4.4 of the text. Then we will look at protocols for flow control and the retransmission of damaged frames. To prepare for this you should begin to read sections 5.1 through 5.3. (Given that Friday is Winter Carnival, I suspect we won't get to the material in Chapter 5 until the following week.)

  1. When I first introduced modulation I suggested that if one wanted to transmit a digital signal d(t) using amplitude modulation it might be better to use sin(2 f t) (d(t)+1)/2) rather than sin( 2 f t) d(t). We discussed several reasons this might be preferable. One we didn't discuss at the time, however, is that reducing the difference between the two amplitudes used might reduce the spectrum required by the signal.

    Intuitively, one would expect that the more one distorts a carrier wave while modulating it, the broader the spectrum of sine waves that account for the bulk of the signal's strength will become. We have seen that this is true for frequency modulation. The spectrum required to transmit an FM signal becomes broader as the signal rate increases and also as the separation between the frequencies used for "0" and "1" increases.

    I'd like you to investigate whether reducing the amplitude in a amplitude modulated signal might reduce the spectrum required by determining the Fourier series of an amplitude modulated signal. You should assume that the digital signal used to produce the modulated signal is 01010101... You should assume that "0" is represented by a sine wave of amplitude A0 and that "1" is represented by a wave with amplitude A1.

    After determining the coefficients for this waves Fourier series, discuss the impact the size of the difference between the two amplitudes has on the spectrum required when transmitting the signal.

  2. You've seen a lot of sine waves recently. In discussing modulation, I assumed the carrier waves were sine waves. Fourier's result shows that just about all waves can be seen as sums of sine waves. Sine waves seem to be very important. You should be wondering why.

    The answer is basically that transmission lines do not distort sine waves; they only delay and attenuate them. If you transmit a square wave through a cable and look at what arrives at the other end you will find that the receiver does not see a square wave. Instead the pulses will be spread out and rounded by dispersion. However, if you transmit a sine wave through the same cable, a sine wave of the same frequency will be received at the other end. How long it takes to reach the other end and how attenuated it is when it reaches the other end will depend on its frequency, but it will still look like a sine wave. This makes sine waves special.

    Transmission cables preserve the shape of sine waves as just described as long as they possess two simpler properties:

    Linearity:
    If r1(t) is the signal received when signal s1(t) is transmitted and r2(t) is the signal received when signal s2(t) is transmitted, then

    • The signal received if the signal s1(t) + s2(t) is transmitted will be r1(t) + r2(t).

    • The signal received if the signal k s1(t) is transmitted will be k r1(t).

    Time invariance:
    If r(t) is the signal received when signal s(t) is transmitted, then the signal r(t - d) will be received if the signal transmitted is s(t - d)

    What I would like you to do for this problem is prove that this is true. That is, assuming only the linearity and time invariance properties just defined, prove that if s(t) = sin(2 f t), then the signal received must be r(t) = A sin(2 f t + d) for some constants A and d. Note, this is not a trivial consequence of linearity and time invariance, since if we replaced the sine function with almost any other function (a square wave in particular), it would not be true. Given the relationship between sine and cosine waves, it is fine if you actually show that the output is either a simple sine wave of the form

    r(t) = A sin(2 f t + d )
    or a cosine wave of the same form or a sum of a sine and cosine:
    r(t) = As sin(2 f t + ds) + Ac cos(2 f t + dc)
    All of the above are really just sine waves.

    Hints: Use the formula for the sine of a sum:

    sin( a + b ) = sin(a) cos(b) + sin(b) cos(a)
    to calculate the output r'(t) produced in response to the input s'(t) = s(t + k). Use the linearity of the transmission channel to express r'(t) in terms of the still unknown output function r(t). Now, consider r'(t) for the two cases k = -t and k = (1)/(4f) - t. This will give you two equations that you can solve for r(t). The final expression should have the desired form, although it will be expressed in terms of two unknown (but constant) values of r(t). For this problem, you may also find it helpful to recall that sin(-x) = - sin(x) and cos(-x) = cos(x).

  3. Complete exercise 7 at the end of Chapter 4.

  4. Consider a code based on even parity in which four parity bits are associated (somehow) with three data bits. Suppose that three of the code words are 1001011, 0101101 and 0011110 (with the data bits preceding the parity bits). Find the rule used to generate each of the parity bits. What is the minimum number of bits that must be damaged to convert one valid code word into another valid code word.

Computer Science 336
Department of Computer Science
Williams College