wt = cbfweights(pos,ang) returns
narrowband conventional beamformer weights. When applied to the elements
of a sensor array, these weights steer the response of the array to
a specified arrival direction or set of directions. The sensor array
is defined by the sensor positions specified in the pos argument.
The arrival directions are specified by azimuth and elevation angles
in the ang argument. The output weights, wt,
are returned as an N-by-M matrix.
In this matrix, N represents the number of sensors
in the array while M represents the number of
arrival directions. Each column of wt contains
the weights for the corresponding direction specified in the ang.
The argument wt is equivalent to the output of
the function steervec divided
by N. All elements in the sensor array are assumed
to be isotropic.

Specify a line array of five elements spaced
10 cm apart. Compute the weights for two directions: 30° azimuth,
0° elevation, and 45° azimuth, 0° elevation. Assume
a plane wave having a frequency of 1 GHz.

elementPos = (0:.1:.4); % meters
c = physconst('LightSpeed'); % speed of light;
fc = 1e9; % frequency
lam = c/fc; % wavelength
ang = [30 45]; % beamforming direction
wt = cbfweights(elementPos/lam,ang) % weights

Positions of the elements of a sensor array specified as a 1-by-N vector,
a 2-by-N matrix, or a 3-by-N matrix.
In this vector or matrix, N represents the number
of elements of the array. Each column of pos represents
the coordinates of an element. You define sensor position units in
term of signal wavelength. If pos is a 1-by-N vector,
then it represents the y-coordinate of the sensor
elements of a line array. The x and z-coordinates
are assumed to be zero. If pos is a 2-by-N matrix,
then it represents the (y,z)-coordinates of the
sensor elements of a planar array which is assumed to lie in the yz-plane.
The x-coordinates are assumed to be zero. If pos is
a 3-by-N matrix, then the array has arbitrary shape.

Beamforming directions specified as a 1-by-M vector
or a 2-by-M matrix. In this vector or matrix, M represents
the number of incoming signals. If ang is a 2-by-M matrix,
each column specifies the direction in azimuth and elevation of the
beamforming direction as [az;el]. Angular units
are specified in degrees. The azimuth angle must lie between –180°
and 180° and the elevation angle must lie between –90°
and 90°. The azimuth angle is the angle between the x-axis
and the projection of the beamforming direction vector onto the xy plane.
The angle is positive when measured from the x-axis
toward the y-axis. The elevation angle is the angle
between the beamforming direction vector and xy-plane.
It is positive when measured towards the positive z axis.
If ang is a 1-by-M vector,
then it represents a set of azimuth angles with the elevation angles
assumed to be zero.

Beamformer weights returned as a N-by-M complex-valued
matrix. In this matrix, N represents the number
of sensor elements of the array while M represents
the number of beamforming directions. Each column of wt corresponds
to a beamforming direction specified in ang.

References

[1] Van Trees, H.L. Optimum Array
Processing. New York, NY: Wiley-Interscience, 2002.

[2] Johnson, Don H. and D. Dudgeon. Array Signal
Processing. Englewood Cliffs, NJ: Prentice Hall, 1993.

[3] Van Veen, B.D. and K. M. Buckley. "Beamforming:
A versatile approach to spatial filtering". IEEE
ASSP Magazine, Vol. 5 No. 2 pp. 4–24.