|
5.3 Encoding Digital Signals Digital signals can take on a number of forms, but basically they are signals that can only assume a discrete voltage level, and can only change a pre-defined points in time. This definition will take on more meaning as we look at some specific examples. Our 'telegraph' signals of Figure 5.5 only assume two different voltage levels - 0 volts and E volts. Signals that can only assume two different levels are called 'binary signals'. Binary signals are a special case of Digital Signals in that they only have two different levels of voltage or current. When the signal is at the first level (usually the most positive voltage) it is said to be 'ON' or 'TRUE' or a '1'. when the signal is at the second level, it is said to be 'OFF' or 'FALSE' or a '0'. This signal is very commonly used in communications because it is so simple to generate, detect, and use. Since the two levels are fixed by the system that generates them, no information can be implied by the voltage level itself; the information has to be contained or encoded in the pattern of the levels as they occur with respect to time (as was done in the Morse code example).There are two basic ways that the patterns of two different voltages can be varied to carry information: Duration and Level. In the duration technique, the information is encoded into the duration (length) of the pulse. This technique is often referred to as Pulse Width Modulation. In the level technique, the information is encoded into the amplitude of the voltage. The level technique is referred to as Pulse Code Modulation. Pulse Width Modulation The Morse code illustrates one method - that of varying the duration. In the case of the Morse code, there are only two pulse widths used, one for a short sound and one for a long sound. This is in itself a digital system since there are only two possibilities to choose from for the information arriving at the receiving end. In the case of the Morse code, it is the duration of the higher voltage level that carries the information This concept can be extended to send more than two levels of information. For example, suppose one desires to send a sequence of decimal digits, any one of which can have a value from 0 through 9. Both sender and receiver decide on the following: a pulse of one second duration represents the digit 0, a pulse of two seconds duration represents the digit 1, and so on up to a 10-second duration pulse representing the digit 9. With this agreement, the sender can generate pulse patterns in order to send numerical information to the receiver. The only thing the receiver must do is time the duration of each sound and write down the corresponding number. Thus, to send the number 132, the current Ic would have to be controlled at the transmitter to send the pattern shown in Figure 5.6.
Figure 5.6
This is a type of digital coding or 'modulation' of the Ic signal called pulse width modulation. Modulation simply means controlling the amplitude or duration, or other characteristics of a signal in a desired way; in this case, causing the "widths" (pulse duration vs. time) of the high levels of voltage to behave in the way needed to send the digits 0 through 9 down the telegraph line. Consequently one can see the reason for the name pulse width modulation. Another name for pulse width modulation is pulse duration modulation. These terms are often abbreviated PWM and PDM to avoid having to spell out the entire name of the modulating technique every time.One serious problem with using PWM is that it takes different amounts of time to send different data. In the example of Figure 5.6, the data transmitted was 132. It took 9 timeslots (not including the space between data transmissions). If, for example, our data had been 789 instead, it would have taken 27 timeslots. This makes it difficult to determine how long it will take to send a message. Communication electronics requires much more precision than this. Pulse Code Modulation A more commonly used method of coding digital signals to carry information using binary (two-level) signals, is called pulse code modulation, often abbreviated PCM. In one version of this technique, the receiver looks at the electrical signal (either voltage or current) on the line at regular periods of time. Previously, the receiver and transmitter have agreed on how often there will be new information present on the line. At that time, there can only be one of two levels on the line, either a 1 or a 0 (high or low voltage). The receiver records the patterns of 1's and 0's detected at the agreed-upon times. It must then interpret or decode the meaning of the pattern that has been received.Look at Figure 5.7. In this system, it has been previously agreed that the sender will send new information every 5 seconds. All of the pulses are all of a fixed duration, centered around the time that the receiver is going to look for a new information. The 1 may be there or it may not be there (not having been sent) at any of the given times at which the receiver measures or samples the line signal. In the example of Figure 5.7, the receiver and transmitter agree on a starting time and that the receiver will sample the line every 5 seconds thereafter until told to stop. The transmitter then varies the current Ic at the proper times. Each 5 seconds the receiver would write down whether a 1 or a 0 is received. The receiver would write down the pattern 1001 as a result of the transmission in Figure 5.7, look up in a code table (it must be the same as the code table the transmitter used), and interpret the information that was transmitted. In modern day communications equipment of this type, the codes are stored electronically and the look-up and interpretation of the information is all done electronically.
Figure 5.7 One of the most common patterns for the coding of the transmitted information is a binary code. Figure 5.8 shows such a 4-bit binary code for decimal numbers. When the receiver detects the pattern of 1's and 0's that it receives in a given period of time (such as the four bits 1001 in Figure 5.7) it interprets the number transmitted by finding the corresponding decimal number represented by that code. In the case of Figure 5.7, a 9 was transmitted. By changing the pattern of 1's and 0's the transmitter could have sent any decimal number between 0 and 15 with a 4-bit binary code. Alternatively, as shown in Figure 5.8b, the sender and receiver could agree that the four bits represent 16 different words or 16 different commands or 16 different letters of the alphabet. The 16 different patterns could represent anything that both the transmitter and receiver agree on.
Figure 5.8
There are longer binary codes and there are different ways in which the receiver and transmitter can agree to sample the signals in order to detect the binary code being sent, but they all have the basic features of the example of Figure 5.7, and they are all called pulse code modulation. For now this understanding serves our need, but there are other ways in which these simple digital systems can be used to send information patterns. These are more complicated and will be covered in later chapters.There are also other ways to vary the characteristics of Vc or Ic to carry the information. One approach to be discussed next uses patterns of signal amplitudes (either voltage or current) to send information. Discrete Digital Signals We have talked about using only two voltage levels in our previous examples. Let's now take a look at using more than two. These systems are still digital, they just cannot be considered binary. Digital signals that have more than two possible levels of amplitude are known as discrete digital signals.In our first example, shown in Figure 5.9 below, the transmitter has a variety of power supplies that can be switched onto the transmission line in order to present patterns of voltage as a signal on the line. The transmitter has a choice of ten different batteries, each with different voltage. If each different voltage represents a digit from 0 through 9, then various numbers or number codes can be sent from the transmitter to the receiver. At the receiver, a voltmeter is provided to interpret the digit being transmitted. For example, to send the number 315, the transmitter closes switch 3, releases it, then closes switch 1, releases it, and then closes switch 5. Each switch would be closed for a period of time, say one second. This sequence of switch closures would cause the line voltage and line current to take on the waveforms of Figure 5.10. Also shown in Figure 5.10 is the voltage that would be read across the resistor Rc by the voltmeter. This voltage is IcRc by Ohm's law. The person receiving the pattern of voltages knows which voltage corresponds to which digit. For example, if R1 is twice Rc, the voltage across Rc will be one-third of V1, the line input voltage at the transmitter. Thus with V1 = 1 volt, 1/3 volt at Rc would represent the digit 0; with V1 = 2 volts, 2/3 volt at Rc would represent the digit 1; and so on. The agreement between transmitter and receiver for this information is summarized in table form in Figure 5.11 just as the pattern of 1's and 0's was for the PCM code in Figure 5.8. When the receiver records the sequence of voltages 1.333, 0.667, and 2 volts, by looking at the table of Figure 5.10, the information can be interpreted as the original three digits transmitted, 315. This type of encoding information into a signal in terms of voltage or current levels is called amplitude modulation, abbreviated AM.
Figure 5.9
Figure 5.10
Figure 5.11 The Problems of Digital Encoding Techniques Most of the data communications that takes place today is done with digital signaling. Digital electrical signaling is normally just two voltages. This allows for some error, and is easily corrected and cleaned up. The two voltages allows us to represent two codes - often known as binary codes. Each change of signal represents a 'bit'. The bits can only be transmitted one at a time, since we are dealing with a single wire (serial). This is called time-division multiplexing - a fancy term that simply means 'one bit at a time'. Of course the amount of time for each bit is extremely short. For example, 10Mbit Ethernet transfers 10 million bits/second, or 1/10th of a millionth of a second per bit. Clocking and Synchronization In order to transmit a binary bit stream, there must be an agreed-upon 'clock'. The 'clock' is just a technician's term for the 'bits-per-second' (bps) that can be transmitted. The transmitter and the receiver agree on the clock speed before the transmission of the data begins. In many systems, this is a 'given'; in other systems, it is 'negotiated' at the beginning of the transmission, and periodically thereafter. The best way to understand the clock is to look on it as though it were a separate signal. It is a signal that tells the receiver when to sample the incoming data stream. Let's look at an analogy: Suppose we have a data transmission system in which someone in the dark is holding up a sign that has a single alphabetic letter on it. This person will transmit a complete message by changing the letter every so often. At the receiving end, you have a strobe light that will allow you to illuminate the sign for a fraction of a second. The problem, of course, is how to determine exactly when to turn on the light. This is known as a synchronization problem. You must synchronize your light to coincide with the appearance of new information. The clock is a signal that tells the receiver when to turn on the strobe light. There are two ways to get a clock signal: 1) The transmitter sends one. This is very wasteful, since it is using bandwidth to send very little information 2) The receiver generates one. The transmitter and receiver agree on the rate at which the data will be changed. The receiver generates a clock signal at that rate, and uses it to sample the incoming data signal. The second method is the one used for all long distant (and most short distant) communications. There is still a problem with this system. A clock generating circuit is not perfect. After time, it will be off slightly. Just as if you synchronized your watch with someone - after only a few minutes you might still have the exact same time. But after several days, your times would most likely be slightly different. This slight difference would be catastrophic when receiving data at a high rate of speed. Therefore, there needs to be an occasional 're-synchronization' between transmitter and receiver. This is accomplished by the receiver noting when the data changes - for example, when it changes from a '1' to a '0'. As long as this happens often enough, the receiver can stay synchronized with the transmitter. The transition from a '1' to a '0', or from a '0' to a '1' is known as an edge. Receivers use edges to synchronize their local clock. Therefore, as long as edges occur frequently enough, synchronization between transmitter and receiver will be maintained.Square Edges Digital signals have 90-degree edges. Technicians refer to this type of waveform as rectangular. Rectangular waveforms contain very high frequency components (this is proven in Fourier's Theorems). For example, a 1 kHz rectangular waveform contains frequencies of 3kHz, 5kHz, 7kHz, and so on--including all of the what we call the odd harmonics. The implications of this are primarily two-fold
Binary Information Using digital signaling, we put ourselves in a world of binary number systems. On the one hand, this allows us to be relieved from understanding much electronic theory; but on the other hand, we must learn to be fluent in binary. This means the capability to convert binary into decimal as well as hex. Most applications call for binary to hex (which is by far the easiest to do by hand); but some applications (such as IP addresses) require conversion to decimal. You need to be able to accomplish these simple tasks:
Examples of Digital Encoding with Binary Information As we will see in the following examples, digital signaling techniques strive to have ample edges so that bit synchronization can be maintained. Manchester Encoding Manchester Encoding is used in Ethernet networks. It produces extra edges (one guaranteed per bit), which improves synchronization. The technique is quite simple. All bits will have a transition (edge) in the middle of the bit period - '0s' will have a falling edge (high to low), and '1s' will have a rising edge (low to high).
Figure 5.12 Token Ring Encoding Token ring uses Differential Manchester Encoding. This method is similar to Manchester Encoding, but instead of a particular edge direction being used for a 0 or a 1, the edge used depends on the previous bit. At the beginning of the bit period, if the data is 0, then the voltage level changes. If the data is 1, then the voltage level stays the same. Whichever happens, in the middle of the bit period, the voltage level changes.
Figure 5.13 T1 Encoding T1 uses a signal encoding technique known as BRZ-AMI. This acronym can best be understood if we break down the letters.
Let's look at a figure, and put all of this together.
Figure 5.14
|
|
|