Mathematical Problems in Engineering

Volume 2015, Article ID 139036, 21 pages

http://dx.doi.org/10.1155/2015/139036

## A Modified Hybrid Genetic Algorithm for Solving Nonlinear Optimal Control Problems

^{1}Department of Applied Mathematics, Payame Noor University, Tehran 193953697, Iran^{2}Department of Applied Mathematics, Faculty of Mathematical Science, Ferdowsi University of Mashhad, Mashhad 9177948953, Iran

Received 4 September 2014; Accepted 30 January 2015

Academic Editor: Alain Vande Wouwer

Copyright © 2015 Saeed Nezhadhosein et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Here, a two-phase algorithm is proposed for solving bounded continuous-time nonlinear optimal control problems (NOCP). In each phase of the algorithm, a modified hybrid genetic algorithm (MHGA) is applied, which performs a local search on offsprings. In first phase, a random initial population of control input values in time nodes is constructed. Next, MHGA starts with this population. After phase 1, to achieve more accurate solutions, the number of time nodes is increased. The values of the associated new control inputs are estimated by Linear interpolation (LI) or Spline interpolation (SI), using the curves obtained from the phase 1. In addition, to maintain the diversity in the population, some additional individuals are added randomly. Next, in the second phase, MHGA restarts with the new population constructed by above procedure and tries to improve the obtained solutions at the end of phase 1. We implement our proposed algorithm on 20 well-known benchmark and real world problems; then the results are compared with some recently proposed algorithms. Moreover, two statistical approaches are considered for the comparison of the LI and SI methods and investigation of sensitivity analysis for the MHGA parameters.

#### 1. Introduction

NOCPs are dynamic optimization problems with many applications in industrial processes such as airplane, robotic arm, bio-process system, biomedicine, electric power systems, and plasma physics [1].

High-quality solutions and the less required computational time are main issues for solving NOCPs. The numerical methods, direct [2] or indirect [3], usually have two main deficiencies, less accuracy and convergence to a local solution. In direct methods, the quality of solution depends on discretization resolution. Since these methods, using control parametrization, convert the continuous problem to discrete problem, they have less accuracy. However, the adaptive strategies [4, 5] can overcome these defects, but they may be trapped by a local optimal, yet. In indirect approaches, the problem, through the use of the Pontryagins minimum principle (PMP), is converted into a two-boundary value problem (TBVP) that can be solved by numerical methods such as shooting method [6]. These methods need the good initial guesses that lie within the domain of convergence. Therefore, the numerical methods, usually are not suitable for solving NOCPs, especially for large-scale and multimodal models.

Metaheuristics as the global optimization methods can overcome these problems, but they usually need more computational time, though they do not really need good initial guesses and deterministic rules. Several researchers used metaheuristics to solve optimal control problems. For instance, Michalewicz et al. [7] applied floating-point Genetic algorithms (GA) to solve discrete time optimal control problems; Yamashita and Shima [8] used the classical GAs to solve the free final time optimal control problems with terminal constraints. Abo-Hammour et al. [9] used continuous GA for solving NOCPs. Moreover, the other usages of GA for optimal control problems can be found in [6, 10]. Lopez Cruz et al. [11] applied differential evolution (DE) algorithms for solving the multimodal optimal control problems. Recently, Ghosh et al. [12] developed an ecologically inspired optimization technique, called invasive weed optimization (IWO), for solving optimal control problems. The other well-known metaheuristic algorithms used for solving NOCPs are genetic programming (GP) [13], particle swarm optimization (PSO) [14, 15], ant colony optimization (ACO) [16], and DE [17, 18].

To increase the quality of solutions and decrease the running time, hybrid methods were introduced, which used a local search in the implementation of a population-based metaheuristics, [19]. Modares and Naghibi-Sistani [20] proposed a hybrid algorithm by integrating an improved PSO with successive quadratic programming (SQP) for solving NOCPs. Recently, Sun et al. [21] proposed a hybrid improved GA, which used simplex method (SM) to perform a local search, for solving NOCPs and applied it for chemical processes.

Based on the success of the hybrid methods for solving NOCPs, mentioned above, we here use a modified hybrid genetic algorithm (MHGA), which combines GA with SQP, see [22], as a local search. SQP is an iterative algorithm for solving nonlinear programming (NLP) problems, which uses gradient information. It can moreover be used for solving NOCPs, see [23–25]. For decreasing the running time in the early generations (iterations) of MHGA, a less number of iterations for SQP was used and then, when the promising region of search space was found, we increase the number of iterations of SQP, gradually.

