RULE-BASED FUZZY EXPERT SYSTEMS

Similar documents
Models for Inexact Reasoning. Fuzzy Logic Lesson 8 Fuzzy Controllers. Master in Computational Logic Department of Artificial Intelligence

CHAPTER 5 FREQUENCY STABILIZATION USING SUPERVISORY EXPERT FUZZY CONTROLLER

FUZZY LOGIC CONTROL Vs. CONVENTIONAL PID CONTROL OF AN INVERTED PENDULUM ROBOT

RamchandraBhosale, Bindu R (Electrical Department, Fr.CRIT,Navi Mumbai,India)

EEE 8005 Student Directed Learning (SDL) Industrial Automation Fuzzy Logic

Intelligent Systems and Control Prof. Laxmidhar Behera Indian Institute of Technology, Kanpur

A Hybrid Approach For Air Conditioning Control System With Fuzzy Logic Controller

CHAPTER 5 FUZZY LOGIC FOR ATTITUDE CONTROL

5. Lecture Fuzzy Systems

EFFECT OF VARYING CONTROLLER PARAMETERS ON THE PERFORMANCE OF A FUZZY LOGIC CONTROL SYSTEM

Fuzzy control systems. Miklós Gerzson

Neural Networks & Fuzzy Logic

FUZZY CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL

Adaptive Fuzzy PID For The Control Of Ball And Beam System

Fuzzy Control Systems Process of Fuzzy Control

Hamidreza Rashidy Kanan. Electrical Engineering Department, Bu-Ali Sina University

2010/07/12. Content. Fuzzy? Oxford Dictionary: blurred, indistinct, confused, imprecisely defined

Inter-Ing 2005 INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC CONFERENCE WITH INTERNATIONAL PARTICIPATION, TG. MUREŞ ROMÂNIA, NOVEMBER 2005.

Uncertain System Control: An Engineering Approach

Theory and Practice of Rotor Dynamics Prof. Dr. Rajiv Tiwari Department of Mechanical Engineering Indian Institute of Technology Guwahati

Design of Decentralized Fuzzy Controllers for Quadruple tank Process

FUZZY LOGIC CONTROL of SRM 1 KIRAN SRIVASTAVA, 2 B.K.SINGH 1 RajKumar Goel Institute of Technology, Ghaziabad 2 B.T.K.I.T.

Fuzzy Logic and Computing with Words. Ning Xiong. School of Innovation, Design, and Engineering Mälardalen University. Motivations

Fuzzy Logic Control for Half Car Suspension System Using Matlab

Reduced Size Rule Set Based Fuzzy Logic Dual Input Power System Stabilizer

FUZZY CONTROL OF CHAOS

Performance Of Power System Stabilizerusing Fuzzy Logic Controller

CHAPTER 4 FUZZY AND NEURAL NETWORK FOR SR MOTOR

Application of GA and PSO Tuned Fuzzy Controller for AGC of Three Area Thermal- Thermal-Hydro Power System

Lecture 20: Lagrange Interpolation and Neville s Algorithm. for I will pass through thee, saith the LORD. Amos 5:17

CHAPTER V TYPE 2 FUZZY LOGIC CONTROLLERS

This time: Fuzzy Logic and Fuzzy Inference

9. Fuzzy Control Systems

PHY 221 Lab 3 Vectors and Motion in 1 and 2 Dimensions

Handling Uncertainty using FUZZY LOGIC

The Problem. Sustainability is an abstract concept that cannot be directly measured.

Design On-Line Tunable Gain Artificial Nonlinear Controller

FUZZY CONTROL OF CHAOS

Mass on a Horizontal Spring

This time: Fuzzy Logic and Fuzzy Inference

OUTLINE. Introduction History and basic concepts. Fuzzy sets and fuzzy logic. Fuzzy clustering. Fuzzy inference. Fuzzy systems. Application examples

Comparative Study of Speed Control of Induction Motor Using PI and Fuzzy Logic Controller

Islamic University of Gaza Electrical Engineering Department EELE 6306 Fuzzy Logic Control System Med term Exam October 30, 2011

CS344: Introduction to Artificial Intelligence (associated lab: CS386)

