1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Intelligent Control Systems with LabVIEW 7 doc

25 428 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Anfis: Adaptive Neuro-fuzzy Inference Systems
Trường học University of Science and Technology
Chuyên ngành Control Systems
Thể loại Luận văn
Thành phố Hanoi
Định dạng
Số trang 25
Dung lượng 879,08 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

4.3 ANFIS: Adaptive Neuro-fuzzy Inference Systems 115Fig.. 4.29 is the ANFIS Output graph that represents the Trainer function sinc function and the actual Output of the trained ANFIS..

Trang 1

4.3 ANFIS: Adaptive Neuro-fuzzy Inference Systems 115

Fig 4.29 Front panel of the ANFIS example using bell membership functions

On the right side of Fig 4.29 is the ANFIS Output graph that represents the Trainer function (sinc function) and the actual Output of the trained ANFIS The Error graph represents the error values at each epoch.

As we know, the bell function in the range Œ0; 1 is represented mathematicallyas:

Example 4.2 We want to control a 12V DC motor in a fan determined by some

am-bient conditions If the temperature is less than 25ıC, then the fan is switched off

If the temperature is greater than 35ıC, then the fan has to run as fast as possible

Trang 2

116 4 Neuro-fuzzy Controller Theory and Application

Table 4.3 ANFIS example 1

Training function Sinc

Fig 4.30 Initial step in the training procedure for ANFIS

If the temperature is between 25ıC and 35ıC, then the fan has to follow a tic function description In this way, we know that the velocity of rotation in a DCmotor is proportional to the voltage supplied Then, the logistic function is an ap-proximation of the voltage that we want to have depending on the degrees of theenvironment The function is described by (4.26)

logis-f x/D 1

Trang 3

4.3 ANFIS: Adaptive Neuro-fuzzy Inference Systems 117

Fig 4.31 Training procedure for ANFIS at 514 epochs

A simple analysis offers that the range of the logistic function is Œ0; 12, and for iting the domain of the function, suppose an interval Œ0; 60 Select a D 2:5 Usingthe hybrid learning method, train an ANFIS system selecting four triangular mem-bership functions with learning rates for all parameters equal to 0.01 Determine

lim-if this number of membership functions is optimal; otherwise propose the optimalnumber

Solution Following the path ICTL Neuro-Fuzzy ANFIS

Example_ANFIS-Triangular.vi As in Example 4.1, this VI is very similar except that the adaptive

pa-rameters come from triangular membership functions Remember that a triangularmembership function is defined by three parameters: a means the initial position ofthe function, b is the value at which the function takes the value 1, and c is the param-eter in which the function finishes

We need to modify the block diagram First, add a Case Before in the Case ture as shown in Fig 4.33 Label this new case as “Logistic.” Then, access ICTL

Struc-ANNs Perceptron Transfer F logistic.vi This function needs Input values

coming from the vector node (see Figs 4.33 and 4.34) and a 2.5 constant is placed

in the alpha connector.

Trang 4

118 4 Neuro-fuzzy Controller Theory and Application

Fig 4.32 Training procedure for ANFIS at 977 epochs

Fig 4.33 Case structure for

the logistic function

Trang 5

4.3 ANFIS: Adaptive Neuro-fuzzy Inference Systems 119

Fig 4.34 Block diagram showing the corrections in the ANFIS graph

Table 4.4 ANFIS example 2

Training function Logistic

Fig 4.35 Training procedure for ANFIS at 15 epochs

Trang 6

120 4 Neuro-fuzzy Controller Theory and Application

Fig 4.36 Training procedure for ANFIS at 190 epochs

After that, add a new item in the Training Function Combo Box at the front panel Label the new item as “Logistic” and click OK Then, replace the ANFIS Output Graph with a XY Graph Looking inside the block diagram, we have to correct the

values of the ANFIS Output as seen in Fig 4.35 Place a rampVector.vi and run

this node from 0 to 60 with a stepsize of 0.3 These numbers are selected because

they are the domain of the temperature in degrees and the size of the Trainer array The first orange line (the top one inside the while-loop) connected to a multiplier comes from the Trainer line and the second line comes from the Ev-Ots output of

the anfis_evaluator.vi.

Then, the VI is available for use with the indications At the front panel, select the

values shown in Table 4.4 Remember to switch on the Train? button Figures 4.35

and 4.36 show the implementation of that program We can see that the training ispoor Then, we select 5, 6 and 7 membership functions Figure 4.37 shows the resultswith this membership function at 200 epochs We see at 5 membership functions anerror of 4.9E–4, at 6 an error of 1.67E–5, and at 7 an error of 1.6E–4 We determinethat the optimal number of membership functions is 6 u

Trang 7

4.3 ANFIS: Adaptive Neuro-fuzzy Inference Systems 121

