I did delay and sum beamforming technique and MVDR beamforming technique in MATLAB in time domain, but I could not make a comparison between the beam patterns as both showed same beam width. But when I did it in frequency domain, I could differentiate both the techniques as MVDR beamformer showed better resolution( low beam width) compared to delay and sum bemaformer. I used 10 array elements, with input signal sine added with noise and the steering angle is 20 degrees. Is there something wrong with my MVDR code? Please help.

clear all;
close all;

%% Time specifications:
   Fs = 25e4;                   % samples per second
   dt = 1/Fs;                   % seconds per sample
   StopTime = 1e-3;  %0.952e-3;           % seconds
   t = (0:dt:StopTime-dt)';     % seconds

   %% Sine wave:
   Fc = 8e3;                     % hertz
   signal = sin(2*pi*Fc*t);
N = 10;
d = 0.5;
plotangl = -90:90;
tm = plotangl * pi/180;
elementPos = (0:N-1)*d;


vv = exp (1j *2*pi*d* (0: N-1)'* (sin (tm)));%10x181 
figure(2);subplot(2,1,1);polar (plotangl*pi/180, B3);title('polar plot of mvdr ');

B = 10*log10(B3);
grid on
xlabel(' Angle (degrees)');
ylabel('Normalized Beam Power[dB]');
legend('20 deg');
title('mvdr Array Pattern, 10 array elements');

2 Answers 2


Well there a few things. You didn't post your other result so no one can logically comment, comment on why one result doesn't agree with the other, without the other.

It is also usually more convenient to work in $u_x=sin(\theta)$ instead of $\theta$ because the pattern is uniform for all steer directions in $u_x$, while beamwidth is a function of $\theta$ in $\theta$ coordinates, but this is a personal preference.

I also suggest you get a copy of:

Van Trees, Harry L. Optimum array processing: Part IV of detection, estimation, and modulation theory. John Wiley & Sons, 2004.

(he lists me in the acknowledgments but I don't get a kick back ;( )

and you can download example code from


as an example, it includes this.

% Figure 2.23
% Beam pattern for 10-element uniform array (d=lambda/2)
% scanned to 30 degrees (60 degrees from broadside)
% Xin Zhang 1/20/99
% Last updated by K. Bell 6/25/01
% Functions called: polardb

clear all
close all

N = 10;
n = (-(N-1)/2:(N-1)/2).';
theta = pi*(-1:0.001:1);
u = cos(theta);
d = 1/2;
vv = exp(j*2*pi*d*n*u);
theta_T = 30/180*pi;
w = 1/N*ones(N,1).*exp(j*n*pi*cos(theta_T));
B = w'*vv;
B = 10*log10(abs(B).^2);
hold off

While not a big deal, you actually are using MPDR (see Van Trees) not MVDR when you include the desired signal in the covariance matrix. It only matters if you don't exactly steer in that direction. To be honest, most of the literature doesn't make the distinction but the terms optimal and adaptive have been muddled for decades.

As the @Hkxs points out, you are using both time and frequency domain features to your code. MVDR is a narrowband beamformer usually taken at the same temporal DFT bin from each sensor. The temporal signal is not necessary to calculate the beam pattern and if you want to retain that feature, to steer by phase multiplication,

 signal = exp(1j*2*pi*Fc*t);

and the noise should be added at the elements.

the pattern should just be


For you example of a single signal steered in it's direction with $\sigma^2 \mathbf{I}$ noise, MVDR should return uniform weights.

It also helps to comment your code.


I think you're mixing time domain and frequency domain, your signal $x$ is in time and you're multiplying it by a complex exponential, generating a complex signal that is not the Fourier transform of $x$, if you want to delay $x$ in order to simulate the angle of arrival of the signal you have to do $x_{m}(n)=x(n-\tau_{m})$ (in the time domain) or $X_{m}(\omega)=e^{-j \tau_{m}}X(\omega) $ being "m" the microphone number.

Also you have to include the wave number in the steering vector $k=\dfrac{2\pi}{\lambda}$.

  • $\begingroup$ I have made changes accordingly but it still gives me same beam width. $\endgroup$ Mar 8, 2018 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.