lecture 23 aliasing in frequency the sampling theorem
play

Lecture 23: Aliasing in Frequency: the Sampling Theorem Mark - PowerPoint PPT Presentation

Review Sampling Aliasing The Sampling Theorem Interpolation Summary Lecture 23: Aliasing in Frequency: the Sampling Theorem Mark Hasegawa-Johnson All content CC-SA 4.0 unless otherwise specified. ECE 401: Signal and Image Analysis, Fall


  1. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Lecture 23: Aliasing in Frequency: the Sampling Theorem Mark Hasegawa-Johnson All content CC-SA 4.0 unless otherwise specified. ECE 401: Signal and Image Analysis, Fall 2020

  2. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  3. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Outline Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  4. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Two-sided spectrum The spectrum of x ( t ) is the set of frequencies, and their associated phasors, Spectrum ( x ( t )) = { ( f − N , a − N ) , . . . , ( f 0 , a 0 ) , . . . , ( f N , a N ) } such that N � a k e j 2 π f k t x ( t ) = k = − N

  5. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Fourier’s theorem One reason the spectrum is useful is that any periodic signal can be written as a sum of cosines. Fourier’s theorem says that any x ( t ) that is periodic, i.e., x ( t + T 0 ) = x ( t ) can be written as ∞ � X k e j 2 π kF 0 t x ( t ) = k = −∞ which is a special case of the spectrum for periodic signals: f k = kF 0 , and a k = X k , and F 0 = 1 T 0

  6. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Fourier Series Analysis (finding the spectrum, given the waveform): � T 0 X k = 1 x ( t ) e − j 2 π kt / T 0 dt T 0 0 Synthesis (finding the waveform, given the spectrum): ∞ � X k e j 2 π kt / T 0 x ( t ) = k = −∞

  7. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Outline Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  8. Review Sampling Aliasing The Sampling Theorem Interpolation Summary How to sample a continuous-time signal Suppose you have some continuous-time signal, x ( t ), and you’d like to sample it, in order to store the sample values in a computer. The samples are collected once every T s = 1 F s seconds: x [ n ] = x ( t = nT s )

  9. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Example: a 1kHz sine wave For example, suppose x ( t ) = sin(2 π 1000 t ). By sampling at F s = 16000 samples/second, we get n � � x [ n ] = sin 2 π 1000 = sin( π n / 8) 16000

  10. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Outline Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  11. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Can every sine wave be reconstructed from its samples? The question immediately arises: can every sine wave be reconstructed from its samples? The answer, unfortunately, is “no.”

  12. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Can every sine wave be reconstructed from its samples? For example, two signals x 1 ( t ) and x 2 ( t ), at 10kHz and 6kHz respectively: x 1 ( t ) = cos(2 π 10000 t ) , x 2 ( t ) = cos(2 π 6000 t ) Let’s sample them at F s = 16 , 000 samples/second: n n � � � � x 1 [ n ] = cos 2 π 10000 , x 2 [ n ] = cos 2 π 6000 16000 16000 Simplifying a bit, we discover that x 1 [ n ] = x 2 [ n ]. We say that the 10kHz tone has been “aliased” to 6kHz: � 5 π n � � 3 π n � x 1 [ n ] = cos = cos 4 4 � 3 π n � � 5 π n � x 2 [ n ] = cos = cos 4 4

  13. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Can every sine wave be reconstructed from its samples?

  14. Review Sampling Aliasing The Sampling Theorem Interpolation Summary What is the highest frequency that can be reconstructed? The highest frequency whose cosine can be exactly reconstructed from its samples is called the “Nyquist frequency,” F N = F S / 2. If x ( t ) = cos(2 π F N t ), then � n � = cos( π n ) = ( − 1) n x [ n ] = cos 2 π F N F S

  15. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Sampling above Nyquist ⇒ Aliasing to a frequency below Nyquist If you try to sample a signal whose frequency is above Nyquist (like the one shown on the left), then it gets aliased to a frequency below Nyquist (like the one shown on the right).

  16. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Outline Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  17. Review Sampling Aliasing The Sampling Theorem Interpolation Summary General characterization of continuous-time signals Let’s assume that x ( t ) is periodic with some period T 0 , therefore it has a Fourier series: ∞ ∞ � 2 π kt � X k e j 2 π kt / T 0 = � � x ( t ) = | X k | cos + ∠ X k T 0 k = −∞ k =0

  18. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Eliminate the aliased tones We already know that e j 2 π kt / T 0 will be aliased if | k | / T 0 > F N . So let’s assume that the signal is band-limited: it contains no frequency components with frequencies larger than F S / 2. That means that the only X k with nonzero energy are the ones in the range − N / 2 ≤ k ≤ N / 2, where N = F S T 0 . N / 2 N / 2 � 2 π kt � � X k e j 2 π kt / T 0 = � x ( t ) = | X k | cos + ∠ X k T 0 k = − N / 2 k =0

  19. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Sample that signal! Now let’s sample that signal, at sampling frequency F S : N / 2 N / 2 � 2 π kn � X k e j 2 π kn / F S T 0 = � � x [ n ] = | X k | cos + ∠ X k N k = − N / 2 k =0 So the highest digital frequency, when k = F S T 0 / 2, is ω k = π . The lowest is ω 0 = 0. π π X k e j ω k n = � � x [ n ] = | X k | cos ( ω k n + ∠ X k ) ω k = − π ω k =0

  20. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Spectrum of a sampled periodic signal

  21. Review Sampling Aliasing The Sampling Theorem Interpolation Summary The sampling theorem As long as − π ≤ ω k ≤ π , we can recreate the continuous-time signal by just regenerating a continuous-time signal with the corresponding frequency: � � � � � cycles samples radians ω k × F S � sample second f k = � � second radians 2 π cycle x [ n ] = cos( ω k n + θ k ) → x ( t ) = cos(2 π f k t + θ k )

  22. Review Sampling Aliasing The Sampling Theorem Interpolation Summary The sampling theorem A continuous-time signal x ( t ) with frequencies no higher than f max can be reconstructed exactly from its samples x [ n ] = x ( nT S ) if the samples are taken at a rate F s = 1 / T s that is greater than 2 f max .

  23. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Outline Review: Spectrum of continuous-time signals 1 Sampling 2 Aliasing 3 The Sampling Theorem 4 Interpolation: Discrete-to-Continuous Conversion 5 Summary 6

  24. Review Sampling Aliasing The Sampling Theorem Interpolation Summary How can we get x ( t ) back again? We’ve already seen one method of getting x ( t ) back again: we can find all of the cosine components, and re-create the corresponding cosines in continuous time. There is an easier way. It involves multiplying each of the samples, x [ n ], by a short-time pulse, p ( t ), as follows: ∞ � y ( t ) = y [ n ] p ( t − nT s ) n = −∞

  25. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Rectangular pulses For example, suppose that the pulse is just a rectangle, � − T S 2 ≤ t < T S 1 2 p ( t ) = 0 otherwise

  26. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Rectangular pulses = Piece-wise constant interpolation The result is a piece-wise constant interpolation of the digital signal:

  27. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Triangular pulses The rectangular pulse has the disadvantage that y ( t ) is discontinuous. We can eliminate the discontinuities by using a triangular pulse: � 1 − | t | − T S ≤ t < T S T S p ( t ) = 0 otherwise

  28. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Triangular pulses = Piece-wise linear interpolation The result is a piece-wise linear interpolation of the digital signal:

  29. Review Sampling Aliasing The Sampling Theorem Interpolation Summary Cubic spline pulses The triangular pulse has the disadvantage that, although y ( t ) is continuous, its first derivative is discontinuous. We can eliminate discontinuities in the first derivative by using a cubic-spline pulse:  � 2 � 3 � � | t | | t | 1 − 2 + − T S ≤ t < T S  T S T s    � 2 � 3 � � p ( t ) = 2 − | t | 2 − | t | − + T S ≤ | t | < 2 T S T S T S    0 otherwise 

Recommend


More recommend