• No results found

Data Encoding

N/A
N/A
Protected

Academic year: 2021

Share "Data Encoding"

Copied!
28
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Data Encoding

Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan

Last updated: 11 July 2000

(2)

Data Encoding - 2/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Encoding scheme

voice

Telephone analog

digital

Modem analog

analog

CODEC digital

digital Digital transmitter

digital

Analog data, Analog signal

Digital data, Analog signal Digital data, Digital signal Analog data, Digital signal

Analog transmission means a transmitting analog signals without regard to their content; the signal may represent analog data (e.g. voice) or digital data (e.g. binary data). Digital transmission is concerned with a transmitting binary signal

(3)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Encoding and Modulation

Encoder

Encoder Decoder

Decoder

Modulator

Modulator DemodulatorDemodulator digital

or analog

digital or analog

digital

analog

g(t)

m(t)

fc

s(f) x(t)

t

fc f g(t)

m(t)

x(t)

s(t)

For digital signal, a data source g(t), which may be either digital or analog, is encoded into a digital signal x(t).

Analog transmission uses a continuous constant-frequency signal known as the carrier signal. The frequency of the carrier signal is chosen to be compatible with the transmission medium. Data is transmitted using a carrier signal by modulation, which is the process of encoding source data onto a carrier signal with frequency fc

(4)

Data Encoding - 4/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Why encoding?

z Three factors determine successfulness of receiving signal

z S/N

z data rate

z bandwidth

z More factor can be used to improve

z

encoding scheme

With other factors held constant, the following statements are true.

• An increase in data rate increases bit error rate.

• An increase S/N decreases bit error rate.

• An increase in bandwidth allows an increase in data rate [Stalling, p98].

(5)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Encoding evaluation factors

z Signal spectrum

z Clocking

z Error detection

z Signal interference& noise immunity

z Cost and complexity

Five factors are used to evaluate the various encoding scheme:

Signal spectrum : a lack of high-frequency components means that less bandwidth is required for transmission. No dc component is desirable.

Clocking : suitable encoding provide some synchronization mechanism to determine the beginning and end of each bit position.

Error detection : some error detection can be built into the encoding scheme.

Signal interference & noise immunity : some encoding scheme has superior performance in the presence of noise.

Cost and complexity : higher signaling rate to achieve a greater data rate results expensive devices.

(6)

Data Encoding - 6/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Digital data, Digital signal

0 1 0 0 1 1 0 0 0 1 1

NRZ NRZI Bipolar -AMI

Pseudoternary Manchester Differential Manchester

Definition of Digital Signal Encoding Formats Nonreturn-to-Zero-Level (NRZ-L)

0 = high level 1 = low level l

Nonreturn to Zero Inverted (NRZI)

0 = no transition at beginning of interval (one bit time) 1 = transition at beginning of interval

Bipolar-AMI

0 = no line signal

1 = positive or negative level, alternating for successive ones Pseudoternary

0 = positive or negative level, alternating for successive zeroes 1 = no line signal

Manchester

0 = transition from high to low in middle of interval 1 = transition from high to low in middle of interval Differential Manchester

Always a transition in middle of interval 0 = no transition at beginning of interval 1 = transition at beginning of interval

[Stallings, p99,100]

(7)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Scrambling techniques

1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0

0 0 0

0 0 0

V B 0 V B

V B 0 0 V B 0 0 V

Bit value

B8ZS Bipolar-AMI

HDB3

To maintain synchronization for the receiver’s clock using bipolar.

B8ZS

Same as bipolar AMI, except that any string of eight zeros is replaced by a string with two code violations.

• If an octet of all zeros occur and the last voltage pulse preceding this octet was positive, the eight zeros of the octet are encode as 00+-0-+

• If an octet of all zeros occur and the last voltage pulse preceding this Oct was positive, the eight zeros of the octet are encode as 00-+0+-

HD3B

Same as bipolar AMI, except that any string of four zeros is replaced by a string with one code violation. The scheme replace strings of four zeros with the sequence B00V. [Stallings, p106]

