Intelligent Control and Fuzzy Logic

54
EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 1 Introduction to Intelligent Control & Fuzzy Logic Learning Outcomes In this topic we shall look at the fundamentals of intelligent control and fuzzy logic. At the end of this topic you should be able to: Define intelligent control. Define fuzzy logic. Explain the structure and operation of fuzzy logic controllers/systems Create a fuzzy logic system in Matlab. Explain the application of fuzzy logic in mechatronic systems.

Transcript of Intelligent Control and Fuzzy Logic

Page 1: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 1

Introduction to Intelligent Control & Fuzzy Logic

Learning Outcomes In this topic we shall look at the fundamentals of intelligent control and fuzzy logic. At the end of this topic you should be able to:

Define intelligent control.

Define fuzzy logic.

Explain the structure and operation of fuzzy logic controllers/systems

Create a fuzzy logic system in Matlab. Explain the application of fuzzy logic in mechatronic systems.

Page 2: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 2

Introduction to Intelligent Control

What is Normal (Classical) Control?

Open loop control system o Signal is sent to plant (mechatronic device) in order to

make it move to a certain position o No feedback to tell if the target has been reached

Closed-loop control system o Output of the plant is feedback to the input side

Controller K

Process G(s)

Input R Output C

Page 3: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 3

o Error between input and output is applied to a controller which then controls the plant

The whole idea behind classical control is that the system to be controlled requires a model.

The success of the system depends on the accuracy of this model and controller parameters (e.g. PID controller gains).

The model and the parameters are rigid (i.e. fixed) E.g. first and second order systems and PID controller equation

Page 4: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 4

First order system: 1

( )1

G sTs

Second order system: 2 2

1( )

2 n n

G ss s

PID controller TF: What about Intelligent Control?

The premise behind intelligent control is that the system to be controlled does not have to be rigidly modelled.

Page 5: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 5

This is unlike classical control and is the biggest distinction between the two approaches.

Humans can perform complex tasks without knowing exactly how they do them (and without using a rigid model).

Therefore, one may say that an intelligent method solves o A difficult (non-trivial, complex, usually large or

complicated) problem o In a non-trivial human-like way

Types of intelligent control include: o Fuzzy logic o Artificial neural networks o Genetic programming o Support vector machines o Reinforcement learning

We shall consider Fuzzy logic and artificial neural networks

Page 6: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 6

Components of Intelligent Systems

Structure of intelligent system

Page 7: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 7

Two categories of components o Software Elements

Knowledge Base – similar to a database, stores rules and relationships between data elements

Inference Engine – is the processing (program) element. Performs reasoning using knowledge base content and inputs

Knowledge base manager – resource and consistency management of the knowledge base and relationships between knowledge items

o Users Knowledge Engineer – design, implement, verify,

validate the system User – person or (process/plant/device) that

connects to the inference engine

Page 8: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 8

Introduction to Fuzzy Logic What is Fuzzy Logic?

Fuzzy logic like most of the intelligent control methods attempts to model the way of reasoning that goes on in the human brain.

It is based on the idea that human reasoning is approximate, non-quantitative, and non-binary. In many cases, there is no black and white answer, but shades of grey

The simplest example is temperature. Usually when you as someone the temperature they respond with “cool”, “warm”, “hot”, “very hot” as opposed to telling the exact temperature such as “28.5 degrees” or “33.1 degrees”

Page 9: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 9

Fuzzy logic is a convenient way to map input space to output space. E.g. How much to tip at a hotel? Input space is the quality of service and output space is the amount of tip.

Page 10: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 10

Why use Fuzzy Logic? Advantages over ‘conventional’ or ‘classical’ control:

Don’t need a good mathematical model of process being controlled.

Control system requires less information

Can be quicker to implement

Rules (more details later) can be tested individually Other advantages include:

1. Conceptually easy to understand – mathematical concepts are simple

2. Flexible – easy to layer on more functionality to existing system

Page 11: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 11

3. Fuzzy logic is tolerant of imprecise data

