Electrical Engineering (EE) Exam  >  Electrical Engineering (EE) Notes  >  Power Systems  >  Numerical Solution of Differential Equations

Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE) PDF Download

Numerical Solution of Differential Equations

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:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
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 :
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
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:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
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:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
If we wish to obtain the solution denoted by x0, x1, x2, ....xk at the closely spaced time instants t = 0, h, 2h, .....,kh, then we can approximate the above equation as:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Therefore if xk is known, xk+1 can be obtained by
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Therefore, if the initial condition x0 is known, we can recursively find the solution of x at discrete instants of time. The approximation is likely to work well only if h is "small enough".

To illustrate this, consider the numerical solution at discrete points and compare it with the correct solution:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Let us take the constant a = -4.
We see from the figure above that the approximation works better for smaller h.
The method that we have presentated is in fact the simplest possible one and is called "Euler's Method" of numerical integration.
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
It is not difficult to see that another possible approximation of the differential equation could be:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
This is called the "Backward Euler" method. The numerical solution obtained using different approximations and different values of h could vary. Inappropriate selection of the method and the time step h can lead to errors which can cause erroneous conclusions.

Comparison of the two methods s 
We have considered two methods: Euler Method and Backward Euler method. Euler's method is simple to implement on a computer program, but is known to have poorer numerical properties. In particular, it may wrongly show a system which is actually stable to be unstable. As an example consider the following equations:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

If we use Euler Method, we descretise the equations as follows.

For a time step, h=0.1, with initial conditions x1(0)=1 and x2(0)=0.01, the numerically evalauated response is unstable, although this system is actually stable and has a time response given by:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
One has to use a very small time step (say, h = 0.005s) if one has to avoid getting a grossly incorrect numerical solution. However, this would mean more computation time, even one may be interested only in capturing the slow response corresponding to the exp(-5*t) term in the response.
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

Let us repeat this exercise with Backward Euler with the same h=0.1. The discretised equations are:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Clearly, the solution obtained from Backward Euler Method does not "blow up". It also captures the slow transient corresponding to exp(-5*t) quite accurately with this value of time step.
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

The problem with Backward Euler Method is evident when we apply it to the solution of swing equations:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Clearly, getting the values of d and w at the k+1 th instant from the values at the k th instant is tough as we have to solve nonlinear algebraic equations (how does one solve them?).

Clearly there is a trade-off between numerical accuracy and complexity of implementation! We now consider a method which is not too difficult to implement and also gives reasonably good accuracy.

Runge-Kutta Fourth Order Method
Consider the differential equation:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
The Runge-Kutta 4th order algorithm uses intermediate points in an interval of duration h to calculate the state xk+1 from xk as follows:
Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)
Note that the number of calculations per time step is larger than that for Euler Method. However, this method is more accurate than Euler method (for the same time step) for most systems.

Can you program an algorithm which implements this method for the swing equations ?

The document Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE) is a part of the Electrical Engineering (EE) Course Power Systems.
All you need of Electrical Engineering (EE) at this link: Electrical Engineering (EE)
21 videos|67 docs|45 tests

Top Courses for Electrical Engineering (EE)

FAQs on Numerical Solution of Differential Equations - Power Systems - Electrical Engineering (EE)

1. What is the numerical solution of differential equations in electrical engineering?
Ans. The numerical solution of differential equations in electrical engineering refers to the process of approximating the solution of a differential equation using numerical methods. These methods involve discretizing the differential equation and solving the resulting system of equations using computational techniques.
2. Why is numerical solution important in electrical engineering?
Ans. Numerical solution plays a crucial role in electrical engineering as it allows engineers to solve complex differential equations that cannot be solved analytically. It helps in analyzing and predicting the behavior of electrical systems, designing electrical circuits, optimizing performance, and simulating real-world scenarios.
3. What are some common numerical methods used for solving differential equations in electrical engineering?
Ans. Some common numerical methods used for solving differential equations in electrical engineering include the Euler method, Runge-Kutta methods, finite difference methods, finite element methods, and boundary element methods. These methods provide different levels of accuracy and computational efficiency based on the specific problem at hand.
4. How are numerical methods implemented in electrical engineering software tools?
Ans. Numerical methods for solving differential equations are often implemented in electrical engineering software tools through algorithms and numerical libraries. These tools provide pre-defined functions and routines that can be used to solve differential equations numerically. Engineers can input the relevant equations and parameters into the software, which then applies the appropriate numerical method to obtain the solution.
5. What are the limitations of numerical solutions for differential equations in electrical engineering?
Ans. Numerical solutions for differential equations in electrical engineering are subject to certain limitations. These include the potential for round-off errors and truncation errors, which can accumulate and affect the accuracy of the solution. Additionally, the choice of numerical method and discretization parameters can impact the stability and convergence of the solution. It is important for engineers to carefully select appropriate numerical methods and validate the results to ensure the reliability of the solution.
21 videos|67 docs|45 tests
Download as PDF
Explore Courses for Electrical Engineering (EE) exam

Top Courses for Electrical Engineering (EE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Exam

,

shortcuts and tricks

,

Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

,

Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

,

Extra Questions

,

Important questions

,

Numerical Solution of Differential Equations | Power Systems - Electrical Engineering (EE)

,

Summary

,

MCQs

,

Viva Questions

,

past year papers

,

Objective type Questions

,

video lectures

,

mock tests for examination

,

practice quizzes

,

ppt

,

pdf

,

Previous Year Questions with Solutions

,

Sample Paper

,

study material

,

Semester Notes

,

Free

;