SAMPLING THEOREM SAMPLING THEOREM: STATEMENT [1/3] 1. Statement of Sampling Theorem • Given: Continuous-time signal x(t). 2. Derivation of Sampling Theorem • That’s: Bandlimited to B Hertz. 3. Ideal Reconstruction from Samples • Means: Maximum frequency is B Hertz. 4. Determining Signal Bandwidths • Means: X(ω) = F{x(t)}=0 for |ω| ≥ 2πB. 5. Finite Pulse Width Sampling RADIAN • Means: Bandwidth=B Hertz=2πB SECOND . 6. Undersampling and Aliasing SAMPLING THEOREM: STATEMENT [2/3] SAMPLING THEOREM: STATEMENT [3/3] • Given: Knowledge of only the samples {x(nT )} of x(t). • Then: x(t) can be reconstructed from its samples {x(nT )} SAMPLE . • Means: x(t) sampled every T seconds, at rate S= T1 SECOND • If: Sampling rate S = Signal x(t) ✬✩ Pulse Train p(t) ✲ × t ✻✻✻✻✻✻✻✻✻ ✫✪ ✲ = t ❄ ❄ ❄ ❄ ✲ • Note: Co-discovered by Claude Shannon (UM Class of 1938) t SAMPLING THEOREM: EXAMPLE #1 SAMPLE 1 x(t)=cos(2π1000t) sampled at S=8000 SECOND . T = S1 = 8000 sec. 1000 π Set t=nT =n/8000: x(nT )=cos(2π 8000 n)=cos( 4 n). Can reconstruct x(t) from its samples {x(nT )}: (How? See below.) n ... 0 1 2 3 4 ... x(nT ) . . . 1.0 .71 0.0 –.71 –1.0 . . . • Note: Digital Signal Processing is possible because of this. SAMPLING THEOREM: EXAMPLE #2 Do we need S > 2B or only S ≥ 2B? SAMPLE 1 x(t)=sin(2π500t) sampled at S=1000 SECOND . T = S1 = 1000 sec. 500 Set t=nT =n/1000: x(nT )=sin(2π 1000 n)=sin(πn)=0! Can’t reconstruct x(t) from its samples {x(nT )}! 1 0.5 1 0 0.5 −0.5 0 −1 0 −0.5 −1 0 0.5 1 1.5 2 2.5 sec 3 3.5 4 4.5 5 −3 x 10 > 2B=2(bandwidth). • Where: S > 2B Here 2B is the Nyquist sampling rate. Sampled Signal x(t)p(t) ✻✻✻ ✻ ✻ 1 SAMPLE T SECOND 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01 SAMPLING THEOREM: PROOF [1/3] P∞ • DEF: p(t)= n=−∞ δ(t–nT )=train SAMPLING THEOREM: PROOF [2/3] • Fourier series expansion: p(t)= pk ej2πkt/T = T1 (series) of impulses. P • DEF: x(t)p(t)=sampled signal=train of impulses weighted by {x(nT )}. • Fourier coefficient formula: pk = T1 • Note: x(t)p(t)=x(t) δ(t–nT )= x(nT )δ(t–nT ). • Then: F{x(t)p(t)}= T1 • So: Only need samples {x(nT )} to create x(t)p(t). • S= T1 → F{x(t)p(t)}= T1 P Signal x(t) ✬✩ P Pulse Train p(t) × ✲ t ✻✻✻✻✻✻✻✻✻ ✫✪ Sampled Signal x(t)p(t) = ✲ t ✻ ✻ ✻ ✻ ✻ ❄ ❄❄❄ ✲ F{x(t)} ✟✟❍❍ ❍❍ ✟✟ ✲ t –B B P ej2πkt/T . R T /2 −j2πkt/T dt= T1 . −T /2 δ(t)e F{x(t)ej2πkt/T }= T1 P P X(2π(f – Tk ))= T1 P X(ω–2π Tk ). X(2π(f –kS)). P F{x(t)p(t)}=Spectrum of Sampled Signal f ✟✟❍❍ ❍❍ ✟✟ –B–S ✟✟❍❍ ❍❍ ✟✟ B–S –B ✟✟❍❍ ❍❍ ✟✟ ✲ B S–B SAMPLING THEOREM: PROOF [3/3] SAMPLING THEOREM: EXAMPLE • Can: Reconstruct x(t) from x(t)p(t) if (S–B) > B → S > 2B . • Given: Continuous-time x(t) is bandlimited to 4 kHz. • By: Low-pass filtering x(t)p(t). Cutoff frequency=B Hertz. SAMPLE • Sample: 10 “kHz”=10000 SECOND > 2(4 kHz). • Formula: x(t)= 2B 2B T X | x(nT )δ(t − nT )} ∗ {z SAMPLED SIGNAL x(t)p(t) sin(2πBt) . πt | {z } • F{x(t)p(t)}=Spectrum of sampled signal. Repeats in f ! • Reconstruct: Low-pass filter with cutoff=4 kHz. LPF h(t) F{x(t)} 2πB(t−nT ) . • Interpolation Formula: x(t)= x(nT )(2BT ) sin2πB(t−nT ) P ✟❍ ❍❍ ✟✟ ✟ ❍ ✲ –4 SAMPLING AND RECONSTRUCTION: SUMMARY p(t) p(t) ↓ ↓ O O x(t) → → x(t)p(t) → {x(nT )}} → → x(t)p(t) → LOWPASS FILTER → x(t) | {z | SAMPLING ✬✩ × ✲ t ✫✪ ✟✟❍❍ ❍❍ ✲ ✟✟ –B B f {z ✟✟❍❍ ❍❍ ✟✟ –B–S } RECONSTRUCTION ✻✻✻✻✻✻✻✻✻ = ✲ t ✻ ✻ ✻ ✻ ✻ ✟✟❍❍ ❍❍ ✟✟ B–S –B ✲ t x(t)p(t) ❄ ❄ ❄ ❄ ✟✟❍❍ ❍❍✲ ✟✟ B S–B f S+B F{x(t)p(t)} f S+B 4 F{x(t)p(t)}=Spectrum of Sampled Signal f ✟❍ ❍❍ ✟✟ ✟ ❍ –14 –6 ✟❍ ❍❍ ✟✟ ✟ ❍ –4 ✟❍ ❍❍ ✟✟ ✟ ❍✲ 4 6 14 f kHz DETERMINING SIGNAL BANDWIDTH: EXAMPLES 1. x(t)= 3t+7 sin(2π5t): Rewrite: x(t)=3 sin(2π5t)+7π sin(2π5t) . t πt 2. x(t)=sin(2π3t) sin(2π2t): Rewrite: x(t)= 12 [cos(2π1t)–cos(2π5t)]. 1 [rect( ω6 ) ∗ rect( ω4 )]. 3. x(t)= sin(2π3t)t2sin(2π2t) : Then X(ω)= 2π Convolve length=6 with length=4→length=10. SAMPLE For all 3: Bandlimited to ω = 10π or f =5 Hertz. Need 10 SECOND . SAMPLING WITH FINITE-WIDTH PULSES [1/2] SAMPLING WITH FINITE-WIDTH PULSES [2/2] • Problem: The ideal impulse train p(t)= δ(t–nT ) doesn’t exist! • Fourier series expansion: pq (t)= pq,k ej2πkt/T . Pulse width: ∆. • Sol’n: Use pq (t)= q(t–nT ) where q(t)=short pulse (does exist). • Fourier coefficient formula: pq,k = T1 • Then: pq (t)= q(t–nT )= δ(t–nT ) ∗ q(t)=p(t) ∗ q(t): p(t) pq (t) q(t) * = ✻ ✻ ✻ ✻ ✻ • Then: F{x(t)pq (t)}= pq,k F{x(t)ej2πkt/T }= pq,k X(ω–2π Tk ). P P P P –2T 0 ✲ 2T t P –2T 0 ✲ 2T t –2T 0 • Sample: x(t)=cos(2π600t) with • Get: Samples Set x(nT )=cos(2π 600n 1000 )=cos(1.2πn)=cos(0.8πn). • Since: cos(1.2πn)=cos(1.2πn–2πn)=cos(−0.8πn)=cos(0.8πn). F{x(t)p(t)} ✟❍ ❍❍ ✟✟ ✟ ❍ ✲ B f ✏✏PPP P ✏✏ –B–S ✟❍ ❍❍ ✟✟ ✟ ❍ B–S –B ✏✏PPP P✲ ✏✏ B S–B f S+B UNDERSAMPLING AND ALIASING [2/4] • Image spectrum impersonates actual spectrum! Overlap! • Low-pass filtering this→400 Hz, not 600 Hz, sinusoid! • Aliasing: image spectrum masquerades as actual spectrum! n t=nT = 1000 : P F{x(t)} ✲ MAX. = S < 2B = 2 FREQ =Nyquist frequency? 1 T = 1000 . P P 2T t SAMPLE • EX: 600 Hz sinusoid sampled at 1000 SECOND . 1000<2(600). sin( kπ∆ T ). • S= T1 → F{x(t)p(t)}= pq,k X(2π(f – Tk ))= pq,k X(2π(f –kS)). UNDERSAMPLING AND ALIASING [1/4] SAMPLE RATE 1 −j2πkt/T dt= kπ −∆/2 e P –B • What if R ∆/2 0.5 0.4 0.3 0.2 0.1 0 −1500 −1000 −500 0 500 1000 1500 UNDERSAMPLING AND ALIASING [3/4] UNDERSAMPLING AND ALIASING [4/4] SAMPLE • 500-Hertz sinusoid sampled at 450 SECOND . Samples: circles. SAMPLE • x(t)=cos(2π300t+1) sampled at 500 SECOND . Reconstructed=? • Did samples come from 450 Hertz or 50 Hertz sinusoid? n → x(nT )=cos(2π 300 • Sample: t= 500 500 n+1)=cos(1.2πn+1). • But: cos(1.2πn+1)=cos(1.2πn–2πn+1)=cos(−0.8πn+1)=cos(0.8πn–1). 1 • Reconstruct: n=500t → cos(0.8π(500t)–1)= cos(2π200t–1) 0.5 0 • 300 Hertz aliased down to 200 Hertz. Phase also changed. −0.5 −1 0 0.005 0.01 0.015 0.02