Presentation is loading. Please wait.

Presentation is loading. Please wait.

2017-04-21 5. Data Encoding.

Similar presentations


Presentation on theme: "2017-04-21 5. Data Encoding."— Presentation transcript:

1 5. Data Encoding

2 Contents Introduction Data and Signals
Contents Introduction Data and Signals Encoding( modulation) techniques Spread Spectrum 제 5장에서는 데이터와 신호를 나타내는 방법에 대해서 간단히 배우고 어떤 임의의 형태의 데이터를 전송을 위해서 원하는 형태의 신호로 바꾸는 방법에 대해서 배운다. 이런 방법을 총괄적으로 부호화(encoding)라고 한다.

3 Introduction Data and signals Digital Data Digital Signal
Introduction Data and signals Digital Data Digital Signal Analog Signal Analog Data Less complex, less expensive than digital-analog modulation equipment Use of modern digital transmission And switching equipment Some transmission media will only propagate analog signals Efficient use of transmission channel : FDM 어떤 정보나 의미를 나타내는 추상화(abstraction)를 데이터라고 하고 그 정보를 전송을 위해 전기/자기적인 형태로 나타낸 것을 신호라고 한다. 데이터와 신호는 각각 아날로그/디지털의 형태로 나타낼 수 있다. 그리고 부호화는 위의 그림과 같이 각각의 쌍(pair)에 대해서 이루어 질 수 있다. 각각의 부호화 방식을 사용하는 이유는 그림에 간단히 나와 있으며 특히 analog data -> digital signal 방식은 부호화라기 보다는 아날로그 형태의 정보를 디지털 형태의 정보로 바꾼다는 측면이 강하다.

4 Introduction Encoding and modulation techniques
Introduction Encoding and modulation techniques Encoder Decoder g(t) digital or analog x(t) t Encoding onto a digital signal Modulator Demodulator m(t) digital or analog s(t) S(f) f Modulation onto an analog signal 임의의 데이터를 디지털 신호로 바꾸는 것을 Encoding이라고 하고 아날로그 신호로 바꾸는 것을 Modulation이라고 한다. Encoding은 전송매개체(transmission medium)에 맞도록 데이터를 만드는 것으로서 같은 데이터라 할지라도 encoding 방식에 따라서 다른 형태의 디지털 신호가 나온다. Modulation은 전송매개체를 통해 신호가 전송될 수 있도록 carrier 에 신호를 합치는 과정으로서 전송매개체에 따라서 carrier 주파수가 달라진다. m(t) = baseband signal or modulating signal fc = carrier signal s(t) = modulated signal

5 Digital Data, Digital Signals
Digital Data, Digital Signals digital data : an abstraction of information in digital form digital signal: an sequence of discrete, discontinuous voltage pulses. Each pulse is a signal element Key data transmission terms mark : binary digit 1 / space : binary digit 0 이제부터는 디지털 데이터를 디지털 신호로 바꾸는 방법에 대해서 설명한다. 디지털 데이터는 디지털의 형태로 나타내어지는 정보의 추상화를 의미하며 디지털 신호는 불연속적인 펄스의 형태로 나타내어지는 순열을 의미하며 각 펄스를 signal element라고 한다. 앞으로 많이 사용할 중요한 용어로는 data element, data rate, signal element, signaling rate가 있다. 이진수로 0/1을 나타내는 것을 data element라 하고, data element가 변하는 속도를 data rate라 하며 이것의 단위는 (bps:bits per second)이다. signal element는 신호에 있어서 의미있는 최소한의 구간을 차지하는 신호의 일부분을 의미하며 signal element의 변하는 속도를 나타내는 것을 signaling rate라 하며 이것의 단위는 baud이다. 이진수로 1을 mark, 0을 space라고 부르기도 한다.

