Vehicle Fuzzy Controller Design Using Imperialist Competitive Algorithm

3 downloads 0 Views 332KB Size Report
Ashkan MohammadZadeh Jasour1, Esmaeil Atashpaz Gargari2, Caro Lucas2. 1Iran University of ..... Soltani, C. Lucas, “Materials Property. Characterization ...
Vehicle Fuzzy Controller Design Using Imperialist Competitive Algorithm Ashkan MohammadZadeh Jasour1, Esmaeil Atashpaz Gargari2, Caro Lucas2 1

Iran University of Science and Technology, Tehran, Iran Control and Intelligent Processing Centre of Excellence, Electrical and Computer Engineering School of University of Tehran, Tehran, Iran

2

[email protected] , [email protected] , [email protected]

Abstract: In this paper a novel socio-politically inspired optimization strategy, an Imperialist Competitive Algorithm, is applied to the problem of designing a fuzzy controller. The goal is to design a controller to enhance the transient and steady state behaviour of the system output. Having fixed the rule base of the fuzzy system, the controller is designed through determining the membership functions of the input and output variables. The design method is applied to a model of vehicle. The inputs of the fuzzy system are velocity of the vehicle and the sloop of the road. The fuzzy controller controls the speed of the vehicle by adjusting the amount of gas into vehicle engine. Comparison results among the designed controller and the controller designed by the expert show that the controller obtained by Imperialist competitive algorithm has better performance than the expert controller. Keywords: Fuzzy Controller, Imperialist Competitive Algorithm (ICA), Membership Function, Vehicle 1

Introduction

Fuzzy controllers, as nonlinear controllers, represent successful implementation of fuzzy logic in practical control problems. These controllers, based on fuzzy logic, simulate the behaviour of experts in controlling the system. Unlike their classical counterparts, fuzzy controllers do not require a precise mathematical model of the systems and using the expert knowledge they construct their rule base [1,2]. One of the

disadvantages of fuzzy controllers is that, they lack the ability of learning. Hence they are strongly dependent to the expert knowledge. A learning strategy can cope with this problem and automate the controller design process through adding the ability of learning and modifying control rules [3]. In this paper the problem of designing a fuzzy controller is stated in the form of an optimization problem. The optimal fuzzy controller is determined through finding the membership function of the variables, using a novel global search strategy, called Imperialist Competitive Algorithm (ICA). ICA is a global search strategy that uses the socio-political competition among empires as a source of inspiration. Like other evolutionary ones that start with initial population, ICA begins with initial empires. Any individual of an empire is a country. There are two types of countries; colony and imperialist state that collectively form empires. Imperialistic competitions among these empires form the basis of the ICA. During this competition, weak empires collapse and powerful ones take possession of their colonies. Imperialistic competition converge to a state in which there exist only one empire and its colonies are in the same position and have the same cost as the imperialist[4]. The novel evolutionary optimization algorithm, ICA, has extensively been used to solve different kinds of optimization problems. In [5] and [6] ICA is used to design a PID controller for a SISO

system and for characterization of materials property from sharp indentation test. In [7] ICA is used for reverse analysis of an artificial neural network in order to characterize the properties of materials from sharp indentation test. In order to find the optimal priorities for each user in recommender systems, [8] uses ICA in “Prioritized user-profile” approach to recommender systems, trying to implement more personalized recommendation by assigning different priority importance to each feature of the user-profile in different users. In [9] ICA is used for Gershgorian band shrinking and decentralized PID controller design for MIMO systems. In this paper, ICA is applied to the problem of designing a fuzzy controller for a vehicle dynamics. The controller obtained by ICA is compared with that of expert. In the following of the paper, section 2 states the problem of designing fuzzy controller for a vehicle dynamics. Section 3 briefly introduces ICA and in section 4, ICA is applied to design a fuzzy controller for the vehicle dynamics. Eventually conclusion of the paper and remarks to the future are given in section 5.

2

Fuzzy Control of Vehicle

