Home |
Search |
Today's Posts |
#30
![]() |
|||
|
|||
![]() "Airy R. Bean" wrote in message ... Question - what is the internal modelling technique used by these various programs, and can we produce our own package? Is it based upon successive delta-time increments, and if so, what is the increment? What prompted the last question is an attempt I made to create a sine-wave generator using the identity that sin dTheta = dTheta, but I had to go for an _extremely_ small value of dTheta (ISTR 10^ -18) before getting anything like a decent sine wave, and even that degenerated after a few cycles. So, these circuit simulators - what is their underlying technique for circuit simulation? [clip] The simulators basically offer 2 types of direct analysis ... An "AC" analysis and a "Transient" analysis. Their answers come via different maths methods. Basically the much less useful 'AC' analysis examines all the wire connection points 'nodes' in the circuit diagram and enters the found components in 2 matrices. Each (square) matrix is sized to hold node^2 elements. One is for 'real' components, the other for quadrature components. All non linear components in the circuit must first be simplified/replaced by linear equivalants (messy). Matrices are filled in a manner similar to kirchoffs loops anaysis. Reactive components entering the imaginary matrix. Ie lots of real/imag simultaneous equations need solving which is of course why the computer is handy. After they are filled the matrices are mathematically inverted to give a complete set of solved phase and ac voltage data for all the node points in the circuit. Nice for filters useless for oscillators!. The more useful transient analysis is similar to as you mention (Babbage's difference engine?) but based simply on the differentials V=L i/t and V=i/C and uses near complete maths models for the semicons or other non linear elements. Nodes examined in turn and time steps selected purely on the basis of how fast the results are changing. time steps can be a problem as too long and the final results get 'smeared out' hence phase lag artifacts cause overall loop stability problems. The TA is conceptually very simple and surprisingly easy and fun to programme for set piece or well observed circuits but gets *really* spagetti code messy if it is to work smoothly with any input circuit. Big problems can turn up getting the results to converge or balance and much progging effort is needed in this direction. regards john |