Omnidirectional microphone element
System object™ models a microphone element with an omnidirectional response pattern.
To compute the response of the microphone element for specified directions:
phased.OmnidirectionalMicrophoneElementobject and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
creates an omnidirectional microphone System object,
microphone = phased.OmnidirectionalMicrophoneElement
microphone, with default object properties.
creates an omnidirectional microphone object,
microphone = phased.OmnidirectionalMicrophoneElement(
microphone, with each
specified property set to the specified value. You can specify additional name-value pair
arguments in any order as
1000],BackBaffled=true) creates a back baffled omnidirectional microphone
element with its frequency range specified between 0 and 1000 Hz.
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.
FrequencyRange — Operating frequency range
[0 1e20] (default) | 1-by-2 real-valued row vector
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
BackBaffled — Baffle the back direction of microphone element
false (default) |
Baffle the back direction of microphone element, specified as
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.
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
release method to unlock the object.
FREQ — Signal frequencies
1-by-P row vector of positive values
Signal frequencies, specified as a 1-by-P row vector of positive values. Units are Hz.
ANG — Response directions
1-by-Q vector of real-values | 2-by-Q matrix of real-values
Response directions, specified as a 1-by-Q vector of real-values or a 2-by-Q matrix of real-values.
ANGis 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.
ANGis 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.
RESP — Microphone response
Q-by-P real-valued matrix
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
ANG and the P frequencies specified in
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
Specific to Antenna and Transducer Element System Objects
|Compute and display beamwidth of sensor element pattern|
|Directivity of antenna or transducer element|
|Antenna element polarization capability|
|Plot antenna or transducer element directivity and patterns|
|Plot antenna or transducer element directivity and pattern versus azimuth|
|Plot antenna or transducer element directivity and pattern versus elevation|
Display Omnidirectional Microphone Pattern
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.
Directivity of Omnidirectional Microphone Element
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.
Omnidirectional Microphone Element Does Not Support Polarization
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.
Magnitude and Directivity Patterns of Omnidirectional Microphone
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.
3-D Magnitude Pattern of Omnidirectional Microphone
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')
Azimuth Pattern of Omnidirectional Microphone Element
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.
Because of the omnidirectionality of the microphone, the two patterns coincide.
Plot a reduced range of azimuth angles using the
Elevation Pattern of Omnidirectional Microphone Element
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.
Because of the omnidirectionality, the two plots coincide.
Plot a reduced range of elevation angles using the
patternElevation(sOmni,fc,[45 55],... 'Elevation',[-20:20],... 'Type','powerdb')
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
patternElevationmethods are not supported.
See System Objects in MATLAB Code Generation (MATLAB Coder).