Content uploaded by Iman Gholaminezhad

Author content

All content in this area was uploaded by Iman Gholaminezhad on Oct 15, 2014

Content may be subject to copyright.

978-1-4799-6743-8/14/$31.00 ©2014 IEEE

Automated Synthesis of Optimal Controller Using

Multi-Objective Genetic Programming For Two-

Mass-Spring System

Iman Gholaminezhad, Ali Jamali and Hirad Assimi

Dept. of Mechanical Engineering

University of Guilan, Rasht, Iran

i.gholaminezhad@gmail.com, ali.jamali@guilan.ac.ir, assimi@gmail.com

Abstract—There are much research effort in the

literature using genetic programming as an efficient tool

for design of controllers for industrial systems. In this

paper, multi-objective uniform-diversity genetic

programming (MUGP) is used for automated synthesis of

both structure and parameter tuning of optimal

controllers as a many-objective optimization problem. In

the proposed evolutionary design methodology, each

candidate controller illustrated by a transfer function,

whose optimal structure and parameters, obtained based

on performance optimization of each candidate controller.

The performance indices of each controller are treated as

separate objective functions, and thus solved using the

multi-objective method of this work. A two-mass-spring

system is considered to show the efficiency of the proposed

method using performance optimization of open loop and

closed loop control system characteristics. The results

show that the proposed method is a computationally

efficient framework compared to other methods in the

literature for automatically designing both structure and

parameter tuning of optimal controllers.

Index Terms—Many-objective, Genetic programming, Optimal

controller design, Polynomial controller, Two-mass-spring.

I. INTRODUCTION

Genetic programming is a member of evolutionary

algorithms, which provides a powerful tool for dealing with

system engineering problems. Applications of Genetic

Programming (GP) in system identification and controller

design have been an attractive research area due to its unique

functionality to simultaneously optimize structure and

parameters of the problem to be solved and thus it has been

extensively used in control and system science field for many

years. GP evaluates performance measures of the controlled

systems by implicitly utilizing the information about

constraints and nonlinearities that the closed loop and open

loop simulation provides.

The first comprehensive effort in using genetic

programming for controller design, first carried out by its

inventor, John Koza. He well applied GP for automatic

synthesis of both topology and tuning of different types of

controllers in a parallel platform [1-4]. Although, the results

obtained by J. Koza were interesting and promising compared

to previously designated methods, however due to

computationally expensive nature of the method implemented

by J. Koza, many researchers have been tried to use genetic

programming in more effective approaches for design of

optimal controllers. In this way, R.A. Maher and M.J.

Mohamed proposed multiple basis function genetic

programming (MBFGP) for optimal design of both linear and

nonlinear control systems [5]. They also used the algorithm to

enrich the set of suboptimal state feedback controllers to

include controllers that have product time-state terms. B.

Kadlic, and I. Sekaj suggested an evolutionary-based design of

a controller of non-linear dynamic systems which is

constructed using interconnection and parametrisation of

simple building blocks using cartesian genetic programming

(CGP) in MATLAB [6].

A. Fukunaga et al. investigate the application of simulation-

based genetic programming to evolve controllers that perform

high-level tasks on a service robot [7]. T. Kobayashi et al.

proposed an efficient genetic programming algorithm for the

feedback controller design only using output information with

a new optimal inverse system concept [8]. P. Chen and Y. Lu

used a novel approach to automatic design of robust optimal

controller for interval plants with genetic programming based

on Kharitonov Theorem [9]. D. Gladwin et al. described a

genetic programming based automatic design methodology and

its applications to the maintenance of a stable generated

electrical output from a series-hybrid vehicle generator set [10].

D.C. Dracopoulos and D. Effraimidis applied genetic

programming to a nonlinear high dimensional helicopter

hovering control problem and showed its efficiency compared

to neuro-evolutionary control design methods [11]. A.

Bourmistrova and S. Khantsis performed a Flight Control

System Design Optimization via Genetic Programming [12].

They present a methodology, which was developed to design a

controller that satisfies the objectives of shipboard recovery of

a fixed-wing UAV. I. Sekaj et al. performed different studies

on controller design based on genetic programming. In one

study they suggested three genetic programming-based

approaches for continuous-time process control design using a

network of interconnected and recurrent functions with

continuous-time or discrete-time elementary dynamic building

blocks [13]. J.M. Dolsma make use of genetic programming

for designing nonlinear controllers in his master thesis. He also

used genetic algorithm for optimization of GP parameters [14].

E. Alfaro-Cid et al. used application of Genetic Programming

for the Automatic Design of Controllers for a Surface Ship.

They beneficiate GP to evolve control strategies that, given the

current and desired state of the propulsion and heading

dynamics of a supply ship as inputs, and generate the

commanded forces required to maneuver the ship [15]. S.

Harding and J.F. Miller presented an Evolution of Robot

Controller Using Cartesian Genetic Programming. They used

integer-based version of the graph-based representation and

applied it to evolving an obstacle avoiding robot controller

[16]. R. Barate and A. Manzanera presented an automatic

design of vision-based obstacle avoidance controllers using

Genetic Programming. They used an off-line procedure to

automatically design algorithms adapted to the visual context

and used their controller for a robotic system which is able to

learn context dependent visual clues to navigate in its

environment [17]. In another study they suggested an evolving

vision controllers with a Two-Phase genetic programming

system using imitation [18].

The two-mass-spring system has been widely used as a

common control benchmark in the literature. C. I Marrison and

R. F Stengel applied stochastic robust design of two-mass-

spring system using MCS [19]. They have considered three

cost functions namely, stability, control effort and settling time.

W. Reinelt considered this benchmark for robust controller

design using its input constraints [20]. D. Henrion and M. L.

Overton maximizing the closed loop asymptotic decay rate for

the two-mass-spring system by finding a linearly fixed order

controller [21]. I. B. Tijani et al. performed robust H-infinity

controller synthesis using multi-objective differential evolution

algorithm for this control system [22].

This paper introduces a novel approach for structure

optimization and parameter tuning of optimal controllers using

multi-objective Uniform-diversity genetic programming

(MUGP) algorithm. Six performance requirements of a

candidate controller (stability, settling time, overshoot, rise

time, control effort, Integral time absolute error) are considered

as objective functions in an evolutionary optimization process.

However, several of the performance requirements for such

controller are in competition, which makes achieving all the

goals difficult. Such confliction is also shown in the value path

plot (which shows the distribution of obtained non-dominated

solutions). A two-mass-spring system, which is a fourth-order

benchmark, and has been studied extensively in the literature

using different methods considered as an illustrative examples

for evaluating the efficiency of such evolutionary design

process using MUGP algorithm.

II. MULTI-OBJECTIVE UNIFORM-DIVERSITY GENETIC

PROGRAMMING

Genetic programming is one of the optimization tools based

on evolutionary computation which known by its tree-base

structure. GP imitates the fundamental laws of Darwinian

theory and natural selection. It has the ability to express a

complex structure in a symbolic fashion. Each tree is a

combination of some nodes and branches constituted various

structures. These nodes consist of functions and terminals that

should be chosen according to the problem. The set of

functions includes operators, mathematical functions, condition

expressions and so on. The set of terminals includes variables

and constants.

In order to GP explores the searching space for better fitted

solutions, the principles of evolutionary operations like

crossover and mutation should applied on the initial population.

The crossover operation in GP brings variation into the

population by producing offspring that inherit parts of each

parent. It starts by selection of two parental expressions by the

fitness based selection methods and produces two offspring

expressions that consist of parts taken from each parent. In the

mutation operator the sub-tree rooted at the randomly selected

node is removed and replaced with a randomly generated sub-

tree.

In addition to common GP operators, a real-value alteration

operator executed for overcoming the problem of producing

variant integers in terminal nodes of syntax trees during the

evolutionary process. The used real-value alteration operator

executed on only one parental expression selected by the

fitness based selection method (tournament). The operator

continued by producing a random integer between intervals

[0,1] for each parental tree. If the integer is less than a

predetermine value PA the value of one or more of the selected

terminals changed based on the following equations,

𝑇

!,!=1−𝜔∗𝛼+𝜔∗𝑇

!,! (1)

𝛼=𝑟𝑎𝑛𝑑 0,1∗𝑈𝐵

!−𝐿𝐵

!+𝑈𝐵

! (2)

Where, PA is the alteration probability between interval

zero and one,!T

!,! is the selected terminal, T

