Friday 17 June 2016

signal analysis - FFT Frequency bin relationship


I guess this is a stupid question or it is not clear. I will try again



I have a situation where I take the fft of a combined source, both at the same frequency but at different locations. I am trying to figure out what the relationship between the source and the combined.



Maybe I am using the wrong terminology here. A combined source in my application is at least two instances of the same frequency from different locations in the focal plane, combined in the same waveform.


Is the phase of the combined complex value the sum of the phase of the source? so one could write something like:


tanCombined = tan(combinedIm / combinedRe) = tan(s1Im/s1Re + s2Im/s2Re + ...);



Second Attempt.


Say I have a waveform waveOne that is a sin wave at a specific frequency that has an origin at a point in the focal plane relative to a single measuring microphone.


If I take the fft of this waveform I can calculate the phase angle and amplitude from the fft data, phaseOne and amplitudeOne.


Say I have another waveform waveTwo that is a sin wave of the same frequency that has its origin at a different point in the focal plane.


If I take the fft of this wave form I can calculate the phase angle and amplitude from the fft, phaseTwo and amplitudeTwo.


If I combine these waveforms into a single wave, waveThree and take its fft the same bin is excited as in the above two samples and both the amplitude and phase angle are different, as one would expect.



The question is, for the combined experiment, is there a relationship between the amplitude and phase of the combined fft value with those of the individual waveform.



Answer



Yes, simply use a trigonometric addition formula. The results can vary from complete constructive interference to most destructive interference. Depending on the relative phases at your microphone.


Here is the math:


$$ W_1 = A_1 \cos( F t + P_1 ) $$ $$ W_2 = A_2 \cos( F t + P_2 ) $$


$$ W_1 = A_1 \cos( F t ) \cos( P_1 ) - A_1 \sin( F t ) \sin( P_1 ) $$ $$ W_2 = A_2 \cos( F t ) \cos( P_2 ) - A_2 \sin( F t ) \sin( P_2 ) $$


$$ W_3 = W_1 + W_2 = [ A_1 \cos( P_1 ) + A_2 \cos( P_2 ) ] \cos( F t ) - [ A_1 \sin( P_1 ) + A_2 \sin( P_2 ) ] \sin( F t ) $$


Now


$$ W_3 = A_3 \cos( F t ) \cos( P_3 ) - A_3 \sin( F t ) \sin( P_3 ) $$


so



$$ A_3 \cos( P_3 ) = A_1 \cos( P_1 ) + A_2 \cos( P_2 ) = C $$ $$ A_3 \sin( P_3 ) = A_1 \sin( P_1 ) + A_2 \sin( P_2 ) = S $$


Calculate $C$ and $S$.


$$ A_3 = \sqrt{ C^2 + S^2 } $$ $$ P_3 = \operatorname{atan2}( S, C ) $$


If they are in phase $(P_1 = P_2)$ then $ A_3 = A_1 + A_2 $.


If they are completely out of phase $( P_3 = P_1 = P_2 + \pi )$ then $ A_3 = A_1 - A_2 $.


Also, the FFT is a linear operator, so the FFT of your sum is the sum of your FFTs.


Hope this helps.


Ced


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...