04. Physical Layering

Fundamentals

Digital Data

Digital data is finite or countably infinite sequence of discrete symbols, each belonging to a finite set called the alphabet.

As any finite alphabet can be represented by a group of bits, any digital data can be represented as a sequence of bits.

Analog Data

Analog data can take on an uncountable number of values which change continuously over time.

Transmission of Analog and Digital Data

With digital data, we want to recover the transmitted sequence of bits exactly, regardless of any distortions or errors introduced by the channel.

When the receiver receives a group of bits, it must choose one out of a finite number of alternatives. The design of the system centers around maximizing the probability that it makes the correct choice.

With analog data, if the channel introduce distortions, the receiver cannot exactly recover the transmitted data as it is faced an uncountably infinite number of alternatives. Thus, the goal of an analog system is to extract the best approximation to the transmitted signal.

Transmission of Digital Data Using Analog Signals

Structure of Communication Systems

Formatting

This step transforms a source signal into digital data (i.e. ADC).

Source Coding (Compression)

The step of encoding digital data with the goal of reducing size. There are two types, lossless and lossy coding.

Lossless coding, also called redundancy reduction, encodes the data such that it can be perfectly restored.

Lossy coding, also called relevancy reduction, is used where humans have tolerance to imperfections, such as video/audio. The decoded data may differ from the original data, but aims to do so while reducing the difference perceived by humans.

Channel Coding

This adds redundant symbols/bits to combat transmission errors in the channel, giving channel decoder a better chance to guess the correct data. Thus, it reduces bit-error probability.

Modulator

Takes the sequence of digital symbols and maps these to a physical signal or waveform of a certain duration (symbol time) - this determines the bit rate.

Could increase the amount of data sent per symbol time, but this will make each symbol closer together and thus more susceptible to interference. To combat this, the power can be increased.

Demodulator and Channel Decoder

The demodulator must produce a guess of what could have been the transmitted waveform (and thus symbol) - this is possible as there is only a finite number of waveforms.

The probability of error, or symbol/bit error rate, is a key performance metric.

The channel decoder uses the redundancy introduced by the channel encoder to correct some or all of the errors made by the demodulator.

In the case of soft demodulation, the demodulator also sends its confidence that a certain symbol has been interpreted correctly.

Source Decoder and Formatter

The source decoder decompresses the compressed source data.

The formatter converts the data to the user.

Baseband Transmission

NRZ (Non-Return-to-Zero) Encoding

A voltage level is associated with each bit value and transmitted for a fixed amount of time - the symbol time. The inverse is the symbol/baud rate.

As one bit is transmitted per symbol time, the symbol rate is the bit rate.

Bipolar NRZ maps 11 to VV and 00 to V-V, while unipolar NRZ/on-off keying maps 11 to VV and 00 to 00 volts.

However, more than two levels can be used - a group of kk bits can be mapped to 2k2^k levels.

Signal Impairments

Assume unipolar NRZ is used below.

Attenuation

Attenuation - loss of signal power; in communications, this is often the loss of signal power for varying distance (path loss).

It is measured as a ratio of signal power at the transmitter output, PtxP_tx and signal power observed by the receiver input, PrxP_rx:

η=PtxPrx \eta = \frac{P_{tx}}{P_{rx}}

This is often expressed using decibels:

ηdB=10log10(n) \eta_{dB} = 10 \cdot log_{10}(n)

If the medium attenuates all frequencies equally, attenuation is a simple division by the attenuation factor.

Unfortunately, the medium does not attenuate all frequencies the same way.

Assuming there is a cut-off frequency in which all frequencies above the cut-off are attenuated completely, the signal will degrade as the cut-off frequency is lowered (fourier series describing square wave; low frequencies sinusoids will remain behind, making it less ‘sharp’).

A more realistic scenario is a low-pass filter.

Thermal Noise

A standard model for thermal noise is additive white Gaussian noise (AWGN) where the noise signal, n(t)n(t) is modelled as a zero-mean, normally distributed function with variance σ2\sigma^2:

n(t)=1σ(2π)exσ2/2 n(t) = \frac{1}{\sigma\sqrt(2 \pi)} \cdot e^{-\frac{x}{\sigma}^{2}/2}

