Main Content

phased.OmnidirectionalMicrophoneElement

Omnidirectional microphone element

Description

The phased.OmnidirectionalMicrophoneElement System object™ models a microphone element with an omnidirectional response pattern.

To compute the response of the microphone element for specified directions:

  1. Create the phased.OmnidirectionalMicrophoneElement object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

example

microphone = phased.OmnidirectionalMicrophoneElement creates an omnidirectional microphone System object, microphone, with default object properties.

example

microphone = phased.OmnidirectionalMicrophoneElement(Name=Value) creates an omnidirectional microphone object, microphone, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1=Value1,...,NameN=ValueN).

Example: microphone = phased.OmnidirectionalMicrophoneElement(FrequencyRange=[0 1000],BackBaffled=true) creates a back baffled omnidirectional microphone element with its frequency range specified between 0 and 1000 Hz.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Operating frequency range of the microphone element, specified as a 1-by-2 real-valued row vector in the form of [LowerBound HigherBound]. The microphone element has no response outside the specified frequency range. Units are in Hz.

Data Types: double

Baffle the back direction of microphone element, specified as false or true. When true, the microphone responses to all azimuth angles beyond ±90 degrees from broadside (zero degrees azimuth and elevation) are zero.

When the value of this property is false, the back direction of the microphone element is not baffled.

Data Types: logical

Usage

Description

RESP = microphone(FREQ,ANG) returns the microphone’s magnitude response, RESP, at frequencies specified in FREQ and directions specified in ANG.

Note

The object performs an initialization the first time the object is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Input Arguments

expand all

Signal frequencies, specified as a 1-by-P row vector of positive values. Units are Hz.

Response directions, specified as a 1-by-Q vector of real-values or a 2-by-Q matrix of real-values.

  • If ANG is a 1-by-Q vector, each element specifies a direction’s azimuth angle. The azimuth angle must be between –180° and 180°, inclusive. In this case, the corresponding elevation angle is assumed to be zero.

  • If ANG is a 2-by-Q matrix, each column of the matrix specifies the direction in the form [azimuth;elevation]. The azimuth angle must be between –180° and 180°, inclusive. The elevation angle must lie between –90° and 90°, inclusive.

Units are in degrees.

Output Arguments

expand all

Microphone magnitude response, returned as an Q-by-P real-valued matrix. The matrix contains the responses of the microphone element at the Q angles specified in ANG and the P frequencies specified in FREQ.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

beamwidthCompute and display beamwidth of sensor element pattern
directivityDirectivity of antenna or transducer element
isPolarizationCapableAntenna element polarization capability
patternPlot antenna or transducer element directivity and patterns
patternAzimuthPlot antenna or transducer element directivity and pattern versus azimuth
patternElevationPlot antenna or transducer element directivity and pattern versus elevation
stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Create an omnidirectional microphone. Find the microphone response at 200, 300, and 400 Hz for the incident angle 0° azimuth and 0° elevation. Then, plot the azimuth response of the microphone at three frequencies.

microphone = phased.OmnidirectionalMicrophoneElement;
microphone.FrequencyRange=[20 2e3];
fc = [200 300 400];
ang = [0;0];
resp = microphone(fc,ang);

Plot the response pattern. The response patterns for at all three frequencies are the same.

pattern(microphone,fc,-180:180,0,'CoordinateSystem','polar','Type','power');

Compute the directivity of an omnidirectional microphone element for several different directions.

Create the omnidirectional microphone element system object.

myMic = phased.OmnidirectionalMicrophoneElement();

Select the angles of interest at constant elevation angle set equal to zero degrees. Select seven azimuth angles centered at boresight (zero degrees azimuth and zero degrees elevation). Finally, set the desired frequency to 1 kHz.

ang = [-30,-20,-10,0,10,20,30; 0,0,0,0,0,0,0];
freq = 1000;

Compute the directivity along the constant elevation cut.

d = directivity(myMic,freq,ang)
d = 7×1

     0
     0
     0
     0
     0
     0
     0

Next select the angles of interest to be at constant azimuth angle at zero degrees. All elevation angles are centered around boresight. The five elevation angles range from -20 to +20 degrees. Set the desired frequency to 1 GHz.

ang = [0,0,0,0,0; -20,-10,0,10,20];
freq = 1000;

Compute the directivity along the constant azimuth cut.

d = directivity(myMic,freq,ang)
d = 5×1

     0
     0
     0
     0
     0

For an omnidirectional microphone, the directivity is independent of direction.

Determine whether a phased.OmnidirectionalMicrophoneElement microphone element supports polarization.

microphone = phased.OmnidirectionalMicrophoneElement;
isPolarizationCapable(microphone)
ans = logical
   0

The returned value 0 shows that the omnidirectional microphone element does not support polarization.

Construct an omnidirectional microphone and plot the magnitude and directivity patterns. The microphone operating frequency spans the range 20 to 20000 Hz.

Construct the omnidirectional microphone.

sOmni = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[20 20e3]);

Plot the microphone magnitude pattern at 200 Hz.

fc = 200;
pattern(sOmni,fc,[-180:180],0,...
    'CoordinateSystem','rectangular',...
    'Type','efield')

Plot the microphone directivity.

pattern(sOmni,fc,[-180:180],0,...
    'CoordinateSystem','rectangular',...
    'Type','directivity')

The directivity is 0 dbi as expected for an omnidirectional element.

Construct an omnidirectional microphone with response in the frequency range 20-20000 Hz. Then, plot the 3-D magnitude pattern over a range of angles.

Construct the microphone element.

sOmin = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[20 20e3]);

Plot the 3-D pattern at 500 Hz between -30 to 30 degrees in both azimuth and elevation in 0.1 degree increments.

fc = 500;
pattern(sOmin,fc,[-30:0.1:30],[-30:0.1:30],...
    'CoordinateSystem','polar',...
    'Type','efield')

Create an omnidirectional microphone element. Plot an azimuth cut of the directivity at 0 and 30 degrees elevation. Assume an operating frequency of 500 Hz.

Create the microphone element.

sOmni = phased.OmnidirectionalMicrophoneElement('FrequencyRange',[100,900]);
fc = 500;

Plot the azimuth pattern.

patternAzimuth(sOmni,fc,[0 30])

Because of the omnidirectionality of the microphone, the two patterns coincide.

Plot a reduced range of azimuth angles using the Azimuth parameter.

patternAzimuth(sOmni,fc,[0 30],'Azimuth',[-20:20])

Construct an omnidirectional microphone element. Plot an elevation cut of the power 45 and 55 degrees azimuth. Assume the operating frequency is 500 Hz.

Create the microphone element.

fc = 500;
sOmni = phased.OmnidirectionalMicrophoneElement('FrequencyRange',[100,900]);

Display the power pattern.

patternElevation(sOmni,fc,[45 55],'Type','powerdb')

Because of the omnidirectionality, the two plots coincide.

Plot a reduced range of elevation angles using the Elevation parameter.

patternElevation(sOmni,fc,[45 55],...
    'Elevation',[-20:20],...
    'Type','powerdb')

Extended Capabilities

Version History

Introduced in R2011a