Biomedical Engineering Reference
In-Depth Information
Fig. 7.25 A comparison of
the solution based on the
explicit forward Euler method
and the exact analytical
method. Time step
h =
1.2
1.0
0.8
0 . 00001 s
0.6
0.4
Forward Euler
0.2
Analytical
0.0
0.0000
0.0001
0.0002
0.0003
t
Fig. 7.26 A comparison of
the solution based on the
explicit forward Euler method
and the exact analytical
method. Time step
h
1.8
1.6
1.4
1.2
=
0 . 00006 s
1.0
0.8
0.6
Forward Euler
0.4
Analytical
0.2
0.0
0.0000
0.0001
0.0002
0.0003
0.0004
0.0005
t
7.4.2
Runge-Kutta Method
The Runge-Kutta Method is a higher order approximation to the Euler method and
comes in different orders based on the number of terms used to calculate the gradient.
In this section we present the fourth order Runge-Kutta (RK4) method as it is one
of the most widely used algorithms for solving ODEs. The gradient of an interval
is determined by taking gradient approximations at four different points within the
interval (Fig. 7.27 ).
Referring back to Eq. (7.68) the right side of the equation is evaluated by four
terms with weighted coefficients.
1
6 ( k 1 +
u t + 1 =
u t +
2 k 2 +
2 k 3 +
k 4 ) h
k 1 =
f ( t , u )
 
Search WWH ::




Custom Search