Está en la página 1de 4

FUZZY OR NEURO-FUZZY DESIGN IN DC MOTOR SPEED CONTROL ?

Part B: Neuro- Fuzzy Design For DC Motor Speed Control


Ovidiu Grigore, Adriana Florescu, Alexandru Vasile, Dan Alexandru Stoichescu, "Politehnica" University of Bucharest, Electronics and Telecommunications Faculty, Bd. Armata Poporului 1-3, Sect. 6, 77206 - Bucharest, Romania E-mail: ovgrig@ alpha.imag.pub.ro ; afloresc@vala.elia.pub.ro; vasal@colel.pub.ro
Abstract: The paper compares fuzzy and neuro-fuzzy designs of a duty-cycle compensation controller used to linearize the nonlinear external characteristics family of a step-down (Buck) or forward DC-DC converter that supplies DC motors. This controller is additionally introduced in high precision speed control systems. Comparison reveals the advantages of neuro-fuzzy controllers upon fuzzy controllers. A discussion on real-time implementation is also taken under consideration.

Keywords: COMPENSATION CONTROLLER, FUZZY LOGIC, NEURO-FUZZY 1. Principles of neuro-fuzzy modeling The general algorithm for a fuzzy system designer can be synthesize as follows: I. Fuzzification 1) normalize of the universes of discourses for the fuzzy input and output vectors; 2) choose heuristically the number and shape of the membership functions for the fuzzy input and output vectors; 3) calculate of the membership grades for every crisp value of the fuzzy inputs; II. Fuzzy inference 4) complete the rule base by heuristics from the viewpoint of practical system operation; 5) identify the valid (active) rules stored in the rule base; 6) calculate the membership grades contributed by each rule and the final membership grade of the inference, according to the chosen fuzzification method; III. Defuzzification 7) calculate the fuzzy output vector, using an adequate defuzzification method; 8) simulation tests until desired parameters are obtained; 9) hardware implementation. From the beginning, a fuzzy-style inference must be accepted and the most popular are: Mamdani-style inference, based on Lotfi Zadehs 1973 paper on fuzzy algorithms for complex systems and decision processes [1] that expects all output membership functions to be fuzzy sets. It is intuitive, has widespread acceptance, is better suited to human input, but its main limitation is that the computation for the defuzzification process lasts longer; Sugeno-style inference, based on Takagi-SugenoKang method of fuzzy inference [2], in their common effort to formalize a systematic approach in generating fuzzy rules from an input-output data set, that expects all membership functions to be a singleton. It has computational efficiency, works well with linear techniques (e.g. PID control, etc.), works well with optimization and adaptive techniques, guaranties continuity of the output surface, is better suited to mathematical analysis. The results are very much similar to Mamdani - style inference. A simple fuzzy inference system has limited learning (or adaptation) possibilities. If learning capabilities are required, it is convenient to put the fuzzy model into the framework of supervised neural networks that can compute gradient vectors systematically. Sugenostyle inference is preferred and the typical fuzzy rule is: If x is A and y is B then z=f(x,y), where A and B are fuzzy sets in the antecedent and z=f(x,y) is a crisp function in the consequent. Usually, function z is a firstorder (a moving singleton) or a zero-order (constant singleton) Sugeno fuzzy model. As a modeling example [3], for a first-order Sugeno fuzzy inference system (Fig.1) which contains the following two rules: Rule 1: If x is A1 and y is B1 then

f 1 = p1 x + q1 y + r1 , Rule 2: If x is A21 and y is B2 then f 2 = p 2 x + q 2 y + r2 , the functionally equivalent supervised neural network in Fig.1 that follows the general fuzzy design algorithm, has one input layer, three hidden layers and one output layer, whose significance are: Layer 1: Each adaptive node in this layer generates the membership grades the input vectors Ai , i=1,2. For instance, the node function of the i-th node may be a generalized bell membership function:

x ci O = Ai ( x) = 1 /1 + ai
1 i

2 bi

(1)

