Chapter 6 · 8 hours
Baseband Digital Data Transmission
IOE past exam questions
Past questions and answers
66 questions set from this chapter, 9 of them more than once. Most asked first.
- Asked 5 times
- 2081 Bhadra (CS II) · 4 marks
- 2076 Chaitra (CS II) · 5 marks
- 2072 Kartik (CS II) · 4 marks
- 2072 Chaitra (CS II) · 2.5 marks
- 2069 Chaitra (CS II) · 4 marks
Write a short note on the eye diagram.
Answer
An eye diagram is an oscilloscope display of a received digital baseband signal. It is made by overlaying many bit intervals on top of each other: the scope is triggered by the symbol clock and the sweep is set to one or two symbol periods. The pattern looks like an eye. Its shape shows at a glance how much ISI and noise the signal has.
____________ ____________
/ \ / \
/ .------. \ / .------. \
| ( open ) X ( open ) |
\ '------' / \ '------' /
\____________/ \____________/
^ ^
| best sampling instant
eye opening (noise margin)
What the eye shows:
- Eye opening (height): the noise margin. A wider vertical opening means more noise can be tolerated.
- Eye width: the time range in which the signal can be sampled without errors.
- Best sampling time: where the eye opening is greatest.
- Slope of the sides: how sensitive the system is to timing error. Steeper sides mean more sensitive.
- Thickness of the crossing (zero-crossing spread): the amount of timing jitter.
- Distortion at the sampling time: the spread of the lines at the top and bottom shows the amount of ISI.
Use: If ISI or noise is severe, the eye closes, and errors become likely. Engineers use the eye diagram to adjust equalisers, choose pulse shaping (e.g. raised-cosine roll-off), set the decision threshold and sampling time, and quickly check the quality of a link.
- Asked 3 times
- 2079 Bhadra (CS II) · 5 marks
- 2075 Chaitra (CS II) · 5 marks
- 2072 Chaitra (CS II) · 2.5 marks
Write a short note on M-ary baseband communication system.
Answer
In an M-ary baseband system, the transmitter does not send one bit per pulse. It groups bits into one symbol and sends one of distinct pulse amplitudes (M-ary PAM) for each symbol. Binary transmission is the special case .
Working
- The bit stream is split into groups of bits, e.g. gives 2 bits per symbol.
- Each group is mapped (usually with Gray code) to one of the levels times .
- The receiver samples each symbol and compares it with thresholds to decide the level, then maps the level back to bits.
4-ary PAM (Gray coded)
+3A -- 10
+1A -- 11
-1A -- 01
-3A -- 00
bits 10 01 11 00 -> levels +3A -1A +1A -3A
Key relations
So for the same bit rate, the needed bandwidth falls by a factor of . The bandwidth efficiency rises to b/s/Hz (Nyquist).
Advantages
- Higher data rate in a band-limited channel (e.g. telephone lines, 2B1Q in ISDN).
- Lower symbol rate, so less ISI and slower symbol timing.
Disadvantages
- For the same peak power, the levels are closer together, so the noise margin is smaller and the error probability rises. Keeping the same error rate needs more transmit power (roughly 6 dB more for each doubling of at large ).
- The receiver needs more decision thresholds and accurate gain control.
M-ary signalling therefore trades power for bandwidth.
- Asked 2 times
- 2079 Chaitra (CS I) · 2×5 marks
- 2067 Shrawan (CS I) · 5×2 marks
Define unipolar, polar, bi-polar, unipolar RZ and Manchester line codes.
Answer
Line codes are electrical waveforms used to represent binary data for transmission over a baseband channel. Each code below is shown for the example bits 10110, with bit period and level .
Unipolar (NRZ) code
Binary 1 is sent as for the full bit period, and binary 0 as zero voltage. It is simple, but it has a DC component, and long strings of 1s or 0s carry no timing information.
Unipolar NRZ
1 0 1 1 0
+V ────| |───────|
0 |───| |───
Polar (NRZ) code
Binary 1 is sent as and binary 0 as for the full bit period. There is no DC component for equally likely bits, and it has the best noise immunity of these codes for a given power. Long runs still give no transitions.
Polar NRZ
1 0 1 1 0
+V ────| |───────|
-V |───| |───
Bipolar (AMI) code
Binary 0 is sent as zero voltage. Binary 1s are sent as pulses of alternating polarity, , usually half-width (RZ). It has no DC component and narrow bandwidth, and two 1s of the same polarity in a row show an error has occurred. A long run of 0s loses timing; HDB3 and B8ZS solve this.
Bipolar (AMI, RZ)
1 0 1 1 0
+V ──| |─|
0 |─────| |─| |─────
-V |─|
Unipolar RZ code
Binary 1 is sent as for the first half of the bit, then returns to zero. Binary 0 is zero for the whole bit. Each 1 gives a transition that helps timing, but the bandwidth is double that of NRZ and there is a DC component.
Unipolar RZ
1 0 1 1 0
+V ──| |─| |─|
0 |─────| |─| |─────
Manchester (split-phase) code
Each bit has a transition at its middle. Binary 1 is for the first half and for the second half; binary 0 is the reverse. It has no DC component and is self-clocking, which is why it is used in 10 Mb/s Ethernet. The cost is double the bandwidth of NRZ.
Manchester
1 0 1 1 0
+V ──| |───| |─| |─
-V |───| |─| |───|
- Asked 2 times
- 2080 Baisakh (CS II) · 6+4 marks
- 2075 Asoj (CS II) · 6+4 marks
Explain Shannon Hartley channel capacity theorem and its implication and theoretical limits. Show that channel capacity is 1.44S/N₀, when channel bandwidth tends to infinity.
Answer
Shannon–Hartley theorem
The Shannon–Hartley theorem gives the channel capacity : the highest bit rate that can be sent over a band-limited channel with additive white Gaussian noise (AWGN) with an arbitrarily small error probability.
where is the bandwidth (Hz), the average signal power, and the two-sided noise power spectral density.
If the information rate , a coding scheme exists that makes the error probability as small as we like. If , errors cannot be made arbitrarily small, whatever coding is used.
Implications
- Bandwidth–SNR trade-off: the same capacity can be reached with a wide band and low SNR (e.g. spread spectrum) or a narrow band and high SNR (e.g. M-ary QAM).
- Capacity grows linearly with B but only logarithmically with S/N. Doubling the power adds only about b/s at high SNR.
- It gives a benchmark: practical modems and codes (turbo, LDPC) are judged by how close they come to .
- It proves that error-free communication is possible over noisy channels with proper coding. It does not say how to build the code.
Theoretical limits
- Ideal system: . Writing :
- As (infinite bandwidth), , i.e. −1.6 dB. This is the Shannon limit: below it, no error-free transmission is possible at any bandwidth.
- Increasing bandwidth alone cannot give unlimited capacity, because noise power also grows (shown below).
Capacity with infinite bandwidth
Let , so . As , :
using and .
So even with infinite bandwidth, the capacity stays finite at b/s. Capacity can be raised only by raising the signal power or lowering the noise density.
- Asked 2 times
- 2074 Asoj (CS II) · 4+3+3 marks
- 2072 Chaitra (CS II) · 2+6 marks
Explain intersymbol interference (ISI) in baseband digital communication system with derivations. Also explain the ideal and practical solutions of ISI.
Answer
Intersymbol interference (ISI)
ISI is the spreading of each transmitted pulse beyond its own symbol interval because the channel's bandwidth is limited. Tails of earlier and later pulses then add to the sample of the current symbol, which can cause decision errors.
Derivation. The baseband PAM signal at the receiver filter output is
where are the symbols, is the overall pulse shape (normalised so ) and is noise. Sampling at :
The middle term is the ISI. It is zero only when for all .
pulse k-1 pulse k pulse k+1
/\ /\ /\
___/ \___...___/ \___...___/ \___
tails overlap at sampling
instants -> ISI
Ideal solution: Nyquist (sinc) pulse
Nyquist criterion for zero ISI
If is the overall pulse (transmit filter, channel and receive filter), ISI is zero when
In the frequency domain this is
That is, copies of the pulse spectrum shifted by multiples of must add up to a flat spectrum.
The ideal solution uses an ideal rectangular spectrum of bandwidth :
This pulse is zero at every (), so ISI is zero. It needs the minimum bandwidth (the Nyquist bandwidth).
It is not practical because:
- the brick-wall filter cannot be built, and
- the sinc tails decay only as , so a small timing error causes large ISI.
Practical solution: raised-cosine spectrum
The spectrum is given a gradual cosine roll-off from to , with roll-off factor ():
- It still has zeros at all , so ISI is zero.
- The tails decay as , so it tolerates timing error well.
- The filter can be built. The cost is extra bandwidth: needs , and needs .
Other practical remedies are equalisers (e.g. a tapped-delay-line zero-forcing equaliser) to correct channel distortion, and correlative (duobinary) coding, which allows controlled ISI at the Nyquist bandwidth.
- Asked 2 times
- 2073 Shrawan (CS II) · 4 marks
- 2070 Chaitra (CS II) · 4 marks
Given the binary sequence 1011001010 represent it in Polar NRZ, Polar RZ, Manchester and AMI codes.
Answer
Bit sequence: 1 0 1 1 0 0 1 0 1 0, bit period , levels . Each bit is 4 characters wide in the drawings.
Conventions used: Manchester sends 1 as a +V half followed by a −V half, and 0 as −V then +V (Lathi/Haykin; the IEEE 802.3 convention is the opposite). AMI sends alternate 1s as half-width +V and −V pulses, starting with +V, and 0 as no pulse.
Polar NRZ (1 → +V, 0 → −V, full bit)
1 0 1 1 0 0 1 0 1 0
+V ────| |───────| |───| |───|
-V |───| |───────| |───| |───
Polar RZ (1 → +V, 0 → −V, for half bit, then 0)
1 0 1 1 0 0 1 0 1 0
+V ──| |─| |─| |─| |─|
0 |─| |─| |─| |─| |─| |─| |─| |─| |─| |─
-V |─| |─| |─| |─| |─|
Manchester
1 0 1 1 0 0 1 0 1 0
+V ──| |───| |─| |─| |───| |───| |─
-V |───| |─| |───| |─| |───| |───|
AMI (bipolar RZ)
1 0 1 1 0 0 1 0 1 0
+V ──| |─| |─|
0 |─────| |─| |─────────| |─────| |─────
-V |─| |─|
AMI pulse polarities for the 1s: + − + − + (the 0s are 0).
- Asked 2 times
- 2072 Kartik (CS II) · 2+2+4 marks
- 2071 Shrawan (CS II) · 2+2+6 marks
What is ISI? State Nyquist pulse shaping criteria for zero ISI. Explain duo-binary encoding with example.
Answer
ISI
Intersymbol interference (ISI) is the overlap of a pulse with the neighbouring symbol intervals. A band-limited channel (or filter) spreads each pulse in time, so the tails of nearby pulses add to the sample of the current symbol:
The summation term is the ISI. It closes the eye diagram and raises the bit error rate.
Nyquist criterion for zero ISI
If is the overall pulse (transmit filter, channel and receive filter), ISI is zero when
In the frequency domain this is
That is, copies of the pulse spectrum shifted by multiples of must add up to a flat spectrum.
- Ideal Nyquist pulse: with bandwidth (the minimum possible). It cannot be built, and its slow tails are sensitive to timing error.
- Raised-cosine pulse: bandwidth , . It still gives zero ISI, its tails decay fast, and it can be built.
Duobinary encoding
Duobinary signalling (a correlative-level coding scheme) adds each binary symbol to the one before it. This brings in a controlled amount of ISI that the receiver knows and can remove, and in return the data can be sent at b/s in the minimum Nyquist bandwidth with realisable filters.
Encoder: with ,
This is equal to passing through . With the ideal Nyquist filter, the overall response becomes
This is a smooth half-cosine, which is easy to approximate with a real filter.
b_k->[Precoder]->[2d-1]-a_k-+---->(+)-c_k->[LPF]-> out
d_k=b_k XOR d_k-1 | ^
+-[Tb]-+
Decoder (without precoding): . One wrong decision then spreads to the bits that follow (error propagation).
Precoding removes this. Use and send . Then the receiver decides each bit on its own: , and .
Example: input = 1011001, with initial reference (so ).
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 0 | 1 | |
| 1 | 1 | 0 | 1 | 1 | 1 | 0 | |
| +1 | +1 | −1 | +1 | +1 | +1 | −1 | |
| 0 | +2 | 0 | 0 | +2 | +2 | 0 | |
| Decision (, else 0) | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
The decoded sequence 1011001 equals the input. Each bit is decided on its own, so there is no error propagation.
- Asked 2 times
- 2072 Chaitra (CS II) · 2+3 marks
- 2071 Chaitra (CS II) · 1+3 marks
Explain Shannon channel capacity theorem. Write down theoretical limitations of this theorem.
Answer
Shannon channel capacity theorem
For a channel of bandwidth Hz with additive white Gaussian noise, the maximum rate of error-free information transfer is
where is the signal-to-noise power ratio, with . If the information rate , suitable coding can make the error probability as small as desired. If , it cannot. Example: a telephone channel with kHz and dB (1000) has kb/s.
Theoretical limitations
- It gives a limit, not a method. It proves good codes exist but does not show how to build them. Reaching needs very long code words, so delay and complexity become very large.
- Infinite bandwidth gives finite capacity: as , , because noise power grows with bandwidth.
- Shannon limit: reliable transmission needs (−1.6 dB), even with unlimited bandwidth.
- Only for AWGN. It assumes Gaussian, white, additive noise and a linear, band-limited channel. Fading, impulse noise, interference and non-linearity are not covered.
- It assumes Gaussian-distributed signals and average power limits. Real systems with fixed constellations fall short of .
- Capacity grows only logarithmically with SNR, so raising power gives diminishing returns.
- Asked 2 times
- 2072 Chaitra (CS II) · 4 marks
- 2071 Chaitra (CS II) · 4 marks
Represent binary sequence 1001001101 in polar NRZ, polar RZ, Manchester and AMI codes.
Answer
Bit sequence: 1 0 0 1 0 0 1 1 0 1, bit period , levels .
Conventions used: Manchester sends 1 as a +V half followed by a −V half, and 0 as −V then +V (Lathi/Haykin; the IEEE 802.3 convention is the opposite). AMI sends alternate 1s as half-width +V and −V pulses, starting with +V, and 0 as no pulse.
Polar NRZ (1 → +V, 0 → −V)
1 0 0 1 0 0 1 1 0 1
+V ────| |───| |───────| |───
-V |───────| |───────| |───|
Polar RZ (half-width pulses)
1 0 0 1 0 0 1 1 0 1
+V ──| |─| |─| |─| |─|
0 |─| |─| |─| |─| |─| |─| |─| |─| |─| |─
-V |─| |─| |─| |─| |─|
Manchester
1 0 0 1 0 0 1 1 0 1
+V ──| |─| |───| |─| |───| |─| |───|
-V |───| |─| |───| |─| |─| |───| |─
AMI (bipolar RZ)
1 0 0 1 0 0 1 1 0 1
+V ──| |─| |─|
0 |─────────| |─────────| |─| |─────| |─
-V |─| |─|
AMI: the five 1s get polarities + − + − +. Polar RZ and Manchester give a transition in every bit, which helps clock recovery. AMI has no DC component.
- 2081 Chaitra · 10 marks
Consider that the bit sequence 100000000001101 is to be transmitted. Draw the resulting waveform if the sequence is transmitted using Polar RZ, Differential Manchester, HDB3 and B8ZS, and compare their bandwidths.
Answer
Bit sequence: 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 (15 bits: a 1, ten 0s, then 1101). Each waveform is drawn in two parts: bits 1–8, then bits 9–15.
Polar RZ
1 is sent as a +V pulse for half the bit, and 0 as a −V pulse for half the bit. The line returns to zero in the second half of every bit.
Polar RZ
1 0 0 0 0 0 0 0
+V ──|
0 |─| |─| |─| |─| |─| |─| |─| |─
-V |─| |─| |─| |─| |─| |─| |─|
0 0 0 1 1 0 1
+V |─| |─| |─|
0 |─| |─| |─| |─| |─| |─| |─
-V ──| |─| |─| |─|
Differential Manchester
There is always a transition at the middle of each bit (used for the clock). Data is carried by the start of the bit: 0 = transition at the start, 1 = no transition at the start. The line is assumed to be at −V before the first bit.
Differential Manchester
1 0 0 0 0 0 0 0
+V |─| |─| |─| |─| |─| |─| |─| |─
-V ──| |─| |─| |─| |─| |─| |─| |─|
0 0 0 1 1 0 1
+V |─| |─| |───| |─| |───|
-V ──| |─| |─| |───| |─| |─
HDB3 (High Density Bipolar 3)
HDB3 is AMI, except that every run of four 0s is replaced:
- 000V if the number of pulses since the last substitution is odd,
- B00V if it is even.
V (violation) has the same polarity as the pulse before it. B follows the normal AMI rule. This makes successive V pulses alternate, so no DC builds up.
- Bit 1 → +.
- Zeros 2–5: 1 pulse since start (odd) → 000V = 0 0 0 +.
- Zeros 6–9: 0 pulses since the last V (even) → B00V = − 0 0 −.
- Zeros 10–11 → 0 0.
- 1101 → + − 0 +.
HDB3 pulses: + 0 0 0 + − 0 0 − 0 0 + − 0 +
HDB3 (half-width pulses)
1 0 0 0 0 0 0 0
+V ──| |─|
0 |─────────────| |─| |─────────
-V |─|
0 0 0 1 1 0 1
+V |─| |─|
0 |─────────| |─| |─────| |─
-V ──| |─|
B8ZS (Bipolar with 8-Zero Substitution)
B8ZS is AMI, except that every run of eight 0s is replaced by 000VB0VB. Taking the previous pulse as +, the substitute is 0 0 0 + − 0 − +.
- Bit 1 → +.
- Zeros 2–9 → 0 0 0 + − 0 − +.
- Zeros 10–11 → 0 0.
- 1101: the last pulse was +, so this gives − + 0 −.
B8ZS pulses: + 0 0 0 + − 0 − + 0 0 − + 0 −
B8ZS (half-width pulses)
1 0 0 0 0 0 0 0
+V ──| |─|
0 |─────────────| |─| |─────| |─
-V |─| |─|
0 0 0 1 1 0 1
+V ──| |─|
0 |─────────| |─| |─────| |─
-V |─| |─|
Bandwidth comparison
| Code | Main-lobe (first-null) bandwidth | DC component | Remarks |
|---|---|---|---|
| Polar RZ | None (equiprobable bits) | Pulses half-width, so double bandwidth | |
| Differential Manchester | None | Self-clocking, polarity-insensitive | |
| HDB3 | (most power near ) | None | Bipolar; keeps timing on long 0 runs (E1) |
| B8ZS | (most power near ) | None | Bipolar; keeps timing on long 0 runs (T1) |
HDB3 and B8ZS need about half the bandwidth of polar RZ and differential Manchester, and they still keep timing information when long strings of 0s occur.
- 2081 Chaitra · 7+2+3 marks
Encode "Engineer Ko Betha Arulai Ke Thaha" using Huffman Encoder and calculate the transmission efficiency. Find the codeword if the message is received as "Engineer Ko Betha Ke Ke".
Answer
Assumptions: upper and lower case are treated as the same letter, and the space is counted as a symbol because it must also be sent. The message "engineer ko betha arulai ke thaha" has 33 symbols, with 14 distinct symbols.
Huffman encoding
Huffman procedure: list the symbols by probability. Repeatedly combine the two least probable entries into one node whose weight is their sum, until only one node is left. In each merge, the first group listed gets bit 0 and the second group gets bit 1. Each symbol's code word is read from the root down to that symbol.
Merge steps (weights are counts out of 33):
- {g} (1) + {b} (1) → 2
- {o} (1) + {l} (1) → 2
- {i} (2) + {u} (1) → 3
- {n} (2) + {k} (2) → 4
- {t} (2) + {r} (2) → 4
- {o, l} (2) + {g, b} (2) → 4
- {i, u} (3) + {h} (3) → 6
- {t, r} (4) + {n, k} (4) → 8
- {space} (5) + {o, l, g, b} (4) → 9
- {e} (5) + {a} (5) → 10
- {t, r, n, k} (8) + {i, u, h} (6) → 14
- {e, a} (10) + {space, o, l, g, b} (9) → 19
- {e, a, space, o, l, g, b} (19) + {t, r, n, k, i, u, h} (14) → 33
| Symbol | Count | Code | |||
|---|---|---|---|---|---|
| space | 5 | 5/33 = 0.1515 | 010 | 3 | 0.4545 |
| a | 5 | 5/33 = 0.1515 | 001 | 3 | 0.4545 |
| e | 5 | 5/33 = 0.1515 | 000 | 3 | 0.4545 |
| h | 3 | 3/33 = 0.0909 | 111 | 3 | 0.2727 |
| i | 2 | 2/33 = 0.0606 | 1100 | 4 | 0.2424 |
| k | 2 | 2/33 = 0.0606 | 1011 | 4 | 0.2424 |
| n | 2 | 2/33 = 0.0606 | 1010 | 4 | 0.2424 |
| r | 2 | 2/33 = 0.0606 | 1001 | 4 | 0.2424 |
| t | 2 | 2/33 = 0.0606 | 1000 | 4 | 0.2424 |
| b | 1 | 1/33 = 0.0303 | 01111 | 5 | 0.1515 |
| g | 1 | 1/33 = 0.0303 | 01110 | 5 | 0.1515 |
| l | 1 | 1/33 = 0.0303 | 01101 | 5 | 0.1515 |
| o | 1 | 1/33 = 0.0303 | 01100 | 5 | 0.1515 |
| u | 1 | 1/33 = 0.0303 | 1101 | 4 | 0.1212 |
Average code length:
Here the numerator is the total number of bits in the encoded message: bits.
Entropy:
Efficiency:
Redundancy .
A fixed-length code for 14 symbols needs bits/symbol (). Huffman saves 10.61% of the bits.
Answer: average length = 3.576 bits/symbol, entropy = 3.542 bits/symbol, transmission efficiency η ≈ 99.05%.
Codeword for the received message "Engineer Ko Betha Ke Ke"
Each character (including the 4 spaces) is replaced by its code from the table above:
| Part | Code |
|---|---|
| engineer | 000 1010 01110 1100 1010 000 000 1001 |
| space | 010 |
| ko | 1011 01100 |
| space | 010 |
| betha | 01111 000 1000 111 001 |
| space | 010 |
| ke | 1011 000 |
| space | 010 |
| ke | 1011 000 |
Full codeword (83 bits for 23 characters):
000 1010 01110 1100 1010 000
000 1001 010 1011 01100 010
01111 000 1000 111 001 010
1011 000 010 1011 000
The Huffman code is a prefix code, so the receiver can decode this bit stream without separators.
- 2080 Chaitra · 8 marks
Encode the message "Mississippi is missing" using weighted Huffman code and calculate transmission efficiency.
Answer
Weighted Huffman coding builds the Huffman tree from the actual symbol counts (weights) in the message. Assumptions: case is ignored, and the space is counted as a symbol. The message "mississippi is missing" has 22 symbols and 7 distinct symbols: i = 7, s = 7, space = 2, m = 2, p = 2, g = 1, n = 1.
Huffman tree construction
Huffman procedure: list the symbols by probability. Repeatedly combine the two least probable entries into one node whose weight is their sum, until only one node is left. In each merge, the first group listed gets bit 0 and the second group gets bit 1. Each symbol's code word is read from the root down to that symbol.
- {n} (1) + {g} (1) → 2
- {m} (2) + {space} (2) → 4
- {n, g} (2) + {p} (2) → 4
- {n, g, p} (4) + {m, space} (4) → 8
- {s} (7) + {i} (7) → 14
- {s, i} (14) + {n, g, p, m, space} (8) → 22
(22)
0 / \ 1
(14) (8)
0/ \1 0/ \1
s:7 i:7 (4) (4)
0/ \1 0/ \1
(2) p:2 m:2 sp:2
0/ \1
n:1 g:1
Code table
| Symbol | Count | Code | |||
|---|---|---|---|---|---|
| i | 7 | 7/22 = 0.3182 | 01 | 2 | 0.6364 |
| s | 7 | 7/22 = 0.3182 | 00 | 2 | 0.6364 |
| space | 2 | 2/22 = 0.0909 | 111 | 3 | 0.2727 |
| m | 2 | 2/22 = 0.0909 | 110 | 3 | 0.2727 |
| p | 2 | 2/22 = 0.0909 | 101 | 3 | 0.2727 |
| g | 1 | 1/22 = 0.0455 | 1001 | 4 | 0.1818 |
| n | 1 | 1/22 = 0.0455 | 1000 | 4 | 0.1818 |
Efficiency
Average code length:
Here the numerator is the total number of bits in the encoded message: bits.
Entropy:
Efficiency:
Redundancy .
A fixed-length code for 7 symbols needs bits/symbol (). Huffman saves 18.18% of the bits.
Answer: bits/symbol, bits/symbol, transmission efficiency η ≈ 97.79%. The whole message takes 54 bits, compared with 66 bits using a 3-bit fixed code.
- 2080 Chaitra · 6 marks
Represent the given binary sequence 110011000001 in unipolar RZ, Manchester and HDB3 encoders.
Answer
Bit sequence: 1 1 0 0 1 1 0 0 0 0 0 1 (12 bits), bit period , levels .
Unipolar RZ
1 is sent as +V for the first half of the bit, then 0. A 0 is sent as no pulse.
Unipolar RZ
1 1 0 0 1 1 0 0 0 0 0 1
+V ──| |─| |─| |─| |─|
0 |─| |─────────| |─| |─────────────────────| |─
Manchester
Every bit has a transition at its middle. 1 = +V then −V, and 0 = −V then +V (Lathi/Haykin convention; IEEE 802.3 uses the opposite).
Manchester
1 1 0 0 1 1 0 0 0 0 0 1
+V ──| |─| |─| |───| |─| |─| |─| |─| |─| |───|
-V |─| |───| |─| |─| |───| |─| |─| |─| |─| |─
HDB3
HDB3 is AMI, except that every run of four 0s is replaced by 000V (if an odd number of pulses have been sent since the last substitution) or B00V (if even). V has the same polarity as the previous pulse. B follows the AMI rule (opposite to the previous pulse).
- Bits 1 to 6 (110011): AMI gives + − 0 0 + −.
- Bits 7 to 10 (0000): 4 pulses have been sent since the start, which is even, so this becomes B00V. The previous pulse is −, so B = + and V = +: + 0 0 +.
- Bits 11 and 12 (01): 0 stays 0. The 1 must be opposite to the last pulse (+), so it is −.
HDB3 pulses: + − 0 0 + − + 0 0 + 0 −
HDB3 (half-width pulses)
1 1 0 0 1 1 0 0 0 0 0 1
+V ──| |─| |─| |─|
0 |─| |─────────| |─| |─| |─────────| |─────| |─
-V |─| |─| |─|
- 2079 Chaitra · 10 marks
What is the aim of source coding? Encode "Kun Mandir Ma Janchhau Yatri" using Huffman codes and find its efficiency.
Answer
Aim of source coding
Source coding represents the output of an information source with as few bits as possible, while still allowing the receiver to recover it exactly (lossless coding) or acceptably (lossy coding). Its aims are:
- Remove redundancy: give short code words to frequent symbols and long ones to rare symbols, so the average code length approaches the entropy (Shannon's source coding theorem: ).
- Raise efficiency towards 100%.
- Lower the bit rate, which saves bandwidth, storage and transmission power.
- Produce a uniquely decodable (prefix) code so the receiver can decode it without separators.
Examples are Huffman, Shannon–Fano and LZW coding, as well as speech and image compression.
Huffman coding of "Kun Mandir Ma Janchhau Yatri"
Assumptions: case is ignored, and the space is counted as a symbol. The message has 28 symbols and 14 distinct symbols.
Huffman procedure: list the symbols by probability. Repeatedly combine the two least probable entries into one node whose weight is their sum, until only one node is left. In each merge, the first group listed gets bit 0 and the second group gets bit 1. Each symbol's code word is read from the root down to that symbol.
Merge steps:
- {d} (1) + {c} (1) → 2
- {k} (1) + {j} (1) → 2
- {y} (1) + {t} (1) → 2
- {i} (2) + {h} (2) → 4
- {r} (2) + {m} (2) → 4
- {d, c} (2) + {u} (2) → 4
- {y, t} (2) + {k, j} (2) → 4
- {space} (4) + {n} (3) → 7
- {r, m} (4) + {i, h} (4) → 8
- {y, t, k, j} (4) + {d, c, u} (4) → 8
- {space, n} (7) + {a} (5) → 12
- {y, t, k, j, d, c, u} (8) + {r, m, i, h} (8) → 16
- {y, t, k, j, d, c, u, r, m, i, h} (16) + {space, n, a} (12) → 28
| Symbol | Count | Code | |||
|---|---|---|---|---|---|
| a | 5 | 5/28 = 0.1786 | 11 | 2 | 0.3571 |
| space | 4 | 4/28 = 0.1429 | 100 | 3 | 0.4286 |
| n | 3 | 3/28 = 0.1071 | 101 | 3 | 0.3214 |
| h | 2 | 2/28 = 0.0714 | 0111 | 4 | 0.2857 |
| i | 2 | 2/28 = 0.0714 | 0110 | 4 | 0.2857 |
| m | 2 | 2/28 = 0.0714 | 0101 | 4 | 0.2857 |
| r | 2 | 2/28 = 0.0714 | 0100 | 4 | 0.2857 |
| u | 2 | 2/28 = 0.0714 | 0011 | 4 | 0.2857 |
| c | 1 | 1/28 = 0.0357 | 00101 | 5 | 0.1786 |
| d | 1 | 1/28 = 0.0357 | 00100 | 5 | 0.1786 |
| j | 1 | 1/28 = 0.0357 | 00011 | 5 | 0.1786 |
| k | 1 | 1/28 = 0.0357 | 00010 | 5 | 0.1786 |
| t | 1 | 1/28 = 0.0357 | 00001 | 5 | 0.1786 |
| y | 1 | 1/28 = 0.0357 | 00000 | 5 | 0.1786 |
Average code length:
Here the numerator is the total number of bits in the encoded message: bits.
Entropy:
Efficiency:
Redundancy .
A fixed-length code for 14 symbols needs bits/symbol (). Huffman saves 9.82% of the bits.
Answer: bits/symbol, bits/symbol, efficiency η ≈ 99.25%. The message needs 101 bits instead of 112 bits with a 4-bit fixed code.
- 2079 Chaitra · 6+2 marks
Given the binary sequence 1101010111 represent in Unipolar RZ, Bipolar NRZ, Polar NRZ and Manchester encoders. Explain communication impairments with examples.
Answer
Line codes for 1101010111
Bit period , levels . Bipolar NRZ is drawn as full-width pulses whose polarity alternates for each 1. Manchester uses 1 = +V then −V, and 0 = −V then +V.
Unipolar RZ
1 1 0 1 0 1 0 1 1 1
+V ──| |─| |─| |─| |─| |─| |─|
0 |─| |─────| |─────| |─────| |─| |─| |─
Bipolar NRZ (1s alternate +V/−V, 0 = 0)
1 1 0 1 0 1 0 1 1 1
+V ────| |───| |───| |───
0 | |───| |───| |───| | |
-V |───| |───| |───|
Polar NRZ
1 1 0 1 0 1 0 1 1 1
+V ────────| |───| |───| |───────────
-V |───| |───| |───|
Manchester
1 1 0 1 0 1 0 1 1 1
+V ──| |─| |───| |───| |───| |─| |─|
-V |─| |───| |───| |───| |─| |─| |─
Communication impairments
Impairments are the effects of the channel that make the received signal differ from the transmitted one.
- Attenuation: the signal loses energy with distance. Example: a voice signal on a long copper line becomes weak, so repeaters or amplifiers are needed.
- Distortion: different frequency components are attenuated or delayed by different amounts, so the pulse shape changes. Example: pulses spread on a band-limited telephone line and cause ISI.
- Noise: unwanted random signals add to the signal. Examples are thermal noise in receivers, crosstalk between adjacent pairs in a cable, and impulse noise from lightning or switching.
- 2078 Chaitra · 2+2+2+2 marks
Represent 100111010 using following encoders.
a) Polar RZ b) Bipolar NRZ c) AMI d) Manchester
Answer
Bit sequence: 1 0 0 1 1 1 0 1 0, bit period , levels . The first 1 is taken as positive for the bipolar codes. Bipolar NRZ uses full-width pulses whose polarity alternates for each 1. AMI uses the same alternation with half-width (RZ) pulses.
a) Polar RZ
1 → +V for half the bit, 0 → −V for half the bit, then return to 0.
Polar RZ
1 0 0 1 1 1 0 1 0
+V ──| |─| |─| |─| |─|
0 |─| |─| |─| |─| |─| |─| |─| |─| |─
-V |─| |─| |─| |─|
b) Bipolar NRZ
0 → 0 V. Each 1 → full-width pulse with polarity alternating + − + − +.
Bipolar NRZ
1 0 0 1 1 1 0 1 0
+V ────| |───| |───|
0 |───────| | | |───| |───
-V |───| |───|
c) AMI
0 → 0 V. Each 1 → half-width pulse with polarity alternating + − + − +.
AMI (RZ)
1 0 0 1 1 1 0 1 0
+V ──| |─| |─|
0 |─────────| |─| |─| |─────| |─────
-V |─| |─|
d) Manchester
Transition at every mid-bit: 1 → +V then −V, 0 → −V then +V.
Manchester
1 0 0 1 1 1 0 1 0
+V ──| |─| |───| |─| |─| |───| |─
-V |───| |─| |─| |─| |───| |───|
- 2071 Magh (old course) · 8 marks
State the Shannon Channel Capacity Theorem. Discuss the implication of this theory in communication system.
Answer
Statement
Shannon's channel capacity theorem (Shannon–Hartley law): for a channel of bandwidth Hz with additive white Gaussian noise of power and average signal power , the channel capacity is
If the information rate , there is a coding scheme that sends the information with an arbitrarily small probability of error. If , the error probability cannot be made small, whatever coding is used.
Implications in communication systems
- Upper bound on data rate. No modem or code can beat . Real designs are judged by how close they get, e.g. LDPC/turbo codes come within about 1 dB.
- Bandwidth–power exchange. The same can come from a large with low SNR, or a small with high SNR.
- Spread spectrum and CDMA work at very low SNR by using wide bandwidth.
- High-order QAM (e.g. 256-QAM in cable modems) uses high SNR to pack more bits into a narrow band.
- Error-free transmission over noisy channels is possible. Noise limits the rate, not the accuracy. This motivates channel coding (error-correcting codes).
- Diminishing returns from power. grows only logarithmically with . At high SNR, doubling the power adds only about 1 bit/s/Hz.
- Limited gain from bandwidth. As , , so capacity stays finite because noise grows with bandwidth.
- Shannon limit. The minimum for reliable communication is dB. This is the benchmark for power-efficient systems such as deep-space links.
- Design guide. It tells designers the best spectral efficiency for a given SNR, e.g. 3.46 b/s/Hz at 10 dB.
| Bandwidth-limited system | Power-limited system |
|---|---|
| High SNR, use M-ary QAM/PSK | Low SNR, use wide band + coding |
| e.g. telephone modems, microwave links | e.g. satellite, deep-space links |
Example: a telephone channel with kHz and SNR = 30 dB has kb/s. This is close to the speed of the V.34 modem (33.6 kb/s), whose real SNR is slightly higher.
- 2068 Jestha (old course) · 10 marks
Evaluate the maximum data rate that can be transmitted error free through a channel with a bandwidth of 1 MHz and a minimum of 10 dB SNR at the input of the channel decoder.
Answer
The maximum error-free data rate is the channel capacity, given by the Shannon–Hartley theorem for an AWGN channel:
Given
- Bandwidth MHz Hz
- dB
Step 1: Convert SNR to a ratio
Step 2: Capacity
Interpretation
- The spectral efficiency is b/s/Hz.
- Any rate up to about 3.46 Mb/s can, in theory, be sent with an arbitrarily small error probability using suitable (possibly very long) channel codes. Rates above this cannot be sent error-free.
- A practical scheme reaching this rate would need more than 2 bits/symbol at the Nyquist rate of Msymbols/s. That calls for multilevel signalling, e.g. M-ary with , together with strong coding.
- The "10 dB at the input of the channel decoder" means that the SNR is measured where decoding happens, so it is the SNR that sets the capacity.
Answer: Maximum error-free data rate Mb/s.
- 2068 Jestha (old course) · 4+6 marks
Define information. Derive the expression for evaluating the average amount of information contained in a statistically independent long sequence of symbols.
Answer
Information
The amount of information in an event measures the uncertainty it removes: the less likely the event, the more information its occurrence gives. For a symbol with probability , the self-information is
Properties:
- when (a certain event gives no information).
- , and if .
- For independent events, information adds: .
Units: bits (base 2), nats (base ) or decits (base 10). Example: a fair coin toss gives bit.
Average information (entropy) of a long sequence
Consider a discrete memoryless source with alphabet and probabilities , where . The symbols are statistically independent.
Step 1. Take a long message of symbols (). By the law of large numbers, symbol occurs about
Step 2. Each occurrence of carries bits. So the information from all occurrences of is
Step 3. The symbols are independent, so the information adds. The total information in the message is
Step 4. The average information per symbol, called the entropy, is
Information rate: if the source emits symbols/s, then bits/s.
Properties of entropy
- .
- when one symbol has (no uncertainty).
- (the maximum) when all symbols are equally likely.
- For a binary source with : , which peaks at 1 bit when .
Example: a source with probabilities has
- 2081 Bhadra (CS II) · 4 marks
How does source encoding differ from channel encoding?
Answer
Source encoding removes redundancy from the source output to cut the number of bits. Channel encoding adds controlled redundancy so that errors caused by the channel can be detected or corrected.
| Point | Source encoding | Channel encoding |
|---|---|---|
| Aim | Compression (efficiency) | Reliability (error control) |
| Redundancy | Removed | Added (parity/check bits) |
| Effect on bit rate | Lowered | Raised (code rate ) |
| Based on | Source statistics (entropy ) | Channel noise (capacity ) |
| Governing theorem | Shannon source coding theorem: | Shannon channel coding theorem: |
| Position in system | Right after the source | After the source encoder, before the modulator |
| Examples | Huffman, Shannon–Fano, LZW, PCM/DPCM, MP3, JPEG | Parity, Hamming, CRC, BCH, convolutional, turbo, LDPC |
Source -> [Source enc.] -> [Channel enc.]
-> [Modulator] -> Channel
Example: text is first Huffman-coded to make it smaller (source coding). A Hamming (7,4) code is then added so that single-bit errors can be corrected (channel coding).
- 2081 Bhadra (CS II) · 2+6 marks
Define Inter Symbol Interference. Elaborate Nyquist pulse shaping criterion for mitigation of ISI.
Answer
Inter symbol interference
Inter symbol interference (ISI) is distortion in which the energy of one symbol spreads into the time slots of nearby symbols. It happens because the channel and filters have limited bandwidth, so pulses get wider in time. At a sampling instant, the received sample then holds tails of other pulses as well as the wanted symbol:
Nyquist criterion for zero ISI
If is the overall pulse (transmit filter, channel and receive filter), ISI is zero when
In the frequency domain this is
That is, copies of the pulse spectrum shifted by multiples of must add up to a flat spectrum.
Nyquist pulse shaping for mitigation of ISI
1. Ideal Nyquist channel (minimum bandwidth). Choose a rectangular spectrum of width :
The sinc pulse is 1 at and 0 at every other , so ISI is zero. is the Nyquist bandwidth, and is the Nyquist rate. In practice it fails because the brick-wall filter cannot be built and the tails decay only as , so any timing jitter adds up to large ISI.
2. Raised-cosine pulse shaping (practical). The spectrum rolls off smoothly with a cosine shape, with odd symmetry about , so the folded spectrum is still flat:
P(f)
|______
| \ alpha = 0 : brick wall, B = Rb/2
| \ alpha = 0.5 : B = 0.75 Rb
| \__ alpha = 1 : B = Rb
+--------+--+---> f
B0 B0(1+a)
| Roll-off | Bandwidth | Tail decay | Practicality |
|---|---|---|---|
| 0 | Not realisable | ||
| 0.5 | Commonly used | ||
| 1 | , fastest | Easy; least timing-sensitive |
The pulse shaping is usually split equally between transmitter and receiver as root-raised-cosine filters, which also gives matched filtering. Any ISI that remains because the channel is not ideal is removed with equalisers.
- 2081 Bhadra (CS II) · 1.5+1.5+1.5+1.5 marks
Represent given binary sequence 1001101101 in unipolar NRZ, polar RZ, AMI, and Manchester codes.
Answer
Bit sequence: 1 0 0 1 1 0 1 1 0 1, bit period , levels .
Unipolar NRZ
1 → +V for the full bit, 0 → 0 V.
Unipolar NRZ
1 0 0 1 1 0 1 1 0 1
+V ────| |───────| |───────| |───
0 |───────| |───| |───|
Polar RZ
1 → +V for half the bit, 0 → −V for half the bit, then 0.
Polar RZ
1 0 0 1 1 0 1 1 0 1
+V ──| |─| |─| |─| |─| |─|
0 |─| |─| |─| |─| |─| |─| |─| |─| |─| |─
-V |─| |─| |─| |─|
AMI
0 → 0 V. The 1s are half-width pulses of alternating polarity: + − + − + −.
AMI (RZ)
1 0 0 1 1 0 1 1 0 1
+V ──| |─| |─|
0 |─────────| |─| |─────| |─| |─────| |─
-V |─| |─| |─|
Manchester
1 → +V then −V, 0 → −V then +V. There is a transition at every mid-bit.
Manchester
1 0 0 1 1 0 1 1 0 1
+V ──| |─| |───| |─| |───| |─| |───|
-V |───| |─| |─| |───| |─| |───| |─
- 2081 Baisakh (CS II) · 4 marks
A DMS has five symbols with probability of p(x₁) = 0.4, p(x₂) = 0.19, p(x₃) = 0.16, p(x₄) = 0.15 and p(x₅) = 0.1. Construct the Huffman code for X and calculate its efficiency and compare with fixed length coding.
Answer
Huffman code construction
Arrange the symbols by probability and repeatedly combine the two smallest. In each merge, the first group gets bit 0 and the second gets bit 1.
- (0.15) + (0.10) → 0.25
- (0.19) + (0.16) → 0.35
- {x2,x3} (0.35) + {x4,x5} (0.25) → 0.60
- {x2..x5} (0.60) + (0.40) → 1.00
(1.00)
0 / \ 1
(0.60) x1 (0.40)
0/ \1
(0.35) (0.25)
0/ \1 0/ \1
x2 x3 x4 x5
| Symbol | Code | |||
|---|---|---|---|---|
| 0.40 | 1 | 1 | 0.40 | |
| 0.19 | 000 | 3 | 0.57 | |
| 0.16 | 001 | 3 | 0.48 | |
| 0.15 | 010 | 3 | 0.45 | |
| 0.10 | 011 | 3 | 0.30 |
Efficiency
Comparison with fixed-length coding
Five symbols need bits each:
| Code | Avg. length | Efficiency |
|---|---|---|
| Fixed length | 3 bits | 71.66% |
| Huffman | 2.20 bits | 97.72% |
Huffman coding saves bits/symbol (about 26.7%). Its efficiency is close to the entropy limit.
- 2081 Baisakh (CS II) · 2+2+4 marks
Mention how can we minimize error in duo-binary coding. Define information and entropy. Calculate the upper limit of the channel capacity as the bandwidth of the channel (B) tends to infinity.
Answer
Minimizing error in duo-binary coding
In duobinary signalling the received sample is , so the decoder normally finds the present bit by subtracting the previous decision: . One wrong decision then spoils all the following decisions. This is called error propagation. It is reduced or removed by:
- Precoding: before the duobinary filter, form (modulo-2 sum). The receiver can then decide each bit from the present sample alone: if (i.e. ) then ; if () then . An error stays in one bit only.
- Using the correct decision thresholds () for the three-level signal and good receive filtering to keep noise low.
Information and entropy
- Information: the information carried by a message of probability is bits. A less likely message carries more information; a certain message () carries none.
- Entropy: the average information per symbol of a source with symbols:
Upper limit of channel capacity as
By the Shannon–Hartley theorem, with signal power and white noise of one-sided PSD (noise power ):
Multiply and divide by and put :
As , and . Therefore
So increasing bandwidth does not give unlimited capacity, because noise power also grows with . Capacity saturates at .
Putting at the limit gives , i.e. −1.6 dB (the Shannon limit): no system can communicate error-free below this .
Answer: bits/s.
- 2081 Baisakh (CS II) · 4 marks
Given the binary sequence 1101010111 represent in polar NRZ, polar RZ, Manchester and AMI codes.
Answer
Line codes convert the bit stream into electrical pulses. Conventions used (bit period , amplitude ):
- Polar NRZ: 1 → , 0 → for the full bit.
- Polar RZ: 1 → , 0 → for the first half bit, then 0.
- Manchester: 1 → then (high-to-low at mid-bit); 0 → then .
- AMI: 0 → 0 V; successive 1s alternate , (first 1 taken as , full-width pulses).
Bit sequence: 1 1 0 1 0 1 0 1 1 1
bits 1 1 0 1 0 1 0 1 1 1
Polar NRZ:
+V |‾‾‾‾‾‾‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾
0 |
-V | ____ ____ ____
Polar RZ:
+V |‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾
0 | -- -- -- -- -- -- -- -- -- --
-V | __ __ __
Manchester:
+V |‾‾ ‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾ ‾‾
0 |
-V | __ ____ ____ ____ __ __ __
AMI (bipolar NRZ):
+V |‾‾‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾‾‾
0 | ---- ---- ----
-V | ____ ____ ____
Level in each bit (a pair means first half, second half):
| Code | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| Polar NRZ | +V | +V | −V | +V | −V | +V | −V | +V | +V | +V |
| Polar RZ | +V,0 | +V,0 | −V,0 | +V,0 | −V,0 | +V,0 | −V,0 | +V,0 | +V,0 | +V,0 |
| Manchester | +V,−V | +V,−V | −V,+V | +V,−V | −V,+V | +V,−V | −V,+V | +V,−V | +V,−V | +V,−V |
| AMI (bipolar NRZ) | +V | −V | 0 | +V | 0 | −V | 0 | +V | −V | +V |
Observations: polar NRZ has a DC component when 1s are more frequent (here seven 1s); Manchester has a transition in every bit, so it carries timing; AMI has zero average value because its marks alternate.
- 2080 Bhadra (CS II) · 2+6 marks
Differentiate between message and information. Relate the message, the entropy and the information.
Answer
A message is the actual symbol or sequence of symbols sent by the source (a letter, a word, a sample value). Information is the measure of the uncertainty removed when that message is received; it depends only on how probable the message is, not on its meaning.
Message vs information
| Message | Information |
|---|---|
| Physical symbol(s) produced by the source | Quantity carried by the message |
| Has content and meaning | Independent of meaning |
| Counted in symbols, words or samples | Measured in bits: |
| A sure (expected) message is still a message | A sure message carries zero information |
| Example: "Sun rises in the east" | Almost 0 bits, since |
Relation between message, information and entropy
- Information of one message. If message occurs with probability , its information content is
Properties: ; for ; if ; for independent messages .
- Entropy = average information per message. A source emits different messages with different information. In a long sequence of messages, appears about times, so the total information is
Dividing by :
So entropy is the expected (mean) value of the information, . It lies in , with the maximum when all messages are equally likely.
- Information rate. If the source sends messages per second, the information rate is bits/s.
Example
A source sends four messages with probabilities .
| Message | (bits) | |
|---|---|---|
| 1/2 | 1 | |
| 1/4 | 2 | |
| 1/8 | 3 | |
| 1/8 | 3 |
A message sequence of 1000 symbols therefore carries about bits of information, although each individual message carries 1, 2 or 3 bits. The message is the carrier; information is what it carries; entropy is the average amount carried per message.
- 2080 Bhadra (CS II) · 2+2+4 marks
Define Inter Symbol Interference (ISI). State Nyquist conditions for zero ISI. What are the physical constraints in implementing Nyquist pulse shaping criteria?
Answer
Inter Symbol Interference (ISI)
ISI is the distortion in which the pulse of one symbol spreads into the time slots of neighbouring symbols, so that the sample taken at the decision instant contains contributions from earlier and later symbols. It is caused by the limited bandwidth and dispersion of the channel and filters. The received sample at is
ISI raises the bit error rate even when there is no noise, and it closes the eye in the eye pattern.
Nyquist conditions for zero ISI
Let be the overall pulse (transmit filter, channel and receive filter) with .
- Time domain: , i.e. the pulse must pass through zero at all other sampling instants.
- Frequency domain: (constant), i.e. the shifted copies of the spectrum must add to a flat value.
The simplest solution is the ideal Nyquist channel , bandwidth , giving .
Physical constraints in implementing the Nyquist criterion
- Unrealizable filter: the ideal response needs a flat spectrum up to and an abrupt fall to zero (brick-wall). Such a filter is non-causal and cannot be built.
- Infinite, slowly decaying pulse: the sinc pulse lasts from to and its tails decay only as . Any truncation brings back ISI.
- Timing sensitivity: because the tails are large, a small timing error (jitter) in the sampling instant gives large ISI; the sum of ISI terms can even diverge.
- Channel uncertainty: the criterion applies to the overall response, but the real channel response is not known exactly and may change with time, so fixed filters cannot meet it exactly.
- Bandwidth penalty in practice: practical solutions such as the raised cosine pulse need extra bandwidth, with roll-off , and equalizers or partial response (duobinary) coding are needed to handle the remaining problems.
- 2080 Bhadra (CS II) · 8 marks
State and explain Nyquist Channel Capacity Theorem.
Answer
Nyquist channel capacity theorem: for a noiseless channel of bandwidth Hz, the maximum rate at which independent pulses (symbols) can be sent without ISI is symbols per second. If each symbol takes one of distinct levels, the maximum bit rate (capacity) is
Explanation
- Signalling rate limit. A channel of bandwidth can pass the sinc pulse , whose zeros occur every s. Pulses spaced apart therefore do not interfere at the sampling instants (Nyquist zero-ISI criterion). Hence the maximum symbol rate is
This rate is called the Nyquist rate and the Nyquist bandwidth. Sending faster than causes ISI that cannot be removed.
-
Bits per symbol. With equally likely levels, each symbol carries bits. With binary signalling (), bits/s.
-
Capacity. Multiplying, .
Examples
For a telephone channel with kHz:
Points to note
- The theorem assumes a noiseless channel. In theory, grows without limit as increases.
- In practice, noise limits : closely spaced levels cannot be told apart. The noise-limited capacity is given by Shannon–Hartley, . Comparing the two, the useful number of levels is about .
- The ideal pulse needed for symbols/s (brick-wall filter) is not realizable; with a raised cosine pulse of roll-off , the rate is symbols/s.
| Nyquist capacity | Shannon capacity |
|---|---|
| Noiseless channel | Channel with AWGN |
| Limited by ISI (bandwidth) | Limited by noise |
| Depends on number of levels | Depends on SNR |
- 2080 Baisakh (CS II) · 5+5 marks
Explain digital communication system with appropriate block diagram. A DMS has six symbols with probability of p(x₁) = 0.3, p(x₂) = 0.2, p(x₃) = 0.25, p(x₄) = 0.12 and p(x₅) = 0.08, p(x₆) = 0.05. Construct the Shannon-Fano code for X and calculate its efficiency and code Redundancy.
Answer
Digital communication system
A digital communication system sends information as a sequence of discrete symbols (usually bits) from a source to a user.
Source -> Formatter -> Source -> Channel -> Modulator
(analog (sample, encoder encoder |
/digital) quantize) v
Channel
(noise added)
|
User <- Formatter <- Source <- Channel <- Demodulator
(D/A) decoder decoder /detector
- Information source and formatter: produces the message; an analog message is sampled, quantized and coded (A/D conversion) into bits.
- Source encoder: removes redundancy so the average number of bits per symbol is close to the entropy (Huffman, Shannon–Fano). This reduces bit rate and bandwidth.
- Channel encoder: adds controlled redundancy (parity bits) so that errors caused by the channel can be detected or corrected (Hamming, cyclic, convolutional codes).
- Modulator: maps the bits onto waveforms suited to the channel: line codes for baseband, ASK/FSK/PSK/QAM for bandpass.
- Channel: wire, cable, fibre or radio link; it attenuates, distorts (ISI) and adds noise.
- Demodulator/detector: recovers the bit stream from the noisy waveform, usually with a matched filter and a decision device.
- Channel decoder, source decoder, formatter: reverse the encoding steps and deliver the message to the user.
Performance is measured by bit error probability and by bandwidth and power efficiency.
Shannon–Fano code
Probabilities add to 1. Procedure: list symbols in decreasing probability; split the list into two groups of nearly equal total probability; give 0 to the upper group and 1 to the lower group; repeat in each group until each has one symbol.
First split: {0.3, 0.25} = 0.55 and {0.2, 0.12, 0.08, 0.05} = 0.45.
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Code | ||
|---|---|---|---|---|---|---|---|
| x1 | 0.3 | 0 | 0 | 00 | 2 | ||
| x3 | 0.25 | 0 | 1 | 01 | 2 | ||
| x2 | 0.2 | 1 | 0 | 10 | 2 | ||
| x4 | 0.12 | 1 | 1 | 0 | 110 | 3 | |
| x5 | 0.08 | 1 | 1 | 1 | 0 | 1110 | 4 |
| x6 | 0.05 | 1 | 1 | 1 | 1 | 1111 | 4 |
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.3 | 1.7370 | 0.5211 |
| x2 | 0.2 | 2.3219 | 0.4644 |
| x3 | 0.25 | 2.0000 | 0.5000 |
| x4 | 0.12 | 3.0589 | 0.3671 |
| x5 | 0.08 | 3.6439 | 0.2915 |
| x6 | 0.05 | 4.3219 | 0.2161 |
| Total | 1 | 2.3601 |
Average code length:
Efficiency and redundancy:
Answer: codes , , , , , ; bits/symbol, efficiency = 99.17 %, redundancy = 0.83 %.
- 2079 Bhadra (CS II) · 5 marks
A discrete memoryless source has an alphabet of seven symbols whose probabilities occurrence are as under.
Symbol S0 S1 S2 S3 S4 S5 S6 Probability 0.25 0.25 0.125 0.125 0.125 0.0625 0.0625
Determine the Huffman code for above source.
Answer
Huffman procedure: arrange symbols in decreasing probability; combine the two lowest probabilities into one; place the sum in the list as high as possible; repeat until one probability (1.0) is left. Then trace back, giving 0 to the upper branch and 1 to the lower branch at each combination.
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.25, 0.25, 0.125, 0.125, 0.125, 0.0625, 0.0625 | 0.0625 + 0.0625 = 0.125 |
| 2 | 0.25, 0.25, 0.125, 0.125, 0.125, 0.125 | 0.125 + 0.125 = 0.25 |
| 3 | 0.25, 0.25, 0.25, 0.125, 0.125 | 0.125 + 0.125 = 0.25 |
| 4 | 0.25, 0.25, 0.25, 0.25 | 0.25 + 0.25 = 0.5 |
| 5 | 0.5, 0.25, 0.25 | 0.25 + 0.25 = 0.5 |
| 6 | 0.5, 0.5 | 0.5 + 0.5 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| S0 | 0.25 | 10 | 2 |
| S1 | 0.25 | 11 | 2 |
| S2 | 0.125 | 001 | 3 |
| S3 | 0.125 | 010 | 3 |
| S4 | 0.125 | 011 | 3 |
| S5 | 0.0625 | 0000 | 4 |
| S6 | 0.0625 | 0001 | 4 |
Entropy:
Average code length:
Efficiency:
The efficiency is 100 % because every probability is a negative power of 2 (), so each code length equals exactly. A fixed-length code would need 3 bits/symbol (efficiency ).
Answer: S0, S1 get 2-bit codes, S2, S3, S4 get 3-bit codes and S5, S6 get 4-bit codes (as in the table); bits/symbol, efficiency 100 %.
- 2079 Bhadra (CS II) · 4+6 marks
Illustrate the methods to reduce Intersymbol Interference. Explain modified Duobinary coding technique with precoder, illustrating with input sequence 01001101.
Answer
Methods to reduce Intersymbol Interference
- Nyquist pulse shaping (raised cosine filtering): shape the overall response so that each pulse has zero value at all other sampling instants. The raised cosine spectrum with roll-off meets the Nyquist criterion, needs bandwidth , and its tails decay as , so timing errors cause little ISI.
- Correlative (partial response) coding: add a controlled, known amount of ISI (duobinary, modified duobinary) so that the signal fits in the minimum bandwidth with realizable filters; the receiver removes the known ISI.
- Equalization: a transversal (tapped delay line) filter after the channel cancels the channel's distortion. Zero-forcing equalizers force ISI to zero at the sampling points; adaptive (LMS) equalizers track changing channels.
- Eye pattern monitoring and correct sampling: sample at the instant of maximum eye opening using good timing recovery.
- Reducing the signalling rate or using more channel bandwidth, so pulses spread less.
Modified duobinary coding
Modified duobinary is a correlative coding scheme that correlates the present symbol with the symbol two bit intervals earlier:
Transfer function:
Impulse response: .
is zero at and at , so the signal has no DC component (useful for transformer-coupled lines and SSB) and is easy to filter. The output has three levels: .
Precoder: to avoid error propagation, the data are precoded as , then if and if . Decision rule: ; .
b_k -->(XOR)--> d_k -> level -> a_k -->(+)--> c_k
^ map | ^-
| +-[2Tb delay]
+--[2Tb delay]--+
Illustration for input 01001101
Initial precoder bits assumed (so ).
| k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | |
| 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | |
| −1 | +1 | −1 | +1 | +1 | −1 | +1 | +1 | |
| −1 | −1 | −1 | +1 | −1 | +1 | +1 | −1 | |
| 0 | +2 | 0 | 0 | +2 | −2 | 0 | +2 | |
| Decoded | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
The decoded sequence 01001101 equals the input. Each bit is decided from its own sample, so a single error does not propagate.
- 2076 Chaitra (CS II) · 3+8 marks
Define any three types of noises. Calculate coding efficiency of a six symbol source with probabilities P = {0.36, 0.18, 0.12, 0.09, 0.07} using Shannon Fano and Huffman's coding techniques.
Answer
Three types of noise
- Thermal (Johnson) noise: caused by random motion of free electrons in a conductor due to temperature. It is white and Gaussian, with power ( J/K).
- Shot noise: caused by the random arrival of charge carriers crossing a junction in diodes and transistors. Its mean-square current is .
- Flicker () noise: found in semiconductor devices at low frequencies (below a few kHz); its power spectral density varies as , due to surface and contact irregularities.
(Others: partition noise, transit-time noise, atmospheric and man-made external noise.)
Coding efficiency
The five given probabilities add to 0.82, so the sixth probability is taken as :
for (with ).
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.36 | 1.4739 | 0.5306 |
| x2 | 0.18 | 2.4739 | 0.4453 |
| x3 | 0.12 | 3.0589 | 0.3671 |
| x4 | 0.09 | 3.4739 | 0.3127 |
| x5 | 0.07 | 3.8365 | 0.2686 |
| x6 | 0.18 | 2.4739 | 0.4453 |
| Total | 1 | 2.3695 |
Shannon–Fano coding (split into groups of nearly equal probability: {0.36, 0.18} = 0.54 vs {0.18, 0.12, 0.09, 0.07} = 0.46, and so on):
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Code | ||
|---|---|---|---|---|---|---|---|
| x1 | 0.36 | 0 | 0 | 00 | 2 | ||
| x2 | 0.18 | 0 | 1 | 01 | 2 | ||
| x6 | 0.18 | 1 | 0 | 10 | 2 | ||
| x3 | 0.12 | 1 | 1 | 0 | 110 | 3 | |
| x4 | 0.09 | 1 | 1 | 1 | 0 | 1110 | 4 |
| x5 | 0.07 | 1 | 1 | 1 | 1 | 1111 | 4 |
Huffman coding (combine the two lowest each time, move the sum as high as possible; 0 to upper, 1 to lower):
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.36, 0.18, 0.18, 0.12, 0.09, 0.07 | 0.09 + 0.07 = 0.16 |
| 2 | 0.36, 0.18, 0.18, 0.16, 0.12 | 0.16 + 0.12 = 0.28 |
| 3 | 0.36, 0.28, 0.18, 0.18 | 0.18 + 0.18 = 0.36 |
| 4 | 0.36, 0.36, 0.28 | 0.36 + 0.28 = 0.64 |
| 5 | 0.64, 0.36 | 0.64 + 0.36 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| x1 | 0.36 | 00 | 2 |
| x2 | 0.18 | 10 | 2 |
| x6 | 0.18 | 11 | 2 |
| x3 | 0.12 | 011 | 3 |
| x4 | 0.09 | 0100 | 4 |
| x5 | 0.07 | 0101 | 4 |
| Method | (bits/symbol) | Efficiency | Redundancy |
|---|---|---|---|
| Shannon–Fano | 2.44 | 97.11 % | 2.89 % |
| Huffman | 2.44 | 97.11 % | 2.89 % |
| Fixed length (3 bits) | 3 | 78.98 % | 21.02 % |
Answer: both Shannon–Fano and Huffman give bits/symbol and efficiency 97.11 % for this source (Huffman is never worse than Shannon–Fano; here they are equal).
- 2076 Chaitra (CS II) · 4+6 marks
State and derive the relation between entropy and information rate. Derive the expression which shows the limit of Shannon's channel capacity theorem when bandwidth tends to infinity.
Answer
Relation between entropy and information rate
Entropy is the average information per symbol, in bits/symbol. Information rate is the average information produced per second, in bits/s.
Derivation: let a discrete memoryless source emit symbols per second from an alphabet with probabilities .
- In a long time seconds the source emits symbols.
- Symbol occurs about times, and each occurrence carries bits.
- Total information in seconds:
- Information per second:
where is the symbol rate (symbols/s) and the entropy (bits/symbol). Example: symbols/s and bits/symbol give bits/s. For equally likely symbols, .
Limit of Shannon capacity when
Shannon–Hartley theorem for an AWGN channel (noise PSD , noise power ):
Rewrite with , so :
As , , and :
Meaning:
- Capacity does not become infinite when bandwidth becomes infinite, because noise power also increases. It approaches a finite limit set by .
- At this limit, with energy per bit :
This is the Shannon limit: no coding scheme can give reliable transmission with below −1.6 dB.
C
| ...................... 1.44 S/N0
| ..'
| .'
| .'
| /
+--------------------------------> B
- 2076 Asoj (CS II) · 2+2+2 marks
Compute coding efficiency of a source with symbols {A₀, A₁, A₂, A₃, A₄} with corresponding probabilities {0.4, 0.3, 0.15, 0.1, 0.05} using (i) Binary coding (ii) Shannon-Fano Coding (iii) Binary Huffman Coding
Answer
Entropy of the source:
| Symbol | |||
|---|---|---|---|
| A0 | 0.4 | 1.3219 | 0.5288 |
| A1 | 0.3 | 1.7370 | 0.5211 |
| A2 | 0.15 | 2.7370 | 0.4105 |
| A3 | 0.1 | 3.3219 | 0.3322 |
| A4 | 0.05 | 4.3219 | 0.2161 |
| Total | 1 | 2.0087 |
Efficiency is in each case.
(i) Binary (fixed-length) coding
Five symbols need bits each (000, 001, 010, 011, 100), so .
(ii) Shannon–Fano coding
First split: {0.4} vs {0.3, 0.15, 0.1, 0.05} (0.4 vs 0.6; the other split 0.7 vs 0.3 is worse).
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Code | ||
|---|---|---|---|---|---|---|---|
| A0 | 0.4 | 0 | 0 | 1 | |||
| A1 | 0.3 | 1 | 0 | 10 | 2 | ||
| A2 | 0.15 | 1 | 1 | 0 | 110 | 3 | |
| A3 | 0.1 | 1 | 1 | 1 | 0 | 1110 | 4 |
| A4 | 0.05 | 1 | 1 | 1 | 1 | 1111 | 4 |
(iii) Binary Huffman coding
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.4, 0.3, 0.15, 0.1, 0.05 | 0.1 + 0.05 = 0.15 |
| 2 | 0.4, 0.3, 0.15, 0.15 | 0.15 + 0.15 = 0.3 |
| 3 | 0.4, 0.3, 0.3 | 0.3 + 0.3 = 0.6 |
| 4 | 0.6, 0.4 | 0.6 + 0.4 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| A0 | 0.4 | 1 | 1 |
| A1 | 0.3 | 01 | 2 |
| A2 | 0.15 | 001 | 3 |
| A3 | 0.1 | 0000 | 4 |
| A4 | 0.05 | 0001 | 4 |
| Coding | Efficiency | |
|---|---|---|
| Binary (fixed) | 3 | 66.96 % |
| Shannon–Fano | 2.05 | 97.99 % |
| Huffman | 2.05 | 97.99 % |
Answer: 66.96 %, 97.99 % and 97.99 % respectively.
- 2076 Asoj (CS II) · 8 marks
Discuss with examples, the implications and limitations of Shannon Hartley Channel capacity theorem.
Answer
Shannon–Hartley theorem: the capacity of a channel of bandwidth Hz, disturbed by additive white Gaussian noise, with average signal power and noise power , is
If the information rate , there exists a coding scheme giving an arbitrarily small error probability; if , errors cannot be made small.
Implications
- Upper bound on rate: it gives the maximum error-free rate of any channel, a benchmark for real systems. Example: telephone line, kHz, dB (1000):
This is why voice-band modems stopped near 33.6 kbps. 2. Bandwidth–SNR trade-off: the same capacity can be obtained with large bandwidth and low SNR, or small bandwidth and high SNR. To keep 30.9 kbps in half the bandwidth (1550 Hz) we need (60 dB), much more power. Wideband systems (spread spectrum, FM, UWB) use bandwidth to save power. 3. Noise does not forbid error-free communication; it only limits the rate. Good channel coding (turbo, LDPC) approaches the limit. 4. Bandwidth limit: as , , and reliable transmission needs dB (Shannon limit). 5. Bandwidth efficiency plane: separates possible from impossible regions for choosing modulation (e.g. 64-QAM needs high SNR).
Limitations
- It assumes AWGN only; it does not directly apply to impulse noise, interference, fading and multipath channels.
- It is an existence theorem: it does not tell how to build the code or modulator that reaches capacity.
- Reaching capacity needs very long code words, so infinite delay and complexity; practical systems operate below .
- It assumes a Gaussian-distributed signal, average power constraint and a linear, band-limited channel; practical signals use finite constellations (e.g. 16-QAM), which reach less.
- Increasing bandwidth gives only a limited gain (capacity saturates at ), and increasing SNR gives only a logarithmic gain: doubling at high SNR adds only about bits/s.
Example of the logarithmic limitation: with kHz, raising from 1000 to 2000 increases from 30.9 kbps to only about 34.0 kbps.
- 2076 Asoj (CS II) · 6 marks
Draw the timing diagram of Polar NRZ, Polar RZ, Manchester and unipolar RZ for the following binary sequence 1011000010000000000111.
Answer
Conventions (bit period , amplitude ):
| Code | Bit 1 | Bit 0 |
|---|---|---|
| Polar NRZ | for full bit | for full bit |
| Polar RZ | first half, then 0 | first half, then 0 |
| Manchester | then (high-to-low at mid-bit) | then (low-to-high) |
| Unipolar RZ | first half, then 0 | 0 for full bit |
Bit sequence (22 bits): 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1
Each character below is half a bit period.
bits 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1
Polar NRZ:
+V |‾‾ ‾‾‾‾ ‾‾ ‾‾‾‾‾‾
0 |
-V | __ ________ ____________________
Polar RZ:
+V |‾ ‾ ‾ ‾ ‾ ‾ ‾
0 | - - - - - - - - - - - - - - - - - - - - - -
-V | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Manchester:
+V |‾ ‾‾ ‾ ‾ ‾ ‾ ‾‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾‾ ‾ ‾
0 |
-V | __ _ __ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _
Unipolar RZ:
+V |‾ ‾ ‾ ‾ ‾ ‾ ‾
0 | --- - --------- --------------------- - - -
Observations:
- Polar NRZ stays at for the long run of ten 0s (bits 10–19): no transitions, so the receiver can lose bit timing.
- Polar RZ returns to zero in every bit, so every bit has an edge, but it needs twice the bandwidth of NRZ.
- Manchester has a transition at the middle of every bit even in the long zero run, so it is self-clocking and has no DC component; its bandwidth is twice that of NRZ.
- Unipolar RZ gives no pulse at all during the run of zeros, so timing is lost there, and it has a DC component.
- 2076 Asoj (CS II) · 6 marks
An analog baseband signal, band limited to 100 Hz, is sampled at the Nyquist rate. The samples are quantized into four message symbols that occur independently with probabilities p1 = p4 = 0.125 and p2 = p3. Determine the information rate (bits/sec) of the message source signal.
Answer
Given: Hz, sampled at Nyquist rate; four symbols with and .
Step 1: find and . Probabilities add to 1:
Step 2: symbol rate. Nyquist sampling rate:
Step 3: entropy.
Step 4: information rate.
Note: with 2 bits/sample (fixed coding) the bit rate would be 400 bits/s, so the source information rate is less than the coded bit rate.
Answer: information rate 362.26 bits/s ( bits/symbol, symbols/s).
- 2075 Chaitra (CS II) · 4+6 marks
Discuss the importance of source coding in Digital Communication system. A DMS emits one of the seven symbol with probabilities P = [0.25, 0.2, 0.15, 0.08, 0.07, 0.03, 0.02]. Find the coding efficiency, Code Redundancy for both Shannon-Fano coding and Fixed Length Coding and compare result.
Answer
Importance of source coding
Source coding is the efficient representation of the source output in bits, by removing redundancy, so that the average number of bits per symbol is as close as possible to the entropy .
- Reduces bit rate: fewer bits per symbol means a lower transmission rate for the same information.
- Saves bandwidth and power: a lower bit rate needs less channel bandwidth and less transmitted energy; storage space is also saved (ZIP, MP3, JPEG).
- Uses symbol statistics: frequent symbols get short code words and rare symbols long code words (variable-length coding), as in Morse code.
- Approaches the entropy limit: Shannon's source coding theorem says ; good codes (Huffman, Shannon–Fano) reach close to .
- Unique decodability: prefix codes (no code word is a prefix of another) can be decoded without separators.
- Leaves room for channel coding: the bits saved can be used for error-control redundancy.
Numerical
The seven listed probabilities add to only 0.80 (printing error). The same paper series gives this source as (the missing 0.2 restored), which adds to 1; this set is used below. A fixed-length code needs 3 bits for either 7 or 8 symbols.
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.25 | 2.0000 | 0.5000 |
| x2 | 0.2 | 2.3219 | 0.4644 |
| x3 | 0.2 | 2.3219 | 0.4644 |
| x4 | 0.15 | 2.7370 | 0.4105 |
| x5 | 0.08 | 3.6439 | 0.2915 |
| x6 | 0.07 | 3.8365 | 0.2686 |
| x7 | 0.03 | 5.0589 | 0.1518 |
| x8 | 0.02 | 5.6439 | 0.1129 |
| Total | 1 | 2.6640 |
(a) Shannon–Fano coding (first split {0.25, 0.2} = 0.45 vs 0.55):
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Step 5 | Step 6 | Code | ||
|---|---|---|---|---|---|---|---|---|---|
| x1 | 0.25 | 0 | 0 | 00 | 2 | ||||
| x2 | 0.2 | 0 | 1 | 01 | 2 | ||||
| x3 | 0.2 | 1 | 0 | 10 | 2 | ||||
| x4 | 0.15 | 1 | 1 | 0 | 110 | 3 | |||
| x5 | 0.08 | 1 | 1 | 1 | 0 | 1110 | 4 | ||
| x6 | 0.07 | 1 | 1 | 1 | 1 | 0 | 11110 | 5 | |
| x7 | 0.03 | 1 | 1 | 1 | 1 | 1 | 0 | 111110 | 6 |
| x8 | 0.02 | 1 | 1 | 1 | 1 | 1 | 1 | 111111 | 6 |
(b) Fixed-length coding: bits/symbol.
Comparison
| Method | Efficiency | Redundancy | |
|---|---|---|---|
| Shannon–Fano | 2.72 | 97.94 % | 2.06 % |
| Fixed length | 3 | 88.80 % | 11.20 % |
Shannon–Fano coding saves bits/symbol (about 9.3 %) over fixed-length coding, because it gives short code words to the frequent symbols. Fixed-length coding is simpler and needs no code table, but wastes bits when probabilities are unequal.
- 2075 Chaitra (CS II) · 6+4 marks
What do you understand by Inter Symbol Interference (ISI)? Explain modified Duobinary coding technique and illustrate it using binary input sequence 10110011.
Answer
Inter Symbol Interference (ISI)
ISI is the overlapping of neighbouring pulses in a digital signal, so that at the sampling instant of one symbol the received value also contains the tails of other symbols. It appears because a band-limited channel spreads each pulse in time (a pulse limited in bandwidth cannot be limited in time).
The receiver output at the sampling instant is
The first term is the wanted symbol, the second is ISI, the third is noise.
Causes: limited channel bandwidth, non-ideal filters, multipath and dispersion in cables or fibres, timing errors at the receiver.
Effects: wrong decisions even without noise; higher bit error rate; reduced eye opening and noise margin; sensitivity to timing jitter.
pulse k-1 pulse k pulse k+1
/\ /\ /\
___/ \_ _/ \_ _/ \___
\___/ \____/
tail of k-1 adds to k
Remedies: Nyquist pulse shaping (raised cosine), correlative coding (duobinary, modified duobinary), and equalization.
Modified duobinary coding
Modified duobinary introduces a controlled ISI between a symbol and the one two bit intervals before it:
, so the spectrum has no DC component. The output takes three levels (−2, 0, +2). A precoder is used so that each bit is decoded from one sample: , .
Illustration for 10110011
Assume ; level mapping , .
| k | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | |
| 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | |
| +1 | −1 | −1 | +1 | −1 | +1 | +1 | −1 | |
| −1 | −1 | +1 | −1 | −1 | +1 | −1 | +1 | |
| +2 | 0 | −2 | +2 | 0 | 0 | +2 | −2 | |
| 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
The decoded output 10110011 matches the input.
- 2075 Asoj (CS II) · 8 marks
Six messages are transmitted with probabilities 0.3, 0.08, 0.1, 0.15, 0.25 and 0.12 respectively. Obtain their respective Shannon-Fano and Huffman's codes and code efficiencies.
Answer
Messages have (sum = 1). Arranged in decreasing order: 0.3, 0.25, 0.15, 0.12, 0.1, 0.08.
Entropy:
| Symbol | |||
|---|---|---|---|
| m1 | 0.3 | 1.7370 | 0.5211 |
| m2 | 0.08 | 3.6439 | 0.2915 |
| m3 | 0.1 | 3.3219 | 0.3322 |
| m4 | 0.15 | 2.7370 | 0.4105 |
| m5 | 0.25 | 2.0000 | 0.5000 |
| m6 | 0.12 | 3.0589 | 0.3671 |
| Total | 1 | 2.4224 |
Shannon–Fano code
Split into equal-probability halves: {0.3, 0.25} = 0.55 vs {0.15, 0.12, 0.1, 0.08} = 0.45; then {0.15, 0.12} = 0.27 vs {0.1, 0.08} = 0.18, and so on.
| Symbol | Step 1 | Step 2 | Step 3 | Code | ||
|---|---|---|---|---|---|---|
| m1 | 0.3 | 0 | 0 | 00 | 2 | |
| m5 | 0.25 | 0 | 1 | 01 | 2 | |
| m4 | 0.15 | 1 | 0 | 0 | 100 | 3 |
| m6 | 0.12 | 1 | 0 | 1 | 101 | 3 |
| m3 | 0.1 | 1 | 1 | 0 | 110 | 3 |
| m2 | 0.08 | 1 | 1 | 1 | 111 | 3 |
Huffman code
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.3, 0.25, 0.15, 0.12, 0.1, 0.08 | 0.1 + 0.08 = 0.18 |
| 2 | 0.3, 0.25, 0.18, 0.15, 0.12 | 0.15 + 0.12 = 0.27 |
| 3 | 0.3, 0.27, 0.25, 0.18 | 0.25 + 0.18 = 0.43 |
| 4 | 0.43, 0.3, 0.27 | 0.3 + 0.27 = 0.57 |
| 5 | 0.57, 0.43 | 0.57 + 0.43 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| m1 | 0.3 | 00 | 2 |
| m5 | 0.25 | 10 | 2 |
| m4 | 0.15 | 010 | 3 |
| m6 | 0.12 | 011 | 3 |
| m3 | 0.1 | 110 | 3 |
| m2 | 0.08 | 111 | 3 |
| Method | Efficiency | Redundancy | |
|---|---|---|---|
| Shannon–Fano | 2.45 | 98.87 % | 1.13 % |
| Huffman | 2.45 | 98.87 % | 1.13 % |
Answer: both codes give bits/message and efficiency 98.87 %.
- 2075 Asoj (CS II) · 6 marks
Represent binary sequence 10110101 in Polar NRZ, unipolar RZ, AMI and Manchester codes.
Answer
Conventions (bit period , amplitude ):
- Polar NRZ: 1 → , 0 → for the whole bit.
- Unipolar RZ: 1 → for the first half bit then 0; 0 → 0.
- AMI: 0 → 0; 1s alternate , (first 1 positive, full-width pulses; an RZ version with half-width pulses is also used).
- Manchester: 1 → then ; 0 → then (transition at the middle of every bit).
Bit sequence: 1 0 1 1 0 1 0 1
bits 1 0 1 1 0 1 0 1
Polar NRZ:
+V |‾‾‾‾ ‾‾‾‾‾‾‾‾ ‾‾‾‾ ‾‾‾‾
0 |
-V | ____ ____ ____
Unipolar RZ:
+V |‾‾ ‾‾ ‾‾ ‾‾ ‾‾
0 | ------ -- ------ ------ --
AMI (bipolar NRZ):
+V |‾‾‾‾ ‾‾‾‾ ‾‾‾‾
0 | ---- ---- ----
-V | ____ ____
Manchester:
+V |‾‾ ‾‾‾‾ ‾‾ ‾‾‾‾ ‾‾‾‾
0 |
-V | ____ __ ____ ____ __
Levels in each bit (a pair means first half, second half):
| Code | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|---|---|
| Polar NRZ | +V | −V | +V | +V | −V | +V | −V | +V |
| Unipolar RZ | +V,0 | 0 | +V,0 | +V,0 | 0 | +V,0 | 0 | +V,0 |
| AMI (bipolar NRZ) | +V | 0 | −V | +V | 0 | −V | 0 | +V |
| Manchester | +V,−V | −V,+V | +V,−V | +V,−V | −V,+V | +V,−V | −V,+V | +V,−V |
| Code | DC component | Clock content | Bandwidth (first null) |
|---|---|---|---|
| Polar NRZ | Yes (if 1s and 0s unequal) | Poor in long runs | |
| Unipolar RZ | Yes | Good for 1s, none for 0s | |
| AMI | None | Poor for runs of 0s | |
| Manchester | None | Excellent |
- 2074 Asoj (CS II) · 3+2+2 marks
Distinguish between the Source coding and Channel coding. A discrete memoryless source has an alphabet of five symbols S0, S1, S2, S3, S4 with probabilities of 0.55, 0.15, 0.15, 0.1 and 0.05 respectively. Determine the Huffman code for each symbol and calculate the coding efficiency.
Answer
Source coding vs channel coding
| Source coding | Channel coding |
|---|---|
| Removes redundancy from the source output | Adds controlled redundancy |
| Aim: efficiency (fewer bits per symbol) | Aim: reliability (error detection/correction) |
| Reduces bit rate and bandwidth | Increases bit rate and bandwidth |
| Uses symbol probabilities | Uses algebraic structure of codes |
| Limited by entropy: | Limited by channel capacity: |
| Examples: Huffman, Shannon–Fano, LZW | Hamming, cyclic (CRC), convolutional |
| Placed right after the source | Placed before the modulator |
Huffman code
Probabilities: S0 = 0.55, S1 = 0.15, S2 = 0.15, S3 = 0.1, S4 = 0.05.
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.55, 0.15, 0.15, 0.1, 0.05 | 0.1 + 0.05 = 0.15 |
| 2 | 0.55, 0.15, 0.15, 0.15 | 0.15 + 0.15 = 0.3 |
| 3 | 0.55, 0.3, 0.15 | 0.3 + 0.15 = 0.45 |
| 4 | 0.55, 0.45 | 0.55 + 0.45 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| S0 | 0.55 | 0 | 1 |
| S1 | 0.15 | 100 | 3 |
| S2 | 0.15 | 101 | 3 |
| S3 | 0.1 | 110 | 3 |
| S4 | 0.05 | 111 | 3 |
Coding efficiency
| Symbol | |||
|---|---|---|---|
| S0 | 0.55 | 0.8625 | 0.4744 |
| S1 | 0.15 | 2.7370 | 0.4105 |
| S2 | 0.15 | 2.7370 | 0.4105 |
| S3 | 0.1 | 3.3219 | 0.3322 |
| S4 | 0.05 | 4.3219 | 0.2161 |
| Total | 1 | 1.8438 |
Answer: S0 = 0 and the other four symbols get 3-bit codes (table); bits/symbol, efficiency 97.04 %.
- 2074 Asoj (CS II) · 5+5 marks
A continuous signal is band limited to 5 kHz. The signal is quantized in 6 levels of a PCM system with the probabilities 1/2, 1/4, 1/8, 1/16, 1/32 and 1/32. Calculate the entropy and information rate.
Answer
Given: band limit kHz; 6 quantization levels with probabilities (sum = 1).
Entropy
| Symbol | |||
|---|---|---|---|
| Q1 | 0.5 | 1.0000 | 0.5000 |
| Q2 | 0.25 | 2.0000 | 0.5000 |
| Q3 | 0.125 | 3.0000 | 0.3750 |
| Q4 | 0.0625 | 4.0000 | 0.2500 |
| Q5 | 0.0312 | 5.0000 | 0.1562 |
| Q6 | 0.0312 | 5.0000 | 0.1562 |
| Total | 1 | 1.9375 |
For comparison, if the six levels were equally likely, bits/sample. The unequal probabilities reduce the average information.
Information rate
The signal is sampled at the Nyquist rate:
Each sample is one message (level), so
Remarks
- A fixed-length PCM code would need bits/sample, i.e. bits/s, so its efficiency would be .
- Because all probabilities are powers of , a Huffman code (lengths 1, 2, 3, 4, 5, 5) gives exactly bits/sample and 100 % efficiency, i.e. the line rate can be brought down to the information rate of 19.375 kbps.
Answer: entropy bits/sample; information rate bits/s ≈ 19.375 kbps.
- 2074 Chaitra (CS II) · 8 marks
The source of information symbols {A0, A1, A2, A3 and A4} have corresponding probabilities {0.4, 0.3, 0.15, 0.1 and 0.05}. Encode the source symbols using Huffman encoder and Shannon-Fano encoder and compare their efficiency.
Answer
Entropy of the source :
| Symbol | |||
|---|---|---|---|
| A0 | 0.4 | 1.3219 | 0.5288 |
| A1 | 0.3 | 1.7370 | 0.5211 |
| A2 | 0.15 | 2.7370 | 0.4105 |
| A3 | 0.1 | 3.3219 | 0.3322 |
| A4 | 0.05 | 4.3219 | 0.2161 |
| Total | 1 | 2.0087 |
Huffman encoder
Combine the two lowest probabilities at each stage, place the sum as high as possible, then read the code from the final stage back to each symbol (0 = upper, 1 = lower).
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.4, 0.3, 0.15, 0.1, 0.05 | 0.1 + 0.05 = 0.15 |
| 2 | 0.4, 0.3, 0.15, 0.15 | 0.15 + 0.15 = 0.3 |
| 3 | 0.4, 0.3, 0.3 | 0.3 + 0.3 = 0.6 |
| 4 | 0.6, 0.4 | 0.6 + 0.4 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| A0 | 0.4 | 1 | 1 |
| A1 | 0.3 | 01 | 2 |
| A2 | 0.15 | 001 | 3 |
| A3 | 0.1 | 0000 | 4 |
| A4 | 0.05 | 0001 | 4 |
Shannon–Fano encoder
Divide the ordered list into two groups of nearly equal probability, 0 to the upper and 1 to the lower group, and repeat:
- {A0} = 0.4 | {A1, A2, A3, A4} = 0.6
- {A1} = 0.3 | {A2, A3, A4} = 0.3
- {A2} = 0.15 | {A3, A4} = 0.15
- {A3} | {A4}
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Code | ||
|---|---|---|---|---|---|---|---|
| A0 | 0.4 | 0 | 0 | 1 | |||
| A1 | 0.3 | 1 | 0 | 10 | 2 | ||
| A2 | 0.15 | 1 | 1 | 0 | 110 | 3 | |
| A3 | 0.1 | 1 | 1 | 1 | 0 | 1110 | 4 |
| A4 | 0.05 | 1 | 1 | 1 | 1 | 1111 | 4 |
Comparison
| Item | Huffman | Shannon–Fano |
|---|---|---|
| Average length | 2.05 bits | 2.05 bits |
| Efficiency | 97.99 % | 97.99 % |
| Redundancy | 2.01 % | 2.01 % |
| Method | Bottom-up (merging) | Top-down (splitting) |
| Optimality | Always optimal | Not always optimal |
For this source both encoders give the same code lengths (1, 2, 3, 4, 4), so the efficiencies are equal at 97.99 %. In general Huffman's efficiency is equal to or better than Shannon–Fano's. A fixed 3-bit code would give only 66.96 %.
- 2074 Chaitra (CS II) · 2+6 marks
What is ISI? State two solutions for zero ISI. Explain duo-binary encoding with the use of precoder.
Answer
ISI
Intersymbol interference (ISI) is the overlap of pulse tails from neighbouring symbols at the sampling instant of the present symbol, caused by the limited bandwidth and dispersion of the channel. It causes decision errors even without noise.
Two solutions for zero ISI
- Nyquist pulse shaping: use an overall pulse with for , e.g. the raised cosine pulse (bandwidth ).
- Correlative (partial response) coding: e.g. duobinary signalling, which adds a known, controlled ISI that the receiver removes, allowing the minimum bandwidth with practical filters.
(Adaptive equalization is a third common method.)
Duobinary encoding with precoder
Duobinary signalling: each output sample is the sum of the present and previous binary levels:
The equivalent filter is a delay-and-add followed by an ideal low-pass filter:
falls smoothly to zero at , so it is realizable. The output has three levels: .
Problem: without precoding, decoding uses , so one error propagates to later bits.
Precoder: form (modulo-2) before level mapping (, ). Then
- when , i.e. ;
- when , i.e. .
Decision rule: , . Each bit is found from its own sample, so there is no error propagation.
b_k->(XOR)->d_k->[level]->a_k->(+)->[ideal LPF]->c_k
^ | ^
+--[Tb delay]--+ +->[Tb delay]
Example: input , initial .
| k | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 0 | 0 | 1 | |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 | |
| −1 | +1 | +1 | −1 | −1 | −1 | +1 | |
| 0 | 0 | +2 | 0 | −2 | −2 | 0 | |
| 1 | 1 | 0 | 1 | 0 | 0 | 1 |
(.) The decoded data equal the input.
- 2074 Chaitra (CS II) · 6 marks
Draw the timing diagram of Polar NRZ, AMI and Manchester for the following binary sequence 1011000010000000001.
Answer
Conventions (bit period , amplitude ):
| Code | Bit 1 | Bit 0 |
|---|---|---|
| Polar NRZ | for full bit | for full bit |
| AMI (bipolar) | and alternately | 0 |
| Manchester | then (high-to-low at mid-bit) | then (low-to-high) |
The first 1 in AMI is taken as (full-width pulses).
Bit sequence (19 bits): 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
Each character below is half a bit period.
bits 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
Polar NRZ:
+V |‾‾ ‾‾‾‾ ‾‾ ‾‾
0 |
-V | __ ________ __________________
AMI (bipolar NRZ):
+V |‾‾ ‾‾ ‾‾
0 | -- -------- ------------------
-V | __ __
Manchester:
+V |‾ ‾‾ ‾ ‾ ‾ ‾ ‾‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾ ‾‾
0 |
-V | __ _ __ _ _ _ __ _ _ _ _ _ _ _ _ _
AMI levels of the five 1s (bits 1, 3, 4, 9, 19): .
Observations:
- Polar NRZ: stays at for the run of nine 0s (bits 10–18), so there are no transitions for timing recovery, and the waveform has a DC component.
- AMI: zero DC because 1s alternate; a violation of alternation shows an error. But the long run of zeros gives 0 V for 9 bits, so timing is lost (solved by B8ZS or HDB3).
- Manchester: has a mid-bit transition in every bit, including the zero run, so it is self-clocking with no DC; it needs twice the bandwidth of NRZ.
- 2073 Shrawan (CS II) · 5+3 marks
Explain in brief the functional block diagram and the basic elements of a digital communication system. Explain Shannon-Fano coding.
Answer
Digital communication system
A digital communication system transmits information as discrete symbols (bits) over a channel. Its functional blocks:
Info -> Formatter -> Source -> Channel -> Modulator
source (A/D) encoder encoder |
v
Channel
noise -> (+)
|
User <- Formatter <- Source <- Channel <- Demodulator
(D/A) decoder decoder /detector
Basic elements:
- Information source: produces the message (voice, video, text, data). Analog messages are first converted to digital by the formatter (sampling, quantizing, PCM encoding).
- Source encoder: removes redundancy and represents the symbols with the fewest bits on average (Huffman, Shannon–Fano). It lowers the bit rate.
- Channel encoder: adds controlled redundancy (parity bits) so the receiver can detect and correct errors (Hamming, cyclic, convolutional codes).
- Digital modulator: converts the bits into waveforms suitable for the channel: line coding for baseband, ASK, FSK, PSK or QAM for bandpass.
- Channel: the physical medium (wire, coaxial cable, optical fibre, radio). It adds noise, attenuation, distortion and interference.
- Demodulator/detector: recovers the bit sequence from the received waveform, using matched filtering, sampling and decisions.
- Channel decoder: uses the redundancy to correct errors.
- Source decoder and formatter: rebuild the original message (D/A conversion) for the user.
Other blocks often included: encryption/decryption, multiplexing, synchronization. Performance is judged by the probability of bit error , bandwidth efficiency (bits/s/Hz) and power efficiency ( needed).
Shannon–Fano coding
Shannon–Fano coding is a variable-length source coding method that gives short code words to likely symbols and long ones to unlikely symbols.
Algorithm:
- List the symbols in decreasing order of probability.
- Split the list into two groups whose total probabilities are as nearly equal as possible.
- Assign bit 0 to every symbol of the upper group and 1 to the lower group.
- Repeat steps 2–3 inside each group until every group has one symbol.
- The code word of a symbol is the sequence of bits assigned to it.
Example: for A–E. First split {A} = 0.4 vs {B, C, D, E} = 0.6.
| Symbol | Step 1 | Step 2 | Step 3 | Step 4 | Code | ||
|---|---|---|---|---|---|---|---|
| A | 0.4 | 0 | 0 | 1 | |||
| B | 0.2 | 1 | 0 | 10 | 2 | ||
| C | 0.2 | 1 | 1 | 0 | 110 | 3 | |
| D | 0.1 | 1 | 1 | 1 | 0 | 1110 | 4 |
| E | 0.1 | 1 | 1 | 1 | 1 | 1111 | 4 |
The code is a prefix code (uniquely decodable), but Shannon–Fano is not always optimal; Huffman coding is.
- 2073 Shrawan (CS II) · 2+5 marks
What do you understand by intersymbol interference? Explain Duobinary coding technique with precoder and illustrate it using binary input sequence 0010110.
Answer
Intersymbol interference
Intersymbol interference (ISI) is the overlap of the tails of neighbouring pulses at the sampling instant of the present pulse. It arises because a band-limited channel spreads each pulse beyond its own bit interval. The sample at becomes
where the middle term is ISI. ISI closes the eye pattern and causes errors even without noise.
Duobinary coding with precoder
Duobinary (class I partial response) signalling deliberately adds a known amount of ISI from the previous bit so that data at rate can be sent in the minimum bandwidth with a realizable filter.
The output has three levels (−2, 0, +2).
Need for precoder: without it, the receiver decodes , so one wrong decision spreads to all later bits (error propagation).
Precoder: ; level map , . Then when and when .
Decision rule: ; .
b_k->(XOR)->d_k->[map]->a_k->(+)->[LPF B=Rb/2]->c_k
^ | ^
+--[Tb]---+ +->[Tb]
Illustration for 0010110
Initial precoder bit assumed ().
| k | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | |
| 1 | 1 | 1 | 0 | 0 | 1 | 0 | |
| 1 | 1 | 0 | 0 | 1 | 0 | 0 | |
| +1 | +1 | −1 | −1 | +1 | −1 | −1 | |
| +1 | +1 | +1 | −1 | −1 | +1 | −1 | |
| +2 | +2 | 0 | −2 | 0 | 0 | −2 | |
| Decoded | 0 | 0 | 1 | 0 | 1 | 1 | 0 |
The decoded sequence 0010110 equals the input, and each bit is decided from its own sample only.
- 2073 Chaitra (CS II) · 6+4 marks
Discuss the importance of source coding in Digital Communication System. A discrete memory less source emits five symbols with probabilities P = {0.3, 0.25, 0.2, 0.15, 0.1}, find coding efficiency for both fixed and Shannon-Fano coding and compare results.
Answer
Importance of source coding
Source coding converts the source output into a binary sequence using as few bits per symbol as possible, by removing redundancy. Its importance:
- Lower bit rate: the average code length approaches the entropy , so fewer bits are sent for the same information.
- Bandwidth saving: a lower bit rate needs less channel bandwidth, so more users or services fit in the same band.
- Power and energy saving: fewer bits means less transmitted energy, important in mobile and satellite links.
- Storage saving: compressed files (ZIP, JPEG, MP3) need less memory.
- Exploits statistics: variable-length codes give short words to frequent symbols and long words to rare ones.
- Theoretical guarantee: Shannon's source coding theorem, , shows how close a code can come to the limit; efficiency measures the code.
- Uniquely decodable prefix codes allow decoding without separators.
- Supports channel coding: removing useless redundancy leaves room to add useful redundancy for error control.
Numerical:
Entropy:
| Symbol | |||
|---|---|---|---|
| S0 | 0.3 | 1.7370 | 0.5211 |
| S1 | 0.25 | 2.0000 | 0.5000 |
| S2 | 0.2 | 2.3219 | 0.4644 |
| S3 | 0.15 | 2.7370 | 0.4105 |
| S4 | 0.1 | 3.3219 | 0.3322 |
| Total | 1 | 2.2282 |
(a) Fixed-length coding: 5 symbols need bits each (000 to 100).
(b) Shannon–Fano coding: first split {0.3, 0.25} = 0.55 vs {0.2, 0.15, 0.1} = 0.45; then {0.2} vs {0.15, 0.1}.
| Symbol | Step 1 | Step 2 | Step 3 | Code | ||
|---|---|---|---|---|---|---|
| S0 | 0.3 | 0 | 0 | 00 | 2 | |
| S1 | 0.25 | 0 | 1 | 01 | 2 | |
| S2 | 0.2 | 1 | 0 | 10 | 2 | |
| S3 | 0.15 | 1 | 1 | 0 | 110 | 3 |
| S4 | 0.1 | 1 | 1 | 1 | 111 | 3 |
Comparison
| Method | Efficiency | Redundancy | |
|---|---|---|---|
| Fixed length | 3 | 74.27 % | 25.73 % |
| Shannon–Fano | 2.25 | 99.03 % | 0.97 % |
Shannon–Fano uses 0.75 bit/symbol less (25 % fewer bits) and is almost at the entropy limit, while fixed-length coding wastes about a quarter of the bits.
- 2073 Chaitra (CS II) · 6+2 marks
Explain any one type of correlative coding technique with its impulse response and transfer function. Mention how can we minimize error in duo-binary coding.
Answer
Correlative (partial response) coding introduces a controlled, known amount of ISI between successive symbols so that the data can be sent at rate through the minimum Nyquist bandwidth using realizable filters. The receiver removes the known ISI. The most common type is duobinary signalling.
Duobinary signalling
"Duobinary" means doubling the transmission capacity of a straight binary system. The binary input is mapped to and passed through a delay-and-add circuit followed by an ideal low-pass filter:
a_k ---+------------>(+)--> [ideal LPF ] --> c(t)
| ^ [|f|<1/2Tb ]
+--> [delay Tb]+
Transfer function: the delay-and-add has ; with the ideal Nyquist filter for :
and zero elsewhere. The magnitude is a half cosine that falls smoothly to zero at , so it is much easier to approximate than the brick-wall filter.
Impulse response: sum of two sinc pulses one bit apart:
equals 1 at and and is zero at all other sampling instants; its tails decay as , so it is less sensitive to timing errors.
Output levels: . Detection without precoding: .
|H(f)|
2 +---.
| '.
| '.
| '.
0 +-----------+----> f
0 1/(2Tb)
Minimizing error in duobinary coding
The main error source is error propagation: since each decision uses the previous decision, one error causes further errors. It is minimized by precoding: at the transmitter. Then means and means , so each bit is decoded from its own sample (threshold ) and an error does not spread. Proper thresholds and noise filtering also help.
- 2073 Chaitra (CS II) · 4 marks
Given the binary sequence 1101010011 represent in polar NRZ, polar RZ, Manchester and AMI codes.
Answer
Conventions (bit period , amplitude ):
- Polar NRZ: 1 → , 0 → for the full bit.
- Polar RZ: 1 → , 0 → for the first half, then 0.
- Manchester: 1 → then ; 0 → then .
- AMI: 0 → 0; 1s alternate , (first 1 positive).
Bit sequence: 1 1 0 1 0 1 0 0 1 1
bits 1 1 0 1 0 1 0 0 1 1
Polar NRZ:
+V |‾‾‾‾‾‾‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾‾‾‾‾‾‾
0 |
-V | ____ ____ ________
Polar RZ:
+V |‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾
0 | -- -- -- -- -- -- -- -- -- --
-V | __ __ __ __
Manchester:
+V |‾‾ ‾‾ ‾‾‾‾ ‾‾‾‾ ‾‾ ‾‾‾‾ ‾‾
0 |
-V | __ ____ ____ ____ __ __ __
AMI (bipolar NRZ):
+V |‾‾‾‾ ‾‾‾‾ ‾‾‾‾
0 | ---- ---- --------
-V | ____ ____ ____
Levels in each bit (a pair means first half, second half):
| Code | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| Polar NRZ | +V | +V | −V | +V | −V | +V | −V | −V | +V | +V |
| Polar RZ | +V,0 | +V,0 | −V,0 | +V,0 | −V,0 | +V,0 | −V,0 | −V,0 | +V,0 | +V,0 |
| Manchester | +V,−V | +V,−V | −V,+V | +V,−V | −V,+V | +V,−V | −V,+V | −V,+V | +V,−V | +V,−V |
| AMI (bipolar NRZ) | +V | −V | 0 | +V | 0 | −V | 0 | 0 | +V | −V |
Manchester and polar RZ have a transition in every bit (good timing), while AMI has zero average value because its marks alternate.
- 2072 Kartik (CS II) · 2+3 marks
Write down the significance of variable length coding with relevant example. A fixed length source encoder generates six symbols with probabilities {0.2, 0.15, 0.25, 0.05, 0.3, 0.05} and encoded by unique code word. Find entropy and maximum code efficiency.
Answer
Significance of variable length coding
In variable-length coding, frequent symbols get short code words and rare symbols get long code words. Its significance:
- The average length becomes smaller than a fixed-length code and can approach the entropy , so bit rate, bandwidth and storage are reduced.
- It uses the source statistics; when probabilities are unequal, fixed-length codes waste bits.
- Prefix (instantaneous) variable-length codes such as Huffman and Shannon–Fano remain uniquely decodable.
Example: four symbols with . Fixed code: 2 bits each, . Variable code 0, 10, 110, 111: bits = , so efficiency rises from 87.5 % to 100 %. (Morse code uses the same idea: "E" is a single dot.)
Numerical
Probabilities (sum = 1).
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.2 | 2.3219 | 0.4644 |
| x2 | 0.15 | 2.7370 | 0.4105 |
| x3 | 0.25 | 2.0000 | 0.5000 |
| x4 | 0.05 | 4.3219 | 0.2161 |
| x5 | 0.3 | 1.7370 | 0.5211 |
| x6 | 0.05 | 4.3219 | 0.2161 |
| Total | 1 | 2.3282 |
Fixed-length code: 6 symbols need bits each, so bits/symbol.
Maximum code efficiency of this fixed-length encoder:
(Redundancy = 22.39 %.) A variable-length code, e.g. Huffman with bits, would raise the efficiency to .
Answer: bits/symbol; maximum efficiency of the fixed-length code = 77.61 %.
- 2072 Kartik (CS II) · 4 marks
Write a short note on line codes.
Answer
Line coding is the conversion of a binary data sequence into a digital electrical waveform (pulse pattern) suitable for transmission over a baseband channel such as a wire or cable.
Desired properties of a line code:
- No DC component and little low-frequency content (for AC-coupled lines and transformers).
- Small bandwidth.
- Enough transitions for clock (timing) recovery, even in long runs of 0s or 1s.
- Some error detection ability.
- Good noise immunity (low error probability for the given power) and transparency to any data pattern.
Common line codes:
| Code | Rule | Notes |
|---|---|---|
| Unipolar NRZ | 1 → , 0 → 0 | Simple; has DC, poor timing |
| Polar NRZ | 1 → , 0 → | Better noise immunity; DC for unequal 1s and 0s |
| Unipolar/Polar RZ | Pulse for half bit only | Edges each bit; double bandwidth |
| AMI (bipolar) | 0 → 0, 1s alternate ± | No DC; detects single errors; long 0 runs lose timing |
| Manchester | 1 → +/−, 0 → −/+ | Self-clocking, no DC; double bandwidth (Ethernet) |
Example for data 101100:
bits 1 0 1 1 0 0
Unipolar NRZ:
+V |‾‾‾‾ ‾‾‾‾‾‾‾‾
0 | ---- --------
Polar NRZ:
+V |‾‾‾‾ ‾‾‾‾‾‾‾‾
0 |
-V | ____ ________
AMI (bipolar NRZ):
+V |‾‾‾‾ ‾‾‾‾
0 | ---- --------
-V | ____
Manchester:
+V |‾‾ ‾‾‾‾ ‾‾ ‾‾ ‾‾
0 |
-V | ____ __ ____ __
Variants such as HDB3 and B8ZS replace long zero runs in AMI to keep timing.
- 2072 Chaitra (CS II) · 5 marks
If a source emits symbols Xi = {A, B, C, D, E, F} in the BCD format with probabilities P(Xi) = {0.3, 0.1, 0.02, 0.15, 0.4, 0.03} at a rate Rs = 14.4 kbaud, find the following:
i) Information rate
ii) Coding efficiency both with BCD and Huffman coded signal
Answer
Given: six symbols A–F with (sum = 1); symbol rate kbaud = 14 400 symbols/s; BCD format = 4 bits per symbol.
Entropy:
| Symbol | |||
|---|---|---|---|
| A | 0.3 | 1.7370 | 0.5211 |
| B | 0.1 | 3.3219 | 0.3322 |
| C | 0.02 | 5.6439 | 0.1129 |
| D | 0.15 | 2.7370 | 0.4105 |
| E | 0.4 | 1.3219 | 0.5288 |
| F | 0.03 | 5.0589 | 0.1518 |
| Total | 1 | 2.0572 |
i) Information rate
ii) Coding efficiency
BCD coding: each symbol uses 4 bits, .
(The line bit rate would be kbps.)
Huffman coding:
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.4, 0.3, 0.15, 0.1, 0.03, 0.02 | 0.03 + 0.02 = 0.05 |
| 2 | 0.4, 0.3, 0.15, 0.1, 0.05 | 0.1 + 0.05 = 0.15 |
| 3 | 0.4, 0.3, 0.15, 0.15 | 0.15 + 0.15 = 0.3 |
| 4 | 0.4, 0.3, 0.3 | 0.3 + 0.3 = 0.6 |
| 5 | 0.6, 0.4 | 0.6 + 0.4 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| E | 0.4 | 1 | 1 |
| A | 0.3 | 01 | 2 |
| D | 0.15 | 001 | 3 |
| B | 0.1 | 0000 | 4 |
| F | 0.03 | 00010 | 5 |
| C | 0.02 | 00011 | 5 |
Bit rate with Huffman coding: kbps.
Answer: kbps; efficiency with BCD = 51.43 %, with Huffman = 97.96 %.
- 2072 Chaitra (CS II) · 4 marks
Explain Huffman codes with examples.
Answer
A Huffman code is an optimal variable-length prefix code: for a given set of symbol probabilities, no other symbol-by-symbol code has a smaller average length . Frequent symbols get short code words.
Procedure:
- List the symbols in decreasing order of probability.
- Combine the two lowest probabilities into a new probability equal to their sum.
- Put the sum in the reordered list, as high as possible among equal values.
- Repeat until only two (then one) probabilities remain.
- Going back from the last stage, assign 0 to one branch and 1 to the other at each merge; a symbol's code is the sequence of bits on its path.
Example: five symbols A–E with .
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.4, 0.2, 0.2, 0.1, 0.1 | 0.1 + 0.1 = 0.2 |
| 2 | 0.4, 0.2, 0.2, 0.2 | 0.2 + 0.2 = 0.4 |
| 3 | 0.4, 0.4, 0.2 | 0.4 + 0.2 = 0.6 |
| 4 | 0.6, 0.4 | 0.6 + 0.4 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| A | 0.4 | 00 | 2 |
| B | 0.2 | 10 | 2 |
| C | 0.2 | 11 | 2 |
| D | 0.1 | 010 | 3 |
| E | 0.1 | 011 | 3 |
A fixed-length code would need 3 bits (efficiency 70.7 %). No code word is a prefix of another, so "0001110" decodes uniquely as 00 | 011 | 10 = A, E, B. Huffman coding is used in JPEG, MP3 and ZIP.
- 2071 Shrawan (CS II) · 2+4+2 marks
Explain the importance of source coding in Digital Communication System. A discrete memory less source emits one of the eight symbols with probabilities P = {0.25, 0.20, 0.2, 0.15, 0.08, 0.07, 0.03, 0.02}. If the output symbols are encoded using Huffman code, find the Coding efficiency and output bit if the symbol rate of the source is 1000 symbols per second.
Answer
Importance of source coding
Source coding represents the source output with the minimum average number of bits by removing redundancy:
- It brings the average code length close to the entropy (Shannon's source coding theorem: ).
- It lowers the bit rate, so less bandwidth, power and storage are needed.
- Variable-length prefix codes (Huffman, Shannon–Fano) give short words to likely symbols and remain uniquely decodable.
Huffman code
for (sum = 1).
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.25, 0.2, 0.2, 0.15, 0.08, 0.07, 0.03, 0.02 | 0.03 + 0.02 = 0.05 |
| 2 | 0.25, 0.2, 0.2, 0.15, 0.08, 0.07, 0.05 | 0.07 + 0.05 = 0.12 |
| 3 | 0.25, 0.2, 0.2, 0.15, 0.12, 0.08 | 0.12 + 0.08 = 0.2 |
| 4 | 0.25, 0.2, 0.2, 0.2, 0.15 | 0.2 + 0.15 = 0.35 |
| 5 | 0.35, 0.25, 0.2, 0.2 | 0.2 + 0.2 = 0.4 |
| 6 | 0.4, 0.35, 0.25 | 0.35 + 0.25 = 0.6 |
| 7 | 0.6, 0.4 | 0.6 + 0.4 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| x1 | 0.25 | 01 | 2 |
| x2 | 0.2 | 11 | 2 |
| x3 | 0.2 | 000 | 3 |
| x4 | 0.15 | 001 | 3 |
| x5 | 0.08 | 101 | 3 |
| x6 | 0.07 | 1000 | 4 |
| x7 | 0.03 | 10010 | 5 |
| x8 | 0.02 | 10011 | 5 |
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.25 | 2.0000 | 0.5000 |
| x2 | 0.2 | 2.3219 | 0.4644 |
| x3 | 0.2 | 2.3219 | 0.4644 |
| x4 | 0.15 | 2.7370 | 0.4105 |
| x5 | 0.08 | 3.6439 | 0.2915 |
| x6 | 0.07 | 3.8365 | 0.2686 |
| x7 | 0.03 | 5.0589 | 0.1518 |
| x8 | 0.02 | 5.6439 | 0.1129 |
| Total | 1 | 2.6640 |
Average length and efficiency:
(A fixed 3-bit code would give .)
Output bit rate
(The information rate is bits/s.)
Answer: coding efficiency = 97.94 %; output bit rate = 2720 bits/s.
- 2071 Chaitra (CS II) · 2+4+2 marks
Explain the importance of source coding in digital communication system. A discrete memory less source emits four symbols with probabilities P = {0.125, 0.125, 0.25, 0.5}. If the output symbols are encoded using Shannon Fano code, find the Coding efficiency and compare the coding efficiency with that of BCD code.
Answer
Importance of source coding
Source coding removes redundancy from the source output so that each symbol is represented by as few bits as possible on average:
- It reduces the bit rate, so less bandwidth, power and storage are needed.
- It uses the symbol probabilities: likely symbols get short code words.
- The best possible average length is the entropy ; efficiency shows how close a code comes.
Shannon–Fano code
for . In decreasing order: 0.5, 0.25, 0.125, 0.125. Splits: {0.5} | {0.25, 0.125, 0.125}; {0.25} | {0.125, 0.125}; {0.125} | {0.125}.
| Symbol | Step 1 | Step 2 | Step 3 | Code | ||
|---|---|---|---|---|---|---|
| x4 | 0.5 | 0 | 0 | 1 | ||
| x3 | 0.25 | 1 | 0 | 10 | 2 | |
| x1 | 0.125 | 1 | 1 | 0 | 110 | 3 |
| x2 | 0.125 | 1 | 1 | 1 | 111 | 3 |
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.125 | 3.0000 | 0.3750 |
| x2 | 0.125 | 3.0000 | 0.3750 |
| x3 | 0.25 | 2.0000 | 0.5000 |
| x4 | 0.5 | 1.0000 | 0.5000 |
| Total | 1 | 1.7500 |
Comparison with BCD
In BCD each symbol is sent as a 4-bit binary-coded-decimal word (0000, 0001, 0010, 0011), so :
| Code | Efficiency | |
|---|---|---|
| Shannon–Fano | 1.75 | 100 % |
| BCD (4 bits) | 4 | 43.75 % |
Shannon–Fano reaches 100 % because all probabilities are powers of . (If "BCD" is read as the plain 2-bit binary code, ; Shannon–Fano is still better.)
- 2071 Chaitra (CS II) · 3+6 marks
State Nyquist Criteria for zero ISI in both time and frequency domain. What are two major difficulties with duo binary encoding method and explain how can they be solved?
Answer
Nyquist criterion for zero ISI
Let be the overall pulse (transmit filter, channel, receive filter), normalized so , and the bit period.
Time domain: the pulse must be zero at every sampling instant except its own:
Frequency domain: the spectrum and its copies shifted by multiples of must add to a constant:
The minimum-bandwidth solution is (bandwidth , pulse ); the practical solution is the raised cosine spectrum with bandwidth .
Two major difficulties with duobinary encoding and their solutions
Duobinary sends with .
1. Error propagation
The receiver estimates . If one decision is wrong, the wrong value is used for the next decision, and the error carries forward.
Solution: precoding. Before level mapping form
Then if and if , so the detector decides each bit from its own sample: , otherwise 0. No previous decision is needed, so errors do not propagate.
Example (): gives , , , decoded .
2. Non-zero DC (low-frequency) content
is maximum at , so the duobinary signal has a strong DC component. It cannot pass through AC-coupled (transformer or capacitor) lines, and it is unsuitable for single-sideband transmission, which needs a spectral null near zero frequency.
Solution: modified duobinary signalling. Correlate symbols two bits apart:
, so there is no DC component. It is used with the precoder to avoid error propagation.
(Another drawback: three output levels instead of two need more signal power for the same error rate; this is accepted as the price for minimum bandwidth.)
- 2070 Asar (CS II) · 1+3+1 marks
What is source coding? Develop Huffman coding of a 5 symbol source with probabilities: S0 = 0.3, S1 = 0.25, S2 = 0.2, S3 = 0.15, S4 = 0.1. And also calculate Coding efficiency.
Answer
Source coding
Source coding is the process of representing the symbols of an information source by binary code words with the least average number of bits, by removing redundancy, so that the average code length approaches the source entropy (e.g. Huffman, Shannon–Fano coding).
Huffman code
: S0 = 0.3, S1 = 0.25, S2 = 0.2, S3 = 0.15, S4 = 0.1.
Reduction (sum of two lowest moved up as high as possible):
| Stage | Probabilities (descending) | Combined |
|---|---|---|
| 1 | 0.3, 0.25, 0.2, 0.15, 0.1 | 0.15 + 0.1 = 0.25 |
| 2 | 0.3, 0.25, 0.25, 0.2 | 0.25 + 0.2 = 0.45 |
| 3 | 0.45, 0.3, 0.25 | 0.3 + 0.25 = 0.55 |
| 4 | 0.55, 0.45 | 0.55 + 0.45 = 1 |
| Symbol | Huffman code | ||
|---|---|---|---|
| S0 | 0.3 | 00 | 2 |
| S1 | 0.25 | 10 | 2 |
| S2 | 0.2 | 11 | 2 |
| S3 | 0.15 | 010 | 3 |
| S4 | 0.1 | 011 | 3 |
Coding efficiency
| Symbol | |||
|---|---|---|---|
| S0 | 0.3 | 1.7370 | 0.5211 |
| S1 | 0.25 | 2.0000 | 0.5000 |
| S2 | 0.2 | 2.3219 | 0.4644 |
| S3 | 0.15 | 2.7370 | 0.4105 |
| S4 | 0.1 | 3.3219 | 0.3322 |
| Total | 1 | 2.2282 |
Answer: S0, S1, S2 get 2-bit codes and S3, S4 get 3-bit codes; efficiency 99.03 %.
- 2070 Asar (CS II) · 2+4 marks
Define Information and Entropy. Calculate the upper limit of the channel capacity as the bandwidth of the channel B tends to infinity.
Answer
Information and entropy
- Information: the amount of information in a message of probability is bits. Less likely messages carry more information; a certain message carries none.
- Entropy: the average information per symbol of a source:
Upper limit of channel capacity as
Shannon–Hartley: for an AWGN channel with signal power and noise PSD (so ),
Let , so :
When , , and the standard limit gives
Capacity stays finite because the noise power grows in proportion to the bandwidth. At this limit the energy per bit satisfies (−1.6 dB), the Shannon limit.
Answer: bits/s.
- 2070 Asar (CS II) · 6 marks
State Nyquist pulse shaping criteria for Zero ISI. Discuss any one pulse shaping method of ISI reduction.
Answer
Nyquist criterion for zero ISI
For an overall pulse sampled every seconds, there is no ISI if
The ideal solution is the rectangular spectrum of bandwidth , , but it is not realizable and its slowly decaying tails make it very sensitive to timing errors.
Raised cosine pulse shaping
The raised cosine spectrum keeps the zero-ISI property but rolls off gradually:
with , roll-off factor ().
Transmission bandwidth:
Pulse:
The sinc factor keeps zeros at (zero ISI); the second factor makes the tails decay as .
P(f)
|---------. alpha = 0
|----. '. . alpha = 0.5
| '. '. '. alpha = 1
| '. '. '.
+----------+-----+----+--> f
0 Rb/2 3Rb/4 Rb
| Bandwidth | Remarks | |
|---|---|---|
| 0 | Ideal Nyquist, unrealizable | |
| 0.5 | Common practical choice | |
| 1 | Full cosine roll-off, easy filters, tails decay fastest |
Example: kbps, gives kHz.
Advantages: realizable filters, small ISI under timing jitter, wide eye opening. Cost: extra bandwidth . The filter is often split equally as root raised cosine filters at transmitter and receiver.
- 2070 Asar (CS II) · 6 marks
A discrete source emits one of 6 possible symbols per 10 μs in statistically independent manner. The symbol probabilities are 1/4, 1/4, 1/4, 1/8, 1/16 and 1/16 respectively. Calculate symbol rate, entropy and information rate.
Answer
Given: one symbol per s; (sum = 1).
Symbol rate
Entropy
| Symbol | |||
|---|---|---|---|
| x1 | 0.25 | 2.0000 | 0.5000 |
| x2 | 0.25 | 2.0000 | 0.5000 |
| x3 | 0.25 | 2.0000 | 0.5000 |
| x4 | 0.125 | 3.0000 | 0.3750 |
| x5 | 0.0625 | 4.0000 | 0.2500 |
| x6 | 0.0625 | 4.0000 | 0.2500 |
| Total | 1 | 2.3750 |
(Maximum possible for 6 symbols: bits/symbol.)
Information rate
Answer: symbols/s, bits/symbol, kbps.
- 2070 Chaitra (CS II) · 2+3 marks
Elaborate importance of source encoder? Write algorithm for Huffman's coding.
Answer
Importance of source encoder
The source encoder converts the source symbols into binary code words with the minimum average number of bits by removing redundancy.
- It reduces the average code length toward the entropy (), so the bit rate, bandwidth and power needed are reduced.
- It gives short code words to frequent symbols and long ones to rare symbols (variable-length coding).
- It produces uniquely decodable (prefix) codes, so the receiver can decode without separators.
- It saves storage space and makes room for channel coding redundancy.
Huffman coding algorithm
- Sort: list all source symbols in decreasing order of probability.
- Merge: combine the two symbols of lowest probability into one new symbol whose probability is the sum of the two.
- Reorder: insert the new probability into the list in its proper place (as high as possible among equal values); the list now has one fewer entry.
- Repeat steps 2–3 until only one entry (probability 1) is left.
- Assign bits: at each merge, give 0 to one branch (upper) and 1 to the other (lower).
- Read codes: trace each symbol's path from the final stage back to its original position; the bits along the path form its code word.
- Evaluate: , , efficiency .
Short example: → merge 0.125 + 0.125 = 0.25, then 0.25 + 0.25 = 0.5, then 0.5 + 0.5 = 1. Codes: 0, 10, 110, 111; , .
- 2070 Chaitra (CS II) · 2+3 marks
Differentiate between message and information? A discrete source is emitting one of 5 possible symbols per 10 microsec. The probabilities are 1/2, 1/4, 1/8, 1/16 and 1/16. Find (a) Symbol rate (b) Source entropy (c) Information rate
Answer
Message vs information
| Message | Information |
|---|---|
| The actual symbol or sequence produced by the source | Measure of uncertainty removed by receiving the message |
| Has physical form and meaning | Depends only on probability, not meaning |
| Counted in symbols | Measured in bits: |
| A certain message is still a message | A certain message () carries 0 bits |
Numerical
One of 5 symbols every s with .
(a) Symbol rate
(b) Source entropy
| Symbol | |||
|---|---|---|---|
| x1 | 0.5 | 1.0000 | 0.5000 |
| x2 | 0.25 | 2.0000 | 0.5000 |
| x3 | 0.125 | 3.0000 | 0.3750 |
| x4 | 0.0625 | 4.0000 | 0.2500 |
| x5 | 0.0625 | 4.0000 | 0.2500 |
| Total | 1 | 1.8750 |
(c) Information rate
Answer: symbols/s, bits/symbol, kbps.
- 2069 Chaitra (CS II) · 4 marks
A signal of bandwidth 4.5 kHz is sampled at the double rate given by Nyquist, the signal is quantized in 8 levels, the probability of occurrence of the level are 0.1, 0.15, 0.15, 0.05, 0.2, 0.05, 0.18, 0.12. Find the minimum no of bits per sample and information rate.
Answer
Given: kHz; sampled at twice the Nyquist rate; 8 levels with (sum = 1).
Sampling rate: Nyquist rate kHz, so
Minimum number of bits per sample: with a fixed-length binary code, 8 levels need
Entropy (the theoretical minimum average bits per sample with ideal source coding):
| Symbol | |||
|---|---|---|---|
| Q1 | 0.1 | 3.3219 | 0.3322 |
| Q2 | 0.15 | 2.7370 | 0.4105 |
| Q3 | 0.15 | 2.7370 | 0.4105 |
| Q4 | 0.05 | 4.3219 | 0.2161 |
| Q5 | 0.2 | 2.3219 | 0.4644 |
| Q6 | 0.05 | 4.3219 | 0.2161 |
| Q7 | 0.18 | 2.4739 | 0.4453 |
| Q8 | 0.12 | 3.0589 | 0.3671 |
| Total | 1 | 2.8622 |
Information rate:
(With 3-bit PCM words the line bit rate is kbps.)
Answer: 3 bits/sample (entropy limit 2.862 bits/sample); information rate ≈ 51.52 kbps.
- 2069 Chaitra (CS II) · 2+6 marks
What is ISI? Explain two practical methods of minimizing ISI.
Answer
ISI
Intersymbol interference (ISI) is the interference caused at the sampling instant of a symbol by the spread-out tails of neighbouring symbols. A band-limited, dispersive channel stretches each pulse beyond its own interval, so the sample becomes
The sum term is ISI; it reduces the eye opening and causes errors even without noise.
Method 1: Pulse shaping with raised cosine filters
The transmit and receive filters are designed so that the overall pulse satisfies the Nyquist criterion, for . The ideal sinc pulse is not realizable, so the raised cosine spectrum is used:
- Roll-off factor (); bandwidth .
- has zeros at all other sampling instants.
- Tails decay as , so small timing errors cause little ISI.
- Usually split as root raised cosine filters at the transmitter and the receiver (also giving matched filtering).
Example: bps with needs Hz.
Method 2: Equalization
An equalizer is a filter at the receiver whose response cancels the channel distortion, so that channel plus equalizer is close to a Nyquist pulse. The usual form is the transversal (tapped delay line) equalizer:
x(t)->[Tb]--->[Tb]--->[Tb]---> ...
| | | |
c-N c-N+1 ... cN (tap gains)
| | | |
+------+---(sum)-------+---> y(t) to detector
- Zero-forcing equalizer: taps chosen so that at and at the nearest sampling points on each side, forcing ISI to zero there.
- Adaptive equalizer: taps adjusted continuously (LMS algorithm) using a training sequence or decisions, so it tracks time-varying channels such as telephone and mobile links.
(Other methods: correlative coding such as duobinary, and choosing the best sampling instant from the eye pattern.)
Questions from Old Question Collection (BEI EX 656) (BEI Communication Systems (EX 656) exam papers, 2078 to 2081 Chaitra), Communication System I (EX 652) (BEX Communication System I (EX 652) papers 2064 to 2080, plus two old BCT Communication Systems papers (2068, 2071)) and Communication System II (EX 702) (BEX Communication System II (EX 702) exam papers, 2069 to 2081). Answers are written for this site; check them against your class notes.
Chapter titles and hours from the IOE syllabus ↗