You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
979 B
40 lines
979 B
.temp {envtemp}
|
|
.param envtemp=40
|
|
.option savecurrents
|
|
.control
|
|
set controlswait
|
|
if $?sharedmode
|
|
* script for shared ngspice
|
|
version
|
|
rusage
|
|
else
|
|
* script for standard ngspice
|
|
*option noinit
|
|
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
|
|
plot V1#branch V2#branch ylimit -50 50
|
|
plot V1#branch V2#branch ylimit -10 10
|
|
* output current
|
|
plot @rl1[i]
|
|
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
|
|
end
|
|
.endc
|