Contents
clear all
clc
Scene definition
nbf = 101;
f = linspace(15e9,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;
Propagation
S = zeros(nbR,numel(f));
for mC = 1:numel(xC)
rT = sqrt((xT-xC(mC)).^2 + (yT-yC(mC)).^2);
rR = sqrt((xR-xC(mC)).^2 + (yR-yC(mC)).^2);
for mf = 1:numel(f)
S(:,mf) = S(:,mf) + (exp(-1j*k(mf)*rT)./sqrt(rT) .* SigC(mC) .* exp(-1j*k(mf)*rR)./sqrt(rR)).';
end
end
s = (ifft(ifftshift(S,2),[],2));
Image reconstruction
x = linspace(-0.4,0.4,41);
y = linspace(0.1,1.1,41);
[XR,F,X,Y] = ndgrid(single(xR),single(f),single(x),single(y));
G = exp(-1j*(2*pi*F/c).* ((sqrt((xT-X).^2 + (yT-Y).^2)+(sqrt((XR-X).^2 + (yR(1)-Y).^2)))));
G = reshape(G,[numel(xR)*numel(f),numel(x)*numel(y)]);
Im = G'*S(:);
Im = reshape(Im,[numel(x),numel(y)]);
fig1 = figure(1); clf()
fig1.Position = [680 542 871 420];
subplot(2,4,[1 2 5 6])
hold on
plot(xT,yT,'kv')
plot(xR,yR,'rv')
plot(xC,yC,'bo')
hold off
legend('Transmit antenna','Receive antennas','Target(s)')
grid on
xlabel('x (m)')
ylabel('y (m)')
daspect([1 1 1])
ylim([-0.1 1])
xlim([-0.4 0.4])
subplot(2,4,3)
pcolor(xR,f/1e9,abs(S).')
shading flat
xlabel('x (m)')
ylabel('f (GHz)')
title('Magnitude of S(f)')
subplot(2,4,4)
pcolor(xR,f/1e9,angle(S).')
shading flat
xlabel('x (m)')
ylabel('f (GHz)')
title('Phase of S(f)')
subplot(2,4,7)
pcolor(xR,t*1e9,abs(s).')
shading flat
xlabel('x (m)')
ylabel('t (ns)')
title('Magnitude of s(t)')
subplot(2,4,8)
pcolor(x,y,abs(Im).')
shading flat
xlabel('x (m)')
ylabel('y (m)')
title('Reconstructed image')