(8)

Data Encoding - 8/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Spectral density

-0.5 0 0.5

1 1.5

0 0.5 1 1.5

NRZ-L, NRZI

B8ZS,HDB3

AMI, Pseudoternary

Manchester,

Differential Manchester

Meansquarevoltageperunitbandwidth

Normalized frequency (f/r)

NRZ make efficient use of bandwidth. most of the frequency in NRZ and NRZI signals are between dc and half the bit rate.

Manchester& Different Manchester has the bulk of the energy between one-half and one times the bit rate. Thus the bandwidth is reasonably narrow and contain no dc component.

AMI make use of bandwidth less than the bandwidth of NRZ [Stallings, p102].

(9)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Digital data, Analog signal

z

Transmitting digital data through PSTN

z

Modem is used to convert digital data to analog signal and vice versa

The most familiar use is for transmitting digital data through the public telephone network. The telephone network was designed to support analog signals in the voice-frequency range 300-3400 Hz. It is not suitable for handling digital signal. Modem is used to convert digital to analog signal and vice versa.

(10)

Data Encoding - 10/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Modulation techniques

0 0 1 1 0 1 0 0 0 1 0

ASK

FSK PSK

There are three basic modulation techniques for transforming digital data into analog signals:

Amplitude-shift keying (ASK) Frequency-shift keying (FSK) Phase-shift keying (PSK)

(11)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

ASK

V

d

(t) V

c

(t) V

ASK

(t)

fc fc-f0

fc-3f0 fc+f0 fc+3f0 Signal

power

Frequency

frequency spectrum

In ASK, the amplitude of a single-frequency known as the carrier frequency is switched between two levels at a rate determined by the bit rate of the transmitted binary data signal. Bandpass filter is used to limit the band of frequencies based on Nyquist’s theorem. [Halsall, p.59]

(12)

Data Encoding - 12/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

FSK

Carrier 2 Datasignal

Carrier 1

v

d

(t) v

1

(t)

v

2

(t) v

FSK

(t)

f1 Signal

power

Frequency

frequency spectrum

f2

In FSK, two fixed amplitude carrier signals are used, one for a binary 0 and the other for a binary 1. The different between the two carriers is known as the frequency shift. The modulation operation is equivalent to summing together the outputs of two separate ASK modulators.

FSK is the modulation method that was used in all early low bit rate modems.

[Halsall p.62]

(13)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

FSK in modem

400 980 (1070)

1850 (2225) 1180

(1270) 1650 (2025)

3400 Amplitude

Frequency(Hz) PSTN bandwidth

The above figure illustrate the frequency assignments that are used for two types of FSK modem to provide a full-duplex 300 bps link between two DTEs. One set of frequency assignments is defined by EIA and the other by ITU-T (V.21)

Modulator

Space=1180 Demodulator Space=1180 D T E

D T E Modulator

Space=1070 Mark=1270 Demodulator Space=2025 Mark=2225

Demodulator Space=1070 Mark=1270

Modulator Space=2025

Mark=2225

EIA frequency assignment

(14)

Data Encoding - 14/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

PSK

DataSignal

Carrier

Phase coherent

Differential vc(t)

vc(t)

vPSK(t)

v’PSK(t)

180=0 0=1

phase diagram bit rate = signaling rate

In PSK, the phase of the carrier signal is shift to represent data. Two type of PSK are used.

Phase coherent PSK : Used two fixed carrier signals to represent a binary 0 and 1 with a 180° phase different. The disadvantage of this scheme us that a reference carrier signal is required at the receiver against with the phase of the received signal is compared, this required more complex demodulation circuit.

Differential PSK : A phase shift of 90° relative to the current signal indicates a binary 0 is the next bit while a phase shift 270° indicates a binary 1. The demodulation circuitry need determine only the magnitude of each phase shift rather than its absolute value. [Halsall, p.64]

(15)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Multilevel modulation method 0

