Monday, 7 March 2016

Multiplexing

Multiplexing is a technique that combines data from n number of channels and transmit that data over a single communication channel for efficient Bandwidth utilization of that transmission medium. eg a water pipe carries water to several separate houses at once.

Why we need Multiplexing?
Most of the individual data-communicating devices typically require modest data rate. But, communication media usually have much higher bandwidth. So, two communicating stations do not utilize the full capacity of a data link. When the bandwidth of a medium is greater than individual signals to be transmitted through the channel, a medium can be shared by more than one channel of signals. That is known as multiplexing.

Types of Multiplexing
  1.  Frequency Division Multiplexing
  2. Time Division Multiplexing


Frequency Division Multiplexing
1. FDM is an analog multiplexing technique. Basic approach is to divide the available bandwidth of a single physical medium into a number of smaller, independent frequency channels.
2. Thus, many relatively narrow Bandwidth channels can be transmitted over the single wide bandwidth transmission system without interfering with each other.



For example Commercial AM broadcast band occupies frequency spectrum from 535KHZ-1605KHZ.

Each broadcast station carries an information signal (voice and music) that occupies a Bandwidth between 0 Hz to 5KHz.

Each station amplitude modulates a different carrier frequency and produces a 10 KHz signal. Carrier frequencies of adjacent stations are separated by 10KHz, the total commercial AM broadcast band is divided into 107 10 KHz frequency slots stacked next to each other in frequency domain.

            




Figure shows, how three voice signals from three sources are modulated by different carrier and multiplexed together and transmitted over single transmission medium. Voice signal range is 0-5KHz. suppose carrier f1 is 100 KHz, Carrier f2 is 105KHz and carrier f3 is 110 KHz. So output signal of Modulator 1 is 100-105 KHZ, Modulator 2 is 105-110 KHz and modulator 3 is 110-115 kHz using SSB-SC Modulation. After multiplexing these signals output band is 100-115KHz band that is transmitted over communication medium.

Other applications of FDM like commercial FM and television broadcasting, cable television etc.

Time Division Multiplexing
TDM is a technique used to transmitting several message signals from different sources over a single communication channel by dividing time frame into slots, one slot for each message signal.

            As shown in Diagram there are four channels, channel 1 red, channel 2 blue, channel 3 yellow and channel 4 green. Multiplexing means combining information from all channels and send it on common carrier like coaxial cable, optical fiber cable etc. Here we are using time division multiplexing, where each channel uses entire bandwidth for particular allotted time. Information is forwarded in form of frames and frame is further divided into time slots. Each channel uses its own time slot to forward information and get full access of bandwidth for that particular time.




As shown in above diagram, channel 1, channel 2, channel 3 and channel 4 uses their allotted time slot and form a frame and that frame is transmitted over transmission medium. MUX and DEMUX acts as a digital switch. Take data from channel 1 and immediately switch to channel 2 and so on. At the receiver end, DE multiplexer, receives that frames and sends information to respective channel by getting information from particular slots.

Types of Time division Multiplexing

  1.   Synchronous Time division Multiplexing
  2.   Asynchronous Time Division Multiplexing 


Synchronous Time division Multiplexing
1. In synchronous TDM, each device is allotted a time slot in frame to transmit their data. If any device has no information to send, that slot is kept empty in that particular frame and transmits that frame. This causes wastage of bandwidth.
 2. There is abundance of time slots within each frame, which contain no information (i. e. at any time instant, several of the channels may be idle).
For example in PCM-TDM system, the voice conversation over telephone, information is transferred only in one direction at a time and causes several pauses that causes wastage of Bandwidth.



As shown in above figure, there are four sources 1,2 and 3. During each sample time, data is collected from all sources in a frame.  In frame 4, only source A and B has data to send, rest slot is transmitted empty as it has nothing to send. This causes wastage of Bandwidth in TDM.

Asynchronous TDM

1. Asynchronous TDM is alternative to synchronous TDM to avoid wastage of Bandwidth.

2. It dynamically allocates time slots on demand basis.

