1 / 45

A fuzzy system is an universal approximator

A fuzzy system is an universal approximator.

meda
Download Presentation

A fuzzy system is an universal approximator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A fuzzy system is an universal approximator • A fuzzy rule-base system, FRBS = (ab, R, T, S, DEF), is a family of fuzzy systems with membership functionsaba fuzzy rule base R, the t-norm, for fuzzy aggregation T (i.e. operations within one rule), the s-norm for fuzzy composition S (i.e.operations among rules), and the defuzzification method DEF. Defuzzificationconsists of the conversion of the fuzzy output into a single crisp output. • Any given fuzzy system FS  FRBS is a universal approximator according to a theorem. Let the fuzzy rule-based system FRBS be the set of all fuzzy systems FS and f: U  Rn R be a continuous function defined on a universe of discourse U. For each  > 0, there exists a FSe  FRBS such that sup {  f(x) - FSe(x)  , x  U } 

  2. Defuzzification • Process that converts a fuzzy set or fuzzy number into a crisp value or number • Defuzzification is such inverse transformation which maps the output from the fuzzy domain back into the crisp domain. The following defuzzification methods are of practical importance: • Center-of-Area (C-o-A) • Center-of-Maximum (C-o-M) • Mean-of-Maximum (M-o-M)

  3. The Center-of-Area method is often referred to as the Center-of-Gravity method because it computes the centroid of the composite area representing the output fuzzy term. • Figure shows the membership functions of a linguistic output variable MotorPower where the areas of ZE and PM are combined by the union operator and thus their contour becomes the composite fuzzy output for MotorPower. C-o-A defuzzification method computes the centroid of this area

  4. The Center-of-Maximum requires only the peaks of the membership functions. Defuzzified value is determined by finding the fulcrum where the weights are balanced. This method is also called by Height-Method • The crisp output is computed as a weighted mean of the term membership maxima, weighted by the inference results. • Equations are very similar, except that for C-O-A it is used the areas of each membership functions. For C-O-M it is used only their maxima. Naturally the results are slightly different.

  5. The Mean-of-Maxima is used when the maxima of the membership functions are not unique, one can then take the mean of all maxima. Max (I) is the inferred fuzzy output term with the highest degree of truth and M is the integer number of such peaks.

  6. It may be desirable to leave out the boundaries of the control inference membership function. Hence, the set over which the defuzzification is performed is only an a-cut in which the a is the threshold value. • The idea here is to try to make defuzzification insensitive to multimodal fuzzy output inference. • Height method is a good choice when using triangular or trapezoidal functions. However, the Gaussian membership functions have a couple of important properties: 1. produces smooth mapping 2. universal approximation property can be easily proven 3. central limit theorem: usually data distributions tend to be normal which can be approximated well by Gaussian basis functions • Recommended to use Center of Area

  7. Criteria for comparison: • Continuity • Disambiguity (producing a crisp output for every combination of output membership functions • Plausibility (output lies approximately in the middle of support and has a high degree of membership) • Computational complexity • Weight counting (weight information is not lost) • Which defuzzification method for what application? • Closed-loop control: continuity is important because jumps in the controller output can cause instabilities and oscillations. • Pattern recognition: can use M-o-M defuzzification, because if one wishes to identify objects by classification based on the most plausible result yielding the similarity of the signal to the standard objects. • Decision support: the choice of defuzzification technique depends on the context of the decision. Quantitative decisions can use C-o-M while M-o-M is recommended for qualitative decisions.

  8. FUZZY CONTROL SYSTEM • A Fuzzy Control System consists of four blocks:

  9. Six steps for creation and execution of a rule based fuzzy system • Identify the inputs and their ranges and name them. • Identify the outputs and their ranges and name them. • Create the fuzzy partitions (degree of fuzzy membership function) for each input and output. • Construct the rule base that the system will operate under • Decide how the action will be executed by assigning strengths to the rules • Combine the rules and defuzzify the output.

  10. A seven rules fuzzy system to output an action for an inverted pendulum

  11. Where the fuzzy sets come from ? • Polling: The question “Do you agree that x is A?” is stated to different individuals. • An average is taken to construct the membership function. Answers are typically yes/no type. • · Direct rating: “How A is x?” This approach supposes that the fuzziness arises from individual subjective vagueness. • The person is made to classify an object over and over again in time in such a way that it is hard for he/she to remember the past answers. • The membership function is constructed by estimating the density function.

  12. Reverse rating: The question “Identify x which is A to the degree mA( x)” is stated to an individual or a group of individuals. • Responses are recorded and normally distributed distributions are formed (mean and variance are estimated). • Interval estimation: The person is asked to give an interval that describes best the access of x. This is suited to random set -view of membership functions. • Membership exemplification:“To what degree x is A?” Person may be told to draw a membership function that best describes A. • Pairwise comparison: “Which is a better example of A, x1 or x2 and by how much?” • The results of comparisons could be used to fill a matrix of relative weights and the membership function is found by taking the components of the eigenvector corresponding to the maximum eigenvalue

  13. Clustering methods: Membership functions are constructed given a set of data. • Euclidean norm is used to form clusters on data. • Neurofuzzy techniques: Neural networks are used to construct membership functions. • An essential part of forming membership functions is the input space partitioning.A grid, which is fixed beforehand and it does not change later. Set to some “initial value” and tuned. • Fuzzy clusters are best suited for classification problems, because they implement a similarity measure. • Genetic algorithm techniques: • Evolutionary approach to optimize the cluster of data into fuzzy sets

  14. Example of Fuzzy ControllerAir – Conditioning System

  15. Rules for the Air-Conditioning System Rule 1 If temperature is cold then stop motor, vent is downward Rule 2 If temperature is cool then motor speed is slow, vent is downward Rule 3 If temperature is comfortable then motor speed is medium, vent is horizontal Rule 4 If temperature is warm then motor speed is fast, vent is upward Rule 5 If temperature is hot then blast motor speed, vent is upward

  16. Fuzzy Inference RelatingMotor Speed and VentAngle For Temperature Input

  17. Implementing Fuzzy Controllers • Can be either implemented in hardware or software • There are many degrees of freedom inherent to fuzzy system design, requiring a great deal regarding trial-and-error and the availability of easy ways to select different fuzzification and defuzzification schemes. Such flexibility suggests the use of software.

  18. Development of Fuzzy Controller with Matlab • .m programs are useful to translate the implementation in other languages (C) and to have the feeling in how to implement • FIS Editor displays high-level information about a Fuzzy Inference System. At the top is a diagram of the system with each input and output clearly labeled. By double-clicking on the input or output boxes, you can bring up the Membership Function Editor. Double-clicking on the fuzzy rule box in the center of the diagram will bring up the Rule Editor.

  19. The following program is an implementation in MatLab® of a fuzzy controller with the following characteristics: • Rule based fuzzy controller • It supports any number of inputs, limited only by the processing capability of your computer and Matlab • It supports any number of outputs, limited only by the processing capability of your computer and Matlab • Any input and output can have any number of triangular membership functions. Each input or output may have different number of membership functions • You can defuzzify either by the height method or by computing the center of gravity

  20. Flowchart

  21. Inputs and Outputs Definition

  22. Fuzzification

  23. Rules Evaluation • The rules were generated by the vectors r_e e r_s . For rules evaluation, the following procedure is made: • An auxiliary vector is used “aux” with ne (number of inputs) elements equal to “1”. • For each input variable it is verified if that variable (j) participate for the antecedent of that rule, if that is positive, the element aux(j) is attributed the fuzzified input value correspondent to the membership function of that rule condition. • The truth value of the rule is the minimum value of aux and it is stored into the matrix output_aux((i,j,k) where the i indicates which is the output number, j indicates which is the membership function and k indicates the rule number. • The final output matrix is the maximum value of each input membership function evaluation

  24. Defuzzification • Height Method • Center of Gravity

  25. Two cases are presented • Case 1: 2 inputs were considered, one with 2 membership functions within an universe of discourse between 5 and 50, and another with three membership functions within an universe of discourse between 0 and 1. 2 outputs were considered, one with 2 membership functions within an universe of discourse between 1 and 10, and another with 3 membership functions within an universe of discourse between 4 and 20. • Case 2: The efficiency of fuel consumption for a car can be described linguistically. It depends on the car velocity, air dragging, thermal cycle.

  26. The file case1.m shows the Matlab implementation for this fuzzy modeling

  27. Simulation for Case 1 What is the variable_1 (5.0<x<50.0)? 45 What is the variable_2 (0.0<x<1.0)? 0.8 Defuzzification results with height method The variable_3 is : 6.4 The variable_4 is : 10.56 Defuzzification results with center of gravity method The variable_3 is : 5.944 The variable_4 is : 11.206 Simulation for Case 1 What is the variable_1 (5.0<x<50.0)? 23 What is the variable_2 (0.0<x<1.0)? 0.2 Defuzzification results with height method The variable_3 is : 4.6 The variable_4 is : 10.8571 Defuzzification results with center of gravity method The variable_3 is : 5.056 The variable_4 is : 11.3363

  28. Evaluation of fuel consumption • Efficiency of fuel consumption for a car can be described linguistically. • For small velocity the car takes too much fuel for the thermal cycle itself, since the RPM is not optimized • As your RPM is optimized and the speed increases the air-dragging adds friction • There is an intermediate optimal speed point

  29. The car velocity is divided into three fuzzy sets as below (Small, Medium and High)

  30. Figure below shows the fuel consumption on the left side depicted in from the linguistic description of the car velocity. • The Rules are: • If Vel is Small Then Consumption is High • If Vel is Medium Then Consumption is Low • If Vel is High Then Consumption is Medium

  31. The file case2.m shows the Matlab implementation for this fuzzy modeling

  32. Development of fuzzy coding can be easily done by using a Shell Environment. There are several companies with visual based development platforms, Togai, FuzzyTech, FIDE, just to name a few. Real-time on-line debugging and tuning of rules, membership functions and rule weights, including addition and deletion of rules Graphical object-based "point and click" CASE tool User-defined inference methods Color rulebase and operator visualization tools Fully integrated graphical simulation of fuzzy systems and conventional methods ANSI and Keil C code generation from the Fuzzy-C compiler Those environments make provisions for the following: Reduction of programming efforts Fast prototyping Availability of several options regarding several degrees of freedom( typical of a fuzzy systems) Visual feedback for assessing fuzzy controller modifications

  33. Project Editor: Defining the control structure

  34. “Spreadsheet Editor”: Defining the rule base

  35. Membership editor: Graphically defining the membership functions Various types of defuzzification methods can be selected

  36. The reason for using the fuzzy software development system described in the foregoing is to tune the initial fuzzy design. This requires many iterations involving modifications of both the rules and the membership functions. By using the Interactive Debug option the designer can immediately visualize the effect of each of such changes, thus he knows whether or not a particular change has caused an improvement in system response. This visual feedback is essential for fuzzy system design. • The Interactive Debug window, provides for entries for both inputs and displays the current output as determined by the current fuzzy controller. If the displayed value is incorrect, the designer can make modifications in the rules, or the degree of support of the rules, or the membership functions interactively, until the displayed output matches with the output value required for the specific input combinations entered. By monitoring the three-dimensional control surface the designer can also change the fuzzy inference structure from max-min to another type provided by the software package. For example, a smoother response with no creases or abrupt jumps of the control surface can be obtained by using max-product type fuzzy inference.

  37. Fuzzy Controllers in Industrial Environment • Industrial electronics use PID control,implemented by embedded system or PLC programming • PID control works well for linear processes • PID control has poor performance in non-linear processes • Fairly complex systems usually need human control operators for operation and supervision

  38. Fuzzy Controllers • PID fuzzy control can implement a single feedback loop • A supervisory control can be implemented with fuzzy rules to control the operation of standard PID controllers running on every loop

  39. Let us understand the dynamics of a controller

  40. Rule Table Fuzzy – PI Controller Block Diagram

  41. Supervising a multi-loop PID industrial process

  42. Fuzzy Decision Support Algorithm

More Related