MATLAB Examples

# Figure 48.1. Adapted Pattern for PRI-staggered post-Doppler STAP for K=2.

## Contents

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

```radar_oper_params; ```

## Thermal Noise Power Computation

```thermal_noise_power; ```

## Thermal Noise Covariance Matrix

```Rn = sigma2*eye(M*N); ```

## 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) ```

## Clutter Covariance Matrix Computations

```beta = 1; % beta parameter. phia = 0; % Velocity Misalignment Angle. Rc = clutt_cov(ksi,beta); ```

## Jamming Covariance Matrix Calculation

```jamm_cov; ```

## Total Interference Covariance Matrix

```Ru = Rc + Rj + Rn; % Eq. (98) InvRu = inv(Ru); ```

## 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); omegat = fdt/fr; bt = exp(-1i*2*pi*omegat*(0:M-1)).'; % Target Doppler Steering Vector. at = exp(-1i*2*pi*fspt*(0:N-1)).'; % Target Spatial Steering Vector. ta = chebwin(N,30); % 30 dB Chebychev Spatial Tapper. gt = kron(bt,ta.*at); ```

## Doppler Filter Bank Creation:

```dopplerfilterbank = linspace(-150,150,M+1); omegadopplerbank = dopplerfilterbank/fr; ```

## Doppler Filter Matrix Construction for PRI-Staggered Post-Doppler method:

```K = 2; M1= M - K +1; U1 = zeros(M1,M); for m=1:M U1(:,m) = 1/sqrt(M)*exp(-1i*2*pi*omegadopplerbank(m)*(0:M1-1)); % Doppler Filter Steering Vector end td0 = ones(M1,1); td30 = chebwin(M1,30); % 30-dB Chebyshev Doppler Taper. td60 = chebwin(M1,60); % 60-dB Chebyshev Doppler Taper. td90 = chebwin(M1,90); % 90-dB Chebyshev Doppler Taper. F0 = diag(td0)*U1; % Eq. 227. F30 = diag(td30)*U1; F60 = diag(td60)*U1; F90 = diag(td90)*U1; ```

## Create Doppler Filter Bank in Fm Matrix for PRI-Staggered Post-Doppler method

```Fm0 = zeros(M,K,M); Fm30 = zeros(M,K,M); Fm60 = zeros(M,K,M); Fm90 = zeros(M,K,M); for m=1:M Fm0(:,:,m) = toeplitz([F0(:,m); zeros(K-1,1)],[F0(1,m) zeros(1,K-1)]); % Eq. 229. Fm30(:,:,m) = toeplitz([F30(:,m); zeros(K-1,1)],[F30(1,m) zeros(1,K-1)]); Fm60(:,:,m) = toeplitz([F60(:,m); zeros(K-1,1)],[F60(1,m) zeros(1,K-1)]); Fm90(:,:,m) = toeplitz([F90(:,m); zeros(K-1,1)],[F90(1,m) zeros(1,K-1)]); end m = 16; % This is the Target's Doppler Bin. ```

## PRI-Staggered Computations

```f0m = Fm0(:,:,m); f30m = Fm30(:,:,m); f60m = Fm60(:,:,m); f90m = Fm90(:,:,m); R0um = kron(f0m,eye(N))'*Ru*kron(f0m,eye(N)); R30um = kron(f30m,eye(N))'*Ru*kron(f30m,eye(N)); R60um = kron(f60m,eye(N))'*Ru*kron(f60m,eye(N)); R90um = kron(f90m,eye(N))'*Ru*kron(f90m,eye(N)); gt0m = kron(f0m,eye(N))'*gt; gt30m = kron(f30m,eye(N))'*gt; gt60m = kron(f60m,eye(N))'*gt; gt90m = kron(f90m,eye(N))'*gt; w0m = R0um\gt0m; % Calculate K*N X 1 Adaptive Weight for m-th Doppler Bin. w30m = R30um\gt30m; w60m = R60um\gt60m; w90m = R90um\gt90m; w0 = kron(f0m,eye(N))*w0m; w30 = kron(f30m,eye(N))*w30m; w60 = kron(f60m,eye(N))*w60m; w90 = kron(f90m,eye(N))*w90m; ```

