Вы находитесь на странице: 1из 14

CONVENTIONAL CONTROL

Example: design a cruise control system After gaining an intuitive understanding of the plants dynamics and establishing the design objectives, the control engineer typically solves the cruise control problem by doing the following: 1. Developing a model of the automobile dynamics (which may model vehicle and power train dynamics, tire and suspension dynamics, the eect of road grade variations, etc.). Using the mathematical model, or a simplied version of it, to design a controller (e.g., via a linear model, develop a linear controller with techniques from classical control).
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

FUZZY CONTROL

2.

CONVENTIONAL CONTROL
3. Using the mathematical model of the closed-loop system and mathematical or simulation-based analysis to study its performance (possibly leading to redesign). Implementing the controller via, for example, a microprocessor, and evaluating the performance of the closed-loop system (again, possibly leading to redesign).

CONVENTIONAL CONTROL

4.

Fuzzy Control Kevin M. Passino and Stephen Yurkovich

Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Mathematical model of the plant: never perfect an abstraction of the real system is accurate enough to be able to design a controller that will work.! based on a system of differential equations

CONVENTIONAL CONTROL
Performance Objectives: 1. Disturbance rejection properties (e.g., for the cruise control problem, that the control system will be able to dampen out the eects of winds or road grade variations). 2. Insensitivity to plant parameter variations (e.g., for the cruise control problem, that the control system will be able to compensate for changes in the total mass of the vehicle that may result from varying the numbers of passengers or the amount of cargo).

Fuzzy Control Kevin M. Passino and Stephen Yurkovich

Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Performance Objectives: 3. Stability (e.g., in the cruise control problem, to guarantee that on a level road the actual speed will converge to the desired set-point). 4. Rise-time (e.g., in the cruise control problem, a measure of how long it takes for the actual speed to get close to the desired speed when there is a step change in the setpoint speed). 5. Overshoot (e.g., in the cruise control problem, when there is a step change in the set-point, how much the speed will increase above the set-point).
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Performance Objectives: 6. Settling time (e.g., in the cruise control problem, how much time it takes for the speed to reach to within 1% of the setpoint). 7. Steady-state error (e.g., in the cruise control problem, if you have a level road, can the error between the set-point and actual speed actually go to zero; or if there is a long positive road grade, can the cruise controller eventually achieve the set-point).
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Design Constraints: Cost: How much money will it take to implement the controller, or how much time will it take to develop the controller? Computational complexity: How much processor power and memory will it take to implement the controller? Manufacturability: Does your controller have any extraordinary requirements with regard to manufacturing the hardware that is to implement it? Reliability: Will the controller always perform properly? What is its mean time between failures?
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Design Constraints: Maintainability: Will it be easy to perform maintenance and routine adjustments to the controller? Adaptability: Can the same design be adapted to other similar applications so that the cost of later designs can be reduced? Understandability: Will the people that implement it or test it be able to fully understand it? Politics: Is your boss biased against your approach? Is your approach too novel and does it thereby depart too much from standard practice?
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Controller Design: Proportional-integral-derivative (PID) control: Over 90% of the controllers in operation today are PID controllers. Often, like fuzzy controllers, heuristics are used to tune PID controllers (e.g., the Zeigler-Nichols tuning rules). Classical control: Lead-lag compensation, Bode and Nyquist methods, root-locus design, and so on. State-space methods: State feedback, observers, and so on.
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Controller Design: Optimal control: Linear quadratic regulator, use of Pontryagins minimum principle or dynamic programming, and so on. Robust control: H2 or H methods, quantitative feedback theory, loop shaping, and so on. Nonlinear methods: Feedback linearization, Lyapunov redesign, sliding mode control, backstepping, and so on.
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

CONVENTIONAL CONTROL
Controller Design: Adaptive control: Model reference adaptive control, self-tuning regulators, nonlinear adaptive control, and so on. Stochastic control: Minimum variance control, linear quadratic gaussian (LQG) control, stochastic adaptive control, and so on. Discrete event systems: Petri nets, supervisory control, innitesimal perturbation analysis, and so on.
Fuzzy Control Kevin M. Passino and Stephen Yurkovich

FUZZY CONTROL
Fuzzy control provides a formal methodology for representing, manipulating, and implementing a humans heuristic knowledge about how to control a system.