1 0 10

0

0 ° +90 ° +180 ° +270 °

11

bit rate = n x signaling rate

More sophisticated modulation methods are used which involve either multiple signal levels or a mix of the basic scheme, particularly amplitude and phase. More bit rate can be achieved if signaling element represent more than one bit.

(16)

Data Encoding - 16/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Multilevel modulation method

+90°°°°=01

0°°°°=00 +270°°°°=11 +180°°°°=11

4-PSK phase diagram 16-QAM phase diagram

QPSK ( Quadrature PSK or 4-PSK) : Four different phase changes (0°, 90

° , 180° , 270° ) to enables each phase change to convey 2 bits (bit rate=2*signaling rate).

QAM (Quadrature Amplitude Modulation or 16-QAM) : Phase and amplitude changes, 16 levels per signal element and hence 4 bit symbols (bit rate=4*signaling rate).

(17)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Bit rate and Baud rate

z

Bit rate

:A number of bits that are transmitted in a second

z

Baud rate

:A number of line signal changed variation per second

If a modem transmits 1 bit for every signal change bit rate = baud rate

If a signal change represents 2 or more or n bits bit rate = baud rate*n

The relationship between bit transfer rate and baud rate depends on the number of bit values that are encoded in a signal. When each signal represent one bit, the bit and baud rate are the same. When a signal encodes multiple bits, the bit rate is a multiple of the baud rate.

In modem, encoding techniques are employed to make a signal change represent 2 or more bits.

The term baud comes from Baudot, who developed an encoding scheme for the French Telegraph system in 1877.

(18)

Data Encoding - 18/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Analog data, Digital signal

z

Two principle techniques used

z PCM

z DM

Analog voice signal

Sampling clock

signalPAM PCM

signal

Sampling Circuit Sampling

Circuit

Quantizer

&

compander Quantizer

&

compander

Digitized voice signal

Digitization is a process of converting analog data into digital data. The digital signal is converted back into analog signal at the receiver.

The device used for converting analog data into digital form, and recovering the original analog data is known as CODEC (Coder-Decoder).

(19)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Nyquist theorem

“ In a perfectly noiseless channel, if f is the maximum frequency the medium can transmit, the receiver can completely reconstruct a signal by sampling it2*ftimes per second”

Nyquist, 1920

In 1920, Harry Nyquist developed his classic theory. Nyquist showed that original signal must be sampled at a maximum rate of greater than twice the h i g h e s t f r e q u e n c y c o m p o n e n t t o se n d t o r e c e i ve r t o c o m p l e t e l y reconstruction. For example, to convert a voice signal which 4 kHz highest frequency into digital form, it must be sampled at a rate of 8000 times per second.

(20)

Data Encoding - 20/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

PCM

z

Sampling signal based on nyquist theorem

3.2 3.9

2.8 3.4 1.2

4.2

3 4 3 3

11

4

011 100 011 011 001 100

Original signal

PAM pulse

PCM pulse with quantized error

011100011011001100

PCM output

PCM is based on the sampling theorem. The original signal is assumed to be band limited with a bandwidth of B. Signal is sampled at a rate 2B. Samples signal are represents as narrow pulse whose amplitude is proportional to the value of the original signal and is known as PAM (Pulse Amplitude Modulation).

The amplitude of each PAM pulse is approximated by an n-bit integer,. In the sample above, n=3. Thus 8=23 levels are used for approximating the PAM pulses.

(21)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

PCM conversion process

A B C D

A B C D Analog

voice signal

Sampling

clock PAM

signal PCM

signal

Sampling Circuit Sampling

Circuit

Quantizer

&

compander Quantizer

&

compander

Digitized voice signal

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. [Halsall, p.69]

(22)

Data Encoding - 22/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Nonlinear encoding

0 1 2 3 4 5 6 7 12 13 14 15

Strong signal Weak signal

0 1 2 3 4 5678 8

9

9 10 10

11 11

