새소식

반응형
CS 지식/네트워크

[데이터 통신] 4. 디지털 전송(Digital Transmission)

  • -
반응형

Q&A.주파수대역(Bandwidth)

1.대역폭은 (무선 또는 유선) 전송매체가 통과시킬 수 있는 신호의 주파수 영역을 의미 합니다.

파이프를 통해 물을 보내는 것을 상상해 보도록 하지요. 단면적이 넓은 관을 쓰면 (넓은 대역폭),

당연히 한번에 많은 물을 (높은 signal rate) 전송할 수 있는 것과 같습니다. 대역폭이 넓으면

signal rate (1초에 보낼 수 있는 signal의 갯수)가 비례적으로 증가하고, 그러면 당연히 그런

signal이 나르게 될 data의 양 (date rate)도 증가하게 됩니다. 유선 전송 매체를 생각해 보면

twist pair 보다는 coaxial cable이, coaxial cable 보다는 optical fiber가 넓은 대역폭을 갖음으로

높은 signal rate를 실현할 수 있고 그에 따라 높은 date rate를 실현할 수 있습니다.

4.1 Digital-to-Digital Conversion

  • Involves three techniques:
    • Line coding (always needed), block coding, and scrambling
  • Line coding: the process of converting digital data to digital signals

Signal Element and Data Element

  • Data elements: what we need to send
  • Signal elements: what we can send(실제로 우리가 디지털 매체를 통해 보내는 신호)
  • r is the number of data elements carried by each signal element
  • signal n개가 m비트를 나타냄 => r = m/n

Data Rate Versus Signal Rate

  • Data rate defines the number of data elements (bits) sent in 1s: bps
  • Signal rate is the number of signal elements sent in 1s: baud
  • Data rate (N) = bit rate
  • Signal rate (S) = pulse rate, modulation rate, baud rate
  • S = N /r, where r is the number of data elements carried by each signal element
  • Save = c x N x (1/r), where c is the case factor
    • 변화가 없는 경우와 변화가 계속 일어나는 경우의 평균값을 구하는 것
    • c 값은 설정될 수 있고, 일반적으로 0~1 사이의 값을 가짐
  • Although the actual bandwidth of a digital signal is infinite, the effective bandwidth is finite.
  • The bandwidth is proportional to the signal rate (baud rate)
  • The minimum bandwidth: Bmin = c x N x (1/r)
  • The maximum data rate: Nmax = (1/c) x B x r

 

Design Consideration for Line Coding Scheme

  • Baseline wandering
    • Long string of 0s and 1s can cause a drift in the baseline
    • 연속적인 값(0이 계속 이어지거나, 1이 계속 이어지는 경우)이 있으면 baseline 이 너무 아래에 있거나 너무 위에 있어 baseline wandering즉, 중심점을 잡기 힘들다. 그래서 1과 0 판정을 내리기 힘들다.
  • DC components
    • DC or low frequencies cannot pass a transformer or telephone line (below 200Hz)
    • 신호가 중간에 transformer나 telephone line을 만나면 전달이 되지 않기 때문에 DC 컴포넌트는 적어야 한다.
  • Self-synchronization
    • 신호를 전달할 때 의도한 bps로 전달 받지 못하여, 즉 동기화가 제대로 되지 않으면 엉뚱한 결과가 나올 수 있기 때문에 이를 고려하여야 한다.
  • Built-in error detection
  • Immunity(면역) to noise and interference
  • Complexity

 

Lack of Synchronization(동기화)

sender가 보낸 신호를 오해하지 않도록 잘 동기화를 맞출 수 있도록 하는 것을 encoding 방식에서 중요하게 고려해 보아야 하는 요소이다.

 

Line Coding Schemes

RZ: bit interval 중간에 signal이 0으로 떨어지는 것이고 NRZ는 그러지 않는 것이다.