Fuzzy Control Kevin M. Passino and Stephen Yurkovich

FUZZY CONTROL
Useful cases: (1) The control processes are too complex to analyze by conventional quantitative techniques. (2) The available sources of information are interpreted qualitatively, inexactly, or uncertainly. Advantages of FLC: (1) Parallel or distributed control multiple fuzzy rules complex nonlinear system (2) Linguistic control. Linguistic terms - human knowledge (3) Robust control. More than 1 control rules a error of a rule is not fatal.
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Four main components of a fuzzy controller: (1) The fuzzification interface : transforms input crisp values into fuzzy values (2) The knowledge base : contains a knowledge of the application domain and the control goals. (3) The decision-making logic :performs inference for fuzzy control actions (4) The defuzzification interface

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Step 1: Choice of state and control variables State variables
input variables of the fuzzy control system state, state error, state error deviation, and state error integral are often used output variables of the fuzzy control system selection of the variables depends on expert knowledge on the process

FUZZY CONTROL
Step 2: Select inference method. Mamdani Larsen Tsukamoto TSK (Takagi Sugeno Kang) Other methods (such as SAM)

Control variables

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Inference method: Mamdani
minimum operator for a fuzzy implication max-min operator for the composition
1

FUZZY CONTROL
Inference method: Larsen
product operator() for a fuzzy implication max-product operator for the composition
1 1 1

A1

B1

C1

1
0

1 w
1 0

A2

B2

C2

2
0 0 0 0

2
0

0 min

min

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Inference method: Tsukamoto the consequent part : fuzzy set with a monotonic membership function The rule base has the form:

FUZZY CONTROL
Inference method: Tsukamoto
Min A1 1 B1 1 C1 1

C ( z )
i

1 1

Ri: if u is Ai and v is Bi, then w is Ci,

w1

i = 1, 2, , n where Ci is a monotonic function.


A2 2 B2 2

C2 2

the result of rule Ri :

zi = ( i )
u v

1 Ci

2 2 w2 2
w

the aggregated result : weighted sum no defuzzification


http://if.kaist.ac.kr/lecture/cs670/textbook/

z =

1 z1 + 2 z2 1 + 2

u0

v0

Weighted Average

Graphical representation of Tsukamoto method

w0 =

1w1 + 2 w2 1 + 2

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Inference method: TSK (Takagi-Sugeno-Kang) - the consequent part is given as a function of input variables. Ri: if x is Ai and y is Bi then z is fi(x, y) where z = f(x, y) is a crisp function of input variables x and y. - When input data are singletons x0 and y0, then the inferred result of rule Ri is fi(x0, y0). - The aggregated result : weighted average using the matching degree i f (x , y ) + f (x , y )

FUZZY CONTROL
Inference method: TSK (Takagi-Sugeno-Kang)

A1 B1 1 u v Min

w1=p1u0+q1v0+r1

A2

B2

2 u u0 v0 v

w2=p2u0+q2v0+r2
Weighted Average

z =

1 1

2 2

1 + 2

w0 =

1w1 + 2 w2 1 + 2

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Step 3: Fuzzification. Process of making a crisp quantity fuzzy If it is assumed that input data do not contain noise of vagueness, a fuzzy singleton can be used If the data are vague or perturbed by noise, they should be converted into a fuzzy number
F(x)

FUZZY CONTROL
Step 3: Fuzzification. Process of making a crisp quantity fuzzy

x0

F(x)

Fuzzification function x = fuzzifier (x0) - x0 is a observed crisp value - x is a fuzzy set Fuzzifier() represents a fuzzification operator
x

F(x)

x0

F(x)

x0 base

x0 base

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Step 4: Design the knowledge base. The knowledge base consists of two parts: 1. Data base. Partition of the variable spaces 2. Rule base. Fuzzy control rules.

FUZZY CONTROL
Range Level No. 6 5 4 3 2 1 0 1 2 3 4 5 6

Data base design. Discretization of the universe of discourse.

x 2.4 2.4 < x 2.0 1.6 < x 0.8 0.8 < x 0.4 0.4 < x 0.2 0.2 < x 0.1 0.1 < x +0.1 +0.1 < x +0.2 +0.2 < x +0.4 +0.4 < x +0.8 +0.8 < x +1.1 +1.1 < x +1.4 +1.4 < x

