• 沒有找到結果。

2 A Functional-Link-Based Neuro-Fuzzy Network (FLNFN)

2.4 Summary

This dissertation proposes a functional-link-based neuro-fuzzy network (FLNFN) structure for nonlinear system control. The FLNFN model uses a functional link neural network to the

consequent part of the fuzzy rules. The FLNFN model can automatically construct and adjust free parameters by performing online structure/parameter learning schemes concurrently. The FLNFN model was proven to be a universal approximator and to convergence stably. Finally, the proposed FLNFN model yields better simulation results than other existing models under some circumstances.

Chapter 3

A Modified Differential Evolution for the FLNFN Model

In Chapter 2, we have developed the functional-link-based neuro-fuzzy network (FLNFN).

However, the back-propagation learning algorithm may reach the local minima very quickly.

Therefore, a modified differential evolution (MODE) is presented to optimize the FLNFN parameters in this chapter. The proposed MODE learning algorithm has two crucial ideas.

First, MODE adopts a method to effectively search between the best-so-far individual and randomly chosen individuals. Therefore, MODE not only explores the search space by randomly chosen individuals but also exploits the search capability of a near global optimal solution by the best-so-far individual. Second, MODE provides a cluster-based mutation scheme, which maintains useful diversity in the population to increase the search capability.

The cluster-based mutation scheme prevents the MODE from being trapped in local optima of the search space.

3.1 A Brief Introduction of Differential Evolution

This section describes basic concepts concerning differential evolution (DE) [53]. Differential evolution is a parallel direct search method which utilizes NP N-dimensional parameter

vectors

NP i

xi,G, =1 ,2 ,..., (3.1) as a population for each generation G. NP does not change during the minimization process.

The initial vector population is chosen randomly and should cover the entire parameter space.

As a rule, we will assume a uniform probability distribution for all random decisions unless otherwise stated. In case a preliminary solution is available, the initial population might be generated by adding normally distributed random deviations to the nominal solution. DE generates new parameter vectors by adding the weighted difference between two population vectors to a third vector. Let this operation be called mutation. The mutated vector’s parameters are then mixed with the parameters of another predetermined vector, the target vector, to yield the so-called trial vector. Parameter mixing is often referred to as “crossover”

in the ES-community and will be explained later in more detail. If the trial vector yields a lower cost function value than the target vector, the trial vector replaces the target vector in the following generation. This last operation is called selection. Each population vector has to serve once as the target vector so that NP competitions take place in one generation.

More specifically DE’s basic strategy can be described as follows:

Mutation-For each target vector xi,G, i=1 ,2 ,...,NP, a mutant vector is generated according to

(

r G r G

)

G r G

i x F x x

v, 1 , , ,

3 2

1 + ⋅ −

+ = (3.2)

with random indexes r1 ,r2 ,r3

{

1 ,2,...,NP

}

, integer, mutually different and F > 0. The randomly chosen integers r1, r2 and r3 are also chosen to be different from the running index i, so that NP must be greater or equal to four to allow for this condition. F is a real and constant factor

∈ [ 0 , 2 ]

which controls the amplification of the differential variation

(

xr,G xr,G

)

3

2 − .

Figure 3.1 shows a two-dimensional example that illustrates the different vectors which play a

part in the generation of vi,G+1.

Figure 3.1: An example of a two-dimensional cost function showing its contour lines and the process for generating vi,G+1.

Crossover-In order to increase the diversity of the perturbed parameter vectors, crossover is introduced. To this end, the trial vector:

(

1, 1 2, 1 , 1

)

1

,G+ = iG+ , iG+ ,..., NiG+

i u u u

u (3.3) is formed, where

N

In Eq.(3.4), r(j) is the jth evaluation of a uniform random number generator with outcome

∈ [ 0 , 1 ]

. CR is the crossover constant

∈ [ 0 , 1 ]

which has to be determined by the user.

rn(i) is a randomly chosen index ∈1 ,2 ,...,N which ensures that ui,G+1 gets at least one

parameter from vi,G+1. Figure 3.2 gives an example of the crossover mechanism for 7-dimensional vectors.

j=1 2 3 4 5 6 7

xi,G vi,G+1 ui,G+1