Unipolar Scheme

  • One polarity: one level of signal voltage
  • Unipolar NRZ(None-Return-to-Zero) is simple, but
    • 신호 중간에 0으로 내려가는 것 없이 그 값을 유지하고 있는 것
    • DC component: Cannot travel through microwave or transformer
    • Synchronization: Consecutive 0's and 1's are hard to be synchronized -> Separate line for a clock pulse
      • 신호의 변화가 없으면 수신측에서 동기화를 시키지 못함
      • 그래서 동기화를 위해서 cost를 소모하여 clock pulse를 인가해야만 한다.
    • Normalized power is double that for polar NRZ
      • normalized 파워가 polar NRZ에 비해 두 배이므로 좋지 않다.

Polar Scheme

  • Two polarity: two levels of voltage
  • Problem of DC component is alleviated(경감) (NRZ, RZ) or eliminated (Biphaze)
    • DC component는 조금 줄어든다.
  • Biphase 방식의 Manchester와 Differential Manchester는 DC component를 거의 완전히 줄일 수 있다.

Polar NRZ

  • NRZ-L (Non Return to Zero-Level)
    • Level of the voltage determines the value of the bit
  • NRZ-I (Non Return to Zero-Invert)
    • Inversion or the lack of inversion determines the value of the bit
    • 신호를 바꿀지 말지를 다음 bit에 따라서 결정
    • 1이면 inversion, 0이면 유지

  • DC 성분이 많음, baseline wandering 발생
  • x축의 f/N은 주파수를 나타내는 것인데, 그냥 주파수 f가 아니라 data rate N으로 normalizeddistribution을 그래프로 표시한 것인데, bit rate와의 연관시켜 보여주기 위해 normalize
    한 것입니다.
  • 한 주파수를 나타낸 것 입니다. 여러 코딩 방식에 따른 신호들의 (주파수에 대한) 신호의 파워

 

Polar NRZ: NRZ-L and NRZ-I

  • Baseline wandering problem
    • Both, but NRZ-L is twice severe
      • NRZ-I의 경우 연속적인 1이면 inversion이 계속해서 일어나지만 NRZ-L의 경우 연속적인 1이든 0이든 같은 값을 유지하기 때문에 baseline wandering 문제가 더 심각한 것이다.
  • Synchronization Problem
    • Both, but NRZ-L is more serious
      • 신호의 변화가 없으면 수신측에서 동기를 못 시키기 때문에 동기화 문제가 생기는 것인데
      • 위와 마찬가지 이유로 NRZ-I는 연속적인 1에 대해서 신호의 변화가 계속있기 때문에 NRZ-I는 NRZ-L보다는 덜 심각한 것임,
  • NRZ-L and NRZ-I both have and average signal rate of N/2 Baud
    • c 값이 0.5를 가짐을 알 수 있다.(r=1이니까)
  • Both have a DC component problem

 

RZ

  • 한 비트 안에서 신호가 0으로 돌아가는 과정이 반드시 포함된다.
  • Provides synchronization for consecutive 0s/1s
  • Signal changes during each bit
  • Three values (+, -, 0) are used (비효율적임; r=1/2)
    • Bit 1: positive-to-zero transition, bit 0: negative-to-zero transition
  • 동기화 문제와 DC component problem은 어느정도 해결 했지만 복잡성과 bandwidth 요구사항 때문에 실용적으로 잘 사용되고 있지 않음(이것보다 biphase를 더 실용적으로 많이 쓴다.)

Biphase

  • Combination of RZ and NRZ-L ideas
  • Signal transition(+ or -) at the middle of the bit is used for synchronization
    • RZ는 0으로 돌아가는 것이지만 biphase는 + or -를 왔다 갔다 하는 것이다.
  • Manchester
    • Used for Ethernet LAN
    • Bit 1: negative-to-positive transition
    • Bit 0: positive-to-negative transition
  • Differential Manchester
  • Used for Token-ring LAN
  • Bit 1: no transition at the beginning of a bit
  • Bit 0: transition at the beginning of a bit

 

Polar Biphase

  • The minimum bandwidth is 2 times that of NRZ

transition을 많이 함으로써(r=1/2) bandwidth의 낭비는 크지만 synchronized 문제를 해결.

DC component problem과 baseline wandering 문제가 없음(신호 내에서 반드시 한 번 transition이 이루어 져야 하기 때문)

많이 변화하기 때문에 self-synchronous 문제도 없다.