!,! is the exchanged

terminal where 1≤𝑖≤𝑛𝑢𝑚!𝑜𝑓!𝑝𝑜𝑝 , ω is a real number

chosen randomly in 0 and 1 span, UB! and LB! are upper and

lower bound of the interval in which the new terminal value is

going to be produced and finally rand 0,1 is a random

number selected from normal distribution in the range of zero

and one.

After performing evolutionary operations, GP automatically

evolve individuals, which have better objective functions to

the next generation based on Pareto dominancy selection. In

order to better evolved individuals from the same Pareto front

to the next generation, the ε-elimination approach, which has

been proposed by some authors [23-25], used to get Pareto

optimal solutions of multi-objective problems more uniformly.

In the ε-elimination diversity approach, which is based on a

threshold value, all the clones or ε-similar individuals are

recognized and simply removed from the current population.

It should be noted that such ε-similarity must exist both in the

space of objectives and in the space of the associated design

variables. It is clear that two individuals can be similar in the

space of objective functions but may be different in the space

of design variables. Therefore, these individuals must be

preserved in the population. More detailed description of ε-

elimination can be found in [23-25].

And the final step of the algorithm is to verify if the

adopted stopping criterion was reached. Determining the

stopping (termination) criterion, for example, is usually a

simple process, e.g. stop after a certain number of generations

have elapsed or stop when a solution of a high enough quality

is found. In this work it is adopted a predefined number of

generations. The flowchart of the algorithm is illustrated in Fig.

1.

Fig. 1. Flowchart of the proposed MUGP algorithm

III. EVOLUTION OF OPTIMAL CONTROLLERS

Standard feedback control system shown in Fig. 2, is

consist of a dynamic controller system C(s) with unknown

structure, a dynamic continues-time controlled plant G(s),

reference signal, control error signal, controller variable,

disturbance and output signal. Closed loop as well as open loop

simulation of such control system gives some performance

characteristics of the whole system. These performance

measures consist of time-domain characteristics e.g. overshoot,

settling time, steady state error, energy consumed (controller

variable) and frequency domain behaviors e.g. stability and

sensitivity.

Fig. 2. Closed loop SISO system with plant G(s) and controller C(s)

The proposed method makes use of genetic programing for

evolution of polynomials, which are in fact the designed

controller for a continues-time process. Each syntax tree parsed

to an expression, which have constituted both numerator and

denominator of a transfer function and the fitness correspond to

each tree evaluated by simulating the whole control system.

Each expression tree provided one polynomial and then the

corresponding coefficients of numerator and denominator of

that tree structure calculated and substituted in the transfer

function. Transfer function is basically defined in s-plane

system. Hence, the polynomial controller is a rational function

in the complex variable that is, 𝑠=𝜎+𝑗𝜔,

𝐶𝑠=!!!!!!!!!!!!!!⋯!!!!!!!

!!!!!!!!!!!!!!⋯!!!!!!!

(3)

The evolved polynomial by GP provides important system

response characteristics without solving the complex

differential equation. Both open loop and close loop continues

simulation of the control system are necessary to obtained all

objective functions, which are overshoot, rise time, settling

time (the time for the output to settle within 5% units of the

input step value), integral time absolute error, maximum

energy consumed (controller variable) by close loop simulation

in time domain and stability which derive from open loop

simulation of the control system. The objective function

corresponds to stability defined by maximization of the

distance from the nearest point of Nyquist diagram to the

critical point (-1,0). It should be noted that instead of

maximization of stability in the evolutionary optimization

process, 1/stability is subjected to minimization. Therefore, all

objective functions tend to minimize as an optimization

problem. Other objective functions are simply achievable by

analyzing the transient response of the close-loop system in

time domain.

Obviously, there are some constraints when using such

methodology for evolving transfer function polynomials. Like

for instance, some of the polynomials produced by GP do not

satisfy the order constraint of a transfer function (where the

order of numerator should be equal or less than denominator).

Such individuals eliminated from the population by a penalty

function. Furthermore, some constraints are considered for the

value of objective functions. In this way, the value of settling

time should not exceed from 15 seconds for each candidate

controller and the objective function correspond to stability

should not exceed from 2.

IV. TWO-MASS-SPRING SYSTEM

One of the common problems in controller design field is