Fuzzy Based Robust Controller Design for Robotic Two-Link Manipulator

Fuzzy Sets and Fuzzy Techniques. Joakim Lindblad. Outline. Constructing. Characterizing. Techniques. Joakim Lindblad. Outline. Constructing.

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

Module 4: Dynamic Vibration Absorbers and Vibration Isolator Lecture 19: Active DVA. The Lecture Contains: Development of an Active DVA

APPLICATION OF AIR HEATER AND COOLER USING FUZZY LOGIC CONTROL SYSTEM

FUZZY-ARITHMETIC-BASED LYAPUNOV FUNCTION FOR DESIGN OF FUZZY CONTROLLERS Changjiu Zhou

3- DOF Scara type Robot Manipulator using Mamdani Based Fuzzy Controller

MODELLING THERMAL COMFORT FOR TROPICS USING FUZZY LOGIC

Measuring Newton's Constant of Universal Gravitation using a Gravitational Torsion Balance

EXCITATION CONTROL OF SYNCHRONOUS GENERATOR USING A FUZZY LOGIC BASED BACKSTEPPING APPROACH

Project Proposal ME/ECE/CS 539 Stock Trading via Fuzzy Feedback Control

CHAPTER 4 THE COMMON FACTOR MODEL IN THE SAMPLE. From Exploratory Factor Analysis Ledyard R Tucker and Robert C. MacCallum

Unit 7: Oscillations

Fuzzy Systems. Introduction

Chapter 13 Uncertainty

Connecting the Demons

Institute for Advanced Management Systems Research Department of Information Technologies Åbo Akademi University. Fuzzy Logic Controllers - Tutorial

A Study on Performance of Fuzzy And Fuzyy Model Reference Learning Pss In Presence of Interaction Between Lfc and avr Loops

On-line control of nonlinear systems using a novel type-2 fuzzy logic method

Fuzzy Systems. Fuzzy Control

Lecture 06. (Fuzzy Inference System)

The Nonlinear Pendulum

Lecture 15 - Orbit Problems

Dynamics of Ocean Structures Prof. Dr. Srinivasan Chandrasekaran Department of Ocean Engineering Indian Institute of Technology, Madras

Momentum and Its Relation to Force

Towards Smooth Monotonicity in Fuzzy Inference System based on Gradual Generalized Modus Ponens

CHAPTER 7 MODELING AND CONTROL OF SPHERICAL TANK LEVEL PROCESS 7.1 INTRODUCTION

Lab 10 - Harmonic Motion and the Pendulum

(Refer Slide Time: 1:42)

kx m x B N 1 C L, M Mg θ

A new method for ranking of fuzzy numbers through using distance method

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

Testing Newton s 2nd Law

TIphysics.com. Physics. Pendulum Explorations ID: By Irina Lyublinskaya

The Problem of Slowing Clocks in Relativity Theory

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Project Lab Report. Michael Hall. Hao Zhu. Neil Nevgi. Station 6. Ta: Yan Cui

Type-2 Fuzzy Logic Control of Continuous Stirred Tank Reactor

Physics Waves & Oscillations. Mechanics Lesson: Circular Motion. Mechanics Lesson: Circular Motion 1/18/2016. Spring 2016 Semester Matthew Jones

Automatic Control II Computer exercise 3. LQG Design

Knowledge-Based Control Systems (SC42050) Lecture 3: Knowledge based fuzzy control

Exploring the Effect of Bungee Length Manipulation on Acceleration Applied to Jumper

Lab 6d: Self-Erecting Inverted Pendulum (SEIP)

For a rigid body that is constrained to rotate about a fixed axis, the gravitational torque about the axis is

Chapter 6. Second order differential equations

Fuzzy Sets. Fuzzy Sets and Fuzzy Logic. Fuzzy Properties. Fuzzy Measures: Example. Properties are represented by fuzzy sets. Properties might be like:

Financial Informatics XI: Fuzzy Rule-based Systems

2 Lecture Defining Optimization with Equality Constraints

Power System Dynamic stability Control and its On-Line Rule Tuning Using Grey Fuzzy

Kinematics Unit. Measurement