그런데 그 만큼 많은 변화를 요구할 수록 넓은 bandwidth를 요구하기 때문에 tradeoff 관계에 있는 것이다.

 

Bipolar Scheme

  • Three levels of voltage, called "multilevel binary"
  • Bit 0: zero voltage, bit 1: alternating +1/-1
    • (Note) In RZ, zero voltage has no meaning
    • 즉, RZ에서 0 voltage는 아무의미가 없던 level이었다.
  • AMI (Alternate Mark Inversion) and pseudoternary
    • Alternative to NRZ with the same signal rate and no DC component problem

NRZ와 거의 유사하지만 +와 -를 번갈아 작동하는 것이기 때문에 DC component problem을 많이 줄였다.

 

Multilevel Scheme

  • To increase the number of bits per baud by encoding a pattern of m data elements into a pattern of n signal elements
    • m개의 data elements 패턴을 n개의 signal elements 패턴으로 바꾸는 것
  • In mBnL schemes, a pattern of m data elements is encoded as a pattern of n signal elements in which 2m <= Ln (크거나 같다)
    • m개의 binary n개의 L
  • 2B1Q (two binary, one quaternary)
  • 8B6T (eight binary, six ternary)
  • 4D-PAM5 (four-dimensional five-level pulse amplitude modulation)

 

Multilevel: 2B1Q Scheme for DSL(digital subscriber line)

  • 2개의 binary가 Quaternary level로 바뀌었다.
  • 그래서 signal 숫자가 줄어들었지만 그 만큼 bandwidth를 적게 차지한 것을 볼 수 있다.

 

8B6T

  • Used with 100Base-4T cable
  • Encode a pattern of 8 bits as a pattern of 6 (three-levels) signal elements
  • 222 redundant signal element = 36(478 among 729) - 28(256)
  • The average signal rate is theoretically, Save = 1/2 x N x 6/8 (1/r = 6/8)
    • 많이 변화할 때도 있고 그렇지 않을 때가 모두 공존하기 때문에 c값은 0.5
    • in practice the minimum bandwidth is very close to 6N/8 (안 좋은 신호는 잘 사용하지 않을 것이기 때문에)

4D-PAM5: for Gigabit LAN

  • 4- Dimensional Five-level Pulse Amplitude Modulation

8bit(256)의 symbol을 5-level의 4개의 신호로

 

Multitransition: MLT-3

  • Multiline Transmission, Three-level (MLT-3)
  • The signal rate for MLT-3 is one-fourth the bit rate
  • MLT-3 when we need to send 100Mbps on a copper wire that cannot support more than 32MHz
    • bandwidth가 좁은 copper wire에 고속의 데이터를 써주고 싶을 때 signal rate가 bit rate의 1/4정도에 차지하지 않는 MLT-3를 쓰게 되면 패턴에 의해서 bandwidth가 작아도 높은 data rate을 보낼 수 있다.
  • Last non-zero의 반대 극 성분으로 transition을 한다.

  • worst case의 경우 변화가 계속해서 일어나지만 주파수가 1/4배인 periodic signal이 된다.
  • The worst case situation can be simulated as an anlalog signal with a frequency one-fourth of the bit rate, In other words, the signal rate of MLT-3 is one-fourth of the bit rate
  • 그래서 c=1/4 인 거고 그래서 bandwidth가 N/4인 것이다.

 

Summary of Line Coding Schemes

Multitransition: B = N/4

 

Block Coding

  • 정보를 bit단위로 전달하는 것이 아니라 block 단위로 나누어서 blcok 단위로 encoding하는 방식
  • Block coding is normally referred to as mB/nB coding; it replaces each m-bit group with an n-bit group

4B/5B

  • To solve the synchronization problem of NRZ-I (연속적인 0에 대한 문제)
    • 그렇다고 biphase를 쓰면 bandwidth를 많이 차지하게 되는 손해가 있음
  • 20% increase the signal rate of NRZ-I (Biphase scheme has the signal rate of 2 times that of NRZ-I)
    • 4bit를 5bit로 보낸다는 것은 signal rate 이 증가할 수 밖에 없다.
    • biphase는 동기화 등의 문제는 해결하지만 signal rate이 NRZ-I의 두 배이기 때문에, 만약 signal rate을 20%정도만 늘려서 동기화 문제를 해결할 수 있다면 그 방식을 써보자 해서 나오게 된 방식
  • Still DC component problem
  • Using block coding 4B/5B with NRZ-I line coding scheme

