7 Analog and Digital Signaling
Prof. Bhushan Trivedi
Introduction
So far, we have assumed that the data is transmitted over the wire or wireless channel. When we are sending and receiving bits, we are actually using EM waves. However, when we use copper cables, we are using different voltage levels and when we use a fiber optic cables we use photons or light on/off state to indicate zeros and ones. When we use different symbols for indicating a zero and a one (for example using +5V for 1 and -5V for 0), we call that process a signaling process.
However, the word signaling is also used in one more context in the networking process. When a sender connects with a receiver (for example a phone sends a ring to another phone), the process is also known as signaling. The steps which use for connections, thus, are indicated by the term ‘signaling protocol’. We are sticking to the first meaning of the word ‘Signal’ and ‘Signaling’ in this module and we will not discuss signaling protocols here. For details about signaling protocols, you can refer to reference 2. In short, whenever we use word signal, we mean a representation of a zero or one using some EM waveform.
There are two different ways to signal zeros and ones. First is called analog signaling and second is known as digital signaling. When the data is sent using a wave which is continuous (curved) it is called analog signaling and when the data is being sent using a wave which is discrete (square) it is called digital signaling.
It is interesting to note that the data itself can also be analog or digital. For example, when we speak, our voice generates a wave containing frequency between 30 Hz to 3300 Hz. Any value in the range is possible, thus it is a set of continuous values. Unlike that, when a data file is generated on the computer, it contains two values, 0 and 1 and nothing in between, a set of discrete values. The voice, thus, is analog data and the computer file, on the other hand, is digital data.
It is also possible to use any type of signaling with any type of data. When we record voice using an analog recording device, it stores it using analog signaling. The audio CD is an example of a voice recorded in analog form. The same voice can also be stored after converting it into zeros and ones. The MP4 file is an example of audio data stored in digital form or using digital signaling. When we send a computer file over an Ethernet network, the zeros and ones of the file are sent using some discrete voltage levels. That is an example of sending digital data using digital signaling. When we use voice modem (a modem we used to connect when we use a normal telephone line for communicating with others), for sending a computer file or when we use a fax machine (over a conventional telephone line) the files zeros and ones are converted to some voice values and sent over the line. This is an example of digital data being sent using analog signaling. Our focus is on digital data and thus we will only be concentrating on how zeros and ones of data are sent across, using either digital or analog signaling and not on how voice or video (the analog data) sent across.
Both analog and digital waves can be categorized in one more fashion, periodic and aperiodic waves. When a wave repeats its shape after a specific interval, it is known as periodic and if not, it is called aperiodic.
Before we embark on types of signaling and discuss analog and digital signaling, let us take a few examples of periodic and aperiodic waves.
Periodic and aperiodic waves
Carefully look at figure 8.1(a). The wave on the left-hand side is digital but the shape does not repeat itself. On the right-hand side, we have the analog wave which again varies its shape and does not repeat its shape over a period of time. On the contrary, 8.1(b) contain a digital wave on the LHS and analog wave in the RHS. The wave clearly repeats its shape and thus these are examples of periodic waves. We have seen in the previous chapter that a periodic digital signal can be represented as a combination of periodic analog signals.
Analog Signaling
We have seen in the previous module that the digital signals need infinite (in the practical sense, very large) bandwidth for the communication. Many solutions require using small frequency bands rather than a single large frequency where the media is likely to cut off higher frequency components. When a small frequency band is to be used for sending data, it is not feasible to use digital signaling and analog signaling is the only viable option. Many commercial solutions like DSL (Digital Subscriber Line, used in connecting to current broadband wired services), mobile phones use analog signaling for the same purpose.
When analog signaling is used to send digital data, it is done by changing one or more of the three fundamental properties of any analog wave, i.e. the frequency, the phase and the amplitude. Figure 8.2 and 8.3 indicates the frequency of two different waves, one with frequency 5 Hz and another with frequency 10 Hz. The wave depicted in 8.2 oscillates 5 times in one second and thus the frequency is considered 5 Hz. Similarly, the signal indicates in figure 8.2 oscillates 10 times in one second and thus it has 10 Hz frequency. A word period is used sometimes to indicate the time a signal takes to complete one cycle. You can clearly see that when the frequency is high, the signal completes the cycle much faster and thus, the period is less.
Figure 8.3 indicates the phase. Phase is the angle the signal generates in the beginning of a typical time slot with the line of propagation or the direction of the wave. Carefully observe the three figures. We assume the typical time slot begins when the O symbol is present. In 8.3(a) we have the direction of the wave going downwards and it is creating a 270-degree angle with the line of propagation. Thus the phase of the wave is 270. The second wave has a phase value of 0 (it is going in the same direction as the direction of propagation) or 360 and thus the phase is either 0 or 360. Similarly, the third wave has the phase value of 90 degrees. One must understand that the signal continuously changes its phase and thus the phase of a wave is considered one which is indicated by the phase at the beginning of the time slot.
Figure 8.5 indicates the amplitude of a signal, which indicates the pick value of the signal. It is interesting to see that the pick value, for a periodic signal, is also same as the lowest value and the distance from the middle point is same for both of them1. This distance is the amplitude. The amplitude represents the power of the signal. Thus when more power is used with a signal, that signal will have bigger amplitude and when we want to generate a signal with low power, it will have a smaller amplitude. The amplitude of the signal is also important for the reason that power consumption of any device is a very critical issue, especially a mobile device.
In nutshell, there are three properties of an analog signal, amplitude, frequency and phase by which it is identified or differentiated from another signal. The amplitude of the signal is the maximum voltage value it obtains, the frequency is the number of oscillations per second and phase is a direction of wave movement at a typical point, usually at the beginning of a time slot. These three properties are key to represent zeros and ones using the analog signal. The sender cleverly changes one or more of amplitude, frequency, and phase to indicate values of zeros and one. A different number of combinations, like signal levels discussed in the previous module, determine the number of bits represented by a typical signal instance.
Analog signaling is a method where a sender varies one or more of these properties to indicate zero or one to the receiver.
1 These values are also known as ebbs and flows
Look at figure 8.6. You can see that amplitude or the maximum voltage value it obtains remains the same2, but the phase or the angle is continuously changing.
When there are three properties of the wave to change, there are three basic methods to do so. When the frequency is changed, it is known as frequency modulation (European) or frequency shift keying (US), when it is amplitude, it is amplitude modulation or amplitude shift keying, and when it is a phase, it is either phase modulation or phase shift keying.
Let us look at each of them one after another.
Modulation
Modulation is a process of sending data using analog signaling. When we use an old-fashioned dial-up connection or fax using a landline phone line, the modem (the acronym for Modulator-Demodulator) is there to connect either a computer or fax machine with the telephone line. The job of a modem is to convert the digital data (a file of zeros and ones) into voice and vice versa at the other end. If you have ever dialed a Fax line you probably have heard strange sounds at the other end. They are basically text-based welcome messages converted into voice. At your end, if the fax machine is installed with the modem, it would interpret those strange voices into a proper welcome message and respond back.
How such conversions are done is the focus of this section.
Amplitude modulation
We begin with amplitude modulation. It is about using different amplitude for indicating zeros and one.
Carefully observe figure 8.7. You can see that 0 is interpreted when the amplitude of the signal is small and 1 when the amplitude is high. For the input 01010111, the signal shown 2 highest position of the wave is known as crest while the lowest position is known as trough in figure 8.7 is sent. The bit rate depends on a number of amplitude values possible to be changed over a second.
As mentioned before, amplitude represents the power of the signal. It is quite easy to alter the power of the signal and thus amplitude modulation is quite an easy method to deploy but there is a problem when we encounter noise. The noise generally distorts the amplitude of the signal and in that case, the receiver gets incorrect data.
Figure 8.8 showcases the impact of noise. A signal with less amplitude value is converted to signal with high amplitude value. Thus it can convert a zero into one or vice versa when the addition of noise results into increases or decreases the value of the amplitude.
The problem of amplitude modulation is highlighted in figure 8.9. When the analog wave is corrupted, it is not possible for the receiver to even guess the right shape of the signal. One can only amplify it, where the noise is also amplified with the data when we use analog signals. On the contrary, when we use digital signals, the repeater can find an exactly correct value for a wrong value (as there are only a few values which are right), it can reshape the signal completely, that means the noise can be completely removed from a digital signal.
Frequency Modulation
Frequency modulation requires two different frequencies to indicate zero and a one.
Frequency modulation is depicted in figure 8.10. you can observe that the signal representing 0 has a higher frequency than the signal representing 1 (thus the number of oscillations is higher when 0 is sent and less when 1 is sent.)
One can easily see the worst part of the frequency modulation. We need two different frequencies to represent one transmission. When some frequency slot is available to transmit, it is to be divided into two halves, one is to be used for sending 1 and another for
0. Thus effectively it reduces the frequencies available to half (in both of the other methods, complete set of frequencies are possible to be used.
Phase modulation
Phase modulation relies on changes of phase of a signal to indicate zeros and ones. We consider the phase of a wave in the beginning of a time slot and not at another point in time as the phase of a wave is continuously changing.
Look at the figure 8.11 carefully. We consider the phase of the signal when the value of x is zero. We call that point an origin. In a case of 8.11 (1), the direction of movement of the wave is 270° with respect to the line which indicates the direction of propagation of the wave. In case (2) it is 360° and in the case (3) it is 90°. This figure is the same that we have seen earlier but now we clearly mention the beginning of a timeslot as a vertical line. The phase of the signal at that point is considered the phase of the signal.
Now the second question, how one can use that signal phase change to indicate zeros and ones? Look at figure 8.12 to see how zeros and ones are represented. In this figure, phase 270° represents zero and phase 90° represents the 1. The figure shows how the phase changes at the beginning of the time slot to indicate what the value of the signal.
The best thing about phase is that noise might affect other things but it does not usually affect the phase of the wave and thus phase modulation is the most preferred method. Here is the list of advantages.
1. Unlike frequency modulation, we do not need multiple frequencies to operate
2. We have seen that errors do not affect the phase
3. In the case of amplitude modulation, the amplitude that we use has to be sufficiently distant from each other. For example, in the previous module, we used voltages 5, 10, 15 and 20. Can’t we use 5,6,7,8 instead? That will require less power to operate and thus the battery of the device will last much longer. However, such a design is vulnerable to even a little bit of noise which changes the amplitude by one volt. When we use larger distance, it is hard for a noise to be that big to convert one valid value into another. That means, amplitude modulation demands higher power usage. On the contrary, phase modulation does not demand so and the device can operate at low power, saving the power and the device can operate longer without recharging.
Modulation in practice
In the real world, the modulation is not performed by varying a single property of a wave but multiple properties together. The frequency modulation demands double the frequency and thus usually avoided. Some combination of phase and amplitude modulation are generally used. We will look at some of the most commonly used modulation methods by real world systems.
The first type that we are going to look at is known as Quadrature phase shift keying or QPSK for short. It is depicted in figure 8.13(1). There are four quadrants and we have a point in each of them. If you look at the origin (the cross point) and assume the direction of propagation in a horizontal direction towards the right side, the points represent 45°, 135°, 225°, and 315° which are different phase values allowed to be used. In this case, we are not using amplitude values and this method is, thus, used when the noise in the system is comparatively high.
Figure 8.13(b) indicates a case where we use three different values of amplitude and three different phases for each quadrant. Each quadrant has three phases (which are not the same), and each quadrant uses the same set of three amplitudes. The arrows indicate phases and curved lines represent amplitudes. You can also notice that not all values are used. We can possibly have 12 phases * 3 amplitudes, total 36 combination values but we are using only 4 values in each quadrant, thus using only 16 overall. Closely monitor the second quadrant where we have three amplitudes and three phases are shown (Other quadrants also have similar values but not shown). In both side arrow cases where we have used the middle value of amplitude and not used higher and lower values. In the middle arrow, we have used both lower and upper amplitude but not the middle one. This is done to avoid keeping the points near to each other so noise may not convert one valid point into another. Thus in each quadrant, we have total 9 values possible out of which we only use 4.
If you compare both systems, QPSK can provide two bits per signal as it is using four signals. On the contrary, QAM-16 can represent 4 bits as there are 16 symbols. The figure which indicates the points used for transmission is sometimes mentioned as constellation pattern and the points are denoted as constellation points. The higher the number of constellation points, better they are as we can send a larger number of bits per symbol but the downside is that we need to pack them much nearer. So we cannot use modulation with higher constellation points in a case where there is substantial noise. In practice, it is possible to use QAM-256 and even QAM-512 in some cases where the noise is almost absent.
Digital signaling
We have almost introduced digital signaling in the previous module when we discussed different voltage levels representing different bit patterns. Any other value than specified voltage levels is not valid and we can catch it immediately at the receiver to be incorrect. That is the biggest advantage of digital signaling. The downside, however, is the requirement of very high bandwidth as it needs to have as many harmonics intact as possible when the data is received at the other end.
Digital signaling can be used to send digital as well as analog data. When we encode voice using MP3 or MP4, we are sending analog data using Digital Signaling. When our Ethernet network sends 0s and 1s as different voltage levels to the receiver, it is an example of digital signaling to send digital data. For our purpose, digital data is considered more important and we will discuss them in the following.
We have already seen that digital signaling involves a few discrete levels of voltages for transmission. Each level indicates a typical set of bits, i.e. a unique digital value. Simplest of digital signaling process involves two levels. Suppose we have decided to use -1 V and 1 V to represent 0 and 13. Suppose we need to transmit 1010111 to the other end, we will keep +1V for some time, for example, let us assume it to be 0.1 msec to indicate 1 at the other end. Then we will keep -1V for the same duration to indicate 0 at the other end. The duration (0.1 msec) is a very important value. From that, we can find out a number of symbols we can transmit per second. In this case, 0.1 msec is 10-7 sec. So in one second, we can send 107 such signals and our data transmission speed is 10,000,000 symbols or 10M symbols per second. If we use two symbols the bit rate is the same as the symbol rate. If we use four symbols the bit rate is doubled, i.e. 20,000,000 bits/second or 20 Mbps If we use 16 symbols, each signal carries four bits and thus the bit rate is 40,000,000 bits per second or 40 Mbps and so on. Thus we keep the duration value same and keep on increasing number of symbols, we can achieve higher bit rates. Thus we can see the importance of Nyquist Theorem. If the noise levels are higher, it prevents us to use higher number of bits per symbol and thus irrespective of a number of levels, the data rate cannot increase further, thus showing the worth of Shannon’s theorem. We can also see the importance of both theorems for designing a data communication system. We can keep on increasing the number of points in the constellation pattern unless the distance between them is vulnerable to noise.
The symbol rate is indicated by word baud rate by some authors. The baud rate is usually less than the bitrate. In one typical case, though, two symbols are sent to indicate one bit, known as Manchester Encoding, is where the bit rate is just half than the baud rate.
Difference: Analog and Digital Signaling
Some differences between analog and digital signaling are in order
1. Digital signal uses square waveforms, on the other hand, the analog signaling used curved waveforms 3 In the previous module, we have used +5 and -5 and so on, where the different between two nearest symbols were 10 V. We also stated that we need to keep it sufficiently apart for no noise to convert a valid symbol into another valid one. There is a strong motivation to keep the voltage levels as low as possible to save power. If we can keep the error in check by using a better cable, we can keep the voltage levels nearby. That means, when we expect big noises, we need to keep a bigger distance between voltage levels while when we do not expect so, we can narrow down the distance to save power.
2.There are a few discrete values which are valid and all other values are invalid. If we have 1V and -1V are valid values, and we receive 0.75V, it is clearly invalid. Interestingly, if we only expect the maximum error of 0.25V, we can also interpret this as a 1V signal accidently changed to 0.75. Thus we can restore this signal by converting it into 1V completely.
3.The square signals demand infinite bandwidth to reach intact at the other end, which is impossible and thus the signal is distorted to some extent, always. One needs to have some tolerance at the receiving end for accepting the square signals. We mentioned that as the sensitivity of the receiver.
The point mentioned in footnote1 can be elaborated as follows.
Suppose we use voltage levels 1, 2, -1, and -2 for our transmission. What if the receiver gets 1.5V? he is not in a position to determine if it is 1V or 2V. Instead, if we have used 1, 4, -1, and -4 we would have understood that 1.5V is actually a 1V signal due to its proximity with 1V. One can understand the function of the repeater in such a case. It just converts such incorrect signals to a nearest correct signal. Thus a placement of the receiver is also critical. One must place repeater at a distance where the signal is distorted to a point where it can pull it back to normal, and not beyond that point.
Now let us look at few other differences between analog and digital signaling.
4. Due to discrete levels, it is easier to catch errors in digital signaling. Errors can be completely repaired. Unlike that, it is hard to catch errors in analog signaling and not possible to remove them completely. The reason for that is that error in an analog signal produces another valid value (as all values in the range are valid). One important reason for improved voice quality in landline telephone calls in last decade is due to the fact that most of the telephone call path is covered using digital signaling and thus errors are easy to remove and maintain the quality of the signal. It is hard to distinguish a local and an international call from the quality of voice today.
5. We can use either type of signaling irrespective of the data being transmitted is analog or digital in nature. No inherent dependency is there to prevent digital signaling to be used for analog data and vice versa. The landline phone is an example of using digital signaling to carry inherently analog data and produce a far better output where conventionally the analog signaling was used.
To illustrate how errors can be easily handled by digital signaling, let us take an example depicted in figure 8.14. The signal has the original shape indicated by that figure. The receiver receives the signal depicted in figure 8.15. You can see that though the signal is distorted to a large extent, it is still having large resemblance with the original signal and thus it is possible for the receiver to recognize it. In our discussion about a repeater before, we have fed in the same distorted signal to produce the original signal from it.
Analog and digital transmission
While we have discussed signaling, we have stated a few times that data can also be in digital or analog form. When the data is digital, we call it digital transmission while when the data is analog, we call it analog transmission. The landline phone and the mobile phone communication are both examples of analog transmission. GSM, which is a common method of mobile phone communication, uses analog signaling while landline phones, between telephone exchanges, use a method known as pulse code modulation which is basically a digital signaling method. You can understand why the transmission is analog, the human voice contains some values of frequencies between 30 to 3300 Hz, any value is accepted.
Similarly, when we have a video communication over a digital solution like Skype or facetime, we are transmitting analog data (video) using digital signaling. Human sensory organs only operate analog signals, while computers are better at digital signaling and digital signaling are better for error handling. The result is, most of the analog data is being transmitted using digital signaling in the real world.
Digital transmission examples are computer files, for example, Microsoft office files, data files, network logs, user inputs like username and password and the whole lot of other data that are basically a collection of zeros and ones. When we want these digital data to be transmitted over, we call it digital transmission. We can use analog signaling or digital signaling for transmitting digital data.
Coding
It seems using digital signaling for digital data being the most common way of transmission, one may misunderstand that digital data, as generated, can be sent as it is over the wire. The zeros and ones usually take another form than their native form when being transmitted. There is an entire branch of computer and electronics engineers dealing with finding which coding mechanism (converting the original form of voltage levels into another) is to be used for a given system. For example, one coding mechanism used for Gigabit Ethernet is called 8B/10B encoding, which uses 10 bits to transmit 8-bit content using a specific pattern. When we use two additional bits, every 8-bit pattern can be mapped to four different values of 10 bit. A clever mechanism like 8B/10b avoids many patterns which are hard to transmit over the wire. Basically, coding mechanisms pick up bit patterns provided by users and convert them into a form which is capable of sustaining most transmission related errors. It is not possible to elaborate further but you can pick up reference-2 for the detailed discussion on various coding mechanisms and their pros and cons.
Summary
In this module we looked at analog and digital signaling and the difference between them. We have seen the difference between periodic and aperiodic waves. Three different types of modulation, amplitude, frequency and phase is discussed next. We have also seen how the digital signals are better at handling errors. We have described the process of coding to conclude the module.
you can view video on Analog and Digital Signaling |
References
- Computer Networks by Bhushan Trivedi, Oxford University Press
- Data Communication and Networking, Bhushan Trivedi, Oxford University Press