# Figure 37. Composite pattern for Doppler bin 5.

## Contents

```clc; clear; close all;
```

```radar_oper_params;
```

## Thermal Noise Power Computation

```thermal_noise_power;
```

## Clutter Patch RCS Computation

```clutter_patch_rcs;
```

## Calculate the Array Transmit and Element Receive Power Gains

```Tx_Rx_power_gains;
```

## Calculate the Clutter to Noise Ratio (CNR) for each azimuth angle

```ksi = Pt*Gtgain.*Grec*lambda^2*sigma/((4*pi)^3*Pn*10^(Ls/10)*Rcik^4);   % Eq. (58)
Ksic = sigma2*diag(ksi);
```

## Clutter Covariance Matrix Computations

```K = 2;
beta = 1;   % beta parameter.
phia = 0;   % Velocity Misalignment Angle.
Ita = d/lambda*cos(theta);

% Calculate Spatial and Doppler Frequencies for k-th clutter patch.
% Spatial frequency of the k-th clutter patch:
fsp = Ita*sin(phi*pi/180);
% Normalized Doppler Frequency of the k-th clutter patch:
omegac = beta*Ita*sin(phi*pi/180 + phia*pi/180);

% Clutter Steering Vector Pre-allocation for sub-CPI of size K:
a = zeros(N,Nc);
b = zeros(K,Nc);
Vc = zeros(K*N,Nc);

for k=1:Nc
a(:,k) = exp(1i*2*pi*fsp(k)*(0:N-1));       % Spatial Steering Vector.
b(:,k) = exp(1i*2*pi*omegac(k)*(0:K-1));    % Temporal Steering Vector
Vc(:,k) = kron(b(:,k),a(:,k));              % Space-Time Steering Vector.
end

Rcsub = Vc*Ksic*Vc';
Rnsub = sigma2*eye(K*N);
```

## Jammer Covariance Matrix Calculation

```jamm_cov;                                % Eq. (47)
Rjsub = kron(eye(K),Phi_j);
```

## Analytic Interference Covariance Matrix for first sub-CPI

```Rusub = Rcsub + Rjsub + Rnsub;
```

## Target Space-Time Steering Vector

```phit = 0; thetat = 0;                                   % Target azimuth and elevation angles in degrees.
fdt = 100;                                              % Target Doppler Frequency.
fspt = d/lambda*cos(thetat*pi/180)*sin(phit*pi/180);    % Target Spatial Frequency
at = exp(1i*2*pi*fspt*(0:N-1)).';                       % Target Spatial Steering Vector.
ta = chebwin(N,30);                                     % 30 dB Chebychev Spatial Tapper.
bt = [1; -1];                                           % K-pulse Temporal Target Steering Vector
tb = [1;  1];                                           % (K x 1) Binomial Taper for K = 2.

gt = kron(tb.*bt,ta.*at);                               % sub-CPI desired response.
```

## Tapered, Element-Space STAP Solution

```wsub = Rusub\gt;
```

## W matrix construction. Equation (180)

```M1 = M - K + 1;                                         % Number of sub-CPI's.
W = zeros(M*N,M1);

% Assume that weight vectors for each sub-CPI are equal.
for k=1:M1
W((k-1)*N+1:(k+1)*N,k) = wsub;
end

td =  chebwin(M1,40);                                   % 40 dB Chebychev Doppler Taper.
fd5 = 93.75;                                            % Center Frequency of Doppler Bin no. 5.
omegad5 = fd5/fr;                                       % Normalized Center Frequency of Doppler Bin no. 5.

fm = td.*um;
wm = W*fm;                                              % Eq. (184). m-th Doppler bin composite weight vector.
```

```phi = -90:.5:90; Lphi = length(phi);
fd = -150:.5:150;   Lfd = length(fd);
fsp = d/lambda*cos(theta*pi/180)*sin(phi*pi/180);
omega = fd/fr;
Pw1 = zeros(Lfd,Lphi);
Pw2 = zeros(Lfd,Lphi);
for m=1:Lphi
for n=1:Lfd
a = exp(1i*2*pi*fsp(m)*(0:N-1));               % Dummy Spatial Steering Vector.
b = exp(1i*2*pi*omega(n)*(0:M-1));             % Dummy Doppler Steering Vector
v = kron(b,a).';
Pw2(n,m) = abs(wm'*v)^2;
end
end
```

## Normalisation

```max_value = max(max(Pw2));
Pw = Pw2/max_value;
[rows cols] = find(10*log10(abs(Pw))<-100);
for i=1:length(rows)
Pw(rows(i),cols(i)) = 10^(-100/10);
end
```

## Plot the Adapted Pattern for Doppler Bin #5

```figure('NumberTitle', 'off','Name', 'Figure 37. Composite pattern for Doppler bin 5. (a) Full pattern.', ...
'Position', [1 1 700 600]);
[Az Doppler] = meshgrid(sin(phi*pi/180),fd);
colormap jet;
pcolor(Az, Doppler, 10*log10(abs(Pw)));
xlim([-1 1])
ylim([-150 150]);
xlabel('sin(Azimuth)');
ylabel('Doppler Frequency (Hz)');
h = colorbar;
set(get(h,'YLabel'),'String','Relative Power (dB)');
``` ## Plot the Principal Cuts

```figure('NumberTitle', 'off','Name', ...
'Figure 37. Composite Pattern for Doppler Bin 5. (b) Principal Cuts at Target Azimuth and Doppler', ...
'Position', [1 1 700 600]);
% a. Cut of the Adapted Pattern at Doppler = 100 Hz.
subplot(2,1,1);
plot(sin(phi*pi/180), 10*log10(abs(Pw(fd == 100,:))));
ylim([-100 0.5]); xlim([-1  1]);
ylabel('Relative Power (dB)');
xlabel('sin(Azimuth)');
title('Doppler Frequency = 100 Hz');
grid on;

% b. Cut of the Adapted Pattern at Target Azimuth = 0 degrees.
subplot(2,1,2);
plot(fd, 10*log10(abs(Pw(:,phi == phit))));
ylim([-100 0.5]); xlim([-150 150]);
ylabel('Relative Power (dB)');
xlabel('Target Doppler Frequency (Hz)');
title('Azimuth = 0 deg');
grid on;
``` 