Fig 4.37a–c ANFIS responses at 200 epochs a With 5 membership functions b With 6 ship functions c With 7 membership functions

Trang 8

member-122 4 Neuro-fuzzy Controller Theory and Application

3 Fourier J (2003) The analytical theory of heat Dover, Mineola, NY

4 Ponce P, et al (2006) A novel neuro-fuzzy controller based on both trigonometric series and fuzzy clusters Proceedings of IEEE International Conference on Industrial Technology, India, 15–17 Dec 2006

5 Kanjilal PP (1995) Adaptive prediction and predictive control Short Run, Exeter, UK

6 Ramirez-Figueroa FD, Mendez-Cisneros D (2007) Neuro-fuzzy navigation system for mobile robots Dissertation, Electronics and Communications Engineering, Tecnológico de Monter- rey, México, May 22 2007

7 Images Scientific Instrumentation (2009) http://www.imagesco.com Accessed on 22 Feb 2009

8 Jang J-SR (1993) ANFIS: adaptive network-based inference system IEEE Trans Syst Man Cyber 23(3): 665–685

9 Jang J-SR, Sun C-T, Mizutani E (1997) Neuro-fuzzy and soft computing: a computational approach to learning and machine intelligence Prentice Hall, New York

10 ITESM-CCM Team (2009) Electric wheelchair presented in NIWEEK 2009 Austin Texas

Trang 9

of problems In intelligent control (IC) they are mostly used as an optimizationtechnique to find minimums or maximums of complex equations, or quasi-optimalsolutions in short periods of time.

N Cramer later proposed genetic programming in 1985, which is another kind ofevolutionary computation algorithm with string bases in genetic algorithms (GA).The difference basically is that in GA strings of bits representing chromosomesare evolved, whereas in genetic programming the whole structure of a computerprogram is evolved by the algorithm Due to this structure, genetic programmingcan manage problems that are harder to manipulate by GAs Genetic programminghas being used in IC optimize the sets of rules on fuzzy and neuro-fuzzy controllers

5.1.1 Evolutionary Computation

Evolutionary computation represents a powerful search and optimization paradigm.The metaphor underlying evolutionary computation is a biological one, that of nat-ural selection and genetics A large variety of evolutionary computational modelshave been proposed and studied These models are usually referred to as evolution-ary algorithms Their main characteristic is the intensive use of randomness andgenetic-inspired operations to evolve a set of solutions

Evolutionary algorithms involve selection, recombination, random variation andcompetition of the individuals in a population of adequately represented potentialsolutions These candidate solutions to a certain problem are referred to as chro-mosomes or individuals Several kinds of representations exist such as bit string,

P Ponce-Cruz, F D Ramirez-Figueroa, Intelligent Control Systems with LabVIEW™ 123

© Springer 2010

Trang 10

124 5 Genetic Algorithms and Genetic Programmingreal-component vectors, pairs of real-component vectors, matrices, trees, tree-likehierarchies, parse trees, general graphs, and permutations.

In the 1950s and 1960s several computer scientists started to study evolutionarysystems with the idea that evolution could be applied to solve engineering problems.The idea in all the systems was to evolve a population of candidates to solve prob-lems, using operators inspired by natural genetic variations and natural selection

In the 1960s, I Rechenberg introduced evolution strategies that he used to mize real-valued parameters for several devices This idea was further developed byH.P Schwefel in the 1970s L Fogel, A Owens and M Walsh in 1966 developed

opti-evolutionary programming, a technique in which the functions to be optimized are

represented as a finite-state machine, which are evolved by randomly mutating theirstate-transition diagrams and selecting the fittest Evolutionary programming, evolu-tion strategies and GAs form the backbone of the field of evolutionary computation.GAs were invented by J Holland in the 1960s at the University of Michigan Hisoriginal intention was to understand the principles of adaptive systems The goalwas not to design algorithms to solve specific problems, but rather to formally studythe phenomenon of adaptation as it occurs in nature and to develop ways in whichthe mechanisms of natural adaptation might be ported to computer systems In 1975

he presented GAs as an abstraction of biological evolution in the book Adaptation

in Natural and Artificial Systems.

Simple biological models based on the notion of survival of the best or fittestwere considered to design robust adaptive systems Holland’s method evolves a pop-ulation of candidate solutions The chromosomes are binary strings and the searchoperations are typically crossover, mutation, and (very seldom) inversion Chromo-somes are evaluated by using a fitness function

In recent years there has been an increase in interaction among researchers ing different methods and the boundaries between them have broken down to someextent Today the term GA may be very far from Holland’s original concept

study-5.2 Industrial Applications

GAs have been used to optimize several industrial processes and applications F.Wang and others designed and optimized the power stage of an industrial motordrive using GAs at the Virginia Polytechnic Institute and State University at Virginia