To perform MHGA for solving an NOCP, the time interval is uniformly divided by using a constant number of time nodes. Next, in each of these time nodes, the control variable is approximated by a scaler vector of control input values. Thus, an infinite dimensional NOCP is changed to a finite dimensional NLP. Now, we encounter two conflict situations: the quality of the global solution and the needed computational time. In other words, when the number of time nodes is increased, then we expect that the quality of the global solution is also increased, but we know that in this situation the computational time is increased dramatically. In other situation, if we consider less number of time nodes, then the computational time is decreased but we may find a poor local solution. To conquer these problems, MHGA performs in two phases. In the first phase (exploration phase), to decrease the computational time and to find a promising region of search space, MHGA uses a less number of time nodes. After phase 1, to increase the quality of solutions obtained from phase 1, the number of time nodes is increased. Using the population obtained in phase 1, the values of the new control inputs are estimated by Linear or Spline interpolations. Next, in the second phase (exploitation phase), MHGA uses the solutions constructed by the above procedure, as an initial population.

The paper is organized as follows: in Section 2, the formulation of the problem is introduced. In Section 3, the proposed MHGA is presented. In Section 4, we introduce our algorithm for solving NOCP. In Section 5, we provide 20 numerical benchmark examples, to compare the proposed algorithm with the other recently proposed algorithms. In Section 6, we consider two statistical approaches for the comparison of the LI and SI methods and investigation of sensitivity analysis of the algorithm parameters. The impact of SQP, as local search, in the proposed algorithm is surveyed in Section 7. We conclude in Section 8.

#### 2. Formulation of Problem

The bounded continuous-time NOCP is considered as finding the control input , over the planning horizon , which minimizes the cost functional:subject towhere denotes the state vector for the system and is the initial state. The functions , , , , , and are assumed to be sufficiently smooth on appropriate open sets. Cost function (1) must be minimized subject to dynamic (2), control and state equality constraints (3) and control and state inequality constraints (4), the final state constraints (5), and the initial condition (6). A special case of the NOCPs is the linear quadratic regulator (LQR) problem where the dynamic equations are linear and the objective function is a quadratic function of and . The minimum time problems, tracking problem, terminal control problem and minimum energy are another special case of NOCPs.

#### 3. Modified Hybrid Genetic Algorithm

In this section, first MHGA, as a subprocedure for the main algorithm, is introduced. To perform MHGA, the control variables are discretized. Next, NOCP is changed into a finite dimensional NLP; see [21, 26]. Now, we can imply a GA to find the global solution of the corresponding NLP. In the following, we introduce GA operators.

##### 3.1. Underlying GA

GAs, introduced by Holland in 1975, are heuristics and probabilistic methods [27]. These algorithms start with an initial population of solutions. This population is evaluated by using genetic operators that include selection, crossover, and mutation. Here, in MHGA, the underlying GA has the following steps.

*Initialization.* The time interval is divided into subintervals using time nodes and then the control input values are computed (or selected randomly). This can be done by the following stages.(1)Let , where , , be time nodes, where and are the initial and final times, respectively.(2)The corresponding control input value at each time node is an vector, , which can be calculated randomly, with the following components.where is a random number in with a uniform distribution and are the lower and the upper bound vectors of control input values, which can be given by the problem’s definition or the user (e.g., see the NOCPs numbers and in the Appendix, resp.). So, each individual of the population is an matrix as . Next, we let , as th individual of the population, which is the size of the population.

*Evaluation.* For each control input matrix, , , the corresponding state variable is an matrix, , and it can be computed by the forth Runge-Kutta method on dynamic system (2) with the initial condition (6), approximately. Then, the performance index, , is approximated by a numerical method (denoted by ). If NOCP includes equality or inequality constraints (3) or (4), then we add some penalty terms to the corresponding fitness value of the solution. Finally, we assign to as the fitness value as follows:where , and are big numbers, as the penalty parameters, , , , , and , are defined in (3), (4), and (5), respectively.

*Selection.* To select two parents, we use a tournament selection [27]. It can be applied for parallel GA. The tournament operator applies competition among the same individuals, and the best of them is selected for next generation. At first we select a specified number of individuals from population, randomly. This number is tournament selection parameter, which is denoted by . The tournament algorithm is given in Algorithm 1.