4B/5B Mapping Codes

  • 4비트를 5비트로 굳이 대체시킨 이유

  • 우리가 보내고 싶은 데이터는 16개인데 5비트로 보내게 되면 32개의 정보를 포함할 수 있다.
  • 잘 보면 5bit 짜리를 보면 0이 2개 연속으로 시작하는 case가 없다. 또한 0이 3개 연속으로 이어진 것도 없다.
  • 연속적인 1은 문제가 없지만 연속적인 0은 문제가 되기 때문에 이를 해결한 것이다.
  • 위 24개 종류의 5bit짜리 데이터에 속하지 않는 남은 8개는 error로 판단하는 용도로 사용하여 해당 정보가 올 때 에러로 detection 할 수 있다.
  • 이를 통해 20%의 signal rate을 증가시킬 수 있음

 

Substitution in 4B/5B Block Coding

8B/10B

  • Greater error detection capability than 4B/5B
  • Combination of 5B/6B and 3B/4B encoding(for 시간 절약)
  • 210 - 28 = 768 redundant groups used for disparity checking(부정합 체크) and error detection

Scrambling

  • Biphase : not suitable for long distance communication due to its wide bandwidth requirement
    • 경제적 부담(먼 거리 통신 시 좋은 전송로 사용해야 하기 때문)
  • Combination of block coding and NRZ: not suitable for long distance encoding due to its DC component problem
  • Bipolar AMI: synchronization problem -> Scrambling
    • 연속적인 0인 경우
  • 그래서 AMI의 방식이 존재하는데 약속된 방식으로 억지로 약속된 AMI의 rule을 깨서 violated digital signal 을 만드는 것이다.(변화가 있는 signal로)
  • 깨진 규칙은 약속이 된 것이기 때문에 수신 측에서 이를 예외로 받아들여 original data로 받아낼 수 있다.

B8ZS

  • 북미에서 사용
  • 8개의 연속적인 0이 나오는 것이 확인되면 이건 위험하다고 판단하여 억지로 rule을 깨서 특정 약속된 방식으로 해당 bit를 보낸다.
  • Bipolar with 8-zero substitution
  • Commonly used i n North America
  • Updated version of AMI with synchronization
  • Substitutes eight consecutive zeros with 000VB0VB
  • V denotes “violation”, B denotes “bipolar
  • 신호의 변화 때문에 동기화는 가능하고 수신 측에서 깨져있는 규칙을 보고 8개의 연속적인 0을 안정적으로 받아낼 수 있는 것이다.

signal이 연속된 0을 보내면 수신 측에서 동기가 어렵기 때문에 위와 같이 convention을 깨서 신호를 보낸 다음 수신측에서는 이를 violation으로 판단하여 0이 8개가 연속 됨을 확인할 수 있게끔 한다.

  • 원래는 + 나온 다음에는 -가 나와야 하고 -가 나온 다음에는 +가 나와야 하는데 그것을 깬 것이다.

 

HDB3

  • 북미를 제외한 유럽, 일본 등에서 사용
  • 위 방식(B8ZS)보다 보수적인 방식(4개의 연속적인 0에 반응)
  • High-density bipolar 3-zero
  • Commonly used outside of North America
  • HDB3 substitutes four consecutive zeros with 000V or B00V depending on the number of nonzero pulses after the last substitution
  • 앞에 있던 non-zero pulse의 수가 even인지 odd인지에 따라 pattern이 정해지고 해당 패턴으로 전송한다.

bit pattern을 외울 필요는 없음!!! 그냥 연속적인 0에 대해서 violation을 진행했다는 사실을 아는 것이 중요!

 

4.2 Analog-to-Digital Conversion

  • Analog information (e.g., voice) -> digital signal (e.g., 10001011...)
  • Codec(Coder/Decoder): A/D converter
    • Sampling