6 Evaluation of various encoding techniques
Evaluation of various encoding techniques signal spectrum : less bandwidth, no dc component, shape of the spectrum(powers should be in the middle of transmitted bandwidth) clocking : synchronization based on transmitted signal ---> self-clocking error detection : useful to have error-detection capability in physical encoding scheme signal inference and noise immunity : low bit error rate cost and complexity 앞으로 다룰 여러 가지 방식들을 비교하는 criterion을 설명한다. 우선 좋은 부호화가 되기 위한 조건은 1. 적은 주파수 대역을 차지해야 하고, DC성분이 없어야 하며 신호의 파워가 한곳에 몰려 있으면 좋다. 2. 전송되어진 신호만을 가지고서도 clock을 쉽게 복구할 수 있어야 한다. 3. 에러를 쉽게 찾아내고 복구할 수 있어야한다. 4. 잡음에 강인해야 한다. 5. 가격이 싸고 간단해야 한다.

7 Various encoding techniques
Various encoding techniques NRZ-L NRZI Bipolar-AMI Pseudoternary Manchester Differential manchester Multilevel Binary Biphase 윗 그림은 여러 가지 encodng 방식의 예를 보여 준다. 각각에 대한 설명은 다음에 나오는 TP에 나와 있다. Digital signal encoding formats

8 Nonreturn to Zero Level(NRZ-L)
Return to Zero(RZ) 0 : no pulse 1 : positive pulse signal returns to zero after each encoded bit Nonreturn to Zero Level(NRZ-L) 0 : positive voltage during bit interval 1 : negative voltage during bit interval Nonreturn to Zero,invert on ones(NRZI) 1 : transition at the beginning of bit interval 0 : no transition differential encoding advantage more reliable to detect a transition in the presence of noise less bandwidth +V -V 50% RZ +V -V +V -V 1. RZ : 1일때는 positive pulse가 있고 0 일때는 pulse 가 없다. 각 bit를 부호화한 후에는 항상 0 의 값으로 되돌아 온다. 따라서 대역폭이 넓어진다. 이런 단점을 보완하기위해서 NRZ 코드를 쓴다. 2. NRZ : 1 일때는 negative pulse, 0일때는 positive pulse가 bit interval 동안에 유지된다. 3. NRZI는 일종의 differencial coding으로서 1일때는 transition이 일어나고 0일때는 이전의 값이 유지된다. 이것의 장점은 대역폭이 줄어든다는데 있다.

9 Limitation of NRZ Multilevel Binary presence of dc component
Limitation of NRZ presence of dc component lack of synchronization capability (long 0s or 1s and drift) Multilevel Binary bipolar-AMI(alternate mark inversion) three voltage level 0 : no line signal 1 : positive or negative voltage during bit interval binary 1 (mark) must alternate in polarity benefit : no loss of sync. capability if a long string of 1 occurs no net dc component , less bandwidth than NRZ, simple means of error detection pseudoternary same as bipolar-AMI except that the representations of 1 and 0 are interchanged NRZ 코드의 단점은 dc성분이 존재하며 sync를 제대로 맞추기가 힘이 든다는데 있다. 이런 이유들 때문에 NRZ는 데이터 전송에는 잘 사용되지 않고 주로 디지털 기록을 위해 사용된다. 이제 이런 단점을 보완하는 코드에 대해서 알아보자. 크게 Multilevel binary와 biphase가 있다. 우선 Multilevel Binary에 관해 알아보자. 3개의 voltage level이 존재하며 bipolar-AMI와 pseudoternary가 있다. 이 코드의 장점은 dc 성분이 존재하지 않으며 연속되는 1(bipolar-AMI의 경우)이나 0(pseudoternary의 경우)이 있어도 쉽게 클럭을 복원할 수 있다는데 있다. 반면에 연속되는 0(bipolar-AMI의 경우)이나 1(pseudoternary의 경우)이 나오면 쉽게 클럭을 복원할 수 없다. 이를 위해서 additional bit를 넣어서 강제로 transition이 일어나도록 만드는 기법 등이 제안되었으며 저속 ISDN등에서 사용되고 있다.하지만 고속일 때는 사용하기가 힘이 들며 이를 위해서는 scrambling기법 등이 제안되었다.