Applications in Mechatronics include: 1. Speed and position control in mechatronic systems

(alternative to PID controllers) 2. Robot trajectory control and obstacle avoidance 3. Control of appliances such as washing machines

General Approach to Fuzzy Logic Control The general approach to designing a fuzzy logic controller is made up 5 steps. These steps are

1. Define the Input and Output Variables 2. Define the subsets (Fuzzy sets) intervals

Page 12: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 12

3. Choose the Membership Functions 4. Set the IF-THEN rules 5. Perform calculations (using Fuzzy Inference) and adjust rules

The block diagram of a fuzzy controller is shown below.

Page 13: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 13

It has several components:

1. The rule-base is a set of IF-THEN rules about how to control 2. Fuzzification is the process of transforming the numeric

inputs into a form that can be used by the inference mechanism. This relies on fuzzy sets and membership functions.

3. The inference mechanism uses information about the current inputs (formed by fuzzification), decides which rules apply in the current situation, and forms conclusions about what the plant input should be.

4. Defuzzification converts the conclusions reached by the inference mechanism into a numeric input for the plant.

Page 14: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 14

We shall look at Fuzzy sets, Membership Functions, IF-THEN rules, and Fuzzy Inference in the next section. Fuzzy Inference is the combination of Fuzzification, the Inference Mechansim and Defuzzification

Page 15: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 15

Components of Fuzzy Logic

Fuzzy Sets

Fuzzy logic relies on the notion of fuzzy sets

A fuzzy set is a set without any crisp, clearly defined boundaries.

It can contain elements with a partial degree of membership.

Classical sets either wholly include an element or wholly exclude it. E.g. a set of the days of the week

Page 16: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 16

An example of a fuzzy set would the set of days that make up the weekend

Another example is age. If we were to ask “what is middle

age?, we would be inclined to classify middle age on grade so that we classify middle age as fuzzy, rather than a crisp set.

Page 17: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 17

Crisp set Fuzzy set

The curve in the fuzzy set that defines middle age is a function that maps the input space (age) to the output space (middle agedness or grade). Specifically, this is known as a membership function.

Page 18: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 18

Membership Functions

A membership function (MF) is a curve that defines how each point in the input space is mapped to a membership value (or degree of membership) between 0 and 1.

The input space is sometimes referred to as the universe of discourse.

The output-axis is a number known as the membership value between 0 and 1.

The curve is known as a membership function and is often given the designation of μ.

The only condition a membership function must satisfy is that it must vary between 0 and 1.

Page 19: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 19

A classical set might be described as A= { x | x>6 } A fuzzy set is an extension of a classical set. If X is the universe of discourse and its elements are denoted by x, then the fuzzy set A in X is defined as a set of ordered pairs. A= { x, A (x) | xX}

A (x) is called the membership function (or MF) of x in A. The membership function maps each element of X to a membership value between 0 and 1. The fuzzy logic toolbox includes membership function types such as, triangular membership function (trimf), trapezoidal membership function (trapmf), simple Gaussian curve (gaussmf)

Page 20: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 20

and a two-sided composite of two different Gaussian curves (gauss2mf), sigmoid membership function (sigmf) and others.

Page 21: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 21

Fuzzy Logic Operators

Fuzzy logic is a superset of standard Boolean logic

If we keep the fuzzy values to the extremes of 1 (completely true) and 0 (completely false), standard logical operators will hold.

Standard truth tables

Page 22: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 22

Fuzzy truth tables

Note some books use ‘intersection’ or ‘ ’ for the min operator and ‘union’ or ‘ ’ for the max operator The standard and fuzzy truth tables are illustrated in figure below

Page 23: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 23

Page 24: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 24

If-Then Rules

If-Then rules are fuzzy rules that are defined as a conditional statement in the form:

IF x is A THEN y is B Where x and y are linguistic variables; and A and B are linguistic values determined by fuzzy sets on the universe of discourses X and Y, respectively

The “IF” part of the rule is called the antecedent

