# Bartlett Beamformer and MVDR Beamformer in the Browser

Date: 6-24 2017

Tags: direction-of-arrival, javascript, web

With the fast development of web technology, many complex algorithms can run
directly in modern browsers. With some tinkering, it is possible to implement
DOA estimation algorithms in JavaScript and create an interactive page to
illustrate various DOA estimators. However, it turns that this is not an easy
task. The lack of complex number support and complex matrix library makes it
cumbersome to implement most of the existing DOA estimators in JavaScript.
Based on my own JavaScript matrix library (which is still quite basic), I
managed to get the conventional (Bartlett) beamformer and the MVDR (Capon)
beamformer working in the browser. The power spectra formulas for the two
beamformers are given below^{[1]}:

The resulting interactive figure is shown below (it even works on mobile
devices), which is powered by Chart.js.
The underlying array is a uniform linear array with half-wavelength
inter-element spacing. The snapshots are generated according to the
unconditional/stochastic model^{[2]}. They are regenerated when
any of the parameters changes. You can tinker with the sliders to see how the
two pseudo-spectrum response as the parameters change.

0 dB | ||

50 | ||

12 | ||

6 | ||

[-60°, 60°] |