Vary the total charge, repeat simulation in a loop
This commit is contained in:
parent
c0338bc0c0
commit
5182d7e4b2
|
|
@ -0,0 +1,43 @@
|
||||||
|
* Repeat loop, double exponential current pulses
|
||||||
|
|
||||||
|
|
||||||
|
.param tochar = 1e-13 ; tochar dependency on LET not yet defined
|
||||||
|
.csparam tochar = 'tochar'
|
||||||
|
.param talpha = 500p tbeta=20p ; tau in exponent for pulse
|
||||||
|
.param Inull = 'tochar/(talpha-tbeta)'
|
||||||
|
|
||||||
|
R1 n1 0 1e4
|
||||||
|
R2 n2 0 1e4
|
||||||
|
R3 n3 0 1e4
|
||||||
|
R4 n4 0 1e4
|
||||||
|
|
||||||
|
|
||||||
|
**** SEE generator without control input, double exponential current sources
|
||||||
|
aseegen1 NULL [%id(n1 0) %id(n2 0) %id(n3 0) %id(n4 0)] seemod1
|
||||||
|
.model seemod1 seegen (tdelay = 11n tperiod=25n inull='Inull' talpha='talpha' tbeta='tbeta')
|
||||||
|
* alternative syntax, if no current measurement required and reference nodes are GND
|
||||||
|
*aseegen1 NULL [%i(n1) %i(n2) %i(n3) %i(n4)] seemod1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* simulation command:
|
||||||
|
.tran 100ps 120ns
|
||||||
|
|
||||||
|
*.options method=gear
|
||||||
|
|
||||||
|
.control
|
||||||
|
set xbrushwidth=3
|
||||||
|
*run
|
||||||
|
*plot n1 n2+2 n3+4 n4+6
|
||||||
|
let newchar = tochar
|
||||||
|
repeat 10
|
||||||
|
run
|
||||||
|
plot n1 n2+2 n3+4 n4+6
|
||||||
|
let newchar = newchar - 5e-15
|
||||||
|
alterparam tochar = $&newchar
|
||||||
|
reset
|
||||||
|
end
|
||||||
|
rusage
|
||||||
|
.endc
|
||||||
|
|
||||||
|
.end
|
||||||
Loading…
Reference in New Issue