######################################################### # WilkinsonPowerDivider.lsf # # Uses FDTD to calculates the frequency response of # the Wilkinson Power Dividers constructed from microstrip # transmission line technology. Runs an isolation and # transmission simulation to obtain the device's # scattering parameters and electric field profiles # along the microsxtrip traces. # # Copyright 2016 Lumerical Solutions Inc ########################################################## closeall;clear; #Setup simulation for isolation measurement. switchtolayout; select("::model::FDTD::ports");set("source port","port 2"); select("FDTD"); set("y min bc", "PML"); run; #Extract isolation data S12=getresult("::model::FDTD::ports::port 1","S"); S22=getresult("::model::FDTD::ports::port 2","S"); S32=getresult("::model::FDTD::ports::port 3","S"); Efield_S2=getresult("XYPlaneFreq","E"); #For visualizing electric fields at different frequencies ii=find(Efield_S2.f,1e9); Efieldf0_S2=pinch(getelectric("XYPlaneFreq"),4,ii); xplotS2=Efield_S2.x;yplotS2=Efield_S2.y; #Setup simulation for transmission measurement switchtolayout; select("::model::FDTD::ports");set("source port","port 1"); select("FDTD"); set("y min bc", "Symmetric"); run; #Extract transmission data S11=getresult("::model::FDTD::ports::port 1","S"); S31=getresult("::model::FDTD::ports::port 3","S"); Efield_S1=getresult("XYPlaneFreq","E"); ii=find(Efield_S1.f,1e9); Efieldf0_S1=pinch(getelectric("XYPlaneFreq"),4,ii); xplotS1=Efield_S1.x;yplotS1=Efield_S1.y; #Calculate magnitude of scattering parameters f=S12.f;S11=S11.S;S31=S31.S;S22=S22.S;S32=S32.S;S12=S12.S; #Plot scattering paramaters plot(f*1e-9,20*log10(abs(S11))); holdon; plot(f*1e-9,20*log10(abs(S22))); plot(f*1e-9,20*log10(abs(S31))); plot(f*1e-9,20*log10(abs(S32))); setplot("y min",-45);setplot("y max",0); setplot("x label","Freq (GHz)"); setplot("y label", "(dB)"); setplot("x min", 0.5);setplot("x max", 1.5); legend("S11","S22","S31","S32"); #Plot electric field for transmission. image(xplotS1,yplotS1,log10(Efieldf0_S1)); setplot("title","Transmission f=1GHz"); setplot("colorbar min", -5); setplot("colorbar max", 1); #Plot electric field for isolation. image(xplotS2,yplotS2,log10(Efieldf0_S2)); setplot("title","Isolation f=1GHz"); setplot("colorbar min", -5); setplot("colorbar max", 1);