the two-mass-spring system, which illustrated in Fig. 3.

Fig. 3. Block diagram of two-mass-spring benchmark problem

The state space equations of the system shown as follows,

𝑋!

𝑋!

𝑋!

𝑋!

=

0010

0001

−𝐾𝑚!

𝐾𝑚!

𝐾𝑚!

−𝐾𝑚!

0

0

0

0

𝑋!

𝑋!

𝑋!

𝑋!

+

0

0

1𝑚!

0

𝑢+

0

0

0

1𝑚!

𝑤 (4)

Where 𝑋!,𝑋!,𝑋!!and!𝑋! are the position of the first mass,

the position of the second mass, the velocity of the first mass

and the velocity of the second mass, respectively. If we

consider the position of the second mass (𝑋!) as the output of

the system, then the system transfer function can be illustrated

as follows,

!!(!)

!(!)

=!/!!!!

!!(!!!!(!!!!!)/!!!!) (5)

!!(!)

!(!)

=(!/!!)(!!!!/!!)

!!(!!!!(!!!!!)/!!!!) (6)

If the constants parameters of the system for multi-

objective optimization are set to its nominal values, 𝑚!=

𝑚!=1𝐾𝑔, 𝐾=1𝑁𝑚!, then based on equations 5 and 6, the

system transfer functions can be shown as follows,

!!(!)

!(!)

=!

!!(!!!!) (7)

!!(!)

!(!)

=(!!!!)

!!(!!!!) (8)

Ref [19] used stochastic robustness synthesis to find

compensators using Monte Carlo analysis for the two-mass-

spring system. They have considered three cost functions

namely, the probability of instability, probability of actuator

saturation and probability of settling time violation. And they

have suggested different controllers based on the sum of

weighted objective functions as follows,

𝑓=𝑤!𝑃

!+𝑤!𝑃

!+𝑤!𝑃!" (9)

Where 𝑃

!, 𝑃

!, 𝑃!" are probability of instability, probability

of actuator saturation and probability of settling time violation

respectively.

In this section, the MUGP algorithm used for many-

objective design of polynomial controllers. The algorithm

parameters for this case study are also identical to previously

simulated systems. However, the simulation performed for 30

seconds.

The six objective functions considered in this case study are

namely, the settling time (the time for the output to settle

within ±0.1 units of the final value) of the second mass

subjected to a unit impulse disturbance input, the control effort,

which applied to the first mass, the integral time absolute error

(ITAE), the peak value of output of the system defined as

Max!(x!), rise time, which is the time to reach Max!(x!) and

stability, which defined by maximization of the distance from

the nearest point of Nyquist diagram to the critical point (-1,0).

It should be noted that instead of maximization of stability in

the evolutionary optimization process, 1/stability is subjected

to minimization. Therefore all objective functions are subjected

to minimization in a multi-objective optimization procedure.

The closed loop transfer function of the system can be

illustrated as follows,

𝐺!" 𝑠=

(!!!!)

!!(!!!!)

!!!!"(!)∗!

!!(!!!!)

(10)

Where 𝐶!" 𝑠 is the transfer function of designed

controller. The MUGP parameters used in this section are also

given in TABLE. I.

TABLE I. GENETIC PROGRAMMING PARAMETERS

GP parameters

Values

Function set

+ - / *

Terminal set

S, rand

Initial population number

500

Number of iterations

250

Crossover probability

0.8

Mutation probability

0.5

Integer Alteration Probability

0.8

Max initial-pop tree length

5

Max crossover tree length

10

After 500 generations in a 6-objective optimization process,

466 non-dominated design points obtained from the total of

500 populations. Fig. 4 depicted the value path plot, which

gives important information about uniformity of obtained non-

dominated solutions as well as possible choices of trade-off

point.

Fig. 4. Value path plot of non-dominated solutions obtained by the method of

this work for the two-mass-spring system

Eq. 11, shows the evolved transfer function of the chosen

trade-off controller,

𝐶!" 𝑠=!!.!""!!!!".!"#!!!".!""

!.!!"!!!!.!"#!!!!".!"#!!!!"#.!""!!!!"#.!"!!!".!"" (11)

Interestingly, the MUGP algorithm captured the transfer

function structure for the two-mass-spring system, which has

been considered widely in the literature [19]. It also fulfills the

