KAAP686 Mathematics and Signal Processing for Biomechanics Fourier Series, continued (Winter 3rd ed. (2005), sect. 2.5.2) The estimation of the frequency content of a signal is referred to as Fourier analysis or spectrum analysis or spectral analysis. For a signal recorded in an experimental setting, the discrete Fourier transform should be used to analyze the frequency content of the data. The signal analyzed this way does not need to be periodic. If the signal is quasi-periodic (i.e. it is almost periodic, but each cycle is a little bit different for example, a blood pressure or gait recording - then the recording should include one or two or some integer number of “periods” of the activity. We will later discuss how “windowing” can and should be used for Fourier analysis of non-periodic signals. The discrete Fourier transform is given by (1) (Fourier synthesis, or inverse Fourier transform) (2) (Fourier analysis, or Fourier transform) It is best computed by a computer program such as Matlab or LabView or Excel. Equation (1) shows how the signal x(n) is made up of the sum of N sinusoids. (Since eiθ = cosθ + isinθ, the sum of complex exponentials really is a sum of sinusoids.) Eqn. (2) shows how the amplitudes and phases, X(k), of the sinusoids are determined. x(n) is the time domain representation of the signal; X(k) is the frequency domain representation. The coefficients X(k) are complex numbers, each of which has a magnitude and a phase, which represent the magnitudes and phase angles of the corresponding sinusoids which must be added up to recreate the original signal. Equations (1) and (2) are called a “transform pair” since they specify how to transform from “time domain” to “frequency domain” and back again. Eqn (1) is the Fourier synthesis it “builds up” or synthesizes the time domain signal x(n) from the component sinusoids. It is also sometimes called the inverse transform. Eqn (2) is the Fourier analysis it finds the frequency domain coefficients X(k) by breaking down (analyzing) the time-domain signal x(n); it is also called simply the Fourier transform, or the forward (as opposed to inverse) transform. A plot of the magnitudes of X(k) versus frequency is called a Fourier spectrum. If the squared magnitudes are plotted vs. freq, the plot is called the power spectrum. Discuss the squared magnitude of a complex number. Discuss analogy between spectrum of a signal and the spectrum of light. Frequencies in the Fourier spectrum Frequencies may be referred to by their integer index the “k” in eqns above which has values 0 (for the mean value), 1 (for the frequency whose period equals the length of the data recording), 2 (period equals half the length of the data recording), etc. Alternatively, the frequencies may be referred to by their actual value in cycles per second (or Hertz). (This is only possible if the sampling interval, t, is known.) The conversion between frequency index k and the actual frequency in Hertz is given by , (3) where t is the sampling interval (time between samples) in seconds, and Nt=T, the repeat period in seconds. Since k take on integer values, it follows that the “spacing” between frequencies in the discrete Fourier transform is (4) The highest (nonredundant) frequency in the Fourier transform of a real discrete signal is , (5) which corresponds to . (6) There are higher frequency components in the discrete transform (from k=(N/2)+1 to k=N-1), but they are redundant in the sense that they do not contain “new” information about the signal: they have the same amplitudes as, and exactly opposite phases to, the components with indices k=(N/2)-1 to k=1, respectively. (In other words, X(k=N-1) is the complex conjugate of X(k=1), X(k=N-2) is the complex conjugate of X(k=2), etc.) (When I say k=1, k=2, etc., I am assuming k=0 is the lowest element. Matlab arrays always have 1, not 0, as the lowest array index, so be careful to make the necessary adjustments when converting these ideas to Matlab.) For some examples see fft_test1.m , fft_test1a.m, and fft_test2.m in ../reserve/matlab directory of course web site. fft_test.m shows transform up to the Nyquist frequency (k=N/2, i.e. f=5 Hz)), while fft_test1a.m shows transform up to k=N-1 (i.e. f=10 Hz). Note that the magnitudes are the same and the phases are opposite when comparing frequencies 5 to 10 Hz with frequencies 5 to 0 Hz. This is why Nyquist frequency (5 Hz in this example) is also sometimes called the folding frequency. Copyright © 2013 W.C. Rose