10 Biphase Modulation Rate
Biphase Always a transition in the middle of each bit interval Manchester code 0 : positive to negative transition 1 : negative to positive transition Differential Manchester code 0 : transition at the beginnig of a bit interval 1 : no transition at the beginnig of a bit interval Advantage synchronization, no dc component, error detection Modulation Rate date rate(bits per second) modulation rate( baud : signal elements per second) 여기에서는 biphase 코드에 대해서 다룬다. 각 bit 구간에서 항상 transition이 일어난다. 여기에는 Manchester code와 Differential Manchester code가 있다. 이 코드들은 클럭을 복원하기가 상대적으로 쉽고 dc 성분이 존재하지 않는다는 장점이 있다. 이 코드는 주로 데이터 전송에 사용되어지는데 이를 위한 표준안으로는 IEEE 표준안(Manchester code)과 IEEE 표준안(Differential Manchester code)이 있다. Data rate와 modulation rate에 대해서 알아보자. Modulation rate는 몇 개의 bit를 사용해서 하나의 signal element를 만드는가를 나타내는 수치로서 위의 수식과 같이 주어진다. D : modulation rate(baud) R : data rate(bps) L : number of different signal elements b : number of bits per signal elements

11 Scrambling technique biphase encoding : although used in LAN(10Mbps), but not used in long-distance application because of high signaling rate relative to the data rate. Conditions of codes for long-distance application constant voltage level on the line should be replaced by sufficient transitions for the receiver’s clock synchronization no dc component, no long sequences of zero-level line signals no reduction in data rate, error-detection capability 앞에서 다룬 biphase 코드는 sync맞추기가 쉬워서 LAN등에서는 많이 사용되지만 data rate에 비해서 signal rate가 커서 장거리 통신에서는 사용하기가 힘이 든다는 단점이 있다. 장거리 통신을 위해서 만족되어야 할 조건은 다음과 같다. 1. 연속적으로 같은 voltage레벨이 유지되어 버리면 클럭을 복원하기가 힘이 든다. 이를 위해서 강제로 transition을 넣어 주어야 한다. 이렇게 하는 기법은 scrambling이라고 하며 B8ZS와 HDB3 가 있다.

12 Scrambling technique B8ZS(bipolar with 8-zeros substitution)
Scrambling technique B8ZS(bipolar with 8-zeros substitution) Based on a bipolar-AMI Drawback of AMI: long string of zeros (loss of synchronization). 8 consecutive zeros are encoded as either or (Positive 1) + 8 zeros = (negative 1) +8 zeros = receiver recognizes the pattern HDB3(high-density bipolar-3 zeros) 4 consecutive zeros are encoded as either 000- , 000+, +00+, -00- Table 5.4 (stalling) fourth zeros are always a code violation and successive violations are of alternate polarity( no dc component) In Europe and Japan. 앞에서 다룬 biphase 코드는 sync맞추기가 쉬워서 LAN등에서는 많이 사용되지만 data rate에 비해서 signal rate가 커서 장거리 통신에서는 사용하기가 힘이 든다는 단점이 있다. 장거리 통신을 위해서 만족되어야 할 조건은 다음과 같다. 1. 연속적으로 같은 voltage레벨이 유지되어 버리면 클럭을 복원하기가 힘이 든다. 이를 위해서 강제로 transition을 넣어 주어야 한다. 이렇게 하는 기법은 scrambling이라고 하며 B8ZS와 HDB3 가 있다.

13 Encoding rules for B8ZS and HDB3
Encoding rules for B8ZS and HDB3 1 Bipolar-AMI B8ZS HDB3 V B B = Valid bipolar signal, V = Bipolar violation 여기에서는 B8ZS와 HDB3코드의 예를 다루었다.

