디지털-대-디지털 변환
- 디지털 데이터를 디지털 신호를 사용해서 변환
- 변환에는 세가지 종류가 존제 : line Coding, block Coding, Scrambling
Line coding
- 디지털 데이터를 디지털 신호로 변환하는 과정
- 송신측 (Sender) : 디지털 데이터가 디지털 신호로 부호화(encoding)된다.
- 수신측 (Receiver) : 디지털 신호를 복호화(decoding)하여 디지털 신호를 재생하게 된다.



bps : 1초동안 몇개의 bit가 전달되었는가?
baud : 1초동안 신호의 개수
Line Coding Schems

polar : 극을 말함 (+, -)
1) Unipolar Schems
- 극을 하나만 사용
- NRZ(Non-Return-to-Zero) : 비트 중간에 신호가 0으로 돌아가지 않음

예) SPI(Serial Peripheral Interface) communication
MASTER : 아두이노 - SLAVE : SENSOR, RFID, tag, LCD 간에 통신
- 신호를 측정하기 위한 clock이 필요
- clock 시간에 데이터가 얼마인지 찾아내는 것
2) Polar Schemes

(1) RZ

(2) Non-Return-to-Zero
- 비트 중간에 0으로 돌아가지 않음
- NRZ-L : 전압의 level에 따라 비트가 결정
- NRZ-I : 반전(inversion) 여부에 따라 비트가 결정
- 0 : No inversion
- 1 : Inversion

(3) Manchester

- 0 : (+) → (-)
- 1 : (-) → (+)
- 비트 중간에 transmision이 존재 → Sycronization에 효과적
- Synchronization : 송신측과 수신측의 동기
- 이더넷, Token busm, IEEE 802.3에서 사용
(4) Differential Manchester

- 비트가 시작할 때, 비트 값을 결정
- 0 : Inversion
- 1 : No inversion
- Token Ring에 사용
(3, 4) 비트 중간에는 항상 transmision이 존재
장점 : 오류가 굉장히 적음
단점 : 계속 바뀌기 때문에 효율 적음
3) Bipolar Scheme
- Tree levels : (+), 0, (-)
- RZ와 달리 0 volatage에 데이터가 배정이됨
- AMI(Alternative Mark Inversion)
- 0 : zero voltage level
- 1 : alternate voltage of plus and minus
- Pseudoternary
- 0 : alternate voltage of plus and minus
- 1 : zero voltage level

4) Multilevel Scheme - mBnL scemes
- Level이 여러개
- bit에 대해 신호를 만들어 보냄
- m개의 데이터 요소의 패턴을 n개의 신호의 패턴으로 인코딩
- 4 Level → 2bit
- 8 Level → 3bit
- 16 Level → 4bit

Block Coding
- m개의 비트를 n비트이 블록으로 바꾸는데, 이떄 n은 m보다 크다
- 한 bit를 추가 시킴
- 0이 3개 연속되지 않게 만들어 연속되는 0을 줄임

- NRZ-I는 0이 계속될때 synchronization problem 문제를 가진다.
- NRZ-I line coding을 block coding을 적용하면 0이 계속되는 문제를 해결한다.
Scrambling
-
Biphase
- mancheseter, Differential Macheseter 방식은 LAN과 같은 전용 link에 적합하다
- 먼 거리에 적합하지 않다.
-
NRZ-I with Block Coding
- 먼 거리에 적합하지 않다.
- Dicrect Current (DC) Component
- 신호가 변하지 않으면, 직류 신호는 주파수가 0이다
- 멀리 보낼때는 여러 사람이 다 같이 사용하게 되는데. 주파수가 0인 경우에는 통과시키기 어려움
-
Bipolar AMI
- 좁은 bandwidth를 가지고 DC component를 발생하지 않는다
- 그러나, 0이 계속 반복되는 경우 → synchronization
Solution : 0이 반복되는 경우 다른 level의 조합으로 대체한다. → Modified AMI (Scrambling)

Scrambling
- 장거리에서 디지털-디지털 변환을 위한 기술
- Modified AMI 방식은 사용하여 시스템 동기화를 유지하기 위해 디지털 전송에 사용
- B8ZS, HDB3
1) Bipolar with eight-zero Substituion(B8ZS)
- B8ZS는 8개의 연속되는 0을 000VB0VB로 대체한다.
- B : bipolar
- V : bipolar violation
- 앞 표식의 극성에 따라 두 가지 경우

2) High-density bipolar 3-zero(HDB3)
- HDB3은 4개의 연속되는 0을 000V 또는 B00V로 대체한다.
- 만약 0이아닌 pulse의 수가 홀수 → 000V
- 만약 0이아닌 pulse의 수가 짝수 → B00V
- HDB3는 0이 아닌 pulse의 수를 짝수로 만든다.

디지털-대-디지털 변환 전체 예시

아날로그-대-디지털 변환
- 디지털 신호는 아날로그 신호보다 우수하다
- 오늘날 아날로그 신호를 디지털 데이터로 바꾸는 경향이 있다.
Pulse Code Modulation (PCM)
- PCM은 아날로그 신호를 디지털 데이터로 바꾸는 방법이다.
- PCM은 세 과정을 거친다.

- 아날로그 신호를 샘플링된다. (Sampling)
- 샘플링된 신호를 양자화한다. (Quantizing)
- 양자화된 값을 비트의 스크림으로 인코딩한다. (Encoding)
Sampling
- 아날로그 신호를 Ts마다 샘플링한다. (Ts는 Sample period)
- 오차가 생길 수 있음
- Three different sampling

Sampling Rate

- Nyquist theorem에 따르면 샘플링 속도는 신호에 포함된 최고 주파수의 2배 이상이어야한다.
Quantization and encoding of a sampled signal

예) 인간의 음성을 디지털화하려고 한다. 표본당 8비트라고 하면, 비트율(bit rate)이 얼마인가?
- 인간의 목소리는 보통 0에서 4000Hz 사이의 주파수를 가진다.
- Sampling rate = 4000 X 2 = 8000 samples/s
- Bit rate = 8000 X 8 = 64000bps = 64kbps
PCM decorder

codec : encoder + encoder