Main Content

Microphone ULA Array

This example shows how to construct and visualize a four-element ULA with custom cardioid microphone elements. Specify the polar pattern frequencies as 500 and 1000 Hz.

Create a microphone element with a cardioid response pattern. Use the default values of the FrequencyVector property.

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

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

pattern(microphone,freq,[-180:180],0,'CoordinateSystem','polar','Type','powerdb',...
    'Normalize',true);

Construct a ULA of custom microphone elements.

array = phased.ULA('NumElements',4,'ElementSpacing',0.5,...
    'Element',microphone);

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

pattern(array,freq,[-180:180],0,'CoordinateSystem','polar','Type','powerdb',...
    'Normalize',true,'PropagationSpeed',340.0);