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

Re: Modeling and simulation



Original poster: "Antonio Carlos M. de Queiroz" <acmq-at-compuland-dot-com.br> 

Tesla list wrote:
 >
 > Original poster: "Jim Lux" <jimlux-at-earthlink-dot-net>

Commenting some points:

 > SPICE, when you get right down to it, is basically Ohm's law (and the two Ki
 > rchoff laws).. it solves a mostly linear set of equations to determine node
 > voltages and loop currents. And that is the basic problem: it assumes the
 > circuit is linear (in the "superposition is valid" sense)!... Yes, it does
 > work with nonlinear components, etc. but in sort of a funny way.

SPICE deals with nonlinear systems in the following way, essentially:
1)The circuit is linearized around the last available solution, and a
new solution for the linear circuit so formed is calculated.
2)If the new solution is almost identical to the previous, the solution
was found. If not, return to 1), using the calculated solution.
This is actually Newton's method for finding a solution of a nonlinear
system of equations. It really finds the correct solution, or one of
them if there are more than one.

 > For transient analysis (what most TC'ers use spice for), it essentially
 > simulates your circuit, using linear circuit theory, at a series of time
 > intervals. It's a bit fancier, because the admittance matrix can have
 > nonlinear terms, and it can use a fancy differential equation solver to do
 > the iteration, but, highly discontinuous functions, or ones that don't lend
 > themselves to a "nice" mathematical representation, don't work so well.

Time-domain analysis is done really by discretizing the time in series
of intervals, and using a numerical integration method over then to find
the solution at the end of the interval, knowing the state of the
circuit at the start. The application of the discrete integration
methods to the circuit is equivalent to convert the reactive elements
into resistors and sources with particular values. The program then
solves the resulting resistive circuit, that can be nonlinear. The
reactive elements can be nonlinear too without problems.

Most of the convergence problems in SPICE-like programs are due to the
nonlinear circuits, specially ones that change quickly between
different states. The numerical integration methods can also get
lost in some situations, but this is more difficult.

 > For AC analysis (where you sweep through frequencies), you're back to the
 > linear system model.  The various components are represented as complex
 > admittances/impedances, and the program solves the network equations
 > (linear!).. Modern versions of spice can also do some nonlinear analysis,
 > but at the heart, it's all linear network theory.

AC analysis is, by definition, only applicable to linear circuits.
The program just linearizes the circuit around the operating point
and runs a frequency response analysis. If you use a transient
analysis, all the nonlinear effects are considered, but all that
you can get are the time-domain waveforms (it's possible to calculate
the frequency spectrum of them if you want some frequency information).

 > If you have a nonlinear device in the system (like a mixer, or a diode),
 > programs like spice don't work so well... The diode can be modeled as a
 > "switch" and a resistor for the DC and transient case. It can be modeled as
 > appropriate parasitic C and L and R for the AC case. It can even be modeled
 > as a (relatively smooth) nonlinear function of inputs in the transient case
 > (and the AC/DC cases, where the solver goes through multiple iterations of
 > the network equations until everything settles down to a steadystate
 > equilibrium)..

Ok. The model can be as complex as you want if you use subcircuits.

 > If you had infinite computational resources, you could conceivably do SPICE
 > like transient simulations with sufficiently fancy solvers in the time
 > domain to model almost anything, IF and ONLY IF, you had sufficiently
 > accurate models, which, in practice, do NOT exist for most RF components (or
 > for components of great interest to TC'ers, like spark gaps and
 > leaders/streamers/sparks).  We're talking about models that adequately
 > represent the behavior on a sub nanosecond time scale. (FDTD is starting to
 > get there, but is computationally intensive)

A question of making models. If the physical models are too complicated,
behavioral models can be built, that simulate just what is observed.

 > Hard core RF systems get designed with products that use so called "harmonic
 > balance" techniques, which explicitly account for the intermodulation and
 > non-linear effects, BUT, they're hardly a continuous or transient
 > simulation.

These are techniques to simulate systems that take great number of
cycles
to stabilize, avoiding a long transient analysis, where the
imperfections
of the discrete integrations can appear, not counting the time taken and
the large amount of data generated in a long simulation.

 > (Imagine what trying to
 > create a simple SPICE model for an original Pentium would be like.. a
 > million transistors, several million transmission lines, several million
 > capacitors and resistors, and you'd have to simulate at a time step of
 > something like 1-10 picoseconds)

But these systems are simulated. Not necessarily complete at the lowest
level, but using informations from low-level analysis for simulations
at higher levels.

 > Hey, for TCing, the simple Medhurst type approximations get you more than
 > close enough to build the coil, and then you can tune for effect... So
 > there, the simple coupled LC model is more than sufficient.

An example of "behavioral" model.

 > But, if you want to understand where the losses are, or why the sparks move
 > in a particular direction, etc... you'll need a different model.

A physical model.

 > Or, if you want to understand how a magnifier really works, and come up with
 > a new way to build/specify/optimize one, then the coupled oscillator models
 > Antonio developed are the hot ticket.

An they are also quite behavioral, as everything is linear and
lossless...

 > Ultimately, though, those models need to be validated, and that's why this
 > mailing list is full of folks who actually build the coils, rather than just
 > talk about it....

And in all examples, the models are being validated. Even the problems
predicted by the theory are appearing too, as the low rms output of
too fast magnifiers.

Antonio Carlos M. de Queiroz