School notes / Electronics and information technology

L09

Download this lecture (.md) · Download PDF

It is ok to sample with higher frequency than the Nyquist one, but if we sample less, we get distortion and aliasing.

We have quantization error, but it is reduced by increasing the number of bits in the ADC.

Both analog and digital signals are influenced by noise, but digital signals can be repaired - (if we where repaying analog signals, we dont know what was the intended signal)

Digital signal get distorted only if the noise is really big. We can also do error detection (but probably when streaming we dont do that)

Quantization:

You have a some bit depth which tells you how precise is the ADC - if we use 8 bits encoding, we get to distinguish between 256 levels.

Quantization error is when 2 different values are mapped to the same level.

Human voice transmission:

We usually chope it to just 4KHz, because it is understandable even in that case.

(we dont care about negative frequencies:)

    ampl
    __|__
   |  |  |
------|------ f
      0  ^
         |
        4KHz

So we should sample at 8KHz. that is $125 \mu s$ between samples.

If we use 8 bits per sample, we het 8 bits * 8KHz = 64Kbps. (we can use compression to reduce it to 16Kbps)


Modulation of digital signals (Section XIX):

We can fit more bits through 1 vire using:

multi level modulation - get higher data rates

In one sample we have more than 2 possible levels - need better measurement, but can fit more bits.

alt text

this signal has $B_b = 12$ bps, so the baud rate (S) is 6 baud. (depending on the number of levels - in this case 4 levels => $\log_24 = 2$)

$$\boxed{S = \frac{B_b}{\log_2(M)}}$$

(don’t confuse quantization with modulation - it is about converting analog to digital, not about digital signals through a wire - idk why would you want that, but don’t)

Bandwidth is the range of frequencies that a signal can occupy.

BTW: Nyquist bit rate = 2 * Bandwidth * log2(M) where M is the number of levels. is the maximum bit rate we can achieve.

Nyquist’s formula assumes a noiseless channel; in a noisy channel, the maximum theoretical bit rate is given by the Shannon-Hartley theorem: $C = B \log_2(1 + \text{SNR})$

SNR is the signal-to-noise ratio, which is a measure of how much noise is present in the channel relative to the signal strength.

We use again the f/phase/ amplitude modulation, but since it is digital, we can repare it again which makes it more robust in some cases.

ASK (Amplitude Shift Keying) - equivalent to amplitude modulation

alt text

Multi level ASK is called M-ASK.

For modulating carrier frequency, (when we move it from 0) get $B_{mod} = 2 \cdot B_b$

also the base-band bandwidth is $B_b = S / 2$

so in ideal case, we can get $B_{mod} = 2 \cdot S / 2 = S$

in real case:

If in exam we are not given $d$, we can assume it is 0: $\boxed{B_{mod} = (1 + d) \cdot S}$ where $d \in [0, 1]$

Example:

B = 100kHz (from 200 - 300kHz)

& using 8-ASK

=> Carrier frequency = 250kHz

8-ASK => 3 bits per symbol

we use formula $B_{mod} = (1 + d) \cdot S$ to get the baud rate:

$B_{mod} = 100kHz = (1 + d) \cdot S$ => $S = 100kHz / (1 + d) = 100Kbaud$

$$S = R / \text{bits per symbol} \Rightarrow R = S \cdot \text{bits per symbol} = 100Kbaud \cdot 3 bits/symbol = 300Kbps$$

FSK (Frequency Shift Keying) - equivalent to frequency modulation

alt text

Bro says, that the formula is derived by experiments, so we should not care about the “proof” that is usually in books.

$\boxed{B_{mod} = S \cdot (L + d)}$ where the $L$ is the number of levels.

Example:

B = 100kHz (from 200 - 300kHz)

2-FSK and $d = 1$

=> Carrier frequency = 250kHz

There are 2 levels, so L = 2

$B_{mod} = S \cdot (L + d) = S \cdot (2 + 1) = 3 \cdot S \Rightarrow S = 100KHz / 3 = 33.33Kbaud$

$S = R / \log_2(L) \Rightarrow R = S \cdot \log_2(L) = 33.33Kbaud \cdot \log_2(2) = 33.33Kbps$

PSK (Phase Shift Keying) - equivalent to phase modulation

alt text

$B_{mod} = S \cdot (1 + d)$

QAM (Quadrature Amplitude Modulation) - combines amplitude and phase modulation

https://www.draytek.co.uk/information/blog/what-is-qam-and-how-does-it-work

^^ is constellation diagram it shows both the angle of the phase shift and the amplitude of the signal.

$B_{mod} = S \cdot (1 + d)$

Example: What is the bandwidth occupancy of a 1 Mbps signal modulated with QAM?

  • An (M)-QAM signal carries $\log_2 M$ bits per symbol.
  • The bit rate is $R = S \log_2 M$, and $B_{\text{mod}} = (1+d)S = \frac{(1+d)R}{\log_2 M}.$
  • For (d=1): $B_{\text{mod}} = \frac{2R}{\log_2 M}.$
  • With 16-QAM: $B_{\text{mod}} = \frac{2 \times 1\text{ Mbps}}{4} = 500\text{ kHz}.$
  • With 256-QAM: $B_{\text{mod}} = \frac{2 \times 1\text{ Mbps}}{8} = 250\text{ kHz}.$
  • With 1024-QAM: $B_{\text{mod}} = \frac{2 \times 1\text{ Mbps}}{10} = 200\text{ kHz}.$

All the formulas:

modulation$B_{mod}$$S$$R$
AM$2 \cdot B_b$N/AN/A
FM$2(\beta + 1) B_{\text{base}}$N/AN/A
ASK$(1 + d) \cdot S$$B_{mod} / (1 + d)$$S \cdot \log_2(L)$
FSK$S \cdot (L + d)$$B_{mod} / (L + d)$$S \cdot \log_2(L)$
PSK$(1 + d) \cdot S$$B_{mod} / (1 + d)$$S \cdot \log_2(L)$
QAM$(1 + d) \cdot S$$B_{mod} / (1 + d)$$S \cdot \log_2(M)$

Multiplexing:

Multiplexer is a switch which gets multiple input cables and sends them through one output cable.

The output cable needs to have enough capacity to carry all the input signals (for example band width or be able to more bits per second in 1 band to do time switching).

TDM (Time Division Multiplexing) - we send the signals one after another in time.

In time it changes who’s data are being sent.

alice   \
bob  ---- MUX -> |alice[0]|bob[0]|charlie[0]|alice[1]|bob[1]|charlie[1]| ... |
charlie /

FDM (Frequency Division Multiplexing)

That is the thing we did with modulation - when different frequencies carry different signals. To fit into the same medium.