Chapter 3 Signals and Encoding/Modulating BY Mr.Sukchatri Prasomsuk Contents : • • • • • • • • • • 3.1 Analog and Digital 3.2 Periodic and Aperiodic Signals 3.3 Analog Signals 3.4 Time and Frequency Domains 3.5 Composite Signals 3.6 Digital Signals 3.7 Digital-to-Digital Conversion 3.8 Analog-to-Digital Conversion 3.9 Digital-to-Analog Conversion 3.10 Analog-to-Analog Conversion 2/78 Introduction : • Information can be in the form of data, voice, picture, image, numeric data, characters, or code. • You cannot roll up a photograph, insert it into a wire and transmit it across network. • must encoded description of the data. • You can use an encoder to create a stream of 1 and 0 that tells the receiving device. • To be transmitted, information must be transformed into electromagnetic signals. 3/78 3.1 Analog and Digital • Analog refers to something that is continuous : a set of specific points of data and all possible points between. • Ex : Analog data - voice, sound, light, wave,... • Source: Sun, bulb, lamp, microphone, speaker, …. Value Time 4/78 3.1 Analog and Digital • Digital refers to something that is discrete : a set of specific points of data with no other points in between. • Ex. Digital data - is data stored in the memory of a computer in the form of 0s and 1s. • Transfer from one position to another inside or outside the computer. Such as : computer to Printer, CPU to RAM, …. Value Time 5/78 3.1 Analog and Digital • • • • Conclusion : Signals can be analog or digital. Analog signals can have any value in a range. Digital signals can have only a limited number of values. 6/78 3.2 Periodic and APeriodic Signals • Both analog and digital signals can be of two forms: periodic and aperiodic (nonperiodic). 7/78 3.2 Periodic and APeriodic Signals • Periodic Signals : is a signal that it completes a pattern within a measurable time frame, called a period, and repeats that pattern over identical subsequent periods. • The completion of one full pattern is called a cycle. • A period is defined as amount of time(sec.) required to complete one full cycle. • The duration of a period represented by T. 8/78 3.2 Periodic and APeriodic Signals • Analog Value Time T • Digital T T T Value Time T T T T 9/78 3.2 Periodic and APeriodic Signals • A Periodic or nonperiodic Signals, signal changes constantly without exhibiting a pattern or cycle that repeats over time. • Analog Value Time 10/78 3.2 Periodic and APeriodic Signals • An aperiodic signals can be decomposed into an infinite number of periodic signal. • A sine wave is the simplest periodic signal. • Digital Value Time 11/78 3.3 Analog Signals • Analog signal can be classified as simple or composite. • A simple analog signal, or a sine wave, cannot be decomposed into simpler signals. • A composite analog signal is composed of multiple sine waves. 12/78 3.3 Analog Signals • Simple Analog signals : the sine wave is the most fundamental form of a periodic analog signal. • Visualized as a simple oscillating curve, Its change over the course of a cycle is smooth and consistent, a continuous, rolling flow. • Amplitude : refers to the height of the signal. The unit for amplitude depends on the type of the signal. For electrical signals, the unit is normally volts, amperes, or watts. 13/78 3.3 Analog Signals • Amplitude : Value MAX. amplitude T1 Time MIN. amplitude 14/78 3.3 Analog Signals • Period and Frequency : Value Four period in one second ---> 4 Hz 1 Sec. Time T Period = 1/4 second 15/78 3.3 Analog Signal 16/78 3.3 Analog Signals • Unit of Period : Period is expressed in seconds (s). • The communications industry uses five unit to measure period: • Second (s) -3 • millisecond (ms = 10 ) -6 • microsecond (us = 10 ) -9 • nanosecond (ns = 10 ) -12 • Picosecond (ps = 10 ) 17/78 3.3 Analog Signals • Unit of Frequency : Frequency is expressed in hertz (Hz) . • The communications industry uses five unit to measure frequency: • Hertz (Hz) 3 • Kilohertz (KHz = 10 Hz) 6 • Megahertz (MHz = 10 Hz) 9 • Ginanosecond (GHz = 10 Hz) 12 • Terahertz (THz = 10 Hz) 18/78 3.3 Analog Signals • Period is the amount of time it takes a signal to complete one cycle; • Frequency is the number of cycles per second. • Frequency and period are inverse of each other: • Frequency (f ) = 1/T • Or • Period (T) = 1/f 19/78 3.3 Analog Signals • Ex.: A sine wave has a frequency of 8 KHz. What is its period? • Solution : • Period (T) = 1/f • = 1/8000 • = 0.000125 sec. • = 125 x 10-6 sec. • Or = 125 us # 20/78 3.3 Analog Signals High Frequency Change in a short span of time T Low Frequency Change in a long span of time Note : If a signal does not change at all, its frequency is zero Hz). If a signal changes instantaneously, its frequency is infinity. (0 21/78 3.3 Analog Signals • Phase : describes the position of the waveform relative to time zero. • Phase is measured in degrees or radians (360 degrees is 2 Pi radians). o • A complete period => a phase shift of 360 o • half a period => a phase shift of 180 o • A quarter period => a phase shift of 90 22/78 3.3 Analog Signals 23/78 3.3 Analog Signals • Ex : A sine wave is offset 1/6 of a cycle with respect to time zero. What is its phase? Solution we know that one complete cycle is 360 degrees. Therefore, 1/6 of a cycle is 1/6 x 360 = 60 degree # 24/78 3.3 Analog Signals 25/78 3.3 Analog Signals 26/78 3.4 Time and Frequency Domains 27/78 3.4 Time and Frequency Domains 28/78 3.4 Time and Frequency Domains • A low-frequency signal in the frequency domain corresponds to a signal with a long period in the time domain and vice versa. • A signal that changes rapidly in the time domain corresponds to high frequencies in the frequency domain. 29/78 3.5 Composite Signals • Composite Signals : a signal composed of more than one sine wave. • The frequency spectrum of a signal is the combination of all sine wave signal that make up that signal. • Bandwidth : The difference between the highest and the lowest frequencies of a composite signal. It also measures the information-carrying capacity of a line or a network. 30/78 3.5 Composite Signals 31/78 3.5 Composite Signals The frequency spectrum 32/78 3.6 Digital Signals • Digital signal : A discrete signal with a limited number of values. • O is zero voltage (0 V.) • 1 is a positive voltage (5V.) 33/78 3.6 Digital Signals 34/78 3.6 Digital Signals 35/78 3.6 Digital Signals • Ex. A digital signal has a bit rate of 2000 bps. What is the duration of each bit (bit interval)? • Solution The bit interval is the inverse of the bit rate. Bit interval = 1/(bit rate) = 1/2000 = 0.0005 sec. -6 = 500x10 sec. = 500 us # 36/78 Basics of Encoding Networking Signals 37/78 Binary Encoding Schemes 38/78 Binary Encoding Schemes 39/78 Type of Modulation 40/78 Encoding Signals as Voltages 41/78 Encoding Singnals as Electromagnatics waves 42/78 Encoding and Modulating • We must transform data into signals to send them one place to another. • Different conversion schemes : Conversion methods Digital-Digital Analog-Digital Digital-Analog Analog-Analog 43/78 3.7 Digital-to-Digital Conversion • Digital-to-Digital encoding : conversion is the representation of digital information by a digital signal. 101110011 Digital to Digital Encoding 44/78 3.7 Digital-to-Digital Conversion • Type of digital-to-digital encoding Digital-Digital encoding Unipolar Polar Bipolar 45/78 3.7 Digital-to-Digital Conversion Polar NRZ NRZ-L NRZ-I RZ Biphase Manchester Differential Manchester 46/78 3.7 Digital-to-Digital Conversion • Unipolar encoding uses only one level of value. • Polar encoding used two levels (positive and negative) of amplitude. • NRZ (Nonreturn to Zero) : NRZ-L, NRZ-I • In NRZ-L the level of the signal is dependent upon the state of the bit. • In NRZ-I the is inverted if a 1 is encountered. • RZ (Return to Zero) : anytime the original data contain strings of consecutive 1s or 0s. • A good encoded digital signal must contain a provision for synchronization. 47/78 3.7 Digital-to-Digital Conversion • Biphase encoding is implemented in two different ways : Manchester and differential Manchester. • In Manchester encoding, the transition at the middle of the bit is used for both synchronization and bit representation. • In differential Manchester encoding, the transition at the middle of the bit is used only for synchronization. Thebit representation is shown by the inversion or noninversion at the beginning of the bit. 48/78 3.7 Digital-to-Digital Conversion 0 Amplitude 0 1 = 1 0 0 1 = 1 1 Time Manchester Differential Manchester Time 49/78 3.7 Digital-to-Digital Conversion • Bipolar encoding : we use three levels : positive, zero, and negative. Bipolar AMI B8ZS HDB3 50/78 3.7 Digital-to-Digital Conversion Bipolar AMI encoding : is the simplest type of bipolar encoding. Amplitude 0 1 0 0 1 1 1 0 Time 51/78 3.7 Digital-to-Digital Conversion • B8ZS if eight 0s come one after another, we change the pattern in one of two ways based on the polarity of the previous 1. B8ZS encoding Polarity of previous bit Polarity of previous bit + 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 + 0 0 0 + - 0 - + - 0 0 0 - + 0 + - Violation Violation Violation Violation 52/78 3.7 Digital-to-Digital Conversion • HDB3 (High-Density Bipolar 3 : If four 0s come one after another, we change the pattern in one of four ways based on the polarity of the previous 1 and the number of 1s since the last substitution. + 0 0 0 0 - 0 0 0 0 + 0 0 0 + - 0 0 0 - a) If the number of 1s since the last substitution is odd. + 0 0 0 0 - 0 0 0 0 + - 0 0 - - + 0 0 + b) If the number of 1s since the last substitution is even 53/78 3.8 Analog-to-Digital Conversion • Introduction : MAX. amplitude T1 Analog to Digital Conversion (Codec) MIN. amplitude 54/78 3.8 Analog-to-Digital Conversion • PAM (Pulse Amplitude Modulation) : M AX. am plitude Amplitude T1 M IN . am plitude PAM Signal 55/78 3.8 Analog-to-Digital Conversion • PCM (Pulse Code Modulation) : Pulse amplitude modulation (PAM) has some applications, but it is not used by it self in data communication. However, it is the first step in another very popular conversion method called pulse code modulation (PCM) 56/78 3.8 Analog-to-Digital Conversion • Quantized PAM signal : + is 0 and - is 1 Ex. +26 = 00011010, +48 = 00110000, +127 = 011111111, -80 = 11010000 Amplitude + 127 + 48 + 26 Time - 80 PAM Signal 57/78 3.8 Analog-to-Digital Conversion • From analog signal to PCM digital code Analog Signal PAM Quantization Binary encoding 00110111011 Digital-Digital encoding +024 00011000 +038 0010110 58/78 3.8 Analog-to-Digital Conversion • Nyquist thorem : Highest frequency = x Hz Sampling rate = 2x samples/second Amplitude + 127 + 48 + 26 Time Sampling interval = 1/2x 59/78 3.8 Analog-to-Digital Conversion • Using analog signals to build digital signals 60/78 3.8 Analog-to-Digital Conversion • Ex. What sampling rate is needed for a signal with a bandwidth of 10,000Hz (1,000 to 11,000 Hz)? • Solution The sampling rate must be twice the highest frequency in the signal: sampling rate = 2(11,000) = 22,000 samples/second # 61/78 3.8 Analog-to-Digital Conversion • Bit Rate : After finding the number of bits per sample, we can calculate the bit rate using the followig formula: • Bit rate = Sampling rate x Number of bits persample 62/78 3.8 Analog-to-Digital Conversion • Ex. We want to digitize the human voice. What is the bit rate assuming eight bits per sample? • Solution The human voice normally contains frequencies from 0 to 4000 Hz. So the sampling rate is: = 4000 x 2 = 8000 samples/second The bit rate can be calculates as: Bit rate = Sampling rate x Number of bits per sample = 8000 x 8 = 64,000 bit/s = 64 Kbps # 63/78 3.9 Digital-to-Analog Conversion • Is the process of changing one of the characteristics of an analog signal based on the information in a digital signal (0 and 1). MAX. amplitude Digital to Analog Modulation T1 MIN. amplitude 64/78 3.9 Digital-to-Analog Conversion • Types of digital-to-analog modulation Digital-to-Analog Modulation ASK FSK PSK QAM 65/78 3.9 Digital-to-Analog Conversion • • • • • • • ASK (Amplitude shift keying) : amplitude of carrier signal FSK (Frequency shift keying) : frequency of carrier signal PSK (Phase shift keying) : phase of the carrier signal QAM (Quadrature amplitude modulation):phase+amplitude Bit rate is the number of bits per second. Baud rate is the number of signal units per second. Baud rate is less than or equal to the bit rate. So, Baud rate = number of signal elements Bit rate = Baud rate X number of bits/signal element 66/78 3.10 Analog-to-Analog Conversion • Is the representation of analog information by analog signal. MAX. amplitude MAX. amplitude T1 MIN. amplitude Analog to Analog Conversion T1 MIN. amplitude 67/78 3.10 Analog-to-Analog Conversion • Type of analog-to-analog modulation Analog-to-Analog Conversion AM FM PM 68/78 3.10 Analog-to-Analog Conversion • AM (Amplitude modulation) : The bandwidth of an audio signal (Speech and music) is usually 5 KHz. Therefore, an AM radio station needs a minimum bandwidth of 10 KHz. (AM : 530-17 KHz) • FM (Frequency modulation) : The bandwidth of an audio signal (Speech and music) is usually 15 KHz. Therefore, an AM radio station needs a minimum bandwidth of 150-200 KHz. (FM : 88-108 MHz) • PM (Phase modulation) is used in some system as as alternative to frequency modulation. 69/78 3.11 Network signal propagation 70/78 3.12 Network attenuation 71/78 3.13 Network reflection 72/78 3.14 Noise 73/78 3.14 Noise 74/78 3.15 Dispersion, jitter, and latency 75/78 3.16 Collision 76/78 3.17 Messages in terms of bits 77/78 Assignments & LAB • Lab 10.6.6 & Lab 10.7.5 & Lab 10.7.7 • Due date : Next Friday 78/78