Contents
clc
clear all
Scene definition
nbf = 201;
f = linspace(10e9,20e9,nbf);
c = 3e8;
k = 2*pi*f/c;
df = f(2)-f(1);
t = linspace(0,1/df,nbf);
xT = 0;
yT = -0.05;
dxR = c/f(end)/2;
nbR = 51;
xR = (1:nbR)*dxR;
xR = xR - mean(xR);
yR = xR .*0;
xC = 0.1;
yC = 0.4;
SigC = 1;
fig2 = figure(2);clf
hold on
plot(xT,yT,'kv')
plot(xR,yR,'rv')
plot(xC,yC,'bo')
hold off
legend('Transmit antennas','Receive antennas','Target(s)')
grid on
xlabel('x (m)')
ylabel('y (m)')
daspect([1 1 1])
xlim([-0.4 0.4])
ylim([-0.1 1])
fig1 = figure(1);
fig1.Position = [680 542 871 420];
set(fig1,'color','w')
Propagation
S = zeros(nbR,numel(f));
rT = sqrt((xT-xC).^2 + (yT-yC).^2);
rR = sqrt((xR-xC).^2 + (yR-yC).^2);
for mf = 1:numel(f)
S(:,mf) = S(:,mf) + (exp(-1j*k(mf)*rT)./sqrt(rT) .* SigC .* exp(-1j*k(mf)*rR)./sqrt(rR)).';
end
Skx = fftshift(fft(S,[],1),1);
dx = mean(diff(xR));
kx = linspace(-pi/dx,pi/dx,nbR);
[Kx,K] = ndgrid(kx,k);
KyR = sqrt(K.^2 - Kx.^2);
Ky = K + KyR;
y = linspace(0.05,0.75,101);
Skx_y = zeros(numel(kx),numel(y));
for my = 1:numel(y)
Skx_y(:,my) = sum(Skx .* exp(1j*(KyR*y(my)+K*(y(my)-yT))),2);
end
dkx = mean(diff(kx));
x = linspace(-pi/dkx,pi/dkx,numel(kx));
Im = (ifft(Skx_y,[],1));
figure(1), clf()
subplot(2,3,[1 4])
hold on
plot(xT,yT,'kv')
plot(xR,yR,'rv')
plot(xC,yC,'bo')
hold off
legend('Transmit antennas','Receive antennas','Target(s)')
grid on
xlabel('x (m)')
ylabel('y (m)')
daspect([1 1 1])
xlim([-0.4 0.4])
ylim([-0.1 1])
subplot(2,3,[2 5])
scatter(Kx(:)/k(end),real(KyR(:))/k(end),50,abs(Skx(:)),'filled')
title('Magnitude of S(k_x,k_y)')
axis equal tight
xlabel('k_x/k (rad/m)')
ylabel('k_y/k (rad/m)')
subplot(2,3,[3 6])
pcolor(x,y,abs(Im).')
shading flat
hold on
plot(xT,yT,'kv')
plot(xR,yR,'rv')
hold off
title('Reconstructed image')
axis equal tight
xlabel('x (m)')
ylabel('y (m)')
xlim([-0.4 0.4])
ylim([-0.1 1])