diff --git a/examples/templates_ngspice/S-parameter_file_analysis.sch b/examples/templates_ngspice/S-parameter_file_analysis.sch deleted file mode 100644 index a9ed2286..00000000 --- a/examples/templates_ngspice/S-parameter_file_analysis.sch +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - <.SP SP1 1 70 270 0 80 0 0 "lin" 1 "445kHz" 1 "465kHz" 1 "101" 1 "no" 0 "1" 0 "2" 0 "no" 0 "no" 0> - - - - - - <400 180 400 200 "" 0 0 0 ""> - <120 180 120 200 "" 0 0 0 ""> - <250 130 250 140 "" 0 0 0 ""> - <400 100 400 120 "" 0 0 0 ""> - <280 100 400 100 "" 0 0 0 ""> - <120 100 120 120 "" 0 0 0 ""> - <120 100 220 100 "" 0 0 0 ""> - - - - <"ngspice/ac.s21_db" #0000ff 0 3 0 0 0> - <"ngspice/ac.s11_db" #ff0000 0 3 0 0 1> - - - <"ngspice/ac.phase_deg" #0000ff 0 3 0 0 0> - <"ngspice/ac.group_delay" #ff0000 0 3 0 0 1> - - - <"ngspice/ac.s12_db" #0000ff 0 3 0 0 0> - <"ngspice/ac.s22_db" #ff0000 0 3 0 0 1> - - - - - diff --git a/examples/templates_ngspice/S-parameter_passive_analysis.sch b/examples/templates_ngspice/S-parameter_passive_analysis.sch new file mode 100644 index 00000000..0402ca71 --- /dev/null +++ b/examples/templates_ngspice/S-parameter_passive_analysis.sch @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <.SP SP1 1 40 310 0 80 0 0 "lin" 1 "107MHz" 1 "167MHz" 1 "101" 1 "no" 0 "1" 0 "2" 0 "no" 0 "no" 0> + + + + + + + + + + <280 200 280 220 "" 0 0 0 ""> + <280 100 340 100 "" 0 0 0 ""> + <280 100 280 140 "" 0 0 0 ""> + <240 100 280 100 "" 0 0 0 ""> + <400 100 440 100 "" 0 0 0 ""> + <440 100 480 100 "" 0 0 0 ""> + <440 100 440 140 "" 0 0 0 ""> + <480 100 530 100 "" 0 0 0 ""> + <480 100 480 140 "" 0 0 0 ""> + <480 200 480 220 "" 0 0 0 ""> + <440 200 440 220 "" 0 0 0 ""> + <590 100 620 100 "" 0 0 0 ""> + <620 100 620 140 "" 0 0 0 ""> + <620 200 620 220 "" 0 0 0 ""> + <120 200 120 220 "" 0 0 0 ""> + <120 100 120 140 "" 0 0 0 ""> + <120 100 150 100 "" 0 0 0 ""> + <210 100 240 100 "" 0 0 0 ""> + <240 100 240 140 "" 0 0 0 ""> + <240 200 240 220 "" 0 0 0 ""> + + + + <"ngspice/ac.s21_db" #0000ff 0 3 0 0 0> + <"ngspice/ac.s11_db" #ff0000 0 3 0 0 1> + + + <"ngspice/ac.group_delay" #0000ff 0 3 0 0 0> + <"ngspice/ac.phase_deg" #ff0000 0 3 0 0 1> + + + <"ngspice/ac.gd" #0000ff 0 3 0 0 0> + <"ngspice/ac.phase_deg" #ff0000 0 3 0 0 1> + + + + + diff --git a/examples/templates_ngspice/genericopa.cir b/examples/templates_ngspice/genericopa.cir new file mode 100644 index 00000000..b541eddb --- /dev/null +++ b/examples/templates_ngspice/genericopa.cir @@ -0,0 +1,16 @@ +* generic OpAmp model +* gain, phase, offset, limits to power supply, input and output resistance +.subckt genopa in+ in- vcc vee out POLE=20 GAIN=20k VOFFSET=5m ROUT=10 RIN=10Meg +Rin in+ in+ {RIN} +Voff in+ inoff dc {VOFFSET} +G10 0 int inoff in- 100u +R1 int 0 {GAIN/100u} +C1 int 0 {1/(6.28*(GAIN/100u)*POLE)} +Eout 2 0 int 0 1 +Rout 2 out {ROUT} +Elow 3 0 vee 0 1 +Ehigh 8 0 vcc 0 1 +Dlow 3 int Dlimit +Dhigh int 8 Dlimit +.model Dlimit D N=0.01 +.ends genopa