 ### Transcription

Comment: You are suggested to read the following portions of the text: Section 7.11, pp 262-264; Section 7.12, pg. 264 andthe first paragraph at the top of pg 265; Section 7.13, pp. 275-277; Section 7.14, pp. 277-278; Appendix B, 675-683.Numerical Methods1.0 Problem set-upWe previously showed that we may write the swingequation for a single machine as a pair of first-orderdifferential equations, according to: Re2H Pm Pe ( (t )) (1) (2)Here, Pe(δ(t)) is given by the power flow equations:Pei Ei2Gii Ei E jYij cos( ij i j )j 1j i(3)where Ei, Ej are the internal bus voltage magnitudes havingangles of δi and δj, respectively, and Yij Gij jBij Yij/ θij isthe element in the ith row, jth column of the appropriate Ybus. Depending on the particular time interval we areintegrating, the “appropriate Y-bus” will be Y1, Y2, or Y3,corresponding to pre-fault, fault-on, and post-faultconditions, respectively, as described in the notes called“Multimachine.”1

The solution to (1) and (2) is found by integrating bothsides of each equation, resulting intt00 (t ) ( )d Re2Htt00 Pm Pe ( ( )) d (4) (t ) (0) ( )d ( )d (5)Note that δ appears in the integrand of (4),and that ω appears in the integrand of (5).But these functions are what we are trying to compute.And so we observe that in general, we will not be able toobtain any closed form expression for δ and ω; we cannotsolve for them in closed form. Thus, our only choice is toresort to numerical integration.More compactly, we may define x1 ω and x2 δ, so that (4)and (5) may be written asx 1 f1 ( x1 , x2 ) x f ( x) x2 f 2 ( x1 , x2 ) 2(6a)

At this point, we need to recall that,if we want to represent additional nodes beyond theinternal machine nodes (i.e., if we want to represent anyload buses),the differential-algebraic system (DAS) of the powersystem “electromechanical positive-sequence timedomain simulation problem” has another set ofequations to deal with;the algebraic set, which is a function of the algebraicvariables and the states.Thus, our real problem is stated as (6a) plus the algebraicset, i.e.,𝑥̇ 𝑓 (𝑥, 𝑦)(6b)0 𝑔(𝑥, 𝑦)where x represent the state variables, y represents thealgebraic variables, and 0 g(x, y) represents the algebraicequations.One advantage we do have in seeking to solve (6b) is thatwe do know x(0), i.e., we know the initial angles andspeeds δ(0) and ω(0), so it is an initial value problem (δ(0)3

comes from the solution of the power flow equations, andω(0) 0).Figure 0a, taken from a very famous paper on this subject, shows the so-called “interface problem” between thedifferential and algebraic equations of the DAS. Thisproblem refers to the need to solve both the ODEs of thesystem (on the left of Fig. 0a) as well as the algebraicequations of the system (on the right of Fig. 0a).Fig. 0aIn general, there are two classes of methods foraddressing the interface problem and thus solving theODEs and the algebraic equations: Alternating (or partitioned) approach: Here, we4

1. solve the differential equations using values of thealgebraic variables from the initial power flow solution;2. solve the algebraic equations using angles from thedifferential equations;3. solve the differential equations using values ofalgebraic variables from step 2; return to step 2.The alternating method applies numerical integration toonly the discretized ODEs (and not to the originalalgebraic equations). For this reason, the alternatingmethod may use either explicit integration (whichintegrates only and so cannot include the algebraicequations) or implicit integration (which integrates bysolving nonlinear algebraic equations and so can includethe algebraic equations). Direct (or simultaneous) solution method: Here, wecombine the ODEs (discretized, and therefore algebraicequations) and the original algebraic equations into asingle set of algebraic equations. This single set ofalgebraic equations are nonlinear, and so a nonlinearsolver such as Newton-Raphson is used to solve them.Because the direct solution method solves together the5

