Tuning of Fuzzy Logic Controller for a DC Motor ...

2 downloads 0 Views 808KB Size Report
Hanan A.R. Akkar*, Ahlam Najim A-Amir**, Mohammed S. Saleh***. Abstract-This paper ... swarm optimization Mamdani fuzzy controller. In this project a new ...
International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518

74

Tuning of Fuzzy Logic Controller for a DC Motor Based on Particle Swarm Optimization Hanan A.R. Akkar*, Ahlam Najim A-Amir**, Mohammed S. Saleh*** Abstract-This paper presents an active method to determine the parameters of the membership functions of a F.L. Controller. To provide an optimum performance of the system, the parameters of the membership functions of a fuzzy logic system can be tuned through particle swarm optimization (PSO), so the shape of these functions will vary according to the variables, then the fuzzy control output changes and the performance of the system will be changed. In this model the PSO optimization will consider only certain points of the membership functions. It is used to optimize the triangular membership functions of the fuzzy model to the nonlinear problems. The fuzzy control structure consist of five membership functions and 25 rules and with the PSO optimization becomes enough for driving a DC motors of a six degree of freedom for Robot control with six motors to compensate for uncertainty. The results of the Matlab simulation applied to the DC motor shows the validity of the new presented method. Keywords-Fuzzy logic (F.L.), Membership functions (M.Fs), Particle swarm optimization PSO

——————————  ——————————

1

INTRODUCTION

IJSER

which is a non-linear delay differential model by using a swarm optimization Mamdani fuzzy controller.

THE fuzzy logic is a strong candidate, because of its

In this project a new method for constructing

simplicity and speed of implementation for many control

systems. We know that fuzzy logic deals with uncertainty

membership functions for five fuzzy levels is shown, and

in many engineering applications, and commercially it has

based automatically on particle swarm optimization with

been verified the greet successes to control machines

the ability of changing particles for best position so as to

because it can be understood and implemented with non

obtain membership functions that gives a zero detected

specialists [1].

error value.

This paper is organized as follows-section 2 presents an

In recent years, some people have been presented new methods to generate fuzzy rules and memberships

overview about the fuzzy logic control systems, section 3

functions, Kurniawan and Siti [2] presented a method to

presents the particle swarm optimization theory, section 4

generate a membership function automatically and used

shows the design of the fuzzy logic controller, section 5

the particle swarm optimization for membership functions

shows the method used to construct the whole new

automatic adjustment.

membership functions, the tests performed and figures,

Mohammed and Davood [2] have been presented a complete

ands section 6 presents the conclusion.

model of the glucose-insulin regulation system,

————————————————

*

Electrical Eng. Dept., University of Technology, Baghdad- Iraq. Email: [email protected]

**

Electrical Eng. Dept., Al- Mustansiriya University, Baghdad- Iraq. Email: [email protected]

***

Electronics Eng. Dept., Diyala University, Diyala- Iraq. Email: [email protected]

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518

75

2 FUZZY LOGIC CONTROLLER SYSTEMS

3 PARTICLE SWARM OPTIMIZATION (PSO)

Systems that use if – then type to characterize the behavior

The PSO is a very easy algorithm to understand and

of a system operation are called fuzzy logic systems. These

implement; It requires less computational memory and

rules are usually based on expert practical knowledge

fewer lines of code in comparison to genetic algorithm

about any system.

(GA) and evolutionary algorithm. The PSO is a high performance based optimizer with

FLS is an analytical way used to represent the human way of thought process and imprecise, inexact phenomena.

several highly desirable attributes. It is a basically based on

The membership function is a relation that provides for

the simulation of the social behavior of birds, bees and also

every element of the set a particular membership value.

of fish swarm theory. In 1995, Kennedy and Ebarhart gave us the design and

The fuzzy set is a set where every element associates itself with the set with a membership value; its range is

introduce the particle swarm optimization. The principle of

between 0 and 1. If we represent the relation as:

this optimization is by using its particles with best known positions to converge the swarm population to a single

μ

optimum in the solution space. The velocity is changed

A (x): X → [0, 1]

IJSER

iteratively for each particle by its personal best position, which is found by the particle, and also the best position found by the particles in its neighborhood.

X is the universe of discourse

A is a fuzzy set with every number of A associated with a

membership value.

each particle:

x is a crisp value in X[3].

The components of the fuzzy logic controller are as shown in figure 1.

At each step a new velocity and position is updated for

Vi (t+1) = Φ Vi (t) + c1r1 (Pbest (t) –Xi (t)) + c2r2 (Gbest (t) – Xi (t)) (1) Xi (t+1) = Xi (t) + Vi (t+1) Where:

(2)

Xi = Position of the ith position c1and c2 = positive constants Φ = inertia weight r1and r2 = Random numbers between 0 and 1 Pbest = local best for previous position; (position of the best

Fig.1. Fuzzy Logic Controller Components

fitness value) of the ith particle. Gbest = position of the best particle among particles in the

The Fuzzifier transforms the crisp input into fuzzy sets (fuzzification), the inference engine performs all the of the logic operations in a fuzzy controller, the rule base contains

population. Vi = Change of velocity for particle i [3].

the M.Fs and the control ler rules, then the fuzzy sets output is transformed into numeric value by the Defuzzifier component (defuzzification) [4]. IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518

The optimization method starts by setting the initial set of parameters then gets the fitness function to obtain clearly a new values which is the set values of M.Fs. The new values will be used as an optimal requirement. Each particle will be formed according to the membership functions parameters of the fuzzy controller error input variable.

76

procedure of finding the solution space for particles, and develops a collaborative good search of the Pbest and Gbest for the determination of optimal values. The algorithm starts by initialization of parameters, they are the centers, lefts, and rights of each M.Fs, They will acts as the particles and also looking for finding the global best of fitness, then these parameters will be used to check the