j=1 2 3 4 5 6 7

j=1 2 3 4 5 6 7 Target vector

containing the parameters xji,G,

j=1,2,…,N

Mutant vector

Trial vector r(3)<=CR r(4)<=CR

r(6)<=CR

Figure 3.2: Illustration of the crossover process for N=7 parameters.

Selection-To decide whether or not it should become a member of generation G+1, the trial vector ui,G+1 is compared to the target vector xi,G using the greedy criterion. If vector

1 ,G+

ui yields a smaller cost function value than xi,G, then xi,G+1 is set to ui,G+1; otherwise, the old value xi,G is retained.

3.2 A Modified Differential Evolution

This section describes a modified differential evolution (MODE) for the FLNFN model. The MODE learning algorithm consists of four major phases – the initialization phase, the evaluation phase, the reproduction phase and the cluster-based mutation phase. First, the initialization phase creates an initial population. Second, the evaluation phase evaluates the performance of each individual using an objective function. Third, the reproduction phase generates new individuals and select survivors to the next phase. Fourth, the cluster-based mutation phase ensures diversity and prevents a population from converging to a suboptimal solution. The whole learning process is described step-by-step below.

3.2.1 Initialization Phase

A. Coding Step

The foremost step in MODE is the coding of the neuro-fuzzy network into an individual.

Figure 3.3 shows an example of the coding of parameters of the neuro-fuzzy network into an individual where i and j represent the ith input variable and the jth rule, respectively. In this dissertation, a Gaussian membership function is adopted with variables that represent the mean and variance of the membership function. Figure 3.3 represents the neuro-fuzzy network given by Eq. (2.3), where m and ij

σ

ij are the mean and variance of a Gaussian

membership function, respectively, and w represents the corresponding link weight of the kj consequent part that is connected to the jth rule node. In this dissertation, a real number represents the position of each individual.

m1j m2j ….. mij ….. w1j w2j ….. wMj

Individual

j

σ1 σ2j σij

Rule1 Rule2 ….. Rulej ….. RuleR

Figure 3.3: Coding FLNFN into an individual in the proposed MODE method.

B. Create Initial Population

Before the MODE learning algorithm is applied, every individual xi,g must be created randomly in the range [0, 1], where i=1, 2, …, PS represents the ith individual for each generation g and PS denotes the population size.

3.2.2 Evaluation Phase

In this dissertation, we adopt a fitness function (i.e., objective function) to evaluate the performance of each individual. The fitness function is defined as follows:

=

where yk represents the model output of the kth data,

y

k represents the desired output of the kth data, and Nt represents the number of the training data.

3.2.3 Reproduction Phase

A. Parent Choice

Each individual in the current generation is allowed to breed through mating with other randomly selected individuals from the population. Specifically, for each individual xi,g, i=1,

2, …, PS, where g denotes the current generation, three other random individuals, xr1,g, xr2,g

i≠ ≠ ≠ . This way, a parent pool of four individuals is formed to produce an offspring.

B. Offspring Generation

After choosing the parents, MODE applies a differential operation to generate a mutated individual vi,g, according to the following equation:

)

where F, commonly known as the scaling factor, is defined as Gg to control the rate at which the population evolves, g denotes the current generation, G is the maximum number of generations, and xbest is the best-so-far individual in each generation. To complement the differential operation search strategy, then MODE uses a crossover operation, often referred to as discrete recombination, in which the mutated individual vi,g is mated with xi,g and

generates the offspring ui,g. The elements of an individual ui,g are inherited from xi,g and

g

vi, , which are determined by a parameter called crossover probability (CR∈[0 ,1]), as follows:



>

= ≤

CR d Rand x

CR d Rand u v

g id

g id g

