Model Free On-line Adaptive Feedback Control

0 downloads 0 Views 195KB Size Report
FuNe I AFC Fuzzy System is useful in mapping into a neural network that utilises the ... Adaptive Feedback Control, Neuro-fuzzy, FuNe I fuzzy system. 1 Introduction ..... 2] K. Ogata. Discrete-Time Control Systems. Pren- tice Hall, New Jersey, ...
Model Free On-line Adaptive Feedback Control with FuNe I AFC Neuro-Fuzzy System Bill C.H. Chang1 and Saman Halgamuge Mechatronics Research Group Dept. of Mechanical and Manufacturing Engineering The University of Melbourne, Australia bcch,[email protected]

Abstract FuNe I AFC Fuzzy System is useful in mapping into a neural network that utilises the advantages of both neural and fuzzy systems. FuNe I architecture, previously used in classi cation applications, had been modi ed for feedback control adding a feedback at its output. The simulation results show that adaptive control of a real plant can be achieved without any prior knowledge of plant using this technique. Authors are currently developing optimization algorithms for the proposed architecture.

section 5 discusses some of the possible future developments.

2 FuNe I AFC for Adaptive Feedback Control FuNe I can be referred in three ways: FuNe I FS (Fuzzy System), FuNe I NFS ( Neuro-Fuzzy System) and FuNe I RGN (Rule Generation Network). The proposed FuNe I AFC (Adaptive Feedback Control) is a fuzzy system which contain fuzzy rules of type: IF Error is F1 AND Change of Error is F2 THEN fi = Ki and O(k) = O(k P ? 1)+4O(k) where 4O(k) = i fi ci

Keywords

Adaptive Feedback Control, Neuro-fuzzy, FuNe I fuzzy system.

1 Introduction Regulator feedback control has many major applications such as power generator speed control and temperature control[1][2]. Figure 1 shows a general structure of a regulator feedback system. In this system, output of the plant P(q) is to be regulated by the controller F(q) at a desired xed point within allowable errors. Classical regulator feedback controllers such as PID or state space based controllers require a detailed analysis of the system plant[2][3]. For a complex non-linear plant, the design of a classical controller is both dicult and time consuming and sometimes even impossible. This paper discusses the e ective use of neuro-fuzzy system FuNe I[4] in regulator feedback control. FuNe I fuzzy system and its rule generation method has already been successfully used in classi cation applications[4]. Section 2 summarises the method of generating FuNe I adaptive feedback controller (FuNe I AFC). Section 3 illustrates the on-line adaptation algorithm and Section 4 presents the simulation results of implementing the FuNe I fuzzy system as an adaptive regulator feedback controller. Finally, 1 This work is partially supported by Advance Engineering Center for Manufacturing, Melbourne, Australia

where ci is the weights connecting rule nodes Ri and output neuron O (see Figure 2). F1 and F2 are membership functions and Ki is the output value of a rule node. O(k) is the current output of FuNe I AFC fuzzy system, and O(k ? 1) is the previous output. Rd

e(z)

y(z) F(q)

P(q)

+

Figure 1: Regulator with Feedback 2.1 Input Layer

There are two inputs to the input neuron. One is the reference input which is the desired plant output value and the other is the actual plant output value. By taking the di erence between these two values, an error signal between the desired and the actual plant output is generated. Value for Change of error is obtained by

taking the di erence between values of error at time step k and k-1. Error and Change of error are the input variables to the FuNe I structure. If required, rate of change of error can also be implemented. Simulation Structure Min Neurons Sigmoid Neurons

Plant Output

Trainable (for rule extraction)

Plant Model

Fixed

functions can be obtained.

2.3 Implication

Fuzzy membership function neurons are connected to rule nodes, or Ri neurons. Each neuron in Mi layer represents NB, NM, S, PM or PB membership function. For fuzzy control, the "If I1 is F1 AND I2 is F2 " part of control rules are generated here by connecting relevant Mi neurons to a common Ri neuron using Minimum neurons. In Figure 2, the rst Ri neuron from the left can be interpreted as:

R1 : If Error is NB AND Change of Error is NB Then fi is ....

Trainable (for optimisation)