where Oi j denotes the output of the i-th node in the j-th layer, x with the i-th node and {a i , bi , ci } are their parameter set that changes the shapes of the membership function. Parameters in this layer are referred to as the premise parameters. Layer 2: Each fixed node in this layer calculates the firing strength of a rule via multiplication. Each node output represents the firing strength of a rule: is the input to the node i, Ai are the input vectors associated

Oi2 = wi = Ai ( x ) Bi ( y ) , i=1,2

(2)

Fig1. (a) A two- input first-oder Sugeno fuzzy model with two rules; (b) Function equivalent supervised neural network In fact, any other T-norm operators that perform fuzzy AND operation can be used as the node function in this layer. Layer 3: Fixed node i in this layer calculate the ratio of the i-th rules firing strength to the total of all firing strength: wi , i=1,2 (3) Oi3 = wi = w1 + w2 For convenience, outputs of this layer will be called normalized firing strength. Layer 4: Adaptive node i in this layer compute the contribution of i-th rule toward the overall output, with the following node function: The overall output f can be expressed as a linear combinations of the consequent parameters: f = w1 f 1 + w2 f 2 = (w1 x ) p1 + (w1 y )q1 + (w1 )r1 + (6) + (w2 x ) p 2 + (w2 y )q 2 + (w2 )r2 Based on equation (6), the hybrid learning algorithm combines the gradient descendent and the least-squares method for an optimal parameter search. Other advanced techniques in nonlinear regression and optimization, such as the Gauss-Newton method, the Levenberg-Marquardt method and the extended Kalman filter algorithm can also be applied. 2. Neuro-Fuzzy Design of the Duty-Cycle Controller Due to their simple formulas and computational efficiency, both triangular MFs and trapezoidal MFs have been used especially in real-time implementations. However, since the MFs are composed of straight-line segments, they are not smooth at the switching points specified by the parameters. These leads to a lack of accurate precision and to reduce it are necessary tens of MFs and rules, e.g. a big rule base stored in microcomputers memory. Because of their smoothness and concise notation, Gaussian MFs and bell MFs, well known in the fields of probability and statistics, are becoming increasingly popular methods. Bell MFs are automatically generated by ANFIS (Adaptive Neuro-Fuzzy Inference System) of MatLab. ANFIS is FIS implemented in the framework of adaptive networks. Fundamentally, it takes a FIS (Fuzzy Inference System) and tunes it with a backpropagation algorithm based on some collection of input-output data. This allows FIS to learn. The network structure facilitates the computation of the descendent gradient vector for parameters in a FIS. Once the gradient vector is obtained, we can apply a number of optimization routines to reduce an error measure (usually

Oi4 = wi f i = wi ( pi x + qi y + ri ) (4) where wi is the output of layer 3, and {pi , qi , ri } is the parameter set. Parameters in this layer are refereed to as the consequent parameters.
Layer 5: The single fixed node in this layer computes the overall output as the summation of contribution from each rule:

Oi5 = wi f i =
i

w f f
i i i i

(5)

The basic learning rule is the backpropagation gradient descendent, which calculates error signals (the derivative of the squared error with respect to each nodes output) recursively from the output layer backward to the input nodes. This learning rule is exactly the same as the backpropagation learning rule used in the common feedforward neural networks.

defined by the sum of the squared difference between actual and desired outputs) [4]. Using data base, ANFIS can create a semi-automatic or a completely automatic Sugeno fuzzy model. In order to compare the results, the same D=0.5 curve from this article (see Part A) is studied. 2.1. The semi-automatic Sugeno fuzzy model ANFIS is more complex than FIS, but users have some limitations: only zero-order or first-order Sugeno fuzzy models, AndMethod: prod, OrMethod: max, ImplicationMethod: prod, AggregationMethod: max, DefuzzificationMethod: wtaver (weighted average). On the other hand, users can provide to ANFIS: their own number of MFs (numMFs) both for inputs and outputs of the fuzzy controller, the number of training and checking data sets (numPts), the MFs type (mfType), the optimization criterion for reducing the error measure (usually defined by the sum of the squared difference between actual and linearized N curve). For the family of external characteristics of Buck converter, the linearization process has been studied upon 10 constant D curves starting from D=0.1 until D=0.9 (step 0.1), the general conclusions are: a) mfType Gbell MFs are preferred by ANFIS in most cases. For other types of MFs preferred by the user for a certain application (pimf, gaussmf, trimf, trapmf, gauss2mf dsigmf and psigmf) there is no rule in choosing them. The general rule is to obtain the best smallest error measure with minimum training parameters. MFs type such as sigmf and zmf are not accepted . b) numMFs The great advantage of neuro-fuzzy design method comparing with fuzzy design method consists in the small number of input and output MFs (usually 2...4 !), which implies the same maximum number of rules. Thus, the rule base and the occupied memory become very small. Additionally, the descendent gradient optimization algorithm leads error measure to global minimum, result that cant be usually obtained with the fuzzy design method where until now it wasnt found a general design method that could lead to global minimum. c) numPts This parameter allows training data interpolation. For this application, optimal numPts has been found between 10 and 20. d) optimization criterion Though it is internally defined in ANFIS to be RMSE, in this application the interest is to minimize the absolute maximum of the error measure because it is very important for the motor to keep constant N when I 2 n varies all over in its domain. Simulation used both criteria and showed those results were usually different from a criterion to another. e) numEpochs Is determined according to the above parameters and to the accepted error measure, fixed by the user. Simulations showed that saturation phenomenon may occur. In order to compare with fuzzy or/and evolution strategies, the same 5 symmetrical and equidistant triangular MFs (see Part A of this article) are chosen.

