Create Presentation
Download Presentation

Download Presentation

Computer Networks An Open Source Approach

Download Presentation
## Computer Networks An Open Source Approach

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Computer NetworksAn Open Source Approach**Chapter 2: Physical Layer Chapter 2: Physical Layer 1**Content**2.1 General Issues 2.2 Medium 2.3 Information Coding and Baseband Transmission 2.4 Digital Modulation and Multiplexing 2.5 Advanced Topics 2.6 Summary Chapter 2: Physical Layer 2**The physical (PHY) layer**• The bottommost layer of the OSI model or the TCP/ IP model in computer networks • The only layer that interacts with transmission media • Transmission medium • A material substance that can propagate energy waves called signals from a sender to a receiver • The free space can also be considered a transmission medium for electromagnetic waves 3**Physical layer converts (coding & modulation) digital data**into an appropriate signal waveformSignal is transmitted over transmission media • The transmission medium can only carry signals instead of data • The information source from the link layer is of digital data • The physical layer must convert the digital data into an appropriate signal waveform • In modern digital communications, such conversion is a two-step process (coding & modulation) • It first applies information coding to the digital data for data compression and protection • Then modulates the coded data into signalsthat are appropriate for transmission over the communication medium • In analog communication only the process of modulation is used 6**To enable high-speed transmissions**• The physical layer needs to decide which coding or modulation technique to use based on the properties of the medium • A wired medium is more reliable • The physical layer focuses solely on improving its throughput and utilization • A wireless medium is less reliable and exposed to the public • The physical layer has to cope with noise and interference and prevent the data from being corrupted (in addition to improving the throughput and utilization) 7**Multiple channels could exist on a medium**• A channel between a transmitter and a receiver can be physical or logical • In wired networks, a physical channel is a transmission path traversing through cables • In wireless networks, a physical channel is a band of frequencies in the spectra of electromagnetic waves • A logical channel is a sub-channel where the transmission medium is partitioned by various division methods such as • Time-division • Frequency-division • Code-division • Spatial-division 8**Multiplexing is a kind of technique used to better utilize a**medium • Time-Division Multiplexing (TDM) • Frequency-Division Multiplexing (FDM) • Code-Division Multiplexing (CDM) • Space-Division Multiplexing (SDM) 9**Time-Division Multiplexing (TDM)**• Two or more bit streams or signals are transferred apparently simultaneously as sub-channels in one communication channel, but are physically taking turns on the channel • The time domain is divided into several recurrent time slots of fixed length, one for each sub-channel 10**Frequency-Division Multiplexing (FDM)**• The total bandwidth available in a communication medium is divided into a series of non-overlapping frequency sub-bands, each of which is used to carry a separate signal • This allows a single transmission medium such as a cable or optical fiber to be shared by many signals 11**TDM + FDM**12**Code-Division Multiplexing (CDM)**• Each channel transmits its bits as a coded channel-specific sequence of pulses • This coded transmission typically is accomplished by transmitting a unique time-dependent series of short pulses, which are placed within chip times • All channels, each with a different code, can be transmitted on the same fiber and asynchronously demultiplxed 13**Spatial-Division Multiplexing (SDM)**• A method by which metallic, radio, or optical transmission media are physically separated by insulation, waveguides [導波管], or space in order to maintain channel separations • Within each physically distinct channel, multiple channels can be derived through frequency, time, or wavelength division multiplexing 15**2.1 General Issues**• Data from the link layer must be converted into digital signals or analog signals for digital transmission • The transmission and reception flows undergo several conversions in the physical layer • The need for line coding and digital modulation • To further improve the channel utilization, we need techniques such as multiplexing and multiple accesses to enable multiple users to access the same channel • In response to channel impairments, especially in the wireless media, several compensation measures are needed 16**Data and Signal: Analog or Digital**• Data • Digital data • Discrete value of data for storage or communication in computer networks • Analog data • Continuous value of data such as sound or image • Signal • Digital signal • Discrete-time signals containing digital information (discrete-time and discrete-value) • Analog signal • Continuous-time signals containing analog information (continuous time and continuous-value) Chapter 2: Physical Layer 4**Digital data and signalsare more robust to noise because**• Can be regenerated by regenerative repeaters • Can be protected from corruption by error correcting codes • Analog data • Represented in the form of analog signals are easily affected by noise • Often converted to digital data in the form of a bit stream • Later, they are transformed into signals for transmission • Thus, digital data are used in computer networks to represent analog sources such as images, voices, audio, and video 19**In computer networks, bit streams, or messages, move from**one machine to another across network connections through the transmission media • The transmission media convey the energy of signals along a physical path • Cables for electrical signals • Fibers for optical signals • Free space for electromagnetic signals • The physical layer plays the role of convertingdigital data into either digital or analog signals suitable for specific transmission media 20**Analog Data and Signal**• Analog signal • A continuous-time signal that contains analog information generated by an analog source, such as a sound or an image • It is often of continuous value (continuous time and continuous-value) • Example of analog communication • Vocal-auditory [聲樂聽覺] communications system • Analog signals can be sampled and quantized into digital signals for storage and communication 21**Sampled Signal (Discrete Signal) ‑ Discrete Time,**Continuous Values The continuous signal is represented with a green colored line while the discrete samples are indicated by the blue vertical lines. 22**Digital Signal (Sampled, Quantized)‑ Discrete Time,**Discrete Values 24**Digital Data and Signal**• Digital data take on discrete values such as zeros and ones in computers • They can be transformed into digital signals and transmitted directly for a short distance • Alternatively, they can modulate carriers (periodic analog signals) so that the modulated signals can be transmitted over a long distance • A digital signal can be derived from an analog signal by sampling at discrete times and by quantizing into discrete values • Analog signal [sampling] → discrete-time signal [quantizing] → digital signal • If a waveform has only two levels to represent binary states “0” and “1”, it is a binary digital signal that represents a bit stream 25**Sampling**• Sampling is a process that picks up samples at discrete times from a continuous time signal • Each sampled value is held constant within the sampling period, example • a continuous-time signalx(t) • where t is a variable defined on the entire real line of continuous time • can be sampled into a discrete-time signal • whose sampled values at the sample time instants can be represented by a numeric sequence or a discrete-time functionx[n], where n is a discrete variable taking values from the set of integers to represent the discrete time 26**Quantization**• Quantization • A process for mapping a range of values to a discrete finite set of numbers or values • Such a mapping process is usually performed by the use of analog to digital converters (ADC) • A quantized signal can be of continuous time but with discrete values • Quantization introduces quantization error , or quantization noise 27**Reconstruction**• An interpolation process that recovers the original continuous time signal from the sampled discrete-time signal • To perfectly reconstruct the original signal from a sequence of samples • It needs to sample at a rate that is equal to or higher than twice the highest frequency of the original signal • Nyquist-Shannon sampling theorem 28**Nyquist Theorem vs. Shannon Theorem**• A communication channel can be noiseless or noisy • If the channel is considered noiseless, its max data rate is subject to the Nyquist theorem • If noisy, the max data rate is subject to the Shannon theorem • What is the sampling rate for a signal to be accurately reconstructed? • What is the max data rate when information is transmitted over a noiseless channel? 29**Nyquist Theorem**What is the sampling rate for a signal to be accurately reconstructed? • To perfectly reconstruct the original signal from a sequence of samples • It needs to sample at a rate that is equal to or higher than twice the highest frequency of the original signal • It must sample at least twice as fast as the bandwidth of the signal • Nyquist sampling theoremfs≧ 2 x fmax • fs: the sampling rate • fmax: a limited bandwidth signal has a maximum frequency Chapter 2: Physical Layer 10**What is the max data rate when information is transmitted**over a noiseless channel? • Nyquist theorem • Max data rate for noiseless channel = 2 B log2 L • B: bandwidth (Hz) • L: # states used by a signal encoding method to represent symbols • Example: if a noiseless phone line of 3kHz and one-bit signal encoding (two states) is used, what is the max data rate when a voice is delivered over the phone? • 2 x 3k x log2 2 = 6 kbps Chapter 2: Physical Layer 10**Shannon Theorem**• In practice, channels are not noiseless but have many unwanted noises • Thermal noise • Inter-modulation noise • Crosstalk noise • Impulse noise • Shannon theorem: If a signal with a signal-to-noise ratio (SNR, S/N) is transmitted over a noisy channelMax data rate =B log2 (1+S/N) • B: bandwidth • S: signal • N: noise Chapter 2: Physical Layer 11**Shannon theorem is also called Shannon’s limit**• This limit is irrelevant to the encoding method, but it is related to SNR • Example: considering a noisy phone of 3kHz, what is the maximum data rate if the SNR (S/N) is 30dB? • 3k x log2 (1+1000) = 29.9 kbps Chapter 2: Physical Layer 11**Note: Signal-to-Noise Ratio (SNR or S/N)**• The ratio of the power in a signal to the power contained in the noise that is present at a particular point in the transmission • Typically measured at a receiver • Represented in decibels 34**Periodic and Aperiodic Signals**• Analog vs. digital signal • Analog signal • Continuous time and continuous-value • Digital signal • Discrete-time and discrete-value • Periodic vs. aperiodic signal • Periodic signal • Repeats itself after a certain amount of time • Aperiodic signal • Does not repeat 37**Both analog and digital signals can be either periodic or**aperiodic • For example, a sound signal of a human voice is an aperiodic analog signal; a digital clock signal is a periodic digital signal • Other than the time-domain characterization of signals, an alternative approach can be made in the frequency-domain based on the Fourier theory 38**Note: Fourier Transform**• Fourier transform is a mathematical transform with many applications in physics and engineering • It transforms a mathematical function of time, f(t), into a new function, F, whose argument is frequency with units of cycles or radians per second • F is known as the Fourier transform and/or the frequency spectrum of the function f • Fourier transform is a reversible operation • i.e., given the function F, one can determine the original function, f • f and F are also respectively known as time domain and frequency domain representations of the same "event" 39**Periodic signal**• A signal is said to be periodic if it has a line spectrum consisting of possibly infinite discrete frequencies • A line spectrum is a spectrum in which energy is concentrated at particular wavelengths 42**Spectra of Periodic Analog Signals**• Discrete frequencies 100kHz and 400kHz are used to represent two periodic analog signals with different amplitudes Chapter 2: Physical Layer 5**Aperiodic signal**• A signal is said to be aperiodic if it has a continuous spectrum with possibly infinite support 44**Spectra of Aperiodic Analog Signals**• An aperiodicband-limited analog signal • Band-limited signal • A signal is said to be band-limited if it has finite support; say it is properly contained in the frequency band from f1 to f2 Chapter 2: Physical Layer 6**Spectra of Digital Signals**• According to the Fourier theory • A periodic digital signal has a line spectrum that is obtained by multiplying the sinc spectrum by a periodic line spectrum consisting of a discrete frequency pulse train • A aperiodic digital signal has a continuous spectrum that is obtained by multiplying the sinc spectrum by a periodic continuous spectrum ranging from zero to infinite 46**Note: sinc Function**• In mathematics and engineering, the sinc function, denoted by sinc(x), has two slightly different definitions • In mathematics, the historical unnormalized sinc function is defined by sinc(x) = sin(x) / x • In digital signal processing and information theory, the normalized sinc function is commonly defined by sinc(x) = sin(∏x) / ∏x 47**A digital signal can be represented by a weighted**combination of sinusoidal, sine and cosine, signals with different frequencies, amplitudes, and phases(t) = (4/π) × (sin(2πft) + (1/3)sin(2π(3f)t)) 49**Spectra of Periodic Digital Signals**Chapter 2: Physical Layer 7