• No results found

CHAPTER 6 Numerical algorithms for the transient analysis of HF non-linear circuits k

6.3. The problem of stiffness

Stiff ordinary differential equations arise in many areas o f electronic circuit analysis and simulation. Most CAD techniques that have been developed for circuit simulation suffer from the problem and inefficiency when simulating complex electronic circuits described with stiff ODEs. In order to illustrate the problem o f stiffness, it is necessary to revert to the very beginning o f the problem - finding a numerical solution for an I VP. The first and foremost requirement for this task is to make the difference between the true and the calculated solution as small as possible, i.e. to ensure that the obtained solution is accurate. In order to satisfy this accuracy requirement, the stepsize h m ust be chosen such that it is deemed sufficient. This usually involves some form o f error estimation. Ideally, the choice o f stepsize h should be dictated only by the approximation accuracy requirement. But it turns out, that for many o f the numerical methods in use (e.g. Euler, Runge-Kutta, Adams methods), h must be chosen sufficiently small to obey an additional, absolute stability restriction, as well. Loosely speaking, the IVP is referred to as being s tiff if this absolute stability requirement dictates a much smaller stepsize h than is needed to satisfy the accuracy requirements alone [AP98]. A scher and Petzold [AP98] define stiffness in terms o f the behaviour o f an explicit difference method, e.g. forward Euler as:

CHAPTER 6________________Numerical algorithms for the transient analysis of HF non-linear circuits

D E F IN IT IO N 6.5. (Stiffness)

An IVP is s tiff in a given interval o f integration if the step size needed to maintain the stability o f the forward Euler method is m uch smaller than the step size required to represent the solution accurately.

It should be noted that, in addition to the differential equation itself, stiffness depends on the accuracy criterion imposed, the length o f the interval o f integration and the region o f absolute stability o f the m ethod used.

The phenomenon o f stiffness is usually found in systems incorporating behaviours with greatly differing time constants. The time constant is the term used by engineers and physicists to refer to the rate o f decay o f a response. For example, the equation

y' = Ay

(6.50)

has the solution ceA' . I f X is negative, then y decays by a factor e 1 in time -1/A. This

term is called the time constant, t.Physical systems frequently behave, at least locally, in

an exponential fashion, e.g. capacitors discharging. In a complex electronic circuit, different components will be decaying at different rates. For the system described by:

y' = f(y)

(6-51)

the decay rates m ay be related locally to the eigenvalues o f d f / d y . I f some o f the components are slow and others are fast, the fast ones will control the stability o f the method, although the components may have decayed to insignificant levels. For example, consider the following system:

y ' = -y, y (0) = 1

y (6.52)

z' = -lOOz, z(0) = 1

These equations are independent o f each other, so it is possible to analyze the behaviour o f each one separately. For the m ost o f the numerical methods in use, the stability requirements will necessitate the step size h to be smaller than 1/100 [G71]. Hence, the integration step for equations (6.52) is stipulated by the time constant o f z. However, after a few steps, the value o f z will be so small that it will be negligible compared to y as can be seen in Fig 6.1. Nevertheless very small steps must be used because o f the second component z, although only the first component y contains any significant information. This illustrates the problem related to obtaining a numerical solution to stiff differential equations.

CHAPTER 6 Numerical algorithms for the transient analysis o f HF non-linear circuits

F i g . 6 . 1 . Illustration o f stiffness problem

O n e re m e d y to the p ro b lem g iv e n w ith (6 .5 2 ) m a y in v o lv e separating

(d e c o u p lin g ) th e tw o co m p o n en ts a n d u sin g a differen t step size h or e v e n different m eth o d s for each. H o w e v e r , in the g en eral case, this separation o f equations is not p o ssib le . F o r ex am p le, co n sid er sy ste m (6 .8 5 ) g iv e n later in this chapter w ith its solution g iv e n b y (6 .8 6 ). A s is o b v io u s, th e so lu tion for b o th d ep en d an t v aria bles contains both fast a n d s lo w co m p o n en ts thus y ie ld in g a restriction on the ch o ic e o f step size h.

It is no t n e c e ssa r y to co n sid er a system o f equations to o b se rv e the problem o f stiffn ess. T h e stiffn ess m a y arise in a sin g le O D E as w e ll. F o r ex am p le, consider the fo llo w in g O D E [G 7 1 ]:

