Commit Graph

7520 Commits

Author SHA1 Message Date
Holger Vogt 1b17c5cc59 VDMOS, prepare SOA with new parameters
Model parameters pd_max, id_max, idr_max, and te_max
(power dissipated, drain current, drain reverse current, temperature)
2021-08-24 17:52:33 +02:00
Holger Vogt 6cfe98ce43 Update to the optran circuit examples:
TLV9002-test.cir: Rely on optran from spinit
TLV6001-test.cir: Override optran from spinit
2021-08-24 17:50:18 +02:00
Holger Vogt 5758d58349 spinit: add optran to the standard inits 2021-08-24 17:48:17 +02:00
Holger Vogt 2936b11764 Add MOS model cards 2021-08-24 16:16:07 +02:00
Holger Vogt c8d76014b9 SOA for bipolar
Replace pow_max by pd_max
2021-08-24 16:15:46 +02:00
Holger Vogt 10b2f96ed1 Enable command 'optran' in spinit or .spiceinit,
when the circuit is not yet loaded.
Then the optran data are stored in static variables,
until optran is called again with arg NULL from inp.c,
to set the data in ft_curckt->ci_defTask.
2021-08-24 15:53:31 +02:00
Holger Vogt 0f46f9b228 List definition needs spaces between ( and next token,
and between token and )

Update to comment.
2021-08-24 15:51:09 +02:00
Holger Vogt b43b4023eb Add short description of the new examples 2021-08-20 20:28:10 +02:00
Holger Vogt 3c3c039515 Linux line endings (LF only) 2021-08-20 20:24:55 +02:00
Holger Vogt 152be62ae3 Example OpAmp which converge for op only with optran:
TLV6001 and TLV9002
2021-08-20 20:22:12 +02:00
Holger Vogt 15dc796656 remove old files 2021-08-20 20:19:03 +02:00
Holger Vogt 4ff37a9fb1 Example file with three dual opamp filters.
Different opamps: TL072, OPA1656, OPA1612
2021-08-20 20:18:41 +02:00
Holger Vogt c83f441bb2 Three OpAmp Example for optran 2021-08-20 20:04:54 +02:00
Holger Vogt 1368fba469 line endings LF (Linux) 2021-08-20 20:03:58 +02:00
Holger Vogt a3973c7fe0 optran is only selected when the 'optran' command has been processed.
If not, the call to the OPtran() function returns the previous
'converged' value.
2021-08-20 18:46:50 +02:00
Holger Vogt 034f8a4959 Don't do optran, if command optran is not given. 2021-08-20 17:09:20 +02:00
Holger Vogt e093844b18 Update comment: 0 is no initial iteration 2021-08-20 16:56:47 +02:00
Holger Vogt 3f68f91bf5 Add command 'write_ic'
Write out the right hand side status of the matrix in format
    .ic = V(node_xx)
    This may be possible at the end of a simulation or after a 'stop'
    of the simulation, which may be resumed again afterwars. This
    status may be used to start another simulation with these
    parameters by inluding into the netlist.