3.1 IMPLEMENTATION PROCEDURE OF THE PSO OPTIMIZATION The PSO algorithm shown in figure 2 illustrates the

performance of the F.L. Controller, the process is repeated until the parameters optimization is achieved or the method reached the global best.

4 DESIGN OF THE F.L. CONTROLLER The fuzzy controller has been developed with the Matlab code program, the PSO code used to achieve this work with a maximum number of iteration of 30 and time steps of 50. The error signal and responses of the plant with PSO are shown in figure 3 and figure 4 respectively with bests of

IJSER

179.0092 and 417.0092. All measured curves are chosen to be the most fitted to obtain minimum overshoot and rise time.

In this paper two crisp inputs (e and ce) are fuzzified in

the fuzzy controller with 5 membership functions and also the same for the output to drive the DC motor, they are chosen to be triangular in shape.

Fig. 2. Flowchart of PSO algorithm to adjust fuzzy membership functions of error input variable

Fig. 3. The error signal with PSO

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518

77

Fig. 6. Error Input (e)

4. 2 Change of error input variable (ce) This input quantized into five fuzzy sets; Negative large NL, Negative small NS, zero Z, Positive small PS, and positive large PL as shown in figure 7.

Fig. 4. the responses of the plant with optimization The fuzzy controller was applied to the position control of DC motor. The block diagram of the system in figure (5)

IJSER

shows the use of PSO algorithm to tune the membership functions for the input error variable of the controller.

Fig. 7. change of error input (ce)

4. 3 Output It is five fuzzy sets; Negative large NL, Negative small NS, zero Z, positive small PS, and positive large PL as shown in figure 8. Fig.5. Block diagram of the system

4.1 Error input variable (e) This input quantized into five fuzzy sets; negative large NL, negative small NS, zero Z, positive small PS, and positive large PL as shown in figure 6. Fig. 8. output u(t) IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518

78

5 MEMBERSHIPS CONSTRUCTION USING PARTICLE SWARM OPTIMIZATION The two inputs and output of the F.L. Controller are correlated by Membership Functions; in this case the five membership functions of the error input variable is sufficient to be optimized because the fuzzy controller deals with the quantity which must be controlled to get the motor position required. Since there are five Membership Functions there are a total of 15 parameters to be tuned in this optimization as shown in figure 9.

Fig. 11. Good optimized Error Input

6 Conclusions This paper shows a search method with good and stable

IJSER

convergence characteristics based on particle swarm optimization (PSO). Figure 4 shows the best response with very little overshoot. Tuning the membership function of

Fig. 9 Membership Functions and their Parameters

the error input variable of a fuzzy logic controller is an

A new membership function successfully adjusted from the standard fuzzy membership function. In each iteration of optimization method, the particles will be changed to reach the optimal value and minimize error.

objective function to minimize overshoot, give better performance and also to obtain an optimal position control to the DC motor; Figures 10 and 11 .Steady error has been made zero and response is oscillatory because of the inductance which is present in the armature circuit.The experimental results show that fuzzy logic controller based on PSO is superior to the classical fuzzy logic and linear control methods since it is easy and don’t need to solve complex mathematical equations.

REFERENCE

Fig. 10. Optimized Error Input

[1] S. Bouallègue , J. Haggège and M. Benrejeb, “Fuzzy Controllers – Recent Advances in Theory and Applications”, chapter 6, INTECH 2012 [2] E.P. Kurniawan and Z. M. H. Siti, “Fuzzy Membership Function Generation using Particle Swarm Optimization”, Int. J. Open Problems Compt. Math., Vol. 3, No. 1, March 2010 [3] H. K. Mohammad, N. M. A. Davood, A. Alireza, and S. Mehdi, “Swarm optimization tuned Mamdani fuzzy controller for diabetes delayed model”, Turkish Journal of Electrical Engineering & Computer Sciences, 2013

[4] IJSER © 2015 http://www.ijser.org

V. James, “ Fuzzy Logic Systems”, control-systems-

International Journal of Scientific & Engineering Research, Volume 6, Issue 10, October-2015 ISSN 2229-5518 principles.co.uk [5]. M. Settles,“An Introduction to Particle Swarm Optimization ”, Department of Computer Science, University of Idaho,PP.1-8, Nov 7, 2005 [6] H. Chao-Ming, C. Shin-Ju and C. Huang-Chi , “An Online Implementation of Particle Swarm OptimizationBased Fuzzy Controllers for Magnetic Levitation Systems”, International Conference on Artificial Intelligence and Soft Computing Lecture Notes in Information Technology, Vol.12, 2012 [7] B. Brian, “A Particle Swarm Optimization (PSO) Primer With Applications”, 2004 [8] D. Debasmit, G. Arka, “Algorithm for a PSO Tuned Fuzzy Controller of a DC Motor”, International Journal of Computer Applications (0975 – 8887) Volume 73– No.4, July 2013

[9] H. Jorge, M. Anthony and G. Alfonso, “ Tuning a Fuzzy Controller by Particle Swarm Optimization for an Active Suspension System”, IEEE 2012 [10] D. Trung-Kien and C. Chih-Keng, “Fuzzy Logic – Controls, Concepts, Theories and Applications”, Capter 17, INTECH 2012 [11] C.D. Sree Bash, C.S. Pintu and M. Kazuyuki, “Particle Swarm Optimization Based Adaptive Strategy for Tuning of Fuzzy Logic Controller”, International Journal of Artificial Intelligence Applications (IJAIA). January 2013; Vol. 4.

IJSER

IJSER © 2015 http://www.ijser.org

79

Suggest Documents