discretized ODEs and the algebraic equations, it cannotuse explicit integration; rather, it must use implicitintegration.Figure 0b (7.13 in your text) illustrates the various designdecisions associated with building a time-domainsimulation software application. The top attribute(hardware) is whether one wants to parallelize thecomputations or not. The second layer is whether oneuses alternating or direct solution methods. The thirdlayer is whether one uses explicit or implicit integrationmethods (we will discuss this further in these notes). Thefourth layer depicts the type of nonlinear solver chosen.The fifth layer shows that a linear equation solver is alsoneeded, because most nonlinear solvers require one.Figure 0b6

Towards the end of these notes (Sec 5.2, pp. 37-39), wereturn to the topic of solving ODEs vs. algebraic equations,while explaining how to treat the network when retainingnodes beyond those representing internal machine nodes.Regardless of whether we use the alternating approach(with either explicit or implicit integration) or the directsolution approach (with implicit integration), we mustsolve ODEs of the problem posed in (6b) (repeated herefor convenience):𝑥̇ 𝑓 (𝑥, 𝑦)(6b)0 𝑔(𝑥, 𝑦)And so let’s look at a simpler initial value ODE problem inone-dimension (i.e., a single state variable):x f ( x(t )),x(0) x0(7)So we want to solvett00x(t ) x ( )d f ( x( ))d 7(8)

If we are going to try a numerical solution, i.e., one usingcomputers, then we must deal with discrete time. Indiscrete time, (8) becomes:kTx(kT ) f ( x(k ))d 0kT T kT f ( x(k ))d f ( x(k ))d kT T0(9)x ( kT T )From (9), we can write:kTx(kT ) x(kT T ) f ( x(k ))d kT T(10)Equation (10) says the following:If we want to know x at the “next” step, kT, we needto know x at the “last” step, kT-T, and we need toknow the integral in (10). This integral is giving us thechange in x from the last step to the next, i.e.,kT x f ( x(k ))d kT T8(11)

Since we do know x(0), we can say that we know x at the“last” step. Thus, solving our problem requires only theability to compute the integral in (11).There are many methods that will allow us to compute theintegral in (11). We will review only a few of them. Youshould read Appendix Section B in your text as backgroundmaterial for this topic.2.0 Euler methodConsider plotting our function f(x(t)) as a function of t.What we want to do, based on (11), is to obtain the areaunder the curve of f(x(t)) from t kT-T to t kT, as illustratedin Fig. 1.9

f(x(t))f(x(kT))f(x(kT-T))kT-TkTtFig. 1Here is a proposed approach: Assume that f is constantthroughout the interval at f(kT-T). This assumption isclearly not good if kT is large, but it might be reasonable ifkT is made small enough.This approach approximates the integral as the areashaded by the vertical lines in Fig. 2. One observes that itmisses the area shaded by the horizontal lines in Fig. 2.10

f(x(t))f(x(kT))errorf(x(kT-T))kT-TkTtFig. 2kT f ( x(k ))d (10)x(kT ) x(kT T ) Tf ( x(kT T ))(12)x(kT ) x(kT T ) kT TAnalytically, (10) becomeswhere the last term is x. This approach is also called the“forward rule” because we assume a value for f and holdit constant as we move forward in time.11

2.1 Alternative development of forward ruleWe may also develop the forward rule in another way .Assume that we know x(kT-T) and that T is chosen smallenough so that x(kT) is close to x(kT-T). Then by Taylorseries,T2T2 x t kT T x t kT T .x(kT ) x(kT T ) Tx t kT T 23! x(kT T ) Tx t kT T (T 2 )(13)where O(T2) is the remainder of the Taylor series, and itsargument T2 indicates that the lowest power of T presentin the remainder is T2.If T is small enough, O(T2) is negligible andx(kT ) x(kT T ) Tx t kT Twhere the last term is x. This is illustrated in Fig. 3.12(14)

x(t)errorx(kT)x(kT-T)kT-TkTFig. 3Recalling that x f (x) , (14) becomesx(kT ) x(kT T ) Tf ( x(kT T ))(15)which is the same as (12), our forward rule.From both Figs. 2 and 3, we can observe that the forwardmethod will incur some error, and this error will increasewith larger values of T.13