Index Terms Magnetic Levitation System, Interval type-2 fuzzy logic controller, Self tuning type-2 fuzzy controller.

FUZZY LOGIC BASED ADAPTATION MECHANISM FOR ADAPTIVE LUENBERGER OBSERVER SENSORLESS DIRECT TORQUE CONTROL OF INDUCTION MOTOR

ABSTRACT I. INTRODUCTION II. FUZZY MODEL SRUCTURE

A SEASONAL FUZZY TIME SERIES FORECASTING METHOD BASED ON GUSTAFSON-KESSEL FUZZY CLUSTERING *

CONTROL SYSTEMS, ROBOTICS AND AUTOMATION Vol. XVII - Analysis and Stability of Fuzzy Systems - Ralf Mikut and Georg Bretthauer

Enhanced Fuzzy Model Reference Learning Control for Conical tank process

Transcription:

University of Waterloo Department of Electrical and Computer Engineering E&CE 457 Applied Artificial Intelligence RULE-BASED FUZZY EXPERT SYSTEMS July 3 rd, 23 Ian Hung, 99XXXXXX Daniel Tse, 99XXXXXX

Table of Contents 1 Introduction 3 2 Discussion of Control Strategy 4 2.1 Fuzzy Sets 5 2.1.1 Design of Fuzzy Set 5 2.1.2 Implementation of Fuzzy Set 1 2.1.3 Remarks 11 2.2 Rule Base 11 2.2.1 Design of Rule Base 11 2.2.2 Implementation of Rule Base 12 2.2.3 Remarks 12 3 Simulation of Controller 13 2

1 Introduction This project utilizes a fuzzy expert system in addressing the inverted pendulum problem since there is inherent uncertainty presented in the dynamics of the system. Design and implementation follows the provided handout closely. Pieces of the fuzzy system depicted below are implemented: Figure 1: Diagram of Components Implemented Crisp measurements are obtained from the inputs that are angular displacement and velocity of the inverted pendulum. These measurements are then fuzzified such that their degree of membership into their respective fuzzy set is determined. This is accomplished by considering the equations supplied in the handout that describe the behaviour of the system. After some careful manipulation, the optimal range for each fuzzy set is found. This shall be discussed in the next section. 3

Upon finding the degree of membership for angular displacement and velocity, a set of rules are then asserted to evaluate the resulting force that is applied on the block to counteract the falling pendulum. Several rule-based alternatives have been considered; however, we have chosen the 7x7 Rubric that will form the basis of our evaluation. This will also be explained in the next section. Once the results are obtained, a process of defuzzification occurs at which the output, which is our applied force, is translated into a crisp value. The strength of the rule is dictated by the premises considered. Recall that the premises, or antecent, are degrees of membership of the inputs in the fuzzy set. To simulate the inverted pendulum system, an initial value for angular displacement, velocity, and applied force is specified. Using this information, the resulting angular acceleration is calculated (with equations stated in the handout). An arbitrary length of time, or time sample, is specified to give the resulting angular velocity and displacement. With our fuzzy expert system, the force applied is determined. This process is cycled and its behaviour is observed. At this point, some tweaking of fuzzy sets was performed to improve the effectiveness of the system. 2 Discussion of Control Strategy Control strategy is especially important for an effective fuzzy expert system that we strive to achieve. A mix of theory and intuition is combined in creating a control system that will provide the best possible performance. 4

2.1 Fuzzy Sets Fuzzification is a process of computing the degree of membership of each current input value to the appropriate fuzzy set. This is required since inferencing (rule evaluation) requires some degree of membership in the premise of rules. Matlab was used to obtain a general feel of the numbers to expect. 2.1.1 Design of Fuzzy Sets The behaviour of the system can be generally described by Fx in this next equation: (1) Consequently, the acceleration of the block, X, is eliminated by rearranging and inserting this equation into (1): (2) Moreover, angular acceleration can be determined by the following equation and again, inserting into (1): (3) Finally, the following Matlab m-file was created: 5

