######################################################### # cross_talk.lsf # # Uses FDTD to calculate the scattering parameters of the # test bench crosstalk example. Compares the simulated and # theoretical NEXT (S31) and FEXT (S41), in which the # effective parameters used in the theory is found using # MODE. The theory follows Ref. Hill, David A., et al. # "Crosstalk between microstrip transmission lines." # IEEE Transactions on electromagnetic compatibilit vol. 4, # pp. 314-321, 1994. # # Copyright 2016 Lumerical Solutions Inc ########################################################## clear; #Theoretical characteristic impedance and effective index of the microstrip # lines even (Zev, eps_ev) and odd (Zodd, eps_odd) mode, and the isolated # microstrip line (eps_eff), and coaxial waveguide (Z0). Zev=39.7;Zodd=37.8;Z0=42;eps_ev=1.406^2;eps_odd=1.364^2;eps_eff=1.37^2; #Values read from cross_talk_z0.lsf for the coarse mesh #Extract Port Data and Generate scattering parameters S11=getresult("::model::FDTD::ports::port 1","S"); f=S11.f;S11=S11.S; S21=getresult("::model::FDTD::ports::port 2","S");S21=S21.S; S31=getresult("::model::FDTD::ports::port 3","S");S31=S31.S; S41=getresult("::model::FDTD::ports::port 4","S");S41=S41.S; omega=2*pi*f; #Calculate theoretical NEXT and FEXT dZ=(Zev-Zodd)/2; gev=1i*omega*eps_ev^0.5/c; godd=1i*omega*eps_odd^0.5/c; g0=1i*omega*eps_eff^0.5/c; dk=(gev-godd)/(2i); l=19.6e-2; S31t=dZ/(2*Z0)*(1-exp(-2*g0*l)*(cos(2*dk*l)+dZ/Z0*sin(2*dk*l))); S41t=-1i*exp(-g0*l)*sin(dk*l); #Plot theory and simulation holdoff;plot(f/1e9,20*log10(abs(S31t)));holdon;plot(f/1e9,20*log10(abs(S31))); setplot("x label","Frequency (GHz)");setplot("y label", "(dB)"); legend("Theory","Simulation");setplot("title","NEXT"); holdoff;plot(f/1e9,20*log10(abs(S41t)));holdon;plot(f/1e9,20*log10(abs(S41))); setplot("x label","Frequency (GHz)");setplot("y label", "(dB)"); legend("Theory","Simulation");setplot("title","FEXT");