Friday, 23 October 2015

ENCODING VS MODULATION


Encoding and Modulation are two techniques used to provide the means of mapping information or data into different waveforms such that the receiver (with the help of an appropriate demodulator and decoder) can recover the information in a reliable manner. Encoding is the process by which the data is converted into digital format for efficient transmission or storage. Modulation is the process of converting information (signals or data) to an electronic or optical carrier, so that it can be transmitted to comparatively large distance without getting affected by noise or unwanted signals.


What is Encoding?

Encoding is mainly used in computers, and the process includes arranging a sequence of characters such as letters, punctuation, numbers and certain other symbols into a specialized format for the purpose of efficient transmission and storage. This is a common operation done in most wireless communication systems.
Generally, encoded data can be easily reversed by using the technique called decoding. ASCII (American Standard Code for Information Interchange, pronounced ASK-ee) is the encoding scheme widely used by computers for text files. Here, all the characters are encoded using numbers. For example, ‘A’ is represented using number 65, ‘B’ by number 66, etc. ASCII is also used to represent all the uppercase and lowercase alphabetic characters, numerals, punctuation marks, and other common symbols. Unicode, Uuencode, BinHex, and MIME are among other popular encoding methods available.
Manchester encoding is a special form of encoding used in data communications, where the transitions of high and low logic states are represented by BINARY digits (bits). Also, numerous types of encoding schemes are used in radio communications. At times, the term encoding is confused with encryption. Encryption is a process where the character of a text is altered to conceal its content, whereas encoding can be done without intentionally concealing the content. Other typical encoding techniques include Unipolar, Bipolar and Biphase encoding.



What is Modulation?


Modulation can be simply defined as a way of facilitating the transfer of information over a certain medium. For example, sound generated from our lungs, transmitted through the AIR can only travel for a limited distance depending on the amount of power we consume.
In order to extend the distance, a proper medium is required such as phone line or radio (wireless). This conversion process of voice to travel in such a medium is known as modulation. Modulation can be divided into two sub categories based on the modulation process.
1. Continuous Wave Modulation
2. Pulse Code Modulation (PCM)

Continuous wave modulation basically uses following techniques for modulating a signal.
Amplitude modulation (AM)
Frequency modulation (FM)
Phase modulation (PM)
Pulse Code Modulation (PCM) is used mainly to encode both digital and analog information in the BINARY format. Radio and television broadcast stations typically use the above mentioned AM or FM. Most radio companies who use two way radios use FM.
More complex modulation techniques available are Phase Shift Keying (PSK) and Quadrature Amplitude Modulation (QAM). Phase Shift Keying uses the phase modulation, and QAM uses amplitude modulation. Optical signals on fiber are modulated using an electromagnetic current applied to alter the intensity of a laser beam.



What is the difference between Encoding and Modulation?


• Modulation is about changing a signal, whereas encoding is about representing a signal.
• Encoding is about converting digital or analog data to digital signal, whereas modulation is about converting digital or analog data to an analog signal.
• Encoding is used to ensure efficient transmission and storage, whereas modulation is used to send the signals to a long way.
• Encoding is mainly used in computers and other multimedia applications, whereas modulation is used in communication mediums such as telephone lines and optical fibers.
• Encoding is about assigning different BINARY codes according to a particular algorithm, but modulation is about changing the properties of one signal value according to certain properties (Amplitude, Frequency, or Phase) of another signal.

Wednesday, 14 October 2015

The Information Theory: What You Need To Know

Information theory:

Information theory is a branch of applied mathematics, electrical engineering, and computer science involving the quantification of information. Information theory was developed by Claude E. Shannon to find fundamental limits on signal processing operations such as compressing data and on reliably storing and communicating data. Since its inception it has broadened to find applications in many other areas, including statistical inference, natural language processing, cryptography, neurobiology, the evolution and function of molecular codes, model selection in ecology, thermal physics, quantum computing, linguistics, plagiarism detection, pattern recognition, anomaly detection and other forms of data analysis.

A key measure of information is entropy, which is usually expressed by the average number of bits needed to store or communicate one symbol in a message. Entropy quantifies the uncertainty involved in predicting the value of a random variable. For example, specifying the outcome of a fair coin flip (two equally likely outcomes) provides less information (lower entropy) than specifying the outcome from a roll of a die (six equally likely outcomes).

Why is it so awesome?

