Saturday, February 18, 2012

What is TCP/IP





Introduction

TCP/IP stands for the 'Transport Control Protocol / Internet Protocol' suite. TCP/IP was created in 1983 to replace NCP. The advantage of TCP/IP is it's versitility. It can successfully switch packets of all shapes and sizes, and work across a varieties of networks.

TCP/IP has become the backbone of the Internet and its composite LANs and WANs. As already stated, it is due to it's ability to switch packets from any computer systems, regardless of network peculiarities, operating system differences and other packet differences.

The TCP/IP protocol suite refers to several separate protocols that computers use to transfer data across the Internet. Listed below are four of the most commonly used TCP/IP protocols,

Components of TCP/IP

  • IP - The Internet Protocol is a network layer protocol that moves data between host computers.
  • TCP - The Transport Control Protocol is a transport layer protocol that moves multiple packet data between applications.
  • UDP - The User Datagram Protocol is a transport layer protocol like TCP but is less complex and reliable than TCP.
  • ICMP - The Internet Control Message Protocol carries network error messages and other network software requirements.

Connection Model

Computer networks use a standard connection model which is called ISO/OSI. The ISO/OSI model has seven layer which the TCP/IP protocol suite has implemented, below is a list of the ISO/OSI layers and the TCP/IP counterpart layers,

ISO/OSI Layer
Application

Presentation

Session

Transport

Network

Data-Link

Physical
Function
file transfers, email, file servers

data formatting, encryption
negotiation and establishment of a connection
end to end data provision
routing of packets

transfer of addressable units of frames and error checking
transmission of binary data over a communications network

Tuesday, February 14, 2012

Pulse Code Modulation (PCM)

Analog transmission is not particularly efficient. When the signal-to-noise ratio of an analog signal deteriorates due to attenuation, amplifying the signal also amplifies noise. Digital signals are more easily separated from noise and can be regenerated in their original state. The conversion of analogue signals to digital signals therefore eliminates the problems caused by attenuation. Pulse Code Modulation (PCM) is the simplest form of waveform coding. Waveform coding is used to encode analogue signals (for example speech) into a digital signal. The digital signal is subsequently used to reconstruct the analogue signal. The accuracy with which the analogue signal can be reproduced depends in part on the number of bits used to encode the original signal. Pulse code modulation is an extension of Pulse Amplitude Modulation (PAM), in which a sampled signal consists of a train of pulses where each pulse corresponds to the amplitude of the signal at the corresponding sampling time (the signal is modulated in amplitude). Each analogue sample value is quantised into a discrete value for representation as a digital code word. Pulse code modulation is the most frequently used analogue-to-digital conversion technique, and is defined in the ITU-T G.711 specification. The main parts of a conversion system are the encoder (the analogue-to-digital converter) and the decoder (the digital-to-analogue converter). The combined encoder/decoder is known as a codec. A PCM encoder performs three functions:

  • sampling
  • quantising
  • encoding

The human voice uses frequencies between 100Hz and 10,000Hz, but it has been found that most of the energy in speech is between 300 Hertz and 3400 Hertz - a bandwidth of approximately 3100 Hertz. Before converting the signal from analog to digital, the unwanted frequency components of the signal are filtered out. This makes the task of converting the signal to digital form much easier, and results in an acceptable quality of signal reproduction for voice communication. From an equipment point of viev, because the manufacture of very precise filters would be expensive, a bandwidth of 4000 Hertz is generally used. This bandwidth limitation also helps to reduce aliasing - aliasing happens when the number of samples is insufficient to adequately represent the analog waveform (the same effect you can see on a computer screen when diagonal and curved lines are displayed as a series of zigzag horizontal and vertical lines).


Sampling


Sampling the analogue signal

Sampling the analogue signal


Sampling is the process of reading the values of the filtered analogue signal at discrete time intervals (i.e. at a constant sampling frequency, called the sampling frequency). A scientist called Harry Nyquist discovered that the original analogue signal could be reconstructed if enough samples were taken. He found that if the sampling frequency is at least twice the highest frequency of the input analogue signal, the signal could be reconstructed using a low-pass filter at the destination.


Quantisation

Quantisation is the process of assigning a discrete value from a range of possible values to each sample obtained. The number of possible values will depend on the number of bits used to represent each sample. Quantisation can be achieved by either rounding the signal up or down to the neares available value, or truncating the signal to the nearest value which is lower than the actual sample. The process results in a stepped waveform resembling the source signal. The difference between the sample and the value assigned to it is known as the quantisation noise (or quantisation error).

Quantisation noise can be reduced by increasing the number of quantisation intervals, because the difference between the input signal amplitude and the quantization interval decreases as the number of quantization intervals increases. This would, however, increase the PCM bandwidth. Uniform quantisation uses equal quantisation levels throughout the entire range of an input analogue signal. The signal-to-noise ratio (SNR), including quantisation noise, is the most important factor affecting voice quality in uniform quantisation. The signal-to-noise ratio is measured in decibels (dB). The higher the signal-to-noise ratio, the better the voice quality. Quantisation noise reduces the signal-to-noise ratio of a signal, so an increase in quantisation noise degrades the quality of a voice signal. Low signals will have a small signal-to-noise ratio and high signals will have a large signal-to-noise ratio. Because most voice signals are relatively low, having better voice quality at higher signal levels is an inefficient way of digitising voice signals. Uniform quantisation was therefore replaced by a non-uniform quantisation process called companding (see below).

Narrowband speech is typically sampled 8000 times per second, and each sample must be quantised. If linear quantisation is used, 12 bits per sample are required, giving a bit rate of 96 kbits per second. This can be reduced using non-linear quantisation, in which 8 bits per sample is sufficient to provide speech quality almost indistinguishable from the original. This results in a bit rate of 64 kbits per second. Two non-linear PCM codecs were standardised in the 1960s - ยต-law (mu-law) coding was the standard developed in the United States, while A-law compression was used in Europe. These codecs are still widely used today.


Encoding

Encoding is the process of representing the sampled values as a binary number in the range 0 to n. The value of n is chosen as a power of 2, depending on the accuracy required. Increasing n reduces the step size between adjacent quantisation levels and hence reduces the quantisation noise. The down side of this is that the amount of digital data required to represent the analogue signal increases.


Stages in the analogue-to-digital conversion process

Stages in the analogue-to-digital conversion process

Source : - http://www.technologyuk.net