m = 2; M = 8; L = 1; g = 9.8; u = ; for i = 1 : 1 : 18, for j = 1 : 1 : 15, theta = (i-9)*pi/18; theta1 = j; theta2 = ( 2*g*sin(theta) - m*l/2/(m+m)*theta1^2*sin(2*theta) - 2*cos(theta)*u/(M+m) ) / (4*L/3 - m*l*cos(theta)^2/(m+m)); Fx(i,j) = (M/(m+M)) * (m/m*u + m*l/2*theta2*cos(theta) - m*l/2*theta1^2*sin(theta)); end end surf(fx); title('simulation of Inverted Pendulum (u=)'); xlabel('theta1 - angular velocity [rads/sec]'); ylabel('theta - angular displacement [rads]'); zlabel('fx [N]'); Figure 2: Matlab m-file to Simulate Behaviour of Inverted Pendulum This allows us to observe a 3-dimensional representation of the behaviour of the system at certain instances of angular displacement and velocity. Furthermore, the shape suggests possible maximum values that are essential in formulating the needed fuzzy sets. Several versions of the system at different forces applied, u, have been generated. These are shown below: 6

Figure 3.1 Behaviour of Inverted Pendulum at u = Figure 3.2 Behaviour of Inverted Pendulum at u = 1 7

Figure 3.3 Behaviour of Inverted Pendulum at u = 5 Figure 3.4 Behaviour of Inverted Pendulum at u = 1 8

Figure 3.5 Behaviour of Inverted Pendulum at u = 5 Initially, when there is no applied force (u = ), Fx exerted on the bottom of the pendulum exhibits a bell shaped well that behaves as expected. For example, at zero velocity and at an angle of 9 degrees, Fx is evaluated to be zero. Oppositely, as angular displacement and velocity increases, the magnitude of Fx increases which intuitively agrees with the expected behaviour. In addition, as the applied force rises, the rise and drop of the contour becomes more dramatic and indicates the proportional nature of Fx. Judging from the progressive dip of the mesh as the force applied rises, it may be beneficial to increase the sensitivity of those regions that are near the upright position of the pendulum. This implies that the triangular fuzzy sets should be situated closer together for smaller angular displacement. 9

2.1.2 Implementation of Fuzzy Set The proposed fuzzy set comprises of overlapping triangles of seven degrees of intensity that are NL, NM, NS, ZE, PL, PM, and PS. In the event that the sensor detects an angle, or velocity, within the region of overlap, several approaches have been considered in resolving the ambiguity from being part of two sets not quite one or the other. For instance, a certain angle may fall between a portion of NM (.8) and NS (.3). Thus, this can be handled in three ways. First, we may simply consider only the set with the greatest degree of membership; in which case, we shall select NM(.8) as a premise for our rule base. (Although we are neglecting NS, which essentially linearizes our system, our initial simulations show that this approach is still possible since the system is quite sure that it is NM and response is gauged according to this assumption.) Second, we may evaluate the Center of Gravities of the two overlapping fuzzy sets and select the larger degree of membership of the resulting fuzzy set, or have them evaluated independently by the next method. Third, we may keep either fuzzy set independent and assert the rules as usual, but for conflicting conclusions we may choose to defuzzify according to the aforementioned Center of Gravity or simply, choose the maximum of the rule strengths. In any case, so long as the format of the premise is satisfied, that is, a single fuzzy set is represented for angular displacement and velocity, our proposed rule base will function accordingly. 1

2.1.3 Remarks From our Matlab analysis, we have established a general range of permissible values for our initial fuzzy sets that are - 1 rad/s and - 7 N for force applied. However, after numerous trials, the fuzzy sets have been tweaked. We found that the system would perform at its best from 2pi rad/s and - 5 N for force applied. As well, the peaks at the end have been slightly skewed to "strengthen" the degree of membership once the range has been determined. For example, for an incredibly fast velocity (NL), one would not expect the membership to diminish beyond the peak of its corresponding fuzzy set. As well, we have tuned our system for subtle changes in angle since any amount of force applied for a displacement of 9 degrees would not render the pendulum back into the upright position. Consequently, applying a force that is too great would lead to overshoot. Further mathematical analysis may be formulated in the future to optimize this system. Actual definition of fuzzy sets for simulation purposes does not overlap. 2.2 Rule Base The rule base for the fuzzy expert system follows the general form IF (PREMISE) THEN CONCLUSION as described in the lectures. The dissection of the rule tells us that each premise and conclusion has an associated degree of membership. The strength of each rule is computed, which is the minimum of the antecents. However, there may be conflicting rules that must be resolved. Thus, defuzification by Center of Gravity may be utilized to resolve membership of output in multiple sets to a crisp value. 2.2.1 Design of Rule Base A 7x7 Rule Evaluation Rubric is chosen as the rule base. Evaluation is straightforward. In coming up with the rubric, seven degrees of angular displacement and velocity have been compared and a resulting applied force was assigned (also varying by 7 degrees). Naturally, we began with the most obvious comparisons along the diagonals of the grid -- a ZE angular displacement and ZE angular velocity would evaluate to ZE force applied; 11

