diff options
Diffstat (limited to 'Windows/spice/examples/numparam')
-rw-r--r-- | Windows/spice/examples/numparam/example.cir | 16 | ||||
-rw-r--r-- | Windows/spice/examples/numparam/pin.mod | 33 | ||||
-rw-r--r-- | Windows/spice/examples/numparam/pintest.cir | 32 |
3 files changed, 81 insertions, 0 deletions
diff --git a/Windows/spice/examples/numparam/example.cir b/Windows/spice/examples/numparam/example.cir new file mode 100644 index 00000000..6e13bc06 --- /dev/null +++ b/Windows/spice/examples/numparam/example.cir @@ -0,0 +1,16 @@ +* Param-example +.param amplitude= 1V + +.subckt myfilter in out rval=100k cval=100nF +Ra in p1 {2*rval} +Rb p1 out {2*rval} +C1 p1 0 {2*cval} +Ca in p2 {cval} +Cb p2 out {cval} +R1 p2 0 {rval} +.ends myfilter + +X1 input output myfilter rval=1k cval=1n +V1 input 0 AC {amplitude} + +.end diff --git a/Windows/spice/examples/numparam/pin.mod b/Windows/spice/examples/numparam/pin.mod new file mode 100644 index 00000000..b035cd2f --- /dev/null +++ b/Windows/spice/examples/numparam/pin.mod @@ -0,0 +1,33 @@ +* PIN model +* line 2 +* line 3 +* -- Summary ------------------------------- +* This is a simple spice model of a PIN diode. +* +* -- Description --------------------------- +* It is a three node device; one input node (relative to ground) and two +* output nodes (cathode and anode) +* + +* -- Model ---------------------------------- +.subckt SIMPLE_PIN input cathode anode resp=0.5 + +* Input photocurrent is modled by a voltage +* This generates a current using a linear voltage-controlled current source +Gin dk da input 0 {resp} +Rin input 0 1G +Cin input 0 {resp} + +* The pn-junction that generates this photocurrent in the real device is modelled +* here by a simple diode +Dpn da dk pndiode + +* terminal resistances +Ra anode da 0.001ohm +Rk cathode dk 0.001ohm + +* subsircuit models: +.MODEL pndiode D IS=0.974p RS=0.1 N=1.986196 BV=7.1 IBV=0.1n ++ CJO=99.2p VJ=0.455536 M=0.418717 TT=500n + +.ends diff --git a/Windows/spice/examples/numparam/pintest.cir b/Windows/spice/examples/numparam/pintest.cir new file mode 100644 index 00000000..80702e14 --- /dev/null +++ b/Windows/spice/examples/numparam/pintest.cir @@ -0,0 +1,32 @@ +* Test circuit for pin.mod + +*.include C:\Spice\tests\numparam\pin.mod +.include pin.mod + +* Photodiode supply +Vbias psu 0 10V + +* Light input is modeled by a voltage source that we can vary +Vlight input 0 2mW + +* The pin diode +Xpin input cathode anode SIMPLE_PIN resp=0.7 + +* monitor resistor +Rmon anode 0 1ohm + +* Quench restistor +Rq psu cathode 1k + +*.dc vlight 0 5mW 0.01mW + +.dc vlight 0 10mW 0.01mW + +.control +dc vlight 0 10mW 0.01mW +*write pintest.raw all +plot V(anode) +.endc + +.end + |