3. Asynchronous MUX has a finite number of low speed data input lines with one high speed multiplexed data output line and each line has its own digital encoder and buffer.

4 MUX scans the input buffers and collect data until frame is filled and then transmitted.

5. At receiver end, DE multiplexer removes the data from frame and distributes them to their appropriate output buffers.






Types of Companding

Digital Companding
Digital Companding involves compression in the transmitter after the input sample has been converted to a linear PCM code and then expansion in the receiver prior to PCM decoding. Digitally compressed PCM codes use a 12 –bit linear PCM code and convert into 8-bit Compressed PCM Code.


    Digitally Companded PCM System 
Algorithm for 12-bit to 8-bit Digital Compression
The 8-bit compressed code consist of sign bit, three bit segment identifier and 4-bit magnitude code that specifies the Quantization interval.

                                  

8-bit μ-255 compressed code format
As shown in table below, bit positions designated with X are truncated during compression and subsequently lost. Bits Designated as A,B,C,D are transmitted as it is and its value ranges from (0000-1111). The sign bit is also transmitted as it is.

Algorithm for Encoder
1. The analog signal is sampled and converted to linear 12-bit Sign Magnitude code.
2. Sign bit is transmitted directly as it is to 8 bit compressed code.



       12-bit to 8-bit Digital Companding μ-255 Encoding and Decoding Table

3. Segment number in the 8-bit code is determined by number of 0’s in the 12-bit code.
4. Subtract number of 0’s in 12-bit code from 7 that is the segment number of 8-bit code and converted it into three bit binary number. eg. As shown in table if there are four 0’s in the 12-bit code(s0000ABCDXX)  then (7-4)=3 that is the segment number of 8-bit code and binary equivalent of 3 is 011 so 8 bit code is s011ABCD.
5. Bits Designated as A,B,C,D are transmitted as it is and its value ranges from (0000-1111). These bits represent Quantization interval.

Algorithm for Decoder
Here we have to expand code from 8-bit to 12-bit.
1. The most significant bit of the truncated bit is reinserted as logic 1.
2. Remaining truncated bits are reinserted as logic 0.
3. Suppose we have code (s100ABCD), transmit sign bit and (A,B,C,D) bits as it is, now segment bit is 100 whose decimal equivalent is 4. Now subtract (7-4) that is 3, so insert three 0’s after sign bit and in truncated bits insert 1 for most significant truncated bit and 0 for the rest truncated bits.

Every function performed by PCM encoder and Decoder is accomplished with single integrated chip known as codec. It includes antialiasing filter, sample and Hold circuit and A-D converter in transmitter section and D-A converter, a Hold circuit and bandpass filter in the receiver section.

Analog Companding
Analog Compression is implemented using specially designed diodes inserted in the analog path in a PCM transmitter prior to Sample and Hold Circuit. Analog expansion is also implemented using diodes that are placed just after low pass filter in PCM receiver.

 PCM System with Analog Companding

Figure shows the basic process of analog companding. In the transmitter, the dynamic range of analog signal is compressed, sampled and then converted to linear PCM code. In the receiver, PCM code is converted to PAM signal, filtered and then expanded back to original dynamic range.

μ-Law Companding
In USA and Japan, μ law companding is used. The compression characteristics for μ-law is
Vmax = Maximum uncompressed analog input amplitude
Vin = Amplitude of input signal at particular instant of time
μ = Parameter used to define the amount of compression
Vout = Compressed output amplitude (volts)

The diagram shows μ- law compression characteristics. It shows compression curves for several values of μ. Higher the μ, more the compression. For μ = 0, the curve is linear (no compression). In recent PCM system, it uses 8-bit PCM code and μ=255.


 μ-Law Compression Characteristics

A-Law Companding
In Europe, the ITU-T has established, A-law companding to be used to approximate true logarithmic companding. For an intended dynamic range, A-Law companding has slightly flatter SQR than μ-Law. A-Law companding is inferior to μ-Law in terms of small signal quality (ideal channel noise). The compression Characteristics A-Law companding is
  




Companding

