-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kevin Aylward wrote:
[....]
Michael Vick:
"The initial condition problem does infact occur in spice....and once i
corrected it , i saw oscillations immediately"
This is *not* a "kick start". It is setting an initial guess of the
solution. A "kick start" can only rationally be interpreted as
generating a pulse, as might be used for starting "linear" oscillators.
Well, linear oscillators can also be started by setting an initial
condition.
For an example of a linear circuit where an initial condition starts of a
time-varying voltage, consider the simple RC parallel circuit, where the
voltage across the two components is set to non-zero with a .IC command,
e.g.
===============
C1 1 0 1u
R1 1 0 1k
.IC V(1)=1
.end
===============
For a very simple linear oscillator, a .IC command can set up the
oscillation directly:
==============
C1 1 0 1u
L1 1 0 1m
.IC V(1)=1
.TR 1u 1
.option method=gear
.alter
.option method=trap
.end
===============
(For best effect, make sure that the simulator doesn't take too large steps
- - it will be tempted to do so.)
In the first run, using Gear method numerical integration, the oscillation
decays[1]. In the second, using trapezoidal numerical integration, it
maintains a constant amplitude.
As far as I know, the reason that this does much the same thing[2] as what I
think of as a "kick start" (e.g. a current pulse from zero to non-zero
current and back to zero onto node 1 in the netlists above) is that Spice
numerically solves partial differential equations assuming constant values
for all state variables (the node voltage in both netlists, inductor
current[3] in the second) *and* zero derivatives for time less than zero.
For time equal to zero and greater, the derivatives are determined by the
numerical algorithm[4]. Since the .IC voltage is not the actual quiescent
voltage (V(1)=0), the derivative for t >= 0 is non-zero and V(1) changes. A
step on the derivative should be quite enough of a kick to start most
linear oscillators ;-) ;-)
Best Regards
Jens
[1] Yes, i used to be able to show why this is so, and why this should be
so; these days, I just look in the manual :-(
[2] Obviously, kick-start sources are more flexible. They are just not
necessarily better at starting oscillators.
[3] or transformed state variable if currents cannot be state variables
[4] An other approach is to find a linear approximation to the circuit, find
the eigenvalues of this linear circuit, establish the time domain solution
exactly from the known initial conditions and the known sources and then
simply calculate values of the time-domain solution. Since this is first of
all useless with non-linear circuits *and* secondly grows in numerical
complexity much more rapidly with growing circuit size than Spice-like
simulators, this was abandoned as soon as Spice appeared. It still means
that the error on the first calculated cycle is the same as the error on
any other calculated cycle, unlike the step-by-step solvers used by
Spice-like simulators.