diff --git a/examples/xspice/transmission_lines/cpline_ac.cir b/examples/xspice/transmission_lines/cpline_ac.cir new file mode 100644 index 000000000..f1ca315a3 --- /dev/null +++ b/examples/xspice/transmission_lines/cpline_ac.cir @@ -0,0 +1,18 @@ +* Coupled lines SP + +V1 p1 0 dc 0 ac 1 portnum 1 z0 50 +V2 p2 0 dc 0 ac 1 portnum 2 z0 50 +V3 p3 0 dc 0 ac 1 portnum 3 z0 50 +V4 p4 0 dc 0 ac 1 portnum 4 z0 50 + +A1 %hd(p1 0) %hd(p2 0) %hd(p3 0) %hd(p4 0) CPLINE1 +.MODEL CPLINE1 CPLINE(ze=84.48 zo=53.99 l=25e-3 ere=3.34 ero=2.829 ao=0 ae=0) + +.control + +sp lin 100 0.2e9 4.2e9 + +plot abs(s_1_1) abs(s_3_1) abs(s_2_1) abs(s_4_1) +plot abs(s_2_1) + +.endc diff --git a/examples/xspice/transmission_lines/cpline_tran.cir b/examples/xspice/transmission_lines/cpline_tran.cir new file mode 100644 index 000000000..c577354e3 --- /dev/null +++ b/examples/xspice/transmission_lines/cpline_tran.cir @@ -0,0 +1,23 @@ +* Coupled lines SP + +V1 1 0 PULSE(0 1 1n 10p 10p 980p) + +R2 p1 1 0.1 + +R1 p4 0 50.0 +R3 p3 0 50.0 +R4 p2 0 50.0 + +A1 %hd(p1 0) %hd(p2 0) %hd(p3 0) %hd(p4 0) %vd(p1 0) %vd(p2 0) %vd(p3 0) %vd(p4 0) CPLINE1 +.MODEL CPLINE1 CPLINE(ze=100 zo=50 l=100e-3 ere=1 ero=1 ao=0 ae=0) + +.control + +tran 10p 5n + +let v2 = -v(p2) +let v3 = -v(p3) + +plot v(1) v(p2) v(p3) v(p4) + +.endc diff --git a/examples/xspice/transmission_lines/cpmline_ac.cir b/examples/xspice/transmission_lines/cpmline_ac.cir new file mode 100644 index 000000000..035d17984 --- /dev/null +++ b/examples/xspice/transmission_lines/cpmline_ac.cir @@ -0,0 +1,18 @@ +* Coupled lines SP + +V1 p1 0 dc 0 ac 1 portnum 1 z0 50 +V2 p2 0 dc 0 ac 1 portnum 2 z0 50 +V3 p3 0 dc 0 ac 1 portnum 3 z0 50 +V4 p4 0 dc 0 ac 1 portnum 4 z0 50 + +A1 %hd(p1 0) %hd(p2 0) %hd(p3 0) %hd(p4 0) %vd(p1 0) %vd(p2 0) %vd(p3 0) %vd(p4 0) CPMLIN1 +.MODEL CPMLIN1 CPMLIN(w=1e-3 l=20e-3 s=0.3e-3 er=9.8 h=1e-3 t=35e-6 tand=1e-3 rho=0.022e-6 d1=0.15e-6 model=0 disp=0) + +.control + +sp lin 100 0.2e9 4.2e9 + +plot abs(s_1_1) abs(s_3_1) abs(s_2_1) abs(s_4_1) +plot abs(s_3_1) + +.endc diff --git a/examples/xspice/transmission_lines/mlin.cir b/examples/xspice/transmission_lines/mlin.cir new file mode 100644 index 000000000..e57fa5055 --- /dev/null +++ b/examples/xspice/transmission_lines/mlin.cir @@ -0,0 +1,22 @@ +* MLIN test + +V1 1 0 AC 1 DC 1 +R1 in 1 50.0 +R2 out 0 1000.1 +A1 %hd(in 0) %hd(out 0) %vd(in 0) %vd(out 0) MLIN1 +.MODEL MLIN1 MLIN(w=1e-3 l=10e-3 er=9.8 h=1e-3 t=35e-6 tand=1e-3 rho=0.022e-6 d=0.15e-6 model=0 disp=0) + +.control + +op +print all + +ac LIN 200 1e9 12e9 + +let z = v(in)/-i(v1) +let y = imag(z) +let r = real(z) +plot abs(z) ylog +plot y r + +.endc diff --git a/examples/xspice/transmission_lines/mlin_tran.cir b/examples/xspice/transmission_lines/mlin_tran.cir new file mode 100644 index 000000000..8db27d820 --- /dev/null +++ b/examples/xspice/transmission_lines/mlin_tran.cir @@ -0,0 +1,25 @@ +* MLIN test + +V1 1 4 PULSE(0 1 1n 10p 10p 980p) +V3 4 0 DC 1 +R1 out 2 20.0 +V2 2 0 0 +R2 in 1 1m +*R3 in ins 1e12 +*R4 out outs 1e12 +A1 %hd(in 0) %hd(out 0) %vd(in 0) %vd(out 0) MLIN1 +.MODEL MLIN1 MLIN(w=1e-3 l=50e-3 er=9.8 h=1e-3 t=35e-6 tand=1e-3 rho=0.022e-6 d1=0.15e-6 model=0 disp=0 tranmodel=1) +*A1 %hd(in 0) %hd(out 0) %vd(in 0) %vd(out 0) TLIN1 +*.MODEL TLIN1 TLINE(l=100e-3 z=50.0 a=0.0) + +.control + +*op +*print all + +tran 10p 5n + +plot v(in) v(out) +plot -i(v1) i(V2) + +.endc