The simulation results are: RMSE=0.2056 which is worse than both previous design methods, =0% and I 2 n domain=0.9599 proving that N cant be bordered within 2% margins and cant be calculated because there is no oscillatory shape for linearized N curve. These results explain that ANFIS is optimized for gbell MFs shapes and accept other users MFs shapes but the results could be worse. 2.2. The automatic Sugeno fuzzy model Based on the training data set, ANFIS simulation program automatically generates a first-order Sugeno fuzzy type, using only 2 gbell MFs and 2 rules. Fuzzification of input space of I 2 n with 2 gbell MFs is plotted in Fig.2. For example, fuzzy controller designed automatically for D=0.5 curve has the following parameters: AndMethod: product maximum OrMethod: ImplicationMethod: product AggregationMethod: maximum DefuzzificationMethod: weighted average Rule Base consists in the following 2 rules: 1. If (input1 is in1mf1) then (output is out1mf1) (1) 2. If (input1 is in1mf2) then (output is out1mf2) (1) For D=0.5, simulation results are: RMSE=0.0009452, I 2 n domain=0.0461, =59.3277 % and =0.8497%. Neurofuzzy linearization of N=f( I 2 n ) for curve D=0.5 is plotted din Fig.3. ANFIS automatically trains its fuzzy model in 10 epochs. For better results, users can supplementary introduce more epochs. Results for 11000 supplementary training epochs, starting from 0 to 11000 (step 1000) are plotted in Fig.4. Simulation results (Fig.4) show a continuous reduction of quality indexes RMSE with 5.2% and with 15.9%, ending with a limitation during the last 3000 epochs, while I 2 n absolute domain and [%] have very small growths
1 0 .9 0 .8 0 .7 0 .6 0 .5 0 .4 0 .3 0 .2 0 .1 0 0 0 .1 0 .2 0 .3 0 .4 0 .5 0 .6 0 .7 0 .8 0 .9 1 In i t ia l M e m b e rs h i p F u n c t i o n s f o r i n p u t I2

Fig.2. Fuzzification of input space of I 2 n with 2 gbell MFs


1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig.3. Neuro-fuzzy linearization of N=f( I 2 n ) for D=0.5

RMSE *10 9.5 9.4 9.3 9.2 9.1 9 8.9 8.8 8.7 0

-4

I2n Domain 0.051 0.05 0.049 0.048 0.047 0.046 0.045

