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
- Most transmission media only allows transmission of an analog physical signal taking on a continuous range of values over a continuous time interval
- Signal/waveform denotes the evolution of some physical quantity over time
- Modulation is when this signal is modified according to the data
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
However, more than two levels can be used - a group of
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,
This is often expressed using decibels:
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,
The observed signal will be
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
Where
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
Frequency Modulation (Frequency Shift Keying) varies
Phase Modulation (Amplitude Shift Keying) varies
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:
- Synchronize its time/frequency reference with the transmitter’s
- Track and maintain it during packet reception
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.
- The transmitter transmit symbols at its own pace, using its local clock
- The receiver needs to extract information about symbol duration so it knows when symbols start and end
- For longer streams, the receiver clock must be synchronized continuously.
- In NRZ or on-off keying, long runs of the same bit mean long durations with the same voltage/amplitude, causing loss of synchronization
- Thus, the signal level must change sufficiently often
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?
- Time gap: medium kept idle between frames
- Code violation: deliberate violations in encoding method (e.g. bit with no transition for Manchester encoding)
- Length field
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.