14 Spectral density of various signal encoding schemes
Spectral density of various signal encoding schemes 여기에서는 각 코드의 대역폭을 그림으로 나타내었다. 1. dc성분을 보면 NRZ 코드가 많은 dc성분을 갖고 있음을 알 수 있다. 나머지 코드들은 dc성분이 거의 없음을 알 수 있다. 2. Biphase 코드의 대역폭이 Multilevel binary보다 더 큼을 알 수 있다.

15 Digital Data, Analog Signals
Digital Data, Analog Signals Encoding of digital data by continuous sinusoidal carrier signal ex) MODEM : transmitting digital data through PSTN Encoding techniques : ASK, FSK, PSK Digital Data A cos(2fct ) Binary 1 ASK Binary 0 여기에서는 디지털 데이터를 아날로그 신호로 바꾸는 방법에 대해서 설명한다. 전화선을 통해서 컴퓨터 통신을 하기 위해서는 컴퓨터에서 사용하는 디지털 신호를 전화선에서 사용하는 아날로그 형태로 바꾸어야 한다. 이런 역할을 해주는 기계를 MODEM이라고 한다. 바꾸는 방법에는 하나의 비트를 하나의 signal element로 바꾸는 ASK, FSK, PSK가 있고 대역폭을 좀 더 효과적으로 쓰기 위해서는 여러 개의 비트의 조합을 하나의 signal element로 바꾸는 QPSK 등이 있다. A cos(2f1t ) A cos(2f2t ) Binary 1 FSK Binary 0 A cos(2fct+  ) A cos(2fct ) Binary 1 PSK Binary 0

16 PSK using 12 phase angles and two amplitude
QPSK(Quadrature PSK) more efficient use of bandwidth PSK using 12 phase angles and two amplitude used in standard 9600 bps modem( modulation rate=2400 bauds) cos(2fct + 45) cos(2fct + 135) cos(2fct + 225) cos(2fct + 315) : Binary 11 : Binary 10 : Binary 00 : Binary 01 여기에서는 QPSK 와 12개의 각도와 2개의 amplitude를 사용하는PSK 기법에 대해서 설명하고 있다.

17 Analog Data, Digital Signals
Analog Data, Digital Signals Digitization process Digital data  NRZ-L Digital data  a code other than NRZ-L Digital data  analog signal (modulation) Digitizer Modulator Analog Data (Voice) Digital Data (NRZ-L) Analog Signal (ASK) 여기에서는 아날로그 데이터를 디지털 신호로 바꾸는 방법에 대해서 설명한다. 이는 부호화라기보다는 아날로그형태의 데이터를 디지털 형태의 데이터로 바꾸는 방법이라고 생각하면 된다.

18 Analog Data, Digital Signals
Analog Data, Digital Signals PCM(Pulse Code Modulation) based on the sampling theorem If a signal f(t) is sampled at regular intervals of time and at a rate higher than twice the highest significant signal frequency, then the samples contain all the information of the original signal. The function f(t) may be reconstructed from these samples by the use of a low-pass filter Appendix 5A 8000 samples * 8 bits per sample = 64 Kbps For 4 KHz voice channel 여기에서는 아날로그 데이터를 디지털 신호로 바꾸는 방법에 대해서 설명한다. 이는 부호화라기보다는 아날로그형태의 데이터를 디지털 형태의 데이터로 바꾸는 방법이라고 생각하면 된다. 이를 위한 방법은 크게 PCM과 DM 두 가지가 있다. PCM은 Nyquist의 샘플링 이론에 근거해서 데이터 대역폭의 2배 이상의 주파수로 샘플링을 하면 원래 신호를 완벽하게 복원할 수 있다는 이론에서 출발하였다.