10 11 Epochs

x10

0.044

10

11 x10 Epochs

(a) Evolution of RMSE during 11000 training epochs


[%] 62 60 58 56 54 52 50 48 46 44 0 1 2 3

(b) Evolution of I 2 n domain during 11000 training epochs


[%] 1.05 1 0.95 0.9 0.85 0.8

10

11

x10

0.75

Epochs

10

11 x10 Epochs

(c) Evolution of overshot [%] during 11000 training epochs

(d) Evolution of damp out [%] during 11000 training epochs Fig.4. Diagrams for 11000 supplementary training epochs References
[1] G.C.D. Sousa, B.K. Bose, A Fuzzy Set Theory Based Control of a Phase-Controlled Converter DC Machine Drive, Proceedings of MELECON, pp. 854-861, 1994 [2] T. Ohmae, T. Matsuda, N. Azusawa, K.Kamiyama and T. Konishi, A Microprocessor Controlled Fast Response Speed Regulator with Dual Mode Current Loop for DCM Drives, IEEE Trans. Ind. Appl., vol.1A-16, pp.388-394, May/June 1980 [3] Fuzzy Logic Toolbox, The MathWorks Inc., January 1995 [4] J.R. Jang, ANFIS: Adaptive-Network-Based Fuzzy Inference System, IEEE Trans. On Systems, Man and Cybernetics, vol.23, no.3, pp.665-685, May 1993 [5] T. Gupta, R.R. Boudreau, R.M. Nelms, J.y. Hung, Implementation of a Fuzzy Controller for DC-DC Converters using an Inexpensive 8-b Microcontroller, IEEE Trans. On Industrial Electronics, [6] Florescu, A., Radu, O., Controlul prin logic fuzzy a unui redresor trifazat n punte utilizat n acionrile electrice de c.c., Revista Romn de Informatic i Automatic, vol.10, nr.2, Bucuresti, 2000, pp.15-22. [7] Florescu, A., Stoichescu, D.A., Radu, O., Popescu, C.,Aplicaie a controlului prin logic fuzzy n comanda convertoarelor de c.c., Buletinul tiinific al Universitii din Piteti, nr.5, Bucuresti, 2000, pp.175-183. [8] Florescu, A., Vasile, D., Design of fuzzy logic controllers for a dc-dc systems, The 7th Workshop on Computers in Power Electronics COMPEL 2000, ISBN 0-7803-6561-5, July 16-18, 2000, Virginia, SUA, , pp. 254-259 [9] Florescu, A., Stoichescu, D.A., Radu, O., Popescu, C.,Aplicaie a controlului prin logic fuzzy n comanda convertoarelor de c.c., Buletinul tiinific al Universitii din Piteti, nr.5, Bucuresti, 2000, pp.175-183.

4. Conclusions Due to their simple formulas and computational efficiency, both triangular MFs and trapezoidal MFs have been used to design fuzzy industrial controllers especially in real-time implementation [5]. However, since the MFs are composed of straight-line segments, they are not smooth at the switching points specified by the parameters. These leads to a lack of accurate precision and to reduce it are necessary tens of MFs and rules, e.g. a big rule base stored in microcomputers memory. Because of their smoothness and concise notation, Gaussian MFs and bell MFs, well known in the fields of probability and statistics, are becoming increasingly popular methods, with possibilities of real-time control using microcontrollers and DSP. The paper compares fuzzy design with neurofuzzy design of a duty-cycle compensation controller used to linearize the nonlinear external characteristics family of a step-down (Buck) or forward DC-DC converter that supplies DC motors. Simulation results showed that using neuro-fuzzy design instead of fuzzy design the number of MFs decreased from 5 to just 2 and quality indexes improved very much: RMSE is 24.12 times better (smaller) in the case of neuro-fuzzy design compared with fuzzy design, is 1.67 times better (smaller), I 2 n domain is 5.17 times better (smaller), while [%] had a small growth from 0% to 0.8497.

También podría gustarte