conversely, NL and NL respectively would equate to NL force applied. Next, comparisons with obvious "middle of the line" results were established -- NS and NL would give NM. For situations where there were no definite solutions, the value between must be interpolated. This is accomplished by simply considering the average between two adjacent centroids. The output is the resulting degree of membership from this process. Other ideas that we have mustered up (but have not muddled with) were to have separate rules asserted for each angular displacement and each angular velocity. For instance, PL angular displacement would be evaluated to PL force applied while PS angular velocity would result in PS force applied. The average of the two conclusions PL and PS would be used to gauge the intensity of the force applied; in which case, would be PM. In many ways, this is similar to the reasoning behind the method stated above except the "rubric" would be dynamically conceived by the application rather than having it explicitly stated. 2.2.2 Implementation of Rule Base Please refer to the diagram below (Figure 5). Empty spaces are interpolated from adjacent results. 2.2.3 Remarks Given additional time, perhaps other rules may be explored. So long as the rules cover the possible cases, and evaluates to a seemingly appropriate output, then the rule base should be applicable. Rather, the problem that is presented is a matter of optimality and may involve sophisticated mathematical analysis to determine the best possible number of fuzzy states, coverage, and rule-base. Otherwise, system performance will depend on our individual dexterity for trial and error. In reality, our implementation is optimized for minor changes in angle rather than broad sweeping motions. Hence, we can generalize large angular velocity as just exerting a sufficiently large force in the same direction to counteract the motion. 12

3 Simulation of Controller A simulation of the fuzzy controller in action is displayed below. Case 1: Plot of System Dynamics for Initial Angle = 15 and Velocity = 1 Simulation w out/ Controller (angle = 15, velocity = 1, time =.1) 1 9 8 7 6 5 4 3 2 1.8.16.24.32.4.48.56.64.72.8.88.96 1.4 1.12 1.2 1.28 1.36 1.44 Angular Displacement [degrees] Time [s] Simulation w / Controller (angle = 15, velocity = 1, time =.1) Angular Displacement [degrees] 16 14 12 1 8 6 4 2-2.8.16.24.32.4.48.56.64.72.8.88.96 1.4 1.12 1.2 1.28 1.36 1.44 Time [s] 13

Case 2: Plot of System Dynamics for Initial Angle = -5 and Velocity = 5 Angular Displacement [degrees] -2-4 -6-8 -1-12 -14-16 -18.3 Simulation w out/ Controller (angle = -5, velocity = 5, time =.1).6.9.12.15.18.21.24.27 Time [s].3.33.36.39.42.45.48 Angular Displacement [degrees] 1-1 -2-3 -4-5 -6 Simulation w / Controller (angle = -5, velocity = 5, time =.1).3.6.9.12.15.18.21.24.27 Time [s].3.33.36.39.42.45.48 14

Case 3: Plot of System Dynamics for Initial Angle = -45 and Velocity = -2 Angular Displacement [degrees] -1-2 -3-4 -5-6 -7-8 -9-1.3 Simulation w out/controller (angle = -45, velocity = -2, time =.1).6.9.12.15.18.21.24.27 Time [s].3.33.36.39.42.45.48 Angular Displacement [degrees] 1-1 -2-3 -4.3 Simulation w /Controller (angle = -45, velocity = -2, time =.1).6.9.12.15.18.21.24.27.3.33.36.39.42.45.48-5 Time [s] 15