The observed signal will be r(t)+n(t)r(t) + n(t).

The noise is usually dependent on temperature.

Passband Transmission

To transmit several data signals simultaneously on a single channel (while avoiding collisions), passband transmission is required.

Data is transmitted by modulating a sinusoidal carrier of a certain frequency; one signal occupies a certain bandwidth around the center frequency.

By choosing center frequencies with sufficient separation, several data signals can be transmitted in parallel in a sufficiently wide frequency band (e.g. FM radio, Wi-Fi bands). This is also called frequency-division multiplexing.

In digital passband modulation, information modulated onto sinusoidal carrier of duration TT - the symbol duration.

s(t)=A(t)cos(t(fc+f(t))+ϕ(t)),t[0,T] s(t) = A(t) \cdot cos(t(f_c + f(t)) + \phi(t)), t \in [0,T]

Where A(t)A(t) is the amplitude, f(t)f(t) is the frequency offset, ϕ(t)\phi(t) is the phase, and fcf_c is the center frequency.

As each symbol will have their own functions, there may be sudden jumps (in theory) in amplitude as it the waveform moves from one symbol to the next.

There are three forms of digital modulation, each of which varies one of the functions:

Amplitude Modulation (Amplitude Shift Keying) varies A(t)A(t):

si(t)=Aicos(fct)s_i(t) = A_i \cdot cos(f_c \cdot t) where AiA_i is the amplitude corresponding to the iith symbol, and si(t)s_i(t) the waveform for that symbol.

Frequency Modulation (Frequency Shift Keying) varies f(t)f(t):

si(t)=Acos((fc+fi)t)s_i(t) = A \cdot cos((f_c + f_i) \cdot t), where t[0,T]t\in[0,T] and fif_i is the frequency offset for the given symbol.

Phase Modulation (Amplitude Shift Keying) varies ϕ(t)\phi(t):

si(t)=Acos(fct+ϕi)s_i(t) = A \cdot cos(f_c \cdot t + \phi_i), where phiiphi_i is the phase for the iith symbol.

Quadrature Amplitude Modulation (QAM)

A combination of ASK and PSK, varying amplitude and phase according to the symbol simultaneously.

Amplitude-Phase graph with some (square) number of constellation points equally spread apart, forming a grid.

QAM usually applied with 16, 64 or 256 different constellation points, allowing 4, 6 or 8 bits to be mapped to one QAM symbol. Greater throughput but higher error rate.

Synchronization

Sender and receiver need to agree on how long the symbol period is, the exact center frequency, where packets start and and etc.

They have no common time or frequency reference, with each having their own local time and frequency references (using a crystal oscillators).

Oscillator frequency depends on manufacturing tolerances, ageing, temperature, pressure etc.

Hence, the receiver cannot assume the sender has the same time and frequency reference. Hence the receiver must:

Oscillator mismatch and Doppler shift can mess up the frequency, and PSK/QAM require tracking signal phase. Synchronizing frequency and phase is called carrier synchronization.

Manchester Encoding ensures there is at least one signal change per bit: a logical 1 is represented by a change from high to low in the middle of a symbol duration, and a logical 0 from a change from low to high. Voltage goes from -V to V.

The receiver will need to sample the incoming signal at a much higher frequency; if the transition occurs in an unexpected sample, the local clock can be adjusted so that that sample will be exactly in the middle of the symbol time.

Frame Synchronization

Ethernet has a preamble, called SYNC, to allow for initial synchronization; a 64 bit long sequence of alternating 0s and 1s. After this is a start-frame-delimiter; SDF. This is required as when the receiver acquires synchronization, it will have no idea when in the preamble it is.

How does the receiver know when the frame ends?

Ethernet has length fields, but a bit error could occur in the length field so it cannot be trusted.

Bit stuffing is another option: a protocol has some well-known start and end pattern; the pattern must not be allowed to appear in the payload data.

For example, in HDLC, the flag is 01111110; after a sequence of 5 consecutive 1’s, the sender will insert a zero bit. Thus, if the receiver gets six 1’s, it must be the flag; if it gets 5 1’s followed by a 0, it should remove the 0. Unfortunately, a bit error could occur.