COMP 421 CMPET 401 COMMUNICATIONS and NETWORKING CLASS

  • Slides: 73
Download presentation
COMP 421 /CMPET 401 COMMUNICATIONS and NETWORKING CLASS 6

COMP 421 /CMPET 401 COMMUNICATIONS and NETWORKING CLASS 6

Encoding Techniques l Digital data, digital signal – Easy encoding / Less Complex Less

Encoding Techniques l Digital data, digital signal – Easy encoding / Less Complex Less Expensive l Analog data, digital signal – Can transmit data over Digital Network l Digital data, analog signal – Modems / Fiber / Unguided Media l Analog data, analog signal – Cheap & Easy Baseband Transmission / FDM

Analog Data Choices

Analog Data Choices

Digital Data Choices

Digital Data Choices

Transmission Choices l Analog transmission – Only transmits analog signals, without regard for data

Transmission Choices l Analog transmission – Only transmits analog signals, without regard for data content – Attenuation overcome with amplifiers l Digital transmission – Transmits analog or digital signals – Uses repeaters rather than amplifiers

Advantages of Digital Transmission The signal is exact l Signals can be checked for

Advantages of Digital Transmission The signal is exact l Signals can be checked for errors l Noise/interference are easily filtered out l A variety of services can be offered over one line l Higher bandwidth is possible with data compression l

Encoding schemes Analog data, Analog signal voice Telephone analog Digital data, Analog signal digital

Encoding schemes Analog data, Analog signal voice Telephone analog Digital data, Analog signal digital Modem analog Analog data, Digital signal analog digital CODEC Digital data, Digital signal digital Digital transmitter digital

Encoding and Modulation x(t) g(t) digital or analog Encoder digital g(t) x(t) Decoder t

Encoding and Modulation x(t) g(t) digital or analog Encoder digital g(t) x(t) Decoder t s(f) s(t) m(t) Modulator digital or analog fc m(t) Demodulator fc f