Example: A universe of discourse is discretized into 13 levels (-6, -5, -4, , 0, 1, , 5, 6). http://if.kaist.ac.kr/lecture/cs670/textbook/ http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Range

FUZZY CONTROL
Normalized universe

Data base design. Normalization of the universe of discourse. A discretization into a normalized universe. The normalized universe consists of finite number of segments. The scale mapping can be uniform, non-uniform, or both.

Normalized segments [1.0, 0.5] [0.5, 0.3] [0.3, 0.0] [0.0, +0.2] [+0.2, +0.6] [+0.6, +1.0]

Data base design. Fuzzy partition. determines how many terms should exist in a term set. to find the number of primary fuzzy sets (linguistic terms)
N

[6.9, 4.1] [4.1, 2.2] [2.2, 0.0] [0.0, +1.0] [+1.0, +2.5] [+2.5, +4.5]

[1.0, +1.0]

Z P

the universe of discourse [-6.9, +4.5] is transformed into the normalized closed interval [-1, 1]. http://if.kaist.ac.kr/lecture/cs670/textbook/

+1

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Data base design. Fuzzy partition. 7 linguistic terms are often used NB: negative big NM: negative medium NS: negative small NB NM ZE: zero PS: positive small PM: positive medium PB: positive big
1

FUZZY CONTROL
Data base design. Fuzzy partition.
x2

NS

ZE

PS

PM

PB

The number of fuzzy terms in the input space determines the maximum possible number of control rules.

PS ZO NS NB NB NS ZO PS PB x1

+1

http://if.kaist.ac.kr/lecture/cs670/textbook/

A fuzzy partition in a 2-dimensional input space. The maximum number of control rules = 20 (5x4) http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Practical design principles for designing the data base:
Each membership function should overlaps only with the closest neighboring membership functions; For any possible input, its membership values in all relevant fuzzy sets should sum to 1 (or nearly)
* Fuzzy Logic: Intelligence, control, and Information, J. Yen and R. Langari, Prentice Hall

FUZZY CONTROL
A Membership Function that violates the second principle

* Fuzzy Logic: Intelligence, control, and Information, J. Yen and R. Langari, Prentice Hall

FUZZY CONTROL
A Membership Function that violates both principles

FUZZY CONTROL
Asymmetric Membership Function that follows the guidelines

* Fuzzy Logic: Intelligence, control, and Information, J. Yen and R. Langari, Prentice Hall

* Fuzzy Logic: Intelligence, control, and Information, J. Yen and R. Langari, Prentice Hall

FUZZY CONTROL
Data base design. Membership functions of primary fuzzy sets. Various types of MFs: - Triangular - Trapezoidal - Gaussian - Bell - etc.

FUZZY CONTROL
Rule base design. Source of fuzzy control rules: 1. Expert knowledge and control engineering knowledge. 2. Observation of operators actions. 3. Fuzzy model of the process: linguistic description of the dynamic properties 4. Learning: learning from example or self-organizing learning.

Example of triangular membership functions http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Rule base design. Types of fuzzy control rules. State evaluation fuzzy rules: state variables in the antecedent part, control variables in the consequent part.
a collection of rules of the form(MISO version) R1: if x is A1, and y is B1 then z is C1

FUZZY CONTROL
Rule base design. Types of fuzzy control rules. General representation of state evaluation fuzzy rules: Ri: if x is Ai, and y is Bi then z = fi(x, y)
- The state evaluation rules evaluate the process state (e.g. state, state error, change of error) at time t and compute a fuzzy control action at time t. - In the input variable space, the combination of input linguistic term may give a fuzzy rule.
http://if.kaist.ac.kr/lecture/cs670/textbook/

Rn: if x is An, and y is Bn then z is Cn

where x, y and z are linguistic variables representing the process state variable and the control variable. Ai, Bi and Ci are linguistic values of the variables x, y and z in the universe of discourse U, V and W, respectively i = 1, 2, , n.
That is, x U, Ai U, , y V, Bi V, z W, Ci W
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Rule base design. Types of fuzzy control rules. A set of fuzzy rules Ri: if x is Ai, and y is Bi then z is Ci, i = 1, 2, , n Can be represented as a rule table
y Bn B2 B1 C1 A1 http://if.kaist.ac.kr/lecture/cs670/textbook/ Cn C3 C2 A2 C5 C4 C6 C5 C4 C7 An x

