Problem 2

advertisement
ACOE312 Data Communications and
Computer Networks
SOLUTIONS
Assignment No:
2
Absolute deadline for submitting the assignment: 15 Dec 2004
NO LATE SUBMISSIONS SHALL BE ACCEPTED
Problem 1
a) Name the parameters that determine the ability of a receiver to correctly identify and
interpret an incoming signal (4 marks)
-
Signal-to-noise ratio
Data rate
Bandwidth
Encoding Scheme
b) For the bit stream 011100101, sketch the waveforms for the following digital encoding
schemes
i.
Nonreturn to zero level (NRZ-L)
ii.
Nonreturn to zero inverted (NRZI)
iii.
Bipolar Alternate Mark Inversion (Bipolar-AMI)
iv.
Pseudoternary
v.
Manchester
vi.
Differential Manchester
Assume that the signal level for the preceding bit for NRZ-I was low; the most recent
preceding 1 bit (Bipolar-AMI) has a negative voltage; and the most recent preceding 0
bit (pseudoternary) has a positive voltage. You may use the following to ease your
sketching (12 marks).
0
1
1
1
NRZ-L
0
0
1
0
1
+V
0V
-V
+V
0V
-V
NRZI
(preceding bit was low)
+V
0V
-V
Bipolar-AMI
(preceding 1 bit is negative)
+V
0V
-V
Pseudoternary
(preceding 0 bit is positive)
Manchester
+V
0V
-V
Differential
Manchester
+V
0V
-V
Alternatively Diff
Manchester can be
sketeched as
1/ 6
c) Contrast all digital encoding schemes listed in (b) above, outlining their advantages
and disadvantages (12 marks).
Encoding
scheme
NRZ-L
Advantages





NRZ-I


Bipolar-AMI




Pseudoternary 


Manchester
and
Differential
Manchester
Disadvantages
Easy to engineer
Make efficient use of bandwidth
Easy to engineer
Make efficient use of bandwidth
More reliable detection of transition in  DC component
the presence of noise rather than to  Lack of synchronization capability
compare a value to a threshold level
In complex transmission layouts it is
easy to loose sense of polarity of the
signal
No loss of sync if a long string of ones  Not as efficient as NRZ
(zeros still a problem)
- Each signal element only represents
No net DC component
one bit
Lower bandwidth
- The line signal may take on one of
Easy error detection
3 levels
- Each signal element, which could
represent log23 = 1.58 bits bears
only one bit of information
No loss of sync if a long string of zeros •
Receiver must distinguish between
(ones still a problem)
three levels (+A, 0, -A) instead of two
No net DC component
in NRZ
Lower bandwidth
•
Requires approximately 3dB more
Easy error detection
signal power for same probability of bit
error (bit error for NRZ at a given SNR
is much less than that for multilevel
binary)
 Synchronization on mid bit transition  At least one transition per bit time and