12 13 14 Without nonlinear encoding With nonlinear encoding15

Quantization levels are not necessary 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.

[Stallings, p.118]

(23)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Companding process

z Implement nonlinear encoding via companding process

z Companding =

Compressing Expanding

z Implement nonlinear encoding via companding process

z Companding =

Compressing Expanding

linear quantization interval

11100100 11100100 11100100

11100100 11

10010011 10010011 10010011 100100

11 10 01 00

11 10 01 00

Network Compressor

circuit Compressor

circuit Linear

ADC Linear

ADC Linear

DAC Linear

DAC Expander

circuit Expander

circuit

vi

vi v’o

vo

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. [Halsall, p. 71]

(24)

Data Encoding - 24/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Analog Data, Analog signal

z

Use Modulation techniques

z

Need a high frequency for effective transmission

z

Modulation permits frequency division multiplex

Modulation has been defined as the process of combining an input signal and a carrier signal.

(25)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

Analog Modulation

Carrier

Modulating sine-wave signal

Amplitude-modulated wave

Frequency-modulated wave

Phase-modulated wave

Amplitude modulation is the simplest form of modulation. The modulated signal has constant frequency but its amplitude is vary with the input signal.

The envelope of the resulting signal is 1+nax(t) and as long as na<1, the envelope is an exact reproduction of the original signal. If na>1 , the envelope will cross the time axis and information is lost. [Stallings, p.123]

(26)

Data Encoding - 26/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

AM Spectrum

carrier lower sideband upper sideband

each sideband contains the complete spectrum of s(t) !

M(f)

0 f

c

- B f

Discrete carrier term Lower sideband Upper sideband

f

c

+ B f

c

2 2

[ ]

casex t f t

s t na f t f t

s t f t n

f f t n

f f t

m

m c

c a

c m

a

c m

( ) cos

( ) cos cos

( ) cos cos ( ) cos ( )

=

= +

= + − + +

2

1 2 2

2 2 2

π

π π

π π π

The resulting signal has a component at the original carrier frequency plus a pair of components each spaced fmHz from the carrier.

From the equation above, it can be seen that AM involves the multiplication of the input signal by the carrier. [Stallings, p.123]

(27)

Applied Network Research Group Department of Computer Engineering, Kasetsart University

AM power saving

z

SSB (Single sideband)

z

DSBSC (Double sideband suppresses carrier)

z

VSB (Vestigial sideband)

It should be clear that s(t) contains unnecessary components, since each of the sideband contains the complete spectrum. SSB, DSBSC and VSB are methods to save power and bandwidth.

The disadvantage of suppressing the carrier is that the carrier can be used for synchroni zat ion purposed. A const ant carrier provides a cl ocking mechanism.A compromise approach is VSB, which uses one sideband and a reduced-power carrier. [Stallings, p.124]

(28)

Data Encoding - 28/28

Applied Network Research Group Department of Computer Engineering, Kasetsart University

FM and PM

Carrier

Modulating sine-wave signal

Amplitude-modulated (DSBTC) wave

Frequency-modulated wave Phase-modulated wave

Referenties

GERELATEERDE DOCUMENTEN

Figure 4.3: 4x4 Torus Topology Throughput VS Injection rate (flits/cycle) In Figure 4.4 a comprehensive comparison of average packet latency vs injection rate has been obtained

In vitro circadian rhythms of the mammalian suprachiasmatic nuclei: comparison of multi-unit and single-unit neuronal activity recordings.. Circadian rhythms in mice can be regulated

Applied Network Research Group Department of Computer Engineering, Kasetsart University.. Digital

Applied Network Research Group Department of Computer Engineering, Kasetsart University..

Applied Network Research Group Department of Computer Engineering, Kasetsart University.. Data and

Applied Network Research Group Department of Computer Engineering, Kasetsart University Data link layer..

Note that it is not sufficient to use the LCY encoding via the fontenc package, but one also should load a file lcydefs.tex which sets lccode and other TEX registers for LCY

[r]