On Thursday 11 November 2010, Cliff Wiener wrote: > Should we use a "G" element (Voltage controlled resistor) or > an "S" element (Voltage controlled switch)?
It depends .. Do you want a voltage controlled switch (two discrete values) or a voltage controlled resistor (resistance is a function of control voltage)? The voltage controlled resistor is a nonlinear device, therefore prone to convergence issues, as are all nonlinear devices. This is the same as Spice, for versions of Spice that support the voltage controlled resistor. The switch is a time dependent linear device, therefore not prone to convergence issues. The time at which a switch crosses its threshold is considered to be a "cross event", which means time stepping is adjusted dynamically to insure timing accuracy and waveform accuracy during and near the transition. Spice does not do this, therefore switch modeling is more accurate and more reliable in gnucap than in spice. A switch with connections only to the input (ground both terminals of the output) can be used to assist time step control by adding cross events at critical points. > If an S element, can I have an example of what the model file > should look like? > > If a G element, can I have an example of what the expression > should look like? http://gnucap.org/dokuwiki/doku.php?id=gnucap:manual:devices:basic http://gnucap.org/dokuwiki/doku.php?id=gnucap:manual:devices:switches _______________________________________________ Help-gnucap mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnucap
