While the admittance matrix method provides the steady- state response of a circuit, there is no way it can provide transient information- this is usually obtained by state variable methods. (This also alleviates the need for linearity.)
Transient response simulation will be demonstrated by an example. (The transient response will be different from zero only if the circuit includes some inductance or capacitance.) For the simple network in figure 6, where node '2' is grounded, Kirchhoff's current law yields:
v1/R2=C2(v3'-v1')
C1(v0'-v3')=v3/R1+C2(v3'-v1')
Solving (by a procedure not terribly different from the one at the end of the 'simplified simulation' section, though all references to imaginary parts should be ignored), provides a system of equations in the derivatives of the nodes' voltages.
v3'=-v3/(R1C1)-v1/(R2C1)+v0'
v1'=-v1/(R2C2)-v3/(R1C1)-v1/(R2C1)+v0'
where v0' is the (known) derivative dv0/dt of the input voltage. These equations can by solved by classical (or at least, by Laplace transform) methods, but it is more straightforward to use Runge- Kutta numerical integration.
D1=h.f(vi,t)
D2=h.f(vi+D1/2,t+h/2)
D3=h.f(vi+D2/2,t+h/2)
D4=h.f(vi+D3,t+h)
vinew=vi+(D1+2D2+2D3+D4)/6
where vi'=f(vi,t) and h is the integration time- step. When Runge- Kutta's method is applied to a vector of voltages, vi'=f(vi [i=0 to n, i<>2],t) it is better to update all variables at the same time, in order to avoid 'skewing' between node values. Each node can be precharged to any initial voltage. Too large an integrating interval will provide meaningless 'results', while too small a step will be a waste of computer time without appreciably affecting accuracy. Ergo, circuits with widely differing time constants are awkward to simulate; it is also cumbersome to test a circuit having a small time constant with a driving waveform of a much lower frequency.
The total response (fig. 7b) will consist of:
A steady- state term (fig 7c) dependent on the driving waveform, which is a scaled and shifted copy of the input signal- this is obtainable most easily from the admittance matrix of the circuit via its two- port network model. If the signal does not contain a single frequency (for example a square or triangular wave) waveform aliasing will appear as well, as the scaling and shifting varies with frequency.
Inductors have not been presented, but if a computer is used to solve the equations, it is probably easier to formulate a set of equations by using the integral form of vL=-Ldi/dt.
The graphs of figure 7 were obtained with a driving waveform v0 = sin(2pi*1500Hz*t), shown in fig.7d (one volt peak amplitude- this graph is scaled differently from the other three) and the simulation time was about 1.6 milliseconds. Test values: C1=C2=10nF, R1=R2=10 kOhms. The initial charge (and voltage) on both capacitors is zero. Sampled, rather than continuous, graphs are shown for all signals. Responses are shown for node 1. Also note that in 7a, the positive voltage values have been magnified by two with respect to negative voltages, so as to avoid loss of detail. In this particular example, the input frequency was chosen in order to illustrate the transient response in a compact graph, so most of the transient effect is within the first cycle of the waveform. Clearly, such behaviour cannot be inferred for very different frequencies.