2.4 Defuzzi cation

The connections between the output neuron and the rule nodes, Ri , are adjustable to give desired control signals. Defuzzi cation method is:

Defuzzification

Ri

O(k) = O(k ? 1)+ P4O(k) where 4O(k) = i fi ci The feedback loop allows the output of FuNe I AFC network to be adjusted each time by a value of 4O and hence "pushes" the error to the "Error is Small" membership function region. And ideally after adaptation, when both error and change of error is small, the value of 4O should be zero.

Mi Fuzzification

Error Fuzzy Variable

+ -

+

Change of Error -

D

Input

Figure 2: FuNe I Adaptive Feedback Control with Nega-

tive Big (NB), Negative Medium (NM), Small (S), Positive Medium (PM) and Positive Big (PB) membership functions (from left to right) in the fuzzi cation layer

2.2 Fuzzi cation

Crisp values of "Error" and "Change of Error", are fuzzi ed in the fuzzi cation layer using sigmoid (Equation 1) and minimum neurons. Figure 2 shows the Negative Big (NB), Negative Medium (NM), Small (S), Positive Medium (PM) and Positive Big (PB) membership functions in the fuzzi cation layer Mi .

a1 [Ii ; C; ] = 1 + e?1C (I ? ) i

(1)

Where C and are constants, Ii is the input variable and a1 is the output of a sigmoid function. By changing the value of connection weights between neurons and biases of the sigmoid neurons, and with the use of minimum neurons, a variety of fuzzy membership

3 Adaptation Algorithm Satisfactory control is achieved by adjusting the control signal into the plant by an amout of 4O in each of the simulation step so that after few simulation steps, a desired control signal for the target plant output can be reached. A model of the plant to be controlled is not required and no prior knowledge of the plant is used in the proposed design. The adaptation process involves two steps, Initialization and Weight Adjustment.

3.1 Initialization

This step initializes the trainable weights, ci connecting the rule nodes Ri and the output neuron O. The values of initialized weights can have a signi cant e ect on the number of simulation steps required to reach the desired control signal. Since the sign (positive or negative) of the required weight value for each ci is not known, it is more suitable to initialize each weight value close to zero. If a large postive weight is initialized to a ci where a large negative value is required, then a longer adaptation process is needed to reach the desired control signal. From experiment, generally, a weight value between 0 and 0.3 is preferrable.

3.2 Weight Adjustment

The magnitude of 4w values also vary for each rule node. If the " re neuron" is "Error is Negative Big" and assuming that a postive weight value ci can push the " ring neuron" towards the "Error is Small" rule nodes, then the magnitude of 4w are:

Big : when Change of Error is Negative Big

Medium : when Change of Error is Negative Medium

Small : when Change of Error is Small V erySmall : when Change of Error is

Positive Medium Zero : when Change of Error is Postive Big

The algorithm is summarized as follows:

Step1 :

Determine the sign of 4w so that the " ring neuron" will move towards to the rule node "Error is Small AND Change of Error is Small" Step2 : Set the appropriate magnitude of 4w

A C++ program is written to obtain the simulation results in this paper. A system model for a commercial laser pro ling machine[5] is used to demonstrate the e ectiveness of the proposed model free adaptive regulator. This is a non-minimum phase system and its complete inverse dynamics is unstable. The system model has the following transfer function:

z 2 + 0:003z ? 0:0022 G(z ) = z 4 ? 2:5690:z042 3 + 2:3311z 2 ? 0:7549z ? 0:0022 Membership functions for Error and Change of Error in this simulation is shown in Figure 3. These membership functions are not model-based designs. It is important to have the membership function "Error is Small" narrower since the value of 4O is small when the "Error is Small" neurons are the " re neuron". 1 Membership Degree

The output signal is adjusted by an amout of 4O in each of the simulation step before a steady state is reached. A postive 4O increases the network output signal and a negative 4O decreases the network output signal. So if the " re neuron" is in the right half (error is postive) and by adding a positive value 4w to its current weight value, the next " re neuron" is further away to the right, then all the right half rule nodes will have negative 4w.

4 Simulation Results and Discussion

0.8 0.6 0.4 0.2 0 −1

