MATLAB Examples

Example 11.5.2.a - Effect of the Training Samples on the Sidelobes of the SMI Beamformer.

We want to explore the effect of the number of training samples on the sidelobe levels of the SMI adaptive beamformer. To this end, we generate an interference signal at $\phi_i = 10^{\circ}$ with a power of 70 dB and noise with unit variance for a ULA with M = 40 elements.

Contents

Workspace Initialization.

clc; clear; close all;

Signal Definitions.

M   = 40;         % Number of Array Elements.
K1 = M;           % Number of Signal Snapshots.
K2 = 2*M;       % Number of Signal Snapshots.
K3 = 5*M;       % Number of Signal Snapshots.
K4 = 10*M;     % Number of Signal Snapshots.

lambda = 1;    % Incoming Signal Wavelength in (m).
d = lambda/2; % Interelement Distance in (m).
SNR   = 20;     % target SNR in dBs.
phi_s = 0;        % target azimuth angle in degrees.
phi_i = 10;       % interference angle in degrees.
INR   = 70;       % Interference #1 INR in dBs.

u_s = (d/lambda)*sin(phi_s*pi/180);  % Normalized Spatial Frequency Vector.
u_i  = (d/lambda)*sin(phi_i*pi/180);  % Normalized Spatial Frequency Vector for Sources of Interference.

v_s = exp(-1i*2*pi*u_s*(0:M-1).')/sqrt(M); % Target Steering Vector.
v_i  = exp(-1i*2*pi*u_i*(0:M-1).')/sqrt(M);    % Interference Steering Vector.

% Run the experiment for 100 times (Monte-Carlo runs) and average over the
% results to get the correct curves of Fig. 11.23.
csmi1 = zeros(M,1); csmi2 = zeros(M,1); csmi3 = zeros(M,1); csmi4 = zeros(M,1);

Monte-Carlo Runs.

Run the experiment many times and and average over the calculated SMI Beamformers.

for k=1:100

    % The uncorrelated unit power thermal noise samples with a Gaussian distribution are generated by
    w1 = (randn(M,K1) + 1i*randn(M,K1))/sqrt(2);
    w2 = (randn(M,K2) + 1i*randn(M,K2))/sqrt(2);
    w3 = (randn(M,K3) + 1i*randn(M,K3))/sqrt(2);
    w4 = (randn(M,K4) + 1i*randn(M,K4))/sqrt(2);

    % The interference (jammer) vector are generated by:
    i_x1 = (10^(INR/20))*v_i*(randn(1,K1) + 1i*randn(1,K1))/sqrt(2);
    i_x2 = (10^(INR/20))*v_i*(randn(1,K2) + 1i*randn(1,K2))/sqrt(2);
    i_x3 = (10^(INR/20))*v_i*(randn(1,K3) + 1i*randn(1,K3))/sqrt(2);
    i_x4 = (10^(INR/20))*v_i*(randn(1,K4) + 1i*randn(1,K4))/sqrt(2);

    % The interference-plus-noise signal x_i+n is generated by:
    iplusn1 = i_x1 + w1;
    iplusn2 = i_x2 + w2;
    iplusn3 = i_x3 + w3;
    iplusn4 = i_x4 + w4;

    R1 = 1/K1*(iplusn1*iplusn1');
    R2 = 1/K2*(iplusn2*iplusn2');
    R3 = 1/K3*(iplusn3*iplusn3');
    R4 = 1/K4*(iplusn4*iplusn4');

    InvR1 = inv(R1);
    InvR2 = inv(R2);
    InvR3 = inv(R3);
    InvR4 = inv(R4);

    % Calculation of the true i+n autocorrelation matrix.
    R_ipn = 10^(INR/10)*(v_i*v_i') + eye(M);
    InvR = inv(R_ipn);

    %#ok<*MINV> %
    c_opt  = InvR*v_s/(v_s'*InvR*v_s);  %  Optimum Beamformer computed for a phi_s = 0 deg.

    csmi1 = csmi1 + InvR1*v_s/(v_s'*InvR1*v_s);  % SMI Beamformer computed for phi_s = 0 deg & K1 = 100 snapshots.
    csmi2 = csmi2 + InvR2*v_s/(v_s'*InvR2*v_s);  % SMI Beamformer computed for phi_s = 0 deg & K2 = 1000 snapshots.
    csmi3 = csmi3 + InvR3*v_s/(v_s'*InvR3*v_s);  % SMI Beamformer computed for phi_s = 0 deg & K3 = 5000 snapshots.
    csmi4 = csmi4 + InvR4*v_s/(v_s'*InvR4*v_s);  % SMI Beamformer computed for phi_s = 0 deg & K4 = 10000 snapshots.

end

% Average out the calculated SMI Beamformers:
c_smi1 = 1/100*csmi1;
c_smi2 = 1/100*csmi2;
c_smi3 = 1/100*csmi3;
c_smi4 = 1/100*csmi4;

Calculate the Corresponding Beampatterns.

Nsamples = 1e3;
angle = -10:100/Nsamples:90-60/Nsamples;
Opt_Beam_Pat  = zeros(Nsamples,1);
SMI_Beam_Pat1 = zeros(Nsamples,1);
SMI_Beam_Pat2 = zeros(Nsamples,1);
SMI_Beam_Pat3 = zeros(Nsamples,1);
SMI_Beam_Pat4 = zeros(Nsamples,1);

for k=1:Nsamples
     u = (d/lambda)*sin(angle(k)*pi/180);
     v = exp(-1i*2*pi*u*(0:M-1).')/sqrt(M);
     Opt_Beam_Pat(k)   = c_opt'*v;
     SMI_Beam_Pat1(k) = c_smi1'*v;
     SMI_Beam_Pat2(k) = c_smi2'*v;
     SMI_Beam_Pat3(k) = c_smi3'*v;
     SMI_Beam_Pat4(k) = c_smi4'*v;
end

Plot the corresponding Beampatterns.

figure('Position',[150 100 900 600]);
subplot(2,2,1);
plot(angle,10*log10(abs(Opt_Beam_Pat).^2),angle,10*log10(abs(SMI_Beam_Pat1).^2),'r', 'LineWidth',1.5);
title('K = M');
xlim([-10 90]);
ylim([-50 5]);
grid on;
xlabel('Angle (deg)');
ylabel('Power (dB)');

subplot(2,2,2);
plot(angle,10*log10(abs(Opt_Beam_Pat).^2),angle,10*log10(abs(SMI_Beam_Pat2).^2),'r', 'LineWidth',1.5)
title('K = 2M');
xlim([-10 90]);
ylim([-50 5]);
grid on;
xlabel('Angle (deg)');
ylabel('Power (dB)');

subplot(2,2,3);
plot(angle,10*log10(abs(Opt_Beam_Pat).^2),angle,10*log10(abs(SMI_Beam_Pat3).^2),'r', 'LineWidth',1.5)
title('K = 5M');
xlim([-10 90]);
ylim([-50 5]);
grid on;
xlabel('Angle (deg)');
ylabel('Power (dB)');

subplot(2,2,4);
plot(angle,10*log10(abs(Opt_Beam_Pat).^2),angle,10*log10(abs(SMI_Beam_Pat4).^2),'r', 'LineWidth',1.5);
title('K = 10M');
xlim([-10 90]);
ylim([-50 5]);
grid on;
xlabel('Angle (deg)');
ylabel('Power (dB)');