程序代写 PHYSICAL LAYER

PHYSICAL LAYER
Data vs. Signals

• Datavs.Signal

Copyright By PowCoder代写 加微信 powcoder

• Analogvs.Digital
• Periodicvs.Non-periodic
• FourierAnalysis(Transform/Series)
• Timevs.FrequencyDomainrepresentation • Basebandvs.BandpassTransmission
• TransmissionImpairment
• NoiselessChannel:NyquistBitRate
• NoisyChannel:ShannonCapacity
• ChannelPerformanceMeasures

Communication at Physical Layer
Physical layer is involved in communication links

Analog & Digital Data
• Analog data refers to information that is continuous;
– analog clock that has hour, minute, and second hands gives information in a continuous form
• Digital data refers to information that has discrete states
– digital clock that reports the hours and the minutes will change suddenly from 8:05 to 8:06

Analog & Digital Signals
• Tobetransmitted,datamustbetransformedto
electromagnetic signals
• Analog signal has infinitely many levels of intensity
over a period of time.
• Digital signal, can have only a limited number of defined values

Periodic and Non periodic Signals
• Indatacommunications,wecommonlyuse – Periodic analog signals and
– Non-periodic digital signals.
• Aperiodicsignalcompletesapatternwithina measurable time frame, called a period, and repeats that pattern over subsequent identical periods. The completion of one full pattern is called a cycle.
• Aperiodicsignalchangeswithoutexhibitingapatternor cycle that repeats over time

Periodic Analog Signals
• Periodicanalogsignalscanbeclassifiedassimpleor composite.
• Asimpleperiodicanalogsignal,asinewave,cannotbe decomposed into simpler signals.
• Acompositeperiodicanalogsignaliscomposedof multiple sine waves.

Periodic Analog Signal Example
• Thepowerinyourhousecanberepresentedbyasine wave with a peak amplitude of 155 to 170 V. However, it is common knowledge that the voltage of the power in U.S. homes is 110 to 120 V. This discrepancy is due to the fact that these are root mean square (rms) values. The signal is squared and then the average amplitude is calculated. The peak value is equal to 21⁄2 × rms value.

Two signals with the same phase and frequency, but different amplitudes

Frequency vs. Period
• Frequencyandperiodaretheinverseofeachother.
• Thepowerweuseathomehasafrequencyof60Hz. The period of this sine wave can be determined as follows:

Frequency vs. Period

Frequency vs. Period
Frequency is the rate of change with respect to time. Change in a short span of time means high frequency. Change over a long span of time means low frequency.
If a signal does not change at all, its frequency is zero. If a signal changes instantaneously, its frequency is infinite.

Frequency vs. Period
• Expressaperiodof100msinmicroseconds.
• Theperiodofasignalis100ms.Whatisitsfrequency in kilohertz?

Phase describes the position of the waveform relative to time 0.

• Asinewaveisoffset1/6cyclewithrespecttotime0. What is its phase in degrees and radians?

Wavelength and period
• Thedistancethewavepropagatesinonecycleisthe wavelength = speed * period

Time vs. Frequency Domain
A complete sine wave in the time domain can be represented by one single spike in the frequency domain.

Time vs. Frequency Domain
• Thefrequencydomainismorecompactandusefulwhen
we are dealing with more than one sine wave.
• Forexamplethreesinewaveseachwithdifferent amplitude and frequency, can be represented by three spikes in the frequency domain.

Time vs. Frequency Domain
• Asingle-frequencysinewaveisnotusefulindata communications;
• weneedtosendacompositesignal,asignalmadeof many simple sine waves.
• AccordingtoFourieranalysis,anycompositesignalisa combination of simple sine waves with different frequencies, amplitudes, and phases.
• GoodintrotoFourierAnalysiscanbefoundhere:

Time vs. Frequency Domain
• Ifthecompositesignalisperiodic,thedecomposition
gives a series of signals with discrete frequencies;
• ifthecompositesignalisaperiodic,thedecomposition gives a combination of sine waves with continuous frequencies.

• Aperiodiccompositesignalwithfrequencyf.The analysis of this signal can give us a good understanding of how to decompose signals

Non-periodic signal Example
• Canbethesignalcreatedbyamicrophoneora telephone set when a word or two is pronounced.
– In this case, the composite signal cannot be periodic, because that implies that we are repeating the same word or words with exactly the same tone

Fourier Series
• Any periodical function x(t) with period T can be
represented by an infinite series of sinusoidal functions (sin, cos) of with frequencies nf0, where f0 = 1/T, is the frequency of x(t), and n is an integer n=1,2,3,…

Fourier Series
• FourierSeriescanalsoberepresentedbyonlycosine functions as follows:

