# IFFT of Microphone Array Directivity Response

I am implementing a microphone array simulation in my thesis. My prof and many documents indicates that microphone array behaves like filters in DSP but instead time-frequency domain there exists sensivity-directivity domains. My microphone array directivity responce is a sinc like shape which can be seen below(x axis is angle from -90 to 90 ): When I took the ifft of such directivity responce I am expecting to get a rectangle. But instead ifft result is : My microphone array composes of 41 apartures and distance between apartures is 10 cm.

My first question after taking ifft I am having 180 bins. How should I assign 180 values to my 41 apartures. Should I just take 41 bins in the middle?

My second question since microphone array directivity responce is a sinc like shape. I were expecting a rectangle like result after ifft. Why I am not getting rectangle?

• Is your microphone element omni-directional? If yes then you should take the response from -180 to 180 degrees. What you can try is to take a 41 element rect and plot for FFT of it over your directivity response in order to confirm if its a sinc. – learner Jan 24 '16 at 8:39
• That is really good advice thanks, I am trying taking 41 element FFT and it seems it is working. Not perfectly( for example responce has no symmetry, there is noice) but I can see that noice is being reduced in the angle I added the null. – Kadir Erdem Demir Jan 26 '16 at 20:37
• @learner : That's incorrect. A linear array of omnidirectional microphones cannot disambiguate (tell the difference) between signals arriving from the left side of the array or the right side of the array. So it only makes sense to plot the beam pattern from -90 to +90 degrees (assuming 0 is at broadside to the array). There are ways around this, but they generally rely on the array not being straight. – Peter K. May 23 '16 at 18:41

Your plot shows the magnitude of the array gain vs angle of arrival for the broadside beampattern. Before you can take meaning IFFT of this sequence, you need to follow the following steps.

1. The data in the plot is the magnitude of the array gain, which is stripped of all phase information. For IFFT to give desired result, we need to restore the phase information too. Fortunately, this can be easily accomplished by just changing the sign of the alternate lobes, assuming the underlying curve is of $\sin(Mx)/\sin(x)$ form.
2. The gain of a linear array looking at angle $\theta_0$ is proportional to $\dfrac{\sin\left( Ma(\cos(\theta)-\cos(\theta_0))\right) }{\sin\left( a(\cos(\theta)-\cos(\theta_0))\right) }$. So it makes more sense to take the IFFT of the array gain sequence when it is plotted against $\cos(\theta)$ as opposed to just $\theta$, or angle (as it is shown in your plot).

Also, assuming that the measurement has been made at the design frequency (i.e. sensor spacing $d = \lambda/2$), the result of the IFFT would provide the sequence of sensor weights. The number of FFT bins would only affect the zero-padding around the actual sensors.

I took the liberty of trying the above steps out on a set of data shown below. Note that it is very similar to your top plot. The second subplot shown the result as we restore the sign by inverting the sign of the alternating lobes.

At this point, let theta and gain represent the x and y data in this plot (after sign correction).

Next, the data is resampled such that the x-axis is linearly spaced in $\cos(\theta)$ domain. Note that since $\theta$ ranges from 0 to 180, $\cos\theta$ would range from -1 to 1.

NFFT = 2^8;
xr = linspace(-1,1,NFFT);
yr = interp1(cosd(theta), gain, xr, 'linear', 'extrap');


The choice of NFFT is arbitrary, but it must be greater than the number of sensors.

The result of resampling is shown in the third subplot above. Notice how it looks more like a sinc function now.

Finally, we are ready for the IFFT.

wgt = fftshift(ifft(yr, NFFT)); % weight of sensors
% plot
figure;
plot((-NFFT/2:NFFT/2-1), abs(wgt), 'o-', 'linewidth', 2);
grid on;
xlim(20*[-1, 1]);
xlabel('Sensor location (\lambda/2)');
ylabel('Sensor weight');
title('IFFT result (after FFTSHIFT)'); Based on the above plot, it appears that there were 13 sensors in the experiment.

I don't have a lat of experience with microphone arrays (yet).
I have just a bit of experience with windows and i think this is similar. (If not comments are welcome for me to learn about this topic as well)
When i look to just your figure it doesn't have the shape i should suspect what a rectangular window should have. for me it looks more like a shifted Hann window or blackman window or something like that.
Just look at the figures atwindow function at wikipedia

• After your advise I checked windows, and IMHO my signal is sinc2 "calculus.subwiki.org/wiki/Sinc-squared_function" do you know a way to convert sinc2 to sinc . I really need to get a rectangular window after ifft – Kadir Erdem Demir Jan 23 '16 at 23:23
• Sorry can you help with that. maybe somebody else or otherwise mathematics.se or Mathoverflow.se – Jan-Bert Jan 24 '16 at 7:55
• Thanks anyways, this answer was useful to me I don't understand why people down vote sometimes. – Kadir Erdem Demir Jan 26 '16 at 20:38
• I prefer that they tell why when they down vote. In that case i can learn something. Now i know that my answer can be better but i don't how ... – Jan-Bert Jan 26 '16 at 20:45