y ' = A ( y - F ( t ) ) + F \ t ) , A « 0 (6 .5 3 ) T h e so lu tio n to (6 .5 3 ) is g iv e n by:

y = ( y 0- F ( 0 ) ) e Xl+ F ( t ) . (6 .5 4 ) F o r yo - F(0) * 0, At w ill so o n b e su fficien tly n e g a tiv e that the first com p on en t w ill b e in sign ifican t co m p a red to the seco n d . I f the error eq u ation for (6 .5 3 ) is exam in ed u sin g a n y o f the w id e ly u s e d m eth o d s [G 7 1 ], it is see n that the lo ca l truncation error is d eterm in ed b y h and a d e riv a tive o f F w h e n A t e 0 , w h e re a s the sta bility is dep en dent on the v a lu e o f hA. S in ce A is a fix e d param eter, h d eterm in es the stability. T herefore, for a n y sm ooth , s lo w ly v a r y in g fu n ctio n F ( t ) , eq u ation (6 .5 3 ) h as sim ilar b eh a vio u r to the stiff s y s te m in (6 .5 2 ). W h ile it is true that num erical app roxim ation o f (6 .5 3 ) b y an y one o f the te ch n iq u es d isc u s se d so far c o n v e rg e s to the so lu tion as h — > 0 , h has to b e in to lerab ly sm all b e fo re a c ce p ta b le accu ra cy is obtain ed in practice, so sm all in fact, that ro u n d -o ff errors and com p u ta tio n tim e b e c o m e critical.

CHAPTER 6 Numerical algorithms for the transient analysis o f HF non-linear circuits 6 . 4 . T h e p r o p o s e d a p p r o a c h

F ro m th e d iscu ssio n p resen ted in S e ctio n 6.3, it is clear that sp ecial care has to b e tak en w h e n so lv in g p o ten tia lly s tiff O D E s, b o th from the a c cu ra cy and stability v ie w p o in t. In addition, the e ffic ie n c y o f th e O D E so lv e r is the practical lim iting factor for the p erform an ce o f all circuit sim u lation tech n iq u es. T h erefore, there is a n e e d for a n o v e l n u m erical a lgorith m that en a b les u se o f a lon ger tim estep , thus im p rovin g the e ffic ie n c y o f th e so lv e r bu t retaining the req u ired a ccu ra cy o f the solution.

C o n sid er the fo llo w in g initial v a lu e problem :