id , if ( )

) ( if ,

, ,

, (3.7)

where d =1,2,...,D denotes the dth element of individual vectors. Rand(d)∈[0 ,1] is the dth evaluation of a random number generator.

C. Survivor Selection

MODE applies selection pressure only when selecting survivors. A knockout competition is played between each individual xi,g and its offspring ui,g, and the winner is selected

deterministically based on objective function values and is then promoted to the next phase.

Moreover, the best individual also reserves to the next generation.

3.2.4 Cluster-Based Mutation Phase

To prevent the MODE from being trapped in the local optima of the search space (i.e., problems in which there are a number of points that are better than all their neighboring solutions, but do not have as good a fitness as the globally optimal solution), we adopt a cluster-based mutation scheme, which maintains diversity in the population to increase the search capability. We use an easy and fast self-cluster algorithm (SCA) [66] to cluster the population. Each cluster can be viewed as a subspace with similar biological features in the environment that can support different types of life; that is, these similar individuals of each cluster direct the search toward the same local optima. Then, for each cluster, the best individual will be reserved and other individuals will be suitably mutated to the next generation. Mutation is an operator that randomly alters the allele of an element. Figure 3.4 shows the mutation of an individual. The mutation value is generated according to

Mean: Individual[d]=mij+random[0,1]×

σ

ij (3.8)

Variance: Individual[d]=2×random[0,1]×

σ

ij (3.9) Other parameters: Individual[d]=random[−1,1] (3.10) where mij and σij are the current mean and variance in the current individual, respectively.

Following the mutation step, a new individual can be introduced into the each population.

m11 σ11 ….. mi1 wi1 …..

Mutation Point

mijnew

Old Individual

New Individual

1

σ …..i m1j σ1j ….. mij σij ….. wij …..

m11 σ11 ….. mi1 σ …..i1 wi1 ….. m1j σ1j ….. mijnew σij ….. wij …..

Figure 3.4: A mutation operation in the modified differential evolution.

3.3 Experimental Results

This dissertation demonstrated the performance of the FLNFN-MODE controller for nonlinear system control. The FLNFN-MODE controller is applied to control of water bath temperature system. In addition, this experimentation discusses the use of a real-time digital control environment with a hardware-in-the-loop (HIL) control application. We configure a real-time visual simulation (VisSim) environment including a RT-DAC4/PCI motion control card and HIL systems to demonstrate the performance of the FLNFN-MODE controller for practical control applications. VisSim is a Windows-based program for the modeling and simulation of complex nonlinear dynamic systems. VisSim combines an intuitive drag and drop block diagram interface with a powerful simulation engine. We can generate a VisSim diagram using a customizable ANSI C code directly. In this dissertation, we applied the FLNFN-MODE controller to the planetary train type inverted pendulum system and the magnetic levitation system in the VisSim. The experiment compares the performance with

that of the FLNFN-MODE controller, the FLNFN-DE controller, and the FLNFN-GA controller. Table 3.1 presents the parameter settings before training used in the three computer simulations for the MODE. In the DE, the population size is set to 50, the maximum number of generation is set to 2000, and the crossover rate is set to 0.9. In the GA, the population size is set to 50, the maximum number of generation is set to 2000, the crossover rate is set to 0.5, and the mutation rate is set to 0.3.

Table 3.1: Parameter settings before training.

Parameter Value

Population Size 50

Maximum Number of

Generation 2000

Crossover Rate 0.9

Coding Type Real Number

Example 1: Control of Water Bath Temperature System

The description of the system is the same as Example 1 of Section 2.3. In this example, four fuzzy rules are adopted and the population size is set to 50. The evolution proceeded for 2000 generations, and was repeated thirty times.

This dissertation compares the FLNFN-MODE controller to the FLNFN-DE controller and the FLNFN-GA controller. Each of these controllers is applied to the water bath temperature control system. The performance measures include the set-points regulation, the influence of impulse noise, and a large parameter variation in the system, and the tracking capability of the controllers.

Figure 3.5(a) presents the regulation performance of the FLNFN-MODE controller. The regulation performance was also tested using the FLNFN-DE controller and the FLNFN-GA controller. Figure 3.5(b) plots the error curves of the FLNFN-MODE controller, the FLNFN-DE controller and the FLNFN-GA controller. Figure 3.6(a) and (b) present the

behaviors of the FLNFN-MODE controller under the influence of impulse noise, and the corresponding errors, respectively. Figure 3.7(a) presents the behaviors of the FLNFN-MODE controller when in the plant dynamics change. Figure 3.7(b) presents the corresponding errors of the FLNFN-MODE controller, the FLNFN-DE controller and the FLNFN-GA controllers.

Figure 3.8(a) presents the tracking performance of the FLNFN-MODE controller. Figure 3.8(b) presents the corresponding errors of the FLNFN-MODE controller, the FLNFN-DE controller, and the FLNFN-GA controller. The aforementioned simulation results, presented in Table 3.2, demonstrate that the proposed FLNFN-MODE controller outperforms other controllers.

(a)

(b)

Figure 3.5: (a) Final regulation performance of FLNFN-MODE controller in water bath

system. (b) Error curves of the FLNFN-MODE controller, FLNFN-DE controller and FLNFN-GA controller.

(a)

(b)

Figure 3.6: (a) Behavior of FLNFN-MODE controller under impulse noise in water bath system. (b) Error curves of FLNFN-MODE controller, FLNFN-DE controller and FLNFN-GA controller.

(a)

(b)

Figure 3.7: (a) Behavior of FLNFN-MODE controller when a change occurs in the water bath system. (b) Error curves of FLNFN-MODE controller, FLNFN-DE controller and FLNFN-GA controller.

(a)

(b)

Figure 3.8: (a) Tracking of FLNFN-MODE controller when a change occurs in the water bath system. (b) Error curves of FLNFN-MODE controller, FLNFN-DE controller and FLNFN-GA controller.

Table 3.2: Comparison of performance of various controllers to control of water bath temperature system.

=

=120

1

| ) ( ) (

|

k yref k yk

SAE FLNFN-MODE

Controller

FLNFN-DE Controller

FLNFN-GA Controller Regulation

Performance 352.78 352.91 372.85

Influence of Impulse

Noise 270.59 270.65 282.21

Effect of Change in

Plant Dynamics 263.39 263.25 270.66

Tracking

Performance 42.03 42.92 62.02

Example 2: Control of Planetary Train Type Inverted Pendulum System

In order to predict the dynamic behavior of a system from given input command and initial conditions of the system, it is necessary to make a mathematical model of the planetary train type inverted pendulum system [67]. The dynamic behavior of the system is helpful in sizing the actuator, choosing the amplifier power, designing the details of the mechanisms, and tuning the controller by computer simulation. To clarify the kinematic and dynamic

relations, three major movable parts, the center gear, the planetary gear and the pendulum, are depicted in Fig. 3.9.

θ &

1

θ &

2

m

0

g

m

1

g m

2

g

θ

0

Figure 3.9: A physical model geometry of the planetary train type inverted pendulum.

The kinematic relations of the three components can be allotted to two mutual movements as follows. First, we assume the pendulum to be stationary (

θ

&0=0). The ratio of the movements of the planetary gear to the center gear is

1 2 1 2 2

1

r r N e= ′ =−N =−

θ θ

&

&

(3.11) where

θ

1 and

θ

2 are the angle of the center gear and the planetary gear, respectively; N1

and N2 are the number of the tooth of the center gear and the planetary gear, respectively; r1

and r2 are the radius of the center gear and the planetary gear; the dot denotes the time derivative; and

θ

1′& refers to the angular velocity of the planetary gear in this case. Thus,

2

1

θ

θ

&′=e& . (3.12) Second, we assume the center gear to be stationary (

θ

&2 =0) and allow the pendulum and planetary gear to turn. The velocity of the planetary gear center can then be expressed as

0 2

1 )

