SWITCHING GAIN CONTROLLER IN DESIGNING OPTIMUM CONSTRAINT CONTROL PROBLEMS BASED on GENETIC ALGORITHM

–This paper introduces an iterative approach for the design of an optimum switching gain controller for a linear time-invariant single-input/single-output (SISO) system. The controller parameters are determined at different switching instants to improve the dynamic characteristics of a closed-loop system and satisfy a set of inequalities. The selected approach is based on solving a constrained parameter optimization problem. Optimization is carried out based on the genetic algorithm (GA) to ﬁnd the optimum number of switching, optimum switching instants and optimum controller parameters vector. All that in the sense of minimizing a certain time-based objective function and satisfying a set of parametric and operating constraints. Constraints imposed on the controlled system may be in the form of design speciﬁcations and/or performance requirements. The technique is applicable for any controller structure and gives a set of optimum parameter values switched at optimum switching instants. Parameter values are a function of the system states at these instants. Different systems are examined to show the applicability of the presented approach.


I. INTRODUCTION
Switching systems are considered as a specified division of hybrid systems.It is composed of various subsystems with switching control rules that coordinate the active subsystem at certain instants of time [1][2][3][4].The main issues confronted with these systems are stability, stabilization and the problem of finding the optimal control law [5][6][7][8].Recent computational methods for optimal control problems associated with switching systems is based on the type of switching.They can be classified as internally forced switching (IFS) and externally forced switching (EFS) problems.For EFS problems, methodologies of two-stage optimization and switching linear quadratic regulator (LQR) design are investigated [9,10].
For linear time-invariant (LTI) systems, the system dynamics can be improved by using switchable controllers.The optimal control problem using switched controllers is a special class of switching systems.The problems of optimal control and optimal switching for switched systems, which require the solutions of the optimal switching sequences, have attracted the attention of many researchers in recent years [11].If the controller is considered in the process of switching for a single system model rather than for subsystem models, a special class of optimal switching systems is generated.This class of problems with the present advances in optimization algorithms is not well mentioned in the literature.This paper presents an iterative solution to this problem.The design process of an optimum controller for any control problem requires the selection of both the structure and the parameter values for this structure.For a given controller structure, the design objectives can often be specified as satisfying a set of inequalities and/or minimizing a function subject to these inequalities.
Constraints in the form of inequalities in any control problem may arise due to controller parameter limitations, operating restrictions and verification of some specific system performance requirements.It must be noted that only a minority of current control problems can be solved by purely analytical methods.Hence, it is necessary to develop some computational approaches that enabling designers to solve such problems.Among the many optimization techniques found in the literature ISSN:2222-758X [12][13][14][15], the modern heuristic search optimization techniques developed in the past decades, such as the genetic algorithms (GA), particle swarm optimization (PSO), ant colony optimization (ACO), artificial bee colony (ABC), artificial foraging optimization (AFO), differential evolution (DE), and other population-based learning techniques are gaining high acceptance to be the standard approach used for tuning and optimizing the controllers in modern control problems [16][17][18][19].With the new advances of multi-core parallel processors and the development of high-speed electronic switching devices, it is possible to perform high speed switching systems based on the time scale.This paper presents an iterative general state space approach for the design of any controller structure that might be subjected to any set of practical and operating constraints.The developed methodology is based on the GA for the design of an optimum switchable controller for SISO.Different systems are tested and a comparison with other approaches is given to show the applicability of this methodology.In Section II, the formulation for a constraint control problem is presented.The genetic algorithm with the proposed methodology is covered in section III.Simulation and results evaluation for the tackled examples are included in section IV.Finally, some concluding remarks and suggestions for future work are given in section V.

II. PROBLEM FORMULATION
In modern control theory, SISO dynamic systems are usually described in terms of a set of state variables x(t) ∈ R n which evolve under the influence of control u(t) ∈ R 1 .For optimal control problem, it is required to find the control u(t) between the time intervals of interest t o ≤ t ≤ t f which will transfer the state variables x(t) from their initial states, to final states, where, x o ∈ R n , x f ∈ R n represent the initial and final system state vectors.and satisfying a set of system differential equations, Where,f(.)represents a continuous nonlinear differentiable function.Such that a linear quadratic cost functional in the form, is to be minimized.where,G(.)and L(.) are continuous nonlinear differentiable functions.The control is a control u(t) set that may be open or closed.For closed-loop systems the controlled input will be in the form: where P (.) is a continuous nonlinear differentiable function, K ∈ R nr represents the controller parameter vector and r(t) ∈ R 1 represents the reference input signal.Hence Eq.( 3) can be rewritten in the following form: ISSN:2222-758X Fig. 1 shows the complete configuration for Eq.( 6).
We can introduce another state variable x n+1 that represents an integral part of the cost functional Eq. ( 4) by defining the following: Figure 1: System state representation Augmenting Eq.( 7) with Eq.( 6), we can define a new system in the form, where, Φ(.) is a continuous nonlinear differentiable function and x N ∈ R n+1 represents the new state vector.This formula can easily be used to determine the cost functional Eq.(4), at the same time while solving the system equation Eq. (8), and the most conventional form if the gradient optimization technique is used.Due to operating restrictions on the control signal u(t), the following constraint must be satisfied, where, u min and u max are lower and upper admissible control effort Also practical design parameters my need to satisfy the following constraints, where, K b j and K a j are lower and upper practical constraints on the controller designed parameter K j .During the design procedure, it is sometimes required from the whole system to satisfy certain dynamic performance characteristics, represented by the controller that has been determined.Dynamic behaviour specifications may be the overshoot, settling time, rise time ...etc.A typical set of specifications, as well as that introduced by Eq.( 11) and Eq.( 12), can be represented in a general form as a set of inequalities [20], that is, ISSN:2222-758X cost functional of Eq. ( 10) , in the following form By defining, where, the constant α i satisfy, 14) will be zero if and only if Eqs. (11 − 13) are satisfied.After this presentation, our main problem can be stated as follows: Having a dynamic system represented by Eq. ( 3) and Eq. ( 5), it is required to find the optimum controller vector K * ∈ R nr at different optimum switching instants with a minimum number of switchings z such that, and controller vector levels at these instants are defined by: while minimizing Eq.( 14) and satisfying Eq.( 1) and Eq.( 2), knowing that, With the multiple switching instants z the following switchable subsystems can be solved instead of solving Eq.( 8) :