19 PAM pulses(Discrete Signal) : discrete-time, continuous-amplitude
PAM pulses(Discrete Signal) : discrete-time, continuous-amplitude PCM pulses(Digital Signal) : discrete-time, discrete-amplitude PCM outputs Origianl signal PAM sampler Quantizer Encoder 위의 그림은 PCM ouput을 만드는 과정을 보여준다. sampler를 통과한 신호는 시간축에 대해서는 이산적이고, 크기는 연속이 된다. 이런 신호를 discrete signal이라고 한다. Quantizer를 통과한 신호는 시간축, 크기 모두에 대해서 이산적인 값을 가지면 이런 신호를 discrete signal이라고 한다. Discrete signal에 적당한 이진값을 부여하면 PCM output이 나온다.

20 Quantization noise : S/N=6n-1.76 dB To reduce quantization noise
Quantization noise : S/N=6n-1.76 dB To reduce quantization noise large n nonlinear encoding companding(compressing-expanding) 하지만 PCM output은 양자화 에러에 의해서 원래 신호와는 차이가 있다. 즉 사용된 비트 수가 적을 수록 원래 신호와의 차이가 크게 된다. 따라서 이런 이런 양자와 에러를 줄이기 위해서는 우선 1. 많은 비트를 사용(즉 양자화 구간을 촘촘하게 나눈다.) 2. Nonlinear encoding -크기가 큰 신호에 대해서는 양자화 구간을 크게 하고 크기가 작은 신호에 대해서는 양자화 구간을 작게 하면 에러를 줄일 수 있다. 3. Companding - linear encoding을 그대로 쓸려면 신호의 크기가 작은 부분은 키우고 큰 부분은 그냥 두는 compressing 의 과정을 거친 후 linear encoding을 하고 수신측에서는 반대의 과정을 거쳐서(expanding) decoding하는 ‘companding’기법을 사용한다. Effect of nonlinear coding

21 DM(Delta Modulation) an analog input is approximated by a staircase function that moves up or down by one quantization level( ) at each sampling interval(Ts) simpler hardware implementation than PCM 두 번째 방식으로는 Delta modulation이 있다. 아날로그 형태의 데이터는 계단 모양의 함수로 바뀐다. 임의의 시각에서의 원래 데이터의 값과 계단 모양의 함수의 값을 비교해서 원래 값이 더 크면 계단 모양의 함수의 값을 하나씩 증가시키고 더 작으면 감소시키는 과정을 반복한다. 증가되는 구간에서는 1로 encoding하고 감소되는 구간에서는 0으로 encodinig하는 것을 DM이라고 한다. DM은 step size와 sampling time에 영향을 받게 된다. 만약 원래 신호가 너무 빨리 변해버리면 DM신호가 이를 따라가지 못해서 ‘slope overload noise’가 발생하게 되고, 너무 천천히 변해버리면 DM신호가 0과 1을 반복하는 형태로 나타나는 ‘quantizing noise’가 발생한다. Step size를 크게 하면 slope overload noise는 줄일 수 있지만 quantizing noise는 증가하게 되며 , step size를 줄이면 반대의 효과가 난다. 따라서 둘 사이에는 적당한 tradeoff가 필요하게 된다.

22 Delta Modulation Transmission Reception Comparator One time unit delay
Delta Modulation Comparator One time unit delay + 1 = + 0 = -  Analog input Binary output Reconstructed waveform Transmission Reception 이 그림은 DM을 하는 방식을 보여 주고 있다.

23 Analog Data, Analog Signals
Analog Data, Analog Signals Motivation it is impossible to transmit baseband signals : higher frequency is needed (especially, for unguided transmission) modulation permits FDM(frequency-division multiplexing) DSBTC(double-sideband transmitted carrier) spectrum of an AM signal Discrete carrier term S(f) f fc fc-B Upper sideband Lower Spectrum of AM signal with carrier at fc Fc+B -fc -fc-B -fc+B Spectrum of modulating signal M(f) f B 이제 아날로그 데이터를 아날로그 신호로 바꾸는 방법에 대해서 알아보자. 음성신호와 같은 아날로그 데이터를 그냥 (baseband의 형태로) 멀리까지 보낼 수는 없기 때문에 modulation을 해서 보내어야 한다. Modulation 방법에 따라서 DSBTC, DSBSC, SSB ,angle modulation, frequency modulation 등이 있다. 우선 아날로그 정보가 modulation 된 신호의 ‘크기’에 포함되는 방식을 Amplitude modulation이라고 하며 이에는 DSBTC, DSBSC, SSB방식이 있다. DSBTC는 carrier도 함께 보내는 방식이다. 이 방식은 뒷장의 그림에도 나와 있듯이 modulation된 신호의 envelope이 원래 신호의 모양과 같게 나온다. 이를 위해서는 원래 신호에 dc성분을 더해 주어야 하며 이 때문에 많은 power가 소모된다는 단점이 있다. 이런 단점을 보완하기 위해서 carrier를 전송하지 않는 DSBSC방식이 제안되었다.