The “THEN” part is called the consequent

Page 25: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 25

Classical IF-THEN rules use binary logic, for example, Rule: 1 IF speed is > 100 THEN stopping_distance is long Rule: 2 IF speed is < 40 THEN stopping_distance is short The variable speed can have any numerical value, but the linguistic variable stopping_distance can take either value long or short.

Fuzzy IF-THEN rules example,

Page 26: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 26

Rule: 1 IF speed is fast THEN stopping_distance is long Rule: 2 IF speed is slow THEN stopping_distance is short In this case the linguistic variable speed includes fuzzy sets such as slow, medium and fast. The linguistic variable stopping_distance may include fuzzy sets as short, medium and long. Thus fuzzy rules relate to fuzzy sets.

Page 27: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 27

Note that the antecedent is an interpretation that returns a single number between 0 and 1.

On the other hand, the consequent is an assignment that assigns the entire fuzzy set B to the output variable y.

The Fuzzy Inference Process (from MATLAB Fuzzy Logic Toolbox) There are five parts to the fuzzy inference process (in the MATLAB Fuzzy Logic Toolbox)

1. Fuzzification of the input variables i. Takes the inputs and determines the degree to which

they belong to each of the appropriate fuzzy sets via membership functions.

Page 28: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 28

ii. The input is always a crisp numerical value limited to the universe of discourse of the input variable and the output is a fuzzy degree of membership (always in interval between 0 and 1).

2. Application of the fuzzy operator (AND or OR or NOT) in the antecedent i. If the antecedent of a given rule has more than one part,

the fuzzy operator is applied to obtain one number that represents the result of the antecedent for that rule. This number will then be applied to the output function.

ii. Any number of well-defined methods can fill in for the AND operation or the OR operation.

iii. In fuzzy logic toolbox, two built -in AND methods are supported: min (minimum) and prod (product). Two built-

Page 29: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 29

in OR methods are also supported: max(maximum), and the probabilistic OR method probor.

3. Implication from the antecedent to the consequent i. The implication method is defined as the shaping of the

consequent (a fuzzy set) based on the antecedent ( a single number).

ii. The input for the implication process is a single number given by the antecedent, and the output is a fuzzy set.

iii. Implication occurs for each rule. iv. Two built-in methods are supported, min (minimum)

which truncates the output fuzzy set, and prod (product) which scales the output fuzzy set.

4. Aggregation of the consequents across the rules i. Unify the outputs of each rule

5. Defuzzification

Page 30: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 30

i. Input for defuzzification phase is unified fuzzy set formed by aggregation of consequents and output is crisp number.

ii. If there are more than one output variables, final output for each variable is a crisp number.

iii. The most popular defuzzification method is the centroid calculation, which returns the center of area under the curve.

iv. There are five built-in methods supported: centroid, bisector, middle of maximum ( the average of the maximum value of the output set), largest of maximum, and smallest of maximum.

The centroid defuzzification method is briefly explained below:

Page 31: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 31

The centroid technique finds a point where a vertical line would slice the aggregate set into two equal masses. In the figure below, a centroid defuzzification finds a point representing the centre of gravity of the fuzzy set, A, on the interval, ab. In practice, a reasonable estimate is obtained by calculating over a sample of points as shown below

( )

( )

b

Ax a

b

Ax a

x xCOG

x

Page 32: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 32

If you recall the block diagram of a fuzzy controller on page 12, you will notice that the Inference Mechanism consists of steps 2,3,4 of the fuzzy inference process.

Page 33: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 33

Examples

The Basic Structure of Mamdani-style Fuzzy Inference Lets examine a simple two-input one-output problem that includes three rules: Rule: 1 IF x is A3 OR y is B1 THEN z is C1 Rule: 2 IF x is A2 AND y is B2 THEN z is C2

Page 34: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 34