III. THE GENETIC ALGORITHM
There are many optimization techniques available in the literature that can be used to solve the problem at hand.
Evolutionary algorithms which are gaining their acceptance in different fields as well as in control applications are becoming the most dominant ones, especially when the cost function is non-differentiable or can hardly be evaluated.The genetic algorithm (GA) [19] is one of these approaches that will be used here.The family of the genetic algorithm belongs to the heuristic, stochastic methods.It is inspired by the computational analogy of adaptive systems that are modelled on Its applicability in the past shows that it might not find the best solution, but often come up with a partially optimal solution.So, not a rigorous method, but usually finds a good fit.The pseudo-code for the Genetic algorithm is shown in Fig. 2. The genetic algorithm can be implemented in the same way for any application.Two exceptions that are related to the problem and must be well defined are the coding of the variables to be optimized and the performance index or the objective function, which must be well defined to reflect the problem at hand.
During the evolution process, a population of chromosomes (individuals) representing the solution candidates are updated according to the relative individual fitness function.This fitness function must be well designed to reflect the problem objective function.The GA uses four consequent operators which are performed on the population, from generation to generation toward the best solution.These operators are selection, crossover, mutation and elitism.According to the fitness of each evaluated string, a mating pool is generated based on the roulette wheel selection criterion.All chromosomes with high fitness will duplicate themselves in the mating pool with a count relative to the total fitness of the whole population.
In the crossover operation, information between the parent pairs is exchanged.The crossover points are selected randomly and the exchange of parts is performed according to a pre-specified crossover rate (i.e., between two search solutions).In the mutation phase, changes in some of the gene values are randomly performed according to a predefined mutation rate.
(i.e., a self-adjustment jumps to overcome stacking in a local solution).The fourth operator preserves a percentage of the best solution to be copied from the current generation to the next generation, hence keeping the fittest chromosomes to appear in the next generation.
The implementation of the GA concerning our control problem will determine the switching instants ts q and the controller vector at these instants K * q .It will proceed as follows: 1-The structure of each string is constructed as shown in Fig. 3.The string length N s is evaluated by, Figure 2: The genetic algorithm pseudocode [19] ISSN:2222-758X where z represents the number of switchings given by Eq. ( 16), nr represents the number of controller parameters given by Eq.( 12), and a is the number of bits assigned to each variable (it is assumed that each parameter is encoded by the same length of bits).2-The initial generation (population) is randomly generated with a population size of N p strings.
The structure of each string is constructed from N s bits as given by Eq. ( 23) .
3-Each individual is decoded.The controller gains and the switching instants which represent the decoded parameters are directly used by the system state equation given by Eq.( 21).The objective function J of each string is then evaluated by Eq.( 22).
4-The fitness F of each string must is to be maximized by the GA using the following: where A and ε are constants to scale and prevent from dividing by zero.
5-Based on the natural selection, after an initial population is randomly generated, the algorithm evolves through three operators: A-Performing the Selection Operator: which equates to the survival of the fittest individuals.The key idea of this operator is to give preference to better candidate solutions, thus allowing individuals to pass on their genes to the next generation.
The goodness of each individual depends on their fitness.
B-Perform the Crossover Operator: which represents mating between individuals and exchange genes as follows: I-Two chromosomes are nominated from the population by applying the selection operator.
II-The crossover breaking point is arbitrarily elected lengthwise the bits of the strings.

III-The two individuals exchange their portions upon the point of crossover.
IV-If string1 is 000000 and string2 is 111111 and the crossover point is 3 then the new offspring will be 111000 and 000111.
V-The offspring which are produced by this reproduction process forming a new couple in the population of the subsequent generation.
VI-Improved chromosomes are more likely generated by this recombination process which will develop better individuals.
C-Performing the Mutation Operator: Modification into the genes are randomly introduced by this operator.With a small probability rate, randomly selected genes of the new strings will be forced to toggle some of their bits.With this operator, diversity is maintained within the population and premature convergence is inhibited.

