Microphone Array

This example shows how to construct and visualize a four-element ULA with custom cardioid microphone elements.

Create a microphone element with a cardioid response pattern. Use the default FrequencyVector of [20 20e3]. Specify the polar pattern frequencies as [500 1000].

freq = [500 1000];
hmic = phased.CustomMicrophoneElement(...
    'PolarPatternFrequencies',freq);
hmic.PolarPattern= mag2db([...
    0.5+0.5*cosd(hmic.PolarPatternAngles);...
    0.6+0.4*cosd(hmic.PolarPatternAngles)]);

Plot the polar pattern of the microphone at 0.5 kHz and 1 kHz.

plotResponse(hmic,freq,'Format','Polar');

Assign the custom microphone element as the Element property of a phased.ULA object.

ha = phased.ULA('NumElements',4,'ElementSpacing',0.5,...
    'Element',hmic);

Plot the response of the array at 0.5 kHz and 1 kHz.

figure;
plotResponse(ha,freq,340,'Format','Polar')

Was this topic helpful?