Transcript Week3_1

Physical Layer Continued
Review
• Discussed how to design the communication scheme depending on the
physical mediums – pulling voltage up and down for wired connections
• Mentioned some important terms
– Symbol: usually occupies a fixed length of time, carrying one or multiple bits.
– Link speed: usually measured by bps (bits per second)
• Discussed bandwidth and noise, and their influence on the maximum
speed that can be achieved by the link. Roughly speaking,
– Bandwidth determines how fast can we send symbols. For example, if the link
does not allow the sudden change from 0v-5v, such a change will be
smoothed out. So (roughly speaking) you cannot send symbols with durations
shorter than the smoothing period.
– Noise determines how close the constellations can be. For binary systems, the
constellation lies in a line and is {-1, 1} where -1 is 0V and 1 is 5V, for example.
This is called BPSK. The constellation can also be in a plane and take complex
numbers when we send two voltages simultaneously, one representing the
real component and the other representing the imaginary component, like
{1+j, -1+j, -1-j, 1-j} , which is called QPSK. More points on the plane will result
in something like 16QAM, 64QAM, 256QAM.
More on Bandwidth
• Let’s dig a little deeper about bandwidth.
• First Fact: Bandwidth is measured by Hz, so it
is a frequency concept.
Frequency
• Second Fact: Most of the signals we care about in
communications can be represented by the
summation of sine waves on different
frequencies at certain magnitudes -- Fourier
transform.
• For example,
http://privon.com/blog/wp-content/uploads/2007/07/function_sums.jpg
• So, when sending any signal waveform, think it as
sending a whole bunch of sine waves all
together.
Frequency
• Third Fact: Most of the systems do NOT respond to all
frequencies. What usually happens is that a system
will respond only to a continuous range of frequencies.
• For example, the human ear can pick up something like
[0,20000]Hz. Our ears will not respond to a sound (a
sine wave) produced by the dolphin on 120,000 Hz.
• So, we say sine waves on frequency higher than
20000Hz are filtered out by our ears, and our ear is a
low pass filter with a cutoff frequency of 20000Hz, or,
the bandwidth of the human mouth to human ear link
is no more than 20000Hz.
Bandwidth
• So, for communication systems, the
bandwidth is defined as the range of
frequencies it passes.
• The wider this range, i.e., the larger the
bandwidth, the signals are allowed to change
faster.
Exercise
• Suppose we are sending a signal
cos(25000πt)cos(5000πt). It then passes through
a Low Pass Filter with cut-off frequency of
12500Hz. What will be the signal coming out of
the LPF?
• Note that cos(25000πt)cos(5000πt)=1/2[cos(20000πt)+cos(30000πt)],
so, while the frequency of the first sine wave is
10000Hz and the second is 15000Hz. So only the
first one will stay.
Nyquist Theorem
• If the bandwidth is limited to B, in the ideal case when
there is no noise, how fast can you send/receive symbols?
– Note that the channel capacity is infinity because each symbol
can carry infinite number of bits
• Nyquist Theorem says that it only makes sense for you to
send/receive symbols at a speed of 2B – if B is 4KHz, you
send/receive 8K symbols per second – the baud rate is 8K
per second.
• Why? If a signal is band-limited by BHz, by taking 2B
samples per second, you can completely reconstruct it.
Nothing more can be reconstructed, so no point of sending.
More on Noise
• In communication systems, we usually take a
sample from the received waveform to
determine what the transmitted symbol is.
• With noise, the signal is added with noise.
• For example, let’s say 0 is 0 volt 1 is 5 volts. When
we send a `0’, the receiver could receive 0.6v,
when we send `1’, the receiver could receive 4.2v.
The receiver has to output a bit to the upper
layer. So the problem is, given the received
voltage, what bit should be output?
More on Noise
• It’s all about guessing, because you don’t
know what the noise is when this symbol is
sent as noise is random.
• You may know some statistics of the noise,
based on which you make your best guess.
• For example, suppose you know that very
rarely the noise exceeds 2.5 volts. If you
received a 2.2 volts, you would guess it to be 0
or 1? What is the chance that you got it
right/wrong?
Detection
• Detection – given a received signal, determine
which of the possible original signals was sent.
There are finite number of possible original
signals (2 for the binary case – 0 or 1)
Detection
• Detection really depends on the noise. In the binary
case, if we know that noise takes values -3V and 2V
with probability 0.7 and 0.3, respectively. How would
you design the detector?
• If send 0V, two possible outcomes: -3V, 2V. Prob: 0.7
and 0.3.
• If send 5V, two possible outcomes: 2V, 7V. Prob: 0.7
and 0.3.
• So, a total of only 3 possible outcomes. No ambiguity
when received -3V and 7V. What should we say when
received 2v? What is the probability that we give the
wrong detection result?
Maximum Likelihood Detection
• There are two inputs, x1 and x2. Noise is n.
What you receive is y.
• If I sent x1, you receive y=x1 + n. If I sent x2,
you receive y=x2+n. You don’t know
– what I sent
– how large n is.
• The rule is: if P(Y=y|X=x1) > P(Y=y|X=x2),
you say I sent x1, else you say I sent x2.
Maximum Likelihood Detection
• n follows some probability distribution known
beforehand.
• Note that P(Y=y|X=x1) = P(n=y-x1) and P(Y=y|X=x2)
= P(n=y-x2)
• So the detection rule is
if P(n=y-x1)>P(n=y-x2)
output x1
else
output x2
• This will tell us for any received y whether to guess as
x1 or as x2. That’s all.
Some Comments
• When implemented in software, the detector
will be
int BPSKDector(float sample)
{
return (sample > 0) ? 1 : 0;
}
• The likelihood function in this example is
simply the probability function. In other cases,
it could be different, like the log of the
probability function, such that the calculation
is simpler.
Beyond MLD – MAP
• Wait, what if you know that x1 is more likely to be
sent than x2?
• Let’s say that the probability that is sent is p1 and is
p2, where p1!= p2.
• The detection rule should be changed to
if p1 P(n=y-x1)> p2 P(n=y-x2)
output x1
else
output x2