Figure 1 shows a typical model of vehicle dynamics and different force applied to it.

and is the position of vehicle. Mentioned forces are as following. dx dx f r = kr ( ) , f a = ka ( ) 2 , f g = mg sin θ dt dt (2) f u = ku .T Where θ is the slope of the road and T is the amount of input gas to engine. Vehicle model in state space is in the following form: X& 1 = X 2

(3) k k k 2 X& 2 = u T − g sin θ − r X 2 − a X 2 m m m States X 1 and X 2 are position and velocity of the vehicle, respectively. The bound for velocity of vehicle (V) is [0 100] and for θ is [-10 10] and for T is [0 10]. The goal is to design a fuzzy controller which automatically sets the vehicle velocity to 50 mph, for different initial speed and slop of the road. The fuzzy controller controls the amount of input gas to the vehicle engine by adjusting T, with respect to slop of the road ( θ ) and current speed of vehicle (V). To design such a controller, the vehicle’s velocity is considered to have membership in three sets, namely Low, Medium, High. The slope has membership in three sets Down, Level, Up. The output of the fuzzy system, T, has membership in five sets, Very Low, Low, Medium, High, Very High. There are nine fuzzy if-then rule in the below form. IF V = MFVi & θ = MFθj THEN T = MFTk 1 ≤ i ≤ 3,1 ≤ j ≤ 3,1 ≤ k ≤ 5 (4) Setting the fuzzy rules by considering expert knowledge, the membership functions are found by applying a novel global search strategy, ICA.

3 Brief Description of Imperialist Competitive Algorithm Figure 1: Model of vehicle with forces.

Mathematical model of vehicle shown in figure 1 is as following [10]: d 2x m( 2 ) = f u − f g − f r − f a (1) dt Where, m is the mass of vehicle, f u is the input force to vehicle from the engine, f g is grade resistance that arise from slop of road, f r is rolling resistance of tires, f a is aerodynamic resistance

Imperialism is the policy of extending the power and rule of a government beyond its own boundaries. A country may attempt to dominate others by direct rule or by less obvious means such as a control of markets for goods or raw materials. The latter is often called neo-colonialism [4]. ICA is a novel global search heuristic that uses imperialism and imperialistic competition process as a source of inspiration. Figure 2 shows the pseudo code for this algorithm. This algorithm starts with some initial countries. Some of the best countries are selected to be the imperialist states

and all the other countries form the colonies of these imperialists. The colonies are divided among the mentioned imperialists based on their power. After dividing all colonies among imperialists and creating the initial empires, these colonies start moving toward their relevant imperialist state. This movement is a simple model of assimilation policy that was pursued by some imperialist states [4]. 1) Form the array of found optimally.

variables

to

be

2) Select some random points on the function and initialize the empires. 3) Move the colonies toward their relevant imperialist (Assimilating). 4) If there is a colony in an empire which has lower cost than that of imperialist, exchange the positions of that colony and the imperialist. 5) Compute the total cost of all empires (Related to the power of both imperialist and its colonies). 6) Pick the weakest colony (colonies) from the weakest empires and give it (them) to the empire that has the most likelihood to possess it (Imperialistic competition). 7) Eliminate the powerless empires. 8) If there is just one empire, stop, if not go to 2.

Figure 2: Pseudo code for the proposed algorithm.

Figure 3 shows the movement of a colony towards the imperialist. In this movement, α and x are random numbers with uniform distribution as illustrated in equation (5) and d is the distance between colony and the imperialist. x = U (0, β × d ) (5) α = U (−γ , γ ) Where β and γ are parameters that modify the area that colonies randomly search around the imperialist. In our implementation β and γ are 2 and 0.5 (Rad) respectively.

Figure 3: Motion of colonies toward their relevant imperialist.