PCM

  • Pulse Code Modulation
  • Three processes
    • The analog signal is sampled
    • The sampled signal is quantized(양자화)
      • 가용한 discrete한 값으로 mapping
    • The quantized values are encoded as streams of bits
  • Sampling: PAM(Pulse Amplitude Modulation)
    • According to the Nyquist theorem, the sampling rate must be at least 2 times the highest frequency contained in the signal.(적어도 2배 이상)

 

Components of PCM Encoder

Different Sampling Methods for PCM

  • ideal sampling: 구현이 매우 어려움 time-duration을 거의 0으로 해야하기 때문에
  • Natural sampling
  • Flat-top sampling: 샘플하고 그 값을 일시적으로 유지하는
    • 가장 많이 쓰임

 

Nyquist Sampling Rate

얼마나 자주 sampling 해야 하는가 -> 2fmax 이상

주파수 대역의 최대 주파수에 2배 이상으로 sampling 해야 analog to digital로 converting 가능

 

Sampling Rate

sampling rate에 따라 original data가 얼마나 달라지는 가를 보여주는 예이다.

signal의 highest frequency의 두 배이상으로 sampling을 해 주어야 우리가 원하는 신호를 복원하는 것이 가능하다.

 

Sampling of a Clock with only one Hand(시계 비유)

Quantization

  • 임의의 시간에 sample을 취하는 것이기 때문에 매우 다양한 continuous한 값들을 가짐
    • 이 값을 정해져 있는 discrete 값으로 하나하나 mapping하는 것

 

  • Quantization level (L)
    • 유한개의 discrete level ( 위에서는 8 )
  • Normalized PAM values: 6.1과 같은 실제 PAM값을 5로 나눈 값(왜 5지? -> 그냥 가정)
  • Normalized quantized valued: quantization code에 해당하는 양자값을 5로 나눈 값
  • Quantization error : depending on L (or nb, bits per sample ) ;위 예제에서 L=8
    • SNR(Signal to Noise Ratio): 노이즈 전력 대비 신호 전력의 세기
    • SNRdB = 6.02nb + 1.76 [dB] (L=8일 때, nb = 3)
      • nb를 키울수록 SNR이 개선된다.(촘촘하게 나눌 수록; 오차가 줄기 때문에)
      • 그 대신 그만큼의 bit수가 늘어나는 tradeoff가 있다.
    • infinite value를 finite value로 바꾸면서 어쩔 수 없이 생기는 오차이다.
  • Uniform vs. nonuniform quantization:
    • 신호가 몰려있는 곳을 더 촘촘하게 하여 효율적으로 사용하는 것(너비를 다르게 하는)
    • Companding and expanding
    • Effectively reduce the SNRdB

 

Original Signal Recovery: PCM Decoder

  • 전제조건: Nyquist sampling rate

discrete한 value로 온 신호들을 Low-pass filter를 통과시키면 original 신호와 유사한 신호를 복원할 수 있다.

 

PCM Bandwidth

  • The min. bandwidth of a line-encoded signal
    • Bmin = c x N x 1/r = c x nb x fs x 1/r
    • = c x nb x 2 x Banalog x 1/r
    • Bmin = nb x Banalog (where 1/r = 1, c = 1/2)
  • Max. data rate of a channel
    • Nmax = 2 x B x log2L bps
  • Min. required bandwidth
    • Bmin = N/(2 x log2L) Hz

nb 값을 크게 잡을 수록 오류를 줄일 수 있긴 하지만 이처럼 quantization error를 줄이고 싶다고 무작정 nb를 크게 잡으면 그만큼간격이 촘촘해져 정확한 값에 가까워 질 수는 있지만 위 식으로 유도되는 만큼의 최소 bandwidth를 요구하게 된다.(Bmin = nb x Banalog)

 

Delta Modulation

  • To reduce the complexity of PCM

