A novel heuristic technique has been developed for solving Ordinary Differential Equation (ODE) numerically under the framework of Genetic Algorithm (GA). The method incorporates a sniffer procedure that helps carry out a memetic search within the solution domain in the vicinity of the currently found best chromosome. The technique has been successfully applied to the Korteweg- de Vries (KdV) equation, a well-known nonlinear Partial Differential Equation (PDE). In the present study we consider its solution in the regime of solitary waves, or solitons that is first used to convert the PDE into an ODE. It is then shown that using the sniffer technique assisted GA procedure, numerical solution has successfully been generated quite efficiently for the one-dimensional ODE version of the KdV equation in space variable (x). The technique is quite promising for its applications to systems involving ODE equations where analytical solutions are not directly available.
Dynamical systems involving Ordinary Differential Equations (ODEs) occur in many branches of science, including Physics, Chemistry, Biology, Econometrics etc. More often, when the system is fairly complex, involving nonlinear and non integrable system equations, analytical/symbolic solutions are not directly amenable and in this context obtaining the solution numerically helps understand the dynamics of the system. Considerable work has been reported in the literature for obtaining numerical solution for ODE equations. Seaton et al. [
In the present paper, we first consider the well known Korteweg-de Vries (KdV) equation which is a nonlinear PDE involving two independent variables in space x and time t, and is highly studied in literature since the discovery of its soliton solution by Zabusky and Kruskal [
It is known that considering a traveling wave given by
and integrating with respect to
where A is an arbitrary constant of integration. Here, when
The KdV equation is known to have an analytical solution of the form
Setting a = 0, c = 1.2 and t = 0 now onwards, the true solution of KdV equation in one dimension is shown in
Next we consider GA algorithm to get the solution sketched in
where, N is the number of grid points considered,
The fitness value for the true solution as given by Equation (5) is 0.4802-A, where the departure from -A is due to the discretized solution domain considered (resulting in chromosome representation by whole numbers in range [1, N]), as well as due to the numerical inaccuracy in calculating the derivative values. We then set A = 0.4802 so as to offset the fitness measure such that it assumes the ideal value 0 for the true solution. Thus any solution that has departure from the true solution is expected to give fitness measure > 0. It may be emphasized that any other choice of value for A does not affect the GA search procedure.
We now consider one-dimensional KdV Equation (3) and proceed to solve it numerically. Combinatorially the search space is quite complex, due to the fact that a given linear chromosome, having a list of 51 integers, can have 51 independent possible values for each element. The standard GA is found to be quite slow in making progress for converging towards the ideal value of 0. In this scenario, it is envisaged to apply a heuristic search in the local surrounding area of the currently found best solution during GP iteration. The sniffing around the best solution is aimed at making the GA search procedure more effective. In order to define a numerical measure for the locality of search, a sniffer radius denoted by
It may be noted that during the heuristic search the boundary values
GA search. In the present GA experiments these boundary values are kept at 2 within the possible range of [1, N]. Sniff1 and Sniff2 methods descried below vary
o Sniff1: Each of the
o Sniff2: A contiguous range, specified by x1 to x2(selected randomly) and the corresponding
o Sniff3: A contiguous range, specified by x1 to x2 (selected randomly) and corresponding
o Sniff4: A list of good points within the chromosome list are identified corresponding to individual fitness components (right side of Equation (5) at given value i) by checking that it is less than a pre-specified fraction of fitness value. Once the list of these good points is obtained, a polynomial function Pn(x) (i.e. up to order xn, where n is set to 4), is then passed through these points. The chromosome values are then replaced by interpolated values as given by Pn(x).
Based on the pioneering work by David Goldberg [
The search procedure for finding the best chromosome having smallest fitness value is carried out as follows,
1. A pool of chromosomes is created having individuals that are stochastically generated representing candidate solutions
2. Iterations are carried out till an acceptable solution is obtained (having fitness value smaller then a specified small value, or maximum number of iterations have been achieved)
o The fitness values for the candidate chromosomes are calculated
o Standard genetic operators (copy, crossover and mutation) are applied on the pool of chromosomes to evolve the given population to anew population, hopefully containing a better pool of candidate chromosomes. Few (at least 1) elite solutions are preserved (without any change) so as not to loose the best chromosomes discovered so far during the iterative search.
o Sniffer functions (Sniff1 to Sniff4) are activated intermittently after the GA iterations relax for a specified number of n iterations (we have chosen n = 10)
3. The best solution obtained represents the solution of the problem
The parameters used for the GA experiments are shown in
A useful feature of the GA program is to feed template curves that would be included in the pool of chromosomes. Using various forms for the template curves, different regimes of solutions are obtained by the GA pro-
Parameter | Values |
---|---|
Function set | +, −, /and * |
Termianl Set | |
Crossover | Crossing at one point |
Selection | Tournament selection |
Probability | 0.9 for crossover, 0.1 for mutation |
Fitness | As definedin equation (5) |
Sniffer Radius | 5 (as guided by 10% of the totalspan in the range [1, 51]) |
cedure aided by the sniffer technique. The GA solutions along with the templates used are shown below. Thus the inclusion of various template curves as one of the chromosomes is aimed at trying out different useful chromosome structures as potential candidates during the GA solutions.
As shown in
As shown in
As shown in
It is interesting to note that in all above GA experiments, the best solution generated by sniffer assisted GA algorithm matches exactly with the true solution having fitness measure as 0.
In order to check the sensitivity of the best solution obtained by GA, we next test the sensitivity of fitness measure as a result of applying small perturbations in the best chromosome structure. We consider following two scenarios and calculate fitness measure 1000 times and then taking the average,
1. Perturbing
2. Perturbing
In the first scenario, the average variation in fitness measure is found to be 0.172, 0.203 and 0.526 for perturbation values as 1, 2 and 5 respectively. In the second scenario, the average variation in fitness measure is found to be 1.195, 2.284 and 5.675 for perturbation values 1, 2 and 5 respectively.
It may be noted that the fitness values for the temple curves used
It has been shown that the sniffer technique assisted Genetic Algorithm approach is quite useful in solving one- dimensional KdV equation. In the present paper the numerical solutions have successfully been obtained for the well-known KdV differential equation in one dimension. The search method implements several useful variants of a novel heuristic method, called sniffer technique that helps make a detailed search in the vicinity of the best solution achieved by GA at a given instance during its iterations. The method would especially be useful for solving stiff as well as complex differential equations for which no analytical solutions exist. Work is in progress for generating numerical solution for the ODE equations in two dimensions (involving space and time), of the type in Equation (1), using which it would be interesting to generate time evolution of 1-soliton as well as 2-soliton profiles fed at time t = 0.
Dilip P. Ahalpara, (2015) Sniffer Technique for Numerical Solution of Korteweg-de Vries Equation Using Genetic Algorithm. Journal of Applied Mathematics and Physics,03,814-820. doi: 10.4236/jamp.2015.37100