Companding = Compression + Expansion
Companding is the process of compression and then expansion. With companded system, the higher amplitude analog signals are compressed (amplified less than lower amplitude signals) prior to transmission and then expanded (amplified more than the lower amplitude signals) in the receiver.

Or we can say For audio analog signals, the amplitude of weak signals is raised and the amplitude of strong signals is decreased, thereby altering (compressing and expanding) the dynamic range of the signals. The technique is helpful in improving the quality of amplified voice and musical instrument sounds. Dolby and dbx noise reduction also employ companding.

Companding is employed in telephony and other audio applications such as professional wireless microphones and analog recording

                     Figure shows the basic process of Compression & Expansion

This diagram shows that the amount of amplifier gain is reduced as the level of input signal is increased. This keeps the input level to the modulator to a relatively small dynamic range. At the receiving end of the system, an expanding system is used to provide additional amplification to the upper end of the output signal. This recreates the shape of the original input audio signal.

For digital audio signals, companding is used in pulse code modulation (PCM). The process involves decreasing the number of bits used to record the strongest (loudest) signals. In the digital file format, companding improves the signal-to-noise ratio at reduced bit rates. For example, a 16-bit PCM signal may be converted to an eight-bit ".wav" or ".au" file.

                        Compression and Expansion of Dynamic Range

Why we need to compress data?
The data rate is important in telecommunication because it is directly proportional to the cost of transmitting the signal. Saving bits is the same as saving money. Companding is a common technique for reducing the data rate of audio signals by making the quantization levels unequal. If the quantization levels are equally spaced, 12 bits must be used to obtain telephone quality speech. However, only 8 bits are required if the quantization levels are made unequal, matching the characteristics of human hearing.

The human ear is more sensitive to quantization noise in small signals than large signals. A-law and m-law coding apply a logarithmic quantization function to adjust the data resolution in proportion to the level of the input signal. Smaller signals are represented with greater precision – more data bits – than larger signals. The result is fewer bits per sample to maintain an audible signal-to-noise ratio (SNR).

Companding can be carried out in three ways:

 (1) run the analog signal through a nonlinear circuit before reaching a linear 8 bit ADC.
 (2) use an 8 bit ADC that internally has unequally spaced steps.
 (3) use a linear 12 bit ADC followed by a digital look-up table (12 bits in, 8 bits out).


Vocoders

Ø  Vocoders are an analysis and synthesis system, used to reproduce human speech in limited bandwidth.
Ø  Vocoders produce unnatural sounding speech and generally used for recorded information such as wrong number messages, computer output signals and educational games.
Ø  The purpose of vocoder is to encode the minimum amount of speech information necessary to reproduce a perceptible message with fewer bits than those needed by conventional encoder/decoder.