Fourier Transform
• Foranaperiodicsignal,thespectrumconsistsofa
continuum of frequencies.
• ThisspectrumcanbedefinedbytheFouriertransform
• Forasignalx(t)withaspectrumX(f),thefollowing relationships hold:
ejθ = cos(θ) + j sin(θ), j=√-1

• Thebandwidthofacompositesignalisthedifference between the highest and the lowest frequencies contained in that signal

• Ifaperiodicsignalisdecomposedintofivesinewaves with frequencies of 100, 300, 500, 700, and 900 Hz, what is its bandwidth? Draw the spectrum, assuming all components have a maximum amplitude of 10 V.
• Solution: Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then

• Aperiodicsignalhasabandwidthof20Hz.Thehighest frequency is 60 Hz. What is the lowest frequency? Draw the spectrum if the signal contains all frequencies of the same amplitude.
• Solution: Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then

• Aaperiodiccompositesignalhasabandwidthof200 kHz, with a middle frequency of 140 kHz and peak amplitude of 20 V. The two extreme frequencies have an amplitude of 0. Draw the frequency domain of the signal.
• Solution: The lowest frequency must be at 40 kHz and the highest at 240 kHz. Figure 3.15 shows the frequency domain and the bandwidth.

Real Examples
• Anexampleofaaperiodiccompositesignalisthesignal
propagated by an AM radio station.
• IntheUnitedStates,eachAMradiostationisassigned a 10-kHz bandwidth. The total bandwidth dedicated to AM radio ranges from 530 to 1700 kHz.

Real Examples
• Anotherexampleofaaperiodiccompositesignalisthe signal received by an old-fashioned analog black-and- white TV. A TV screen is made up of pixels. If we assume a resolution of 525 × 700, we have 367,500 pixels per screen. If we scan the screen 30 times per second, this is 367,500 × 30 = 11,025,000 pixels per second. The worst-case scenario is alternating black and white pixels. We can send 2 pixels per cycle. Therefore, we need 11,025,000 / 2 = 5,512,500 cycles per second, or Hz. The bandwidth needed is 5.5125 MHz.

Digital Signals
• Inadditiontobeingrepresentedbyananalogsignal, information can also be represented by a digital signal.
• Forexample,a1canbeencodedasapositivevoltage and a 0 as zero voltage.
• Adigitalsignalcanhavemorethantwolevels.Inthis case, we can send more than 1 bit for each level.

Digital Signals
nBits = ceil(log2(nLevels))

• Adigitalsignalhaseightlevels.Howmanybitsare needed per level? We calculate the number of bits from the formula

• Adigitalsignalhasninelevels.Howmanybitsare needed per level?
• Solution: We calculate the number of bits by using the formula. Each signal level is represented by:
– log2(9) = 3.17 bits.
– However, this answer is not realistic. – Ceil(log2(9)) = 4 bits.
– The number of bits sent per level needs to be an integer as well as a power of 2. For this example, 4 bits can represent one level.

• Assumeweneedtodownloadtextdocumentsatthe rate of 100 pages per minute. What is the required bit rate of the channel?
• Assume: A page is an average of 24 lines with 80 characters in each line, one character requires 8 bits
• Solution: The bit rate is

• Adigitizedvoicechannelismadebydigitizinga4-kHz bandwidth analog voice signal. We need to sample the signal at twice the highest frequency (two samples per hertz). We assume that each sample requires 8 bits. What is the required bit rate?
Solution: The bit rate can be calculated as

• Whatisthebitrateforhigh-definitionTV(HDTV)?
• Note: HDTV uses digital signals to broadcast high quality video signals. The HDTV screen is normally a ratio of 16 : 9. There are 1920 by 1080 pixels per screen, and the screen is renewed 30 times per second. 24 bits represents one color pixel.
• Solution:
• Note: The TV stations reduce this rate to 20 to 40 Mbps through compression.

Time/Frequency domain signals of Periodic/Non-Periodic Signals

Time/Frequency domain signals of Periodic/Non-Periodic Signals
• Frequencydomainrepresentationofperiodicsignalisa series of discrete frequencies,
– multiples of the frequency corresponding to the signal’s period
• Frequencydomainrepresentationofnon-periodic contain continuous range of frequencies
• Notice that the envelop of the frequency response of the periodic signal looks the same as the frequency response of the similar non-periodic signal
• Sampling the frequency response of a continuous signal, then taking inverse transform, corresponds to a periodic signal with the same shape as the original signal

Baseband Transmission
• Adigitalsignalisacompositeanalogsignalwithan infinite bandwidth.
• Channelhasbandwidthlimit,usuallyactsaslowpass filter

Baseband Transmission