FUZZY CONTROL
Rule base design. Types of fuzzy control rules. Object evaluation fuzzy rules: predictive fuzzy control.
A collection of rules of the form

R1: if (z is C1 (x is A1 and y is B1)) then z is C1. Rn: if (z is Cn (x is An and y is Bn)) then z is Cn.
A control action is determined by an objective evaluation that satisfies the desired states and objectives. x and y are performance indices for the evaluation and z is control command. Ai and Bi are fuzzy values such as NM and PS. The most likely control rule is selected through predicting the results (x, y) corresponding to every control command Ci, i = 1, 2, , n.
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Step 5: Select defuzzification method. In many practical applications, a control command is given as a crisp value. a process to get a non-fuzzy control action that best represents the possibility distribution of an inferred fuzzy control action. no systematic procedure for choosing a good defuzzification strategy select one in considering the properties of application case
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Defuzzification methods.

Centroid Mean-of-maximum Weighted average


http://if.kaist.ac.kr/lecture/cs670/textbook/

z0 =
j =1

zj k

FUZZY CONTROL
Step 6: Test and tuning. - Adjust data base - Adjust rule base - Try different inference methods - Try different defuzzification methods

FUZZY CONTROL
Step 7: (Optional) Produce a Lookup table. Due to the problem of time complexity, it may take a long time to compute the fuzzy inference and defuzzification. A lookup table shows relationships between the input variables and control output actions. A lookup table can be constructed after making the FLC and identifying the relationships between the input and output variables. In general, it is extremely difficult to get an acceptable lookup table of a nonlinear control system without constructing a corresponding FLC.
http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Step 7: (Optional) Produce a Lookup table.
The control surface can be represented as a table

FUZZY CONTROL
Review of the design procedure. Step 1: Determination of state variables and control variables Step 2: Selection of the inference method -Mamdani -Larsen -Tsukamoto -TSK Step 2: Selection of the fuzzification method

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL
Review of the design procedure. Step 4: Determination of the knowledge base
- Discretization and normalization of state variable space - Partition of variable space. - Selection of the MF shapes - Design of the rule base

FUZZY CONTROL

Step 5: Selection of defuzzification strategy Step 6: Test and tuning Step 7: Construction of a lookup table
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Servomotors are used in many automatic system including drivers for printers, floppy disks, tape recorders, and robot manipulations. The servomotor process shows nonlinear properties The goal is to apply the fuzzy logic control to the motor control. The task of the control is to rotate the shaft of the motor to a set point without overshoot.
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 1) Determination of state variables and control variable (1) State variables (input variable of FLC): - Error : the set point minus the process output (e). - Change of error (ce) : the error from the process output minus the error from the last process output. (2) Control variable (output variable of FLC): - Control input (v) : the voltage applied to the process.
http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 2) Determination of inference method - The Mandani inference method is selected for its simplicity 3) Determination of fuzzification method - fuzzy singleton : measure the state variables without uncertainty

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Discretization and normalization
The shaft encoder of the motor has a resolution of 1000. The universes of discourse are as follows: 1000 e 1000 100 ce 100 The servo amplifier has an output range of 30 V and thus the control variables (v) are in the range 30 v 30 We discretize and normalize the input variables in the range [1, +1] (next slide). The control variable v is normalized in the range [1, +1] with the equation 1

v =

30

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Discretization and normalization
error (e) 1000 e 800 800 < e 600 600 < e 400 400 <e 200 200 < e 100 100 < e 100 100 < e 200 200 < e 400 400 < e 600 600 < e 800 800 < e 1000 error change (ce) 100 ce 80 80 < ce 60 60 < ce 40 40 < ce 20 20 < ce 10 10 < ce 10 10 < ce 20 20 < ce 40 40 < ce 60 60 < ce 80 80 < ce 100 quantized level 1.0 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1.0

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Partition of input and output spaces - Partition space of each input and output variable into seven regions. - Each region is associated with a linguistic term - The maximum number of possible fuzzy rules is 49.
NB 1 NM NS ZE 0 PS PM PB +1 e ce

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Determination of the shapes of fuzzy sets - Input and output variables are normalized on the interval [-1, +1] - The input and partitioned into seven linguistic terms - Select triangular fuzzy sets
NB NM NS ZE PS PM PB 1

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Construction of the rules
We interviewed with an expert of the servomotor control, and we collect knowledge such as: If the error is zero and the error change is positive small, then the control input is negative small (1) (2) (3) (4) (5) (6) If e is PB and ce is any, then v is PB. If e is PM and ce is NB, NM, or NS, then v is PS. If e is ZE and ce is ZE, PS, or PM, then v is ZE. If e is PS and ce is NS, ZE, or PS, then v is ZE. If e is NS and ce is NS, ZE, PS, or PM, then v is NS. If e is NS or ZE and ce is PB, then v is PS.
http://if.kaist.ac.kr/lecture/cs670/textbook/

