Lecture 7a : Numerical Solution of Differential Equations
Objectives
In this lecture you will learn the followin g
How does one simulate the behaviour of a dynamical system numerically ?
Runge-Kutta Fourth order method
Why numerical methods ?
The reason we have taken a minor diversion here is that we wish to know the techniques to "understand" how
systems described by differential equations behave. For very simple systems like the one below:
It is clear that x=0 is an "equilibrium" solution of the system, since, the LHS of the above equation equals zero
at this value of x. In general, the behaviour of x, when its value at time t = 0 is x(0) is given by :
Verify that the above "solution" satisfies the differential equation. Note that the solution is in terms of a well
known exponential function. If a > 0 , then the magnitude of x(t) keeps increasing with time if x(0) is not
zero. On the other hand, if a<0, then x(t) tends to go to zero as time progresses. Thus, we are able to gain an
insight into the behaviour from the solution given above.
However, it turns out that for many systems, it is not possible to write down the solution in terms of well
understood simple functions. This occurs when the RHS of the differential equations have terms which are
nonlinear or time variant functions of the variables. For example, the behaviour of rotor angle and speed
deviation for a synchronous machine is described by the non-linear differential equations:
To understand the behaviour of such a system one has to turn to the numerical solution of these equations.
Numerical Solution of Differential Equations
Since it is difficult to obtain the solution for a nonlinear set of differential equations, we try to utilize a computer
program which numerically computes the solution at discrete points in time. An alternative would have been to
implement a setup using scaled physical elements which mimic the differential equations, i.e., an analog computer.
However, given their flexibility, numerical evaluation using computers is convenient and economical.
So how do we solve the differential equations numerically ? Let us consider a simple example: