Numerical Integration
Numerical Integration
Appendix V
A set of differential equations can be represented by the general expression *=/(*,*) (V.I)
Eqn. V.I is also applicable to nonlinear conditions such as magnetic saturation and the V - I curves associated with semiconductor devices and arc phenomena. From information at an instant tn, Taylor's expansion predicts the value of % at tn+i = tn + h, i.e. h2 h3
(V.2)
The Taylor-series expansion forms the basis of many integration methods. The simplest is Euler's method, which takes only the first two terms of Taylor's expansion of x and discretises, i.e. xn+1^xn + hf(tn,xn), where h = At (V.3)
Greater accuracy can be achieved by taking more terms from the Taylor expression and considering a range of points in time, e.g. tn, tn+h9 tn + 2h e t c * One such method, the fourth order Runge-Kutta, is accurate through terms up to h4 from the Taylor expression * n+ 1 = * + [K + 2&x + 2h2 + A3]/6 where *o = */('.*.) (V.4)
384
broad approaches to the solution of eqn. V.I are also used: predictorcorrector methods and Richardson extrapolation. In predictor-corrector methods, information from previous steps is used to estimate xn+1. /(/+i>^n+i) is then used to improve the solution for xw + 1 . This predictioncorrection step can be iterated to convergence between successive estimates of xn + i and the slope at that point. All of these methods yield improved solutions as the step size h is decreased. In Richardson extrapolation, the results for several step sizes are extrapolated to what they would be if the step size could be reduced to zero. A special use of eqn. V.I is the state-variable set of linear differential equations, i.e. x = [A]x + [B]u (V.5)
One of the main advantages of state-space analysis is the ability to adaptively adjust the step size h during simulation. This is particularly relevant to HVDC systems, since the step size can be made to coincide with switching instants and to accurately resolve the high-frequency transients which occur after each switching action. An adaptive step-size algorithm requires an estimate of the error at each time step. If the error is too large, the step size is reduced and, conversely, if the error is too small. An estimate of the error can be obtained by comparing the solution at x obtained by two integration methods of different truncation order in the Taylor-series expression. Sometimes, as in the embedded Runge-Kutta formulae, this does not require any extra evaluations of the RHS of eqn. V. 1. Step-size adjustment can also frequently be anticipated near switching actions. In the case of HVDC systems, which are stiff, the use of adaptive step-size control will generally lead to very small step sizes owing to the large range of size of system eigenvalues. This would lead to very large simulation times, despite the fact that the large eigenvalues (small time constants and high frequencies) often contribute little to the overall solution of any instant. To maintain numerical stability with larger step sizes, implicit-solution methods are used. In implicit methods, the RHS of eqn. V. 1 is evaluated at the new time step. The implicit version of the (explicit) Euler method is the backward Euler scheme
xn + 1=xn + hfltn,xn
For a linear system, (eqn. V.5)
+ 1)
(V.6)
(V.7)
Implicit schemes require the solution of a linear system involving either the system matrix or a Jacobian for linear and nonlinear ordinary differential equations, respectively. Stability with regard to Euler integration can be
Numerical integration
385
demonstrated by considering the effect of step size in the implicit and explicit Euler methods for the special case of a stable linear system with symmetric system matrix (A). In this case, for explicit Euler integration = xn A^Axn neglecting source terms
For the sequence denned by eqn. V.8 to be bounded, all the eigenvalues of (I AtA) must be less than one in magnitude. For the special case considered all the eigenvalues of A are positive and real. The largest eigenvalue of (I AtA) is 1 Almax, where /lmax is the largest eigenvalue of A. Consequently, to be stable
since
the eigenvalues are (1 + XAt) l which are less than one for all At for the special case considered. The above result holds for all linear systems, not just those which are symmetric.1 Implicit versions of Runge-Kutta and Richardson extrapolation have also been developed. The most commonly used implicit integration scheme in a power system context has been trapezoidal integration. Trapezoidal integration is the average of the implicit and explicit Euler methods. For a linear system, eqn. V.I becomes
+un)
(V.9,
The advantage of trapezoidal integration for stiff systems is that it is the best A-stable method, an A-stable method being one which is stable for all At > 0, provided that the real parts of the system-matrix eigenvalues are all negative. In fact, no explicit method is A stable, no implicit method of order greater than 2 is A stable and, of the order 2 methods, trapezoidal
Downloaded 30 Oct 2012 to 180.211.118.146. Term of Use: http://digital-library.theiet.org/journals/doc/IEEDRL-home/info/subscriptions/terms.jsp
386
integration is the most accurate. A disadvantage of the trapezoidal rule is that a linear system involving the system matrix must be solved at each time step. There is, therefore, a strong incentive to hold the time step constant, so that [I (A/2)A] can be stored in factored form. This dramatically reduces the computational overhead at each time step for linear-sparse systems. For smaller systems, e.g. an HVDC rectifier, A is small enough that the time step can be adaptively controlled to coincide with switching instants or higher frequency responses that it is desired to resolve.
Reference
1 PRESS, W.H., TEUKOLSKY, S.A., VETTERLING, W.T., and FLANNERY, B.P.: 'Numerical recipes in Fortran. The art of scientific computing (Cambridge University Press, 1992 2nd edn.)