매번 sampling 한 값을 modulation해서 보내야 하는데 어떠한 값을 잡고 그 값을 기준으로 증가 추세, 즉 difference(차)만 보냄으로써 데이터의 양을 줄일 수 있다.

  • 전신호와 후신호의 차만 encoding하여 보내는 방식.
  • 전체를 sampling 하는 것보다 앞과 뒤의 차만을 가지고 sampling을 하는 것은 data 양을 줄일 수 있는 등의 장점이 있기 하지만
  • 급격히 변하는 경우 해당 모양을 바로 쫓아가지 못한다.

 

Delta Modulation Components

증가 or 감소 추세를 판단하여 차만 가지고 digital data를 만들어 내는 방식

 

Delta Demodulation Components

PCM의 복잡성을 줄이기 위해서 통신망의 효율성을 높인다는 측면에서 신호 전체가 아닌 앞 신호와 뒷 신호의 차이만을 encoding해서 보내는 방식이 Delta Modulation이다.

 

4.3 Transmission Modes

  • 한 device에서 또 다른 device로 data를 보내는 방식에는 parallel과 serial 방식이 있다.
  • 대부분의 통신에서는 parallel하게 여러 개의 line을 먼 거리를 끌고 가는 것이 비효율적이기 때문에 serial 통신을 많이 사용 중이다.

 

Parallel Transmission

  • Use n wires to send n bits at one time synchronously
  • Advantage: 빠른 speed
  • Disadvantage: cost => Limited to short distances

그림처럼 원래는 serial로 보내면 line이 하나만 있으면 되지만 parallel로 보내기 위해서는 그 만큼의 line이 필요하고 먼거리의 경우 line의 성능이 또 좋아야 하기 때문에 cost가 매우 많이 소모 되는 것이다.

 

Serial Transmission

  • On communication channel
  • Advantage: reduced cost(parallel보다 더 적은 cost)
  • Parallel/serial converter is required
    • 우리가 사용하는 컴퓨터와 같은 것들은 paralell로 신호를 보내기 때문에 이를 serial로 변환을 해 주어야 한다.
  • Three ways: asynchronous, synchronous, or isochronous

Asynchronous Transmisison

  • 바이트 단위로 전송할 때 약속된 시간에 동기가 정확히 맞아서 오는 게 아니라 Asynchronously 오는 방식
    • like 키보드를 칠 때 바로 입력이 되는 것과 마찬가지
  • Use start bit(0) and one or more stop bits(1s)
  • A gap between two bytes: idle state of stop bits
  • It means asynchronous at byte level
  • Must still be synchronized at bit level
    • 그러나 데이터 전송이 일단 시작되면 sender와 reciever 사이에 data 전송 bit rate이 있을 텐데 bit들은 그것에 맞춰서 모두 sync가 맞아야 한다.
  • Good for low-speed communications (terminal)
  • 일반적인 transmission 방식은 아님
  • byte 사이사이에 존재하는 gap은 짧을 수도 있고 길 수도 있으며 비동기이기 때문에 다를 수밖에 없음

즉, byte레벨에서는 Async, bit 레벨에서는 synchronous하다

 

Synchronous Transmission

인터넷 통신에 사용되는 transmission

  • Bit stream is combined into longer “frames”
    • frame이라는 패키지 단위로 bit stream이 묶여서 그 단위 안에서는 gap이 없이 쭉 전송이 진행되고 한 frame이 끝나면 gap이 있다가 또 gap이 끝나면 frame을 전송하고 하는 방식
  • Special sequence of 1/0 between frames: No gap
  • Timing is important in midstream
  • Byte synchronization in the data link layer
  • Advantage: speed => high-speed transmission (like Internet)

Isochronous Transmission

  • 비디오를 serial 하게 transmission 한다고 가정
  • 30 frame의 비디오를 본다고 가정
    • 한 frame을 synchronous하게 보내고 또 한 frame을 synchronous하게 보낼 때 ideal하게는 30 frame니까 1/30초 마다 frame이 와야 ideal한 상황.
    • 이 때처럼 정보와 정보 사이의 간격이 일정하게 와야하는(fixed-rate으로) 트래픽을 말한다.
  • serial transmission
  • synchronous해서 수신측에서 동기를 잘 맞춰서 데이터를 받는 것만 가지고는 충분치 않은 트래픽
반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.