This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 17 DYNAMICS CALCULATIONS USING THE TIME AND FREQUENCY DOMAINS 51 17 Dynamics Calculations Using the Time and Fre- quency Domains 1. Don’t turn anything in on this part. The FFT (Fast Fourier Transform) is a standard method for decomposition of a signal into its harmonic components. You need to know a few specific items about it: (a) The length of the input signal x- in the time domain - is N . The FFT itself doesn’t care about what is the time step between x n and x n +1 , although the spacing must be uniform; below, we’ll call it Δ t . Hence x 1 occurs at time 0, x 2 is at time Δ t , and so on, up to x N taken at time ( N- 1)Δ t . (b) The formal definition of the transform and its inverse in MATLAB is X k = N X n =1 x n e- i 2 π ( k- 1)( n- 1) /N , 1 ≤ k ≤ N ; x n = 1 N N X k =1 where i = √- 1. So the FFT takes a uniformly-spaced time signal x and makes a uniformly-spaced frequency signal X , of the same length. It is like a Fourier integral because of the exponential: e iz = cos z + i sin z . Furthermore, you notice that the FFT (the transform that makes X ) is a summation between the time- domain signal x and an exponential with imaginary argument, which has unity magnitude. Thus, the size of the elements in X are roughly the size of x , multiplied by N . The inverse FFT has the factor 1 /N out front so as to cancel this effect out; ifft(fft(x)) = x; . Because of this arrangement, however, you can’t take the FFT of two signals, multiply them (to effect a convolution), take the inverse FFT, and expect to get the right scaling - each FFT induces a scaling of N, but the IFFT only corrects for one of them. Remembering this point will save you a lot of trouble in using the FFT in MATLAB! You can see this scaling for example with x = sin(0:0.1:100) ; X=fft(x);plot(abs(X)); . Here, you plot the absolute value ( abs() ) which is synonymous with magnitude, because X is complex. There is another scaling factor to notice, but this is easier; because the Fourier integral involves both negative and positive frequencies, it puts half the area on each side....
View Full Document
- Spring '05
- Digital Signal Processing, LTI system theory, Fast Fourier transform