updates to optran description and example.

This commit is contained in:
Holger Vogt 2020-05-25 16:28:25 +02:00
parent 0426ea8e55
commit b56e81d5fe
3 changed files with 20 additions and 8 deletions

View File

@ -45,5 +45,12 @@ n6 set a ramp time to ramp all indpendent voltage or
current sources until 100% is reached at opramptime.
(not yet implemented)
A method to stop the op transient simulation, when all nodes
have become stable, might be desirable, but has not yet been implemented.
The transient op calculation uses the 'UIC' flag for its startup.
Basically two applications come to mind: You may use this with
constant voltage and current sources and simulate until the
output is stable. A method to automatically stop the op transient
simulation when all nodes have become stable, might be desirable,
but has not yet been implemented.
One also may use the optran for a first transient simulation, maybe
with different step sizes, before the next (tran, ac, pz, noise)
simulation is commencing.

View File

@ -37,7 +37,7 @@ D2b1 Net-_D2a1-Pad2_ -32 DMOD
XP3 Net-_P3-Pad1_ 0 Net-_P3-Pad1_ RPOT value=200 ratio=0.85
XP1 Net-_P1-Pad1_ +32 +32 RPOT value=5k ratio=0.18
XP2 Net-_P2-Pad1_ -32 -32 RPOT value=5k ratio=0.18
V3 in 0 sin(0 2 1k)
V3 in 0 dc 0 ac 1 sin(0 2 1k)
JQ1 Net-_P1-Pad1_ Net-_Q1-Pad2_ Net-_P3-Pad1_ 2SK170
JQ2 Net-_P2-Pad1_ Net-_Q1-Pad2_ Net-_P3-Pad1_ 2SJ74
MQ5 out Net-_Q5-Pad2_ Net-_D1a1-Pad2_ Q5tj Q5tc IRFP240 thermal

View File

@ -8,8 +8,10 @@ if $?sharedmode
version
rusage
else
* script for standard ngspice
*option noinit
*** script for standard ngspice
* Start optran without first iteration,
* without gmin stepping and without src stepping
* optran duration 4s, step size 10 ms
optran 1 0 0 4 1e-2 0
tran 1u 10m
echo
@ -26,15 +28,18 @@ set xbrushwidth=1
* input and output voltages
plot in out
* power supply currents
plot V1#branch V2#branch ylimit -50 50
plot V1#branch V2#branch ylimit -10 10
*plot V1#branch V2#branch ylimit -50 50
plot V1#branch V2#branch ylimit -15 15
* output current
plot @rl1[i]
plot @rl1[i] xlimit 0 5m ylimit -0.3 0.3
*plot @rl1[i] xlimit 0 5m ylimit -0.3 0.3
* resistance of thermistor2 TH1, TH2
let rth1 = (v("net-_d3a1-pad1_") - v("net-_r11-pad1_")) / (@b.xth1.brtherm[i] + 1n)
let rth2 = (v("net-_d1a1-pad2_") - v("net-_r12-pad1_")) / (@b.xth2.brtherm[i] + 1n)
settype impedance rth1 rth2
plot rth1 rth2 ylimit 0 5k
ac dec 10 1 1Meg
plot db(out)
plot cph(out)
end
.endc