Applications of fundamental topics of information theory include lossless data compression (e.g. ZIP files), lossy data compression (e.g. MP3s and JPEGs), and channel coding (e.g. for Digital Subscriber Line (DSL)). The field is at the intersection of mathematics, statistics, computer science, physics, neurobiology, and electrical engineering. Its impact has been crucial to the success of the Voyager missions to deep space, the invention of the compact disc, the feasibility of mobile phones, the development of the Internet, the study of linguistics and of human perception, the understanding of black holes, and numerous other fields. Important sub-fields of information theory are source coding, channel coding, algorithmic complexity theory, algorithmic information theory, information-theoretic security, and measures of information.

Coding theory:

Coding theory is one of the most important and direct applications of information theory. It can be subdivided into source coding theory and channel coding theory. Using a statistical description for data, information theory quantifies the number of bits needed to describe the data, which is the information entropy of the source.

·    Data compression (source coding); There are two formulations for the compression problem:

1.   Lossless data compression: The data must be reconstructed exactly;

2.   Lossy data compression: Allocates bits needed to reconstruct the data, within a specified fidelity level measured by a distortion function. This subset of Information theory is called rate–distortion theory.

· Error-correcting codes (channel coding): While data compression removes as much redundancy as possible, an error correcting code adds just the right kind of redundancy (i.e., error correction) needed to transmit the data efficiently and faithfully across a noisy channel.

This division of coding theory into compression and transmission is justified by the information transmission theorems, or source–channel separation theorems that justify the use of bits as the universal currency for information in many contexts. However, these theorems only hold in the situation where one transmitting user wishes to communicate to one receiving user. In scenarios with more than one transmitter (the multiple-access channel), more than one receiver (the broadcast channel) or intermediary "helpers" (the relay channel), or more general networks, compression followed by transmission may no longer be optimal. Network information theory refers to these multi-agent communication models.

And just to make sure,
We all know Communication theory:


Communication theory is a field of information theory and mathematics that studies the technical process of information and the process of human communication.

Elements of communication:

Basic elements of communication made the object of study of the communication theory:
  • Source: This element, the ‘information source’, produces a message or sequence of messages to be communicated to the receiving terminal.
  • Sender: This element, the ‘transmitter’, which operates on the message in some way to produce a signal suitable for transmission over the channel.
  • Channel: The channel is merely the medium used to transmit the signal from transmitter to receiver.
  • Receiver: The receiver performs the inverse operation of that done by the transmitter, reconstructing the message from the signal.
  • Destination: The destination is the person (or thing) for whom the message is intended.
  • Message: The message is a concept, information, communication, or statement that is sent in a verbal, written, recorded, or visual form to the recipient.
  • Feedback
  • Entropic elements, positive and negative

Channel capacity

Communications over a channel—such as an Ethernet cable—is the primary motivation of information theory. As anyone who's ever used a telephone (mobile or landline) knows, however, such channels often fail to produce exact reconstruction of a signal; noise, periods of silence, and other forms of signal corruption often degrade quality. How much information can one hope to communicate over a noisy (or otherwise imperfect) channel?

Consider the communications process over a discrete channel. A simple model of the process is shown below:



Here X represents the space of messages transmitted, and Y the space of messages received during a unit time over our channel. Let p(y|x) be the conditional probability distribution function of Y given X. We will consider p(y|x) to be an inherent fixed property of our communications channel (representing the nature of the noise of our channel). Then the joint distribution of X and Y is completely determined by our channel and by our choice of f(x), the marginal distribution of messages we choose to send over the channel. Under these constraints, we would like to maximize the rate of information, or the signal, we can communicate over the channel. The appropriate measure for this is the mutual information, and this maximum mutual information is called the channel capacity and is given by:


This capacity has the following property related to communicating at information rate R (where R is usually bits per symbol). For any information rate R < C and coding error ε > 0, for large enough N, there exists a code of length N and rate ≥ R and a decoding algorithm, such that the maximal probability of block error is ≤ ε; that is, it is always possible to transmit with arbitrarily small block error. In addition, for any rate R > C, it is impossible to transmit with arbitrarily small block error.


Channel coding is thus concerned with finding such nearly optimal codes that can be used to transmit data over a noisy channel with a small coding error at a rate near the channel capacity.

Sunday, 4 October 2015

What Kind of Ethernet (Cat-5/e/6/a) Cable Should I Use?

