sampling - ECE-600 Phil Schniter September 19, 2011...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE-600 Phil Schniter September 19, 2011 Sampling and Reconstruction: • Until now, we have considered continuous-time signals & systems in parallel with discrete-time signals & systems. • We will now connect them through uniform sampling : x[n] = x(nT ) for n ∈ Z, where T (in seconds/sample) is the sampling interval and so 1/T is the sampling rate. x( t ) t = nT x[ n ] • Key question: – Do we lose information in going from {x(t)}∀t to {x[n]}∞ −∞ ? n= – Under what conditions can we reconstruct {x(t)}∀t from {x[n]}∀n ? 1 ECE-600 Phil Schniter September 19, 2011 Aliasing — intuitions: • Consider sampling the 3 sinusoids x1 (t) = sin(2π 20t) x2 (t) = sin(2π 120t) x3 (t) = sin(2π (−80)t) at a rate of 1/T = 100 samples/sec to give x[n]: amplitude 1 x1 ( t ) x2 ( t ) x3 ( t ) x[ n ] 0 −1 0 0.01 0.02 0.03 0.04 0.05 time [sec] 0.06 0.07 0.08 0.09 0.1 They all yield the same x[n]! • More generally, consider sampling a complex sinusoid: x ( t ) = e j Ωk t t=nT x [ n ] = e j Ωk T n . −→ Which different Ωk yield the same sequence x[n]? Consider Ωk Ω0 + 2πk T for any integer k. Then x[n] = ej (Ω0 T n+2πkn) = ej Ω0 T n = ejω0 n , which is the same for any k ! 2 ECE-600 Phil Schniter September 19, 2011 Aliasing — Nyquist zones: • So far, we have seen that a sampled sinusoid x[n] is not associated with a unique continuous-time sinusoid x(t). • Can visualize this for x(t) = ej Ωk t via “Nyquist zones”: Defn: The k th Nyquist zone is Ω ∈ ( 2πk−π , 2πk+π ] T T |Xc (j Ω)| 111 000 11111111111 00000000000 11111111111 00000000000 111111111111 000000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000zone 1 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 − 2 π Ω− 1 T . 0 2π T |Xc (j Ω)| 111 000 11111111111 00000000000 11111111111 00000000000 111111111111 000000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000zone 1 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 − 2π T 0 Ω0 2π T 1/T -rate sampling ωk = Ωk T Ω |X (ejω )| ··· Ω ··· −2π ω−1 0 ω0 ω 2π ω1 |Xc (j Ω)| 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000zone 1 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 − 2π T 0 2π T Ω1 Recall that DTFT is 2π -periodic! Ω • The same phenomenon applies to generic signals: |Xc (j Ω)| 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000zone 1 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 − 2π T 0 2π T 1/T -rate sampling Ω |X (ejω )| |Xc (j Ω)| . 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000zone 1 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 − 2π T 0 2π T |Xc (j Ω)| 111 000 11111111111 00000000000 11111111111 00000000000 111111111111 000000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 zone -1 11111111111 00000000000zone 0 111111111111 000000000000 11111111111 00000000000zone 1 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 11111111111 00000000000 1111 0000 11111111111 00000000000 1111 0000 111 000 11111111111 00000000000 111111111111 000000000000 − 2π T 11111111111 00000000000 0 2π T 1111 0000 ··· Ω ··· −2π 0 2π ω Spectral overlap due to “aliasing” will prevent perfect reconstruction! Ω 3 ECE-600 Phil Schniter September 19, 2011 Nyquist sampling: • As we have seen, sampling can introduce ambiguity: Can’t distinguish one Nyquist zone from another! • How can we avoid this ambiguity? Sample in such a way that the CT signal is contained within a particular Nyquist zone. There are two basic ways to do this: 1. Nyquist sampling : – Ensure that all frequency components of x(t) are in the 0th Nyquist zone. Equivalently. . . – Sample more than twice as fast as the largest 1 max absolute signal frequency: T > |Ω|π = 2|f |max |X (ejω )| |X (j Ω)| ··· 1/T -rate reconstruction ··· . −2π 0 2π ω zone -1 c 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 zone 0 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 − 2π −|Ω|max0 T zone 1 |Ω|max 2π T Ω 2. Bandpass sampling : – Ensure than all frequency components of x(t) are in some Nyquist zone k for k = 0. – Note: works only for bandpass x(t). 1 – But how does one choose T and k in this case? • Reconstruction then boils down to optimal interpolation. Stay tuned for details... 4 ECE-600 Phil Schniter September 19, 2011 Bandpass sampling – complex-valued signals: • Consider a complex-valued bandpass signal of the form |X (ejω )| |Xc (j Ω)| ··· 1/T -rate reconstruction ··· ω . −2π 0 2π zone 0 π −T 0 π T (0 < Ωmin < Ωmax ) 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 zone k 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 Ωmin 2πk T Ωmax Ω • For practical reasons, we want to find the smallest 1 possible sampling freq T . Then how do we choose k ? • First, note that fitting into the k th Nyquist zone requires 2πk−π < Ωmin T ⇔ kf−0.5 < T ≤ k+0.5 . fmax min Ωmax ≤ 2πk+π T 1 • Also, note that T increases ( T decreases) as k increases. Thus, we would like to find the largest k that satisfies k − 0.5 fmin < k+0.5 , fmax and then use this “kmax ” to set the sampling time as T= kmax +0.5 . fmax • After a bit of algebra, one can find 1 T min fmax fmax +fmin 1 2 fmax −fmin = 1 −2 where ⌈·⌉ denotes the “ceiling” operation, i.e., rounding up to the nearest integer. 5 ECE-600 Phil Schniter September 19, 2011 Bandpass sampling – real-valued signals: • Consider a real-valued bandpass signal of the form |X (ejω )| ··· 1/T -rate reconstruction ··· . −3π −2π −π 0 π |Xc (j Ω)| (0 < Ωmin < Ωmax ) 2π ω 3π 111111 000000 111111 000000 zone ℓ 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 − −Ωmax Ωmin zone 0 π −T zone 0 0 π T ℓπ T (ℓ+1)π T 111111 000000 111111 000000 zone ℓ 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 Ωmin Ωmax Ω Want “half-spectrum” to fit into a “half-Nyquist” zone. π These zones are width- T and mirrored across Ω = 0. • Again, want to find smallest possible sampling freq 1 . T • Fitting into the ℓth half-Nyquist zone implies ℓπ T < Ωmin Ωmax ≤ ⇔ (ℓ+1)π T ℓ <T ≤ 2fmin ℓ+1 2fmax 1 • Note that T increases ( T decreases) as ℓ increases. Thus, we would like to find the largest ℓ that satisfies ℓ 2fmin < ℓ+1 , 2fmax and then use this “ℓmax ” to set the sampling time as T= ℓmax +1 . 2fmax • After a bit of algebra, one can find 1 T min = 6 2fmax fmin fmax −fmin . ECE-600 Phil Schniter September 19, 2011 Sampling — DTFT/CTFT relationship: To fully understand aliasing, we need to derive the relationship between the CTFT Xc (j Ω) and the DTFT X (ejω ). ∞ X (ejω ) = x[n]e−jωn n=−∞ ∞ x(nT )ejωn = n=−∞ ∞ ∞ x(t)δ (t − nT )dt e−jωn = n=−∞ ∞ −∞ ∞ x(t)δ (t − nT )e−jωn dt = n=−∞ −∞ ∞ ∞ nonzero iff n = t/T . t x(t)δ (t − nT )e−jω T dt = n=−∞ −∞ ∞ ∞ = δ (t − nT ) e x( t ) −∞ = Sc j ω −j T t dt n=−∞ ω T s( t ) where we call s(t) the “continuous-time sampled signal.” 7 ECE-600 Phil Schniter September 19, 2011 Sampling — DTFT/CTFT relationship (cont): x( t ) s( t ) t 0 x[ n ] t 0T 01 n Notice that s(t) = x(t)p(t) for the T -periodic “pulse train” ∞ p( t ) = δ (t − nT ), n=−∞ which has the Fourier series representation 1 p( t ) = T and thus ∞ 2π ej T kt, k=−∞ Sc (j Ω) = FCTFT {s(t)} = FCTFT {x(t)p(t)} ∞ ∞ 1 j 2π kt eT e−j Ωt dt x( t ) T k=−∞ = −∞ 1 = T = 1 T ∞ ∞ x( t ) e k=−∞ ∞ −j (Ω− 2π k)t T −∞ Xc j (Ω − k=−∞ 8 2π k) T . dt ECE-600 Phil Schniter September 19, 2011 Sampling — DTFT/CTFT relationship (cont): Finally, we can combine these two results into 1 = T ω X (ejω ) = Sc j T ∞ k=−∞ ω T or, equivalently, we could substitute Ω X ( e j Ω T ) = Sc j Ω 2π k) T ω Xc j ( T − to write: ∞ 1 = T Xc j (Ω − 2π k) T . k=−∞ Both can be visualized as follows: |Xc (j Ω)| |Xc (j Ω)| 1 π − 2π − T T 1 0 π T Ω 2π T |Sc (j Ω)| π − 2π − T T ··· 0 π T |X (ejω )| ··· 0 π 2π 0 π T “copies” 1 T ··· ω ··· −2π −π 9 Ω 2π T |X (ejω )| ··· −2π −π ··· π − 2π − T T “copies” 1 T “copies” ··· Ω 2π T Ω 2π T 1 T ··· π − 2π − T T π T |Sc (j Ω)| “copies” 1 T 0 0 π 2π ω ECE-600 Phil Schniter September 19, 2011 Sampling — DTFT/CTFT relationship (cont): In words, the equation 1 jω X (e ) = T ∞ ω Xc j ( T − 2π k) T k=−∞ says that the DTFT spectrum X (ejω ) is composed of • amplitude-scaled (by factor 1 ), T • frequency-stretched (by factor T ), and • 2π -periodic copies of Xc (j Ω). These copies ensure 2π -periodicity. Note: The equation above gives a complete characterization 1 of T -rate sampling, including the “aliasing” phenomenon seen earlier using sinusoidal examples. 10 ECE-600 Phil Schniter September 19, 2011 Sampling — Examples: |Xc (j Ω)| 1 π − 2π − T T 0 |Xc (j 2πf )| 1 π T Ω 2π T 1 T = 1000 f 0 250 500 |X (ejω )| |X (ejω )| 1 T 1000 ··· ··· −2π −π 0 π T 2 0 −75 ω 2π |Xc (j 2πf )|1 ··· 1 T −2π −π = 100 0 π |Xc (j 2πf )| = 100 ↔ ω = 2π 5 f 75 0 −2 −1 |X (ejω )| 1 ω 2π T = 0.5 1 T = 2 ↔ ω = 2π f 2 |X (ejω )| 200 10 ··· ··· −2π −π ··· 0 π 2π ··· ω ··· −2π −π 0 π 2π ω Remember: The sampling freq 1 f = T Hz rad maps to ω = 2π samp . Ω = 2π rad T sec 11 ECE-600 Phil Schniter September 19, 2011 Sinc Reconstruction: • We will now detail the reconstruction of waveform {x(t)}∀t from its samples {x[n]}∀n . • Throughout, we’ll assume that x(t) is a lowpass signal (i.e., it lives in the 0th Nyquist zone). • For our CTFT/DTFT derivation, we viewed sampling as: x( t ) → s( t ) → x[ n ] . Why not reverse this procedure for reconstruction? s( t ) generate pulse train x[ n ] x[ n ] filter to remove spectral copies s( t ) x( t ) n 01 t 0T |X (ejω )| −π t |Sc (j Ω)| 1/T x( t ) |Xc (j Ω)| 1/T 0 π ω π −T 1 π T 0 Ω π −T 0 π T Ω Note: the frequency-domain plots suggest exactly the form of filtering that we need! 12 ECE-600 Phil Schniter September 19, 2011 Sinc Reconstruction (cont.): • To generate the pulse train s(t), we can (in theory) do ∞ s( t ) = x[n]δ (t − nT ), n=−∞ which places a x[n]-scaled Dirac delta at all times t = nT . • To obtain x(t) from s(t), the CTFT plots show that we π need a “brickwall” lowpass filter with cutoff freq Ω0 = T and gain T : T Hc (j Ω) 1 π sin( T t) h(t) = π t T CTFT ←→ π −T 0 π T Ω −2T −T 0 T 2T t • Actually, we can combine these two operations into one: ∞ s(τ )h(t − τ )dτ x( t ) = ∞ ∞ = ∞ = n n π sin( T (t − τ )) dτ x[n]δ (τ − nT ) π (t − τ ) T π sin( T (t − nT )) x[ n ] π (t − nT ) T known as “sinc reconstruction.” 13 ECE-600 Phil Schniter September 19, 2011 Sinc Reconstruction (cont.): Sinc reconstruction: ∞ π sin( T (t − nT )) x( t ) = x[ n ] π (t − nT ) T n=−∞ interpolates the samples {x[n]} using a sinc pulse “p(t)” with T -spaced zero-crossings: p( t ) : T 2T 3T 4T 5T x[n]p(t − nT ) for n = 0, ..., 4 6T 3 t p( t − T ) : 1 t t p( t − 2 T ) : t x( t ) = p( t − 3 T ) : n x[n]p(t − nT ) 3 t 1 p( t − 4 T ) : t t −1 T 2T 3T 4T 5T 6T Note: the same procedure is called “Nyquist pulse shaping” in the context of digital communications. 14 ECE-600 Phil Schniter September 19, 2011 Sampling and Reconstruction — Summary: In the frequency domain, we saw that sinc reconstruction π applies a LPF, with gain-T and cutoff T rad/sec, to Sc (j Ω). When x(t) is itself bandlimited to 21 Hz, so that no aliasing T occurs, we know Sc (j Ω) = X (ej ΩT ), and thus Xc (j Ω) = T X (ej ΩT ) if |Ω| < 0 else. π T In summary, we have sampling: x[n] = x(nT ) x( t ) x[ n ] n π sin( T (t − nT )) reconst: x(t) = x[ n ] π (t − nT ) T n=−∞ CTFT DTFT 1 sampling: X (e ) = T ∞ jω Xc j k=−∞ ω 2πk − T T X (ejω ) Xc (j Ω) reconst: Xc (j Ω) = T X (ej ΩT ) if |Ω| < 0 else π T where the reconstruction equations hold only when x(t) is bandlimited to 21 Hz. T 15 ECE-600 Phil Schniter September 19, 2011 ZOH Reconstruction: • The “CT sampled signal” s(t), a Dirac-delta pulse train, is impractical to generate. (It has infinite bandwidth!) x[ n ] s( t ) generate pulse train x[ n ] filter to remove spectral copies s( t ) n 01 x( t ) x( t ) t 0T t • Practical Idea: Use a rectangular pulse to generate a “zero order hold” signal z (t) instead of a pulse train s(t). x[ n ] ? z (t) x[ n ] 01 z (t) zero order hold n x( t ) x( t ) t 0T 0T t Is perfect reconstruction still possible? If so, how? 16 ECE-600 Phil Schniter September 19, 2011 ZOH Reconstruction (cont.): The ZOH signal z (t) is related to the samples x[n] via ∞ x[n]p(t − nT ) z (t) = n=−∞ where p(t) is a T -wide rectangular pulse: 1 p( t ) T Pc (j Ω) = T sin(ΩT /2) −j ΩT /2 e ΩT / 2 CTFT ←→ 0 T t − 4π T − 2π T 0 2π T 4π T Ω In the frequency domain, we find ∞ x[n]p(t − nT ) e−j Ωt Zc (j Ω) = −∞ n ∞ p(t − nT )e−j Ωt x[ n ] = −∞ n x[n]e−j ΩT n Pc (j Ω) = n = X (e j ΩT sin(ΩT /2) −j ΩT /2 )·T e ΩT / 2 ∞ sin(ΩT /2) −j ΩT /2 Xc (j (Ω − = e ΩT / 2 k=−∞ The effect of ZOH is now clear! 17 2π k )). T ECE-600 Phil Schniter September 19, 2011 ZOH Reconstruction (cont.): Summary of ZOH reconstruction: z (t) zero order hold x[ n ] x[ n ] lowpass and anti-droop filter z (t) n 01 x( t ) t 0T |X (ejω )| |Zc (j Ω)| 1/T −4π −2π x( t ) t 0T “droop” |Xc (j Ω)| 1 0 2π 4 π − 4π − 2π T T 1 0 2π T 4π T 0 − 4π − 2π T T 2π T 4π T Ω The 2nd stage of ZOH reconstruction is filtering that suppresses spectral copies and corrects for passband “droop”. Impractical (left) and practical (right) versions of this LPF look like: |Hc (j Ω)| |Hc (j Ω)| 1 π −T 0 1 π T Ω π −T 0 π T Ω Both are “ideal” since they lead to perfect reconstruction. 18 ECE-600 Phil Schniter September 19, 2011 Rate Conversion: • Sometimes we would like to change the effective sampling rate of a signal after it has been sampled. • To do this, we combine one of the elementary operations – downsampling (throwing away samples) – upsampling (inserting zero-valued samples) with lowpass ltering in order to perform – decimation (decreasing effective sampling rate) and – interpolation (increasing effective sampling rate), respectively. These last two procedures change the effective sampling rate by an integer factor. • When we want to change the effective sampling rate by a rational factor, we combine interpolation and decimation into what is known as resampling. 19 ECE-600 Phil Schniter September 19, 2011 Upsampling: • We represent upsampling by the block diagram x[ n ] ↑U y [ m] • To upsample x[n] by U , we simply insert U − 1 zeros between each sample in x[n]. x[n] x[n] upsampled by 2 2 2 0 0 −2 0 5 10 15 −2 20 0 10 20 30 • In the time domain, upsampling can be written as x[ m ] if m ∈ Z U U y [ m] = 0 else • Is upsampling – linear? – time-invariant? – causal? – stable? 20 40 ECE-600 Phil Schniter September 19, 2011 Upsampling (cont.): In the frequency domain, upsampling can be written as ∞ y [m]e−jωm Y (ejω ) = m=−∞ x[ m ]e−jωm U = (e.g., m = . . . , 0, U, 2U, . . . ) m : m ∈Z U ∞ x[n]e−jωU n = n=−∞ = X (ejωU ) For example, when U = 2, |X (ejω )| x[ n ] 1 ··· ··· n ω −2π y [ m] 2π |Y (ejω )| 1 ··· m ··· −2π −π π ω 2π The spectrum is simply compressed by the factor U . 21 ECE-600 Phil Schniter September 19, 2011 Downsampling: • We represent downsampling by the block diagram x[ n ] ↓D y [ m] • To downsample x[n] by D, we keep every Dth sample of x[n] and discard the others. x[n] x[n] downsampled by 2 2 2 0 0 −2 0 5 10 15 −2 20 0 2 4 6 8 10 • In the time domain, downsampling can be written as y [m] = x[Dm] • Is downsampling – linear? – time-invariant? – causal? – stable? 22 ECE-600 Phil Schniter September 19, 2011 Downsampling (cont.): In the frequency domain, downsampling can be written as ∞ ∞ jω Y (e ) = x[mD]e −jωm n=−∞ m=−∞ ∞ 1 = x[ n ] D n=−∞ 1 = D D −1 1 = D x[ n ] δ [ n = D] e n −jω D = 1 iff n is a mult of D D −1 2π ω ej D kn e−j D n (explain!) k=0 ∞ D −1 x[ n ] e −j ( ω−2πk )n D k=0 n=−∞ Xe j ω−2πk D k=0 |X (ejω )| 1 x[ n ] n ··· ··· −4π −2π |X (e ω jD )| 2π 4π ω 1 (D = 2) ··· ··· −4π y [ m] m −2π jω |Y (e )| 2π 4π 1 D ··· −4π −2π Spectrum is expanded by D, scaled by 23 ··· 2π 1 , D 4π ω ω and made periodic. ECE-600 Phil Schniter September 19, 2011 Interpolation: • Interpolation goal: increase effective sampling rate from 1 Hz to U Hz. We can accomplish this in two steps: T T DC gain U x[ n ] ↑U v [ m] π LPF U y [ m] • To understand the choice of LPF, recall that ∞ 1 ω − 2πk X (ejω ) = Xc j T k=−∞ T U jω Y (e ) = T ∞ ω − 2πk Xc j T /U k=−∞ , and notice that 1 V (ejω ) = X (ejωU ) = T 1 = T ∞ Xc j k=−∞ ω U − 2πk T ∞ ω − 2π k U Xc j T /U k=−∞ . We see that V (ejω ) has spectral copies at ω ∈ { 2π k }∀k U while Y (ejω ) has them at ω ∈ {2πk }∀k . Thus, digital LPFing is needed to suppress the unwanted spectral copies (and scale by U ). 24 ECE-600 Phil Schniter September 19, 2011 Interpolation (cont.): • Interpolation example for U = 2: DC gain 2 v [ n] ↑2 x[ m ] |X (ejω )| 1 0 π LPF π 2 y [ n] |V (ejω )| 1 0 2π π 2 π |Y (ejω )| 2 π 0 2π 2π LPFing removes the copies centered at ω ∈ {πk }∀ odd k . • Application — CD-Audio D/A convertion: – ZOH reconstruction without oversampling: |X (ejω )| |Zc (j 2πf )| |Hc (j 2πf )| 24.1k . 0 π 2π ω 0 20k 44.1k f 0 44.1k 20k f – ZOH reconstruction after 4× oversampling: |Y (ejω )| |Zc (j 2πf )| |Hc (j 2πf )| 20k 156.4k 156.4k 20k . 0 π 2π ω 0 176.4k f 0 176.4k Analog filter Hc (j Ω) becomes much cheaper! 25 f ECE-600 Phil Schniter September 19, 2011 Decimation: • Decimation goal: decrease effective sampling rate from 1 Hz to DT Hz. To prevent aliasing, we LPF first: 1 T DC gain 1 π LPF D x[ n ] v [ n] ↓D y [ m] • To understand the LPFing, say that x[n] = x(nT ) with x( t ) = v ( t ) + b ( t ) , v (t) : lowpass and bandlimited to b(t) : bandpass between 1 2DT and 1 Hz 2DT 1 Hz 2T 1 – For DT -rate sampling, v (t) satisfies Nyquist thm, but b(t) does not, so we would have suppressed b(t). – Here, x[n] = v [n] + b[n], where b[n] will alias in downsampling but v [n] will not. Thus, suppress b[n]. • Decimation example for D = 2: DC gain 1 LPF x[ n ] |X (ejω )| 1 0 π 2 π π 2 v [ n] ↓2 |Y (ejω )| 1/2 |V (ejω )| 1 2π 0 π 2 26 y [ m] 2π 0 π 2π ECE-600 Phil Schniter September 19, 2011 Resampling by a rational factor: • To resample by the rational factor by U and then decimate by D DC gain U ↑U LPF U , D we first interpolate DC gain 1 π U LPF π D ↓D which can be simplified to DC gain U ↑U ππ LPF min{ U , D } ↓D • Example — CD to DAT rate conversion: – CD sampling rate = 44.1 kHz – DAT sampling rate = 48 kHz. – Resampling ratio is U D = 480 441 = 160 . 147 • Note: – The LPF filter may operate on many zero-valued input samples, and many of its outputs may be thrown away! – Efficient “polyphase” filter structures can avoid these redundant computations. (See textbook or ECE-700.) 27 ...
View Full Document

Ask a homework question - tutors are online