The total power of an empire depends on both the power of the imperialist country and the power of its colonies. In this algorithm, this fact is modeled by defining the total power of an empire by the power of imperialist state plus a percentage of the mean power of its colonies. In imperialistic competition, all empires try to take possession of colonies of other empires and control them. This competition gradually brings about a decrease in the power of weaker empires and an increase in the power of more powerful ones. This competition is modeled by just picking some (usually one) of the weakest colonies of the weakest empires and making a competition among all empires to possess these (this) colonies. Figure 4 shows a big picture of the modeled imperialistic competition. Based on their total power, in this competition, each of empires will have a likelihood of taking possession of the mentioned colonies. The more powerful an empire, the more likely it will possess these colonies. In other words these colonies will not be certainly possessed by the most powerful empires, but these empires will be more likely to possess them. Any empire that is not able to succeed in imperialist competition and can not increase its power (or at least prevent decreasing its power) will be eliminated. The imperialistic competition will gradually result in an increase in the power of great empires and a decrease in the power of weaker ones. Weak empires will lose their power gradually and ultimately they will collapse. The movement of colonies toward their relevant imperialists along with competition among empires and also collapse mechanism will hopefully cause all the countries to converge to a state in which there exist just one empire in the world and all the other countries are its colonies. In this ideal new world colonies have the same position and power as the imperialist.

Figure 4: Imperialistic competition: The more powerful an empire is, the more likely it will possess the weakest colony of weakest empire.

4

Fuzzy Controller Design Using ICA

To apply the Imperialist Competitive Algorithm (ICA) to the problem of designing fuzzy controller, the parameters of the membership functions are coded to form the array country and a cost function is defined in such a way that the design criteria are satisfied through minimizing it. Figure 5 shows the typical membership functions of input variable V in three relevant sets. Three sets can uniquely be specified by three points P1, P2, P3.

Figure 5: variable V

typical membership functions of input

five MFs of this variable can be represented by five points P7, P8, P9, P10, P11. Hence, the problem of finding the MFs is reduced to the problem of determining 11 points ( Pi ,1 ≤ i ≤ 11 ). The 11 points are put together to form the array country. Country = [P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11] The transient and steady state response of the system is used to evaluate the performance of the designed fuzzy controller. In the this paper, the transient characteristics of the output Rise Time (tr), Overshoot (MP), Settling Time (ts) along with the integral of absolute error (IAE) are used to evaluate the designed controller. A good controller results in the output to have low values for tr, MP and ts. The multi-objective design problem is converted to single objective one by considering a linear combination of all criteria. Therefore Cost Function = w1 . tr + w2 . MP + w3 . ts + w4 . IAEs (6) wis are the weights which must be determined by designer. The ICA looks for the best country array (country*). That is the array of Pi's, whose relevant cost function is minimal. Country ∗ = arg {Cost Function} (7) min

5

Figure 6: variable θ

typical membership functions of input

Figure 7: variable T

typical membership functions of input

The same can be done for input variable θ, shown in figure 6. The three MFs of this variable can be specified by three points P4, P5, P6. Finally, considering the figure 7 for output variable T, the

Results

In this part the Imperialist Competitive Algorithm (ICA) is used to design a fuzzy controller for the vehicle dynamics. The parameters of vehicle are ku k k = 1 , r = a = 0.1 . In ICA, initial number of m m m countries is set to 100, 10 of which are chosen as the initial imperialists. Also β and γ are set to 2 and 0.5 (Rad) respectively. The maximum iterations of the ICA is set to 100 and it reached to the total cost of 110 in these iterations. Figure 8 depicts the minimum and mean cost of ICA versus iteration. Obtained Fuzzy membership functions using ICA are shown in figures 9 to 11. Fuzzy rules obtained by expert are given in Table 1.

Figure 8: depicts the minimum and mean cost of ICA versus iteration

Figure 12. Vehicle Velocity for V(0)=0 & θ (0) =5 Figure 9: membership functions of input variable V

Figure 13: Vehicle Velocity for V(0)=0 & θ (0) =1 Figure 10: membership functions of input variable θ