(self clocking)
possibly two
 No dc component
 Maximum modulation rate is twice as
 Error detection (Absence of expected
that of NRZ
transition can be used to detect errors)  Requires more bandwidth
Problem 2
a) Define the modulation rate and write an expression which relates it with the bit rate.
What is the maximum modulation rate of a Differential Manchester encoded signal with a
bit rate of 2 Mbps? (4 marks)
Modulation rate, D, is the rate at which signal elements are generated, which is given by
the following expression
D=R/log2M,
where R=Data rate=bit rate and M=number of signal elements
For Differential Manchester Encoding, the minimum size signal element is a pulse of half
the duration of a bit interval. Hence maximum Modulation rate is twice the bit rate, i.e. 4
Mbaud.
2/ 6
b) Suppose a file of 75kBytes is to be sent over a transmission line at 16kbps.
i.
Calculate the overhead in bytes and time in using asynchronous communication.
Assume one start bit and a stop element of length 1 bit, and 8 bits to send the
byte itself for each character. The 8-bit character consists of all data bits, with no
parity bit. (6 marks)
For asynchronous transmission, each character is transmitted with a start, stop and
parity bit, i.e. total 3 bits per character.
Each character has 8-bits of data = 1 Byte. For a file of 75kBytes, it means that 75000
characters are to be transmitted. So,
Total overhead in bits = 3 bits/character x 75000 characters = 225000 bits =
28.125kBytes
Since line rate is 16kbps, it means that each bit has a duration of 1/16000 = 62.5μs. The
overhead per character is 3 bits * 62.5μs = 187.5μs.
So, Total overhead in time = 187.5μs/character x 75.000 characters = 14.06 s
ii.
Calculate the overhead in bytes and time in using synchronous communication.
Assume that the data are sent in frames. Each frame consists of 1500 characters
of 8-bits each and an overhead of 64 control bits per frame. (6 marks)
For synchronous transmission, each frame has control info of 64 bits.
Each frame consists of 1500 characters of 8-bits each (1 Byte). For a file of 75kBytes, it
means that 75000 characters are to be transmitted, i.e. 75000/1500=50 frames in total.
Total overhead in bits = 64 bits/frame x 50 frames = 3.2kbits = 400 Bytes
Since line rate is 16kbps, it means that each bit has a duration of 1/16000 = 62.5μs.
So,
Total overhead in time = 3.2kbits x 62.5μs = 0.2s
iii.
What would the answers to parts (2bi) and (2bii) be for a file of 1Mbyte? (6
marks)
For a file of 1Mbyte, the answers would change by 13.333 times more, i.e.
For asynchronous, total overhead is 375kBytes or 187.5 seconds
For synchronous, total overhead is 5.333kBytes or 2.667 seconds
iv.
What would the answers to parts (2bi) and (2bii) be for the original file of
75kBytes except at a data rate of 48kbps? (6 marks)
If data rate is 48kbps, then each bit duration is 1/48000 = 20.833μs. So, for a file of
75kBytes = 75000 characters
For asynchronous, total overhead is still 225kbits but the overhead in time is now
225000bits x 20.8333μs = 4.6875 seconds
For synchronous, total overhead is still 3.2kbits but the overhead in time is 3200bits x
20.833μs = 66.667ms
Problem 3
a) Differentiate between stop-and-wait and sliding window flow control techniques with
respect to their operation and suitability for sending large blocks of data at high rates.
Also, explain how link utilization can be improved by means of piggybacking (10 marks).
The operation of stop-and-wait flow control is as follows:
— Source transmits a frame
— Destination receives the frame and replies with acknowledgement (ACK)
— Source waits for ACK before sending next frame
— Destination can stop flow by not sending ACK
3/ 6
The stop-and-wait flow control technique works well when a message is sent in a few
large frames. However, the source may break up a large block of data into smaller blocks
and transmit the data in many frames, thus causing fragmentation.
Stop-and-wait flow control becomes inadequate with the use of multiple frames for a
single message since only one frame on the link at a time can be in transit. As a result, it
provides inefficient line utilization for very high data rates over very long distances
between sender and receiver. Efficiency can be improved by allowing multiple frames to
be in transit at the same time, as is the case of sliding window flow control, which
operates as follows:
— Receiver allocates buffer space for W-frames
— Transmitter can send up to W frames without waiting for any ACK
— Each frame is numbered (sequenced) to keep track of which frames have been
acknowledged. Sequence number is of bounded size of field (k) in frame, where the
maximum window size is 2k-1.
— ACK includes number of next frame expected
Piggybacking is a technique, which operates in duplex operation, that temporarily delays
outgoing acknowledgements so that they can be hooked onto the next outgoing data
frame. It works as follows:
—If a station has no data to send, it sends a separate acknowledgement frame
—If a station has data to send but no acknowledgement to send, then it sends last
acknowledgement number again
—If a station has data to send and an acknowledgement to send, then it sends both
together in one frame, saving bandwidth, which means that improves link utilization.
b) A channel has a data rate of 16kbps and a propagation delay of 36ms.
i.
For what range of frame sizes does stop-and-wait provide a maximum link
utilization not exceeding 25%? (6 marks)
It is given that data rate = 16kbps, hence bit duration = 1/16000 =62.5μs
Time to transmit the frame is tframe=frame_size x bit_duration
Also, tprop=36ms. For stop-and-wait flow control, efficiency is equal to
U = 1/(1+2a) where a=tprop/tframe
Solving this equation with respect to a, yields a=0.5[(1/U) – 1]
For U < 25%=0.25, then a > 0.5[(1/0.25) –1] => a > 1.5
Since a=tprop/tframe then tprop/tframe > 1.5 => tframe < 0.667 tprop
But frame_size = tframe/bit_duration =>
Frame_size < 0.667 tprop/bit_duration = 0.667 x 36ms/62.5μs =384
So, in order to have a maximum link utilization not exceeding 25%, frame size must be
less than 384 bits long.
ii.
For what range of frame sizes does sliding window flow control with a window size
of 31 give an efficiency of at least 50%? (6 marks)
Maximum link utilization for window flow control is
U=1 for W2a+1
U=W/(2a+1) for W<2a+1
Since W=31 and U 50%=0.5 then solving U=W/(2a+1) with respect to a yields
a<(2W-1)/2. Since a= tprop/tframe then tframe > 2tprop/(2W-1)
Substituting for tprop and W, we find tframe, ie tframe > (2 x 36ms)/(2x31-1) => tframe > 1.18ms
But frame_size = tframe/bit_duration => frame_size > 1.18ms/62.5μs = 18.9
So, in order to have an efficiency of at least 50%, frame size must be equal or greater
than 19 bits long.
4/ 6
Problem 4
a)
How is interference avoided by using Frequency Division Multiplexing (FDM)? (6
marks)
In FDM a number of signals can be carried simultaneously if each signal is
modulated onto a different carrier frequency and the carrier frequencies are
sufficiently separated that the bandwidths of the signals do not overlap. Each
modulated signal requires a certain bandwidth centered on its carrier frequency,
referred to as a channel. Interference is prevented since the channels are separated
by guard bands, which are unused portions of the spectrum.
b)
The information in four analog signals is to be multiplexed and transmitted over a
telephone channel that has a bandpass from 400Hz to 3.2kHz. Design a
communication system that will allow the transmission of these four sources over
the telephone channel fully occupying its bandwidth using FDM with single-sideband
subcarriers. In your design you should show appropriate block diagrams for the
transmitter, the receiver, and spectrum, clearly identifying all frequencies used.
(12 marks)
f1
400
m1(t)
m2(t)
f2
750
1100
1450
Subcarrier modulator, f1
Subcarrier modulator, f2
m3(t)
Subcarrier modulator, f3
m4(t)
Subcarrier modulator, f4
FDM signal
f3
1800
Main
receiver
Σ
2150
f4
2500
2850
Composite
baseband
signal
Transmitter fc
3200
FDM signal
transmitter
m1(t)
Bandpass filter, f1
Demodulator, f1
Bandpass filter, f2
Demodulator, f2
m2(t)
Bandpass filter, f3
Demodulator, f3
m3(t)
Bandpass filter, f4
Demodulator, f4
m4(t)
receiver
5/ 6
f (Hz)
c)
Explain by means of appropriate spectrum diagrams how it is possible for a user
with ADSL access line to surf through the Internet and download files while at the
same time talking over the telephone. (4 marks)
ADSL allocates the lowest 20kHz spectrum of FDM for POTS service and the rest
of the upper spectrum for high rate data access. This is illustrated in the following
diagram, which shows the useful frequency ranges for ADSL:
POTS
download
upload
20
25
200 250
6/ 6
1000
frequency (kHz)
Download