Data Communication · Lecture 3

Data and Signals II

Impairments, the limits of data rate, and network performance

Md Mahbub E Noor · Assistant Professor, Department of CSE, University of Barishal

Course: Data Communication · 2nd Year, 2nd Semester

From ideal signals to real channels

  • Explain attenuation, distortion and noise, and where each comes from
  • Calculate gains and losses in decibels, including chains of stages
  • Compute signal-to-noise ratio, as a ratio and in dB
  • Find the maximum data rate using Nyquist and Shannon
  • Calculate throughput, latency, bandwidth-delay product and jitter

Lecture 2

Ideal signals: sine waves, spectra, bandwidth, and B ≈ N/2.


Today

Real channels: what damages signals, how fast a channel can go, and how we measure a network.

Reading: Forouzan, Data Communications and Networking, Sections 3.4 to 3.6

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

2 / 32

Signals arrive changed: three impairments

  • A signal at the end of a medium is never exactly the signal that entered it
  • Attenuation: it gets weaker
  • Distortion: its shape changes
  • Noise: unwanted energy is added
  • The receiver must still recover the original bits

Attenuation

Loss of energy: the signal gets weaker

Distortion

Change of shape: components arrive out of step

Noise

Unwanted energy added: random wiggles

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

3 / 32

Attenuation: the signal loses energy

  • Attenuation means loss of energy, so a weaker signal
  • Some energy is spent overcoming the resistance of the medium and turns into heat
  • Amplifiers boost an analog signal; repeaters regenerate a digital one
  • Loss grows with distance and with frequency

Point 1: original

Point 2: weakened

Amplifier

Point 3: restored

Copper loses energy as heat; fibre loses light to scattering and absorption; radio spreads out in space.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

4 / 32

Measuring gain and loss: the decibel

  • The decibel (dB) measures the relative strength of two signals
  • Negative dB means the signal was attenuated; positive dB means it was amplified
  • Use 10 log for power and 20 log for voltage (power is proportional to voltage squared)
  • Logarithms turn huge ratios into small, easy numbers

dB = 10 log₁₀(P₂ / P₁)

dB = 20 log₁₀(V₂ / V₁)

P = power (watts) · V = voltage (volts) · 1 = input, 2 = output

Power ratio P₂/P₁DecibelsMeaning
× 2+3 dBpower doubled
× 10+10 dBten times stronger
× 100+20 dBa hundred times stronger
× 0.5−3 dBhalf the power lost
× 0.1−10 dB90% of the power lost

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

5 / 32

Worked examples: decibels

  • A signal's power drops to half in a cable: P₂ = 0.5 P₁
  • An amplifier multiplies the power by 10: P₂ = 10 P₁
  • A signal's voltage drops to half: V₂ = 0.5 V₁
  • The P₁ in the ratio cancels, so only the ratio matters

Power halved

10 log₁₀(0.5) = 10 × (−0.301)

−3 dB

Power × 10 (amplifier)

10 log₁₀(10) = 10 × 1

+10 dB

Voltage halved

20 log₁₀(0.5) = 20 × (−0.301)

−6 dB

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

6 / 32

Why engineers love decibels: they add

  • Through several stages, ratios multiply, but decibels simply add
  • Cable losses are quoted per kilometre: dB/km × length = total loss
  • To get back to power: P₂ = P₁ × 10^(dB/10)
  • dBm compares a power with 1 mW: 2 mW = +3 dBm, 0.001 mW = −30 dBm

−3 dB

+7

−3 dB

−3 + 7 − 3 = +1 dB

Cable loss per km: −0.3 dB/km × 5 km = −1.5 dB. With P₁ = 2 mW: P₂ = 2 × 10^(−0.15) ≈ 1.42 mW

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

7 / 32

Try it: add up gains and losses in dB

Interactive

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

8 / 32

Checkpoint 1 · 3 minutes

Check your understanding

Q1

A signal's power drops to one quarter. What is the loss in dB?

Q2

Three stages: −2 dB, +10 dB, −5 dB. What is the total?

Q3

10 mW enters a 10 km cable losing 0.5 dB/km. What power leaves?

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

9 / 32

Distortion: the signal changes shape

  • Distortion means the signal's form or shape changes
  • It affects composite signals, made of several frequencies
  • Each frequency component has its own propagation speed, so they arrive with different delays
  • Components arrive with different phases, so the sum looks different
  • Equalisers at the receiver undo much of the effect

At the sender: f and 3f in step, flat-topped shape

At the receiver: 3f delayed, the shape is bent

Each frequency travels at a slightly different speed, so components drift out of phase.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

10 / 32

Noise: unwanted energy added on the way

  • Noise is any unwanted signal added to the one we want
  • Four kinds: thermal, induced, crosstalk and impulse (table)
  • Thermal noise is always present; it can never be removed completely
  • Defences: shielding, twisted pairs, filtering, error-detecting codes
TypeCauseEveryday example
ThermalRandom motion of electrons in any conductorThe hiss on a radio between stations
InducedMotors and appliances act as transmittersA fan motor buzzing in speakers
CrosstalkOne wire picks up a neighbouring wire's signalHearing another call on a landline
ImpulseSudden spikes: lightning, power switchingA click when a heavy load turns on

