1 / 24

Sampling Theorem, frequency resolution & Aliasing

The Sampling Theorem will be the single most important constraint you'll learn in computer-aided instrumentation design Consider a periodic function, with period T:. Sampling Theorem, frequency resolution & Aliasing. Fourier Series.

schley
Download Presentation

Sampling Theorem, frequency resolution & Aliasing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Sampling Theorem will be the single most important constraint you'll learn in computer-aided instrumentation design Consider a periodic function, with period T: Sampling Theorem, frequency resolution &Aliasing

  2. Fourier Series Where we have applied a low-pass “anti-aliasing” filter to the raw analog signal ending up with h(t), a signal with a highest freq component < 10*ω0

  3. Or…generate 20 independent equations by sampling. We must sample 20 times during one period. (If we sample over more than one period, we may not end up with independent equations.) Each equation will be of the form: {tm} is the set of sample times… Ak , Bk: Fourier spectrum coefficients

  4. The matrix (C) of coefficients looks like:

  5. Let the 20 x 20 matrix be C: with the solution Where matrix C must have a non-zero determinant

  6. Coefficients become spectrum: magnitude Phase change as a function of ω:

  7. Spacing of samples If the sample spacing is uniform there will be 2N segments of time, (time between samples) Therefore the sample rate is 2N/T. The maximum frequency in h(t) is Therefore you must sample at at least 2*fmax to insure you can resolve fmax freq.

  8. statement of the Sampling Theorem, from A. V. Oppenheim and A. S. Willsky, Signals and Systems, 2nd Ed. Prentice-Hall (1996) p. 518

  9. Nyquist what? • Terminology: The sampling frequency of a particular situation, which may exceed by quite a bit the maximum frequency in the signal, is the Nyquist frequency. Twice the maximum frequency of the signal is called the Nyquist rate, and is the minimum sampling rate that can resolve the signal. (O&W, 1st Ed, p. 519)

  10. Resolvable frequency in spectrum • Given the sampling rate, and the number of samples taken, what is the Δf between points on the spectrum? • If a waveform is sampled for one second, what is the frequency resolution? • No matter how long you sample for, the maximum reconstructable frequency remains 2*f_samp

  11. function Test_FFT_11c(wind_flg)

  12. Discrete Fourier Transform • Transform vs Series? • Computing the coefficients can take time…(bench) • Demo with Matlab fft and ifft functions (& Lab 6 HP ‘scope) • And the inverse Discrete Fourier Transform…

  13. Power spectrum • A faster algorithm, the Fast Fourier Transform (FFT), is normally computed, for example, in LabVIEW or MATLAB or in the math feature of the HP 54622A digital scope. • Power spectrum: The HH(jw) are usually complex numbers, and their magnitudes must be taken to find the Power Spectrum (in Matlab, abs(HH))

  14. FFT solves a slightly different problem… • If resolution is ∆f then the FFT stops at Fsamp/2- ∆fwhich makes sense, since what exactly happens at Fsamp/2 itself? • Convert FFT results to Fourier Series coeff:An = real( FFT(n+1) ) * (2/Nsamp)Bn = -imag( FFT(n+1) ) * (2/Nsamp)

  15. Aliased frequencies • Frequencies above the half the sampling rate become aliased as lower frequencies. • For frequencies just above half the sampling rate, up to the sampling rate, the aliased frequency falias = fnyq-|factual - fnyq|, a kind of mirror-image result. • Matlab example (work\jdd\alias03.m) • 12 Hz sinewave requires greater than 24 Hz sampling rate to preserve correct frequency in reconstruction. • Result of sampling 12 Hz at 20 Hz: alias freq = 10- abs(12-10) = 8 Hz.

  16. What happens when f_actual = f_sample? …a triangle wave that is zero at each multiple of f_samp Lab 6-type question: What is the alias of a 97KHz sinewave sampled at 20KHz? What about 83KHz?

  17. Another try at a formula for aliased frequencywhere fsamp = 40 and fact = 108 Fsamp = 40Fact = 108frac = rem(Fact, Fsamp) BB = floor(frac/( Fsamp/2) ) fobs = frac + BB * (Fsamp - 2*frac)

  18. Strobe light demo • For Mech Engineers, goal is to find “zero frequency” and discover angular speed of rotating machinery. tedkinsman.photoshelter.com

  19. About the strobe: General Radio 1531A, from 1971. The circuit used to drive the 10 microseconds ON of the Xenon flash tube is similar to a defibrillator: Charging a capacitor up to several hundred volts. Why no new strobe models on the market? Fear of lawsuits about epilepsy, or the high voltage?

  20. Filtering before and after A→D conversion • Before A→D is the anti-aliasing LP filter • After: Digital (software) filtering available: • ENGN2530: Prof Silverman: Dig. Sig. Proc. • Tapped delay line: calculate “b” coefficients:

  21. Windows to <weight> a sample of points (or filter coefficients) • A window is vector that weights point-for-point (dot product) part of a sequence of data; outside the window the sequence is set to zero. • Rectangular window • Cosine, Hann, Hamming windows • For dealing with time-sample sequence that doesn’t start and end at the same value • http://en.wikipedia.org/wiki/Window_function#Cosine_window

  22. number of samples LP anti- aliasing analog filter A-D conversion Hamming window Hamming window DFT signal sample rate Spectrum

More Related