Rule: 3 IF x is A1 THEN z is C3 Where x, y, z are linguistic variables; A1, A2 and A3 are linguistic values determined by fuzzy sets on universe of discourse X; B1 and B2 are linguistic values determined by fuzzy sets on universe of discourse Y; C1, C2, C3 are linguistic values determined by fuzzy sets on universe of discourse Z. The basic structure of the Mamdani-style fuzzy inference is shown below:

Page 35: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 35

Page 36: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 36

Page 37: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 37

For the defuzzification process, we calculate the centre of gravity (centroid) of the output as:

Page 38: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 38

Hence, the result of defuzzification, crisp output z1 is 67.4.

Page 39: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 39

Controlling the Distance Between Two Cars Design a fuzzy controller/system for controlling the distance between two cars. Recall that the general approach to designing a fuzzy logic controller is made up 5 steps (pages 11 and 12). First, define the inputs and outputs. There are two inputs: D, the distance between the cars, and v, the velocity of the following car. There is one output: B, the amount of braking to apply to the following car (force). The inputs and outputs are shown in the figure below.

Page 40: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 40

Second, define the subsets’ intervals. To simplify things, 3 subset intervals will be chosen for each variable. These are low, medium and high for distance and velocity, and small, medium and big for braking force. These subset intervals are illustrated in the figure below.

Page 41: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 41

Third, choose the membership functions. In this example, the shape of the membership functions are fairly simple, just a linear transition between the various subsets (see above figure). To illustrate, in the figure above, the membership function for low distance goes down linearly from 1 to 0 as distance goes from 0 to 5 meters.

Page 42: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 42

Fourth, set the IF-THEN rules. This is how combinations of the input determine the output. For example, IF the distance, D, between the cars is low AND the velocity, v, of the following car is high, THEN the braking to apply, B, is big. Similarly, the other rules are defined. This is where the non-quantitative human reasoning comes in. A simple two-rule system could be: Rule: 1 IF D is Low AND v is High THEN B is Big Rule: 2 IF D is Medium AND v is High

Page 43: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 43

THEN B is Medium Fifth, perform calculations and adjust the rules. Since the rules are non-exact some adjustments may be necessary to more optimally control the vehicles’ distance. As an example, say the distance between the vehicles is 2.5 meters and the speed of the following car is 100 km/h. From the distance subset in Figure 8, the 2.5 meter distance translates into 0.25 medium distance plus 0.5 low distance. Likewise, the 100 km/h speed translates into 0.75 high speed. A process similar to the Mamdani Fuzzy Inference Example (previous example) is used to compute the final crisp braking percentage.

Page 44: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 44

Question If the distance between the vehicles is 4 metres and the speed of the following car is 60 km/hr what percentage braking will be applied? Using the Fuzzy Logic Toolbox GUI to Build a Fuzzy System Refer to the document “Building Fuzzy System using GUI” in Moodle. We shall build a fuzzy system for the previous example in class. Water Level Control (Simulink Example) Refer to the document “Water Level Control” in Moodle

Page 45: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 45

Further Mechatronic Systems Related Examples Please refer to the papers in the reading resources folder on Moodle. Fuzzy knowledge-based controller design for autonomous robot navigation In this study a fuzzy logic controller for mobile robot navigation has been designed. The designed controller deals with the uncertainty and ambiguity of the information the system receives. The technique has been used on an experimental mobile robot which uses a set of seven ultrasonic sensors to perceive the environment. The designed fuzzy controller maps the input space

Page 46: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 46

(information coming from ultrasonic sensors) to a safe collision-avoidance trajectory (output space) in real time. This is accomplished by an inference process based on rules (a list of IF-THEN statements) taken from a knowledge base. The technique generates satisfactory direction and velocity maneuvers of the autonomous vehicle which are used by the robot to reach its goal safely. Simulation and experimental results show the method can be used satisfactorily by wheeled mobile robots moving on unknown static terrains Fuzzy Logic Controller for Mechatronics and Automation Conventional car suspensions systems are usually passive, i.e have limitation in suspension control due to their fixed damping force. Semi-active suspension system which is a modification of

Page 47: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 47