−0.8

−0.6

−0.4

−0.2

−8

−6

−4

−2

0 0.2 Change of Error

0.4

0.6

0.8

1

4

6

8

10

1 Membership Degree

At a given simulation step, there is a rule neuron R1 which has a maximum output fmax . This neuron can be any of the 25 rule nodes described in Figure 2. In this step, weights are adjusted so that in the next simulation steps, a di erent rule neuron R2 will have a maximum output value among all the rule nodes, and this node, R2 , is closer to the rule node "Error is Small AND Change of Error is Small". In Figure 2, the most left node is "Error is Negative Big AND Change of Error is Negative Big", the most right node is "Error is Postive Big AND Change of Error is Postive Big" and the node in the center position is "Error is Small AND Change of Error is Small". The strategy is to push the " re neuron", the node that has the maximum output, towards the center. When the center rule node becomes the " re neuron", then the desired control signal is obtained.

0.8 0.6 0.4 0.2 0 −10

0 Error

2

Figure 3: NB, NM, S, PM and PB membership functions for Change of Error and Error

The weights ci in the Defuzzi cation layer are initialized at 0.1 in this simulation. This is small so that they can become negative values quickly if required. With a few initial simulation steps, it is found that a negative 4O would increase the value of error in the positive direction and a postive 4O would increase the value of error in the negative direction. The 4w are set as in Table 1. Note that (C) implies "Change of Error" and (E) implies "Error". For example, NB(C) is Change of Error is Negative Big and S(E) is Error is Small. Simulation results with reference inputs of 5 and -11 are shown in Figure 4 and Figure 5 respectively.

Table 1: Values of 4w for connection between each rule

2

node and the output neuron

Position output

NB(E) NM(E) S(E) PM(E) PB(E)

NB(C) NM(C) S(C) PM(C) PB(C) -0.3 -0.2 -0.1 -0.05 0 -0.25 -0.15 -0.05 -0.03 0 -0.05 -0.03 0 0.03 0.05 0 0.03 0.05 0.15 0.25 0 0.05 0.1 0.2 0.3

0 -2 0

200

400

600

800

1000

1200

-4 -6 -8 -10 -12 -14 -16 Time step (k)

Figure 5: Position Response of Plant with Reference In-

8

put = -11

6 5 4

7

3

6

2 1 0 0

200

400

600

800

1000

1200

Time step (k)

Position output

Position output

7

5 4 3 2 1 0

Figure 4: Position Response of Plant with Reference Input= 5

It is noted that there is steady state error in both simulation results. The system exhibits some of the usual characteristics from classical controller, the overshoot, the steady state error and so on. It is also possible to obtain a system response with less overshoot as in Figure 6 by reducing the magnitude value of 4w in Table 1.

5 Conclusion FuNe I was primary used for classi cation applications. In this paper, FuNe I AFC was introduced and applied to a regulator feedback control application. "IF...THEN..." fuzzy rules can be formulated using this network structure and used as adaptive fuzzy controllers. From simulation, it is shown that no prior knowledge about the plant is required to regulate its output. Further research is still required to achieve a good regulator control. The authors are currently working on improving the adaptation algorithms, and adaptive membership fuzzy functions.

0

200

400

600

800

1000

1200

Time step (k)

Figure 6: Position Response of Plant with Reference Input = 5, and small 4w values References

[1] C. L. Philips and R. D. Harbor. Feedback Control Systems. Prentice Hall, USA, 1996. [2] K. Ogata. Discrete-Time Control Systems. Prentice Hall, New Jersey, 1994. [3] G. F. Franklin, J. D. Powell, and M. L. Workman. Digital Control of Dynamic Systems. Addison-Wesley, 1990. [4] S. K. Halgamuge and M. Glesner. \Neural Networks in Designing Fuzzy Systems for Real World Applications". Fuzzy Sets and Systems, Vol. 65(1):pp. 1{ 12, 1994. [5] B. C. Chang, R. C. Ko, and S. K. Halgamuge. \Pre- lter Design for High Speed Contouring Machines ". In International Conference on Neural Information Processing (ICONIP99), pages 1100{1105, Perth, Australia, November 1999.