Beamforming based estimators¶
API references¶
-
doatools.estimation.beamforming.
f_bartlett
(A, R)[source]¶ Computes the spectrum output of the Bartlett beamformer.
\[P_{\mathrm{Bartlett}}(\theta) = \mathbf{a}(\theta)^H \mathbf{R} \mathbf{a}(\theta)\]Parameters: - A – m x k steering matrix of candidate direction-of-arrivals, where m is the number of sensors and k is the number of candidate direction-of-arrivals.
- R – m x m covariance matrix.
-
doatools.estimation.beamforming.
f_mvdr
(A, R)[source]¶ Compute the spectrum output of the Bartlett beamformer.
\[P_{\mathrm{MVDR}}(\theta) = \frac{1}{\mathbf{a}(\theta)^H \mathbf{R}^{-1} \mathbf{a}(\theta)}\]Parameters: - A – m x k steering matrix of candidate direction-of-arrivals, where m is the number of sensors and k is the number of candidate direction-of-arrivals.
- R – m x m covariance matrix.
-
class
doatools.estimation.beamforming.
BartlettBeamformer
(array, wavelength, search_grid, **kwargs)[source]¶ Bases:
doatools.estimation.core.SpectrumBasedEstimatorBase
Creates a Barlett-beamformer based estimator.
This estimator is also named beamscan based estimator.
The spectrum is computed on a predefined-grid using
f_bartlett()
, and the source locations are estimated by identifying the peaks.Parameters: - array (ArrayDesign) – Array design.
- wavelength (float) – Wavelength of the carrier wave.
- search_grid (SearchGrid) – The search grid used to locate the sources.
- **kwargs – Other keyword arguments supported by
SpectrumBasedEstimatorBase
.
References
[1] H. L. Van Trees, Optimum array processing. New York: Wiley, 2002.
-
estimate
(R, k, **kwargs)[source]¶ Estimates the source locations from the given covariance matrix.
Parameters: - R (ndarray) – Covariance matrix input. The size of R must match that of the array design used when creating this estimator.
- k (int) – Expected number of sources.
- return_spectrum (bool) – Set to
True
to also output the spectrum for visualization. Default value ifFalse
. - refine_estimates (bool) – Set to True to enable grid refinement to obtain potentially more accurate estimates.
- refinement_density (int) – Density of the refinement grids. Higher density values lead to denser refinement grids and increased computational complexity. Default value is 10.
- refinement_iters (int) – Number of refinement iterations. More iterations generally lead to better results, at the cost of increased computational complexity. Default value is 3.
Returns: A tuple with the following elements.
- resolved (
bool
): A boolean indicating if the desired number of sources are found. This flag does not guarantee that the estimated source locations are correct. The estimated source locations may be completely wrong! If resolved is False, bothestimates
andspectrum
will beNone
. - estimates (
SourcePlacement
): ASourcePlacement
instance of the same type as the one used in the search grid, represeting the estimated source locations. Will beNone
if resolved isFalse
. - spectrum (
ndarray
): An numpy array of the same shape of the specified search grid, consisting of values evaluated at the grid points. Only present ifreturn_spectrum
isTrue
.
-
class
doatools.estimation.beamforming.
MVDRBeamformer
(array, wavelength, search_grid, **kwargs)[source]¶ Bases:
doatools.estimation.core.SpectrumBasedEstimatorBase
Creates a MVDR-beamformer based estimator.
The spectrum is computed on a predefined-grid using
f_mvdr()
, and the source locations are estimated by identifying the peaks.Parameters: - array (ArrayDesign) – Array design.
- wavelength (float) – Wavelength of the carrier wave.
- search_grid (SearchGrid) – The search grid used to locate the sources.
- **kwargs – Other keyword arguments supported by
SpectrumBasedEstimatorBase
.
References
[1] H. L. Van Trees, Optimum array processing. New York: Wiley, 2002.
-
estimate
(R, k, **kwargs)[source]¶ Estimates the source locations from the given covariance matrix.
Parameters: - R (ndarray) – Covariance matrix input. The size of R must match that of the array design used when creating this estimator.
- k (int) – Expected number of sources.
- return_spectrum (bool) – Set to
True
to also output the spectrum for visualization. Default value ifFalse
. - refine_estimates (bool) – Set to True to enable grid refinement to obtain potentially more accurate estimates.
- refinement_density (int) – Density of the refinement grids. Higher density values lead to denser refinement grids and increased computational complexity. Default value is 10.
- refinement_iters (int) – Number of refinement iterations. More iterations generally lead to better results, at the cost of increased computational complexity. Default value is 3.
Returns: A tuple with the following elements.
- resolved (
bool
): A boolean indicating if the desired number of sources are found. This flag does not guarantee that the estimated source locations are correct. The estimated source locations may be completely wrong! If resolved is False, bothestimates
andspectrum
will beNone
. - estimates (
SourcePlacement
): ASourcePlacement
instance of the same type as the one used in the search grid, represeting the estimated source locations. Will beNone
if resolved isFalse
. - spectrum (
ndarray
): An numpy array of the same shape of the specified search grid, consisting of values evaluated at the grid points. Only present ifreturn_spectrum
isTrue
.