common constraint on parameters of the controller transfer

function, which have been used in the literature [19]. The

designed controller has three more poles than zeros, resulting

in good high-frequency attenuation. Fig. 5 depicted the impulse

response of the designed controller using MUGP algorithm

with that of suggested by Ref [19] based on different weighted

coefficients.

The corresponding response of control effort applied to the

first mass with respect to time shown in Fig. 6. The Nyquist

plot of the designed controller illustrated in Fig. 7. It should be

noted that this controller has 13 closed loop poles.

Fig. 5. Closed loop response of 𝑥! to a disturbance impulse for the designed

optimal controller by MUGP and other suggested controllers by Ref [19]

Fig. 6. Closed loop response of the actuator (variation of control effort) for

designed controllers in Fig. 5

Fig. 7. The Nyquist diagram of the open loop control system correspond to

designed controller by MUGP

The more comparison of the obtained controller by MUGP

algorithm with that of Ref [19] is illustrated in TABLE. II. The

controller corresponds to point P2 in [19] could be considered

as the trade-off solution of that study. It can be seen that the

suggested controller of this work dominated all objective

functions of controller P2.

TABLE II. COMPARISON OF OBJECTIVE FUNCTIONS OF DESIGNED

CONTROLLERS IN FIG. 5 FOR THE TWO-MASS-SPRING SYSTEM

Objective

functions

Method

MUGP

P1 by Ref

[19]

P2 by Ref

[19]

P3 by Ref

[19]

ITAE

9.86

16.15

10.89

5.95

Control

effort

0.402

0.59

0.46

0.82

Stability

1.032

1.00

1.09

1.49

Max!(x!)

1.50

2.08

1.59

1.00

Rise time

5.33

5.48

5.41

1.87

Settling

time

11.54

14.40

12.10

10.10

V. CONCLUSION

This paper presented an approach for automatically

synthesis of optimal controllers based on a transfer function

representation method using multi-objective uniform-diversity

genetic programming (MUGP) algorithm. The proposed

methodology is based on the optimization of both structure and

parameters of given a transfer function polynomials, which

considered as a candidate controller in a many-objective

optimization framework. It has shown that the proposed

algorithm well performed for such many-objective

optimization problem based on the value path plot and other

illustrative figures e.g. impulse response of the system, the

Nyquist diagram. The comparison of the designed controllers

with that of obtained by other methods in terms of objective

functions values showed that the proposed methodology using

the MUGP algorithm is a computationally efficient approach

for design of optimal controllers for complex dynamical

systems.

REFERENCES

[1] M. A. Keane, J. Yu, J. R. Koza, Automatic Synthesis of Both

the Topology and Tuning of a Common Parameterized

Controller for Two Families of Plants using Genetic

Programming, GECCO 2000, pp. 496-504.

[2] J. R. Koza, M. A. Keane, J. Yu, F. H. Bennett, W.

Mydlowec, Automatic Creation of Human-Competitive

Programs and Controllers by Means of Genetic

Programming, Genetic Programming and Evolvable Machines

1(1/2): 121-164, 2000.

[3] M. A. Keane, J. R. Koza, M. J. Streeter, Automatic Synthesis

Using Genetic Programming of an Improved General-Purpose

Controller for Industrially Representative Plants, Evolvable

Hardware, 2002, pp. 113-122.

[4] J. R. Koza, M. A. Keane, M. J. Streeter, W. Mydlowec, J. Yu,

and G. Lanza, Genetic Programming IV: Routine Human-

Competitive Machine Intelligence, Kluwer Academic

Publishers, 2003.

[5] R.A. Maher, and M.J. Mohamed, An Enhanced Genetic

Programming Algorithm for Optimal Controller Design,

Intelligent Control and Automation, 2013, 4, 94-101.

[6] B. Kadlic, and I. Sekaj, Controller Design Based on Cartesain

Genetic Programming in MATLAB, Technical Computing

Prague 2011, p. 103.

[7] A. Fukunaga, H. Hiruma, K. Komiya and H. Iba, Evolving

controllers for high-level applications"on a service robot: a case

study with exhibition visitor flow control, Genetic Programming

and Evolvable Machines, 2012, Vol. 13, pp. 239–263.

[8] T. Kobayashi, T. Kimoto, J. Imae, Genetic programming based