Why encoding? l Three factors determine successfulness of receiving a signal: – S/N (Signal

Why encoding? l Three factors determine successfulness of receiving a signal: – S/N (Signal to Noise Ratio) – Data rate – Bandwidth

Encoding Schemes' Evaluation Factors l Signal spectrum l Clocking l Error detection l Signal

Encoding Schemes' Evaluation Factors l Signal spectrum l Clocking l Error detection l Signal interference & noise immunity l Cost and complexity

Digital Data, Digital Signal / Characteristics l Digital signal – Uses discrete, discontinuous, voltage

Digital Data, Digital Signal / Characteristics l Digital signal – Uses discrete, discontinuous, voltage pulses – Each pulse is a signal element – Binary data is encoded into signal elements

Terms (1) l Unipolar – All signal elements have same sign l Polar –

Terms (1) l Unipolar – All signal elements have same sign l Polar – One logic state represented by positive voltage the other by negative voltage l Data rate – Rate of data transmission in bits per second l Duration or length of a bit – Time taken for transmitter to emit the bit

Terms (2) l Modulation rate – Rate at which the signal level changes –

Terms (2) l Modulation rate – Rate at which the signal level changes – Measured in baud = signal elements per second l Mark and Space – Binary 1 and Binary 0 respectively

Interpreting Signals l Need to know – Timing of bits - when they start

Interpreting Signals l Need to know – Timing of bits - when they start and end – Signal levels l Factors affecting successful interpretation of signals: – Signal to noise ratio – Data rate – Bandwidth

Comparison of Encoding Schemes (1) l Signal Spectrum – Lack of high frequencies reduces

Comparison of Encoding Schemes (1) l Signal Spectrum – Lack of high frequencies reduces required bandwidth – Lack of dc component allows ac coupling via transformer, providing isolation – It is important to concentrate power in the middle of the bandwidth

Comparison of Encoding Schemes (2) Clocking issues • Synchronizing transmitter and receiver is essential

Comparison of Encoding Schemes (2) Clocking issues • Synchronizing transmitter and receiver is essential • External clock is one way used for synchronization • Synchronizing mechanism based on signal is also used & preferred (over using an external clock)

Mean square voltage per unit bandwidth Spectral density 1. 5 1 B 8 ZS,

Mean square voltage per unit bandwidth Spectral density 1. 5 1 B 8 ZS, HDB 3 NRZL, NRZI AMI, Pseudoternary 0. 5 Manchester, Differential Manchester 0 -0. 5 0 0. 5 1 1. 5 Normalized frequency (f/r)

Comparison of Encoding Schemes (3) l Error detection – Can be built into signal

Comparison of Encoding Schemes (3) l Error detection – Can be built into signal encoding l Signal interference and noise immunity – Some codes are better than others l Cost and complexity – Higher signal rate (& thus data rate) lead to higher costs – Some codes require signal rate greater than data rate

Encoding Schemes Nonreturn to Zero-Level (NRZ-L) l Nonreturn to Zero Inverted (NRZI) l Bipolar

Encoding Schemes Nonreturn to Zero-Level (NRZ-L) l Nonreturn to Zero Inverted (NRZI) l Bipolar -AMI (Alternate Mark Inversion) l Pseudoternary l Manchester l Differential Manchester l B 8 ZS l HDB 3 l

Digital Data, Digital Signal 0 1 0 0 NRZI Bipolar -AMI Pseudoternary Manchester Differential

Digital Data, Digital Signal 0 1 0 0 NRZI Bipolar -AMI Pseudoternary Manchester Differential Manchester 1 1 0 0 0 1 1

Nonreturn to Zero-Level (NRZ-L) l Two different voltages: – 0 - Low Level –

Nonreturn to Zero-Level (NRZ-L) l Two different voltages: – 0 - Low Level – 1 - High Level l Voltage constant during bit interval l Most often, negative voltage for one value and positive for the other

Nonreturn to Zero Inverted Nonreturn to zero inverted on ones l Constant voltage pulse

Nonreturn to Zero Inverted Nonreturn to zero inverted on ones l Constant voltage pulse for duration of bit l Data encoded as presence or absence of signal transition at beginning of bit time l Transition (low to high or high to low) denotes a binary 1 l No transition denotes binary 0 l An example of differential encoding (Data represented by changes rather than levels) l

NRZ

NRZ

NRZ pros and cons l Pros – Easy to engineer – Makes good use

NRZ pros and cons l Pros – Easy to engineer – Makes good use of bandwidth l Cons – dc component – Lack of synchronization capability Used for magnetic recording l Not often used for signal transmission l

Bipolar-AMI – – Zero represented by no line signal One represented by positive or

Bipolar-AMI – – Zero represented by no line signal One represented by positive or negative pulse One pulses alternate in polarity No loss of sync if a long string of ones happens (zeros still a problem) – No net dc component Can use a transformer for isolating transmission line – Lower bandwidth – Easy error detection

Pseudoternary l One represented by absence of line signal l Zero represented by alternating

Pseudoternary l One represented by absence of line signal l Zero represented by alternating positive and negative l No advantage or disadvantage over bipolar -AMI

Bipolar-AMI and Pseudoternary

Bipolar-AMI and Pseudoternary

Trade Off for Multilevel Binary l Not as efficient as NRZ – With multi-level

Trade Off for Multilevel Binary l Not as efficient as NRZ – With multi-level binary coding, the line signal may take on one of 3 levels, but each signal element, which could represent log 23 = 1. 58 bits of information, bears only one bit of information – Receiver must distinguish between three levels : (+A, -A, 0) – Requires approx. 3 d. B more signal power for same probability of bit error

Biphase l Manchester – Transition in middle of each bit period – Transition serves

Biphase l Manchester – Transition in middle of each bit period – Transition serves as clock and data – One is represented by a transition from low to high – Zero is represented by a transition from high to low l Used by IEEE 802. 3 (Ethernet)

Differential Manchester • Always a transition in the middle of the interval for clocking

Differential Manchester • Always a transition in the middle of the interval for clocking • Transition at start of a bit period represents zero • No transition at start of a bit period represents one Note: this is a differential encoding scheme used by IEEE 802. 5 (Token Ring)

Biphase Pros and Cons l l Con – At least one transition per bit

Biphase Pros and Cons l l Con – At least one transition per bit time and possibly two – Maximum modulation rate is twice NRZ – Requires more bandwidth Pros – Synchronization on mid bit transition (self clocking) – No dc component – Error detection l Absence of expected transition points to error in transmission

Modulation Rate The modulation Rate is at which signal elements are generated In General

Modulation Rate The modulation Rate is at which signal elements are generated In General the Modulation Rate D = R/b where R=Data Rate=bits/sec b=number of bits per signal element Data Rate (bit Rate 1/Tb) where Tb is bit duration For Manchester Encoding maximum Rate is: 2/Tb

Scrambling Techniques l Used to reduce signaling rate relative to the data rate by

Scrambling Techniques l Used to reduce signaling rate relative to the data rate by replacing sequences that would produce constant voltage for a priod of time with a filling sequence that accomplishes the following goals: – Must produce enough transitions to maintain synchronization – Must be recognized by receiver and replaced with original data sequence – is same length as original sequence

Scrambling Techniques • No dc component • No long sequences of zero level line

Scrambling Techniques • No dc component • No long sequences of zero level line signal • No reduction in data rate • Error detection capability • As an example, fax machines use the modified Huffman code to accomplish this.

B 8 ZS l B 8 ZS: Abbreviation for bipolar with eight-zero substitution l

B 8 ZS l B 8 ZS: Abbreviation for bipolar with eight-zero substitution l Same as Bipolar AMI with 8 Zeros Substitution Based on Bipolar-AMI If octet of all zeros and last voltage pulse preceding was positive, encode as 000+-0 -+ If octet of all zeros and last voltage pulse preceding was negative, encode as 000 -+0+Causes two violations of AMI code This is unlikely to occur as a result of noise Receiver detects and interprets the sequence as octet of all zeros l l l

B 8 ZS • A one is sent on a T 1 by sending

B 8 ZS • A one is sent on a T 1 by sending a pulse, as opposed to not sending a pulse. • The alternating mark rule means that if the last pulse sent was of a positive going polarity, the next pulse sent must be negative going. • If a T 1 device receives two pulses in a row and they are of the same polarity a bipolar violation (BPV) has occurred. • In B 8 ZS a specific combination of valid pulses and bipolar violations is used to represent a string of eight zeroes, whenever the user data contains eight zeroes in a row

B 8 ZS Since a T 1 uses a single pair of wires in

B 8 ZS Since a T 1 uses a single pair of wires in each direction and the only signals on those wires are the pulses which represent data; the only way to recover clock and retain synchronization on a T 1 is by detecting the rate at which pulses are being received. All of the equipment in a T 1 circuit must operate at the same rate because all of the equipment must sense the T 1 at the correct time in order to determine if a pulse (1) or no pulse (0) has been received at each bit time. Since only ones are sent as pulses and zeroes are represented by doing nothing, if too many zeroes are sent at a time there will be no pulses on the T 1 at all and the clock circuitry in all of the hardware will rapidly fall out of synchronization. Thus the design of AMI requires that a certain ONES DENSITY be maintained, that a certain minimum of the bits over a certain period of time be guaranteed to be a ONE (pulse). This is why AMI circuits require DENSITY enforcement

B 8 ZS Briefly stated; on average one bit in eight must be a

B 8 ZS Briefly stated; on average one bit in eight must be a one and no more than (varies according to specific standard) so many zeroes may be sent in a row. In order to be able to satisfy the ones density requirement on an AMI T 1 one bit out of every eight is taken away from the user, not available for voice or data traffic, and that 1 bit in 8 is always sent as a one. Once this has been done the requirement for ones density is satisfied and the user is free to send any data pattern in the remaining bandwidth.

B 8 ZS The rate of a T 1 is 1. 544 megabits per

B 8 ZS The rate of a T 1 is 1. 544 megabits per second. 8 K is used for framing leaving 1. 536 MBPS. The 1. 536 is usually divided into 24 timeslots (DS 0 s) or "channels" each being inherently 64 KBPS. By taking the 1 bit in 8 that is reserved to satisfy ones density the user is left with 56 K per timeslot.

AMI • AMI = Alternate Mark Inversion. This is the original method of formatting

AMI • AMI = Alternate Mark Inversion. This is the original method of formatting T 1 data streams. In AMI a zero is always sent by doing nothing, at the time when a pulse might otherwise be sent, a pulse is not sent to represent a zero. • A one is sent on an AMI T 1 by sending a pulse, as opposed to not sending a pulse. • The alternating mark rule means that if the last pulse sent was of a positive going polarity, the next pulse sent must be negative going. • If an AMI T 1 device receives two pulses in a row and they are of the same polarity a bipolar violation (BPV) has occurred. • Thus AMI has a rudimentary error checking capability with a 50% probability of detecting altered, inserted or lost bits end to end.

ESF Extended Super Frame A DS level and framing specification for synchronous digital streams

ESF Extended Super Frame A DS level and framing specification for synchronous digital streams over circuits in the North America. A DS 1 "frame" is composed of 24 eight-bit bytes plus one framing bit (193 bits). 8000 bytes per second come from each source, and thus 8000 frames per second are transported by the DS 1 signal. The result is 193*8000 = 1, 544, 000 bits per second. In the original standard, the framing bits continuously repeated the sequence 110111001000, and such a 12 -frame unit is called a superframe. In voice telephony, errors are acceptable (early standards allowed as much as one frame in six to be missing entirely), so the least significant bit in two of the 24 streams was used for signaling between network equipments. This is called robbed bit signaling

ESF To promote error-free transmission, an alternative called the extended super-frame (ESF) of 24

ESF To promote error-free transmission, an alternative called the extended super-frame (ESF) of 24 frames was developed. In this standard, six of the 24 framing bits provide a six bit cyclic redundancy check(CRC-6), and six provide the actual framing. The other 12 form a virtual circuit of 4000 bits per second for use by the transmission equipment, for call progress signals such as busy, idle and ringing. DS 1 signals using ESF equipment are nearly error-free, because the CRC detects errors and allows automatic re-routing of connections.

HDB 3 l l l High Density Bipolar 3 Zeros Based on bipolar-AMI String

HDB 3 l l l High Density Bipolar 3 Zeros Based on bipolar-AMI String of four zeros replaced with one or two pulses Note: The following is the explanation for the HDB 3 code example on the next slide (see rules in Table 5. 4, page 142): Assuming that an odd number of 1's have occurred since the last substitution, since the polarity of the preceding pulse is "-", then the first 4 zeros are replaced by "000 -". For the next 4 zeros, since there have been no Bipolar pulses since the 1 st substitution, then they are replaced by"+00+" since the preceding pulse is a "-". For the 3 rd case where 4 zeros happen, 2 (even) Bipolar pulses have happened since the last substitution and the polarity of the preceding pulse is "+", so "-00 -" is substituted for the zeros.

B 8 ZS and HDB 3 (Assume odd number of 1 s since last

B 8 ZS and HDB 3 (Assume odd number of 1 s since last substitution) See Table 5. 4 for HDB 3 Substitution Rules

Digital Data, Analog Signal l l Transmitting digital data through PSTN (Public telephone system)

Digital Data, Analog Signal l l Transmitting digital data through PSTN (Public telephone system) – 300 Hz to 3400 Hz bandwidth – modem (modulator-demodulator) is used to convert digital data to analog signal and vice versa Three basic modulation techniques are used: Amplitude shift keying (ASK) Frequency shift keying (FSK) Phase shift keying (PSK)

Modulation Techniques

Modulation Techniques

Amplitude Shift Keying Values represented by different amplitudes of carrier l Usually, one amplitude

Amplitude Shift Keying Values represented by different amplitudes of carrier l Usually, one amplitude is zero l – i. e. presence and absence of carrier is used Susceptible to sudden gain changes l Inefficient l Up to 1200 bps on voice grade lines l Used over optical fiber l

ASK Vd(t) Vc(t) VASK(t) Signal power frequency spectrum fc-3 f 0 fc-f 0 fc

ASK Vd(t) Vc(t) VASK(t) Signal power frequency spectrum fc-3 f 0 fc-f 0 fc fc+f 0 fc+3 f 0 Frequency

Frequency Shift Keying Values represented by different frequencies (near carrier) l Less susceptible to

Frequency Shift Keying Values represented by different frequencies (near carrier) l Less susceptible to error than ASK l Up to 1200 bps on voice grade lines l High frequency radio (3 -30 MHz) l Higher frequency on LANs using co-ax l

FSK Data vd(t) sign al Carrier 1 v 1(t) Carrier 2 v 2(t) FSK(

FSK Data vd(t) sign al Carrier 1 v 1(t) Carrier 2 v 2(t) FSK( t) Signal power frequency spectrum Frequency f 1 f 2

FSK in modem (on Voice Grade Line) Amplitude PSTN bandwidth 400 3400 Frequency(Hz) 1180

FSK in modem (on Voice Grade Line) Amplitude PSTN bandwidth 400 3400 Frequency(Hz) 1180 1650 (1270) (2025) 1850 980 (2225) (1070) frequency spectru

Phase Shift Keying l Phase of carrier signal is shifted to represent data l

Phase Shift Keying l Phase of carrier signal is shifted to represent data l Differential PSK – Phase shifted relative to previous transmission rather than some reference signal

PSK Data Signal vc(t) Carrier vc(t) Phase coherentv. PSK(t) Differential v’PSK(t) l bit rate

PSK Data Signal vc(t) Carrier vc(t) Phase coherentv. PSK(t) Differential v’PSK(t) l bit rate = signaling rate Differential example: for every logic 1, 180 degree phase shift 180=0 0=1 phase diagram

Quadrature PSK l More efficient use by each signal element representing more than one

Quadrature PSK l More efficient use by each signal element representing more than one bit – e. g. shifts of /2 (90 o) – Each element represents two bits – Can use 8 phase angles and have more than one amplitude – 9600 bps modems use 12 angles , four of which have two amplitudes

Multilevel Modulation Method 00 +90°=01 +180°=10 01 10 11 0°=00 0° +270°=11 4 -PSK

Multilevel Modulation Method 00 +90°=01 +180°=10 01 10 11 0°=00 0° +270°=11 4 -PSK phase diagram l +90° +180° +270° bit rate = n x signaling rate

Performance of Digital to Analog Modulation Schemes l l Bandwidth – ASK and PSK

Performance of Digital to Analog Modulation Schemes l l Bandwidth – ASK and PSK bandwidth directly related to bit rate – FSK bandwidth related to data rate for lower frequencies – Requires more analog bandwidth than ASK In the presence of noise, bit error rate of PSK and QPSK are about 3 d. B superior to ASK and FSK

Analog Data, Digital Signal l Digitization – Conversion of analog data into digital data

Analog Data, Digital Signal l Digitization – Conversion of analog data into digital data – Digital data can then be transmitted using NRZ-L or using other codes – Digital data can then be converted to analog signal – Analog to digital conversion done using a CODEC – Pulse code modulation – Delta modulation

Analog data, Digital signal l Two principle techniques used – PCM (Pulse Code Modulation)

Analog data, Digital signal l Two principle techniques used – PCM (Pulse Code Modulation) – DM (Delta Modulation) Sampling PAM signal clock Analog voice signal Sampling Circuit PCM signal Quantizer and compander Digitized voice signal

Pulse Code Modulation(PCM) (1) l l l If a signal is sampled at regular

Pulse Code Modulation(PCM) (1) l l l If a signal is sampled at regular intervals at a rate higher than twice the highest signal frequency, the samples contain all the information of the original signal – (Proof - Stallings appendix 4 A) Voice data limited to below 4000 Hz Require 8000 sample per second Analog samples (Pulse Amplitude Modulation, PAM) Each sample assigned digital value

Pulse Code Modulation(PCM) (2) l l l 4 bit system gives 16 levels Quantized

Pulse Code Modulation(PCM) (2) l l l 4 bit system gives 16 levels Quantized – Quantizing error or noise – Approximations mean it is impossible to recover original exactly 8 bit sample gives 256 levels Quality comparable with analog transmission 8000 samples per second of 8 bits each gives 64 kbps

Pulse Code Modulation(PCM) (3) The process starts with an analog signal, which is sampled

Pulse Code Modulation(PCM) (3) The process starts with an analog signal, which is sampled by PAM sample. the resulting pulse are quantized to produced PCM pulses and then encoded to produce bit stream. At the receiver end, the process is reversed to reproduce the analog signal.

PCM l Sampling signal based on Nyquist theorem Original signal PAM pulse 3. 2

PCM l Sampling signal based on Nyquist theorem Original signal PAM pulse 3. 2 3 PCM pulse with quantized error 011 PCM output 3. 9 4 2. 8 3. 4 3 3 4. 2 1. 2 4 1 100 011 001 100 01110001101100

Nonlinear Encoding Quantization levels are not necessarily equally spaced. The problem with equal spacing

Nonlinear Encoding Quantization levels are not necessarily equally spaced. The problem with equal spacing is that the mean absolute error for each sample is the same, regardless the signal level. Lower amplitude values are relatively more distorted. l Nonlinear encoding reduces overall signal distortion l Can also be done by companding l

Nonlinear Encoding 15 14 13 12 11 10 9 8 7 6 5 4

Nonlinear Encoding 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Quantizing level 15 14 13 Strong signal Weak signal 12 11 10 9 8 76 5 4 3 2 1 0 Without nonlinear encoding With nonlinear encoding

Nonlinear Encoding Prior to the input signal being sampled and converted by ADC into

Nonlinear Encoding Prior to the input signal being sampled and converted by ADC into a digital form, it is passed through a circuit known as a compressor. Similarly, at the destination, the reverse operation is perform on the output of the DAC by a circuit known as expander.

Delta Modulation l Analog input is approximated by a staircase function l Move up

Delta Modulation l Analog input is approximated by a staircase function l Move up or down one level ( ) at each sample interval l Binary behavior – Function moves up or down at each sample interval

Delta Modulation - example

Delta Modulation - example

Delta Modulation - Performance l Good voice reproduction – PCM - 128 levels (7

Delta Modulation - Performance l Good voice reproduction – PCM - 128 levels (7 bit) – Voice bandwidth 4 khz – Should be 8000 x 7 = 56 kbps for PCM l Data compression can improve on this – e. g. Interframe coding techniques for video

Analog Data, Analog Signals l Why modulate analog signals? – Higher frequency can give

Analog Data, Analog Signals l Why modulate analog signals? – Higher frequency can give more efficient transmission – Permits frequency division multiplexing l Types of modulation – Amplitude – Frequency – Phase

Multilevel Modulation Method Quadrature Amplitude Modulation (QAM) Combines differential phase and amplitude shifts to

Multilevel Modulation Method Quadrature Amplitude Modulation (QAM) Combines differential phase and amplitude shifts to achieve 16 distinct states, thereby allowing 4 bits to be represented by a single signal 16 -QAM phase diagram

V. 34 Modulation V. 34 Also known as V. FAST. It will allow modems

V. 34 Modulation V. 34 Also known as V. FAST. It will allow modems to operate at 28 Kb/s. Uses multidimensional trellis coding and line probing equalization, power control and framing. Adaptive Pre-Emphasis or Precoding is a new form of adaptive equalization that modifies the transmitted signal as well as the receiver. Trellis Coding in more complex forms (64 -state 4 D, 32 -state 4 D, etc. ) make more efficient use of constellation space. Non-linear encoding wraps the constellation space to bring the inner points closer and increase the distance between the outer points. Shell Mapping forms circular constellations which are optimum shape. Shaping distributes consolation points nearer the center, which is less sensitive to noise. Adaptive Power Control changes the levels to produce the best performance over impaired channels. This capability may also improve performance over analog cellular services. Scaling maintains the best transmit power levels when different modulation technologies are employed. Framing encodes bits over multiple symbols. This increases the systems ability to support different combinations of symbol and data rates and makes it possible to integrate a secondary channel. V. FC V. FAST Class developed by Rockwell International. It is based on the V. 34 proposed design, but it is an interim solution. It does not support the V. 8 handshaking mechanism for full V. 34 compatibility (it will require a software modification) V. 8 negotiation using a modulated calling tone and answer tone transfers information about two modem’s functional capabilities in 5 seconds or less.

The 56 K Modem The V. 90 modulation uses PAM. Each symbol is a

The 56 K Modem The V. 90 modulation uses PAM. Each symbol is a different voltage level. 128 symbols multiplied by 8000 symbols per second, gives a 56, 000 bits per second downstream rate. If the environment is noisy, less voltage levels are used. For example, if 64 are in use, then the speed will be 48, 000 bits per second in a 56 Kbps connection, the server is a digital modem. The PAM modulation requires at least 45 d. B SNR. The minimum RX level a receiver can pull in is 34 db below TX. For upstream transmission, the information is transmitted in the old way, analog, using QAM, A 2 D, through the PSTN, D 2 A and analog again. The upstream rate is limited to 31. 2 Kbps

END Class

END Class