One major problem with this method is that if T is toolarge, the error will propagate from one time step toanother.This means that error incurred at one time step kT will addto the error incurred at later time steps. Solution methodswhere this can happen are said to be numericallyunstable.However, occurrence of this phenomenon does dependon our choice of T. I will provide you with a way to considerthis issue.2.2 Numerical stability of forward ruleThe following development may be hard to follow if youhave not had a course in discrete-time systems andcontrol. ISU offers such as course as EE 576. The text byFranklin & Powell is a well-known text in this area.I will state some “Facts,” without proof, that we need inorder to consider numerical stability of integrationschemes. This will give you a framework to consider thisissue. If you want more depth, take EE 576, or read theFranklin & Powell book, or read a similar one.14

Fact 1: A transfer function in Laplace, H(s) correspondingto continuous time impulse response h(t), may beobtained for a dynamical system.Fact 2: The eigenvalues of the system are the poles of thetransfer function, i.e., the roots of the denominator ofH(s).Fact 3: The system is stable if all poles are in the left-handplane.Fact 4: We may discretize H(s) in a number of differentways, and the particular way of discretization will specifythe mapping between the Laplace variable “s” (used in thetransform H(s) of the continuous-time function h(t)) to thez-domain variable z (used in the transform H(z) of thediscrete-time function h(kT)). Specifically, use of theforward integration rule corresponds to finding a zdomain transfer functionH ( z ) H ( s ) s z 1T(16)where H(z) is the z-transform of the system’s discrete timeimpulse response (see Franklin & Powell, pp. 54-56)15

