I'm studying mechanical engineering and I would like to determine the magnitude and phase of a signal. Fourier analysis has been mentioned many times during my study and I think I know what it is about but I never had to apply it myself, which is (as usual) way more difficult than following the analysis someone else did;) I tried to find answers to my questions, but haven't been successful so far. I started to get more confused the more I read so I decided to ask somebody for help. I don't expect a final solution, like source code, but could please someone point me in the right direction?
Technical background:
I would like to analyze the bending moment of the rotor mast of a helicopter. The bending moment is calculated from the signal of a strain gauge, which rotates with the rotor. Apparently, the signal of the bending moment is overlain by the rotor revolution. What I need is the phase and the magnitude of the signal.
Approach:
I have time-discrete flight test data of the bending moment and a signal, which indicates, when rotor blade number one is located above the tailboom. I applied a fast fourier transformation to the data of one revolution and would like to determine phase and magnitude from the imaginary and real part of the fourier coefficients. The computations are done by a python script.
Questions:
As far as I understood, the first fourier coefficent equals the mean value of the signal and the next coefficients equals the coefficient of the first harmonic frequency, which would be the rotor frequency, since I analyse the data of one revolution. If I change the number of terms considered, the coefficents change. This makes perfectly sense to me, but affects phase and magnitude as well. So choosing the second coefficient returned by my fft-function can't be right. What am I missing?
Thanks in advance!
Johannes
How do I choose N? Does N equal the number of measured values?
Never heard of atan2, but I found information about it...
If the frequency of the coefficient equals k/N, I know, that the coefficient with k=1 stands for the rotor rpm. I did the calculation for 36 revolutions and in 7 cases, the coefficient with k=0 has had the larges magnitude by far. So I'll increase the sampling rate. Fortunately, the raw flight test data is sampled with 25kHz and the data I used unitl now is sampled with 1kHz.
Does it affect the quality of the result, if I calculate the phase and magnitude for every revolution seperately and calculate the mean afterwards instead of calculating the phase and magnitude for the whole flight at once? I decided to calculate the phase and magnitude for each revolution to be able to calculate the standard deviation to asses the quality.
thanks alot!
Here some final notes:
the time for the signal calculated from the fourier coefficients starts at t=0s no matter what time the actual signal starts. This is what leads to the phase shift in the diagramm ("Signals") I posted above.
calculating the mean of all phases for each revolution leads to a tremendous standard deviation (up to 180°). This is caused by the discontinuity of arctan. It can be solved by calculating the mean of the real and imaginary part of the fourier coefficients befor calculting the phase. I'm not yet sure under which circumstances calculating the mean of the fourier coefficients is valid...
arctan2 from python expects the arguments in a different order than posted above or as other programms like excel... I used numpy.angle(imaginary number) and numpy.abs(imaginary number) in the end anyway...
Thanks alot for your help! Johannes

I hope this answers your questions. It's not that easy for me to describe, since English isn't my mother tongue;)
– Johannes Jul 19 '13 at 23:23