Not all Ethernet cable is created equally. What’s the difference, and how do you know which you should use? Let’s look at the technical and physical differences in Ethernet cable categories to help us decide.
Ethernet cables are grouped into sequentially numbered categories (“cat”) based on different specifications; sometimes the category is updated with further clarification or testing standards (e.g. 5e, 6a). These categories are how we can easily know what type of cable we need for a specific application. Manufacturers are required to adhere to the standards, which makes our lives easier.
What are the differences between the categories and how can you know when to use unshielded, shielded, stranded, or solid cable? Keep reading for “cat”-like enlightenment.

Technical differences

The differences in cable specifications is not as easy to see as physical changes; so let’s look at what each category does and does not support. Below is a chart for reference when picking cable for your application based on the standards for that category.
As the category number gets higher, so does the speed and Mhz of the wire. This is not a coincidence, because each category brings more stringent testing for eliminating crosstalk (XT) and adding isolation between the wires.
This does not mean your experiences have been the same. Physically you can use Cat-5 cable for 1 Gb speeds, and I have personally used cable longer than 100 meters, but because the standard has not been tested for it, you’ll probably have mixed results. Just because you have Cat-6 cable, doesn’t mean you have  1 Gb network speeds either. Every connection in your network needs to support the 1 Gb speed and in some cases, the connection will need to be told in software to use the available speed.
Category 5 cable was revised, and mostly replaced with, Category 5 Enhanced (Cat-5e) cable which did not change anything physically in the cable, but instead applied more stringent testing standards for crosstalk.
Category 6 was revised with Augmented Category 6 (Cat-6a) which provided testing for 500 Mhz communication (compared to Cat-6’s 250 Mhz). The higher communication frequency eliminated alien crosstalk (AXT) which allows for longer range at 10 Gb/s.

Physical Differences

So how does a physical cable eliminate interference and allow for faster speeds? It does it through wire twisting and isolation. Cable twisting was invented by Alexander Graham Bell in 1881 for use on telephone wires that were run along side power lines. He discovered that by twisting the cable every 3-4 utility poles, it reduced the interference and increased the range. Twisted pair became the basis for all Ethernet cables to eliminate interference between internal wires (XT), and external wires (AXT).
There are two main physical differences between Cat-5 and Cat-6 cables, the number of twists per cm in the wire, and sheath thickness.
Cable twisting length is not standardized, but typically there are 1.5-2 twists per cm in Cat-5(e) and 2+ twists per cm in Cat-6. Within a single cable, each colored pair will also have different twist lengths based on prime numbers so that no two twists ever align. The amount of twists per pair is usually unique for each cable manufacturer. As you can see in the above picture, no two pairs have the same amount of twists per inch.
Many Cat-6 cables also include a nylon spline which helps eliminate crosstalk. Although the spline is not required in Cat-5 cable, some manufactures include it anyway. In Cat-6 cable, the spline is not required either as long as the cable tests according to the standard. In the picture above, the Cat-5e cable is the only one with a spline.
While the nylon spline helps reduce crosstalk in the wire, the thicker sheath protects against near end crosstalk (NEXT) and alien crosstalk (AXT) which both occur more often as the frequency (Mhz) increases. In this picture the Cat-5e cable has the thinnest sheath, but it also was the only one with the nylon spline.
Shielded (STP) vs. Unshielded (UTP)
Because all Ethernet cables are twisted, manufactures use shielding to further protect the cable from interference. Unshielded twisted pair can easily be used for cables between your computer and the wall, but you will want to use shielded cable for areas with high interference and running cables outdoors or inside walls.
There are different ways to shield an Ethernet cable, but typically it involves putting a shield around each pair of wire in the cable. This protects the pairs from crosstalk internally. Manufactures can further protect cables from alien crosstalk but screening UTP or STP cables. Technically the picture above shows a Screened STP cable (S/STP).
Solid vs. Stranded
Solid and stranded Ethernet cables refer to the actual copper conductor in the pairs. Solid cable uses a single piece of copper for the electrical conductor while stranded uses a series of copper cables twisted together. There are many different applications for each type of conductor, but there are two main applications for each type you should know about.
Stranded cable is more flexible and should be used at your desk or anywhere you may be moving the cable around often.
Solid cable is not as flexible but it is also more durable which makes it ideal for permanent installations as well as outdoor and in walls.