y - = A ‘ , m ) . y ( ‘o) (6 '5 5 > ax

In order to so lv e (6 .5 5 ), y . ( t ) , is ap p ro xim ated b y the P a d e app roxim an t g iv e n as:

m

Yuai hj

y , ( 0 = K m = T --- ’ h = t ~ fi-1 ’ ( 6 -5 6 )

4=0

w h e re bo = 1- T h e P a d e app roxim ation is c h o se n du e to its ex ce lle n t approxim ating prop erties [G W 9 9 ], A se q u e n ce o f lo ca l approxim ations to y ( t ) is th en bu ilt in order to p ro v id e a solu tion to (6 .5 5 ), in a m anner sim ilar to that p ro p o sed in [G N 9 7 ]. T h e m ethod is a d v a n c e d in tim e b y u sin g the solu tion at tim e t as the initial condition for the next tim e step. T h e m anner in w h ic h the co efficien ts o f the P ad e approxim ant (ctj, j = 0,...,m and bk, k = l ,..,n ) are obtain ed d efin es differen t m eth o d s for so lv in g O D E s. T h e s e m eth od s are p resen ted in the rem in der o f this chapter.

6 . 5 . M e t h o d s t h a t d o n o t u s e d e r i v a t i v e s o f t h e f u n c t i o n f ( t , y ( t ) )

T h e tw o n e w m eth o d s that are p resen ted in this sectio n are n a m ed the E x act-fit and the P a d e -fit m ethod . T h e E x a c t-fit m eth o d is b a se d on fitting d y l dt from (6 .5 5 ) exactly o v e r the p ast N p o in ts, in order to obtain the c o e fficie n ts o f a P ad e approxim ant (6 .5 6 ). T h e P ad e -fit m eth o d u tilises an initial p o ly n o m ia l approxim ation o f dy/dt to calcu late the c o e ffic ie n ts o f th e P a d e app roxim an t from a set o f linear equations.

6 . 5 . 1 . E x a c t - f i t m e t h o d

T h e app roach tak en in the E x a c t-fit m eth o d is to fit dy / dt exactly o v er a num ber o f p ast tim e poin ts. F o r the p u rp o se o f clearer notation, the m eth o d w ill b e p resen ted for

CHAPTER 6 Numerical algorithms for the transient analysis o f HF non-linear circuits a scalar IV P , w ith the note that its ex te n sio n to a sy ste m o f O D E s is straightforward. W ith ou t lo ss o f gen erality, a ssu m e that the P ad e app roxim an t is ch osen su ch that

m = n ~ 2 , i.e. a0 + a f + a2t 1 + b f + b2t 2 X 0 = & / 2 = 7 r : ZT2 . (6.57) (6 .5 8 ) th erefore dy _ ( a\ ~ açP\) + 2(a2 - a 0b2)t + ( a 2è, - a ,b2) t2 dt (1 + b f + b2t2) 2

A s ex p la in ed before, the current v a lu e o f y(t) is tak en as th e initial condition for n e x t step (ti=to=0) hence:

«o = M 0 - (6 -59)

T o obtain the rem ainin g four co e ffic ie n ts, dy I dt is fitted exactly o v e r the past 4 points b y su bstitu tin g t w ith to, to-h, to-2h,to-3h in (6 .5 8). S u b se q u e n tly , a 5x5 sy stem o f n o n ­ linear eq u ation s is o b ta in e d w h e re ao, aj, a2, bi and b2 are u n k n o w n s, i.e.

«„ = M O

F f a , a2, ôp b2) = a, - a 0b{ - f 0 = 0

F 2(« p a2, bv b2) = a, - a 0bl — 2(a2 — aüb2)h + (a2bx - a tb2)h2 - f_[( l - h b ] +b2h2)2 = 0 F 3(a,, a2, b2) = a, - a0b{ - 4 ( a 2 - adb2)h + 4(0^ - a f i j h - f_2(l-2 h b i +4b2h ) = 0 F 4(Op a2, ¿p b2) = al - a 0bl - 6(a2- a 0b2)h + 9(a2bi - a ]b2)h2- / ^ ( l - ^ h b ^ + ^ h 2) 2 =0

(6 .6 0 )

w h e re

/o = / ( % > ^ / j — f ( t 0 ~ 2h, y ( t( - 2 h )),

f i = f ( to ~ h > y ( to - h ))> f-3 = f ( {o - 3 h > y ( fo ~ 3 h ))-

S o lv in g this sy stem o f nonlinear equation s, e.g. b y u sin g the N e w to n m ethod, for each

step y ie ld s v a lu e s for the c o e ffic ie n ts a'0, a[, a2, b[ and b2 for that particular step. T h ese are th en u se d to calcu la te y i+i(t), t = to+h as:

y, „ ’ 1 + h + ¿2

<s-61>

Im p lem en tation o f a predicto r-correcto r algorithm is no t co m p licated w ith this

m eth o d . T o fin d an ex p re ssio n for the corrector d y l dt is n o w fitted o v e r to+h and the

three p re v io u s points. T h is resu lts in another 5x5 sy ste m o f non-linear equations (6 .6 2).

CHAPTER 6 Numerical algorithms for the transient analysis ofHF non-linear circuits T he coefficients â 0, âx, â 2, bx and b2 are the n e w set o f unknow n coefficients that need to b e calculated in order to obtain th e valu e yni(t) in the corrector step, i.e.

s o = y ,( 0

F f â , â2, b2) = <5, - - 2(<à2 - âQb2)h + (â26, - à fi jh 2 - ¿ ( 1 + /lè, +b2h2) 2 = 0

F2(âv â2, b2) = (6.62)

F 3( 5 P â2, b{, b2) = a, - a j b , - 2 (â 2 - â0b2) h + (â 2&, - c t f i 2) h 2 - f _ l ( l - h b 1 + b2h 2) 2 = 0

F 4(<5P à2, b v b2) = 5, - â / , - 4(â2 - âjb2)h + A{â2b, -a j j2)h2 - f _ 2Q - 2hbt + 4b2h2f = 0

w here y f (to+h) is the value calculated in the predictor step and f i = f ( to + h , / ( t0 + h ) ) , f 0 = f ( t0, y ( t0)), f .2 = f ( fo - 2h> y ( \ - 2h))> f i = f 0 o - K y ( t0 - h))-

A fter the values for th e coefficients a ’ , 3 , a2, b[ and b2 are obtained, the corrected valu e o f y Ci+i(t) is calculated as:

i 1.2 c a'0 + a [h + a 2h

M

1

+ b[h+ b[h2

(6.63)

This value is then accepted as a g o o d approximation for y(t) and this becom es the initial condition for calculations in the nex t step.

Exact fit

Fig. 6.2. Exact fit method

F ig. 6.2 presents the num erical solution for the test problem

~ ~ = ~ 2x - y , y (0 ) = - l ax

com pared to its exact analytical solution

y (t ) = - 3e~‘ - 2 x + 2 .

(6.64)

(6.65)

CHAPTER 6 Numerical algorithms for the transient analysis o f HF non-linear circuits A s can b e seen, a greem en t b e tw e e n th e analytical and num erical solu tion to the ordinary

differen tial eq u ation (6 .6 4 ) is excellent.

T h e E x a c t-fit m eth o d is a m u ltistep m eth od , w h ic h m ean s that it is not self- starting. It requires on e o f sin g lestep m eth o d s in order to calcu late the v alu es for the initial m + n - 1 tim e steps, e.g. R K F algorithm , after w h ic h calcu lation is resu m ed a cco rd in g to th e E x a c t-fit m eth o d algorithm .

6 . 5 . 2 . P a d e f i t m e t h o d

T h e E x a c t-fit m eth o d requ ires so lv in g a non-linear sy ste m o f equation s to obtain the c o e ffic ie n ts a0, a!: a2, bj an d

¿2

at each tim e-step. T h is m a y b e com p u tationally e x p e n siv e w h e n large sy stem s are so lv e d sin ce it in v o lv e s in vertin g the Jaco b ian matrix. In order to a v o id so lv in g a non-linear sy ste m at the each tim e step, the P ade-fit m ethod

initially fits y ( t ) w ith a p o ly n o m ia l o f order m+n. F o r the P ad e approxim ant (6 .5 7 ) this requ ires a 4th order po lyn o m ial:

y{t) = Cq + C f + C2t + C3t + C 4i 4 (6 .6 6 ) and h en ce,

C, + 2 C ,t + 3 C 3t 2 + 4 C / . (6 .6 7 ) dt

T a k in g th e current v a lu e o f y(t) as th e initial con dition for n ex t step (t0 - t j and fitting d y ld t o v e r the p a st 4 p o in ts (t0, t0-h, t0-2h, t0-3h) y ie ld s a 5x5 sy ste m o f linear eq u a tio n s w h e re Co, Ci, C2, C3 an d C4 are u n k n o w n s, i.e.

c Q= y ,( t ) C . = / o Cj - 2hC2 + 3h2C, - 4/?3C 4 = /_, (6 .6 8 ) C, - 4 hC2 + 1 2h2C3 -3 2 / z 3C4 = /_2 C, - 6hC2 + 27h2C3 -1 0 8 /z 3C 4 = /_ 3 w h e re f

0

= f ( to’ y ( *0 ))• f-2

=

f (t

0

- 2 h > y ( ^ ~ 2 h ))> f , = f ( t 0- h, y ( t0 - h )), f 3 = f ( t 0- 3h, y ( t0 - 3 h ) ) .

T h is s y s te m o f linear equation s can b e so lv e d at a fraction o f the co st in term s o f com p u tation al tim e and reso u rces com p ared to so lv in g the non-linear sy stem o f eq u atio n s (6 .6 0 ). E q u a tin g the P a d e approxim an t (6 .5 7 ) w ith the po lyn o m ial a pp ro xim atio n (6 .6 6 ), yields:

y ( l ) = C„ + q t + c / + C / + c /

=

(6 .6 9 ) \ + bxt + b2t

C ross m u ltip ly in g and co lle ctin g the co rresp o n d in g c o e fficie n ts up to the 4 th order, the

fo llo w in g an alytical ex p ressio n s are o b ta in ed for the co e ffic ie n ts a'0, a[, a‘2, b\ and b'2: CHAPTER 6 Numerical algorithms fo r the transient analysis o f HF non-linear circuits

ao — C 0 CXC3 - C xC2 + CqC2 - C 0C j c 4 Q Q - C , * 2 CjC2C 3 + C 0C 2C 4 - Cj2C 4 - C 0C32 - C 33 C ,C 3 - C 22 p r - C c y _ ^2 3 1 4 (6 .7 0 ) CjC3 - C22 C C - C 2 K = ^ Q C 3 - C 22

T h ese c o e ffic ie n ts are th en u se d to calcu late yi+i(t) as: +a[h + a'Ji2

b[h + b'2

Im p lem en tation o f a predicto r-correcto r algorithm is n o t co m p licated w ith this m eth o d either. T o fin d an ex p ressio n for th e corrector dy / dt is fitted o v e r 4 points bu t th is tim e from t0-2h to t0+ h . T ak in g the current v a lu e o f y ( t ) as the initial condition for the n e x t step (t 0 = tt) y ie ld s another 5x5 sy ste m o f linear equation s w h e re C 0, Cj, C2, C 3 an d C4 are the n e w set o f u n k n o w n co effic ie n ts calcu la ted according to

tin

th e fo llo w in g form u la for a 4 order m ethod:

c 0 = y ( i

)

< W o Q = ^ r ( - 3 A + 8 + A ) (6-72) 1 2 « c J = ^ a - 2 / „ + / _ 1) C 4 = ^ r a - 3 / o + 3/ - , - / . ! )

w h e r e y P(to+h) is the v a lu e calcu lated in th e predictor step and f i = f ( t 0 + h - y p ( h + h))> fo = / f t0, y ( t0) ) ,

f -2 = f (t0 ~ 2h> y ( t0 ~ 2h))> f j = f ( t 0~ h, y(t„ - h)).

T h e se c o e ffic ie n ts are th en u se d for calcu latin g 50, a,, a2, bx and b2 in order to obtain y M ( t ), t = t0 + h, in th e c o r r e c t o r ste p, i.e .

CHAPTER 6 Numerical algorithms for the transient analysis ofHF non-linear circuits

c = â ‘0+âih + â'2h2

y i+i (6.73)

\ + b;h+b'2h2

This valu e is then accepted as a go od approximation for y(t), and this becom es the initial condition for calculations in the next step. Fig. 6.3 presents a com parison betw een the num erical solution calculated using the Pade-fit m ethod for the test problem (6.64) and the exact analytical solution (6.65).

Fig. 6.3. Pade-fit method

A s w ith the Exact-fit m ethod, the Pade-fit m ethod is a m ultistep m ethod and it requires a singlestep m ethod in order to calculate the initial m+n-1 values after w hich calculation is resum ed according to the Pade fit m ethod algorithm.

6 .5 .3 . S o m e c o m m e n t s o n t h e E x a c t a n d P a d e f i t m e t h o d s

B oth the Exact-fit and the P ade-fit m ethods are m ultistep m ethods, hence they require one o f the singlestep m ethods in order to calculate starting values. T he m ethod used here is the 4 th order R unge-K utta-Felhberg. T he Exact-fit m ethod requires solving a system o f non-linear equations at each step w h ile the Pade-fit needs only a linear system to be solved. Thus the P ade-fit m ethod is less com putationally expensive.

IS li

/

» * to

/

\ 1}

/

1

/

Er or S -

/

1

*

/

Bror J 01 i

/

3 r

/

J 07

i > « i « i ■ • 2 1 * 1 ■ 1 • • 1

a) Exact-fit method b) Pade-fit method c) Adams-Moulton method

Fig. 6.4. Error comparison

CHAPTER 6 Numerical algorithms fo r the transient analysis o f HF non-linear circuits F ig . 6.4 sh o w s the m ean -sq u are error distribution calcu lated for 100 different step sizes h in the ran ge [ 1 O'4, 10'3] o f th e 4 th order im p lem en tation s o f the E xact-fit, P a d e -fit and A d a m s-M o u lto n m eth o d for th e e x a m p le p ro b lem (6 .6 4 ). A s can b e seen,

the E x a c t-fit m eth o d is superior in term s o f a c cu ra c y to the P a d e -fit m eth o d w h e n co m p a red for d ifferen t step sizes h. T h e E x a c t-fit m eth o d is 9 orders o f m agn itu de m ore accurate than the P a d e -fit m eth o d for th e sam e p ro b le m (F ig . 6 .4 .a) an d F ig . 6 .4 .b )) and m o re o v e r th e E x a c t-fit m eth o d is m o re than an order o f m agn itu d e m o re accurate than the w id e ly u se d A d a m s-M o u lto n m eth o d o f the sam e order (F ig . 6.4. c )). Therefore, the u se o f the E x a c t-fit m eth o d is su g g e ste d w h e n a h ig h ly accurate so lu tion is sought, w h ile the P ad e -fit m eth o d is re c o m m e n d ed w h e n com p u tational sp e e d is o f th e essen ce.

6

. 6 . M e t h o d s t h a t u s e d e r i v a t i v e s o f t h e f u n c t i o n f ( t , y ( t ) )

T h e P a d e -T a y lo r and the P a d e -X in m eth o d are the tw o n e w m eth o d s presen ted in this section . B o th m eth o d s require obtain in g an analytical ex p ressio n for d erivatives o f the fu n ctio n / in order to calcu late th e c o effic ie n ts that are n ec e ssa ry for approxim ation o f y . T h e app ro xim atin g fun ction for the P a d e -T a y lo r m eth o d is again one o f the Pade approxim an ts (6 .6 6 ), b u t the P a d e -X in m eth o d is b a s e d on a sligh tly different approach - the app ro xim atin g fu n ction is a co m b in a tio n o f a P a d e approxim an t and expon en tial part,

as g iv e n in (6 .9 2 ).

6 . 6 . 1 . P a d e - T a y l o r m e t h o d

T h e P a d e -T a y lo r m eth o d is sim ilar to the P ad e-fit m eth o d - th e differen ce is in

the w a y the co e ffic ien ts C,., i = 0 ,...,4 for calcu la tin g and 6,- in (6 .6 6 ) are obtained. A s s u m e that (6 .4 ) h as u n iqu e so lu tio n y ( t ) on [a, b] and that there ex ist p + 1 d e riv a tive s o f y ( t ) on [ a ,b ]. T h e so lu tion y ( t ) can b e ex p an d ed in a T a y lo r series about a n y p o in t tn as:

y (0 = y ( O + ( t - O y \ o + U t - o 2y \ o + . . . + — ( t - t j / p\ o + {t~ t")P y p+,)( ^ ) ( 6.74)

2! p\ (/> + l)!

T h is ex p an sio n is v a lid for t e [ a ,b \ , t„ < ¿j < t. S ubstitu tin g t = tn+I and h = tn+, - t n in (6 .7 4 ) y ield s:

h2 h p h p+l

y ( ‘, J = y ( 0 + h y \ t , ) + ^ y \ t , ) + . . . + i - / ' \ t J + (6 .7 5 )

2! pi 0 + 1)!

I f eq u a tio n (6 .7 5 ) is w ritten in term s o f a p p ro xim ate v a lu e s and tak in g into acco un t that y ' = f ( t , y ( t ) ) , it b e c o m e s

y M = y , + f ( t l , y l) h + £ ^ - h 1 + . . . + f t l ’ '’ (^ V . (6 .7 6 )

2! p\

N o w co n sid er a 4th order approxim ation. C o m p arin g (6 .7 6 ) to (6 .6 6 ) on e can see that:

c o = y C 1 = f ( t „ y l) c = (6 77)

2

2! r _ f ”(t„y,) 3

CHAPTER 6_________________Numerical algorithms for the transient analysis o f HF non-linear circuits

CA = 3! f ' X t - . y )

4 4!

T h erefore it is p o ssib le to su bstitu te the co effic ie n ts Ct, i = 0 ,...,4 in (6 .7 0 ) and proceed w ith calcu lation s in the m anner d e sc rib e d for the P a d e fit m ethod . T h e ad van tage o f the P a d e -T a y lo r m eth o d is that it is n o t n e c e ssa r y to so lv e a n y sy ste m o f equation s in order

to obtain the c o e ffic ie n ts C,., i = 0 ,...,4 . H o w e v e r , it is n e c e ssa ry to b e able to obtain d eriv a tives o f h ig h order in an alytical form .

T h e im p lem en ta tio n o f a predictor-corrector algorithm is different to the

p re v io u sly d e sc rib e d m eth o d s. It is n e c e ssa r y to d e v e lo p a corrector step, w h ic h further in creases the a c cu ra c y o f the m eth o d b u t a v o id s th e n e c e ssity for calcu lation o f e v en h igh er order d eriv a tives. T h e p ro p o se d corrector for the 4 th order m eth o d is as fo llo w s:

y i ^ y L — f ' V ^ . y L ) (« -7 8 ) w h e re yf+1 is o b ta in ed fro m the p redicto r sta ge and is an estim ate o f y(ti+i), the true solu tion at tim e ti+i. T h e rationale for the c h o ic e o f corrector is as fo llo w s: C on sider the sim p le F o r w a r d E u ler, w h ic h is an ex p licit m eth od , g iv e n as:

y ^ i = y n+hf i f n, y n) (6 .7 9 ) O n the other hand, the T rap ezo id al m eth od , w h ic h is im plicit in nature, is given:

y „ , = y „ + % ( f ( t „ , , y „ , ) + / ( t „ y . ) ) ■

(

6

.

80

)

N o w c o n sid er a predictor-corrector m eth o d that u se s the F o rw a rd E u ler as a predictor

and u se s the T rap ezo id a l m eth o d as a corrector. I f this predictor-corrector sch em e is

ap p lied to th e te st fu n ctio n y = e~‘ , it is o b s e r v e d that the result is e q u iv alen t to initially e m p lo y in g an ex p licit seco n d -o rd er T a y lo r series expan sion , i.e.

y M = y t + ( 6 -81) R etu rn in g to the m eth o d sp e cifie d in eq u a tio n s (6 .7 9 ) and (6 .8 0 ), a P a d é approxim ate o f order n m a tch es th e first n+ 1 co e ffic ien ts (tim e-d o m ain m o m e n ts) o f a T ay lo r series ex p an sio n . It also p ro v id e s additional term s. C o n sid erin g th e test fun ction e~‘, a fourth order P a d é app roxim ate is g iv e n by:

1 - 0 . 5 6 + 0.0833/22 . . . . . y M - A /2 ~ i + 0'5h + 0.0833h2

T h is fu n ction m a tch es th e first fiv e co e ffic ie n ts o f a T ay lo r series ex p a n sio n for e~'. It also p ro d u ces addition al term s, the first o f w h ic h is:

CHAPTER 6_________________Numerical algorithms for the transient analysis ofH F non-linear circuits

- 1

T6 = — h> (6 .8 3 )

6 144 '

H o w e v e r , the correct six th c o efficien t in a T a y lo r series ex p an sio n for e ' is:

T6 = — h5 (6 .8 4 )

6 120

N o tin g the o b serv a tio n regardin g the E u le r predictor-corrector, a corrector is ch osen so

as to m atch T6 for the particular test fun ction , y = e~‘ , w ith o u t requ irin g a higher-order d eriva tive. H e n c e , the ch o ic e o f corrector sp e c ifie d in eq u atio n (6 .7 8 ).

A s an illu strative ex am p le, the fo llo w in g w e ll-k n o w n cla ssic equation sy stem is u se d [S 9 7 ], E q u a tio n s (6 .8 5 ) con stitute a s tiff sy ste m o f differential equations.

/hi

— = 998w + 1998v, u (0 )= 1 .0

dt (6 .8 5 )

— = - 9 9 9 « - 1 9 9 9 v , v (0 )= 1 .0 dt

T h e an alytical so lu tion for sy ste m in eq u a tio n (6 .8 5 ) is g iv e n by: u(t) = 4 e - ' - 3 e ~ mo'

K ’ (6 .8 6)

v(/) = - 2e-'+3e-lom

T h e resu lt c o m p u te d w ith the A d a m s M o u lto n predictor-corrector for a step -size o f 1ms, su p erim p o sed on th e an alytical solution, is sh o w n in F ig . 6.5. N o te that there is a d isc re p a n cy b e tw e e n th e A d a m s-M o u lto n m eth o d result and the e x a ct resu lt o v er the tim e interval from 4 -6 secon d s. T h e corresp on d in g resu lt com p u ted w ith the n e w p redicto r-correcto r a n d a step -size o f 8m s, i.e. e ig h t tim es larger, is sh o w n in F ig . 6.6.

N o t e th e in c re a s e d le v e l o f a c c u ra c y .

CHAPTER 6 Numerical algorithms for the transient analysis o f HF non-linear circuits

F i g . 6 . 5 . Results computed with Adams Moulton predictor corrector

b n * [ m s ] t im e [ m i ]

F i g . 6 . 6 . Results computed with Padé-Taylorpredictor corrector

A s evidenced b y these results, the n e w technique is superior for the given step- size and therefore permits a significantly larger step-size for a com parable level o f accuracy. A similar speed up (seven tim es), is obtained for a M E S F E T am plifier circuit described by a system o fte n stiff differential equations as reported in [C D B02],