Commit Graph

7515 Commits

Author SHA1 Message Date
Holger Vogt f06496c912 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-09-29 20:15:13 +02:00
Holger Vogt a225ce2aaf List definition needs spaces between ( and next token,
and between token and )

Update to comment.
2021-09-29 20:14:45 +02:00
Holger Vogt 04080c2ab3 Add short description of the new examples 2021-09-29 20:14:26 +02:00
Holger Vogt f40e6b9357 Linux line endings (LF only) 2021-09-29 20:14:17 +02:00
Holger Vogt 70ba37b149 Example OpAmp which converge for op only with optran:
TLV6001 and TLV9002
2021-09-29 20:14:05 +02:00
Holger Vogt b20ac16093 remove old files 2021-09-29 20:13:53 +02:00
Holger Vogt 03d956cbfa Example file with three dual opamp filters.
Different opamps: TL072, OPA1656, OPA1612
2021-09-29 20:13:35 +02:00
Holger Vogt 8dcb1f901a Three OpAmp Example for optran 2021-09-29 20:13:18 +02:00
Holger Vogt 8c5c8da2a7 line endings LF (Linux) 2021-09-29 20:13:04 +02:00
Holger Vogt 493cf73f7f 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-09-29 20:12:52 +02:00
Holger Vogt 7f1fdd3934 Don't do optran, if command optran is not given. 2021-09-29 20:12:31 +02:00
Holger Vogt 711157e85d Update comment: 0 is no initial iteration 2021-09-29 20:12:03 +02:00
Holger Vogt f0cb886af1 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-09-29 20:11:45 +02:00
Holger Vogt 0e72287af7 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-09-29 20:11:13 +02:00
Holger Vogt 893ce7879f Clarify use of 'optran' command 2021-09-29 20:10:38 +02:00
Holger Vogt 2ef3f66f96 if 'set ngdebug' print out transient initial conditions also with UIC set. 2021-09-29 20:10:25 +02:00
Holger Vogt 41ead284f3 make the error detection work properly 2021-09-29 20:10:02 +02:00
Holger Vogt ec986b3fbc Add optran.c
New custom build commands as suggested by VS
2021-09-29 20:09:36 +02:00
Holger Vogt 4e03efacb7 Use InpEvaluate() instead of strtod to enable ngspice numbers
with scale factors Meg k m u n p f etc.
2021-09-29 20:09:22 +02:00
Holger Vogt 3be5926f2c Reverse stepsize and finaltime in optran command,
stepsize first as in tran command.
2021-09-29 20:08:51 +02:00
Holger Vogt bca099ca29 prevent crash if first breakpoint is beyond optran max time 2021-09-29 20:08:28 +02:00
Holger Vogt 6bdd6610f6 add tran simulation 2021-09-29 20:08:03 +02:00
Holger Vogt b07a54b8e1 test of supply ramping 2021-09-29 20:07:42 +02:00
Holger Vogt 89f78bfc6c updates to optran description and example. 2021-09-29 20:06:53 +02:00
Holger Vogt 7de526237e upon finishing 'optran', restore old CKTstep
remove unused
2021-09-29 20:06:35 +02:00
Holger Vogt 0eafec254e safeguard command 'optran' against circuit no being loaded 2021-09-29 20:05:56 +02:00
Holger Vogt cf61e1e564 add missing header 2021-09-29 20:05:28 +02:00
Holger Vogt 83e223fafc header for optran 2021-09-29 20:05:08 +02:00
Holger Vogt 29dfa23465 Pass Labs F5 Turbo
example for optran
2021-09-29 20:04:48 +02:00
Holger Vogt a20afc54a5 When we sre ready, reset CKTmaxstep to its previous value 2021-09-29 20:04:26 +02:00
Holger Vogt 3956095484 set maxstepsize to stepsize 2021-09-29 20:04:08 +02:00
Holger Vogt ecdb3b9eb4 set the task values, not the ckt values,
because task is called only afterwards when
the simulation command is given.
2021-09-29 20:03:31 +02:00
Holger Vogt 72c72268c5 fix some text entry 2021-09-29 20:02:47 +02:00
Holger Vogt 9c600c3265 short description of branch contents 2021-09-29 20:02:24 +02:00
Holger Vogt fd36eb552f set stepsize 2021-09-29 20:02:11 +02:00
Holger Vogt ab6224767b Add command 'optran' to set 6 flags for transient op 2021-09-29 20:01:44 +02:00
Holger Vogt 4dac35bac9 optran.c also in MSVC 2021-09-29 20:00:50 +02:00
Holger Vogt df0792818f 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-09-29 20:00:29 +02:00
Holger Vogt a08e6a0676 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-09-29 19:59:58 +02:00
Holger Vogt 1084b4205c Allow global .temp in addition to instance parameter 'temp'.
Update to comments.
2021-09-29 19:59:28 +02:00
Holger Vogt cbb63215c4 Remove the old SOA examples 2021-09-29 19:59:03 +02:00
Holger Vogt e9274d4b9c New folder with SOA (safe operating area) examples
in the ngspice examples section
2021-09-29 19:58:50 +02:00
Holger Vogt 9221df234c 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-09-29 19:58:36 +02:00
Holger Vogt 33571877dc 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-09-29 19:58:11 +02:00
Holger Vogt 759f4f5f84 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-09-29 19:57:54 +02:00
Holger Vogt 9c8380a031 Enhance the SOA (safe operating area) operations
Parameters id_max, pd_max and te_max have been added
for current, power, and temperature to the already existing
fv_max and bv_max (max forward and backward volteges).
2021-09-29 19:57:34 +02:00
Holger Vogt e5fdb4c742 Patch sorts 1 byte vars in sequence,
to save some memory.
Patch #107 provided by Florian Ballenegger
2021-09-29 19:57:08 +02:00
Holger Vogt 7ebe17f32f hicum plot has non-monotonic x values.
We thus need parametr 'retraceplot'.
Command 'run' not required.
2021-09-29 19:56:50 +02:00
Holger Vogt bdd8991d84 We are now developing ngspice-35+ 2021-09-29 19:55:52 +02:00
Holger Vogt 51cc21de16 Update: Libtool version info 2021-08-08 20:20:29 +02:00