From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the mean of a series of complex numbes to generate an avergage FFT spectrum

Hi All

 

I have a a 2d array of complex numbers. In fact I have a 10 x 133210 array that represents the complex result of a series of ffts taken from the time series of 10 mics.

 

For example

 

Frequency ::::::                 1Hz     2 Hz   3Hz   4Hz   5Hz      ad infinitum(!)

 

Amplitude for Mic 1             2+2i    2+2i   2+2i  7+2i  2+2i

Amplitude for Mic 2             3+2i    5+2i   2+2i  2+2i  2+2i

Amplitude for Mic 3             4+2i    2+2i   2+2i  8+2i  2+2i

up to Mic 10

 

 

Now i want to be able to average these spectrums so that I can regenerate the time series that would be found (or heard) if the listener was to perceive all 10 mics timeseries at the ear without the phase cancellation effects of the time domain.

 

So I take all 10 mics complex FFTs and I average across every column. I do this by summing all ten mics complex bin values and diving by 10 + 0i.

 

The result I get is very close to what I would expect in the frequency domain. I would imagine that if i was to take all ten signals with the same time series what is rengenerated in the frequency and time domain would be the same...

 

However the iFFT returns NaN

 

There must be a problem with my averaging process - can anyone shed any light?

 

Thanks

 

Greg

 

 

 

 

0 Kudos
Message 1 of 4
(2,825 Views)

Greg,

 

1. The phase effects due to the spacing of the microphones is already in the data.  Unless you have a point source, it will be very difficult to sort out which components came from where.

2. Are there any NaN values in your array of means?

 

Can you post a small subset of the data (10 x 1000 rather than 10 x 133210) and your VI so we can see what is going on?

 

Lynn 

0 Kudos
Message 2 of 4
(2,809 Views)

Thanks Lynn I actually solved this probelm just using sum and divide functions - I was not using the correct values to average across!

 

Thanks

0 Kudos
Message 3 of 4
(2,804 Views)

Using the correct values usually helps!

 

Lynn 

0 Kudos
Message 4 of 4
(2,797 Views)