Fact 5: Whereas the continuous-time system is stable if allpoles of H(s) are in the left-half-plane, the discrete-timesystem is stable if all poles of H(z) are within the unit circle.This is because z/(z-γ) corresponds to a discrete-time poleat γ, which has a z-transform of:z z kTu (kT )(17a)where u(kT) is the unit step-function such that𝑢(𝑘𝑇) {0, 𝑘 01, 𝑘 0(17b)From (17a), we see that if γ 1, the time-domain termwill go to infinity as time increases. This would indicateunstable behavior.Fact 6: From Fact 4, a pole of H(s), call it sp, maps to the zplane according to:sp z p 1T z p 1 Ts p(18)Conclusion: The stability of the discrete-time system (asindicated by whether all zp are within unit circle) depends on16

The stability of the continuous time system through thelocation of continuous time system eigenvalues, sp, and The time step T.Let’s look at how an eigenvalue sp maps to the z-planethrough the function (18).s-planej*Im(s) jωzp 1 Tspj*Im(z)1spσ Re(s)z-plane jω-1 STABLEσpRe(z)1-1STABLEFig. 4From Fact 5, we recall that if all poles zp are within the unitcircle, H(z) is stable. So this implies that for stability, thepoles must map to the z-plane so that17

zp 1(19)But the forward rule corresponds to a mapping ofz p 1 Ts p(20)Substitution of (20) into (19) yields:1 Ts p 1(21)s p p j p(22)ButSubstitution of (22) into (21) results in1 T p j p 1(23)1 T p jT p 1(24)OrTaking the magnitude of the complex number within (24) 1 T T 2p2pSquaring both sides results in18 1(25)

1 T T 22pp 1(26)Observe, in (26), that if σp 0 (a right-half-plane pole!),then (25) will be violated. Since (25) must be satisfied forthe discrete-time-system to be stable, we see that anunstable continuous time system necessarily implies anunstable discrete time system. This is a good thing,because we would not be happy if our integration methodcould stabilize an unstable simulation.And so we are no longer interested in unstablecontinuous-time systems since we know our integrationmethod will also show them to be unstable, as desired.What we are interested in are the stable continuous timesystems. Is it possible for our integration method to causethem to be unstable?And so we will assume now that σp 0 (implying a stablecontinuous time system).Expanding (26), we get1 2T p T 2 p2 T 2 p2 1(27)Subtracting off 1 from both sides, and factoring out a T,19

T 2 p T p2 T p2 0(28)Now T will always be positive (it is step size). Therefore for(28) to be true, it must be the case that2 p T p2 T p2 0(29)Solving for T results inT 2 p p2 p2(30)Equation (30) must be satisfied in order to be sure that theforward integration method does not create numericalinstability.But there are many eigenvalues sp! Which one to choose?The answer is to choose the one with the smallest ratiocorresponding to the right-hand-side of (30), as that onewill most restrict what T can be. This means we want theeigenvalues with small σp and large ωp. For these kind ofeigenvalues, it will be the case that σp ωp. Therefore,(30) collapses to20

T 2 p p2(31)These eigenvalues are typically the “fast” modes, usuallyassociated with the excitation system. These eigenvaluesare closely related to the time constants of the controlsystems.You can test out the above theory with a stability programthat uses the forward integration rule by decreasing thetime constant of the excitation system for one of yourgenerators, keeping the time step fixed. At some point,you will see instability. Then begin decreasing your timestep, and then you will see it stabilize!The “cost” of decreasing the time step is that it increasesthe computation time.There are other ways of improving numerical performance ofan integration method. We will look at two of these.1. Reduce the error: we will look at two methods of doingthis.2. Use an implicit integration method: we will look at twomethods of doing this.21

3.0 Reducing the errorTwo algorithms that improve on the forward (Euler)method are predictor-corrector and Runge-Kutta. We willlook at both briefly.3.1 Predictor-corrector methodThis method is called the modified Euler in your text. Theidea here is that we will take a step to compute x(kT) (apredictor) and then we will use that calculation torecalculate that same step (the corrector).Step 1: Predict x(kT) using Euler to get x(kT):In (32), the expressionunder f is “x-dot of kT-T”.x p (kT ) x(kT T ) T f ( x(kT T )) (32) x ( kT T )Step 2: Use xp(kT) to obtain a corrected value xc(kT):a. Get a corrected derivative fc as the average of thederivatives at x(kT-T) and xp(kT):fc 1f ( x(kT T )) f ( x p (kT ))222 (33)

b. Then apply the forward rule:x c (kT ) x(kT T ) Tf cT x(kT T ) f ( x(kT T )) f ( x p (kT ))2 (34)This method is illustrated in Fig. 5.x t kTAnd you getthis one.4x p(kT)x(kT-T)31Average thesetwo slopes2x(t)kT-TkTFig. 5Understanding the method is facilitated by observing thesequence of points in Fig. 5. The derivative f(x(kT-T)) isobtained at point 1. The predicted point xp(kT) is obtainedat point 2. The derivative of the predicted point f(xp(kT)) is23

obtained at point 3. The final point, point 4, is obtainedfrom averaging the two obtained derivatives f(x(kT-T)) andf(xp(kT)).One can observe intuitively from Fig. 5 that the error willbe reduced. This method can be shown to be equivalentto considering up to the second derivative term in theTaylor series, therefore the error is of O(T3).This is a significant improvement over the Euler method,but it is still a numerically unstable algorithm. In otherwords, for the predictor-corrector method, for a givenminimum eigenvalue, T can be larger than it can be in theEuler method, but it is still true that the algorithm may beunstable if T is too large.3.2 Runge-Kutta method(pronounced Run-gah Kut-tah)This algorithm was developed in 1895, and it also appliesthe idea of averaging, similar to predictor-corrector, but ina slightly different way.There are different R-K algorithms of different order. Wewill only study one of them, the 4th order R-K.24

The 4th order R-K method requires, at each successive timestep, computing 4 different increments xj, as follows:Increment xjDerivativeused x1 K1 Tf ( x(kT T ))Start-pointderivative onlyK x2 K 2 Tf x(kT T ) 1 2 FirstinteriorderivativeK x3 K 3 Tf x(kT T ) 2 2 Second interiorderivative x4 K 4 Tf x(kT T ) K 3 Approx. endpoint derivativeNote the following about the Ki’s.1. Ki is always used to compute Ki 1.2. Each Ki is not a derivative but rather an increment in theintegration variable, i.e., xi K i xi (kT ) x(kT T )25(35)

Any of the Ki’s could be used to obtain the new valuex(kT).3. Use of K1 to obtain the new value x(kT) is equivalent tothe Euler method.4. The derivatives are computed at four different locationsin the interval: The beginning of the time step x(kT-T) The first interior point x(kT-T) K1/2 The second interior point x(kT-T) K2/2 The approximate end-point point x(kT-T) K3Figure 6 below illustrates the sequence of calculations,which can be understood by following the single arrowsfrom point 1 to point 2 to point 3, and then the doublearrows from point 3 to point 4 to point 5, and then thetriple arrows from point 5 to point 6 to point 7 to point 8.26

Fig. 627

Once each of the increments K1-K4 are computed, then thefinal increment is obtained by taking a weighted averageof the four increments, where the middle increments areweighted heaviest, according to (36).1 x K1 2 K 2 2 K 3 K 4 6(36)The middle increments (K2 and K3) are weighted heaviestas they are computed based on slopes that will be morerepresentative of the slope in the interval than thebeginning (K1) and final (K4) increments.The R-K method can be shown to be equivalent toconsidering up to the fourth derivative term in the Taylorseries, therefore the error is O(T5).Although this is a significant improvement over the Euleror the P/C method, R-K is also a numerically unstablealgorithm therefore the stability domain, althoughenlarged relative to the unit circle of the Euler, is bounded,as shown in the appendix.28

4.0 Two general types of integration methodsWe have so-far explored the Euler method, the P/Cmethod, and the R-K method of numerical integration.These are in a class of integration methods called explicitmethods. They are so-called because they evaluate x(kT)explicitly as a function of values at previous steps and theirderivatives.All explicit methods are numerically unstable, i.e., theyhave a bounded stability domain.Another class of integration methods that does not havethis problem is called implicit methods. We will study twoof these: Backwards rule and Trapezoidal rule.Implicit methods require a value of the function x(kT) at afuture time step. To get this, we need to perform an extraprocedural step.Implicit methods are good for “stiff” problems, whereexplicit methods must utilize small step-sizes to work. Stiffproblems are often characterized by large differencesbetween the real parts of system eigenvalues.29

5.0 Backwards ruleRecall that our integration problem is characterized by(10), repeated here for convenience.kTx(kT ) x(kT T ) f ( x(k ))d kT T(10)where we have the 1rst term (because we know the initialvalue) and need to evaluate the 2nd term, whichcorresponds to the area under the curve of f vs. time, asillustrated in Fig. 1, repeated here for convenience.f(x(t))f(x(kT))f(x(kT-T))kT-TkTFig. 130

In the forward (Euler) method, we assumed f is constantthroughout the interval at f(kT-T). This was simple, andconvenient, since we already knew f(kT-T).Now we will again assume f is constant throughout theinterval. This time, however, we will assume that it isconstant at f(kT) instead of f(kT-T), as illustrated in Fig. 8.f(x(t))f(x(kT))errorf(x(kT-T))kT-TkTFig. 8Then, (10) becomesx(kT ) x(kT T ) Tf ( x(kT ))31(37a)

Of course, (37a) is still an approximation, but this time itincludes area as indicated in Fig. 8 (as opposed to the errorof the Euler method as indicated by Fig. 2).But note a problem with this method: we do not know x(kT) !!!!If we do not know x(kT), how do we evaluate f(x(kT))?The answer to this question lies in observing that (37a) isnot a differential equation, but rather it is an algebraicequation, and there is only one unknown, x(kT). Thereforewe may solve it!Of course, we will need to account for the fact that thereis no reason to assume f is linear and in fact, most of thetime, f is nonlinear. Therefore we will need to use anonlinear algebraic solver to solve it.The Newton-Raphson is one such solver with which we arefamiliar. To apply it, let’s rewrite (37a) as𝑥 (𝑘𝑇) 𝑥 (𝑘𝑇 𝑇) 𝑇𝑓(𝑥 (𝑘𝑇)) 0(37b)and then define:F ( x(kT )) x(kT ) x(kT T ) Tf ( x(kT )) 0(38)32Observe that, in the multi-dimensional case, (38) is just a set of nonlinear algebraic equations. Thus, we may also includethe network equations into this set which enables us to solve the differential equations and the algebraic equations of theDAE simultaneously! This is one of the beauties of implicit integration methods (the other one being that they arenumerically stable). See section 5.2 in these notes for additional perspective on this issue.

Apply Taylor series expansion up to the first derivative,yieldingF ( x(kT ) x(kT )) F ( x(kT )) F ( x(kT )) x(kT ) 0(39)The derivative F’(x(kT)) is the derivative of F with respectto x, not t.Solving (39) for x(kT) results in x(kT ) F ( x(kT )) F ( x(kT )) 1(40)In Newton-Raphson, we must guess an initial solution, andthen we use (40) to iterate.In the multi-dimensional case, (40) becomes x(kT ) J ( x(kT )) F ( x(kT )) 1where J is the Jacobian given by11See Kundur, pp. 862-864 for more on this.33(41)

F1 x 1J Fn x1 F1 xn Fn x xn x x ( kT )(42)Of course, (41) is solved using a linear solver such as LUdecomposition, based on J ( x(kT )) x(kT ) F ( x(kT ))(43)We address three issues regarding this method: linearsolvers, network solutions, and numerical instability.5.1 Linear solvers An important observation about implicit methods is that(43) is just a problem in the form of Ax b and thereforesimply requires a linear solver to obtain the answer.Although solution to simultaneous linear equations is avery old topic, because implicit methods devote over 90%of their computation to this problem, it is still a veryimportant topic for problems that require highcomputational speed.34

Researchers have put much effort into writingcomputational libraries for performing solution of linearequations. The people who write these libraries knowmuch more about solving linear equations than you do. Never invert the matrix; Always use the libraries; Never write your own method.There are a number of standard, portable solver librariesavailable, including: BLAS (Basic linear algebra subprograms): Many linearalgebra packages including LAPACK, ScaLAPACK andPETSc, are built on top of BLAS. Most supercomputervendors have versions of BLAS that are highly tuned fortheir platforms. ATLAS (Automatically Tuned Linear Algebra Softwarepackage) is a version of BLAS that, upon installation,tests and times a variety of approaches to each routineand selects the version that runs fastest. ATLAS issubstantially faster than the generic version of BLAS.35

LAPACK (Linear Algebra PACKage) solves dense orspecial case sparse systems of equations depending onmatrix properties such as:o Precision: single, doubleo Data type: real, complexo Shape: diagonal, bidiagonal, tridiagonal, banded, triangular,trapezoidal, Hesenberg, general denseo Properties: orthogonal, positive definite, Hermetian (complex),symmetric, general.LAPACK is built on top of BLAS, which means it canbenefit from ATLAS. LAPACK is a library that you candownload for free from www.netlib.org. ScaLAPACK is the distributed parallel (MPI) version ofLAPACK. It contains only a subset of the LAPACKroutines. ScaLAPACK is also available fromwww.netlib.org. PETSc (Portable, Extensible Toolkit for ScientificComputation) is a solver library for sparse matrices thatuses distributed parallelism (MPI). It is designed forgeneral sparse matrices with no special properties, butit also works well for sparse matrices with simple36

properties like banding & symmetry. It has a simplerApplication Programming Interface than ScaLAPACK.When choosing a solver, pick a version that’s tuned for theplatform you’re running on, and use the information thatyou have about your system to select the one that will bemost efficient. You will have to do some research anddiscuss with people to gain a level of knowledge to enableyou to most effectively make this selection.Figures 9 and 10 illustrate the relation between implicitintegration methods, nonlinear solvers, & linear solvers.Fig. 937

Fig. 105.2 Network solutionsThis section recaps information given on pp. 3-5 of thesenotes.In our problem formulation, because we eliminate allnodes except machine internal nodes, we are able toknow all node voltage magnitudes and thus write theentire problem (swing dynamics and network equations)as a single set of state equations where the only unknownsare the states (angles and speed).38

However, if we represent load as something other thanconstant impedance, then we may want to retain identityof these buses. But we will not know the bus voltagemagnitude (or the angle), yet, because there is no swingdynamics at this bus, there will be no state equation for it.We will see later that the solution to this problem is towrite a set of algebraic equations for the network. Theseequations, essentially the Y-bus relation, are then solvedtogether with the state equations of the swing dynamics.In the explicit integration methods, the only way to do thisis through what is called a partitioned approach where thestate equations are first solved and then the networkequations are solved separately. The reason why this isthe only way to do this is because the two sets ofequations (ODEs and algebraic equations) must usedifferent methods for solutions.One problem encountered by the partitioned approach isreferred to as the interface error, where the solution tothe state equation is not quite consistent with the solutionto the network equations.39

The partitioned approach may be used with implicitintegration methods also. In this case, implicit methodswill also encounter the problem of interface error.In addition, implicit integration methods enable a secondapproach called the direct solution (or simultaneous)approach, where the network equations are embedded in(43) and solved at the same time as the state equations.This very convenient method eliminates interface error.5.3 Numerical stability for backwards ruleThe following development is very similar to that given inSection 2.2. Again, additional reading may be found in thethe text by Franklin & Powell.I will again state “facts,” and in fact Facts 1-3 and 5 areexactly as before. This analysis differs only in Facts 4 and6.Fact 1: A transfer function in Laplace, H(s) correspondingto continuous time impulse response h(t), may beobtained for a dynamical system.40

Fact 2: The eigenvalues of the system are the poles of thetransfer function, i.e., the roots of the denominator ofH(s).Fact 3: The system is stable if all poles are in the left-handplane.Fact 4: We may discretize H(s) in a number of differentways. Whereas use of the forward integration rulecorresponds to finding a z-domain transfer functionH ( z ) H ( s ) s z 1T(16)where H(z) is the z-transform of the system’s discrete timeimpulse response (see Franklin & Powell, pp. 54-56), useof the backwards integration rule corresponds to finding az-domain transfer functionH ( z ) H ( s ) s z 1Tz(44)Fact 5: The discrete-time system is stable if all poles of H(z)are within the unit circle. This is because z/(z-γ)41

corresponds to a discrete-time pole, which has a ztransform of:z z kTu (kT )(17)From (17), we see that if γ 1, the time-domain term willgo to infinity as time increases.Fact 6: From Fact 4, whereas a pole of H(s), call it sp, mapsto the z-plane in the forward rule according to:sp z p 1T z p 1 Ts p(18)in the backwards rule, a pole of H(s), sp, maps to the zplane according to:sp z p 1Tz zp 11 Ts p(45)Conclusion: For the forward rule, the stability of thediscrete-time system depends on42

The stability of the continuous time system through thecontinuous time system eigenvalues, sp, and The time step T.For the forward rule, we concluded that the dependenceon T was that T had to satisfyT 2 p p2 p2(30)The question we must answer now is: For the backwardsrule, (a) does stability of the discrete-time also depend onT, and (b) if so, in what way?Let’s take the same approach by looking at how aneigenvalue sp maps to the z-plane through the function(45). Our real question here is: what are the conditions onT to force all left-hand-plane eigenvalues of H(S) to mapinto the unit circle of the z-plane?43

s-planej*Im(s) jωzp 1/(1-Tsp)j*Im(z)1spσ Re(s)z-planexjω-1 STABLEσpRe(z)1-1STABLEFig. 11From Fact 5, we recall that if all poles zp are within the unitcircle, H(z) is stable. So this implies that for stability, thepoles must map to the z-plane so thatzp 1(19)But the backwards rule corresponds to a mapping of1zp 1 Ts p44(46)

Trick: Add and subtract ½ to the right-hand-side:1 11 zp 2 1 Ts p 2 (47)Getting common denominator for the term in brackets:1 2 1 Ts p 1 1 1 Ts p zp 2 2(1 Ts p ) 2 2 1 Ts

3. solve the differential equations using values of algebraic variables from step 2; return to step 2. The alternating method applies numerical integration to only the discretized ODEs (and not to the original algebraic equations). For this reason, the alte