24 Power ? example of DSBTC na: modulation index
na: modulation index “1” : to prevents loss of information Power ? example of DSBTC 이 그림은 DSBTC의 예를 보여주고 있다.

25 DSBSC signal with carrier at fc
DSBSC(double-sideband supressed carrier) saves power but uses as much bandwidth as DSBTC SSB(single-sideband) send only one of the sidebands, eliminating the other sideband and carrier only half of the bandwidth is required less power is required S(f) f fc fc-B Upper sideband Lower Spectrum of DSBSC signal with carrier at fc Fc+B -fc -fc-B -fc+B DSBSC는 carrier를 함께 전송하지 않기 때문에 power는 DSBTC방식보다 더 절약될 수 있다. 하지만 bandwidth측면에서 본다면 더 좋아지는 점은 없다. 이런 점을 보완하기 위해서 SSB방식이 제안되었다. 즉 modulation된 신호는 우함수의 형태가 됨에 착안하여 한 쪽의 band (upper sideband나 lower sideband)만을 보내는 방식이다. 이렇게 함으로써 bandwidth도 절약할 수 있다.

26 Angle Modulation(FM and PM)
Angle Modulation(FM and PM) : PM(phase modulation) : FM(frequency modulation) carrier Modulating sine-wave signal DSBTC wave 여기에서는 아날로그 데이터의 정보가 modulation 된 신호의 각도에 포함되는 phase modulation과 frequency modulation 방식을 설명하고 있다. PM의 경우에는 modulation 된 신호의 주파수가 message의 slope에 비례하고 FM의 경우에는 message의 크기에 비례함을 알 수 있다. PM wave FM wave

27 Spread Spectrum Developed initially for military and intelligence requirements spread the information over a wider bandwidth in order to make jamming and interception more difficult Two types FH(frequency hopping) and DS(direct sequence) 여기에서는 대역확산 통신방식에 관해서 알아본다. Spread spectrum방식은 도청 방지 등을 위해서 주로 군용통신에서 많이 사용되었다. 크게 FH와 DS 의 두 가지 방식이 사용되며 두 방식 모두 송신측과 수신측에서 똑같은 형태의 random number를 가지고 있어야 한다. General model of spread spectrum digital communication system

28 Frequency-Hopping signal is transmitted over a seemingly random series of radio frequencies, hopping from frequency to frequency at split-second interval transmitter Frequency-hopping방식은 전송되는 신호의 carrier 주파수를 바꾸어 가면서 송신하는 방식이다. 물론 이때에도 수신측에서는 carrier주파수가 바뀌어지는 규칙을 알고 있기 때문에 신호를 복원할 수 있다. receiver

29 Direct Sequence each bit in the original signal is represented by multiple bits in the transmitted signal, known as a chipping code the chipping code spreads the signal over a wider frequency band in direct proportion to the number of bits used. Direct sequence방식은 보내고자 하는 디지털 데이터에 random하게 발생된 bit와 Ex-OR되어진 신호를 전송하는 방식이다. 수신측에서도 받은 신호를 random 하게 발생된 bit와 Ex-OR를 하면 쉽게 원래 신호를 복원할 수 있다.


Download ppt "2017-04-21 5. Data Encoding."

Similar presentations


Ads by Google