2021-08-20 15:30:02 +02:00
Holger Vogt 45dda4bbe2 Add command 'write_ic'
Write out the right hand side status of the matrix in format
.ic = V(node_xx)
This may be possible at the end of a simulation or after a 'stop'
of the simulation, which may be resumed again afterwars. This
status may be used to start another simulation with these
parameters by inluding into the netlist.
2021-08-20 15:29:47 +02:00
Holger Vogt dcc770cdbd Clarify use of 'optran' command 2021-08-20 15:29:27 +02:00
Holger Vogt f374e90ad4 if 'set ngdebug' print out transient initial conditions also with UIC set. 2021-08-20 15:29:15 +02:00
Holger Vogt a50f51760c make the error detection work properly 2021-08-20 15:28:58 +02:00
Holger Vogt eee0c6f1b0 Add optran.c
New custom build commands as suggested by VS
2021-08-20 15:28:42 +02:00
Holger Vogt edea5bf67b Use InpEvaluate() instead of strtod to enable ngspice numbers
with scale factors Meg k m u n p f etc.
2021-08-20 15:28:24 +02:00
Holger Vogt 15907a592c Reverse stepsize and finaltime in optran command,
stepsize first as in tran command.
2021-08-20 15:27:44 +02:00
Holger Vogt 9a42ff82a6 prevent crash if first breakpoint is beyond optran max time 2021-08-20 15:27:27 +02:00
Holger Vogt c21ba645d2 add tran simulation 2021-08-20 15:27:07 +02:00
Holger Vogt 86b1f6d6a6 test of supply ramping 2021-08-20 15:26:50 +02:00
Holger Vogt 3048f62aad updates to optran description and example. 2021-08-20 15:26:13 +02:00
Holger Vogt 3f27a560ee upon finishing 'optran', restore old CKTstep
remove unused
2021-08-20 15:25:59 +02:00
Holger Vogt c76ee6f275 safeguard command 'optran' against circuit no being loaded 2021-08-20 15:25:35 +02:00
Holger Vogt 5bbaa81c48 add missing header 2021-08-20 15:25:16 +02:00
Holger Vogt 0754a35296 header for optran 2021-08-20 15:25:03 +02:00
Holger Vogt 82c7df4c3d Pass Labs F5 Turbo
example for optran
2021-08-20 15:24:39 +02:00
Holger Vogt 2bf1c1c24a When we sre ready, reset CKTmaxstep to its previous value 2021-08-20 15:24:22 +02:00
Holger Vogt bea73b1ccd set maxstepsize to stepsize 2021-08-20 15:24:07 +02:00
Holger Vogt 6fc4bfc1b9 set the task values, not the ckt values,
because task is called only afterwards when
the simulation command is given.
2021-08-20 15:23:48 +02:00
Holger Vogt fdc42ca2c9 fix some text entry 2021-08-20 15:23:32 +02:00
Holger Vogt a335e8840b short description of branch contents 2021-08-20 15:23:12 +02:00
Holger Vogt f18b1b76d1 set stepsize 2021-08-20 15:22:49 +02:00
Holger Vogt 6f13f494cf Add command 'optran' to set 6 flags for transient op 2021-08-20 15:22:25 +02:00
Holger Vogt d05dc7a604 optran.c also in MSVC 2021-08-20 15:22:02 +02:00
Holger Vogt d183b47e04 Transient op calculation added to the standard operating point code.
When standard iteration, gmin stepping and source stepping fail,
try a transient simulation (like tran with uic option) to
determine the op. Implemented for AC and Tran simulation.
2021-08-20 15:21:12 +02:00
Holger Vogt 151be5478d Add new SOA parameters (safe operating area) for BJT.
We now scan for max of Ic, Ib, power, taking into
account the max allowed temperature, using the thermal
resistance rth0 model parameter between juntion and ambient.

Two user options are there: If rth0 is given, we calculate
a derating of the max power allowed.
Without a constant max power according to model param pow_max
is assumed.

The new model parameters for the bipolar model are:
pow_max, ic_max, ib_max, te_max, and rth0, in addition
to the already existing vbe_max, vbc_max, adn vce_max.
2021-08-20 12:23:38 +02:00
Holger Vogt a8d8e54edf Allow global .temp in addition to instance parameter 'temp'.
Update to comments.
2021-08-20 11:50:01 +02:00
Holger Vogt d227fce509 Remove the old SOA examples 2021-08-20 11:48:33 +02:00
Holger Vogt 0604ae6486 New folder with SOA (safe operating area) examples
in the ngspice examples section
2021-08-20 11:48:09 +02:00
Holger Vogt 1cd0dc86af Patch to allow (and ignore) leading or trailing commas
when putting {} around tokens. Tested with PWL voltage source.

Patch has been suggested by Liqian Zhang
2021-08-18 17:06:48 +02:00
Holger Vogt ee260bbfbe Some update to SOA for a diode:
Limit output to four digits
Add power and temperature limits.
Derating with self-heating, or with fixed temperature,
or no derating at all, selectable by setting model parameters.
Example file: SOA plotted as frame, with diode current.
2021-08-18 14:03:31 +02:00
Holger Vogt e1186461b1 Make the output a little more verbose:
add terminal voltage to Id, Te, and Pd outputs.
Compare SOA data to terminal voltage, not (unknown) junction voltage.
2021-08-17 14:12:07 +02:00