Baseband Transmission
• Basebandtransmissionofadigitalsignalthatpreserves the shape of the digital signal is possible only if we have a low-pass channel with an infinite or very wide bandwidth.
• Basebandtransmissionusingadedicatedmediumwith limited bandwidth will result in signal distortion at high frequencies, i.e. sharp edges

• Anexampleofadedicatedchannelwheretheentire bandwidth of the medium is used as one single channel is a LAN. Almost every wired LAN today uses a dedicated channel for two stations communicating with each other.
– In a bus topology LAN with multipoint connections, only two stations can communicate with each other at each moment in time (timesharing); the other stations need to refrain from sending data.
– In a star topology LAN, the entire channel between each station and the hub is used for communication between these two entities.

Analog Approximation of Digital Signal
Highest frequency for 010, 101

Analog Approximation of Digital Signal
Using 3rd harmonic to improve signal quality

Baseband Transmission Conclusion
• Inbasebandtransmission,therequiredbandwidthis proportional to the bit rate; if we need to send bits faster, we need more bandwidth.
• Bandwidthrequirementexamples:

Bandpass Channel Transmission
• Iftheavailablechannelisabandpasschannel,we cannot send the digital signal directly to the channel; we need to convert the digital signal to an analog signal before transmission.

Modulation using carrier signal

• Anexampleofbroadbandtransmissionusing modulation is the sending of computer data through a telephone subscriber line, the line connecting a resident to the central telephone office. These lines are designed to carry voice with a limited bandwidth. The channel is considered a bandpass channel. We convert the digital signal from the computer to an analog signal, and send the analog signal. We can install two converters to change the digital signal to analog and vice versa at the receiving end. The converter, in this case, is called a modem

• Asecondexampleisthedigitalcellulartelephone.For better reception, digital cellular phones convert the analog voice signal to a digital signal. Although the bandwidth allocated to a company providing digital cellular phone service is very wide, we still cannot send the digital signal without conversion. The reason is that we only have a bandpass channel available between caller and callee. We need to convert the digitized voice to a composite analog signal before sending.

Transmission Impairment
• Signalstravelthroughtransmissionmedia,whichare not perfect. The imperfection causes signal impairment. This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. What is sent is not what is received. Three causes of impairment are attenuation, distortion, and noise.

Attenuation
• Attenuationislossofsignalpower(amplitude)dueto resistance of the communication medium during transmission

Measuring Attenuation
• Toshowthatasignalhaslostorgainedstrength, engineers use the unit of the decibel.
• Thedecibel(dB)measurestherelativestrengthsoftwo signals or one signal at two different points.
• Notethatthedecibelisnegativeifasignalisattenuated and positive if a signal is amplified
= 10 = 20

Measuring Attenuation Example
• Supposeasignaltravelsthroughatransmission medium and its power is reduced to one-half. This means that P2 is (1/2)P1. calculate the attenuation (loss of power) in dB (decibel)
• Alossof3dB(–3dB)isequivalenttolosingone-half the power.

Measuring Attenuation Example2
• Asignaltravelsthroughanamplifier,anditspoweris increased 10 times. This means that P2 = 10P1 . In this case, the amplification (gain of power) can be calculated as:

Measuring Attenuation Example3
• Onereasonthatengineersusethedecibeltomeasure the changes in the strength of a signal is that decibel numbers can be added (or subtracted) when we are measuring several points (cascading) instead of just two. In Figure, a signal travels from point 1 to point 4. In this case, the decibel value can be calculated as 1 dB

Measuring Attenuation Example4
• Sometimesthedecibelisusedtomeasuresignalpower in milliwatts. In this case, it is referred to as dBm and is calculated as dBm = 10 log10 Pm , where Pm is the power in milliwatts.
• Calculate the power of a signal with dBm = −30.

Measuring Attenuation Example5
• Thelossinacableisusuallydefinedindecibelsper kilometer (dB/km). If the signal at the beginning of a cable with −0.3 dB/km has a power of 2 mW, what is the power of the signal at 5 km?
• Solution: The loss in the cable in decibels is 5 × (−0.3) = −1.5 dB. We can calculate the power as

Distortion
• Differentfrequencycomponentsofthesignaltravelat different speeds, face different attenuation, causing signal distortion

• Unwantedsignalsinsertedbetweentransmitterand receiver
• Isthemajorlimitingfactorincommunicationssystem performance

Noise Types
• Thermal Noise (ambient)
– Due to thermal agitation of electrons
– Uniformly distributed across bandwidth – Referred to as white (Gaussian) noise
• Inter-modulation noise
– Produced by nonlinearity in transmitter/receiver and
intervening transmission medium
• Cross Talk
– A signal from one line is picked up by another
– Can occur by electrical coupling between nearby twisted pairs or when microwave antennas pick up unwanted signals

