EE 179, Lecture 18, Handout #31 Line Coding for Digital Communication Goal is to transmit binary data (e.g., PCM encoded voice, MPEG encoded video, financial information) Transmission distance is large enough that communication link bandwidth is comparable to signal bandwidth. Connections between nearby logic gates have bandwidth greater than switching speed, so no line coding is needed. But longer connections use pulse shaping. Multiple links may be used, with regenerative repeaters First consider baseband communication (e.g., single twisted pair) EE 179, May 12, 2014 Lecture 18, Page 1
Line Coding Requirements/Desiderata Small transmission bandwidth Power efficiency: as small as possible for required data rate and error probability Error detection/correction Suitable power spectral density, e.g., little low frequency content Timing information: clock must be extracted from data Transparency: all possible binary sequences can be transmitted EE 179, May 12, 2014 Lecture 18, Page 2
Line Code Examples on-off (RZ) polar (RZ) bipolar/ami (RZ) on-off (NRZ) polar (NRZ) RZ = return to zero, NRZ = non return to zero EE 179, May 12, 2014 Lecture 18, Page 3
Power Spectral Density (PSD) of Line Codes The output distortion of a communication channel depends on the power spectral density of the input signal Input PSD depends on pulse rate (spectrum widens with pulse rate) pulse shape (smoother pulses have narrower PSD) pulse distribution Distortion can result in smeared channel output; output pulses are (much) longer tthan input pulses Intersymbol interference (ISI): received pulse is affected by previous input symbols EE 179, May 12, 2014 Lecture 18, Page 4
Power Spectral Density (review) For an energy signal g(t) the energy spectral density is the Fourier transform of the autocorrelation: ψ g (t) = R g (t) = g(u)g(u +t)du G(f) 2 = F{R g (t)} The autocorrelation of a periodic signal is periodic. R g (t) = 1 T g(u)g(u+t)du = T 0 n= G n 2 e j2πnt For a power signal, autocorrelation and PSD are average over time. Define { g(t) t < T/2 g T (t) = Π(t/T)g(t) = 0 t > T/2 Then R gt (t) R g (t) = lim T T G T (f) 2 S g (f) = lim T T EE 179, May 12, 2014 Lecture 18, Page 5
PSD of Line Codes The PSD of a line code depends on the shapes of the pulses that correspond to digital values. Assume PAM. The transmitted signal is the sum of weighted, shifted pulses. y(t) = a k p(t k ) k= where is spacing between pulses. (Pulse may be wider than.) EE 179, May 12, 2014 Lecture 18, Page 6
PSD of Line Codes (cont.) PSD depends on pulse shape, rate, and digital values {a k }. We can simplify analysis by representing {a k } as impulse train. PSD of y(t) is S y (f) = P(f) 2 S x (f). P(f) depends only on the pulse, independent of digital values or rate. S x (f) increases linearly with rate 1/ and depends on distribution of values of {a k }. E.g., a k = 1 for all k has narrower PSD. EE 179, May 12, 2014 Lecture 18, Page 7
PSD of Impulse Train The autocorrelation of x(t) = k= a k δ(t k ) can be found as the limit of the autocorrelation of pulse trains: ˆx(t) = k= a k Π((t k )/ǫ) ǫ The autocorrelation of this pulse train (a power signal) is Therefore R x (t) = lim ǫ 0 Rˆx (t). 1 T/2 Rˆx (t) = lim ˆx(u)ˆx(u+t)du T T T/2 EE 179, May 12, 2014 Lecture 18, Page 8
PSD of Impulse Train (cont.) and in general R 0 = lim T T R 1 = lim T T R n = lim T T k a 2 k a k a k+1 k a k a k+n The autocorrelation is discrete. Therefore PSD is periodic in frequency. The PSD of pulse signal is product S y (f) = P(f) 2 k R n e j2πnf EE 179, May 12, 2014 Lecture 18, Page 9 n
PSD of Polar Signaling Polar signal: 1 +p(t), 0 p(t) Since a k and a k+n (n 0) are independent and equally likely, R 0 = lim a 2 k T T = lim 1 = 1 N R n = lim T T k a k a k+n = 0 S y (f) = P(f) 2 R 0 = P(f) 2 Example: NRZ (100% pulse) p(t) = Π(t/ ) P(f) = sinc(π f) P(f) 2 = T 2 b sinc2 (π f) half-width: p(t) = Π(t/( /2)) k P(f) = 1 2 sinc( 1 2 πf) P(f) = 1 4 T2 b sinc2 ( 1 2 πf) EE 179, May 12, 2014 Lecture 18, Page 10 k
PSD of Polar Signaling (Half-Width Pulse) For NRZ, S y (f) = P(f) 2 = 1 4 T2 b sinc2 ( 1 2 πf) = 4 sinc2 ( ) πtb f 2 The bandwidth 2R b is 4 theoretical minimum of 2 bits/hz/sec. EE 179, May 12, 2014 Lecture 18, Page 11
PSD of On-Off Signaling On-off signaling is shifted polar signaling: y on-off (t) = 1 ( 2 1+ypolar (t) ) The DC term results in impulses in the PSD: ( S y (f) = P(f) 2 1+ ) δ(f n/ ) 4 n We can eliminate impulses by using a pulse p(t) with ( n ) P = 0, n = 0,±1,±2,... Overall, on-off is inferior to polar. For a given average power, noise immunity is less than for bipolar sigaling. EE 179, May 12, 2014 Lecture 18, Page 12
Alternate Mark Inversion (Bipolar) Signaling AMI encodes 0 as 0 V and 1 as +V or V, with alternating signs. AMI was used in early PCM systems. Eliminates DC build up on cable. Reduces bandwidth compared to polar. Provides error detecting; every bit error results in bipolar violation. Guarantees transitions for timing recovery with long runs of ones. AMI is also called bipolar and pseuodternary. EE 179, May 12, 2014 Lecture 18, Page 13
PSD of AMI Signaling If the data sequence {a k } is equally likely and independent 0s and 1s, then the autocorrelation function of the sequence is Therefore R 0 = lim T T R 1 = lim T T R n = lim T T a 2 k = 1 2 k a k a k+1 = 1 4 k a k a k+n = 0, n 2 k S y (f) P(f) 2 2 (1 cos2π f) = P(f) 2 sin 2 (π f) This PSD falls off faster than sincπ f. The PSD has a null at DC, which aids in transformer coupling. EE 179, May 12, 2014 Lecture 18, Page 14
PSD of AMI Signaling (cont.) EE 179, May 12, 2014 Lecture 18, Page 15
Data Transfer in Digital System In a synchronous digital system, a common clock signal is used by all devices. data + clock Multiple data signals can be transmitted in parallel using a single clock signal. Serial peripheral communication schemes (RS-232, USB, FireWire) use various clock extraction methods RS-232 is asynchronous with (up to) 8 data bits preceded by a start bit (0) and followed by optional parity bit and stop bit (1); clock recovery by digital phase-locked loop USB needs a real phase-locked loop and uses bit stuffing to ensure enough transitions FireWire has differential data and clock pairs; clock transitions only when data does not EE 179, May 12, 2014 Lecture 18, Page 16
Serial Communication: RS-232 Signaling RS-232 is a standard for asynchronous serial communication. Each transition resynchronizes the receiver s bit clock. EE 179, May 12, 2014 Lecture 18, Page 17
Serial Communication: USB Signaling EE 179, May 12, 2014 Lecture 18, Page 18
Serial Communication: Firewire Signaling FireWire uses Data strobe encoding (D/S encoding). The data and strobe differential pairs are time shared by all devices. EE 179, May 12, 2014 Lecture 18, Page 19
Serial Communication: VGA Signaling EE 179, May 12, 2014 Lecture 18, Page 20