(r r

θ

&

v= + . (3.13)

This velocity lets the angular velocity of the planetary gear (

θ

& ) in this case be 1′′

Combining Eqs. (3.13) and (3.14), we obtain

0

For the purpose of obtaining the relations between the input motor torque

τ

2, the output responses of the pendulum

θ

0, and the center gear

θ

2, we will use Lagrangian mechanics.

Using this method can ensure that we analyze the mechanism in a systematic approach. It starts with the findings of kinetic energy and potential energy of each movable part.

0 planetary gear and the pendulum, respectively; I2andI1 are the moment of inertia of the center gear and the planetary gear, respectively; m1andm0 are the mass of the planetary gear and the pendulum, respectively; and l is the length of the pendulum.

Substituting Eq. (3.15) into Eq. (3.16), we obtain Lagrangian as follows:

0

Because

θ

0 and

θ

2 are two independent variables, we regard them as generalized coordinates. Using Lagrange’s equation, two of the dynamic equations are derived as follows:

0

In Eq. (3.19), there is no external torque applied in the pendulum, so we assign zero to the variable

τ

0.

In this dissertation, the proposed control structure is shown in Fig. 3.10. The applied encoder is used to sense the angle of the pendulum and then to translate the signal as a feedback signal. The pendulum angle is controlled by a motor torque until the pendulum is balanceable. To validate the usefulness of the proposed control system under different reference trajectories, two cases, including the set-point command (i.e., the stick angle command is equal to zero) and the periodic square command (i.e., the stick angle command is equal to the square wave) are used in this experimentation.

Controller D/A Driver Planetary Train Type Inverted

Pendulum

Encoder

pendulum angle pendulum angle

command

PC

A/D

Figure 3.10: Control block diagram for the planetary train type inverted pendulum system.

This dissertation compares the FLNFN-MODE controller to the PID controller, the FLNFN-DE controller, and the FLNFN-GA controller. Each of these controllers is applied to the planetary train type inverted pendulum system. The PID controller is implemented as follows:

dt K de d e K t e K t

u( )= p ()+ i

0t (

τ

)

τ

+ d (3.20) where u(t) is the control output and the error, e(t), is defined as e(t)=desired value-measured value of quantity being controlled. The control gains Kp=830, Ki=0, and Kd=0.3284 are designed. The training patterns of the FLNFN model are generated using the various PID controllers with different control gains.

Figure 3.11 shows an experimental planetary train type inverted pendulum system test used to validate the experimentation results. The performance measures include the set-points regulation (Case 1) and the square command tracking capability (Case 2) of the controllers. In Case 1, the proposed system is controlled to follow the set-points, which is equal to zero.

Figure 3.12(a)-(d) presents the regulation performance of the FLNFN-MODE controller, the PID controller, the FLNFN-DE controller, and the FLNFN-GA controller. Figure 3.12(e) plots the scaling curves of the FLNFN-MODE controller and the PID controller between the 1.5th second and the 3.5th second. To test their regulation performance, two performance indexes, the sum of absolute error (SAE) for the pendulum angle and the pendulum speed, are defined by

= 0 0

0

θ θ

θ ref

SAE and SAEθ&0 =

∑ θ

&0ref

θ

&0 (3.21) where

θ

0ref and

θ

0 are the referred pendulum angle and the actual pendulum angle,

respectively, and

θ

& and 0ref

θ

& are the referred pendulum speed and the actual pendulum 0 speed, respectively. The SAE and θ0

θ&0

SAE of the experimental results are presented in

Table 3.3.

Figure 3.11: The experimental planetary train type inverted pendulum system.

(a)

(b)

(c)

(d)

(e)

Figure 3.12: (a)-(d) Final regulation performance of the FLNFN-MODE controller, PID controller, FLNFN-DE controller and FLNFN-GA controller. (e) Scaling curves of the FLNFN-MODE controller and PID controller between the 1.5th second and the 3.5th second.

In Case 2, the tracking capability of the proposed system is tested using a square wave with amplitude ±0.02 and frequency 0.5Hz. Figure 3.13(a)-(d) presents the regulation performance of the FLNFN-MODE controller, the PID controller, the FLNFN-DE controller, and the FLNFN-GA controller. Figure 3.13(e) plots the scaling curves of the FLNFN-MODE controller and the PID controller between the 4th second and the 8th second. A summary of the experimental results are presented in Table 3.3. As presented in Table 3.3, the proposed FLNFN-MODE controller outperforms the other controllers.

(a)

(b)

(c)

(d)

(e)

Figure 3.13: (a)-(d) Tracking of the FLNFN-MODE controller, PID controller, FLNFN-DE controller and FLNFN-GA controller, respectively, for a square wave with amplitude ±0.02 and frequency 0.5Hz. (e) Tracking curves of the FLNFN-MODE controller and PID controller between the 4th second and the 8th second.

Table 3.3: Comparison of performance of various controllers to control of the planetary train type inverted pendulum system with a 0.1s sampling rate.

FLNFN-MODE Controller

PID Controller

PID Controller

相關文件