Physical layer Encoding data into signals Computer networks Girts Strazdins, gist@ntnu.no, NTNU i Ålesund, 2020
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Data and signals Communication channel Receiver Sender Data Received Data Signals Can be digital or Can be digital or analog analog
Analog data • Continuous, without natural discrete boundaries • Examples: temperature, audio signal
Digital data • Any data with naturally separate categories, boundaries. Discrete data. • Examples: integer numbers, text.
We focus on digital data • Computers operate with digital data only • In this course we focus only on digital data transmission Discretization 101001010101.......
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Transmitting data with signals Sender Receiver Data Received Data Signals In computer communication we use electromagnetic signals
What can be signals? Anything, as long as: • Signals can encode symbols – signs with a meaning • Sender and receiver agree on their meaning • These can be transmitted
Example symbols Sender Receiver Data Received Data Symbols: black and white card
Encoding 1 and 0 We agree that white card means 0 and black card means 1 Sender Receiver Data Received Data Symbols: black and white card
1 bit per symbol • 2 possible symbols: 0 and 1. • We can transmit 1 bit of information with each symbol • To transmit an 8-bit number, we need to show 8 symbols: • 12 in decimal = 00001010 = • 27 in decimal = 00011011 = • 254 in decimal = 11111110 =
What if we have 4 cards? How many bits per symbol?
What if we have 4 cards? 4 = 2 2 possible symbols = 2 bits per symbol 00 01 10 11 • To transmit an 8-bit number, we need to show 4 symbols: • 12 in decimal = 00001010 = 00 00 10 10 = • 27 in decimal = 00011011 = 00 01 10 11 = • 254 in decimal = 11111110 = 11 11 11 10 =
Why not infinite number of symbols? • More symbols = harder: • Harder to signal them • Harder to separate them for the receiver
Why not infinite number of symbols? • More symbols = harder: • Harder to signal them • Harder to separate them for the receiver • Example: separating these is easy: • How about these?
Baudrate and bitrate • Baudrate = the rate (speed) at which symbols can be shown, measured in symbols/second • Bitrate = how many bits per second the channel can transmit (the speed of the channel) • Bitrate = baudrate x bitsPerSymbol
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Digital signaling Symbols are distinct, grouped in separate categories. Examples: • Pieces of paper with distinct colors • Morse code (sound) ... --- ... • Distinct voltage levels in wires (+5V, 0V) • Digital signaling is easier over wires, harder with wireless. • Examples of digital signaling: Ethernet and ISDN lines
Transmitting data with signals Sender Receiver Data Received Data Signals In computer communication we use electromagnetic signals
Voltage levels as digital signals • Easiest example: 0V means 0 while +3V means 1 • We get 1 bit per symbol
4 levels = 2 bits/symbol If we can use 4 different voltage levels (-10V, -5V, +5V, +10V), we get 4 symbols = 2 bits per symbol: • -10V = 00 • -5V = 01 • +5V = 10 • +10V = 11
Goals for digital signaling Ideally, we want the signaling to be: • Effective : high bitrate (speed) • Synchronized: same baudrate for sender and receiver • Robust : noise should not confuse the receiver
Sender and receiver synchronization Receiver must sample (read) the symbols at the same rate at which they were sent (baudrate) Example of synchronization error: Sender signals the symbols: 0 1 time Receiver samples symbols: 0 0 1 1
Popular encoding types 1. Absolute 2. Differential 3. Bi-phase • We observe these for learning purposes. More advanced techniques used in practice.
Absolute encoding • Each symbol is a specific voltage level • Example: Non-Return-to-Zero (NRZ), used in RS-232 (serial port communication) • Effectiveness: + • Synchronization: - • Robustness: -
Differential encoding • One symbol (1) changes the voltage, the other symbol (0) keeps the same voltage level • Example: Non-Return-to-Zero-Inverted (NRZI), used in CDs • Effectiveness: + • Synchronization: - • Robustness: +/-
Bi-phase encoding • Each symbol is a sequence of two voltage levels. • For example: 0 is high-to-low voltage change, while 1 is low-to-high change • Example: Manchester encoding, used in 10Mb/s Ethernet • Effectiveness: - • Synchronization: + • Robustness: +
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Analog signaling • Idea: take an analog carrier wave , modulate it with the signal (data) • Modulation: change properties of the carrier signal, such as: • Amplitude • Frequency • Phase • Several properties can be combined (modern techniques do that)
Amplitude Shift keying (ASK) • Note: term Amplitude Modulation (AM) is used for analog data. ASK is used for digital data. • Idea: use distinct amplitude levels of the signal. • Informally: volume, intensity, strength of the signal
Frequency Shift Keying (FSK) • Idea: use distinct frequency waves in the signal
Phase Shift Keying (PSK) • Idea: change the phase of the signal • Informally: move the signal to the left or right
Limitations • We can’t increase the amplitudes and frequencies indefinitely. It will be hard to manufacture equipment. • We can’t increase the number of levels (symbols) indefinitely: noise will create confusion.
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Sender and receiver synchronization Receiver must sample (read) the symbols at the same rate at which they were sent (baudrate) Example of synchronization error: Sender signals the symbols: 0 1 time Receiver samples symbols: 0 0 1 1
Synchronization principles • Without synchronization the transmission is worthless (can even be harmful - misinformation) • Main sources of challenge: • High speed of transmission = many symbols/second • Long periods with no change (or “silence”) – receiver starts to wonder - what is going on?
Main synchronization approaches • In practice, different approaches. • The main synchronization types: a) Synchronization signal on a separate line b) Synchronization signal built into the line c) Start and stop signal before and after each message, short messages (low chance of de-synchronization within one message)
Outline 1. Digital and analog data 2. Signaling, symbols, bitrate 3. Digital signaling 4. Analog signaling 5. Sender and receiver synchronization 6. Physical media
Physical media • Media – tools and environment allowing to transmit signals, the channel of communication. • Popular physical media for computer networks: • Coaxial copper cables (somewhat outdated) • Twisted-pair cables • Fiber optic cables • Wireless communication
Coaxial cable Was more actively used in early days
Twisted pair cable RJ 45 • • Shielded Unshielded
Fiber-optic cables
How the fiber works Watch this video to understand how fiber optic cables are made and how they work: https://www.youtube.com/watch?v=0MwMkBET_5I
Wireless media Digital data sent with analog signals
Wireless links Wireless routers or bridges Cellular networks (3G, 4G, … ) How far can you transmit?
Wireless links
How many km did you say?
Things to remember • We transmit symbols at a specific rate ( baudrate ) • The overall transmission speed ( bitrate ) depends on baudrate and bits per symbol • Digital data can be encoded in both analog and digital signals • We strive for efficient, robust and synchronized signaling (encoding) • Different physical media are available, the most popular nowadays are twisted-pair cables, fiber optic cables and wireless media
Further reading Topic Chapters in Kurose’s book Chapters in Hallsteinsen’s book Analog and digital data, - 6.7 Analoge og digitale signals, symbols, See Data Encoding data og signaler baudrate, bitrate, Techniquest, Digital synchronization Modulation Techniques in Tutorialspoint https://www.tutorialspoin t.com/digital_communica tion/digital_communicati on_data_encoding_techni ques.htm Physical media 1.2.2 Physical media 6.6 Medier
Recommend
More recommend