2020-05-25 00:12:41 +02:00
|
|
|
.temp {envtemp}
|
|
|
|
|
.param envtemp=40
|
|
|
|
|
.option savecurrents
|
|
|
|
|
.control
|
|
|
|
|
set controlswait
|
|
|
|
|
if $?sharedmode
|
|
|
|
|
* script for shared ngspice
|
|
|
|
|
version
|
|
|
|
|
rusage
|
|
|
|
|
else
|
2020-05-25 16:28:25 +02:00
|
|
|
*** script for standard ngspice
|
|
|
|
|
* Start optran without first iteration,
|
|
|
|
|
* without gmin stepping and without src stepping
|
|
|
|
|
* optran duration 4s, step size 10 ms
|
2020-05-25 00:12:41 +02:00
|
|
|
optran 1 0 0 4 1e-2 0
|
|
|
|
|
tran 1u 10m
|
|
|
|
|
echo
|
|
|
|
|
* output power
|
|
|
|
|
let po = @rl1[i] * v(out)
|
|
|
|
|
meas tran power_rms rms po from=5m to=10m
|
|
|
|
|
echo
|
|
|
|
|
rusage
|
|
|
|
|
* temperature transistor Q6
|
|
|
|
|
set xbrushwidth=4
|
|
|
|
|
settype temperature q6tj q6tc q6hs
|
|
|
|
|
plot q6tj q6tc q6hs ylimit 0 150
|
|
|
|
|
set xbrushwidth=1
|
|
|
|
|
* input and output voltages
|
|
|
|
|
plot in out
|
|
|
|
|
* power supply currents
|
2020-05-25 16:28:25 +02:00
|
|
|
*plot V1#branch V2#branch ylimit -50 50
|
|
|
|
|
plot V1#branch V2#branch ylimit -15 15
|
2020-05-25 00:12:41 +02:00
|
|
|
* output current
|
|
|
|
|
plot @rl1[i]
|
2020-05-25 16:28:25 +02:00
|
|
|
*plot @rl1[i] xlimit 0 5m ylimit -0.3 0.3
|
2020-05-25 00:12:41 +02:00
|
|
|
* 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
|
2020-05-25 16:28:25 +02:00
|
|
|
ac dec 10 1 1Meg
|
|
|
|
|
plot db(out)
|
|
|
|
|
plot cph(out)
|
2020-05-25 00:12:41 +02:00
|
|
|
end
|
|
|
|
|
.endc
|