Sent + noise = received

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

11 / 32

Signal-to-noise ratio (SNR)

  • SNR = average signal power / average noise power
  • Usually quoted in decibels: SNR(dB) = 10 log₁₀ SNR
  • High SNR: the signal stands clearly above the noise
  • Low SNR: the receiver starts deciding bits wrongly
  • A noiseless channel would have SNR = ∞, an ideal never reached

Animation: SNR sweeps from 30 dB down to 0 dB and back

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

12 / 32

Worked examples: SNR both ways

  • Problem 1: signal power 10 mW, noise power 1 µW. Find SNR and SNR(dB).
  • Ratio: 10 × 10⁻³ / 1 × 10⁻⁶ = 10,000, so SNR(dB) = 10 log₁₀ 10,000 = 40 dB
  • Problem 2: a channel has SNR(dB) = 20. What is the ratio?
  • SNR = 10^(SNR(dB) / 10) = 10² = 100

Signal 10 mW, noise 1 µW

40 dB

SNR = 10⁻² / 10⁻⁶ = 10,000 → 10 log₁₀ 10⁴

SNR = 20 dB as a ratio

100

SNR = 10^(20/10) = 10²

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

13 / 32

Checkpoint 2 · 3 minutes

Check your understanding

Q1

Signal power 2 W, noise power 2 mW. What is SNR in dB?

Q2

A channel's SNR is 30 dB. How many times stronger is the signal than the noise?

Q3

Which noise type does twisting the wires in a cable mainly reduce?

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

14 / 32

How fast can a channel go? Two limits

  • Three things set the maximum data rate: bandwidth, signal levels and noise
  • Nyquist answers: how fast with L levels, if there were no noise?
  • Shannon answers: what is the absolute ceiling, given the noise?
  • In practice, use Shannon to find the ceiling, then Nyquist to choose the number of levels

Nyquist

Noiseless channel

N = 2 B log₂ L

Depends on bandwidth B and number of signal levels L

Shannon

Noisy channel (every real one)

C = B log₂(1 + SNR)

Depends on bandwidth B and the signal-to-noise ratio

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

15 / 32

Nyquist bit rate: the noiseless channel

  • BitRate = 2 × B × log₂ L (B in Hz, result in bps)
  • Doubling the levels adds one bit per signal element
  • In theory, more levels always means a higher rate
  • In reality, more levels sit closer together and noise makes them unreadable
Bandwidth BLevels LBits per levelMax bit rate 2B log₂L
3,000 Hz216,000 bps
3,000 Hz4212,000 bps
3,000 Hz16424,000 bps
20 kHz646240 kbps

Need 265 kbps over 20 kHz? log₂L = 265,000 / 40,000 = 6.625, so L ≈ 98.7. Levels must be a power of 2: use 128 levels (280 kbps), or 64 levels and accept 240 kbps.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

16 / 32

Shannon capacity: the noisy channel

  • C = B × log₂(1 + SNR), with SNR as a ratio, not in dB
  • C is the theoretical highest data rate with arbitrarily few errors
  • It does not depend on the number of levels: noise decides how many are usable
  • Capacity grows in proportion to bandwidth, but only logarithmically with SNR

Telephone line: B = 3,000 Hz, SNR = 35 dB = 3,162

C = 3,000 × log₂(1 + 3,162)

= 3,000 × 11.62

C ≈ 34,860 bps

Very noisy channel: SNR ≈ 0

C = B log₂(1 + 0) = B × 0 = 0

No data at all, however wide the bandwidth

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

17 / 32

Worked example: using both limits together

  • Problem: B = 1 MHz and SNR = 63. What rate, and how many signal levels?
  • Shannon gives the ceiling: 6 Mbps
  • Real systems stay below it for safety, so choose 4 Mbps
  • Nyquist then gives the levels needed: L = 4

Step 1 · Shannon ceiling

10⁶ × log₂(1 + 63) = 10⁶ × 6

6 Mbps

Step 2 · choose a safer rate

leave margin below the ceiling

4 Mbps

Step 3 · Nyquist for levels

4 Mbps = 2 × 10⁶ × log₂L → log₂L = 2

L = 4

Shortcut when SNR ≫ 1: C ≈ B × SNR(dB) / 3. For B = 2 MHz, 36 dB: C ≈ 24 Mbps.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

18 / 32

Try it: Nyquist meets Shannon

Interactive

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

19 / 32

Checkpoint 3 · 3 minutes

Check your understanding

Q1

Noiseless channel, B = 4 kHz, L = 16 levels. Maximum bit rate?

Q2

B = 3 kHz, SNR = 255. What is the Shannon capacity?

Q3

If the SNR doubles but B stays the same, does the capacity double?

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

20 / 32

Measuring a network: five performance terms