active and passive suspension system has been found to be more reliable and robust but yet easier and cheaper than the active suspension system. In semi active damping, the damper is adjustable and may be set to any value between the damper-allowable maximum and minimum values. Semi active control systems are a class of active control systems for which external energy is needed like active control systems. In this paper a fuzzy logic controller and hybrid controller were applied to a car Active suspension system. The fuzzy logic controller was applied to the car suspension system with different types of disturbances.

Page 48: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 48

The five general steps to design a fuzzy controller were followed and a block diagram of the system is shown below:

Page 49: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 49

Mechatronic Design and Control of Hybrid Electric Vehicles The work in this paper presents techniques for design, development, and control of hybrid electric vehicles (HEV’s). Toward these ends, four issues are explored. First, the development of HEV’s is presented. This synopsis includes a novel definition of degree of hybridization for automotive vehicles. Second, a load-leveling vehicle operation strategy is developed. In order to accomplish the strategy, a fuzzy logic controller is proposed. Fuzzy logic control is chosen because of the need for a controller for a nonlinear, multidomain, and time-varying plant with multiple uncertainties. Third, a novel technique for system integration and component sizing is presented. Fourth, the system design and control strategy is both simulated and then implemented in an actual vehicle. The controller examined in this

Page 50: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 50

study increased the fuel economy of a conventional full-sized vehicle from 40 to 55.7 mi/h and increased the average efficiency over the Federal Urban Driving Schedule from 23% to 35.4%. The paper concludes with a discussion of the implications of intelligent control and mechatronic systems as they apply to automobiles.

Page 51: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 51

Summary

Intelligent control methods do not require rigid modelling of the system that is to be controlled.

An intelligent method solves a difficult problem in a non-trivial human-like way.

There are several types of intelligent control methods and we considered fuzzy logic in this section.

Fuzzy logic like most of the intelligent control methods attempts to model the way of reasoning that goes on in the human brain.

It is based on the idea that human reasoning is approximate, non-quantitative, and non-binary. In many cases, there is no black and white answer, but shades of grey

Page 52: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 52

The general approach to designing a fuzzy controller consists of 5 steps

o Define input and output variables o Define the subsets intervals o Choose membership functions o Set IF-THEN rules o Perform calculations (using Fuzzy Inference) and adjust

rules

There are five parts to the fuzzy inference process o Fuzzification of the input variables o Application of the fuzzy operator (AND or OR or NOT) in

the antecedent o Implication from the antecedent to the consequent o Aggregation of the consequents across the rules o Defuzzification

Page 53: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 53

Fuzzy logic can be used in mechatronic applications such as speed, position, level control, robot trajectory control and obstacle avoidance, hybrid electric vehicles, vehicle active suspension systems, control of appliances such as washing machines etc.

Sources B. Smith, “Classical vs Intelligent Control”, in EN9940 Special Topics in Robotics Notes, Memorial University, 2002. (http://www.engr.mun.ca/~baxter/Publications/ClassicalvsIntelligentControl.pdf )

K.M. Hangos, R. Lakner and M. Gerzson, “Intelligent Control Systems: An Introduction with Examples”, Kluwer Academic Publishers, New York, USA, 2004.

“Fuzzy Logic Toolbox”, in MATLAB Full Product Family Help, MATLAB 7.10.0 (Release 2010a), The Math Works Inc., Natick MA, USA, 2010. (electronic resource)

“Fuzzy Logic Toolbox User’s Guide Version 2.2.11”, in MATLAB Release 2010a PDF Documentation, CDROM, The Math Works Inc., Natick MA, USA, 2010.

D. Necsulescu, “Mechatronics”, Prentice Hall, New Jersey, USA, 2002.

Page 54: Intelligent Control and Fuzzy Logic

EE363 Mechatronics – 2014: Introduction to Intelligent Control & Fuzzy Logic Dr. Praneel Chand 54M. Negnevitsky, “Artificial Intelligence: A Guide to Intelligent Systems”, Addison Wesley, Essex, England, 2005.