0
$\begingroup$

I have a multi-channel sound file from a microphone array. I want to get the polar plot in Matlab in order to get the directivity patter of the sound source. How do I do this? I did the FFT on the whole recording and I plotted the magnitude in dB but I'm afraid I'm not doing the correct thing.

  • Can someone tell me how I can get the polar directivity representation?
  • If I want to plot the directivity in terms of octave bands should I use a filter bank or can I just plot some averaged magnitudes of the frequencies that are on that specific octave band?

Sorry for the newbie questions and thanks a lot in advance.

$\endgroup$
  • 1
    $\begingroup$ Do you have the relative positions of the mics on the array? (This process will give you the directivity of the microphone, not the directivity of the source). The FFT of one raw channel does not convey anything. How familiar are you with phased arrays? $\endgroup$ – A_A Feb 25 at 8:11
  • 1
    $\begingroup$ I have the positions of the microphones, they are located in a semi-spherical way around the sound source. If I have the FFT of all the mics can I use the magnitude information to plot the directivity of the source? I would have a different directivity for each frequency bin though. I am new in the field, so I am not familiar with those, thanks for the link! $\endgroup$ – JohnIL Feb 25 at 11:19
  • $\begingroup$ OK, that is a bit different and I think that it should appear in the main body of the question. Do you have the polar responses of the microphones? $\endgroup$ – A_A Feb 25 at 13:43
  • $\begingroup$ I just know that they are omnidirectional $\endgroup$ – JohnIL Feb 25 at 15:34
0
$\begingroup$

If you consider ideal conditions in the measurements (anechoic conditions - no reflections, ideal omnidirectionality of the microphones), then you could use the recorded magnitude to represent the polar plots of your source's directivity. Most probably you would like to do it in 2D polar plots for various azimuths and elevations. You can also choose to plot either vertical or horizontal directivity patterns in this way. Alternatively, you could choose to create a "balloon plot" like the ones given by the Common Loudspeaker Format (CLF) files.

Now, let's briefly describe the process for a 2D horizontal polar plot. In the easy case where you have $N$ amount of microphones lying on the same horizontal plane, you just plot the recorded magnitude of each of them and find a way to fill in the gaps. This means that in the simplest case where they are spaced in equal angle steps around the source you could just interpolate every angle between them (by the way, if I am not mistaken, this is what happens in the CLF files, as their angular step is around 5 degrees). Keep in mind that this is NOT the most accurate/best way to do it.

Now, if you happen to either have a non-constant angular step you would have to find an appropriate formula to calculate the magnitude in between the microphone positions. In addition to that, if you happen to plot directivity patterns of horizontal planes that you either have some microphones on for some angles, but not for all of them (i.e. 3 mics for some horizontal angles lie on the plane but another $N - 3$ mics don't lie on the plane) you would also have to interpolate between adjacent microphone positions to get a magnitude value for that angle. A somewhat simple way to do it would be to use Vector Base Amplitude Panning (VBAP) (although this algorithm is used for "panning" it could very well serve as the basis for other calculations) to calculate the linear contribution of adjacent microphones to each location. Nevertheless, you would eventually have to find a way to calculate the magnitude for a $p = [x, y, z]^{T}$ point in 3D space in order to plot the magnitude on a $P = [x, y, c]^{T}$ or $P = [c, y, z]^{T}$ plane.

Now, regarding the frequency representation of your polar plots. If you consider the result of the FFT as a filter bank of linearly spaced equal bandwidth filters, then you can treat the data as a filter-banked data set and do the plotting for each frequency bin separately. This would result in most cases with a humongous amount of data and plots which wouldn't really be any useful (especially for high frequencies the human auditory system shows decreased frequency discrimination. For more info see critical bands). If you would like to have data in a "more meaningful human-related" way (this is somewhat a heavy state here, take it a bit light though) you could use filterbanks in either 1/3th-octave spaced bands (which is quite common), 1/6th-octave spaced bands (less common but a bit closer to the human auditory system pitch JND and critical bands bandwidth) or even use something like the bark scale or the mel scale to space your filters. Of course, the same applies to balloon plots.

Regarding your question about the way to "average" frequency bins to create "fractional-octave" plots, keep in mind that simple averaging, or even power/energy summation of the bins doesn't necessarily correspond to the intended "fractional octave" band of interest. For more information, you could have a look at "Generalized Fractional-Octave Smoothing of Audio and Acoustic Responses" by Hatziantoniou and Mourjopoulos.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.