Noise Types
• Impulse Noise:
– Caused by external electromagnetic interferences
– Non-continuous, consisting of irregular pulses or spikes
– Short duration and high amplitude
– Minor annoyance for analog signals but a major source of error in digital data

Signal to Noise Ratio
• The signal-to-noise ratio is defined as:
• Thepowerofasignalis10mWandthepowerofthe noise is 1 μW; what are the values of SNR and SNRdB ?
• Solution: The values of SNR and SNRdB can be calculated as follows:

• ThevaluesofSNRandSNRdBforanoiselesschannel are inifinity, we can never achieve this ratio in real life; it is an ideal.

Large vs. Small SNR

Noiseless Channel: Nyquist Bit Rate
• Foranoiselesschannel,theNyquistbitrateformula defines the theoretical maximum bit rate:
• OnemightaskwhynotincreaseL,numberoflevelsthe signal could take, to increase bit rate?
• Answer: Increasing the levels of a signal may reduce the reliability of the system

Nyquist Bit Rate Example
• Consideranoiselesschannelwithabandwidthof3000 Hz transmitting a signal with two signal levels. The maximum bit rate can be calculated as
• Considerthesamenoiselesschanneltransmittinga signal with four signal levels (for each level, we send 2 bits). The maximum bit rate can be calculated as:

Nyquist Bit Rate Example2
• Weneedtosend265kbpsoveranoiselesschannelwith a bandwidth of 20 kHz. How many signal levels do we need?
• Solution:WecanusetheNyquistformulaasshown:
• Sincethisresultisnotapowerof2,weneedtoeither increase the number of levels or reduce the bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is 240 kbps
(use ceiling function with log2)

Noisy Channel:
• Inreality,wecannothaveanoiselesschannel;the channel is always noisy.
• In1944,ClaudeShannonintroducedaformula,called the Shannon capacity, to determine the theoretical highest data rate for a noisy channel:
– capacity is the capacity of the channel in bits per second
– bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio

Channel Capacity
• ChannelCapacityisacharacteristicofthechannel,not the method of transmission. i.e. is independent of how many signal levels are used

Capacity of a Noisy Channel
• Consideranextremelynoisychannelinwhichthevalue of the signal-to-noise ratio is almost zero. In other words, the noise is so strong that the signal is faint. For this channel the capacity C is calculated as:
• Thismeansthatthecapacityofthischanneliszero regardless of the bandwidth. In other words, we cannot receive any data through this channel.

• Wecancalculatethetheoreticalhighestbitrateofa regular telephone line. A telephone line normally has a bandwidth of 3000. The signal-to-noise ratio is usually 3162. For this channel the capacity is calculated as:
• Thismeansthatthehighestbitrateforatelephoneline is 34.860 kbps. If we want to send data faster than this, we can either increase the bandwidth of the line or improve the signal-to-noise ratio.

• Thesignal-to-noiseratioisoftengivenindecibels. Assume that SNRdB = 36 and the channel bandwidth is 2 MHz. The theoretical channel capacity can be calculated as:

• Forpracticalpurposes,whentheSNRisveryhigh,we can assume that SNR + 1 is almost the same as SNR. In these cases, the theoretical channel capacity can be simplified to:
• Forexample,wecancalculatethetheoreticalcapacity of the previous example as

• Wehaveachannelwitha1-MHzbandwidth.TheSNR for this channel is 63. What are the appropriate bit rate and signal level?
• Solution: First, we use the Shannon formula to find the upper limit.
• TheShannonformulagivesus6Mbps,theupperlimit. For better performance we choose something lower, 4 Mbps, for example. Then we use the Nyquist formula to find the number of signal levels.

Conclusion
• TheShannoncapacitygivesusthetheoreticalupper limit; the Nyquist formula tells us how many signal levels we need.

Channel Performance Measures
• Oneimportantissueinnetworkingistheperformanceof the network—how good is it?
• Wediscussqualityofservice,anoverallmeasurement of network performance, in greater detail later.
• Inthissection,weintroducetermsthatweneed: – Bandwidth
– Throughput
– Latency (Delay)
– Bandwidth-Delay Product

• Innetworking,weusethetermbandwidthintwo contexts.
• Thefirst,bandwidthinhertz,referstotherangeof frequencies in a composite signal or the range of frequencies that a channel can pass.
• Thesecond,bandwidthinbitspersecond,referstothe speed of bit transmission in a channel or link.

• Thebandwidthofasubscriberlineis4kHzforvoiceor data. The bandwidth of this line for data transmission can be up to 56,000 bps using a sophisticated modem to change the digital signal to analog.
• Ifthetelephonecompanyimprovesthequalityofthe line and increases the bandwidth to 8 kHz, we can send 112,000 bps by using the same technology as mentioned above.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com