Idea behind Vocoders
The voice consist of sound made by human being using vocal folds for talking, singing, laughing, crying etc. The human voice is specifically a part of human sound production in which vocal folds (vocal cords) are primary sound source. The mechanism for generating the human voice can be subdivided into three parts, lungs, vocal folds within larynx and articulators( the part of vocal tract above the larynx consist of tongue, palate, cheek, lips etc.

Lungs: The lung (the pump) must produce adequate airflow and air pressure  to vibrate vocal folds (the air pressure is fuel of voice).

The vocal folds (vocal cords) are a vibrating valve that chops up the airflow from lungs into audible pulses that form the laryngeal sound source. The muscles of larynx adjust the length and tension of vocal folds to fine tune pitch and tone. 

Articulators: The articulators articulate and filter the sound emanating from larynx and to some degree can interact with laryngral airflow to strengthen it or weaken it as a sound source.

                The tone of sound may be modulated to suggest emotions such as anger, surprise or happiness. The vocal fold size of men and women are different so they have different pitched voices.


    Mechanism for Generating Human Voice

Basic working of Vocoders
A vocoder require two inputs a ‘carrier’ wave, and a ‘modulator’ input to function properly. The carrier is the sound you want to vocode through, and the modulator is your voice. The modulator takes your voice, finds the fundamental frequencies (important bits) of it, and converts them into levels of amplitude on a series of band pass filters (this is why some vocoders have different numbers of bands) – in general, the more bands available the more understandable your speech will be. These band pass filter signals are then passed onto the carrier wave where your final sound is created.


North American Digital Telephone Hierarchy

North American Digital Telephone Hierarchy
To take advantage of merits of TDM and digital transmission, the common carriers employ a hierarchy of multiplexing.


                                    North American Digital hierarchy
T1 Carrier System
T1 carrier systems were designed to combine PCM and TDM Techniques for the transmission of 24 64Kbps channels with each channel Capable of Carrying Digitally encoded voice band telephone signals or data. The transmission bit rate (line speed) for a T1 carrier is 1.544 Mbps.

All 24 DS-0 channels combined has a data rate of 1.544Mbps, this digital signal level is called DS-1. Therefore T1 lines are referred as DS-1 lines.


                                                DS and T Line rates
T2 Carrier System
T2 carriers time division multiplex 96 64-Kbps voice or data channels into a single 6.312 Mbps data signal for transmission over twisted pair copper wire upto 500 miles over a special metallic cable.

T3 Carrier system
T3 carriers Time division multiplex 672 64-kbps voice or data channels for transmission over a single coaxial cable. The transmission rate is 44.736 Mbps.

T4 Carrier System
T4 carriers time division multiplex 4032 64-kbps voice or data channels for transmitting over a single T4 coaxial cable upto 500 mile. The transmission rate is very high i.e. 274.16Kbps.

T5 Carrier System
T5 carriers time division multiplex 8064 64Kbps voice or data channels and transmit them at 560.16Mbps over a single coaxial cable.


PCM-TDM System


With time division multiplexing, transmissions from multiple sources occur on same facility but not at the same time. Transmissions from various sources are interleaved in time domain.

Two Channel PCM-TDM System

Block Diagram shows the simplified block diagram for a PCM carrier system comprised of two DS-0 channels that have been time division multiplexed. Each channel input is sampled at an 8KHz rate and then converted to an eight bit PCM code. While PCM code for channel 1 is being transmitted.  Channel 2 is sampled and converted to a PCM code. While the PCM code from channel 2 is being transmitted, the next sample is taken from channel 1 and converted to PCM code.

The process continues and samples are taken alternately from each channel, converted to PCM codes and transmitted.

Multiplexer is simply an electronically controlled digital switch with two inputs and one output. Channel 1 and channel 2 are alternately selected and connected to transmission line through the multiplexer.

TDM Frame

One 8-bit PCM code from each channel (16-bits total) is called a  TDM frame, and time it takes to transmit one TDM frame is called frame time.  Frame time is reciprocal of sample rate (1/fs) or 1/8000 =125μs.

The PCM code for each channel occupies  a fixed time slot within the total TDM frame.

With Two channel system , one sample is taken from each channel during each frame, and time allocated to transmit PCM bits from each channel is equal to one half the total frame time. Therefore eight bits from each channel must be transmitted during each frame (a total of 16 PCM bits per frame). Thus  line speed at output of multiplexer is

Each channel is producing and transmitting only 64Kbps, the bits must be clocked out onto line at a 128KHz rate to allow eight bits from each channel to be transmitted in a 1211μs time slot.


Quantization

Quantization is the process of converting an infinite number of possibilities to a finite number of conditions. Analog signal is smooth and continuous, it represents infinite number of actual voltage levels and practically it is not possible to convert all analog samples to a precise proportional binary number. Figure shows the voltage range of 0-15V so there are total 16 levels. Here if analog input is 8V, its binary equivalent is 1000. But if analog input is 11.7 as shown in figure, then the approximate value i.e. 12 V will produce binary value 1100.


            Now, .3V variation is known as Quantization error. Each sample voltage is rounded off (Quantized) to closest available level and then converted to its correspondence PCM code. The PAM signal in the transmitter is essentially the same PAM signal produced in the receiver. So any round off errors in the transmitted signal are reproduced when code is converted back to analog in the receiver. The error is called quantization error (Qe). The quantization error is called quantization noise (Qn).