2
votes

I want to do EM (ELECTROMAGNETIC) wave propagation by

  1. find the field Fourier transform in plane z==d , A = fft2(F(x,y,d))
  2. PS(phaseshift) kz = k^2 -(kx^2+ky^2) where kx = 2*pi*1/dx ,ky = 2*pi*1/dy
  3. C = IFFT2(A*EXP(i*PS)

but I dont get the expected result and I think I am confusing the FFT output arrangement and the way I define arrangement of kx and ky

any clue appreciated.

the flow chart is like : 1.Calculate field on z==d

2.Take Fourier 2D transform of the field at z ==d =====> F(Kx,Ky,d) where ,

 kx = 2*pi*fx , fx = 1/dx
 ky = 2*pi*fy , fy =1/dy
 kz = k^2 – (kx^2+ky^2)

3.Take inverse fourier transfom of (F(Kx,Ky,d)*exp(i*kz*(Z-d))) @ Z == d1 when d1 >d to find the total field in z == d1 This happens for z = d1,d1,…..,dn

However I am confused about the frequency arrangement for output of fft and the way I am defining the spacial frequency (kx and Ky) are consistent.

2
isn't wave propogation best visualized in the time-domain?Fredrik

2 Answers

1
votes

It appears you are propagating the wave by Fraunhofer approximation? While I'm not sure what your output looks like, the FFT often 'splits' the desired signal such that half of it is on the right of the window and half of it is on the left.

Try using :

fftshift(fft(yourstuff));

Be sure to read the fftshift help entry in MATLAB.

If the amplitude is a problem, remember to normalize the FFT correctly (divide by largest valued bin).

0
votes

Did you check if you used the i variable before (in a for loop for instance?) sometimes it gets overwritten... (in the case you either use j or plain sqrt(-1))