# Basic Analog Line Coding techniques used in Computer Communication

This post briefly outlines basic line coding techniques used during analog transmission. The focus is mainly on encoding digital data into analog signals (see diagram below), as this is widely used in computer communication. The other combination of analog data getting converted directly into analog signals is primarily used in radio and TV transmission networks.
The diagram given below illustrates a typical encoding process of converting digital data into analog signals, using a digital modem.

The primary three base methods used for encoding digital data into analog signals are Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK) and Phase Shift Keying (PSK). All the three techniques rely on modulating a high frequency carrier wave based on the binary data that is to be encoded.

• In ASK, the amplitude of the carrier wave  is changed instantly based on  the digital data, without changing the frequency and phase of the carrier wave.
• In FSK, the frequency of the carrier wave is alone changed based on the instantaneous value of the digital data, keeping the amplitude and phase constant.
• In PSK, the phase of the carrier wave is changed based on the digital data that is to be encoded, without changing the amplitude and carrier.

To understand these modulation techniques, let us take the very basic version of these techniques, namely Binary-ASK, Binary-FSK and Binary-PSK or BPSK. Since there are only two different types of symbols in binary data, namely 0 and 1, the encoded analog signal would either have two different amplitudes (ASK) or two different frequencies (FSK) or two different phases (PSK). The diagram given below illustrates the three digital modulation techniques for encoding the same digital data pattern (1010).

In the diagram, for encoding the same digital binary stream 1010,
a) BASK uses two different amplitudes, namely A1 for encoding  a binary 1 and A2 for encoding a binary 0, without changing the carrier wave’s frequency and phase.
b) BFSK uses two different frequencies (number of cycles per second), for representing binary 1 and binary 0, without changing the carrier wave’s amplitude and phase. While a binary 1 is represented by a single cycle of the wave in one bit interval, a binary 0 is represented by a wave with two cycles in one bit interval. The amplitude and phase of the carrier wave is unchanged.
c) BPSK uses two different phases for representing binary 1 and binary 0, without chaning the carrier wave’s amplitude and frequency. While a binary 1 is represented by a normal sine wave, a binary 0 is represented by a similar sine wave shifted in phase by 180 degree.
Generalizing the above line encoding techniques, by having multiple signalling levels/values (instead of two in binary), it is possible to have different line coding techniques. For example, 2-level, 4-level, 16-level ASKs, FSKs or PSKs etc. The diagram given below illustrates a 4-level PSK.

The above diagram format is named as constellation diagram. It is similar to the polar coordinate system, where the angle of a vector represents the phase and the length of the vector represents the amplitude. Each dot represents a specific value of the signal or it represents a unique symbol.  In this example of 4-level PSK, there are 4 different symbols, each represented by dots. The 4 symbols have different phase values, while having the same amplitude. As seen from the above diagram, in this particular example of 4-level PSK, a sine wave with 4 different phases, namely with degrees 45, 135, 225 and 315 are used to represent four different symbols. If data  encoded is to be binary, then these 4 symbols could be 00, 01, 10 and 11. Thus using one signal value (or symbol), two binary digits could be encoded in this scheme. Therefore, in 4-level PSK, data rate (number of bits per second) that can be sent is double when compared to BPSK, for the same symbol rate.