```phi = -90:90; Lphi = length(phi); fd = -150:150; Lfd = length(fd); fsp = d/lambda*cos(theta*pi/180)*sin(phi*pi/180); omega = fd/fr; Pw0 = zeros(Lfd,Lphi); Pw30 = zeros(Lfd,Lphi); Pw60 = zeros(Lfd,Lphi); Pw90 = zeros(Lfd,Lphi); for m1=1:Lphi for n=1:Lfd a = exp(-1i*2*pi*fsp(m1)*(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).'; Pw0(n,m1) = abs(w0'*v)^2; Pw30(n,m1) = abs(w30'*v)^2; Pw60(n,m1) = abs(w60'*v)^2; Pw90(n,m1) = abs(w90'*v)^2; end end ```
```max_value0 = max(max(Pw0)); max_value30 = max(max(Pw30)); max_value60 = max(max(Pw60)); max_value90 = max(max(Pw90)); Pw0 = Pw0/max_value0; Pw30 = Pw30/max_value30; Pw60 = Pw60/max_value60; Pw90 = Pw90/max_value90; [rows0 cols0] = find(10*log10(abs(Pw0))<-150); for i=1:length(rows0) Pw0(rows0(i),cols0(i)) = 10^(-150/10); end [rows30 cols30] = find(10*log10(abs(Pw30))<-150); for i=1:length(rows30) Pw30(rows30(i),cols30(i)) = 10^(-150/10); end [rows60 cols60] = find(10*log10(abs(Pw60))<-150); for i=1:length(rows60) Pw60(rows60(i),cols60(i)) = 10^(-150/10); end [rows90 cols90] = find(10*log10(abs(Pw90))<-150); for i=1:length(rows90) Pw90(rows90(i),cols90(i)) = 10^(-150/10); end ```
```figure('NumberTitle', 'off','Name', ... ['Figure 48.1. Adapted Patterns for PRI-Staggered post-Doppler STAP for K= ', ... num2str(K), ' and Doppler bin ', num2str(m)],... 'Position',[1 1 1200 1000]); subplot(2,2,1); [Az Doppler] = meshgrid(sin(phi*pi/180),fd); colormap jet; pcolor(Az, Doppler, 10*log10(abs(Pw0))); shading interp; xlim([-1 1]) ylim([-150 150]); %xlabel('sin(Azimuth)'); ylabel('Doppler Frequency (Hz)'); h = colorbar; % set(get(h,'YLabel'),'String','Relative Power (dB)'); title('Doppler Filters Untapered'); subplot(2,2,2); pcolor(Az, Doppler, 10*log10(abs(Pw30))); shading interp; xlim([-1 1]) ylim([-150 150]); %xlabel('sin(Azimuth)'); % ylabel('Doppler Frequency (Hz)'); title('Chebychev 30 dB Doppler Taper'); h = colorbar; set(get(h,'YLabel'),'String','Relative Power (dB)'); subplot(2,2,3); pcolor(Az, Doppler, 10*log10(abs(Pw60))); shading interp; xlim([-1 1]) ylim([-150 150]); xlabel('sin(Azimuth)'); ylabel('Doppler Frequency (Hz)'); title('Chebychev 60 dB Doppler Taper'); h = colorbar; % set(get(h,'YLabel'),'String','Relative Power (dB)'); subplot(2,2,4); pcolor(Az, Doppler, 10*log10(abs(Pw90))); shading interp; xlim([-1 1]) ylim([-150 150]); xlabel('sin(Azimuth)'); % ylabel('Doppler Frequency (Hz)'); title('Chebychev 90 dB Doppler Taper'); h = colorbar; set(get(h,'YLabel'),'String','Relative Power (dB)'); %tightfig; ```