in 2006 [1] They analyzed the major blocks of the power electronics that drive anindustrial motor and created an optimization program that uses a GA engine Thiscan be used as verification and practicing tools for engineers

D.-H Cho presented a paper in 1999 [2] that used a niching GA to design aninduction motor for electric vehicles Sometimes a motor created to be of the highestefficiency will perform at a lower level because there are several factors that were notconsidered when it was designed, like ease of manufacture, maintenance, reliability,among others Cho managed to find an alternative method to optimize the design ofinduction motors

Trang 11

5.3 Biological Terminology 125GAs have also been used to create schedules in semiconductor manufacturingsystems S Cavalieri and others [3] proposed a method to increase the efficiency ofdispatching, which is incredibly complex This technique was applied to a semicon-ductor manufacture plant The algorithm guarantees that the solution is obtained in

a time that is compatible with on-line scheduling They claim to have increased theefficiency by 70%

More recently V Colla and his team presented a paper [4] where they comparetraditional approaches, and GAs are used to optimize the parameters of the models.These models are often designed from theoretical consideration and later adapted

to fit experimental data collected from the real application From the results sented, the GA clearly outperforms the other optimization methods and fits betterwith the complexity of the model Moreover, it provides more flexibility, as it doesnot require the computation of many quantities of the model

pre-5.3 Biological Terminology

All living organisms consist of cells that contain the same set of one or more mosomes serving as a blueprint Chromosomes can be divided into genes, which are functional blocks of DNA The different options for genes are alleles Each gene is located at a particular locus (position) on the chromosome Multiple chromosomes and or the complete collection of genetic material are called the organism’s genome.

chro-A genotype refers to the particular set of genes contained in a genome.

In GAs a chromosome refers to an individual in the population, which is often

encoded as a string or an array of bits Most applications of GAs employ haploidindividuals, which are single-chromosome individuals

5.3.1 Search Spaces and Fitness

The term “search space” refers to some collection of candidates to a problem andsome notion of “distance” between candidate solutions GAs assume that the bestcandidates from different regions of the search space can be combined via crossover,

to produce high-quality offspring of the parents “Fitness landscape” is another portant concept; evolution causes populations to move along landscapes in particularways and adaptation can be seen as the movement toward local peaks

im-5.3.2 Encoding and Decoding

In a typical application of GAs the genetic characteristics are encoded into bits ofstrings The encoding is done to keep those characteristics in the environment If

we want to optimize the function f x/ D x2with 0  x < 32, the parameter ofthe search space is x and is called the phenotype in an evolutionary algorithm In

Trang 12

126 5 Genetic Algorithms and Genetic Programming

Table 5.1 Chromosome encoded information

Decimal number Binary encoded

GAs the phenotypes are usually converted to genotypes with a coding procedure

By knowing the range of x we can represent it with a suitable binary string Thechromosome should contain information about the solution, also known as encoding(Table 5.1)

Although each bit in the chromosome can represent a characteristic in the tion here we are only representing the numbers in a binary way There are severaltypes of encoding, which depend heavily on the problem, for example, permutationencoding can be used in ordering problems, whereas floating-point encoding is veryuseful for numeric optimization

solu-5.4 Genetic Algorithm Stages

There are different forms of GAs, however it can be said that most methods labeled

as GAs have at least the following common elements: population of chromosomes,selection, crossover and mutation (Fig 5.1) Another element rarely used calledinversion is only vaguely used in newer methods A common application of a GA

is the optimization of functions, where the goal is to find the global maximum orminimum

A GA [5] can be divided into four main stages:

• Initialization The initialization of the necessary elements to start the algorithm.

• Selection This operation selects chromosomes in the population for reproduction

by means of evaluating them in the fitness function The fitter the chromosome,the more times it will be selected

Fig 5.1 GA main stages

Trang 13

5.4 Genetic Algorithm Stages 127

• Crossover Two individuals are selected and then a random point is selected and

the parents are cut, then their tails are crossed Take as an example 100110 and111001: the 3 position from left to right is selected, they are crossed, and theoffspring is 100001, 111110

• Mutation A gene, usually represented by a bit is randomly complemented in

a chromosome, the possibility of this happening is very low because the tion can fall into chaotic disorder

popula-These stages will be explained in more detail in the following sections

5.4.1 Initialization

In this stage (shown in Fig 5.2) the initial individuals are generated, and the stants and functions are also initiated, as shown in Table 5.2

con-Fig 5.2 GA initialization stage

Table 5.2 GA initialization parameters

Parameter Description

g The number of generations of the GA.

m Size of the population.

n The length of the string that represents each individual: s D f0; 1gn The

strings are binary and have a constant length.

P C The probability of crossing of 2 individuals.

PM The probability of mutation of every gen.

Ngày đăng: 06/08/2014, 00:20

TỪ KHÓA LIÊN QUAN

w