Topic 3a covers the physical layer and Topic 3b shall cover link-layer addressing and MAC protocols.

Note: nearly all of the detail on this Topic 3a page is not relevant for a Computer Science degree. Instead, it is Computer Engineering. Candidates should understand the basic information capacity formula and the differences between cable and wireless, and the names and differentiating aspects of each of the topics presented, but need not study any of the block diagrams or power budgets presented. The formal syllabus is on the first tab of the course web page; it does not explicitly mention the physical layer (L1). But aspects of the physical layer, especially wireless networks, inevitably affect the data link layer (Topic 3b). Note the ordering of materials has varied since the syllabus was last updated.

Topic 3a - Physical Layer and Physical Channels

Channels Discussed


0. Fibre
1. Asynchronous RS232
2. Block-coded (synchronous, baseband)
3. QPSK radio (synchronous, broadband)
4. OFDM (synchronous, FDM internally, baseband or broadband)
5. CDMA (synchronous, code-division multiplexing (CDM)
Also, scrambling for security or transitions and whiteness – likely not lectured 25/26.

Introduction

The physical layer (L1) conveys digits from one device to another along an analogue channel.

Simplex Digital Channel - Generic Block Diagram
Simplex Digital Channel - Generic Block Diagram

In a packet network, the bits from the packet need to serialised for transmission and reassembled correctly at the receiver. Quite where the physical layer becomes the data link layer is sometimes vague, especially with advanced coding schemes where the most likely decode of a sampled waveform into a complete packet is decided.

Generally speaking, the packet must be split into words and then the words into coding symbols, such as the block codes discussed later. In addition, in a multi-access system, a 'write gate' signal enables the transmitter, since senders must take turns, as dictated by the MAC protocol.

Nearly all packet channels support the concept of idle symbols between packets, so a data qualifier signal is also generally passed in and out of the channel transmitter and receiver, respectively. This indicates whether a word is semantically meaningful, or whether it can be freely ignored or replicated by the channel modulation. This can also serve as the basis of packet delineation.

The distinction between encoding and modulation is sometimes not very clear. Sometimes it is clear. For instance, Manchester coding and 4B5B encoding are indeed encodings. Multiplying a carrier wave from a local oscillator using a mixer is modulation. In older systems, encoding would be digital and modulation analogue. But today, as much as possible is generally done in the digital domain, using a final conversion to analogue through a DAC (digital-to-analogue convertor).

The reception process is the reverse of transmission, with the received waveform being demodulated. Various signal quality indications/metrics become available, such as the received signal strength indication (RSSI) and the rate of correctable or undecidable decoding events.

Coding Overview

Physical channels can carry data proportional to bandwidth and signal level and inverse proportion to noise level.

Baseband vs. Broadband channel: A sequence of binary ones and zeros, represented by two different voltage levels, is known as an NRZ data stream (non-return to zero). This is a baseband signal. If more than two voltages are levels are used, it is a multi-level, baseband, symbol stream. Such a stream generally has a sync frequency spectrum, with the first null at 1/B, where B i the baud rate: the spacing between each symbol. A baseband signal can be converted to a broadband signal by up-converting it: this refers to multiplying it with an oscillator-generates sine wave in the analogue domain. It can be down-converted back again by hetreodyning, which is again multiplying by a sine wave, followed by low-pass filtering.

Synchronous vs. Asynchronous digital communication: For circuit-switched TDM systems, a global clock is commonly used, distributed from an atomic clock using a big fan-out tree so that every time/space switch and link operates in lock-step and samples or slots do not build-up or underrun at any point. This is synchronous (same clock) operation and is the principle behind Sonet and SDH.
With asynchronous communication, the transmitter and receiver have separate clocks and the receiver uses dead reckoning from a starting transition to estimate the centres of the subsequent bit cells or symbol cells. The classic example is the UART (universal asynchronous receiver/transmitter).
In many systems, such as packet-switched LANs, each link operates synchronously, with data sent timed by a local clock at the sending end and with this clock being recovered by a resonator or phase-locked loop at the receiver. This overcomes the packet length limitation arising from dead-reckoning in an asynchronous UART, but avoids the complexity of global clock distribution, as generally needed for TDM.

First generation digital TDM systems used plesiochronous timing, where the transmitting clocks were not globally synchronised, but padding symbols, known as 'justifiable service digits' had to be inserted and deleted on a regular basis to compensate for frequency wander and errors.

Synchronous vs. Asynchronous Digital Communication ... continued/recap

Asynchronous operation: Transmission is sporadic, divided into frames.

The transmitter and receiver have oscillators which are close in frequency, respectively producing TX clock and TX clock. RX clock drifts with respect to TX, but stays within a fraction of a baud throughout the duration of a frame.

Receiver synchronises the phase of its RX sampling with TX by looking at one or more bit transitions. Transmission time (frame length) is limited by accuracy of oscillators.

Synchronous operation: Transmission is continuous and does not have to have frames. Synchronisation can be global or link-local.

The receiver continually adjusts its frequency to track timing information inherent in the incoming signal. It requires frequent bit transitions to recover the TX clock. Clock recovery: A phase-locked loop tracks where clock edges nominally occur, correcting itself slightly when wrong.

Asynchronous Operation Classic Example - The UART

UART data configurations and data format from Modern SoC Design On Arm
UART data configurations and data format (from MSD).

A universal asynchronous receiver-transmitter (UART) was typically associated with the RS-232 serial port. UARTs were widely used in the 20th century for character I/O devices (teleprinters, printers and dumb terminals). They are still commonly used in practical SoC designs since they are some of the most simple and easy devices to get working. The first test that nearly any newly developed SoC runs is to print ‘Hello, world’ from its UART. UARTs are also found in virtualised form entirely inside a SoC. For instance, it might be used instead of a bus connection to a ZigBee IP block.

A serial port uses two independent simplex channels, one for output and one for input, to make a full duplex channel. A nine-pin D-connector is used for the serial ports in Figure 2.29, but only one wire is needed in each direction, as shown in Figure 2.30. The two data directions plus a ground pin mean that only three out of the nine pins are actually used. The additional connections are sometimes used to indicate device ready status and to implement Xon/Xoff flow control (Section 3.4.4). Data are sent serially at a pre-agreed baud rate. The baud rate is the maximum number of transitions per second on one of the signals. The effective data rate is less than the baud rate due to the overhead of the start and stop bits. The baud rate and number of bits per word must be pre-agreed at each end, such as 19 200 bps and 8 bits.

The received signal is clocking into a D-type (that can very rarely go metastable) using a locally-synthesised clock of typically 16 or 32 times the baud rate. Say 16. After the first zero-to-one transition is detected, the receiver will wait 24 clock pulses and treat the value at that point as the first bit, shifting it in to a register. It will then delay 16 further clocks and repeat. Finally it has the whole word (typically a byte).

NRZ data and other Simple Encodings (Modulation Schemes)

NRZ data and other Simple Encodings (Modulation Schemes)
NRZ data and other Simple Encodings (Modulation Schemes).

Raw NRZ data is polarity sensitive; it has arbitrary low-frequency content and it may not have sufficient transition density for clock recovery. A mixture of modulation techniques is always applied.

Signals and Noises

The digital channel offered by the physical layer has two main parameters: bandwidth (aka throughput) and latency (aka delay). Generally both of these are constants for a given channel, but they can vary or behave more randomly, especially for radio channels. Further parameters relate to availability and error rates.

For the underlying analogue channel, further basic parameters include:

These parameters give us an overall link power budget.

The maximum transmit power is limited often by human safety considerations, but also legislation, practicality and energy costs or battery life.

In communications, power is often expressed in dBm, which is the ratio of the power compared with 1 milli-Watt. Two advantages of dBm are convenient numerical values and path losses, expressed in dB, simply adding up.

Power in dBm is given by 10 x log (Power in Watts) + 30.

Signal and noise spectrum illustrations for baseband and broadband.
Signal and noise spectrum illustrations for baseband and broadband.

The best possible digital channel the link electronics can make out of a given analogue channel is restricted by the well known Shannon–Hartley theorem.

Information capacity is directly proportional to the bandwidth or signalling rate. Information capacity is logarithmicly proportional to the signal-to-noise ratio. For instance, if a two-level signal is augmented to an 8-level signal, with the same absolute level spacing and noise level, the error rate should be unchanged, the voltage range has been multiplied by 8 (which is about 64 times more power) and the data rate has been multiplied by 3 (from 1 bit per baud to 3 bits per baud). Overall, the information content increases by one bit for each doubling of the voltage range, which is a logarithmic law.

Physical Layer

The physical layer (L1/PHY) is essentially responsible for transferring bits from the sender (the transmitter TX) to the receiving end (receiver/RX).

In a shared medium, or multi-access system, layer 1 also provides a switching or multiplexing system, since multiple senders can communication with multiple receivers. This encompasses uni-cast, multicast and broadcast, according to how many of the receivers pay attention to the data.

Some physical media support more than one sender at once (eg. spread spectrum), but for now, attention lies with a single sender active at once, possibly continuously, sending data into a simplex channel.

Bit boundry (and clock) recovery

The L1 receiver must interpret the real-world analogue signal, quantising it into bits. Many physical layer coding schemes have used just two waveform (eg. voltage) levels and quantise the analogue signal into a bit stream, but multi-level signalling is also commonly used. A fixed-length symbol interval is nearly always used.

The signalling rate is called the baud rate. The received waveform can generally be decoded by sampling it at the baud rate. For instance, if a 4-level signal has a baud rate of 1e6 then the raw data capacity is 2 Mbps. For a 3-level signal, it would be log(3)/log(2) x 1e6 bps.

Sometimes the data rate is less than the baud rate because redundancy has been introduced. A level of data redundancy is needed so that the receiver can maintain synchronisation with the transmitter. The capacity 'wasted' by the redundancy is used for conveying a timing signal and it can sometimes provide forward error correction (FEC), since the receiver is then guided in decoding an otherwise ambiguous waveform.

Transition density

The basic technique for conveying timing is to ensure the transition density does not drop too low. A long stream of consecutive symbols has no discernible features at the baud boundaries, which can cause loss of synchronisation: there is always a practical limit to how long a receiver can use dead reckoning to work out how many baud intervals have elapsed. This depends on manufacturing and operating tolerances, and also on Doppler shift if the channel length is changing.

Our first example will use a 4B5B block code to limit runs of consecutive symbols. This sends 4 bits for every 5 baud. This a fixed overhead, leading to a constant bit-rate channel. Other techniques, such as bit-stuffing, only introduce overhead in the presence of troublesome bit sequences, which may be rare, leading to a variable effective throughput.

DC component and short pulse minimisation

Most channels cannot convey very low frequencies. For instance, in the transformer-coupled twisted-pair channel of our first example, the transformers have a lower cut-off frequency, since transformers can never convey DC. Also, low frequency content can interfere with the AGC. We shall not discuss this topic further.

Some channels, notably those on optical and magnetic tapes and discs, can convey the time of an edge quite accurately, but cannot cope with very short intervals between edges. These tend to use a family of line codes where the symbols are some number of consecutive baud intervals with the same value. These are called run-length-limited codes. The run-length might vary between 4 and 11. Any shorter and an optical disk or CD cannot be manufactured properly. Any longer and the receiver will lose synchronisation. We shall not discuss this topic further.

Polarity recovery/insensitivity (NRZI) coding

Some channels may invert the data. This is especially common with twisted-pair channels, where it is quite common for the two wires of the pair to get swapped over, which inverts the data. The typical solution is for a change of value to indicate a one and a non-change to indicate a zero. This is polarity insensitive. However, the condition that the data has sufficient transitions now changes for accurate clock recovery to a condition on the average density of ones (each one is a transition).

Frame boundary recovery

As well as conveying bits and determining bit boundaries, some channel coding approaches can also carry non-data symbols. There are important for clock domain crossing (as discussed later), but they may also be used to delimit frames. Such techniques are commonly used in packet radio systems, LANs and disk drives, where the frame corresponds to a sector (or block).

The 4B5B coding example we look at first, will use 16 out of the possible 32 five-bit words for data. The remainder are mostly unusable owing to insufficient transitions, but one or two can be used for packet delineation, since they are guaranteed not to occur inside a packet. Generally (not shown), an NRZI encoder is added at the transmitter, with a matching decoder at the receiver. The selection of appropriate code words should then be biased towards those with the most ones and the fewest consecutive zeroes, since they provided the greatest transition density.

Bit-stuffing may also used for frame delineation by reserving a particular pattern of bits to denote end-of-frame. This pattern must not appear inside the data itself of course, so another (longer) pattern, which can also never occur, is inserted instead and the reverse is done at the receiver. This is called 'escaping'. We are familiar with the sequence '\\' in the printf of C to denote backslash, since a single backslash is the escape character itself, and so cannot be used directly to denote itself.


Example 1 - 4B5B twisted-pair simplex channel (SERDES)

Generic baseband channel, with twisted pair instantiated.

Computers normally use data words consisting of multiple bits, such as 32 bits. Our example PHY channel presents a 32-bit interface to the layer above. It serialises these bits for transmission over the twisted-pair channel. They are de-serialised at the receiver. A component that contains both a receiver and a transmitter, for making a duplex link, is therefore known as a SERDES.

The twisted-pair itself is connected to the equipment at each end via transformers (the so-called magnetics block). This makes sure there is no current path between the two machines. Current paths can cause problems to do with earthing and lightning strikes. The transformers also provide common-mode rejection, meaning that if one machine has its ground potential varying form another, or noise pickup induces a voltage in both of the twisted conductors at once, no affect is seen at the receiver. This is called 'differential signalling', where only the voltage difference between the two conductors is significant.

A coaxial cable may also be used instead of the twisted pair. There is no difference in basic design.

Impedance matching: a long twisted pair or coax cable behaves like a 'transmission line'. Owing to the speed of light, a voltage at one end will not instantly cause a current to flow that accords with the resistance of the circuit, since this is tantamount to instantly finding out what resistor someone has connected across a distant pair of terminals. Instead, the current that initially flows is given by the 'characteristic impedance' of the cable, which is typically between 50 and 110 ohms. For clean operation, a resistor of that value (not shown) is connected between the pair at the far end, so that the signal that is received is totally absorbed and does not bounce off. Similarly, a resistor of the same value (not shown) is put in series with the transmitting line driver, so that any signal that does bounce off, or is picked up, is adsorbed at the sender.

Gearboxing

For very high data rate serial interfaces, such as for HDMI, SATA or super-computer interconnect, gearboxes are used as successive stages of narrowing at the sender and widening at the receiver. These conserve data, so the input word-width times word-rate is equal to the same product at the output. The figure shows 32-bit words at 12.5 MHz being converted to 4-bit words at 100 MHz. Although 100 MHz is not a high frequency for modern CMOS, gearboxing is certainly required for multi-gigabit serial links. They reduce the amount of logic that has to be operated at the fastest clock frequencies. A gearbox is implemented as a shift-register coupled to a broadside register in load-then-shift order for sending and shift-then-unload for receiving.

Block Coding

Block coding is commonly used for fixed-ratio modulation and demodulation. The coder and decoder are basically ROMs (although gate implementation is also possible owing to the typical low-density of covers needed: a cover is a term in a minimal sum-of-products representation). For sending, four bits of data are converted to a 5-bit codeword, designed with the aforementioned considerations. The receiving, codewords that are not in the codebook are flagged as 'coding violations' and their average rate gives an indication of link quality. A good density might be 1e-10.

Block codes use a variety of coding ratios. 4B5B and 8B10 are quite common, each adding 20 per cent overhead. Fibrechannel uses 64B66B encoding for 10 Gbps and higher rates, adding significantly less overhead.

Analogue Front End (AFE)

The AFE is all parts of the receiver before the signal becomes digital again.

AFE functions include filtering, amplification, equalisation, automatic gain control (AGC), clock recovery and the decision flip-flop (or ADC).

A bandpass filter is present at the input of the AFE (not shown) to reject pick-up that is out of the frequency range of interest. For a baseband copper signal, this can often be intrinsic, in that the transformers will limit the low frequencies received and the roll-off of the RX amplifier will be designed to be about 0.707 of the baud rate. One form of pickup that is quite common these days is from a mobile phone that someone has placed on top of the equipment. But this will be broadcasting in the GHz range, which is below the service bandwidth of most copper data channels. (A more significant issue is the 250 us envelope amplitude from the time-domain duplexing if it hits a non-linear component, such as a clamping diode).

For copper cables, the loss per metre is very frequency dependent, owing to the 'skin effect'. The skin effect is that high-frequency parts of the signal are only conveyed in the outermost edge of the wire, which has shallow depth and hence high resistance. Lower-frequency components are carried much better, since the whole area of the copper is used. For instance, CAT-5 cable may have a loss of 0.2 dB/m at 100 MHz but half (ie 0.1 dB/m) that amount at 10MHz. This variation causes considerable waveform distortion. To overcome the loss, a filter with reciprocal phase and frequency response is used, known as an equaliser. Also, to overcome the general loss, an amplifier of variable gain is used, controlled inside a feedback loop (AGC=automatic gain control). Hence the signal presented at the D-input of the decision flip-flop will have roughly the same shape and amplitude regardless of cable length.

The other input to the decision flip-flop is the recovered clock. The local clock of the receiving equipment is independent of the clock used by the transmitter to generate the waveform. The two clocks will inevitably differ slightly in frequency (eg 25ppm) and the frequencies will drift according to temperature and battery voltage and so on.

Clock-crossing Bridge (CBRI)

Contemporary digital hardware design always uses synchronous logic. In a synchronous clock domain, all flip-flops are connected to a common clock. This is not possible where data is arriving from more than one source, each synchronised to its transmitter's clock. Therefore, data timed with the output of the clock recovery unit needs to cross a clock domain boundary before significant processing in the receiving equipment. This is the function of the CBRI. An explanation of internal operation appears in section 3.7.3 of Modern SoC Design on Arm by DJ Greaves.

Data Qualifiers

An important consequence of asynchronous operation is that a link can generally not be connected to another link of the same nominal throughput if it is to run at 100 per-cent utilisation. This is because, when data is transferred to a nominally-the-same link that is operating at a slightly slower frequency, even by 1 part-per-million, owing to manufacturing tolerances and operating drift, the data will build up indefinitely and have to be thrown on the ground (togged).

Therefore, a digital channel must be slightly over-provisioned by building a margin that accommodates the maximum variation likely to be encountered. This means the channel must have the concept of being idle. Idle periods can be inserted between frames in a packet system. A density of one byte every ten thousand is generally all that is needed. This accommodation for idleness permeates the whole design. In the 4B5B system, one of the code words is typically designated as an idle symbol. They are inserted by the transmitter when there is nothing to send and always ignored by the receiver. This turns the whole system into a FIFO-like structure, with word qualifier strobes present on every interface. Data on the data bus is ignored when the qualifier is not asserted. The maximum duty cycle of the qualifier must not exceed the fraction dictated by the timing tolerances.

Copper Link Power Budget - Typical Figures

The transmit power might be about 0 dBm (eg 1 volt peak-to-peak, which in rms terms, is 1.3 mW given a 100 ohm characteristic impedance).

All of the transmitted power enters the cable, so there is no scattering loss to worry about (apart from a very small amount of radiation from unbalance in the cable twisting).

The receiver sensitivity (before self-noise dominates) might be 10 mV peak-to-peak, which is 40dB less, or roughly -40 dBm.

The cable path loss might be about 0.2 dB/m, giving a maximum length restriction of 200 metres.

The near-end cross talk (NEXT) will be about -30 dB in many cases, so the full length cannot be used in duplex cables. Or perhaps cancellation of the known-to-be-transmitted signal can give another 10 dB of margin, but this is problematic if multiple pairs in the same cable are being driven at once, as in gigabit Ethernet.

High quality cabling have a tight NEXT specification (eg -44 dB for CAT 6), which may make the channel not limited by NEXT.

Pick-up should be negligible in most cases, especially if shielded twisted pair or coax is being used. But if operating next to an electric blast furnace or EMP bomb testing range, there could be problems. Optical fibre does not suffer from that!


Example 2 - Variations for Optical Channel

"The good thing about optical fibre is you get a completely fresh instance of the ether on each fibre" - DJ Greaves.

Changes required for the generic baseband channel to use optical fibre.

A baseband optical fibre channel is very much like a baseband copper channel, especially for binary signalling. Linearity issues can make multi-level signalling harder on fibre, so just using higher bandwidth is the normal approach.

Fibre Link Power Budget - Typical Figures

The transmit power might be about 10 dBm (ie 10 mW).

The above figure is nominal amount of light that enters the fibre. There is a scattering loss, owing to some light not entering the fibre, but this figure may not be revealed in the product datasheet.

The receiver sensitivity before self-noise dominates might be about -20 dBm.

The fibre loss might be about 0.5 dB/km, giving a maximum length restriction of 60 km.

Tight bending or attempts at tapping it can cause greater losses.

Optical connectors tend to be lossy (2 dB), so fusion splicing preferred as far as practical.

There will be zero near-end cross talk (NEXT), unless optical directional couplers are used for duplex operation on a single fibre. These couplers have an intrinsic 3 dB insertion loss and some excess loss. They can be bulky, not very directional and so on.

Most fibre-to-the home systems use a passive optical network (PON). The fibres from each home in a group of up to 100 are fused in a glass block, so that light from any home is sent to the kerb-side box and light from the kerb-side box is split evenly to every house. This is an example of a fibre system that is not a simple point-to-point channel. PONs use time-division duplexing, so at most one device is ever transmitting at once, as governed by a PON media-access protocol (MAC). Hence the laser in each device needs to be turned off most of the time, and only brilliant when the write gate signal is activated.

Pick-up is negligible in all cases, which is another almost ideal aspect of optical fibre.


Example 3 - Typical Radio (Wireless) Channel Structure

Typical Radio (Wireless) Channel Structure.

Radio Link: Operation

A radio system is broadband, with the baseband signal being up-converted using a radio frequency (RF) local oscillator or carrier.

The carrier frequency (or range of usable frequencies for a given application) must be selected in consultation with international standards associations. Sniff-and-send approaches increasinlgy could this more dynamic.

In mathematical terms, y(t) = sin(2 pi fc t), represents a sine wave output from the local oscillator of frequency fc Hz. The other represents any of the parts of the Fourier transform of the baseband signal....

An analogue multiplier, known as as mixer, combines the baseband signal with the carrier. This is an amplitude modulation (AM) transmission. It is based on the hetrodyning trig identity

    sin(a) x sin (b) = 1/2 cos(a-b) - 1/2 cos(a+b)
  

The result of the multiplication is essentially the sum of two further sine waves, known as the sidebands. If the local oscillator also generates a cosine output, and this is modulated with a separate base band signal, as is commonly done, the two side bands can convey different data streams, resulting in twice the data being carried in the same broadband range. TODO clarify...

Analogue filtering is typically applied on the input and the output of the modulator, to limit unlicensed and spurious admissions (such as the odd harmonics of a square wave signal on the output of the baseband).

For multi-access use, the transmitter must only be turned on when the MAC protocol deems it is time to send a frame. This is controlled by the 'write gate' signal from the MAC logic.

At the receiver, the reverse procedure is essentially used. However, filtering must be carefully designed so that only the desired part of the radio spectrum is received and amplified, otherwise the receiver can be overwhelmed with other transmissions on nearby frequencies, or jammed deliberately. The receiver local oscillator does not have to exactly match the transmitter's frequency: any small offset appears as a beat frequency that can be removed with a further complex multiplication in the receiving DSP processing.

All of the principle blocks that appeared in the binary baseband channel are implemented in the DSP implementations, such as modulation, clock recovery, demodulation and block boundary delineation. They are more complex for the multi-level modulation schemes typically used.

A frequency management plan must be used to ensure that no two devices transmit on the same carrier at once.

Radio Frequency Spectrum
Radio Frequency Spectrum (from Peterson+Davie)

Radio Link: Power Budget - Typical Figures

The transmit power might be about 10 dBm (eg 10 mW, but mobile phones use up to 4W or 36 dBm).

With a simple antenna system, radio waves go out in all directions (isotropically) and scattering loss is the dominant form of loss. For isotropic emissions, the inverse square law applies. A directional antenna, such as a microwave dish, has far less scattering loss, since the radio waves are only sent in the intended direction.

Equally, pickup noise is greatly reduced by having a directional receiver, such as a microwave dish or a multi-element phased array with electronic beam steering. The phased array makes a weighted sum of the signals received at each elemental antenna in a way that reinforces only in the required direction and cancels-out as much as possible in the other directions.

The receiver sensitivity before self-noise dominates might be 10uV (or -80 dBm - please do exact sum here DJG).

The path loss (attenuation) depends on the atmosphere, but is zero in outer space and a few tens of dB during rain storms in foggy countries like Wales.

Pick-up is generally a big problem for radio systems, especially from faulty or unlicensed equipment. I purchased a battery charger from Amazon that was CE-marked but which completely obliterated BBC Radio 2 all over our estate.

Code-division Multiple Access (CDMA)

It is easy to generate pseudo-random (ie. repeatable) bit sequences (PRBS) using digital hardware: an arrangement of D-types and XOR gates, as per the scrambler, is generally used.

A PRBS generator is customisable by selecting some set of feedback taps. Further customisations arise by combining a set of specific PRBS generator outputs, again using XOR. The resulting bit pattern is known a chip sequence keyed by the arrangement selected.

A set of chip sequences can serve as a set of spanning vectors for multiplexing, thereby providing code-division multiple access. The sequences will have very low cross- and auto-correlation. The absolute value of these correlations will be unity if the self-same chip sequence is correlated with itself with zero timing offset, and less than 1/N in all other ways, where N is the length of the chip sequence. Hence, if data from other CDMA sequences is added to a CDMA channel, it just appears as fairly white noise at a level of 1/N. If N is 200 for instance, 20.log(1/200) gives -46 dB, which is a pretty good S-to-N ratio for digital communication.

CDMA is used in several wireless broadcast channel (cellular, satellite, etc) standards. A unique “code” assigned to each sender. All senders share same frequency, but each has its own “chipping” sequence generated from the code to encode their baseband waveform.
encoded signal = (original data) XOR (chipping sequence)
decoding: inner-product of encoded signal and chipping sequence

Chip sequence is generally binary, whereas the baseband signal can be multi-level and pre-modulated, as with any of our other physical-layer channels.

CMDA overview
CDMA Overview - Transmitter and Receiver - Orthogonal Code Example.

If the chipping sequences have their phases perfectly aligned and the cross correlation of their chipping sequences is precisely zero (ie. their dot product is zero), the codes are said to be orthogonal. But keeping the transmitters synchronised is generally not practical and path length variation in radio systems (due to movement of equipment or atmospheric clouds and layers) will disrupt the phase alignment. So perfect orthogonality (zero crosstalk) would be rare in real systems.

Also, the chip sequence can generally be much longer and the various sequences will not be synchronised (or harmonically locked) to the baseband baud rate. But both the resulting noise from non-orthogonality and intended signal itself can often be less than the receiver self-noise level. The receiver is mapping a wideband signal into a narrowband signal, and the 'coherent' nature of the demodulation allows the signal to rise above the noise level.

Orthogonal Frequency Division Multiplexing (OFDM)

The final channel modulation considered uses OFDM. This is a modulation scheme that is suitable for channels with very uneven phase and frequency responses. It is widely used in residential ADSL "broadband Internet" (misnomer!) provision over old copper twisted pairs, installed for POTS telephone. These connections have numerous junctions between different types of cable that may vary in characteristic impedance, which cause the uneven channel response. OFDM is also widely used in radio systems (where it is properly termed broadband), as it is able to handle multi-paths constructively and keep up with slowly changing patterns of attenuation (and shifting phases) owing to movement.

The basic principle is that, if a channel is linear, a sine wave will be received as a sine wave. Moreover, if the phase or amplitude of the sine wave is adjusted, exactly the same change of phase and relative change of signal level is observed at the receiver. These assumptions are slightly violated by rusty wiring connections or Doppler shift if moving, but normally hold very well.

The technique uses a large number of FDM bands each at a very low baud rate (such as 8 kbaud). Each band uses multi-level modulation of up to 256 levels (4x4 QPSK grid), but with lower data densities in channels that are noisy or heavily attenuated.

The number of bands (or bins or tones as they can be known) might be 100, with ranging over a 1 to 10 (one decade) difference in frequency in the baseband form. For example: 100 bands with 32 levels at 8 kbaud gives 4 Mbps.

OFDM Simplex Digital Channel
OFDM Simplex Channel - Generic Block Diagram

Operation is based around an FFT (fast Fourier transform) at the sender with its inverse at the receiver. The packing of bits into bands is pre-agreed by the two ends, sometimes using a low-rate, safe mode of operation for a minute or so after switch on. The packing plan can be based on channel measurements made at that time. After the packing is agreed and stored in a mapping table at each end, we proceed to so-called 'showtime'.

In showtime (normal) operation, data to be sent is packed into bins according to the map. One bin, or perhaps two bins, is/are reserved for carrying a fixed sine wave, known as a pilot signal. This is generated as part of the sender FFT (which converts a frequency spectrum into a time-domain waveform), by putting a constant value at that point on the FFT input.

The resulting time-domain waveform is sent down the line. If the lowest bin in use is number 10, then 10 full cycles of that frequency (which is about 10 times the baud rate) will be present. At least one more cycle of bin 10 will be present (and proportional more for higher bins) owing to the addition of the cyclic prefix (CP), where the last part of the FFT output is prefixed on the start, to extend its duration by about one sixteenth, so that a high-pass filter (not shown) can smooth over the inevitable discontinuity from the end of one FFT to the start of the next. This is the signal that is sent down the copper cable in xDLS, or up-converted using a mixer in radio systems.

At the receiver, the inverse procedure is used. The additional component required is the equaliser. This is just a single, complex multiply for each received bin, correcting its phase and amplitude. This is very simple to implement, but more importantly, its is also very easy to slowly update to correct for drifts. The pilot tones are an important guide for timing recovery since these should always end up in the place where they were inserted, regardless of the user data being carried in the other bins.

Scrambling

Alan Turing invented one of the world's first security scramblers. Such a device fragments a message (in the time or frequency domain, or both) and systematically permutes the fragments. The resulting signal is unintelligible to humans.

A corresponding de-scrambler must have knowledge of the scrambling order (a shared secret key). It puts the signal back together again. Audio scramblers were often based on vocoding, where the envelope of each part of an audio spectrum was conveyed. The envelope is the 'volume', ie. a localised or 'running' average of the amplitude.

Modern encryption is much better.

Self-Synchronizing Scramblers:
A more common form of scrambler uses a fixed, public scrambling order, where bits of an NRZ encoding of the channel data are exclusive-or'd with some set of recently sent bits. This is a whitening scrambler, that tends to eliminate runs of successive correlated or same-value bits. This increases the average transition density, making clock recovery easier.

This has no overhead in terms of bits per baud.

It works well for digital audio in telephone systems (PCM pulse-code modulation), where there tends to be very long runs of zeroes. But it has the (unlikely) danger for general digital applications that the data being sent correlates badly with the fixed scrambling order, leading to an NRZ sequence that is worse for clock recovery.

Error Detection and Correction

Corruption versus erasure channels. CRC, FEC. This topic is covered in the textbook. It falls under Topic 3b.


(C) 2026 - DJ Greaves, University of Cambridge, Computer Laboratory.