gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] PSS analysis


From: al davis
Subject: Re: [Gnucap-devel] PSS analysis
Date: Sun, 7 Jun 2009 20:45:27 -0400
User-agent: KMail/1.11.2 (Linux/2.6.26-1-amd64; KDE/4.2.2; x86_64; ; )

Some replies take longer than others...

On Monday 01 June 2009, henrik johansson wrote:
> I'm trying to find a solution to how to set the initial
> condition for inner transient analysis. Correct me if I'm
> wrong but isn't it impossible to calculate the
> state-transition function Phi(v0, 0, T) and the jacobian of
> it Jphi with NA since the full-state of the circuit is not
> captured by the voltage vector. Using MNA the vector of node
> voltages and currents through inductors represents the state
> of the circuit.

I don't know...

I had the impression that the algorithm being presented is 
really the standard transient analysis, unwrapped, with maybe a 
few minor changes, but I have not actually studied it.

Gnucap  has a provision for continuing a transient analysis, 
using the end of the previous run as the starting point for the 
new run.  It seems to me that it should do what you need in this 
case.

Look at the example:
http://wiki.gnucap.org/dokuwiki/doku.php?id=gnucap:manual:examples:phase_shift_oscillator

Restarting like this is not based only on the voltage vector.  
All devices store their own state.  The device function 
tr_restore exists to make sure a restart starts from a 
consistent state.  You might want to look at the the 
"tr_restore" functions, particularly for some of the more 
complex devices.

Since I did that so long ago, I don't remember what is really 
required.  It might be useful to look at the "freeze" and 
"unfreeze" commands.  (and possibly uncover a new bug after all 
these years).  I like to think this works, and has worked for a 
long time, but actually I would not be surprised if you can find 
cases where it does not restore correctly.

I don't think it is possible, or at least not practical, for the 
voltage vector to capture the complete state, in general.  Just 
thinking of the inductor is a tiny subset of "all models", 
especially considering new models that don't yet work but will 
in the future, or have not been developed yet.

When I say "complete state" .. think of something like a BSIM4 
model.  A quick check tells me that it has 8 internal nodes, 
representing some kind of internal state that is stored in the 
voltage vector.  It also has 29 (if I counted correctly) state 
variables that are not stored in the voltage vector.  I can't 
think of any way to access this reliably in general in a form 
that would be useful in this case.

Does this help?

al.












> It would be possible to probe the current of all inductors
> and then calculate the MNA matrix and LU-factor it for each
> timestep and then use that to calculate the state-transition
> Jacobian. But it would be a pity to not use the NA Jacobian.
> But I don't know how to handle this for spice-devices.

You can't think in terms of "inductors" and "spice-devices".  
All of those are optional.  To be useful, it must work with all 
devices including new ones that have not been developed yet.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]