MeasureWhat it tells youUnitOn a highway
BandwidthCapacity of the link (Hz or bps)Hz, bpsNumber of lanes
ThroughputData actually delivered per secondbpsCars that actually pass
LatencyTime for a message to arrivesJourney time
Bandwidth × delayBits in flight on the link at oncebitsCars on the road at once
JitterVariation in delay between packetssUneven arrival of buses

Bandwidth is what the link could do; throughput is what it actually does; latency is how long it takes.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

21 / 32

Throughput: what actually gets through

  • Throughput: how many bits per second actually pass a point
  • Always ≤ bandwidth; the gap comes from congestion, overhead, errors and idle time
  • Problem: a 10 Mbps network passes 12,000 frames per minute, each 10,000 bits
  • Throughput = 12,000 × 10,000 / 60 = 2 Mbps

Frames delivered per second

12,000 frames ÷ 60 s = 200 frames/s

200 frames/s

Throughput

200 × 10,000 bits

2 Mbps

The link could carry 10 Mbps, but only one fifth of that is actually used.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

22 / 32

Latency: four delays add up

  • Latency = propagation + transmission + queuing + processing
  • Propagation: time for one bit to travel the distance
  • Transmission: time to push all the message's bits onto the link
  • Queuing and processing: time spent inside routers and switches

■ Propagation

■ Transmission

■ Queuing

■ Processing

propagation = distance / speed

transmission = size / bandwidth

Queuing: waiting in router buffers behind other packets. Processing: reading headers and choosing a route.

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

23 / 32

Worked examples: which delay dominates?

  • Same 12,000 km cable path for both messages: propagation = 50 ms
  • A short email on a fast link: transmission 20 µs, so propagation dominates
  • A large image on a slow link: transmission 40 s, so transmission dominates
  • Rule: small messages care about distance; large ones care about bandwidth

Propagation · 12,000 km at 2.4 × 10⁸ m/s

12 × 10⁶ m ÷ 2.4 × 10⁸ m/s

50 ms

Email · 2.5 kB over 1 Gbps

20,000 bits ÷ 10⁹ bps

20 µs

Image · 5 MB over 1 Mbps

40 × 10⁶ bits ÷ 10⁶ bps

40 s

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

24 / 32

Try it: which delay dominates?

Interactive

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

25 / 32

Bandwidth-delay product: bits in flight

  • Bandwidth × delay = the number of bits that fill the link at one moment
  • Picture the link as a pipe: bandwidth is its cross-section, delay is its length
  • Example: 100 Mbps with 20 ms delay holds 2 million bits
  • To use a link fully, a sender must keep this many bits in flight before an answer returns

length of the pipe = delay

height = bandwidth

100 Mbps × 20 ms = 2,000,000 bits

= 250 kB in flight

A sender that waits for a reply after every packet leaves this pipe almost empty (Lecture 12).

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

26 / 32

Jitter: when delay is uneven

  • Jitter: variation in delay from packet to packet
  • Harmless for downloads, harmful for live voice and video
  • Caused by packets taking different paths and waiting in different queues
  • Fix: a jitter buffer holds packets briefly and plays them at an even pace, adding a little delay

Sent: every 20 ms · received: gaps of 25, 15 and 35 ms

PacketSent (ms)Arrived (ms)Delay (ms)
10100100
220125105
340140100
460175115

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

27 / 32

Try it yourself: Channel Lab

  • 1 · Decibel chain: drag losses and gains; watch the power
  • 2 · Noise and SNR: lower the SNR until bits flip
  • 3 · Channel capacity: compare Nyquist and Shannon
  • 4 · Latency: find which delay dominates
QR code linking to the lab

Scan to open the lab on your phone

Open the lab ↗

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

28 / 32

See it in action: a signal in a real channel

  • Watch a signal fade, get amplified, and fade again
  • See two frequency components drift apart (distortion)
  • Watch bits flip as the SNR falls, then see Shannon's limit move
  • When a “Pause & predict” card appears, answer before the video moves on

Click the video to play or pause · Press → for full screen

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

29 / 32

Checkpoint 4 · 3 minutes

Check your understanding

Q1

A 1,000-bit frame is sent over a 1 Mbps link that is 2,000 km long (speed 2 × 10⁸ m/s). What is the latency, ignoring queuing?

Q2

What is the bandwidth-delay product of that link?

Q3

Packets arrive 50, 52, 70 and 51 ms after being sent. Is there jitter, and which packet suffered most?

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

31 / 32

Key takeaways

  • Signals suffer attenuation, distortion and noise on every real channel
  • Decibels: 10 log for power, 20 log for voltage; stages simply add
  • SNR measures quality; convert dB to a ratio before using Shannon
  • Nyquist 2B log₂L (noiseless) and Shannon B log₂(1+SNR) (the true ceiling)
  • Latency = propagation + transmission + queuing + processing; BDP = bits in flight

Next lecture

Lecture 4 · Transmission Media

Twisted pair, coaxial cable, optical fibre and wireless: how each one fights attenuation and noise, and where each is used.

Reading: Forouzan, Chapter 7 · Practise in Channel Lab

Md Mahbub E Noor

Lecture 3: Data and Signals II

University of Barishal

32 / 32