######################################################### # mtm_phase_shifter.lsf # # Uses FDTD to calculate the phase shift across a single # negative refractive index (NRI) transmission line metamaterial # unit cell implemented using coplanar waveguide technology # and discrete inductors and capacitors. # Theory and simulation results are compared. # # Copyright 2016 Lumerical Solutions Inc ########################################################## ########################################################## #Extract Port Data From the Sweep T1=getresult("Ports::Port 1 Expansion", "expansion for T1"); T2=getresult("Ports::Port 1 Expansion", "expansion for T2"); neff=getresult("Ports::Port 1 Expansion", "neff");neff=abs(neff.neff(2)); ###################################################### #Calculate scattering parameters S11=T1.b/T1.a; S21=T2.a/T1.a; f=T1.f;omega=2*pi*f; ####################################################### #Derive theory. Find effective permittivitiy from the mode expansion monitor eps_eff=neff^2; beta_TL=omega/(c/sqrt(eps_eff)); C0=12e-12; L0=50e-9; d=8e-3; beta_eff=beta_TL-1/(omega*sqrt(L0*C0)*d); ph_uc=beta_eff*d; ######################################################## #Generate phase plots and display prompt of difference plot(f/1e9,-ph_uc*180/pi);holdon; plot(f/1e9,unwrap(-angle(S21)*180/pi)); setplot("x label", "Frequency (GHz)");setplot("y label", "Phase of S21 (degrees)"); legend("1-stage: Theory", "1-stage: FDTD"); setplot("y min",-4);setplot("y max",4);