output regulation via optimal inversion for nonlinear systems,

2011 IEEE/SICE International Symposium on System

Integration, pp. 398-403, Kyoto, Japan.

[9] P. Chen and Y. Lu, Automatic design of robust optimal

controller for interval plants using genetic programming and

Kharitonov Theorem, International Journal of Computational

Intelligence Systems, Vol. 4, No. 5 (September, 2011), pp. 826-

836.

[10] D. Gladwin, P. Stewart, and J. Stewart, (2011) A novel genetic

programming approach to the design of engine control systems

for the voltage stabilisation of hybrid electric vehicle generator

outputs. Proceedings of the Institute of Mechanical Engineers

Part D - Journal of Automobile Engineering, 225 (10), pp.

1334-1346.

[11] D.C. Dracopoulos and D. Effraimidis, Genetic Programming

for Generalised Helicopter Hovering Control, 15th European

Conference, EuroGP 2012, Málaga, Spain, April, 2012.

[12] A. Bourmistrova and S. Khantsis, Genetic programming in

application to flight control system design optimisation, New

Achievements in Evolutionary Computation, Book edited by:

Peter Korosec, February 2010, INTECH, Croatia.

[13] I. Sekaj and J. Perkacz, Genetic programming based controller

design, IEEE Congress on Evolutionary Computation, 2007.

[14] J.M. Dolsma, Nonlinear controller design based on genetic

programming, Master thesis, Technische Universiteit

Eindhoven, August 2007.

[15] E. Alfaro-Cid, E.W. McGookin, D.J. Murray-Smith and T.I.

Fossen, Genetic programming for the automatic design of

controllers for a surface ship, IEEE Transactions on Intelligent

Transportation Systems, Vol. 9, No. 2, June 2008.

[16] S. Harding and J.F. Miller, Evolution of robot controller using

cartesian genetic programming, EuroGP 2005, LNCS 3447, pp.

62–73.

[17] R. Barate and A. Manzanera, Automatic design of vision-based

obstacle avoidance controller using genetic programming, 8th

International Conference on Artificial Evolution (EA’07). Tours,

France, pp. 25-36.

[18] R. Barate and A. Manzanera, Evolving vision controllers with a

two-phase genetic programming system using imitation. 10th

International Conference on the Simulation of Adaptive

Behavior (ASB’08). Osaka, Japan. PP. 73-82.

[19] C. I. Marrison, R. F. Stengel, Stochastic robustness synthesis

applied to a benchmark control "problem, International Journal

of robust and nonlinear control, vol. 5, pp. 13-31, 1995.

[20] W. Reinelt, Robust control of two-mass-spring system subjected

to input constraints, American Control Conference, Vol. 3, pp.

1817-1821, June 2000, Chicago.

[21] D. Henrion and M. L. Overton, maximizing the closed loop

asymptotic decay rate for the two-mass-spring control problem,

arXiv:math/0603681v1 [math.OC] 29 Mar 2006.

[22] I. B. Tijani, R. Akmeliawati, A. Legowo, M. Iwan, M. Abdul

and G. Asan, Robust H-infinity controller synthesis using multi-

objectives differential evolution algorithm (MODE) for two-

mass-spring system. In: 2011 4th International Conference on

Modeling, Simulation and Applied Optimization (ICMSAO), 19 -

21 April 2011, Kuala Lumpur, Malaysia.

[23] A. Jamali, N. Nariman-Zadeh and K. Atashkari, Multi-objective

uniform diversity genetic algorithm (MUGA), In Advanced in

Evolutionary Algorithms, witold kosinski (Ed.), IN-TECH,

Vienna, 2008.

[24] A. Jamali, A. Hajiloo and N. Nariman-Zadeh, Reliability-based

robust Pareto design of linear state feedback controllers using a

multi-objective uniform-diversity genetic algorithm, Expert

Systems with Applications, Vol. 37 (1), pp. 401-413, 2010.

[25] N. Nariman-Zadeh, M. Salehpour, A. Jamali and E. Haghgoo,

Pareto optimization of a five-degree of freedom vehicle

vibration model using a multi-objective uniform-diversity

genetic algorithm (MUGA), Engineering Applications of

Artificial Intelligence, 23(4), 543-551, 2010.