Why we use FFT?

The FFT is a fast algorithm for discrete Fourier transform that transforms a signal into the frequency domain. Some signals in the time domain is difficult to tell what the characteristics, but if the conversion to the frequency domain, it is easy to see the characteristics of the signal. This is why many signal analysis uses FFT transforms. In addition, FFT can be a signal spectrum extracted, which is often used in spectral analysis.

An analog signal, after ADC sampling, becomes a digital signal. Sampling theorem tells us that the sampling frequency is greater than twice the frequency of the signal, which I do not in this wordy.

You can do FFT transform to the sampled digital signal. N sampling points, after FFT, you can get N points FFT results. In order to facilitate the FFT operation, usually N to take 2 integer power. Assume that the sampling frequency is Fs, the signal frequency F, and the number of sampling points is N.

Then the result after FFT is a complex number of N points. Each point corresponds to a frequency point. The modulus value at this point is the amplitude characteristic at this frequency value. Briefly, the absolute value of the complex number (sqrt(x.real**2 + x.imag**2), ornumpy.abs()) is the amplitude.

Specifically with the original signal amplitude What is the relationship?

Assuming that the peak of the original signal is A, then the modulus of each point of the FFT result (except for the first point DC component) is N / 2 times the A value. The first point is the DC component, its modulus is the DC component of N times. The phase of each point is the phase of the signal at that frequency. The first point represents the DC component (ie, 0Hz), and the last point of the next point N (in fact this point is not there, here is the assumption of the first N +1 points, can also be seen as the first One point is divided into two halves, the other half to the last), said the sampling frequency Fs, which is the middle of the N-1 points are divided into N equal parts, the frequency of each point in turn increase. For example, the frequency represented by a point n is: Fn = (n-1) * Fs / N.

More detailed, when you apply FFT to an arrayX(which, say, contains a number of samples of a functionX(t)at different values oft), you try to represent it as a sum of "plane waves"exp(i w t)(whereiis an imaginary unit, andwis a real-valued frequency) with different values ofw. That is, you want something like

X = A exp(i w1 t)+ B exp(i w2 t)+...

An FFT returns you these coefficientsA,Betc corresponding to some fixed frequenciesw1,w2etc (innumpy, you can get their values from fftfreq()).

Now, these coefficients are, in general, complex. A complex numberAcan be represented as a combination of "amplitude" and "phase" as:

A = r exp(i p)

wherer(== numpy.abs(A)) is the amplitude, andp(== numpy.angle(A)) is the phase, both real values. If you substitute it into the term in the FFT expansion, you get

r exp(i p) exp(i w t)== r exp(i (w t + p))

So, the amplituderchanges the absolute value of the term, and the phasep, well, shifts the phase. Therefore, in order to get the array of amplitudes from the result of an FFT, you need to applynumpy.absto it.

Ref: http://stackoverflow.com/questions/28618591/numpy-fft-what-is-the-return-value-amplitude-phase-shift-or-angle

Phase diagram

In our study, the vertical axis is the amplitude of the acceleration. The horizontal
axis is redefined as the first derivative of the signal which is the rate of change of
the signal per unit time as velocity rather than time. The larger phase trajectory
due to the shape reflects higher amplitude components in time domain. As we have
seen in Figure 2-6, the smooth trajectory of healthy subject shows that the healthy
people walk periodically with relative smooth acceleration. In contrast, the phase
diagram of PD patient’s walking is not as smooth. In Figure 2-7, the phase diagram
of PD subject with freeze shows a smaller trajectory which implies the amplitude of
acceleration of freeze is smaller than the activities of either from healthy subject or

ax1.plot(np.gradient(np.angle(X)),np.angle(X),c='r',label='HS')

ax1.plot(np.angle(X),np.gradient(np.angle(X)),c='r',label='HS')

results matching ""

    No results matching ""