Figure 14: Vehicle Velocity for V(0)=100 & θ (0) =7 Figure 11: membership functions of input variable T Table 1: Fuzzy Rules Obtained by Expert

θ

DOWN LEVEL

UP

LOW

HM

HM

HIGH

OK

LM

Medium HM

HIGH

LOW

LM

V

LM

Results for both ICA fuzzy controller and expert fuzzy controller for different initial conditions are shown in figure 12 to 15.

Figure 15: Vehicle Velocity for V(0)=100 & θ (0) =-6

As shown in result figures, the controller designed by ICA has better response in comparison to expert controller. The mean values of each term of cost

function for different initial conditions for both controllers are compared in Table 2. Table 2: Cost function terms for controllers Criteria Method

tr

ts

MP

Ess

ICA

7.8

10.4

0

1.98

Expert

8.1

13.1

0

3.1

According to Table 2, fuzzy controller obtained by ICA has a better performance in all criteria's considered in cost function, in comparison with one designed by expert.

6

Conclusion

In this paper a novel global optimization algorithm called Imperialist Competitive Algorithm (ICA), is presented for fuzzy controllers design. ICA is a novel global search heuristic that uses imperialism and imperialistic competition process as a source of inspiration. Using this algorithm, membership functions for fuzzy controllers, are determined. The proposed design method is applied to a model of vehicle. In this problem fuzzy controller was used to control the speed of the vehicle by adjusting the amount of gas into vehicle engine. Comparison results among the designed controller by ICA and the controller designed by the expert showed that the controller obtained by Imperialist competitive algorithm has better performance than the expert controller. Future works in this area include design of entire fuzzy controllers including fuzzy rules and membership functions using ICA.

References [1] J..Jang, C.Tsai Sun, E.Mizutani, Neuro-Fuzzy and Soft Computing: A Computational Approach to Learning & Machine Intelligence, Prentice Hall. [2] C.C.Lee, “ Fuzzy Logic in Control Systems

:Fuzzy Logic Controller-PartI ”, IEEE, Trans. Syst. Man Cybern. Vol.20, pp.404-435, 1990. [3] O.Cordon, F.Herrera, F.Hoffmann, Luis Magdalena, "Genetic Fuzzy Systems: Evolutionary Tuning and Learning of Fuzzy Knowledge Base", Advances in Fuzzy SystemApplications and Theory,Vol. 19, 1998. [4] Atashpaz-Gargari E. and Lucas C., “Imperialist Competitive Algorithm: An algorithm for optimization inspired by imperialistic competition”, IEEE Congress on Evolutionary Computation, Singapore,2008. [5] E. Atashpaz-Gargari, F. Hashemzadeh and C. Lucas, Evolutionary Design of PID Controller for a MIMO Distillation Column using Colonial Competitive Algorithm, WCCI, CEC ,2008. [6] A. Biabangard-Oskouyi , E. Atashpaz-Gargari, N. Soltani and C. Lucas. Application of Imperialist Competitive Algorithm for materials property characterization from sharp indentation test, submitted to the International Journal of Engineering Simulation, under revision ,2008. [7] Biabangard-Oskouyi, E. Atashpaz-Gargari, N. Soltani, C. Lucas, “Materials Property Characterization from Spherical Indentation Test using Colonial Competitive Algorithm”, submitted to Actamateria, 2008. [8] Sepehri Rad, H., Lucas, C. "Application of Imperialistic Competition Algorithm in Recommender Systems", 13th Int'l CSI Computer Conference (CSICC'08), Kish Island, Iran ,2008. [9] E. Atashpaz Gargari, Farzad Hashemzadeh, Ramin Rajabiyoun, Farzad Rajaiee Salmasi, “Gershgorian Band Shrinking and Decentralized PID Controller Design for a MIMO evaporator plant using Colonial Competitive Algorithm”. Submitted to Journal of Process Control,2008. [10] T.J.Ross, Fuzzy Logic with Engineering Applications, John Wiley & Sons, New York, NY, USA, 2nd edition, 2004

Suggest Documents