On Tuesday 09 June 2009, henrik johansson wrote: > As I understood it this method is identical to solving the > problem Phi(x0, t0, T) = x0 using fix-point iteration. So the > problem is of course that the convergence rate is not that > great. Using newton's method instead gives quadratic > convergence. So for a circuit slow decaying states this could > be very slow.
That's correct. So, how to get the derivative? I don't see any way for that derivative to be calculated analytically, so that means to calculate a finite difference. > Yes they do and it works like that in most simulators. > I can't understand how the problem is solved in commercial > simulators with PSS analyses. The PSS analysis in Spectre > doesn't work if the circuit contains so called hidden states. > I think they are defined as variables that keep their values > between time instants. So by that definition the device > states in gnucap/spice etc are hidden states. No .. a hidden state is a state that is not stored between time instants. Think of a capacitor .... Q=CV ... then find i=dq/dt, for the right side. Q is the state variable. You could, alternatively, calculate i=C dv/dt , and not store Q. Now, Q is a "hidden state". Hidden states exist in some models, and are usually not dependent on the simulator. In this case, all the simulator sees is that "i" is a function of "v". The fact that it depends on history is forgotten. If the capacitor is linear, you can calculate it again, but for nonlinear capacitors, the results can be inconsistent. Some of the Spice models have hidden states. As I recall, BSIM3 does, because it gave me grief when I was working on the modelgen version of it (d_mos8.model). ... That model has the dreaded "hidden state bug", because modelgen subcircuit based models don't support hidden state. I think level-2 also has the hidden state bug. > If these hidden states where all redundant, by that I mean > that they are memory-less function of the global state > vector, they will not cause any problems with convergence. > For example if there is a capacitor model that stores its > charge as an internal state and the voltages at its terminals > are global states. In this case the internal state can easily > be calculated from the global states. It's a problem .. Look at the "Meyer" capacitance model used with the older simple MOSFET models. If you don't store charge you cannot get a consistent result. > Looking in the ELEMENT implementation of tr_restore it > restores the y state variable from an earlier time point. > > Maybe if this was changed so that it will restore the state > from the global state in vdc when possible. This way the > remaining hidden states will converge slowly but with some > luck they will decay fast. That means to do the whole model evaluation, with lost history. If you assume that the states can be determined from the voltage vector, that implies that for this purpose they are not needed. So why not base the shooting on just what you have available? > The problem is in the spice-wrapper. I haven't seen any code > in the spice API that does this. The closest function I have > seen is the initial condition functions that is used to > assist DC-analysis convergence. It is possible to have all of the states available, as if all in a vector. > Or maybe the spice models cannot be used with PSS. I guess > this will be less of a problem when more models are available > as Verilog-AMS code. We are stuck with Spice models. The problem occurs when a model writer explicitly codes something that could be done automatically. al. _______________________________________________ Gnucap-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnucap-devel
