* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download CSC 335 Data Communications and Networking I
Cellular repeater wikipedia , lookup
Teleprinter wikipedia , lookup
History of smart antennas wikipedia , lookup
History of wildlife tracking technology wikipedia , lookup
Digitization wikipedia , lookup
Broadcast television systems wikipedia , lookup
Single-sideband modulation wikipedia , lookup
Analog television wikipedia , lookup
Digital television wikipedia , lookup
Universal asynchronous receiver-transmitter wikipedia , lookup
Phase-shift keying wikipedia , lookup
CSC535 Communication Networks I Chapter 3b: Signal Encoding and Conversion Dr. Cheer-Sun Yang 1 Motivation Short distance and Long distance communications require to encode data with signals prior to sending the signals across communication media. We need to discuss the following: • What are the communication services and devices available today? • How are bits encoded into electric signals? • How are analog signals and digital signals be converted? 2 Communication Services and Devices • Telephone System – switching technique and routing methods are the two main design issues. • Integrated Services Digital Network • Cellular Phones – the sender and receiver can move • Fax Machines • Computers 3 Data Encoding • ASCII (American Standard Code for Information Interchange) • EBCDIC (Extended Binary Coded Decimal Interchange Code) • Others – Baudot, morse, BCD 4 Electric Current and Data Bits The simplest electronic communication systems use a small electric current to encode data. Positive voltage – represents 0 (or 1) Negative voltage – represents 1 (or 0) A waveform diagram can be used to illustrate how 5 data bits are represented and transmitted. Electric Current and Data Bits A waveform diagram provides a visual representation of how an electrical signal varies over time. For example, the diagram shows that a longer time elapsed between the transmission of the fourth and the fifth bits than between others. 6 Digital Encoding Schemes Using Digital Signals • • • • Nonreturn to Zero-Level (NRZ-L) Nonreturn to Zero Inverted (NRZI) Manchester Differential Manchester 7 1 0 1 0 1 1 1 0 0 Unipolar NRZ Polar NRZ NRZ-Inverted (Differential Encoding) Bipolar Encoding Manchester Encoding Differential Manchester Encoding Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 8 Figure 3.25 1.2 NRZ Bipolar 0.8 0.6 0.4 Manchester 0.2 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 -0.2 0.2 0 0 pow er density 1 fT Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 9 Figure 3.26 Nonreturn to Zero-Level (NRZL) • Two different voltages for 0 and 1 bits • Voltage constant during bit interval – no transition I.e. no return to zero voltage • e.g. Absence of voltage for zero, constant positive voltage for one • More often, negative voltage for one value and positive for the other • This is NRZ-L 10 Nonreturn to Zero Inverted • Nonreturn to zero inverted on ones • Constant voltage pulse for duration of bit • Data encoded as presence or absence of signal transition at beginning of bit time • Transition (low to high or high to low) denotes a binary 1 • No transition denotes binary 0 • An example of differential encoding 11 NRZ 12 NRZ pros and cons • Pros – Easy to engineer – Make good use of bandwidth • Cons – dc component – Lack of synchronization capability and hard to synchronize timing of sender and receiver. • Used for magnetic recording • Not often used for signal transmission 13 Differential Encoding • Data represented by changes rather than levels • More reliable detection of transition rather than level • In complex transmission layouts it is easy to lose sense of polarity 14 Manchester • • • • • Transition in middle of each bit period Transition serves as clock and data Low to high represents one High to low represents zero Used by IEEE 802.3 15 Advantages of Manchester • Synchronization: Because there is a predictable transition during each bit time, the receiver can synchronize on that transition. • Error detection: Noise on the line would have to invert both the signal before and affter to cause an undetected error. 16 How are bits encoded into digital signals? • Exercise with a neighbor now. • Draw a waveform diagram depicting the message “Hi” using NRZL, NRZI, and Manchester encoding schemes. – Assume that the bit representation of “H” is 0 1 0 0 1 0 0 0 = 0X48 – Assume that the bit representation of “i” is 0 1 1 0 1 0 0 1 = 0X69 17 Limitation • Digital signals cannot be used to transmit across a long distance. • During transmitting digital signals, it is susceptible to interference easily. • Digital encoding schemes are widely used in recording. • Instead, analog signals are used to transmit even digital data bits. How? 18 Motivation on Modulation and Demodulation If either analog or digital signals were used exclusively, communications would be simplified. However, this is impossible especially attempting to send signals across a long distance. Digital signals cannot be transmitted far without being converted to analog signals. Because telephone system is an analog device, computer signals must be converted to analog signals. 19 The Waveform of a Carrier The wave form of an analog signal carrier oscillates continuously even when no signal is being sent. 20 Carrier • Researchers found that a continuous, oscillating signal will propagate farther than other signals. • Instead of transmitting an electric current that only changes when the value of a bit changes, long-distance communication systems send a continuously oscillating signal, usually a sine wave, called a carrier. 21 Data Modulation • To send data, a transmitter modifies the carrier slightly. • Collectively, such modifications are called modulation. • The technique was originated for transmitting radio or TV signals. • Generally speaking, modulation is the process to transform a digital signal into an analog signal. 22 Data Demodulation • At the receiving end, the analog signal is transformed back to digital signals. • The process is called demodulation. • The device to perform modulation and demodulation is called a modem. We will talk about modem later. 23 Example of Data Modulation The digital signal ’01’ is sent. The carrier is reduced to 2/3 full strength to encode a 1 bit and 1/3 strength to encode a 0 bit. 24 Modulation Techniques • Amplitude shift keying (ASK) • Frequency shift keying (FSK) • Phase shift keying (PK) 25 0 f1 fc f2 Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication f 26 Figure 3.27 Modulation Techniques 27 Modulation Techniques This modulation technique is called Amplitude Shift keying (ASK) technique. 28 Information 1 0 1 1 0 1 +1 (a) Amplitude Shift Keying 0 T 2T 3T 4T 5T 6T 0 T 2T 3T 4T 5T 6T 0 T 2T 3T 4T 5T 6T t -1 +1 (b) Frequency Shift Keying t -1 +1 (c) Phase Shift Keying t -1 Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 29 Figure 3.28 1 (a) Information 0 1 1 0 1 +A (b) Baseband Signal Xi(t) T 0 2T 3T 4T 5T t 6T -A +A (c) Modulated Signal Yi(t) 2T T 0 3T 4T 5T 6T t 6T t -A +2A (d) 2Yi(t) cos(2fct) 0 T 2T 3T 4T 5T -2A Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 30 Figure 3.29 (a) Modulate cos(2fct) by multiplying it by Ak for (k-1)T < t <kT: Ak x Yi(t) = Ak cos(2fct) cos(2fct) (b) Demodulate (recover) Ak by multiplying by 2cos(2fct) and lowpass filtering: Yi(t) = Akcos(2fct) Lowpass Filter with cutoff W Hz x 2cos(2fct) Xi(t) 2Ak cos2(2fct) = Ak {1 + cos(2fct)} Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 31 Figure 3.30 Modulate cos(2fct) and sin (2fct) by multiplying them by Ak and Bk respectively for (k-1)T < t <kT: Ak x Yi(t) = Ak cos(2fc t) cos(2fc t) Bk x + Y(t) Yq(t) = Bk sin(2fc t) sin(2fc t) Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 32 Figure 3.31 Y(t) Lowpass Filter with cutoff W/2 Hz x 2cos(2fc t) x 2sin(2fc t) Ak 2cos2(2fct)+2Bk cos(2fct)sin(2fct) = Ak {1 + cos(4fct)}+Bk {0 + sin(4fct)} Lowpass Filter with cutoff W/2 Hz Bk 2Bk sin2(2fct)+2Ak cos(2fct)sin(2fct) = Bk {1 - cos(4fct)}+Ak {0 + sin(4fct)} Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 33 Figure 3.32 Amplitude Shift Keying • Values represented by different amplitudes of carrier • Usually, one amplitude is zero – i.e. presence and absence of carrier is used • Susceptible to sudden gain changes • Inefficient 34 Example of ASK Bit Values 00 01 10 11 Amplitude A1 A2 A3 A4 35 Amplitude Shifting Keying (four amplitudes), two bits per baud 36 Phase Shift Keying • Nyquist Theorem suggests that the number of bits sent per cycle can be increased if the encoding scheme permits multiple bits to be encoded in a single cycle of the carrier. • ASK and FSK work well but require at least one cycle of a carrier wave to send a single bit. • PSK changes the timing of the carrier wave abruptly to encode data. Such change is called a phase shift. 37 Example of Phase Shift 38 Phase Shift Keying Arrows indicate points at which the carrier abruptly jumps to a new position in the cycle. For different code, the phase shift is different. 39 Frequency Shift Keying 40 QAM • Any of the simple techniques can be used with any number of different signals. • More signals means a greater bit rate with a given baud rate. • The problem is that a higher bit rate requires more signals and reduces the differences among them and makes the receiver’s job more difficult. 41 QAM(cont’d) • Another approach is to use a combination of frequencies, amplitudes, or phase shifts, which allows us to use a larger group of legitimate signals while maintaining larger differences among them. • One technique is Quadrature Amplitude Modulation (QAM), in which a group of bits is assigned a signal defined by its amplitude and phase shift. 42 Quadrature PSK • More efficient use by each signal element representing more than one bit – e.g. shifts of /4 (45o) – Each element represents three bits – Can use 4 phase angles and have two amplitudes – 9600bps modem use 12 angles , four of which have two amplitudes 43 Signal Associations for QAM 44 Two amplitudes and four phases are used to send three bits per baud. 45 Performance of Digital to Analog Modulation Schemes • Bandwidth – ASK and PSK bandwidth directly related to bit rate – FSK bandwidth related to data rate for lower frequencies, but to offset of modulated frequency from carrier at high frequencies • In the presence of noise, bit error rate of PSK and QPSK are about 3dB superior to ASK and FSK 46 Analog-to-Digital Conversion • Usually, it is the reverse of what we have just discussed. A modem examines the incoming signals for amplitude, frequencies, and phase shifts and generates digital signals. This works for signals having constant characteristics. • What about analog signals whose characteristics change continually for example voice ? 47 Pulse Code Modulation • One way of making the signal truly digital is to assign amplitudes from a predefined set to the sample signals. • This process is called PCM. 48 49 The pulse amplitude is divided into eight values or 23 values. 50 Accuracy of PCM 1. The sampling frequency 2. The number of amplitudes chosen: in Fig 2.47, the resulted signal becomes distorted. 51 52 Modem • Modem = modulator + demodulator • A modem converts digital signals to analog signals before sending them across a phone line. • Another modem converts analog signals back to digital signals before passing them to a receiver. 53 Illustration of Dial-up Modem 54 Modems • Intelligent Modems (Hayes Compatible) – A user can enter commands such as continuing dialing, beeping when disconnected, etc. – Hayes Modem allows a user to enter AT command to request for connection. – ATDT5551234: AT represents AT command; D stands for dial; T stands for tone dialing. • Cable Modems – connects to cable TV carrier from a PC and a TV. • Null Modems – used for connecting two local PC’s together. (will be discussed again 55 in next chapter) Summary of Modem A pair of modem is required for long-distance communication across a leased line; each modem contains separate circuitry to send and receive digital data. To send data, a modem emits a continuous carrier wave, which it then modulates according to the values of the bits being transferred. To receive data, a modem detects modulation in the incoming carrier, and uses it to recreate the data bits. 56 2-D signal Bk Bk 2-D signal Ak Ak 4 “levels”/ pulse 2 bits / pulse 2W bits per second 16 “levels”/ pulse 4 bits / pulse 4W bits per second Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 57 Figure 3.33 Bk Bk Ak Ak 4 “levels”/ pulse 2 bits / pulse 2W bits per second 16 “levels”/ pulse 4 bits / pulse 4W bits per second Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication 58 Figure 3.34 Reading Assignments • Read Chapter 3.5, 3.6 59