0.5

0.8

0.6

0.4

0.2

0.2

0.4

0.6

0.8

1.0

http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 4) Construction of the rules
ce

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 5) Select centroid defuzzification 6) Test and tune. Compare performance to classical control

e NB NM NS ZE PS PM PB

NB

NM

NS

ZE

PS NB

PM

PB

NM NS NS ZE PM PB PS

PS

http://if.kaist.ac.kr/lecture/cs670/textbook/

http://if.kaist.ac.kr/lecture/cs670/textbook/

10

FUZZY CONTROL EXAMPLESERVOMOTORS


Design procedure for servomotor control 7) Construction the look-up table

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Harder formulation: Back-up a truck-trailer to a dock

Simple formulation: Back-up a truck to a dock.

Approach the dock at 90 angle!


http://if.kaist.ac.kr/lecture/cs670/textbook/

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Truck-and-trailer dynamics:

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Truck dynamics: - steering angle - truck angle x,y truck position

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Assumption: The truck travels at constant velocity V and truck length is L.

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


The truck dynamics can be represented in complex form:

p = x + jy
j dp = V (cos )e 2 dt d V = sin dt L

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

11

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


In MATLAB: function ds=trukmod(s,u) % Angles are in radians. % CONSTANTS L = 1; % Length of truck. v = 1; % Velocity of truck. % STATES pos = s(1) + sqrt(-1)*s(2); angle = s(3); % DERIVATIVES dpos = v*cos(u)*exp(j*(angle-pi/2)); dangle = v*sin(u)/L; ds = [real(dpos); imag(dpos); dangle];
Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


The universe of discourse:

% s(1) =x, s(2)=y, s(3)=f, u = q

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy sets for horizontal position: - far left, left, center, right, far right

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy sets for truck angle: - 0, 60, 120, 180, 240, 300, 360

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy sets for steering angle: - hard left, left, soft left, center, soft right, right, hard right

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy rules:

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

12

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy rules:

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


MATLAB simulation: % assume time step = 0.2 second dt = 0.2; For I=1:100 if rem(I,5) == 1 % Evaluate controller once a second % (5 time steps *0.2 seconds) theta = frule(A,C,Z,[s(1);s(3)]); end s = s + dt * truckmod (s,theta); end
Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


MATLAB simulation: trukcon1 Problem: the truck takes too long to get exactly to the center line Reason: coarse definition of the horizontal position Solution: redefine fuzzy sets for the horizontal position
Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


Fuzzy sets for horizontal position: - far left, left, center, right, far right

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


MATLAB simulation:
trukcon2 Redefinition of the fuzzy sets for the horizontal position significantly improved the results

FUZZY CONTROL EXAMPLETRUCK BACKER-UPPER


JAVA simulation: FuzzyTruck.html

Fuzzy Systems ToolBox, Mark Beale and Howard Demuth

http://www.iit.nrc.ca/IR_public/fuzzy/FuzzyTruck.html

13

SUMMARY
Classical control does not provide a perfect solution Fuzzy control is a formal methodology for implementing control systems based on humans heuristic knowledge Design procedure: Step 1: Determination of state variables and control variables Step 2: Selection of the inference method Step 2: Selection of the fuzzification method

SUMMARY
Step 4: Determination of the knowledge base - Discretization and normalization of state variable space - Partition of variable space. - Selection of the MF shapes - Design of the rule base Step 5: Selection of defuzzification strategy Step 6: Test and tuning Step 7: Construction of a lookup table

14

Вам также может понравиться