ISSN:2222-758X
The new set of population pop (t+1) is finally reached.The same previously operations are repeated on this new population until convergence is reached.The stopping criterion is based on the limit of progress in the fitness function between two successive generations that must lie within epsilon

IV. SIMULATION RESULTS
The GA will be used to search for the switching instants Eq.( 16) and optimum controller vector Eq.( 18).The system state equations given by Eq.( 21) were carried out using the 4-th order Runge Kutta integration algorithm.The proposed methodology for the designed procedure is schematically shown in Fig. 4. The GA parameters for all the problems tackled by the proposed methodology are given in Table I.

A. Design Examples
The following examples give an illustration of the proposed approach.The parameter optimization using the GA was carried out for the case.
where r(t) is the input reference signal and x 1 (t) is the system output.Q i is a weighting factor on the state x i (t) to satisfy the final state x if at t = t f .A value of (Q i = 100) is found suitable for our problems.
1) Example 1: Consider the following third ordered linear system G(s), Which is subjected to a unit step input The state-space representation for this system can be stated as follows: It is required to find the optimum controller K(t) such that a general good dynamic performance for the closed system is achieved.Having some restrictions on the system performance in the form of steady-state regulation and overshoot constraints, the above problem can be solved by the presented methodology and satisfy the following constraints, −80.0 ≤ K ≤ 80.0 (controller limit) Overshoot constraints: Steady-state regulation limit: θ 2 (K) ≤ 0.02 (33) The problem is solved using the proportional fixed-gain controller, and GA gives the following optimum gain controller : Using the proposed approach, the following controller is achieved z=2 where the simulation time or final time t f for the system are (10.0)s and zero initial time t 0 .The system will perform better in terms of the given constraints with only three levels of switchings as can be shown from Fig. 5.The dynamic characteristics of the system with the switching gain controller of Eq.( 38) is much better than the system with the fixed gain controller given by Eq. (37).[21] is to be controlled so that its speed is maintained at a specific set point The motor is described by the following state equations: where, X 1 is the motor speed (rad/s), X 2 is the armature current (A), u is the armature voltage (V), r is the set point for the motor speed and e is the error in the speed of the motor.The problem to be solved can be expressed as follows: is it possible to find a simple controller structure so that the closed-loop system has a stable, rapid response with small overshoot and such that steady-state regulation occurs.In particular, the following parameter optimization problem is to be solved: Minimize Eq. ( 14) while the system is subjected to the following constraints, −80.0 ≤ K i ≤ 80.0 (controller limit) (40) and dynamic constraints including: θ 1 (K) ≤ 20% (overshoot limit) θ 2 (K) ≤ 0.2 (steady-state regulation limit) θ 3 (K) ≤ 0.05 (rise time limit) (41) x 1f = r(t) at t = t f (43) For the case when r(t) is a unit step input function with zero initial conditions occurring on the plant the following controller structure is suggested by [21]: and the following controller parameters are determined [21]: K * = 79.0 0.064 0.0026 0.0079 (45) Using the proposed approach, we suggest the following simple controller structure: It is desired to determine K 1 and K 2 at different switching, instants to minimize Eq. ( 14), and it is subjected to the constraints defined by Eqs.(40-42).The following results are obtained using the GA: z = 1 K * = 80.0 1.01 6.63 0.83 where t o = 0 and t f = 0.4 We tried to use the standard PID controller, which is given by : Where G c (s) is the PID controller transfer function, K p is the proportional gain parameter, K d is the derivative gain parameter and K i is the integral gain parameter.By using the PID tuner for Matlab, it gives the following controller parameters: ISSN:2222-758Xthe principles of evolution via natural selection.It is considered as a randomized directed search, based on employing a population of individuals that undergo selection in the presence of variation-inducing operators such as mutation and recombination (crossover).A fitness function is used to evaluate individuals, and reproductive success varies with fitness.

Figure 3 :
Figure 3: The structure of each string

Figure 4 :
Figure 4: The proposed methodology Flow Chart

Figure 5 :
Figure 5: Output response for Example 1 for a unit step input Y by using a) Switching gain controller b)Fixed gain Controller

Figure 6 :
Figure 6: Dynamic responses for the motor speed control problem using PID Eq.(48) (Green), Eq.(44) [22] (Blue) and proposed (Red) controllers Eq.(46) .786 ; t 0 < t < ts 1 TableIIshows the performance comparison between the two controllers.It is quite clear that the dynamic characteristics in terms of peak overshoot (M p ) , rise time (T r ) , settling time (T s ) , peak time (T p ) and the steady-state error (S.S.E) for the system with the proposed controller is much better than that with the normal gain controller.It is noticed that the integral squared dominant part of the error criterion (ISE) is the cost function (J) since most of the states are approaching zero at the final time (t f ).