├── object.mat ├── objectguess.mat ├── Escattmeasured.mat ├── Readme.txt ├── inverse.m └── solver.m /object.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romeoyankee/Microwave-Imaging/HEAD/object.mat -------------------------------------------------------------------------------- /objectguess.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romeoyankee/Microwave-Imaging/HEAD/objectguess.mat -------------------------------------------------------------------------------- /Escattmeasured.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romeoyankee/Microwave-Imaging/HEAD/Escattmeasured.mat -------------------------------------------------------------------------------- /Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | 1. Read the below IEEE paper thoroughly to gain understanding of the concept and the code. Fig 5 is implemented in the attached code. 3 | 4 | N. Joachimowicz, C. Pichot and J. P. Hugonin, "Inverse scattering: an iterative numerical method for electromagnetic imaging," in IEEE Transactions on Antennas and Propagation, vol. 39, no. 12, pp. 1742-1753, Dec. 1991. 5 | 6 | 7 | 2. Load all the files( Escattmeasured.mat, inverse.m, object.mat, objectguess.mat) in a folder. 8 | 9 | 3. In the command window type: 10 | load objectguess.mat 11 | Reconstructed= objectguess; 12 | 13 | 4. Run the inverse.m code 14 | 15 | 5. check the results. 16 | 17 | Tips: 18 | 19 | a) You can change the number of iterations in inverse.m code and check the convergence or reconstruction results 20 | 21 | b) Change the value of ''beta'' ( regualrization constant) to see its effect on convergence. 22 | 23 | 24 | -------------------------------------------------------------------------------- /inverse.m: -------------------------------------------------------------------------------- 1 | 2 | %% difference between the measured and calculated scattered field 3 | for i= 1:10 4 | [Escattcal,Z,I,s,C,ETotal,M,N,x,y] = solver(Reconstructed); 5 | load('Escattmeasured'); 6 | 7 | delta_Es = Escattmeasured-Escattcal ; 8 | 9 | %% Least square sense 10 | 11 | Q=norm(delta_Es).^2; 12 | 13 | 14 | %% Calculating the Jacobian Matrix 'D' for each Transmitter 15 | n=8; 16 | data= cell(n,1); 17 | 18 | for m= 1:8 19 | data{m}=-Z*inv(I+s*C)*diag(ETotal(:,m)); 20 | end 21 | 22 | D = cellfun(@(col) vertcat(col{:}), num2cell(data, 1), 'UniformOutput', false); % CONCATENATE THE CELL ARRAY OF 'DATA' TO GET THE MATRIX 'D' 23 | fnm = sprintf('Data%d.mat'); 24 | save(fnm,'D'); 25 | 26 | load('Data.mat') 27 | 28 | %% calculating the change in Epsr :The G matrix from LM method with Tikhonov Regularization 29 | beta=0.01; 30 | alpha =beta*(trace(ctranspose(D{1})*D{1})/(M*N))*(norm(delta_Es).^2)/(norm(Escattmeasured).^2); 31 | 32 | G = inv(ctranspose(D{1})*D{1}+alpha*eye(N*N))*ctranspose(D{1}); 33 | 34 | 35 | %% Change in contrast 36 | 37 | delta_Er= G*delta_Es(:); 38 | 39 | 40 | %% new epsr 41 | water = 76+14.4i; 42 | Er_new = reshape((diag(s)+delta_Er)+ water,[M,N]) ; 43 | 44 | 45 | 46 | %% prior information 47 | 48 | % object boundary 49 | Er_new(1,1:4)= water; Er_new(1,8:11)= water; 50 | Er_new(2,1:2)= water; Er_new(2,10:11)= water; 51 | Er_new(3,1)= water; Er_new(3,11)= water; 52 | Er_new(4,1)= water; Er_new(4,11)= water; 53 | Er_new(8,1)= water; Er_new(8,11)= water; 54 | Er_new(9,1)= water; Er_new(9,11)= water; 55 | Er_new(10,1:2)= water; Er_new(10,10:11)= water; 56 | Er_new(11,1:4)= water; Er_new(11,8:11)= water; 57 | 58 | % permittivity levels 59 | 60 | 61 | %% image reconstruction 62 | 63 | Reconstructed= Er_new; 64 | 65 | %% Error 66 | error = sqrt(norm(Q).^2/norm(Escattmeasured).^2)*100 67 | 68 | % errorpermittivity=(norm(object-Reconstructed))/(norm(object)); 69 | cnd = cond(ctranspose(D{1})*D{1}); 70 | figure() 71 | subplot(1,2,1), imagesc(x,y,real(Reconstructed)),colorbar,xlabel('12 cm'),ylabel('12cm'),title('Reconstructed - Real part of permittivity') 72 | title(['Estimated $Re(\epsilon)$ with Q=',num2str(Q)],'interpreter', 'latex', 'fontsize', 14) 73 | 74 | subplot(1,2,2),imagesc(x,y,imag(Reconstructed)),colorbar,xlabel('12 cm'),ylabel('12cm'),title('Reconstructed - imaginary part of permittivity') 75 | title(['Estimated $Imag(\epsilon)$ with Q=',num2str(Q)],'interpreter', 'latex', 'fontsize', 14) 76 | end -------------------------------------------------------------------------------- /solver.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | function [Escattcal,Z,I,s,C,ETotal,M,N,x,y] = solver(Reconstructed) 4 | 5 | %% implementation of method of Moment 6 | 7 | f=3e9; % Frequency of wave (in meters) 8 | c=3e8; % speed of light (in meters) 9 | lam=c/f*100; % wavelength - remember to multiply it by 100 to convert the units in CM 10 | k=2*pi/lam; %propagation constant 11 | kext=2*pi/(lam/sqrt(76)); 12 | 13 | 14 | 15 | 16 | % defination of the geometry 17 | 18 | L1=12; % length of the square (in centimeters) 19 | L2=12; % height of the square (in centimeters) 20 | 21 | M=11; % no. of division of square(N=M) 22 | 23 | N=11; 24 | 25 | x=linspace(-6,6,M+1); 26 | 27 | y=linspace(-6,6,N+1); 28 | 29 | % finding the center point of the cell. 30 | 31 | for i = 1:M 32 | x_mid(i)=(x(i+1)+x(i))/2; 33 | end 34 | 35 | for i = 1:N 36 | y_mid(i)=(y(i+1)+y(i))/2; 37 | end 38 | 39 | % making the center points for the grid (square geometry) 40 | 41 | xcc1=repmat(x_mid,[1,M]); 42 | 43 | ycc1=repmat(y_mid,[N,1]); 44 | 45 | ycc1=ycc1(:)'; 46 | 47 | water = 76+14.4i; 48 | 49 | % Integral Equation formulation 50 | Er =Reconstructed(:) ; % permittivity of the object 51 | s = diag(Er-water) ; % constrast in relation to the background(Air) 52 | a=sqrt((L1*L2/(M*N))/pi); % radius of the equivalent circular cell 53 | 54 | theta=0:45:315 ; % position of the 8 Transmitters for sending plane waves 55 | 56 | for m = 1:length(theta) 57 | 58 | 59 | for i = 1:M*N 60 | 61 | Ei(i)=exp(1j*kext*(xcc1(i)*cosd(theta(m))+ycc1(i)*sind(theta(m)))); 62 | 63 | end 64 | Einc(:,m)= Ei(:); 65 | 66 | %% Distance between the center of the cells : pmn 67 | 68 | for i = 1:length(xcc1) 69 | for j = 1:length(ycc1) 70 | 71 | rho_mn(i,j) = sqrt((xcc1(i)-xcc1(j)).^2 +(ycc1(i)-ycc1(j)).^2); 72 | 73 | end 74 | end 75 | 76 | %% calculation of the coefficient matrix C(m,n) 77 | C= zeros(M*N,M*N); 78 | I = eye(M*N); 79 | for ii = 1:length(xcc1) 80 | for jj= 1:length(ycc1) 81 | 82 | if ii==jj 83 | C(ii,jj)=(1j/2)*(pi*kext*a*besselh(1,2,kext*a)-2*1j); 84 | else 85 | C(ii,jj)=(1i*pi*kext*a/2)*besselj(1,k*a)*besselh(0,2,kext.*rho_mn(ii,jj)); 86 | 87 | end 88 | end 89 | end 90 | 91 | % cond(C) 92 | 93 | 94 | % The total field inside the cells 95 | 96 | ETotal(:,m) = inv(I+C*s)*Einc(:,m) ; 97 | 98 | % calculation of scattered field Es(x,y) 99 | 100 | ang=0:5.6250:354.3750; % Reciever placed on 64 points on on the circle of Radius of 3.5lambda=3.41cm 101 | 102 | R=7; 103 | 104 | X=R*cosd(ang); 105 | Y=R*sind(ang); 106 | 107 | 108 | for kk=1:length(X) 109 | for jj=1:length(xcc1) 110 | Const = 1i*(pi*kext/2)*a*besselj(1,kext*a); 111 | rhon(kk,jj)=sqrt((X(kk)-xcc1(jj)).^2 + (Y(kk)-ycc1(jj)).^2);%distance between reciever points and the object cells 112 | 113 | Z(kk,jj) = Const*besselh(0,2,kext*rhon(kk,jj)); 114 | end 115 | end 116 | 117 | Escattcal(:,m) =- Z*diag(ETotal(:,m))*diag(s); 118 | 119 | end 120 | end 121 | 122 | 123 | --------------------------------------------------------------------------------