智 能 控 制
智能控制概述
智能控制是自动控制发展的一个新阶段,是
人工智能、控制论、系统论和信息论等多种学科
的综合与集成,是当前的一个研究热点。
?智能控制的基本概念
?智能控制系统的特点
?智能控制系统的结构理论
?智能控制与传统控制的关系
?智能控制的研究对象
?智能控制的类型
?智能控制的发展概述
智能控制的基本概念
智能控制已经出现了相当长的
一段时间,并且已取得了初步的应
用成果,但是究竟什么是“智能”,
什么是“智能控制”等问题,至今
仍没有统一的定义。归纳起来,主
要有如下四种说法,
智能控制的基本概念
? 智能控制的定义一, 智能控制是由 智能机器 自
主地实现其目标的过程。而智能机器则定义为,
在结构化或非结构化的、熟悉的或陌生的环境
中,自主地或与人交互地执行人类规定的任务
的一种机器。
?定义二, K.J.奥斯托罗姆 则认为,把人类
具有的 直觉推理和试凑法等智能加以形式
化或机器模拟,并用于控制系统的分析与
设计中,以期在一定程度上实现控制系统
的智能化,这就是智能控制。他还认为自
调节控制、自适应控制就是智能控制的低
级体现。
智能控制的基本概念
?定义三, 智能
控制是一类无
需人的干预就
能够自主地驱
动智能机器实
现其目标的自
动控制,也是
用 计算机模拟
人类智能 的一
个重要领域 。
智能控制的基本概念
?定义四, 智能控制实际只是研究与模
拟人类智能活动及其控制与信息传
递过程的规律,研制具有 仿人智能
的工程 控制与信息处理系统 的一个
新兴分支学科。
智能控制的基本概念
智能控制的特点
?同时具有以 知识表示的非数学广义
模型 和以 数学模型 表示的混合过程,,
也往往是那些含有 复杂性, 不完全
性, 模糊性或不确定性 以及不存在
已知算法的非数学过程, 并以知识
进行推理, 以启发引导求解过程 ;
?智能控制的 核心在高层控制, 即组
织级 ;
?智能控制器具有 非线性 特性 ;
?智能控制具有 变结构 特点 ;
?智能控制器具有 总体自寻优 特性 ;
?智能控制系统应能满足 多样性目标
的高性能 要求 ;
?智能控制是一门 边缘交叉学科 ;
?智能控制是一个 新兴的研究领域,
智能控制的特点
智能控制的结构理论
智能控制的理论结构明显地具有多
学科交叉的特点,许多研究人员试图建
立起智能控制这一新学科,他们提出了
一些有关智能控制系统结构的思想。按
照 ( 傅京孙)和 Saridis提出的观点,可
以把智能控制看作是人工智能、自动控
制和运筹学三个主要学科相结合的产物。
称之为三元结构。
智能控制的结构理论
IC=AI∩AC∩OR
? IC ─ 智能控制
( Intelligent Control);
? OR─ 运筹学
(Operation Research)
? Al─ 人工智能
(Artificial Intelligence);
? AC 一 自 动 控 制
(Automatic Control);
? ∩ 一表示交集,
智能控制的结构理论
?人工智能 ( AI), 是一个知识处理系统,
具有记忆, 学习, 信息处理, 形式语言,
启发式推理等功能 。
?自动控制 ( AC), 描述系统的动力学
特性, 是一种动态反馈 。
?运筹学 ( OR),是一种定量优化方法,
如线性规划, 网络规划, 调度, 管理,
优化决策和多目标优化方法等 。
智能控制的结构理论
智能控制就是应用人工智能的
理论与技术和运筹学的优化方法,
并将其同控制理论方法与技术相结
合,在未知环境下,仿效人的智能,
实现对系统的控制。
可见,智能控制代表着自动控
制学科发展的最新进程。
智能控制的结构理论
智能控制与传统控制的关系
传统控制( Conventional control):经典反馈控
制和现代理论控制。它们的主要特征是基于精
确的系统数学模型的控制。适于解决线性、时
不变等相对简单的控制问题。
智能控制( Intelligent control)以上问题用智能
的方法同样可以解决。智能控制是对传统控制
理论的发展,传统控制是智能控制的一个组成
部分,在这个意义下,两者可以统一在智能控
制的框架下。
智能控制的研究对象
智能控制主要应用在以下情况,
?实际系统由于存在复杂性、非线性、时
变性、不确定性和不完全性等,一般无
法获得精确的数学模型。
?应用传统控制理论进行控制必须提出并
遵循一些比较苛刻的线性化假设,而这
些假设在应用中往往与实际情况不相吻
合。
智能控制的研究对象
?对于某些复杂的和饱含不确定性的控制
过程,根本无法用传统数学模型来表示,
即无法解决建模问题。
?为了提高控制性能,传统控制系统可能
变得很复杂,从而增加了设备的投资,
减低了系统的可靠性。
智能控制的类型
智能控制系统一般包括
? 分级递阶控制系统
? 专家控制系统
? 神经控制系统
? 模糊控制系统
? 学习控制系统
? 集成或者 ( 复合 ) 混合控制:几种方法和机制
往往结合在一起, 用于一个实际的智能控制系
统或装置, 从而建立起混合或集成的智能控制
系统 。
分级递阶控制系统
分级递阶智能控制是在自适应控制和
自组织控制基础上, 由美国普渡大学
Saridis提出的智能控制理论 。 分级递阶
智 能 控 制 ( Hierarchical Intelligent
Control)主要由三个控制级组成, 按智
能控制的高低分为组织级, 协调级, 执
行级, 并且这三级遵循, 伴随智能递降
精度递增, 原则, 其功能结构如下图所
示 。
分级递阶控制系统
分级递阶控制系统
? 组织级 (organization level),组织级通过人机
接口和用户 (操作员 )进行交互, 执行最高决策
的控制功能, 监视并指导协调级和执行级的所
有行为, 其智能程度最高 。
? 协调级 (Coordination level),协调级可进一步
划分为两个分层,控制管理分层和控制监督分
层 。
? 执行级 (executive level),执行级的控制过程
通常是执行一个确定的动作 。
专家控制系统( Expert System)
专家指的是那些对解决专门问题非常熟悉的
人们, 他们的这种专门技术通常源于丰富的经
验, 以及他们处理问题的详细专业知识 。
专家系统主要指的是一个智能计算机程序系
统, 其内部含有大量的某个领域专家水平的知
识与经验, 能够利用人类专家的知识和解决问
题的经验方法来处理该领域的高水平难题,它具
有启发性, 透明性, 灵活性, 符号操作, 不一
确定性推理等特点 。 应用专家系统的概念和技
术, 模拟人类专家的控制知识与经验而建造的
控制系统, 称为专家控制系统 。
神经网络是指由
大量与生物神经系统
的神经细胞相类似的
人工神经元互连而组
成的网络;或由大量
象生物神经元的处理
单元并联互连而成。
这种神经网络具有某
些智能和仿人控制功
能。
人工神经网络控制系统
学习算法是神经网络的主要特征,也
是当前研究的主要课题,学习的概念来自生
物模型,它是机体在复杂多变的环境中进
行有效的自我调节。神经网络具备类似人
类的学习功能。一个神经网络若想改变其
输出值,但又不能改变它的转换函数,只
能改变其输人,而改变输人的唯一方法只
能修改加在输人端的加权系数。
人工神经网络控制系统
人工神经网络控制系统
神经网络的学习过程是修改加权系数
的过程,最终使其输出达到期望值,学
习结束,常用的学习算法有,Hebb学习
算法,widrow Hoff学习算法、反向传播
学习算法一 BP学习算法,Hopfield反馈
神经网络学习算法等。
模糊控制系统
所谓模糊控制, 就是在被控制对象
的模糊模型的基础上, 运用模糊控制器
近似推理手段, 实现系统控制的一种方
法 。
模糊模型是用模糊语言和规则描述
的一个系统的动态特性及性能指标 。
模糊控制系统
模糊控制的基本思想是用机器去模拟人对
系统的控制 。 它是受这样事实而启发的:对于
用传统控制理论无法进行分析和控制的复杂的
和无法建立数学模型的系统, 有经验的操作者
或专家却能取得比较好的控制效果, 这是因为
他们拥有日积月累的丰富经验, 因此人们希望
把这种经验指导下的行为过程总结成一些规则,
并根据这些规则设计出控制器 。 然后运用模糊
理论, 模糊语言变量和模糊逻辑推理的知识,
把这些模糊的语言上升为数值运算, 从而能够
利用计算机来完成对这些规则的具体实现, 达
到以机器代替人对某些对象进行自动控制的目
的 。
学习控制系统
学习是人类的主要智能之一, 人类的各项
活动也需要学习 。 在人类的进化过程中, 学习
功能起着十分重要的作用 。 学习控制正是模拟
人类自身各种优良的控制调节机制的一种尝试 。
所谓学习是一种过程, 它通过重复输人信号,
并从外部校正该系统, 从而使系统对特定输人
具有特定响应 。 学习控制系统是一个能在其运
行过程中逐步获得受控过程及环境的非预知信
息, 积累控制经验, 并在一定的评价标准下进
行估值, 分类, 决策和不断改善系统品质的自
动控制系统 。
智能控制的发展趋势
?智能控制是自动控制理论发展的必
然趋势
?人工智能为智能控制的产生提高了
机遇
智能控制的发展概述
自动控制理论是人类在征服自然、
改造自然的斗争中形成和发展的。控制
理论从形成发展至今,已经经历多年的
历程,分为三个阶段。第一阶段是以上
世纪 40年代兴起的调节原理为标志,称
为经典控制理论阶段;第二阶段以 60年
代兴起的状态空间法为标志,称为现代
控制理论阶段;第三阶段则是 80年代兴
起的智能控制理论阶段。
智能控制的发展概述
傅京孙 在 1971年指出, 方了解决智能控制
的问题, 用严格的数学方法研究发展新的工具,
对复杂的 "环境 -对象 "进行建模和识别, 以实现
最优控制, 或者用人工智能的启发式思想建立
对不能精确定义的环境和任务的控制设计方法 。
这两者都值得一试, 而更重要的也许还是把这
两种途径紧密地结合起来, 协调地进行研究 。
也就是说, 对于复杂的环境和复杂的任务, 如
何, 将人工智能技术中较少依赖模型的问题的
求解方法与常规的控制方法相结合, 这正 是智
能控制所要解决的问题 。
智能控制的发展概述
Saridis在学习控制系统研究的基础上, 提出
了分级递阶和智能控制结构, 整个结构自上而
下分为组织级, 协调级和执行级三个层次, 其
中执行级是面向设备参数的基础自动化级, 在
这一级不存在结构性的不确定性, 可以用常规
控制理论的方法设计 。 协调级实际上是一个离
散事件动态系统, 主要运用运筹学的方法研究 。
组织级涉及感知环境和追求目标的高层决策等
类似于人类智能的功能, 可以借鉴人工智能的
方法来研究 。 因此, Saridis将 傅京孙 关于智能
控制是人工智能与自动控制相结合的提法发展
为,智能控制是人工 智能, 运筹学和控制系统理
论三者的结合 。
智能控制的发展概述
1985年 8月, IHE在美国纽约召开了第一届
智能控制学术讨论会, 智能控制原理和智能控制
系统的结构这一提法成为这次会议的主要议题 。
这次会议决定, 在 IEEE控制系统学会下设立一
个 IEEE智能控制专业委员会 。 这标志着智能控
制这一新兴学科研究领域的正式诞生 。 智能控制
作为一门独立的学科, 己正式在国际上建立起来 。
智能技术在国内也受到广泛重视, 中国自动化学
会等于 1993年 8月在北京召开了第一届全球华人
智能控制与智能自动化大会, 1995年 8月在天津
召开了智能自动化专业委员会成立大会及首届中
国智能自动化学术会议, 1997年 6月在西安召开
了第二届全球华人智能控制与智能自动化大会 。
智能控制的发展概述
近年来, 智能控制技术在国内外已有
了较大的发展, 己进入工程化, 实用化
的阶段 。 但作为一门新兴的理论技术,
它还处在一个发展时期 。 然而, 随着人
工智能技术, 计算机技术 的迅速发展,
智能控制必将迎来它的发展新时期 。
Chapter 2 Fuzzy Control
Fuzzy Control,The Basics
?Overview
?Fuzzy Control,A Tutorial
Introduction
?General Fuzzy System
?Simple Design Example,The Inverted
Pendulum
?Simulation of Fuzzy Control System
Questions
? Why do we select fuzzy controllers in many
real-world systems?
? How much of the success can be attributed to
the use of the mathematical model and
conventional control design approach?
? How much should be attributed to the clever
heuristic tuning that the control engineer uses
upon implementation?
? If we exploit the use of heuristic information
throughout the entire design process,can we
obtain higher performance control systems?
? How do we design a fuzzy controller?
Questions
? Whether do we need a model in fuzzy
control?
? What are the performance evaluation of
fuzzy control?
? What should we pay attention in fuzzy
controller design?
2.1 Overview
What is the motivation for turning to fuzzy control?
Basically,the difficult task of modeling and
simulating complex real world systems for
control systems development,especially when
implementation issues are considered,is well
documented,Even if a relatively accurate
model of a dynamic system can be developed,
it is often too complex to use in controller
development,especially for many conventional
control design procedures that require
restrictive assumptions for the plant (e.g.,
linearity),
It is for this reason that in practice conventional
controllers are often developed via simple
models of the plant behavior that satisfy the
necessary assumptions,and via the ad
hoc(special) tuning of relatively simple linear
or nonlinear controllers,Regardless,it is well
understood (although sometimes forgotten)
that heuristics enter the conventional control
design process as long as you are concerned
with the actual implementation of the control
system,It must be acknowledged,moreover,
that conventional control engineering
approaches that use appropriate heuristics to
tune the design have been relatively
successful,
You may ask the following questions,How
much of the success can be attributed to the
use of the mathematical model and
conventional control design approach,and
how much should be attributed to the clever
heuristic tuning that the control engineer
uses upon implementation? And if we exploit
the use of heuristic information throughout
the entire design process,can we obtain
higher performance control systems?
Fuzzy control provides a formal methodology
for representing,manipulating,and
implementing a human's heuristic knowledge
about how to control a system,
In this section we seek to provide a
philosophy of how to approach the
design of fuzzy controllers,The fuzzy
controller block diagram is given in
Figure 2.1,where we show a fuzzy
controller embedded in a closed-loop
control system,The plant outputs are
denoted by y(t),its inputs are denoted
by u (t),and the reference input to the
fuzzy controller is denoted by r (t),
Fuzzy controller
F
u
z
z
i
f
i
c
a
t
i
o
n
D
e
f
u
z
z
i
f
i
c
a
t
i
o
n
Inference
mechanism
Rule-base
Process
Inputs
u (t)
Outputs
y (t)
Reference input
r (t)
Figure 2.1 Fuzzy controller architecture,
Basically,you should view the fuzzy
controller as an artificial decision maker
that operates in a closed-loop system in
real time,It gathers plant output data y(t),
compares it to the reference input r (t),
and then decides what the plant input u(t)
should be to ensure that the performance
objectives,will be met,
The fuzzy controller has four main components,
(1) The "rule-base" holds the knowledge,in
the form of a set of rules,of how best to
control the system,(2) The inference
mechanism evaluates which control rules are
relevant at the current time and then decides
what the input to the plant should be,(3) The
fuzzification interface simply modifies the
inputs so that they can be interpreted and
compared to the rules in the rule-base,(4)
the defuzzification interface converts the
conclusions reached by the inference
mechanism into the inputs to the plant,
How do we design a fuzzy controller?
To design the fuzzy controller,the control
engineer must gather information on how the
artificial decision maker should act in the
closed-loop system,Sometimes this
information can come from a human decision
maker who performs the control task,while at
other times the control engineer can come to
understand the plant dynamics and write down
a set of rules about how to control the system
without outside help,These "rules" basically
say,"If the plant output and reference input are
behaving in a certain manner,then the plant
input should be some value." A whole set of
such "If-Then" rules is loaded into the rule-base,
and an inference strategy is chosen,then the
system is ready to be tested to see if the
closed-loop specifications are met,
This brief description provides a very high
level overview of how to design a fuzzy
control system,Below we will expand
on these basic ideas and provide more
details on this procedure and its
relationship to the conventional control
design procedure,
?Modeling Issues and Performance
Objectives
? Fuzzy Controller Design
? Performance Evaluation
?Application Areas
2.1.1 Modeling Issues and
Performance Objectives
Whether do we need a model in fuzzy control?
People working in fuzzy control often say that
"a model is not needed to develop a fuzzy
controller,and this is the main advantage of
the approach." However,will a proper
understanding of the plant dynamics be
obtained without trying to use first principles
of physics to develop a mathematical model?
And will a proper understanding of how to
control the plant be obtained without
simulation-based evaluations that also need
a model?
We always know roughly what process we are
controlling (e.g,we know whether it is a
vehicle or a nuclear reactor),and it is often
possible to produce at least an approximate
model,so why not do this? For a safety-
critical application,if you do not use a formal
model,then it is not possible to perform
mathematical analysis or simulation-based
evaluations,Is it wise to ignore these
analytical approaches for such applications?
Clearly,there will be some applications where
you can simply "hack" together a controller
(fuzzy or conventional) and go directly to
implementation,
In such a situation there is no need for a
formal model of the process; however,
is this type of control problem really so
challenging that fuzzy control is even
needed? Could a conventional
approach (such as PID control) or a
"table look-up" scheme work just as
well or better,especially considering
implementation complexity?
Overall,when you carefully consider the
possibility of ignoring the information
that is frequently available in a
mathematical model,it is clear that it
will often be unwise to do so,Basically,
then,the role of modeling in fuzzy
control design is quite similar to its role
in conventional control system design,
In fuzzy control there is a more
significant emphasis on the use of
heuristics,but in many control
approaches (e.g,PID control for process
control) there is a similar emphasis,
Basically,in fuzzy control there is a focus
on the use of rules to represent how to
control the plant rather than ordinary
differential equations (ODE),This
approach can offer some advantages in
that the representation of knowledge in
rules seems more lucid and natural to
some people,For others,though,the
use of differential equations is more
clear and natural,Basically,there is
simply a "language difference" between
fuzzy and conventional control,ODEs
are the language of conventional
control,and rules are the language of
fuzzy control,
The performance objectives and design
constraints are the same as the ones
for conventional control that we
summarized above,since we still want
to meet the same types of closed-loop
specifications,The fundamental
limitations that the plant provides affect
our ability to achieve high-performance
control,and these are still present just
as they were for conventional control
(e.g,nonminimum phase or unstable
behavior still presents challenges for
fuzzy control),
2.1.2 Fuzzy Controller Design
How do we design a fuzzy controller?
Fuzzy control system design essentially
amounts to (1) choosing the fuzzy controller
inputs and outputs,(2) choosing the
preprocessing that is needed for the
controller inputs and possibly
postprocessing that is needed for the
outputs,and (3) designing each of the four
components of the fuzzy controller shown in
Figure 1.2,
As you will see in the next chapter,there
are standard choices for the
fuzzification and defuzzification
interfaces,Moreover,most often the
designer settles on an inference
mechanism and may use this for many
different processes,Hence,the main
part of the fuzzy controller that we
focus on for design to the rule-base,
What is the main task in fuzzy controller
design process?
The rule-base is constructed so that it
represents a human expert "in-the-loop."
Hence,the information that we load into the
rules in the rule-base may come from an
actual human expert who has spent a long
time learning how best to control the
process,In other situations there is no such
human expert,and the control engineer will
simply study the plant dynamics (perhaps
using modeling and simulation) and write
down a set of control rules that makes
sense,
It is clear that anyone who has experience
driving a car can practice regulating the
speed about a desired set-point and load this
information into a rule-base,For instance,one
rule that a human driver may use is "If the
speed is lower than the set-point,then press
down further on the accelerator pedal." A rule
that would represent even more detailed
information about how to regulate the speed
would be "If the speed is lower than the set-
point AND the speed is approaching the set-
point very fast,then release the accelerator
pedal by a small amount."
This second rule characterizes our
knowledge about how to make sure that
we do not over shoot our desired goal
(the set-point speed),Generally
speaking,if we load very detailed
expertise into the rule-base,we
enhance our chances of obtaining
better performance,
2.1.3 Performance Evaluation
What are the performance evaluation of fuzzy
control?
Each and every idea on performance evaluation
for conventional controllers applies here as
well,The basic reason for this is that a fuzzy
controller is a non linear controller—so many
conventional modeling,analysis (via
mathematics,simulation,or experimentation),
and design ideas apply directly,
Since fuzzy control is a relatively new
technology,it is often quite important to
determine what value it has relative to
conventional methods,Unfortunately,few
have performed detailed comparative
analyses between conventional and
intelligent control that have taken into
account a wide array of available
conventional methods (linear,nonlinear,
adaptive,etc.); fuzzy control methods (direct,
adaptive,supervisory); theoretical,
simulation,and experimental analyses;
computational issues; and so on,
What should we pay attention in fuzzy
controller design?
Moreover,most work in fuzzy control to
date has focused only on its
advantages and has not taken a critical
look at what possible disadvantages
there could be to using it (hence the
reader should be cautioned about this
when reading the literature),For
example,the following questions are
cause for concern when you employ a
strategy of gathering heuristic control
knowledge,
? Will the behaviors that are observed by a
human expert and used to construct the
fuzzy controller include all situations that
can occur due to disturbances,noise,or
plant parameter variations?
? Can the human expert realistically and
reliably foresee problems that could arise
from closed-loop system instabilities or limit
cycles?
? Will the human expert be able to effectively
incorporate stability criteria and performance
objectives (e.g.,rise-time,overshoot,and
tracking specifications) into a rule-base to
en sure that reliable operation can be
These questions may seem even more
troublesome (1) if the control problem involves
a safety-critical environment where the failure
of the control system to meet performance
objectives could lead to loss of human life or
an environmental disaster,or (2) if the human
expert's knowledge implemented in the fuzzy
controller is somewhat inferior to that of the
very experienced specialist we would expect to
design the control system (different designers
have different levels of expertise),
Clearly,then,for some applications there is a
need for a methodology to develop,implement,
and evaluate fuzzy controllers to ensure that
they are reliable in meeting their performance
specifications,This is the basic theme and
Fuzzy systems have been used in a wide variety
of applications in engineering,science,
business,medicine,psychology,and other
fields,For instance,in engineering some
potential application areas include the
following,
? Aircraft/spacecraft,Flight control,engine
control,avionic systems,failure diagnosis,
navigation,and satellite attitude control,
? Automated highway systems,Automatic
steering,braking,and throttle control for
vehicles,
? Automobiles,Brakes,transmission,suspension,
and engine control,
2.1.4 Application Areas
? Manufacturing systems,Scheduling and
deposition process control,
? Power industry,Motor control,power
control/distribution,and load estimation,
? Process control,Temperature,pressure,
and level control,failure diagnosis,
distillation column control,and
desalination processes,
? Robotics,Position control and path
planning,
This list is only representative of the
range of possible applications for the
methods of this book,Others have
already been studied,while still others
The primary goal of control engineering is
to distill and apply knowledge about how
to control a process so that the resulting
control system will reliably and safely
achieve high-performance operation,In
this chapter we show how fuzzy logic
provides a methodology for representing
and implementing our knowledge about
how best to control a process,
2.2 Fuzzy Control,A
Tutorial Introduction
Questions
?How do we choose fuzzy controller
inputs and outputs?
?How do we put control knowledge in
to rule-bases? How do we quantify
the knowledge in fuzzy controller
design? Why do that?
What are a fuzzy controller composed?
A block diagram of a fuzzy control
system is shown in Figure 2.1,The
fuzzy controller is composed of the
following four elements,
Figure 2.2 Fuzzy Control
模糊控制器






推理机
规则库
过程
输入
u (t)
输出
y (t)
参考输入
r (t)
1,A rule-base (a set of If-Then rules),which
contains a fuzzy logic quantification of the
expert's linguistic description of how to achieve
good control,
2,An inference mechanism (also called an
"inference engine" or "fuzzy inference" module),
which emulates the expert's decision making in
interpreting and applying knowledge about how
best to control the plant,
3,A fuzzification interface,which converts
controller inputs into information that the
inference mechanism can easily use to activate
and apply rules,
4,A defuzzification interface,which converts the
conclusions of the inference mechanism into
actual inputs for the process,
We introduce each of the components of the
fuzzy controller for a simple problem of
balancing an inverted pendulum on a cart,as
shown in Figure 1.3,Here,y denotes the
angle that the pendulum makes with the
vertical (in radians),l is the half-pendulum
length (in meters),and u is the force input
that moves the cart (in Newtons),We will use
r to denote the desired angular position of
the pendulum,The goal is to balance the
pendulum in the upright position (i.e.,r = 0)
when it initially starts with some nonzero
angle off the vertical (i.e.,y≠ 0),
Figure2.3 Inverted pendulum on a cart
This is a very simple and academic nonlinear
control problem,and many good techniques
already exist for its solution,Indeed,for this
standard configuration,a simple PID controller
works well even in implementation,
In the remainder of this section,we will use the
inverted pendulum as a convenient problem to
illustrate the design and basic mechanics of
the operation of a fuzzy control system,We
will also use this problem in Section 2.4 to
discuss much more general issues in fuzzy
control system design that the reader will find
useful for more challenging applications (e.g.,
the ones in the next chapter),
2.2.1 Choosing Fuzzy Controller
Inputs and Outputs
How do we choose fuzzy controller inputs and
outputs?
Consider a human-in-the-loop whose
responsibility is to control the pendulum,as
shown in Figure 2.3,The fuzzy controller is to
be designed to automate how a human expert
who is successful at this task would control the
system,First,the expert tells us (the designers
of the fuzzy controller) what information she or
he will use as inputs to the decision-making
process,
Suppose that for the inverted pendulum,
the expert (this could be you!) says that
she or he will use
And
as the variables on which to base
decisions,Certainly,there are many
other choices (e.g.,the integral of the
error e could also be used) but this
choice makes good intuitive sense,
? ? ? ? ? ?e t r t y t??
? ?d etdt
Next,we must identify the controlled variable,For
the inverted pendulum,we are allowed to
control only the force that moves the cart,so
the choice here is simple,
For more complex applications,the choice of the
inputs to the controller and outputs of the
controller (inputs to the plant) can be more
difficult,Essentially,you want to make sure that
the controller will have the proper information
available to be able to make good decisions and
have proper control inputs to be able to steer
the system in the directions needed to be able
to achieve high-performance operation,
Practically speaking,access to
information and the ability to effectively
control the system often cost money,If
the designer believes that proper
information is not available for making
control decisions,he or she may have
to invest in another sensor that can
provide a measurement of another
system variable,Alternatively,the
designer may implement some filtering
or other,processing of the plant
outputs,
Figure 2.3 Human controlling an inverted pendulum
on a cart
倒立摆
r yu
In addition,if the designer determines that the
current actuators will not allow for the
precise control of the process,he or she may
need to invest in designing and
implementing an actuator that can properly
affect the process,Hence,while in some
academic problems you may be given the
plant inputs and outputs,in many practical
situations you may have some flexibility in
their choice,These choices affect what
information is available for making on-line
decisions about the control of a process and
hence affect how we design a fuzzy
controller,
Once the fuzzy controller inputs and
outputs are chosen,you must
determine what the reference inputs are,
For the inverted pendulum,the choice
of the reference input r = 0 is clear,In
some situations,however,you may
want to choose r as some nonzero
constant to balance the pendulum in the
off-vertical position,To do this,the
controller must maintain the cart at a
constant velocity so that the pendulum
will not fall,
Figure 2.4 Fuzzy controller for an inverted pendulum on a
cart
模糊控制器 倒立摆
?
d
dt
r
u y
e
-
+
After all the inputs and outputs are
defined for the fuzzy controller,we can
specify the fuzzy control system,The
fuzzy control system for the inverted
pendulum,with our choice of inputs
and outputs,is shown in Figure 2.4,
Now,within this framework we seek to
obtain a description of how to control
the process,We see then that the
choice of the inputs and outputs of the
controller places certain constraints on
the remainder of the fuzzy control
design process,
If the proper information is not provided
to the fuzzy controller,there will be little
hope for being able to design a good
rule-base or inference mechanism,
Moreover,even if the proper
information is available to make control
decisions,this will be of little use if the
controller is not able to properly affect
the process variables via the process
inputs,It must be understood that the
choice of the controller inputs and
outputs is a fundamentally important
part of the control design process,
2.2.2 Putting Control Knowledge
into Rule-Bases
How do we put control knowledge into rule-bases?
Suppose that the human expert shown in Figure
2.3 provides a description of how best to
control the plant in some natural language (e.g.,
English or Chineses),We seek to take this
"linguistic" description and load it into the
fuzzy controller,as indicated by the arrow in
Figure 2.4,
? Linguistic description
? Rules
? Rule-bases
Linguistic Descriptions
linguistic variables
The linguistic description provided by the
expert can generally be broken into several
parts,There will be "linguistic variables" that
describe each of the time-varying fuzzy
controller inputs and outputs,For the
inverted pendulum,
"error" describes e(t)
"change-in-error" describes
"force" describes u(t)
()d etdt
Note that we use quotes to emphasize
that certain words or phrases are
linguistic descriptions,and that we
have added the time index to,for
example,e(t),to emphasize that
generally e varies with time,There
are many possible choices for the
linguistic descriptions for variables,
Some designers like to choose them
so that they are quite descriptive for
documentation purposes,
()detdt
However,this can sometimes lead to long
descriptions,Others seek to keep the
linguistic descriptions as short as
possible (e.g.,using "e(t)" as the
linguistic variable for e(t )),yet accurate
enough so that they adequately
represent the variables,Regardless,the
choice of the linguistic variable has no
impact on the way that the fuzzy
controller operates; it is simply a
notation that helps to facilitate the
construction of the fuzzy controller via
fuzzy logic,
linguistic values
Just as e(t) takes on a value of,for examples
0.1 at
t = 2 (e(2) = 0.1),linguistic variables assume
"linguistic values", That is,the values that
linguistic variables take on overtime change
dynamically,Suppose for the pendulum
example that "error," "change-in-error ",and
"force" take on the following values,
"neglarge"
"negsmall"
"zero"
"possmall"
"poslarge"
Note that we are using "negsmall" as an
abbreviation for "negative small in size" and
so on for the other variables,Such
abbreviations help keep the linguistic
descriptions short yet precise,For an even
shorter description we could use integers,
"-2" to represent "neglarge"
"-1" to represent "negsmall"
"0" to represent "zero"
"1" to represent "possmall",
"2" to represent "poslarge"
This is a particularly appealing choice for the
linguistic values since the descriptions are
short and nicely represent that the variable
we are concerned with has a numeric quality,
We are not,for example,associating "-1" with
any particular number of radians of error; the
use of the numbers for linguistic descriptions
simply quantifies the sign of the error (in the
usual way) and indicates the size in relation
to the other linguistic values,We shall find
the use of this type of linguistic value quite
convenient and hence will give it the special
name,"linguistic-numeric value."
The linguistic variables and values
provide a language for the expert to
express her or his ideas about the
control decision-making process in the
context of the framework established by
our choice of fuzzy controller inputs and
outputs,
Recall that for the inverted pendulum r =
0 and e = r - y so that and
ey??
ddey
d t d t??
since, First,we will study how
we can quantify certain dynamic
behaviors with linguistics,In the next
subsection we will study how to
quantify knowledge about how to
control the pendulum using linguistic
descriptions,
0d rdt ?
For the inverted pendulum each of the
following statements quantifies a different
configuration of the pendulum,
? The statement "error is poslarge" can
represent the situation where the
pendulum is at a significant angle to the
left of the vertical,
? The statement"error is negsmall" can
represent the situation where the
pendulum is just slightly to the right of
the vertical,but not too close to the
vertical to justify quantifying it as ''zero"
and not too far away to justify quantifying
it as "neglarge."
? The statement "error is zero" can represent the
situation where the pendulum is very near the
vertical position (a linguistic quantification is
not precise,hence we are willing to accept any
value of the error around e(t) = 0 as being
quantified linguistically by "zero" since this can
be considered a better quantification than
"possmall" or "negsmall“),
? The statement "error is poslarge and change-in-
error is possmall" can represent the situation
where the pendulum is to the left of the vertical
and,since,the pendulum is moving away from
the upright position (note that in this case the
pendulum is moving counterclockwise),
Overall,we see that to quantify the dynamics of
the process we need to have a good
understanding of the physics of the
underlying process we are trying to control,
While for the pendulum problem,the task of
coming to a good understanding of the
dynamics is relatively easy,this is not the
case for many physical processes,
Quantifying the process dynamics with
linguistics is not always easy,and certainly a
better understanding of the process dynamics
generally leads to a better linguistic
quantification,Often,this win naturally lead to
a better fuzzy controller provided that you can
adequately measure the system dynamics so
that the fuzzy controller can make the right
Rules
Next,we will use the above linguistic
quantification to specify a set of rules (a rule-
base) that captures the expert's knowledge
about how to control the plant,In particular,
for the inverted pendulum in the three
positions shown in Figure 2.5,we have the
following rules,
1,If error is neglarge and change-in-error is
neglarge Then force is poslarge
Figure 2.5 Inverted pendulum in various
positions
This rule quantifies the situation in Figure 2.5(a)
where the pendulum has a large positive angle and
is moving clockwise; hence it is clear that we
should apply a strong positive force so that we can
try to start the pendulum moving in the proper
direction,
2,If error is zero and change-in-error is possmall
Then force is negsmall
This rule quantifies the situation in Figure 2.5(b)
where the pendulum has nearly a zero angle with
the vertical and is moving counterclockwise; hence
we should apply a small negative force (to the left)
to counteract the movement so that it moves
toward zero,
3,If error is poslarge and change-in-error is
negsmall Then force is negsmall
This rule quantifies the situation in Figure
2.5(c) where the pendulum is far to the left
of the vertical and is moving clockwise;
hence we should apply a small negative
force (to the left) to assist the movement,
but not a big one since the pendulum is
already moving in the proper direction,
Each of the three rules is a "linguistic rule"
since it is formed solely from linguistic
variables and values,Since linguistic values
are not precise representations of the
underlying quantities that they describe,
linguistic rules are not precise either,They
are simply abstract ideas about how to
achieve good control that could mean
somewhat different things to different people,
They are,however,at a level of abstraction
that humans are often comfortable with in
terms of specifying how to control a process,
The general form of the linguistic rules listed
above is
If premise Then consequent
The premises (which are sometimes called
"antecedents") are associated with the fuzzy
controller inputs and are on the left-hand-
side of the rules,The consequents
(sometimes called "actions") are associated
with the fuzzy controller outputs and are on
the right-hand-side of the rules,
Notice that each premise (or consequent)
can be composed of the conjunction of
several "terms" (e.g.,in rule 3 above "error
is poslarge and change-in-error is
negsmall" is a premise that is the
conjunction of two terms),The number of
fuzzy controller inputs and outputs places
an upper limit on the number of elements in
the premises and consequents,Note that
there does not need to be a premise
(consequent) term for each input (output) in
each rule,although often there is,
Rule-Bases
Using the above approach,we could
continue to write down rules for the
pendulum problem for all possible
cases,
Note that since we only specify a finite
number of linguistic variables and
linguistic values,there is only a finite
number of possible rules,
For the pendulum problem,with two inputs and
five linguistic values for each of these,there
are at most 52 = 25 possible rules (all possible
combinations of premise linguistic values for
two inputs),
A convenient way to list all possible rules for the
case where there are not too many inputs to
the fuzzy controller is to use a tabular
representation,A tabular representation of one
possible set of rules for the inverted pendulum
is shown in Table 2.1,Notice that the body of
the table lists the linguistic-numeric
consequents of the rules,and the left column
and top row of the table contain the linguistic-
numeric premise terms,
Table 2.1 Rule Table for Inverted
Pendulum
, force”
u
,change-in-error” ?
-2 -1 0 1 2
,erro
r”
e
-2 2 2 2 1 0
-1 2 2 1 0 -1
0 2 1 0 -1 -2
1 1 0 -1 -2 -2
2 0 -1 -2 -2 -2
Then,for instance,the (2,-1) position (where the
"2" represents the row having "2" for a
numeric-linguistic value and the "-1"
represents the column having "-1" for a
numeric-linguistic value) has a -1 ("negsmall")
in the body of the table and represents the
rule,
If error is poslarge and change-in-error is negsmall
Then force is negsmall
which is rule 3 above,Table 2.1 represents
abstract knowledge that the expert has about
how to control the pendulum given the error
and its derivative as inputs,
Notice the diagonal of zeros and viewing
the body of the table as a matrix we see
that it has a certain symmetry to it,This
symmetry that emerges when the rules
are tabulated is no accident and is
actually a representation of abstract
knowledge about how to control the
pendulum; it arises due to a symmetry in
the system's dynamics,We will actually
see later that similar patterns will be
found when constructing rule-bases for
more challenging applications,and we
will show how to exploit this symmetry in
implementing fuzzy controllers,
2.2.3 Fuzzy Quantification of
Knowledge
How do we quantify the knowledge in fuzzy
controller design? Why do that?
Up to this point we have only quantified,in an
abstract way,the knowledge that the human
expert has about how to control the plant,Next,
we will show how to use fuzzy logic to fully
quantify the meaning of linguistic descriptions
so that we may automate,in the fuzzy controller,
the control rules specified by the expert,
? Membership functions
? Fuzzifiction
Membership Functions
First,we quantify the meaning of the linguistic
values using "membership functions."
Consider,for example,Figure 2.6,This is a plot
of a function versus e(t) that takes on special
meaning,The function n quantifies the
certainty that e(t) can be classified
linguistically as "possmall."
To understand the way that a membership
function works,it is best to perform a case
analysis where we show how to interpret it for
various values of e(t),
? If then,indicating that we
are certain that is not
"possmall."
? If then,indicating that we
are halfway certain that is "possmall" (we
are only halfway certain since it
could also be "zero" with some degree of
certainty this value is in a "gray area" in
terms of linguistic interpretation),
? ?et 8?? ? ?8 0.5?? ?
? ? 8et ??
? ?20????? ? 2et ???
? ? 2et ???
If then,indicating that
we are absolutely certain that
is what we mean by "possmall."
? If then,indicating that
we are certain that is not
"possmall",
? ? 0?? ?
? ? 4et ??
? ?et ??
? ?et ??
? ? 4et ??
? ?4 1,0?? ?
FIGURE 2.6 Membership function for linguistic value
"possmall."
4
?
2
?
“po s s m a l l,
?
? ? ? ?,.e t r a d
1, 0
0, 5
The membership function quantifies,in a
continuous manner,whether values of
e(t) belong to the set of values that are
"possmall," and hence it quantifies the
meaning of the linguistic statement
"error is possmall." This is why it is
called a membership function,It is
important to recognize that the
membership function in Figure 2.6 is
only one possible definition of the
meaning of "error is possmall"; you
could use a bell-shaped function,a
trapezoid,or many others,
FIGURE 2.7(a) A few membership function
choices for representing "error is possmall."
4
?
2
?
“po s s m a l l,
?
? ? ? ?,.e t r a d
1, 0
0, 5
For instance,consider the membership
functions shown in Figure 2.7,For
some application someone may be able
to argue that we are absolutely certain
that any value of e(t) near is still
"possmall" and only when you get
sufficiently far from do we lose our
confidence that it is "possmall." One
way to characterize this understanding
of the meaning of "possmall" is via the
trapezoid-shaped membership function
in Figure 2.7(a),
4?
4?
For other applications you may think of
membership in the,set of "possmall"
values as being dictated by the
Gaussian-shaped membership function
shown in Figure 2.7(b),For still other
applications you may not readily
accept values far away from as
being "possmall," so you may use the
membership function in Figure 2.7(c) to
represent this,Finally,while we often
think of symmetric characterizations of
the meaning of linguistic values,we
are not restricted to these symmetric
representations,
4?
FIGURE 2.7 (b) A few membership function choices for
representing "error is possmall."
4
?
2
?
“po ss ma ll,
?
? ? ? ?,.e t r ad
1, 0
0, 5
FIGURE 2.7(c) A few membership function
choices for representing "error is possmall."
4
?
2
?
“p o s s m a l l,
?
? ? ? ?,.e t r a d
1,0
0, 5
For instance,in Figure 2.7(d) we
represent that we believe that as e(t)
moves to the left of we are very
quick to reduce our confidence that it is
"possmall," but if we move to the right
of our confidence that e(t) is
"possmall," diminishes at a slower rate,
4?
4?
FIGURE 2.7(d) A few membership function
choices for representing "error is possmall."
4
?
2
?
“po s s m a l l,
?
? ? ? ?,.e t ra d
1, 0
0, 5
3
4
?
In summary,we see that depending on the
application and the designer (expert),
many,different choices of membership
functions are possible,It is important to
note that for the most part the definition
of a membership function is subjective
rather than objective,That is,we simply
quantify it in a manner that makes sense
to us,but others,may quantify it in a
different manner,
The set of values that is described by as
being "positive small" is called a
"fuzzy set." Let A denote this fuzzy set,
Notice that from Figure 2.6,we are
absolutely certain that e(t) = is an
element of A,but we are less certain
that e(t) = is an element of A,
Membership in the set,as specified by
the membership function,is fuzzy;
hence we use the term "fuzzy set."
4?
16?
A "crisp" (as contrasted to "fuzzy")
quantification of "possmall" can also
be specified,but via the membership
function shown in Figure 2.8,This
membership function is simply an
alternative representation for the
interval on the real line,
and it indicates that this interval of
numbers represents "possmall."
Clearly,this characterization of crisp
sets is simply another way to represent
a normal interval (set) of real numbers,
? ?8 3 8et????
FIGURE 2.8 Membership function for a crisp
set,
4
?
2
?
?
? ? ? ?,.e t r a d
1, 0
0, 5
While the vertical axis in Figure 2.6
represents certainty,the horizontal axis
is also given a special name,It is called
the "universe of discourse" for the input
e(t) since it provides the range of values
of e(t) that can be quantified with
linguistics and fuzzy sets,In
conventional terminology,a universe of
discourse for an input or output of a
fuzzy system is simply the range of
values the inputs and outputs can take
on,
Now that we know how to specify the
meaning of a linguistic value via a
membership function,we can easily
specify the membership functions for
all 15 linguistic values (five for each
input and five for the output) of our
inverted pendulum example,See Figure
2.9 for one choice of membership
functions,
Notice that we list both the linguistic values
and the linguistic-numeric values associated
with each membership function,Hence,we
see that the membership function in Figure
2.6 for "possmall" is embedded among
several others that describe other sizes of
values (so that,for instance,the membership
function to the right of the one for
"possmall" is the one that represents "error
is poslarge"),Note that other similarly
shaped membership functions make sense
(e.g.,bell-shaped membership functions),
The membership functions at the outer
edges in Figure 2.9 deserve special
attention,For "the inputs and we see
that the outermost membership
functions "saturate" at a value of one,
This makes intuitive sense as at some
point the human expert would just
group all large values together in a
linguistic description such as
"poslarge." The membership functions
at the outermost edges appropriately
characterize this phenomenon since
they characterize "greater than" (for
the right side) and "less than" (for the
left side),
FIGURE 2.9 Membership functions for an
inverted pendulum on a cart,
8
?
4
?
? ? ? ?,.
d
e t r a d
dt
“z e r o,“n e g s m a l l,“n e g l a r g e,
-1-2 0 1 2
“p o s s m a l l,,p o s l a r g e,
8
?
?
4
?
?
16
?
? ? ? ?,u t N
“z e r o,“n e g s m a l l,“n e g l a r g e,
-1-2 0 1 2
“p o s s m a l l,,p o s l a r g e,
302010-10-20-30
4
?
2
?
? ? ? ?,.e t r a d
“z e r o,“n e g s m a l l,“n e g l a r g e,
-1-2 0 1 2
“p o s s m a l l,,p o s l a r g e,
4
?
?
2
?
?
For the output u,the membership
functions at the outermost edges
cannot be saturated for the fuzzy
system to be properly defined,The
basic reason for this is that in decision-
making processes of the type we study,
we seek to take actions that specify an
exact value for the process input,We do
not generally indicate to a process
actuator,"any value bigger than,say,10,
is acceptable."
It is important to have a clear picture in your mind of
how the values of the membership functions
change as,for example,e(t) changes its value
over time,For instance,as e(t) changes from
to we see that various membership functions
will take on zero and nonzero values indicating
the degree to which the linguistic value
appropriately describes the current value of e(t),
For example,at e(t) = we are certain that the
error is "neglarge," and as the value of e(t) moves
toward we become less certain that it is
"neglarge" and more certain that it is "negsmall."
We see that the membership functions quantify
the meaning of linguistic statements that describe
time-varying signals,
2?? 2?
2??
4??
Finally,note that often we will draw all the
membership functions for one input or output
variable on one graph; hence,we often omit the
label for the vertical axis with the understanding that
the plotted functions are membership functions
describing the meaning of their associated linguistic
values,Also,we will use the notation to
represent the membership function associated with
the linguistic value "zero" and a similar notation for
the others,
The rule-base of the fuzzy controller holds the
linguistic variables,linguistic values,their
associated membership functions,and the set of all
linguistic rules (shown in Table 2.1),so we have
completed the description of the simple inverted
pendulum,
zero?
Fuzzification
It is actually the case that for most fuzzy
controllers the fuzzification block in Figure
2.1 can be ignored since this process is so
simple,Fuzzification process is regared as
the act of obtaining a value of an input
variable (e.g.,e(t)) and finding the numeric
values of the membership function(s) that
are defined for that variable,
For example,if e(t) = and,the
fuzzification process amounts to finding the
values of the input membership functions for
these,In this case
(with all others zero) and
Some think of the membership function values as
an "encoding" of the fuzzy controller numeric
input values,The encoded information is then
used in the fuzzy inference process that starts
with "matching."
4?
16?
? ? 16d etdt ??
? ?? ? 1p o s s m a l l et? ?
? ? ? ? 0, 5z e r o p o s s m a l ldde t e td t d t??? ? ? ???? ? ? ?? ? ? ?
2.2.4 Matching,Determining
Which Rules to Use
How do we decide which rules to use?
The inference process generally involves two
steps,
1,The premises of all the rules are compared to
the controller inputs to determine which rules
apply to the current situation,This
"matching" process involves determining the
certainty that each rule applies,and typically
we will more strongly take into account the
recommendations of rules that we are more
certain apply to the current situation,
2,The conclusions are determined using
the rules that have been determined to
apply at the current time,The
conclusions are characterized with a
fuzzy set (or sets) that represents the
certainty that the input to the plant
should take on various values,
?Premise quantification via fuzzy logic
?Determining which rules are on
Premise Quantification via Fuzzy Logic
To perform inference we must first quantify
each of the rules with fuzzy logic,To do
this we first quantify the meaning of the
premises of the rules that are composed of
several terms,each of which involves a
fuzzy controller input,We list two terms
from the premise of the rule,
If error is zero and change-in-error is
possmall Then force is negsmall
FIGURE 2.10 Membership functions of premise
terms,
“e r r o r i s z e r o,
4
?
4
?
?
zero
?
? ? ? ?,.e t r a d
0
“z e r o,
and
quantified with
Change-in-error is possmall
quantified with
8
?
4
?
“p o s s m a l l,
? ? ? ?,/ s e c
d
e t r a d
dt
1, 0
0, 5
16
?
p o s s ma l l
?
1
Above,we had quantified the meaning of the
linguistic terms "error is zero" and "change-
in-error is possmall" via the membership
functions shown in Figure 2.9,Now we seek
to quantify the linguistic premise "error is
zero and change-in-error is possmall." Hence,
the main item to focus on is how to quantify
the logical "and" operation that combines the
meaning of two linguistic terms,While we
could use standard Boolean logic to combine
these linguistic terms,since we have
quantified them more precisely with fuzzy
sets (i.e.,the membership functions),we can
use these,
To see how to quantify the "and" operation,
begin by supposing that e(t) =
and,so that using Figure 2.9 (or
Figure 2.10) we see that
And
What,for these values of e(t) and,is the
certainty of the statement
"error is zero and change-in-error is possmall"
that is the premise from the above rule,We will
denote this certainty by,
8? ? ? 32d etdt ??
? ?? ? 0, 5z e r o et? ?
? ? 0, 2 5p o s s m a l l d etdt? ?? ?????
? ?d etdt
premise?
There are actually several ways to define
it,
? Minimum,Define = min{0.5,0.25} =
0.25,that is,using the minimum of the
two membership values,
? Product,Define = (0.5)(0.25) =
0.125,that is,using the product of the
two membership values,
premise?
premise?
Do these quantifications make sense?
Notice that both ways of quantifying
the "and" operation in the premise
indicate that you can be no more
certain about the conjunction of two
statements than you are about the
individual terms that make them up
(note that for either case),If
we are not very certain about the truth
of one statement,how can we be any
more certain about the truth of that
statement "and" the other statement?
01p re m ise???
While we have simply shown how to quantify
the "and" operation for one value of e(t)
and,if we consider all possible e(t)
and values,we will obtain a
multidimensional membership function
that is a function of e(t) and for each
rule,For our example,if we choose the
minimum operation to represent the "and" in
the premise,then we get the
multidimensional membership function
shown in Figure 2.11,
? ?d etdt
? ?d etdt
? ? ? ?,p r e m i s e de t e tdt? ??????
? ?d etdt
? ? ? ?,p r e m i s e de t e tdt? ??????
Figure 2.11 Membership function of the premise
for a single rule
p r e m is e
?
4
?
4
?
4
?
?
4
?
?
16
?
8
?
? ? ? ?,/ s e c
d
e t r a d
dt
? ? ? ?,e t r a d
Notice that if we pick values for e(t) and,
the value of the premise certainty
represents how certain we are that the rule
If error is zero and change-in-error is
possmall Then force is negsmall
is applicable for specifying the force input to
the plant,As e(t) and change,the
value of
changes according to Figure 2.11,and we
become less or more certain of the
applicability of this rule,
? ? ? ?,p r e m i s e de t e tdt? ??????
? ?d etdt
? ? ? ?,p r e m i s e de t e tdt? ??????
? ?d etdt
In general we will have a different premise
membership function for each of the rules in
the rule-base,and each of these will be a
function of e(t) and so that given specific
values of e(t) and we obtain a
quantification of the certainty that each rule
in the rule-base applies to the current
situation,It is important you picture in your
mind the situation where e(t) and change
dynamically over time,When this occurs the
values of for each rule
change,and hence the applicability of each
rule in the rule-base for specifying the force
input to the pendulum,changes with time,
? ?d etdt
? ?d etdt
? ? ? ?,p r e m i s e de t e tdt? ??????
? ?d etdt
Determining Which Rules Are On
Determining the applicability of each rule
is called "matching." We say that a rule
is "on at time t" if its premise
membership function,
Hence,the inference mechanism seeks
to determine which rules are on to find
out which rules are relevant to the
current situation,In the next step,the
inference mechanism will seek to
combine the recommendations of all the
rules to come up with a single
conclusion,
? ? ? ?,0p r e m i s e de t e tdt? ?? ?????
Consider,for the inverted pendulum
example,how we compute the rules
that are on,Suppose that
And
? ? 0et ?
? ? 0,2 9 48 3 2d etdt ??? ? ?
Figure 2.12 Input membership functions with input
values
4
?
2
?
? ? ? ?,.e t r a d
“zer o”“neg sma ll”“neg lar ge”
-1-2 0 1 2
“pos sma ll”,pos lar ge”
4
?
?
2
?
?
8
?
4
?
? ? ? ?,.
d
e t r a d
dt
“zer o”“neg sma ll”“neg lar ge”
-1-2 0 1 2
“pos sma ll”,pos lar ge”
8
?
?
4
?
?
16
?
Figure 2.12 shows the membership
functions for the inputs and indicates with
thick black vertical lines the values above
for e(t) and, Notice that but
that the other membership functions for
the e(t) input are all "off' (i.e.,their values
are zero),For the input we see
that and
and that all the other membership
functions are off,This implies that rules
that have the premise terms
??detdt
( ( )) 1z e r o et? ?
? ?d etdt
( ( ) ) 0, 2 5z e r o d etdt? ?
( ( ) ) 0, 7 5p o s s m a l l d etdt? ?
"error is zero"
"change-in-error is zero"
"change-in-error is possmall"
are on (all other rules have, So,
which rules are these? Using Table 2.1,we find
that the rules that are on are the following,
1,If error is zero and change-in-error is zero Then
force is zero
2,If error is zero and change-in-error is possmall
Then force is negsmall
? ? ? ?,0p r e m i s e de t e tdt? ?? ?????
Note that since for the pendulum
example we have at most two
membership functions overlapping,we
will never have more than four rules on
at one time (this concept generalizes to
many inputs),Actually,for this system
we will either have one,two,or four
rules on at any one time,To get only
one rule on choose,for example,e(t) =
0 and so that only rule 2 above
is on,
? ? 8d etdt ??
It is useful to consider pictorially which rules
are on,Consider Table 2.2,which is a copy
of Table 2.1 with boxes drawn around the
consequents of the rules that are on (notice
that these are the same two rules listed
above),Notice that since e(t) = 0 (e(t) is
directly in the middle between the
membership functions for "possmall" and
"negsmall") both these membership
functions are off,If we perturbed e(t) slightly
positive (negative),then we would have the
two rules below (above) the two highlighted
ones on also,
TABLE 2.2 Rule Table for the Inverted
Pendulum with Rules That Are "On"
Highlighted,
,force”
u
,change-in-error” ?
-2 -1 0 1 2
,erro
r”
e
-2 2 2 2 1 0
-1 2 2 1 0 -1
0 2 1 0 -1 -2
1 1 0 -1 -2 -2
2 0 -1 -2 -2 -2
With this,you should picture in your
mind how a region of rules that are on
will dynamically move around in the
table as the values of e(t) and
change,This completes our description
of the "matching" phase of the
inference mechanism,
? ?d etdt
2.2.5 Inference Step,Determining
Conclusions
How do we determine conclusions?
Next,we consider how to determine which
conclusions should be reached when the
rules that are on are applied to deciding
what the force input to the cart carrying
the inverted pendulum should be,To do
this,we will first consider the
recommendations of each rule
independently,Then later we will
combine all the recommendations from
all the rules to determine the force input
to the cart,
Recommendation from One Rule
Consider the conclusion reached by the rule
If error is zero and change-in-error is zero Then
force is zero
which for convenience we will refer to as "rule (1)."
Using the minimum to represent the premise,we
have
(the notation represents for rule (1)) so that
we are 0.25 certain that this rule applies to the
current situation,The rule indicates that if its
premise is true then the action indicated by its
consequent should be taken,
? ? ? ?1 m i n 0, 2 5,1 0, 2 5p r e m i s e? ??
? ?1prem ise?
For rule (1) the consequent is "force is zero"
The membership function for this
consequent is shown in Figure 2.13(a),The
membership function for the conclusion
reached by rule (1),which we denote
by,is shown in Figure 2.13(b) and is
given by
? ? ? ?? ?1 m i n 0, 2 5,z e r o u???
? ?1?
This membership function defines the
"implied fuzzy set" for rule (1) (i.e.,it
is the conclusion that is implied by
rule (1)),The justification for the use
of the minimum operator to represent
the implication is that we can be no
more certain about our consequent
than our premise,We could use the
product operation to represent the
implication also,
Notice that the membership function
is a function of u and that the minimum
operation will generally "chop off the top"
of the membership function to
produce, For different values of e(t)
and there will be different values of
the premise certainty
for rule (1) and hence different functions
obtained (i.e.,it will chop off the top at
different points),
? ?? ?1 u?
? ?zero u?
? ?? ?1 u?
? ?d etdt
? ? ? ? ? ?1,p r e m i s e
de t e t
dt?
????
??
? ?? ?1 u?
FIGU RE 2.13 (a) Consequent membership function and (b)
implied fuzzy set with membership function M(i)(?) for
rule (1),Recall that the units for u(t) are Newtons (N),
? ? ? ?,u t N
0
“z e r o,
10-10
? ? ? ?,u t N
0
“z e r o,
10-10
0.25
We see that is in general a time-
varying function that quantifies how
certain rule (1) is that the force input u
should take on certain values,It is most
certain that the force input should lie in
a region around zero (see Figure
2.13(b)),and it indicates that it is certain
that the force input should not be too
large in either the positive or negative
direction—this makes sense if you
consider the linguistic meaning of the
rule,The membership function
quantifies the conclusion reached by
only rule (1) and only for the current e(t)
and,
? ?? ?1 u?
? ?? ?1 u?
? ?d etdt
Recommendation from
Another Rule
Next,consider the conclusion reached by the other
rule that is on,
If error is zero and change-in-error is possmall Then
force is negsmall
which for convenience we will refer to as "rule (2)."
Using the minimum to represent the premise,we
have
so that we are 0.75 certain that this rule applies to
the current situation,Notice that we are much more
certain that rule (2) applies to the current situation
? ? ? ?2 m i n 0, 7 5,1 0, 7 5p r e m i s e? ??
For rule (2) the consequent is "force is
negsmall" (this makes sense,for here
the pendulum is perfectly balanced but
is moving in the counterclockwise
direction with a small velocity),The
membership function for this
consequent is shown in Figure 2.14(a),
The membership function for the
conclusion reached by rule (2),which
we denote by,is shown in Figure
2.14(b) (the shaded region) and is given
by
? ? ? ? ? ?? ?2 m i n 0,7 5,n e g sm a l luu???
? ?2?
This membership function defines the implied
fuzzy set for rule (2) (i.e.,it is the conclusion
that is reached by rule (2)),Once again,for
different values of e(t) and there will be
different values of for rule(2)and
hence different function obtained,Rule (2) is
quite certain that the control output (process
input) should be a small negative value,This
makes sense since if the pendulum has some
counterclockwise velocity then we would want
to apply a negative force (i.e.,one to the left),
As rule (2) has a premise membership function
that has higher certainty than for rule (1),we
see that we are more certain of the conclusion
reached by rule (2),
? ?d etdt ? ? ? ? ? ?2,p r e m i s e de t e tdt? ??????
FIGURE 2.14 (a) Consequent membership function and
(b) implied fuzzy set with membership function for rule
(2),
? ? ? ?,u t N
-1
“negsamll”
-10-20 ? ? ? ?,u t N
-1
“negsamll”
-10-20
0.75
This completes the operations of the inference
mechanism in Figure 2.1,While the input to the
inference process is the set of rules that are on,
its output is the set of implied fuzzy sets that
represent the conclusions reached by all the
rules that are on,For our example,there are at
most four conclusions reached since there are
at most four rules on at any one time,(In fact,
you could say that there are always four
conclusions reached for our example,but that
the implied fuzzy sets for some of the rules
may have implied membership functions that
are zero for all values.)
2.2.6 Converting Decisions into
Actions
Next,we consider the defuzzification operation,
which is the final component of the fuzzy
controller shown in Figure 2.1,Defuzzification
operates on the implied fuzzy sets produced
by the inference mechanism and combines
their effects to provide the "most certain"
controller output (plant input),Some think of
defuzzification as "decoding" the fuzzy set
information produced by the inference
process (i.e.,the implied fuzzy sets) into
numeric fuzzy controller outputs,
To understand defuzzification,it is best
to first draw all the implied fuzzy sets
on one axis as shown in Figure 2.15,
We want to find the one output,which
we denote by that best
represents the conclusions of the fuzzy
controller that are represented with the
implied fuzzy sets,There are actually
many approaches to defuzzification,
crispu
Combining Recommendations
Due to its popularity,we will first consider
the "center of gravity" (COG)
defuzzification method for combining the
recommendations represented by the
implied fuzzy sets from all the rules,Let
bi,denote the center of the membership
function (i.e.,where it reaches its peak for
our example) of the consequent of rule (i),
For our example we have
b1=0.0
and
b2 = -10
as shown in Figure 2.15,Let
denote the area under the membership
function, The COG method
computes to be
(2.1)
This is the classical formula for
computing the center of gravity,In this
case it is for computing the center of
gravity of the implied fuzzy sets,
? ?i??
??i?
? ?
? ?
i iic r i s p
ii
b
u
?
?
? ? ?
? ?
FIGURE 2.15 Implied fuzzy sets,
? ? ? ?,u t N
0
“ze r o,
10-10 20-30 -20 30
-1
“ne g s a m l l,
Three items about Equation (2.1) are
important to note,
1,Practically,we cannot have output
membership functions that have infinite area
since even though they may be "chopped
off' in the minimum operation for the
implication (or scaled for the product
operation) they can still end up with infinite
area,This is the reason we do not allow
infinite area membership functions for the
linguistic values for the controller output
(e.g.,we did not allow the saturated
membership functions at the outermost
edges as we had for the inputs shown in
2,You must be careful to define the input and output
membership functions so that the sum in the
denominator of Equation (2.1) is not equal to zero
no matter what,the inputs to the fuzzy controller are,
Essentially,this means that we must have some
sort of conclusion for all possible control situations
we may encounter,
3,While at first glance it may not appear so,
is easy to compute for our example,For the case
where we have symmetric triangular output
membership functions that peak at one and have a
base width of w,simple geometry can be used to
show that the area under a triangle,chopped off”
at a height of h is equal to
? ?i??
2
2
hh? ?????
??
Given this,the computations needed to compute
are not too significant,
We see that the property of membership
functions being symmetric for the output is
important since in this case no matter whether
the minimum or product is used to represent
the implication,it will be the case that the
center of the implied fuzzy set will be the same
as the center of the consequent fuzzy set from
which it is computed,If the output membership
functions are not symmetric,then their centers,
which are needed in the computation of the
COG,will change depending on the
membership value of the premise,This will
result in the need to recompute the center at
each time instant,
Using Equation (2.1) with Figure 2.15 we have
as the input to the pendulum for the given e(t)
and,
Does this value for a force input (i.e.,6.81 Newtons to
the left) make sense? Consider Figure 2.16,where
we have taken the implied fuzzy sets from Figure
2.15 and simply added an indication of what
number COG defuzzification says is the best
representation of the conclusions reached by the
rules that are on,Notice that the value of is
roughly in the middle of where the implied fuzzy
sets say they are most certain about the value for
? ? ? ? ? ? ? ?0 4, 3 7 5 1 0 9, 3 7 5 6, 8 1
4, 3 7 5 9, 3 7 5c r i s pu
??? ? ?
?
? ?d etdt
crispu
In fact,recall that we had
e{t} = O
and
so the pendulum is in the inverted position
but is moving counterclockwise with a
small velocity; hence it makes sense to pull
on the cart,and the fuzzy controller does
this,
It is interesting to note that for our example it
will be the case that
? ? ? ?8 32 0.2 94d etdt ??? ? ?
2 0 2 0c r i s pu? ? ?
To see this,consider Figure 2.17,where we have
drawn the output membership functions,Notice
that even though we have extended the
membership functions at the outermost edges
past -20 and +20 (see the shaded regions),the
COG method will never compute a value outside
this range,
The reason for this comes directly from the
definition of the COG method in Equation (2.1),
The center of gravity for these shapes simply
cannot extend beyond -20 and +20,Practically
speaking,this ability to limit the range of inputs to
the plant is useful; it may be the case that
applying a force of greater than 20 Newtons is
impossible for this plant,Thus we see that in
defining the membership functions for the fuzzy
controller,we must take into account what method
is going to be used for defuzzification,
FIGURE 2.16 Implied fuzzy sets
6, 81
c r i s p
u ??
? ? ? ?,u t N
0
“z e r o,
10-10
20-30
-20
30
-1
“n e g s a m l l,
FIGURE 2.17 Output membership functions,
? ? ? ?,u t N
“zer o”“neg sma ll”“neg lar ge”
-1-2 0 1 2
“pos sma ll”,pos lar ge”
302010-10-20-30
Other Ways to Compute and
Combine Recommendations
As another example,it is interesting to
consider how to compute,by hand,the
operations that the fuzzy controller takes
when we use the product to represent
the implication or the "center-average"
defuzzification method,
First,consider the use of the product,
Consider Figure 2.18,where we have
drawn the output membership functions
for "negsmall" and "zero" as dotted lines,
The implied fuzzy set from rule (1) is given by the
membership function
shown in Figure 2.18 as the shaded triangle; and
the implied fuzzy set for rule (2) is given by the
membership function
shown in Figure 2.18 as the dark triangle,Notice
that computation of the COG is easy since we
can use as the area for a triangle with base
width w and height h,When we use
product to represent the implication,we obtain
which also makes sense,
? ? ? ? ? ?1 0, 2 5 z e r ouu?? ?
? ? ? ? ? ?2 0, 7 5 n e g s m a l luu?? ?
1
2 h?
? ? ? ? ? ? ? ?0 2, 5 1 0 7, 5 7, 5
2, 5 7, 5c r i s pu
??? ? ?
?
FIGURE 2.18 Implied fuzzy sets when the
product is used to represent the implication,
? ? ? ?,u t N
0
“ze r o,
10-10 20-30 -20 30
-1
“ne g s a m l l,
0.75
0.25
Next,as another example of how to combine
recommendations,we will introduce the
"center-average" method for defuzzification,
For this method we let
(2.2)
where to compute we use,for example,
minimum,We call it the "center-average"
method since Equation (2.2) is a weighted
average of the center values of the output
membership function centers,Basically,the
center-average method replaces the areas of
the implied fuzzy sets that are used in COG
with the values of,
()
()
i pre mise ic ri sp i
pre mise ii
bu ?
??
?
?
()premise i?
()premise i?
This is a valid replacement since the area of the
implied fuzzy set is generally proportional to
since
is used to chop the top off (minimum) or
scale (product) the triangular output membership
function when COG is used for our example,For the
above example,we have
which just happens to be the same value as above,
Some like the center-average defuzzification
method because the computations needed are
simpler than for COG and because the output
membership functions are easy to store since the
only relevant information they provide is their center
values ( ) (i.e.,their shape does not matter,just
their center value),
()p rem ise i?
()p re m ise i?
? ? ? ? ? ? ? ?0 0, 2 5 1 0 0, 7 5 7, 5
0, 2 5 0, 7 5
c r i s pu ??? ? ?
?
ib
Notice that while both values computed for the
different inference and defuzzification methods
provide reasonable command inputs to the
plant,it is difficult to say which is best without
further investigations (e.g.,simulations or
implementation),This ambiguity about how to
define the fuzzy controller actually extends to
the general case and also arises in the
specification of all the other fuzzy controller
components,as we discuss below,Some would
call this "ambiguity" a design flexibility,but
unfortunately there are not too many guidelines
on how best to choose the inference strategy
and defuzzification method,so such flexibility
is of questionable value,
2.2.7 Graphical Depiction of
Fuzzy Decision Making
For convenience,we summarize the procedure
that the fuzzy controller uses to compute its
outputs given its inputs in Figure 2.19,Here,
we use the minimum operator to represent
the "and" in the premise and the implication
and COG defuzzification,Then,repeat the
process when center-average defuzzification
is used with either minimum or product used
for the premise,Also,learn how to picture in
your mind how the parameters of this
graphical representation of the fuzzy
controller operations change as the fuzzy
controller inputs change,
FIGURE 2.19 Graphical representation of fuzzy controller
operations,
? ?et
4
?
4
?
?
“ze r o,
If error is zero and chang-in-error is zero Then force is zero
? ? ? ?,u t N
“ze r o,
10-10
0.25
8
?
8
?
?
“ze r o,
? ?
d
et
dt16
?
If error is zero and chang-in-error is possmall Then force is negsamll
6, 8 1
c r i s p
u ??
? ? ? ?,u t N
“ze r o,
10-10-20
“ne g s a m l l,
? ? ? ?,u t N
-10-20
“ne g s a m l l,
0.75
? ?et
4
?
4
?
?
“ze r o,
8
?
4
?
“po s s m a l l,
? ?
d
et
dt16
?
This completes the description of the
operation of a simple fuzzy controller,
You will find that while we will treat the
fully general fuzzy controller in the next
section,there will
be little that is conceptually different from
this simple example,We simply show
how to handle the case where there are
more inputs and outputs and show a
fuller range of choices that you can make
for the various components of the fuzzy
controller,
As evidenced by the different values obtained by
using the minimum,product,and defuzzification
operations,there are many ways to choose the
parameters of the fuzzy controller that make sense,
This presents a problem since it is almost always
difficult to know how to first design a fuzzy
controller,Basically,the choice of all the
components for the fuzzy controller is somewhat
ad hoc,What are the best membership
functions? How many linguistic values and
rules should there be? Should the minimum or
product be used to represent the "and" in the
premise—and which should be used to
represent the implication? What defuzzification
method should be chosen? These are all
questions that must be addressed if you want to
2.2.8 Visualizing the Fuzzy
Controller's Dynamical Operation
The figure on the cover of the book can serve as
a nice visual depiction of how a fuzzy system
operates dynamically over time,The figure
represents a fuzzy system with two inputs,for
example,e,and,and one output u,There
are triangular membership functions on the
two input universes of discourse,and
minimum is used to represent the conjunction
in the premise,The blue pyramids represent
the premise certainties of the rules in a rule-
base with 49 rules,
e
Note that for simplicity of the graphic,the
outermost membership functions do not
saturate in this fuzzy controller; hence if
e or goes outside the range it appears
that there will be no rules on,so the
defuzzification will fail,Actually,the
pyramids should be viewed as part of a
rule-base with many more rules,and
only the central ones for the rule-base
are shown for simplicity,
e
The shading from blue,to red,to yellow,on the pyramids
indicates progression in time of rules that were (are) on (i.e.,
the pyramids describing their premises had nonzero
certainties) and the two in the middle that are fully shaded in
yellow are the two rules that are on now,The pyramids with
some blue on them,and some red,are ones that were on
some time ago,The ones with red,and some yellow,were
on more recently,while the ones that have a little less red
shading and more yellow were on even more recently,The
pyramids that are entirely blue,either were never turned on,
or they were on a long time ago,Hence,the path of color
(blue to red to yellow) could have traveled all over a large
landscape of blue pyramids,At this time the path has come
very near the e = 0,location in the rule-base and
this is normally where you want it to be (for a tracking
problem where e= r- y where r is the reference input and y
is the plant output we want e = 0 if y is to track r),
0e ?
The colored vertical beam holds the four numbers that are
the premise certainties for the four rules that are on
now,Note that two of the rules that are on,are on with a
certainty
of zero,so really they are off and this is why they go to the
output universe of discourse (top horizontal axis) at the
zero level of certainty (see the top figure with the tan-
colored output membership functions),The colored
vertical beam contains only green and orange since
these represent the values of the premise certainties
from the two rules that are on,The beam does not have
any purple or pink in it as these colors represent the
zero values of the premises of the two rules that are off
(we have constructed the rule-base so that there are at
most four rules on at any time),The green and orange
values chop the tops off two triangular output
membership functions that then become the implied
fuzzy sets (i.e.,we use minimum to represent the
implication),The defuzzified value is shown as the
2.3 General Fuzzy Systems
In the previous section we provided an intuitive overview of
fuzzy control via a simple example,In this section we will
take a step back and examine the more general fuzzy
system to show the range of possibilities that can be used
in defining a fuzzy system and to solidify your
understanding of fuzzy systems,In particular,we will
consider the case where there are many fuzzy controller
inputs and outputs and where there are more general
membership functions,fuzzification procedures,
inference strategies,and defuzzification methods,
Moreover,we introduce a class of "functional fuzzy
systems" that have been found to be useful in some
applications and characterize the general capabilities of
fuzzy systems via the "universal approximation property."
2.3.1 Linguistic Variables,Values,
and Rules
A fuzzy system is a static nonlinear mapping
between its inputs and outputs (i.e.,it is not a
dynamic system),It is assumed that the fuzzy
system has inputs,where i = 1,2,...,n
and outputs,where i = 1,2,...,m,as shown
in Figure 2.20,The inputs and outputs are
"crisp"—that is,they are real numbers,not fuzzy
sets,The fuzzification block converts the
crisp inputs to fuzzy sets,the inference
mechanism uses the fuzzy rules in the rule-
base to produce fuzzy conclusions (e.g.,the
implied fuzzy sets),and the defuzzification
block converts these fuzzy conclusions into
the crisp outputs,
iiuU? iiyY?
Figure 2.20 Fuzzy System
F
u
z
z
i
f
i
c
a
t
i
o
n
D
e
f
u
z
z
i
f
i
c
a
t
i
o
n
Inference
mechanism
Rule-base
Crisp
inputs
Fuzzified
inputs
Fuzzy
conclusions
Crisp
outputs
.
.
.
.
.
.
1
u
2
u
n
u
m
y
1
y
2
y
Universes of Discourse
The ordinary ("crisp") sets and are called the
"universes of discourse" for and,
respectively (in other words,they are their
domains),In practical applications,most often the
universes of discourse are simply the set of real
numbers or some interval or subset of real
numbers,Note that sometimes for convenience
we will refer to an "effective" universe of discourse
where and are the points at which the
outermost membership functions saturate for input
universes of discourse,or the points beyond which
the outputs will not move for the output universe of
discourse,
iU iY
? ?,?? ? ?
iu i
y
For example,for the e(t) universe of discourse
in Figure 2.12 we have and ; or
for the u(t) universe of discourse in Figure
2.17,we have and,
However,the actual universe of discourse
for both the input and output membership
functions for the inverted pendulum is the
set of all real numbers,When we refer to
effective universes of discourse,we will say
that the "width" of the universe of discourse
is,
2???? 2?? ?
20? ?? 20? ?
???
Linguistic Variables
To specify rules for the rule-base,the
expert will use a "linguistic description";
hence,linguistic expressions are needed
for the inputs and outputs and the
characteristics of the inputs and outputs,
We will use "linguistic variables"
(constant symbolic descriptions of what
are are in general time-varying quantities)
to describe fuzzy system inputs and
outputs,
~
iu
For our fuzzy system,linguistic variables
denoted by are used to describe
the inputs ui, Similarly,linguistic
variables denoted by are used to
describe outputs yi, For instance,an
input to the fuzzy system may be
described as ="position error" or
="velocity error," and an output from
the fuzzy system may be ="voltage
in."
~
iu
~
1u
~
2u
~
1y
~
iy
Linguistic Values
Just as ui and yi take on values over each universe of
discourse Ui and Yi,respectively,linguistic variables
and,take on "linguistic values" that are used to
describe characteristics of the variables,Let denote the
jth linguistic value of the linguistic variable,defined
over the universe of discourse Ui, If we assume that there
exist many linguistic values defined over Ui,then the
linguistic variable,takes on the elements from the set
of linguistic values denoted by
(sometimes for convenience we will let the j indices take on
negative integer values,as in the inverted pendulum
example where we used the linguistic-numeric values),
~
iu
~
iy
~j
iA
~
iu
~
iu
~ {, 1,2,,}j
i i iA A j N??
Similarly,let denote the jth linguistic value of the
linguistic variable defined over the universe of
discourse Yi,The linguistic variable,takes on
elements from the set of linguistic values denoted
by
(sometimes for convenience we will let the p indices
take on negative integer values),Linguistic values
are generally descriptive terms such as "positive
large," "zero," and "negative big" (i.e.,adjectives),
For example,if we assume that denotes the
linguistic variable "speed," then we may assign
= "slow," = "medium," and = "fast" so that
has a value from
~
iy
~
iy
~~, 1,2,.,,,p
i i iB B p M
??????
??
~
iu
~ ~ ~~ 1 2 3
1 1 1 1,,A A A A
??? ??
??
~3
1A
~2
1A
~1
1A
~
1u
~j
iB
Linguistic Rules
The mapping of the inputs to the outputs for a
fuzzy system is in part characterized by a
set of condition action rules,or in modus
ponens (If-Then) form,
If premise Then consequent,(2.3)
Usually,the inputs of the fuzzy system are
associated with the premise,and the
outputs are associated with the
consequent,
These If-Then rules can be represented in
many forms,Two standard forms,multi-input
multi-output (MIMO) and multi-input single-
output (MISO),are considered here,The
MISO form of a linguistic rule is
(2.4)
It is an entire set of linguistic rules of this form
that the expert specifies on how to control
the system,
~ ~ ~ ~~ ~ ~ ~
1 1 2 2,,j k l pn n q qI f u i s A a n d u i s A a n d a n d u i s A T h e n y i s B
Note that if ="velocity error" and ="positive
large," then, is,,
a single term in the premise of the rule,means
"velocity error is positive large." It can be
easily shown that the MIMO form for a rule
(i.e.,one with consequents that have terms
associated with each of the fuzzy controller
outputs) can be decomposed into a number
of MISO rules using simple rules from logic,
~
1u ~
1
jA
~
1u
~
1
jA
For instance,the MIMO rule with n inputs and m =
2 outputs
is linguistically (logically) equivalent to the two rules
This is the case since the logical "and" in the
consequent of the MIMO rule is still represented
in the two MISO rules since we still assert that
both the first "and" second rule are valid,
~ ~ ~ ~ ~~ ~ ~ ~ ~
1 1 2 2 1 1 2 2,,
j k l r s
nnI f u i s A a n d u i s A a n d a n d u i s A T h e n y i s B a n d y i s B
~ ~ ~ ~~ ~ ~ ~
1 1 2 2 1 1,,
j k l r
nnI f u i s A a n d u i s A a n d a n d u i s A T h e n y i s B
~ ~ ~ ~~ ~ ~ ~
1 1 2 2 2 2,,
j k l s
nnI f u i s A a n d u i s A a n d a n d u i s A T h e n y i s B
For implementation,we would specify two fuzzy systems,
one with output y1 and the other with output y2,The
logical "and" in the consequent of the MIMO rule is still
represented in the MISO case since by implementing
two fuzzy systems we are asserting that 'ones set of
rules is true "and" another is true,
We assume that there are a total of R rules in the rule-
base numbered 1,2..,R,and we naturally assume that
the rules in the rule-base are distinct (i.e.,there are no
two rules with exactly the same premises and
consequents); however,this does not in general need
to be the case,For simplicity we will use tuples
to denote the MISO rule of the form given in Equation (2.4),
Any of the terms associated with any of the inputs for
any MISO rule can be included or omitted,
? ?,,,;,ij k l p q
For instance,suppose a fuzzy system has two inputs
and one output with = "position," =
"velocity," and = "force." Moreover,suppose
each input is characterized by two linguistic values
= "small" and = 'large" for i = 1,2,Suppose
further that the output is characterized by two
linguistic values = "negative" and =
"positive." A valid If-Then rule could be
If position is large Then force is positive
even though it does not follow the format of a MISO
rule given above,In this case,one premise term
(linguistic variable) has been omitted from the If-
Then rule,We see that we allow for the case
where the expert does not use all the linguistic
terms (and hence the fuzzy sets that characterize
them) to state some rules,
~
1u
~
1y
~
2u
~1
iA
~2
iA
~1
1B
~2
1B
Finally,we note that if all the premise terms
are used in every rule and a rule is formed
for each possible combination of premise
elements,then there are
rules in the rule-base,For example,if n = 2
inputs and we have Ni=11 membership
functions on each universe of discourse,then
there are
11 *11 = 121 possible rules,Clearly,in this
case the number of rules
12
1
n
in
i
N N N N
?
??
2.3.2 Fuzzy Sets,Fuzzy Logic,
and the Rule-Base
Fuzzy sets and fuzzy logic are used to
heuristically quantify the meaning of
linguistic variables,linguistic values,
and linguistic rules that are specified
by the expert,The concept of a fuzzy
set is introduced by first defining a
"membership function."
Membership Functions
Let denote a universe of discourse
and,denote a specific linguistic value
for the linguistic variable, The function
associated with that maps to [0,1] is
called a "membership function." This
membership function describes the
"certainty" that an element of denoted
with a linguistic description,may be
classified linguistically as,
iU
~ ~j
iiAA?
~
iu
? ?iu?
~j
iA iU
~
iu
~j
iA
iU
Membership functions are subjectively
specified in an ad hoc (heuristic) manner
from experience or intuition,
For instance,if = [-150,150],="velocity
error," and ="positive large," then
may be a bell-shaped curve that peaks at
one at = 75 and is near zero when
< 50 or > 100,Then if ui = 75,= 1,
so we are absolutely certain that ui is
"positive large." If ui = -25 then is very
near zero,which represents that we are
very certain that ui,is not "positive large."
iU
~
iu
~j
iA
? ?75?
? ?iu?
~
iu ~iu
~
iu
? ?25? ?
Clearly,many other choices for the shape
of the membership function are possible
(e.g.,triangular and trapezoidal shapes),
and these will each provide a different
meaning for the linguistic values that
they quantify,See Figure 2.21 for a
graphical illustration of a variety of
membership functions and Tables 2.3
and 2.4 for a mathematical
characterization of the triangular and
Gaussian membership functions (other
membership functions can be
characterized with mathematics using a
similar approach),
Figure 2.21 Some typical membership
functions
?
i
u
T r i angula r m em ber shi p f unct i ons
L ef t
? ?
1
m a x 0,1
0.5
L
L
L
L
i f u c
u
cu
othe rw i se
w
?
? ?
?
?
??? ?
?
??
?
???
C ent er s ? ?
m a x 0,1
0.5
m a x 0,1
0.5
C
uc
i f u c
w
u
cu
ot herw i s e
w
?
?? ??
??
??
?
? ? ?
?
?
???
?
?
??
?
???
R i ght
? ?
m a x 0,1
0.5
1
R
R
R R
uc
i f u c
u w
othe rw i se
?
? ?? ?
??
? ? ?
?
? ??
?
?
T A B L E 2.3 Mat hem at i cal C har act er i zat i on of T r i angula r Mem ber shi p F unct i ons
Gaus s i a n m e m be r s hi p f unc t i ons
Le ft
? ?
2
1
1
e x p
2
L
L
L
L
if u c
u
uc
o the rwise
?
?
? ?
?
?
???
??? ?
???
???
??
??
? ???
Cen t e r s ? ?
2
1
e xp
2
L
uc
u?
?
??
???
?? ??
??
??
??
??
Ri ght
? ?
2
1
e xp
2
1
R
R
R R
uc
if u c
u
othe rw is e
? ?
? ??
?? ?
? ????
? ??
???
? ??
??
?
??
T AB L E 2,4 M a t he m a t i c a l Cha r a c t e r i z a t i on of Ga us s i a n M e m be r s hi p F unc t i ons
For practice,you should sketch the
membership functions that are described
in Tables 2.3 and 2.4,Notice that for Table
2.3 specifies the "saturation point" and
specifies the slope of the nonunity and
nonzero part of, Similarly,for, For
notice that c is the center of the triangle
and w is the base-width,Analogous
definitions are used for the parameters in
Table 2.4,
LC
L?
L?
R? C?
In Table 2.4,for the "centers" case note that
this is the traditional definition for the
Gaussian membership function,This
definition is clearly different from a standard
Gaussian probability density function,in both
the meaning of c and,and in the scaling of
the exponential function,Recall that it is
possible that a Gaussian probability density
function has a maximum value achieved at a
value other than one; the standard Gaussian
membership function always has its peak
value at one,
?
Fuzzy Sets
Given a linguistic variable with a linguistic value
defined on the universe of discourse,and
membership function (membership function
associated with the fuzzy set ) that maps to
[0,1],a "fuzzy set" denoted with is defined as
(2.5)
(notice that a fuzzy set is simply a crisp set of
pairings of elements of the universe of discourse
coupled with their associated membership values),
~
iu
~j
iA
iU
? ?ji iA u?
jiA
? ?? ?? ?,:jiji i i i iAA u u u U???
iU
For example,suppose we assign a linguistic
variable = "temperature" and the
linguistic value = "hot," then is a fuzzy
set whose membership function describes
the degree of certainty that the numeric
value of the temperature,,possesses
the property characterized by,
Additional concepts related to membership
functions and fuzzy sets are covered in the
following,
~
1u
11A~
1A
11uU?
~1
1A
? "Support of a fuzzy set",The set of points
on the universe of discourse where the
membership function value is greater than
zero,
? "α-cut",The set of points on the universe of
discourse where the membership function
value is greater than a,
? "Height" of a fuzzy set or membership
function,The peak value reached by the
membership function,
? "Normal" fuzzy sets,Ones with
membership functions that reach one for at
least one point on the universe of discourse,
? "Convex fuzzy sets ",Ones that satisfy a
certain type of convexity condition that is given
in Equation (2.29) on page 98,
? "Linguistic hedges",Mathematical operations
on membership functions of fuzzy sets that can
be used to change the meaning of the
underlying linguistics,
? "Extension principle",If you are given a
function that maps some domain into some
range and you have membership functions
defined on the domain,the extension principle
shows how to map the membership functions on
the domain to the range,
Fuzzy Logic
Next,we specify some set-theoretic and
logical operations on fuzzy sets,
Fuzzy Subset
Given fuzzy sets and associated with
the universe of discourse,with
membership functions denoted
and,respectively,is defined to
be a "fuzzy subset" of,denoted by,
if for all,
1iA 2iA
? ?2iiUN?
? ?1i iA u? ? ?
2i iA u?
12iiAA? ? ? ? ?12iiiiAAuu???
iiuU?
2iA
1iA
Fuzzy Complement
The complement ("not") of a fuzzy set
with a membership function has a
membership function given
by,
1iA
? ?1i iA u?
? ?11 i iA u??
Fuzzy Intersection (AND)
The intersection of fuzzy sets and,which are
defined on the universe of discourse,is a
fuzzy set denoted by,with a membership
function defined by either of the following two
methods,
1,Minimum,Here,we find the minimum of the
membership values as in
(2.6)
2,Algebraic Product,Here,we find the product of
the membership values as in
(2.7)
1iA 2iA
iU
12iiAA?
? ? ? ?? ?1 2 1 2m i n,:i i i ii i i iA A A Au u u U? ? ?? ??
? ? ? ?? ?1 2 1 2m i n,i i i ii i i iA A A Au u u U? ? ?? ??
Other methods can be used to represent
intersection (and),but the two listed above
are the most commonly used,Suppose that
we use the notation,or at
other times we will use it to denote the
product (* is sometimes called the
"triangular norm"),Then is a
general representation for the intersection
of two fuzzy sets,In fuzzy logic,
intersection is used to represent the
"and" operation,
? ?* m i n,x y x y?
*x y x y?
? ? ? ?12*iiiiAAuu??
FIGURE 2.22 A membership function for the "and" of
two membership functions,
color
“b l u e and green”
“b l u e,,g r e e n,
For example,if we use minimum to
represent the "and" operation,then
the shaded membership function in
Figure 2.22 is,which is
formed from the two
others( ),This
quantification of "and" provides the
fundamental justification for our
representation of the "and" in the
premise of the rule,
12iiAA? ?
? ? ? ?12iiiiAAu and u??
Fuzzy Union (OR)
The union of fuzzy sets and,which are
defined on the universe of discourse,is a
fuzzy set denoted by,with a membership
function defined by either one of the following
methods,
1,Maximum,Here,we find the maximum of the
membership values as in
(2.8)
2,Algebraic Sum,Here,we find the algebraic sum
of the membership values as in
(2.9)
iU
1iA 2iA
12iiAA?
? ? ? ? ? ?? ?1 2 1 2m a x,:i i i ii i i i iA A A Au u u u U? ? ?? ??
? ? ? ? ? ? ? ? ? ?? ?1 2 1 2 1 2,i i i i i ii i i i i i iA A A A A Au u u u u u U? ? ? ? ?? ? ? ? ?
Other methods can be used to represent union
(or),but the two listed above are the most
commonly used,Suppose that we use the
notation,or at other times we will
use it to denote ( is sometimes
called the "triangular co-norm"),Then
is a general representation for the union of two
fuzzy sets,In fuzzy logic,union is used to
represent the "or" operation,For example,if we
use maximum to represent the "or" operation,
then the shaded membership function in Figure
2.23,is,which is formed from the two
others and, This quantification of
"or" provides the fundamental justification for
the "or" that inherently lies between the rules in
the rule-base (note that we interpret the list of
rules in the rule-base as "If premise-1 Then
consequent-1" or "If premise-2 Then
consequent-2," or so on),
?x y x y x y? ? ? ?
? ? ? ?12iiiiAAuu???
12iiAA? ?
? ?1i iA u? ? ?2i iA u?
? ?m a x,x y x y??
Note that in the case where we form the
"overall implied fuzzy set" (to be defined
more carefully below) this "or" between the
rules is quantified directly with, " as it is
described above,If we use only the
implied fuzzy sets (as we did for the
inverted pendulum problem in the last
section),then the "or" between the rules is
actually quantified with the way the
defuzzification operation works (consider
the way that the COG defuzzification
method combines the effects of all the
individual implied fuzzy sets),
?
FIGURE 2.23 A membership function for the "or" of
two membership functions,
,b l u e,
,g r e e n,
,b l u e o r g r e e n,
c o l o r
Fuzzy Cartesian Product
The intersection and union above are both
defined for fuzzy sets that lie on the same
universe of discourse,The fuzzy Cartesian
product is used to quantify operations on many
universes of discourse,If
are fuzzy sets defined on the universes of
discourse,respectively,their
Cartesian product is a fuzzy set (sometimes called
a "fuzzy relation"),denoted by,with a
membership function defined by
12,,,j k lnA A A
12,,,nU U U
12j k lnA A A? ? ?
? ? ? ? ? ? ? ?2211 1 2 1 2,,* * *j j k lkl nn nn AAA A A Au u u u u u? ? ? ?? ? ? ?
Why the "*" operation is used here?
Basically,it arises from our interpretation of a
standard Cartesian product,which is formed
by taking an element from the first element of
the product "and" the second element of the
product "and" so on,Clearly,in light of this
interpretation,the use of "*" and hence "and"
makes sense,Note that the "ands" used in the
Cartesian product actually represent the
"ands" used in the rule premises since
normally each of the terms in a premise comes
from a different universe of discourse,
Fuzzy Quantification of Rules,
Fuzzy Implications
Next,we show how to quantify the linguistic
elements in the premise and consequent of
the linguistic If-Then rule with fuzzy sets,
For example,suppose we are given the If-
Then rule in MISO form in Equation (2.4),
We can define the fuzzy sets as follows,
(2.10)
? ?? ?
? ?? ?
? ?? ?
? ?? ?
1
2
1 1 1 1 1
2 2 2 2 2
,:
,:
,:
,:
j
k
l
n
p
q
j
A
k
A
l
n n n n nA
p
q q q q qB
A u u u U
A u u u U
A u u u U
B y y y Y
?
?
?
?
??
??
??
??
M
These fuzzy sets quantify the terms in the premise
and the consequent of the given If-Then rule,to
make a "fuzzy implication" (which is a fuzzy
relation)
(2.11)
where the fuzzy sets are defined
in Equation (2.10),Therefore,the fuzzy set is
associated with,and quantifies the meaning of
the linguistic statement, " and
quantifies the meaning of,," Each
rule in the rule-base,which we denote by
is represented with such a fuzzy implication (a
fuzzy quantification of the linguistic rule),
12,,j k l pnqI f A a n d A a n d A T h e n BK
12,,,,j k l pnqA A A a n d BK
1jA
~~
11ju is A
~~ p
qqy is B
pqB
? ?,,,;,,1,2,,,ij k l p q i R?KK
There are two general properties of fuzzy
logic rule-bases that are sometimes
studied,These are "completeness" (i.e.,
whether there are conclusions for every
possible fuzzy controller input) and
"consistency" (i.e.,whether the
conclusions that rules make conflict
with other rules' conclusions),
2.3.3 Fuzzification
Fuzzy sets are used to quantify the information in
the rule-base,and the inference mechanism
operates on fuzzy sets to produce fuzzy sets;
hence,we must specify how the fuzzy system will
convert its numeric inputs,into fuzzy sets (a
process called "fuzzification") so that they can be
used by the fuzzy system,
Let denote the set of all possible fuzzy sets that
can be defined on, Given,
fuzzification transforms ui to a fuzzy set denoted
by defined on the universe of
discourse, This transformation is produced by
the fuzzification operator F defined by
where
iiuU?
*
iU
iU iiuU?
*:
iiF U U?
? ? ? f u ziiF u A?
? fu ziA
iU
Quite often "singleton fuzzification" is
used,which produces a fuzzy set
with a membership function defined by
Any fuzzy set with this form for its
membership function is called a
"singleton." For a picture of a singleton
membership function,see the single
vertical line shown in Figure 2.21,Note
that the discrete impulse function can be
used to represent the singleton
membership function,
*?
i
fuziAU?
?
1
0fuzi
i
A
xu
ot he r w i s e?
??? ?
?
Basically,the reader should simply think of the
singleton fuzzy set as a different
representation for the number ui,Singleton
fuzzification is generally used in
implementations since,without the presence
of noise,we are absolutely certain that,takes
on its measured value (and no other value),
and since it provides certain savings in the
computations needed to implement a fuzzy
system (relative to,for example,"Gaussian
fuzzification," which would involve forming
bell-shaped membership functions about
input points,or triangular fuzzification,which
would use triangles),
Since most practical work in fuzzy control
uses singleton fuzzification,we will also
use it throughout the remainder of this
book,The reasons other fuzzification
methods have not been used very much
are (1) they add computational complexity
to the inference process and (2) the need
for them has not been that well justified,
This is partly due to the fact that very
good functional capabilities can be
achieved with the fuzzy system when only
singleton fuzzification is used,
2.3.4 The Inference Mechanism
What are the basic tasks of the inference
mechanism?
The inference mechanism has two basic tasks,
(1) determining the extent to which each rule is
relevant to the current situation as characterized
by the inputs ui,i = 1,2,...,n (we call this task
"matching"); and (2) drawing conclusions using the
current inputs ui and the information in the rule-
base (we call this task an "inference step"),For
matching note that is the fuzzy set
representing the premise of the ith
rule( ) (there may be more than one
12j k lnA A A? ? ?L
? ?,,,;,ij k l p qK
Matching
Suppose that at some time we get inputs ui,i = 1,2,...,n,
and fuzzification produces
the fuzzy sets representing the inputs,There are then
two basic steps to matching,
Step 1,Combine Inputs with Rule Premises,The first
step in matching involves finding fuzzy sets
with membership functions
(for all j,k,...,l) that combine the fuzzy sets from
fuzzification with the fuzzy sets used in each of the
terms in the premises of the rules,
12? ? ?,,,j k lnA A AK? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
1 1 1
22 2
? ?1 1 1
? ?2 2 2
? ?
*
*
*
j j f u z
k k f u z
l l f u z
n n n
A A A
AA A
n n nA A A
u u u
u u u
u u u
? ? ?
? ? ?
? ? ?
?
?
?
M
12? ? ?,,,f u z f u z f u znA A AK
If singleton fuzzification is used,then each of
these fuzzy sets is a singleton that is
scaled by the premise membership function
(e.g.,),
That is,with singleton fuzzification we have
for all i = 1,2,...,n for the given ui inputs so
that
? ?1?1 1 1 1 10jAf or u u and u f or u u?? ? ?
? ? ? ?
? ? ? ?
? ? ? ?
11
22
? 11
? 22
?
jj
kk
ll
nn
AA
AA
nnAA
uu
uu
uu
??
??
??
?
?
?
M
? ?? 1f u zi iA u? ?
We see that when singleton fuzzification
is used,combining the fuzzy sets that
were created by the fuzzification
process to represent the inputs with the
premise membership functions for the
rules is particularly simple,It simply
reduces to computing the membership
values of the input fuzzy sets for the
given inputs (as we had
indicated at the end of Section 2.2.3 for
the inverted pendulum),
12,,,nu u uK
Step 2,Determine Which Rules Are On,In
the second step,we form membership
values for the ith rule's premise (what we
called in the last section on the
inverted pendulum) that represent the
certainty that each rule premise holds for
the given inputs,Define
(2-12)
which is simply a function of the inputs ui,
When singleton fuzzification is used (as it is
throughout this entire book),we have
? ?12,,,inu u u? K
premise?
? ? ? ? ? ? ? ?21 ? ??1 2 1 2,,,* * *j k lni n nAAAu u u u u u? ? ? ??KL
? ? ? ? ? ? ? ?211 2 1 2,,,* * *j k lni n nAAAu u u u u u? ? ? ??KL
We use to represent the certainty
that the premise of rule i matches the
input information when we use
singleton fuzzification,This
is simply a multidimensional certainty
surface,a generalization of the surface
shown in Figure 2.11(P37) for the
inverted pendulum example,It
represents the certainty of a premise of
a rule and thereby represents the
degree to which a particular rule holds
for a given set of inputs,
? ?12,,,inu u u? K
? ?12,,,inu u u? K
Finally,we would remark that sometimes an
additional "rule certainty" is multiplied by,
Such a certainty could represent our a priori
confidence in each rule's applicability and
would normally be a number between zero
and one,If for rule i its certainty is 0.1,we
are not very confident in the knowledge that
it represents; while if for some rule j we let
its certainty be 0.99,we are quite certain
that the knowledge it represents is true,In
this book we will not use such rule certainty
factors,
This concludes the process of matching input
information with the premises of the rules,
i?
Inference Step
How many choices to realize the inference step in fuzzy
control? What about them?
There are two standard alternatives to performing the
inference step,one that involves the use of implied fuzzy
sets (as we did for the pendulum earlier) and the other that
uses the overall implied fuzzy set,
Alternative 1,Determine Implied Fuzzy Sets,Next,the
inference step is taken by computing,for the ith
rule,the "implied fuzzy set" with
membership function
(2.14)
The implied fuzzy set specifies the certainty level that the
output should be a specific crisp output yq within the
universe of discourse Yq,taking into consideration only
rule i,Note that since will vary with time,so
will the shape of the membership functions for each
? ?,,,;,ij k l p qK
?qiB
? ? ? ? ? ?? ?12,,,*ipq qq i n qB By u u u y? ? ?? K
?
q
iB
? ?12,,,inu u u? K
? ??iq qB y?
Alteniative 2,Determine the Overall Implied
Fuzzy Set,Alternatively,the inference mechanism
could,in addition,compute the "overall implied
fuzzy set" with membership function
(2.15)
that represents the conclusion reached considering
all the rules in the rule-base at the same time
(notice that determining can,in general,
require significant computational resources),
Notice that we did not consider this possibility for
the inverted pendulum example for reasons that
will become clearer in the next subsection,Instead,
our COG or center-average defuzzification method
performed the aggregation of the conclusions of all
the rules that are represented by the implied fuzzy
sets,
? ? ? ? ? ? ? ?12? ? ? ? Rq q q qq q q qB B B By y y y? ? ? ?? ? ? ?L
?qB
?qB
Discussion,Compositional Rule of
Inference Using the mathematical
terminology of fuzzy sets,the computation of
is said to be produced by a "sup-star
compositional rule of inference," The "sup" in
this terminology corresponds to the
operation,and the "star" corresponds to *,
"Zadeh's compositional rule of inference" is
the special case of the sup-star
compositional rule of inference when
maximum is used for and minimum is used
for *,
? ??q qB y?
?
?
The overall justification for using the above
operations to represent the inference step lies
in the fact that we can be no more certain
about our conclusions than we are about our
premises,The operations performed in taking
an inference step adhere to this principle,To
see this,you should study Equation (2.14) and
note that the scaling from that is
produced by the premise matching process
will always ensure that
,
The fact that we are no more certain of our
consequents than our premises is shown
graphically in Figure 2.19 where the heights of
the implied fuzzy sets are always less than the
certainty values for all the premise terms,
? ?? ? ? ?? 12s u p,,,iq qy q i nB y u u u?? ?
? ?12,,,inu u u?
Up to this point,we have used fuzzy logic to
quantify the rules in the rule-base,
fuzzification to produce fuzzy sets
characterizing the inputs,and the
inference mechanism to produce fuzzy
sets representing the conclusions that it
reaches after considering the current
inputs and the information in the rule-base,
Next,we look at how to convert this fuzzy
set quantification of the conclusions to a
numeric value that can be input to the
plant,
2.3.5 Defuzzification
A number of defuzzification strategies
exist,and it is not hard to invent
more,Each provides a means to
choose a single output (which we
denote with ) based on either the
implied fuzzy sets or the overall
implied fuzzy set (depending on the
type of inference strategy chosen,
"Alternative 1 or 2," respectively,in
the previous section),
q
crispy
Defuzzification,Implied Fuzzy
Sets As they are more common,we first specify typical
defuzzification techniques for the implied fuzzy
sets,
? Center of gravity (COG),A crisp output is
chosen using the center of area and area of each
implied fuzzy set,and is given by
where R is the number of rules,is the center of
area of the membership function of
associated with the implied fuzzy set for the ith
rule,and
denotes the area
under,
?iqB
q
crispy
? ?
? ?
?1
?1
i
qq
q
i
qq
R q
i q qBi y
c r is p
R
qqBi y
b y d y
y
y d y
?
?
?
?
?
? ?
? ?
qib
pqB
?iqB ? ?,,,;,ij k l p q
? ?? i
qq qqBy
y d y??
? ??iq qB y?
Notice that COG can be easy to compute since it is often easy
to find closed-form expressions for,which is
the area under a membership function (see the pendulum
example in Section 2.2.6 where this amounts to finding the
area of a triangle or a triangle with its top chopped off),
Notice that the area under each implied fuzzy set must be
computable,so the area under each of the output
membership functions (that are used in the consequent of a
rule) must be finite (this is why we cannot "saturate" the
membership functions at the outermost edges of the output
universe of discourse),Also,notice that the fuzzy system
must be defined so that
for all ui or will not be properly defined,This value will be
nonzero if there is a rule that is on for every possible
combination of the fuzzy system inputs and the consequent
fuzzy sets all have nonzero area,
? ?? iqq qqBy y d y??
? ??
1
0i
qq
R
qqBy
i
y d y?
?
?? ?
qcrispy
Center-average,A crisp output is chosen using
the centers of each of the output membership
functions and the maximum certainty of each of the
conclusions represented with the implied fuzzy
sets,and is given by
where "sup" denotes the "supremum" (i.e.,the least
upper bound which can often be thought of as the
maximum value),Hence,can simply be
thought of as the highest value of (e.g.,
for when product is used to represent the
implication,as shown in Figure 2.18),
q
crispy
? ?? ?
? ?? ?
?1
?1
s u p
s u p
iq
q
q
iq
q
R q
i y qBic r i s p
R
yqBi
by
y
y
?
?
?
?
?
?
?
? ?? ?sup x x?
? ? ? ?? ?1s u p 0, 2 5u u? ?? ?x? ? ?1?
Also,is the center of area of the membership function of
associated with the implied fuzzy set for the ith
rule, Notice that the fuzzy system must be
defined so that
for all ui,Also,note that is often very easy to
compute since if for at least one yq (which is the
normal way to define consequent membership functions),
then for many inference strategies,using Equation (2.14),
we have
which has already been computed in the matching process,
Moreover,the formula for defuzzification is then given by
where we must ensure that for all,
?iqB
? ?,,,;,ij k l p q
qib
? ?? ??
1
s u p 0i
q
q
R
qB
yi
y?
?
??
? ?? ??s u p iq qyqB y?
? ? 1pq qB y? ?
? ?? ? ? ?? 12s u p,,,iq
q
q i nBy y u u u?? ?
? ?
? ?
121
121
,,,
,,,q
R q
i i nc r i s p i
R
ini
b u u uy
u u u
?
?
?
?
? ??
Also note that this implies that the
shape of the membership functions
for the output fuzzy sets does not
matter; hence,you can simply use
singletons centered at the
appropriate positions,
Defuzzification,The Overall
Implied Fuzzy Set
Next,we present typical defuzzification techniques
for the overall implied fuzzy set,
? Max criterion,A crisp output is chosen as the
point on the output universe of discourse yq for
which the overall implied fuzzy set achieves a
maximum—that is,
Here,," returns the value of x that
results in the supremum of the function being
achieved,
q
crispy
?qB
?qB
? ?? ??a r g s up i
q q
q
c risp
qB
y
yy ?
??
? ??
??
? ?x?
? ?? ?a r g s u p x x?
For example,suppose that denotes the
membership function for the overall implied fuzzy set that is
obtained by taking the maximum of the certainty values of
and over all u in Figure 2.18 (i.e.,
per Equation (2.15)),In this
case,,which is the defuzzified value
via the max criterion,
Sometimes the supremum can occur at more than one point
in yq(e.g.,consider the use of the max criterion for the
case where minimum is used to represent the implication,
and triangular membership functions are used on the
output universe of discourse,such as in Figure 2.19),In
this case you also need to specify a strategy on how to
pick only one point for (e.g.,choosing the smallest
value),Often this defuzzification strategy is avoided due to
this ambiguity; however,the next defuzzification method
does offer a way around it,
? ?o v e r a ll u?
??1? ? ?2?
? ? ? ? ? ? ? ? ? ?? ?12m a x,o v e r a l l uu u u? ? ??
? ?? ?a r g s u p 1 0u o v e r a l l u? ??
q
crispy
Mean of maximum,A crisp output is chosen to
represent the mean value of all elements whose
membership in is a maximum,We define as
the supremum of the membership function of
over the universe of discourse yq,Moreover,we
define a fuzzy set with a membership
function defined as
then a crisp output,using the mean of maximum
method,is defined as
(2.17)
where the fuzzy system must be defined so that
q
crispy
?qB max?qb
*? q qBY?
? ? ? ?* m a x? ?10 q
q
B q q
qB
yby
o th e r w is e
?? ? ???
?
??
? ?
? ?
*
*
?
?
qq
q
qq
q q qBy
c r is p
qqBy
y y d y
y
y d y
?
?
?
?
?
? ?*? 0qq qqBy y d y? ??
As an example,suppose that for Figure 2.19 the
two implied fuzzy sets are used to form an
overall implied fuzzy set by taking the maximum
of the two certainty values over all of u (i.e.,
per Equation (2.15)),In this case there is an
interval of u values around -10 where the overall
implied fuzzy set is at its maximum value,and
hence there is an ambiguity about which is the
best defuzzified value,The mean of the
maximum method would pick the value in the
middle of the interval as the defuzzified value,so
it would choose -10,
? ? ? ? ? ? ? ? ? ?? ?12m a x,o v e r a l l uu u u? ? ??
Note that the integrals in Equation (2.17) must be
computed at each time instant since they
depend on,which changes with time,This
can require excessive computational resources
for continuous universes of discourse,For
some types of membership functions,simple
ideas from geometry can be used to simplify
the calculations; however,for some choices of
membership functions,there may be many
subintervals spread across the universe of
discourse where the maximum is achieved,In
these cases it can be quite difficult to compute
the defuzzified value unless the membership
functions are discretized,Complications such
as these often cause designers to choose other
defuzzification methods,
?qB
Center of area (COA),A crisp output is
chosen as the center of area for the
membership function of the overall implied
fuzzy set, For a continuous output
universe of discourse yq,the center of area
output is denoted by
The fuzzy system must be defined so that
for all, Note that,similar to the mean of the
maximum method,this defuzzification
approach can be computationally
q
crispy
?qB
? ?
? ?
?
?
qq
q
qq
q q qBy
c r is p
qqBy
y y d y
y
y d y
?
?
?
?
?
? ?? 0qq qqBy y d y? ??
For instance,we compute the area of the
overall implied fuzzy set
for Figure 2.19,Notice that in this case the
computation is not as easy as just adding
the areas of the two chopped-off triangles
that represent the implied fuzzy sets,
Computation of the area of the overall
implied fuzzy set does not count the area
that the implied fuzzy sets overlap twice;
hence,the area of the overall implied fuzzy
set can in general be much more difficult to
compute in real time,
? ? ? ? ? ? ? ? ? ?? ?12m a x,o v e r a l l uu u u? ? ??
It is important to note that each of the above equations
for defuzzification actually provides a mathematical
quantification of the operation of the entire fuzzy
system provided that each of the terms in the
descriptions are fully defined,
Overall,we see that using the overall implied fuzzy set in
defuzzification is often undesirable for two reasons,(1)
the overall implied fuzzy set is itself difficult to
compute in general,and (2) the defuzzification
techniques based on an inference mechanism that
provides are also difficult to compute,It is for this
reason that most existing fuzzy controllers (including
the ones in this book) use defuzzification techniques
based on the implied fuzzy sets,such as center-
average or COG,
?qB
?qB
2.3.6 Mathematical
Representations of Fuzzy
Systems Notice that each formula for defuzzification in
the previous section provides a mathematical
description of a fuzzy system,There are
many ways to represent the operations of a
fuzzy system with mathematical formulas,
Next,we clarify how to construct and
interpret such mathematical formulas for the
case where center-average defuzzification is
used for MISO fuzzy systems,Similar ideas
apply for some of the other defuzzification
strategies,MIMO fuzzy systems,and the
Takagi-Sugeno fuzzy systems that we
discuss in the next section,
Assume that we use center-average
defuzzification so that the formula
describing how to compute the output is
(2.18)
Notice that we removed the "crisp"
superscript and "q" subscript from y
(compare to Equation (2.16)),Also,we
removed the "q" superscript from,The q
index is no longer needed in both cases
since we are considering MISO systems,so
that while there can be many inputs,there
is only one output,
1
1
R
iii
R
ii
b
y
?
?
?
?
? ?
?
To be more explicit in Equation (2.18),we need to first
define the premise membership functions,in terms
of the individual membership functions that describe
each of the premise terms,Suppose that we use
product to represent the conjunctions in the premise of
each rule,Suppose that we use the triangular
membership functions in Table2.3 where we suppose
that is the "left-" ("right-") most
membership function on the jth input universe of
discourse,In addition,let be the ith "center"
membership function for the jth input universe of
discourse,In this case,to define we simply add
a "j" subscript to the parameters of the "left"
membership function from Table 2.3,In particular,we
use and to denote the jth values of these
parameters,We take a similar approach for the,j =
1,2,...,n,For we use to denote the ith
triangle center (triangle base width) on the jth input
universe of discourse,
i?
? ? ? ?? ?jjLRjjuu??
? ?ijC ju?
? ?jL ju?
j
Lc
j
L?
? ?jR ju?
? ?ijC ju? ? ?iijjc ?
Suppose that we use all possible combinations of
input membership functions to form the rules,and
that each premise has a term associated with each
and every input universe of discourse,A more
detailed description of the fuzzy system in
Equation (2.18) is given by
The first term in the numerator is in Equation
(2.18),Here,we have called the "first rule" the one
that has premise terms all described by the
membership functions,j = 1,2.....n,The
second term in the numerator is and it use
on the first universe of discourse and the leftmost
ones on the other universes of discourse (i.e.,j = 2,
3,… n),
? ? ? ? ? ?
? ? ? ? ? ?
1
1
1
1
1 2 112
1
jj
nn CLL
jjjj
C
b u b u u
y
u u u
? ? ?
? ? ?
?? ??? ?? L
L
11b?
? ?jL ju?
22b ? ? ?11 1C u?
Continuing in a similar manner,the sum in the
numerator (and denominator) extends to
include all possible combinations of products
of the input membership functions,and this
fully defines the μi in Equation (2.18),
Overall,we see that because we need to define
rules resulting from all possible combinations
of given input membership functions; of which
there are three kinds (left,center,right),the
explicit mathematical representation of the
fuzzy system is somewhat complicated,To
avoid some of the complications,we first
specify a single function that represents all
three types of input membership functions,
Suppose that on the jth input universe of
discourse we number the input membership
functions from left to right as 1,2,…,Nj,where
Nj is the number of input membership
functions on the jth input universe of
discourse,A single membership function that
represents all three in Table 2.3 is
A similar approach can be used for the
Gaussian membership functions in Table 2.4,
? ? ? ?
? ?
1
1
1
1
m a x 0,1
0.5
m a x 0,1
0.5
j
jj
j j
j j j j
j
j j
j j j
j
N
jj
i
j Nii
j j j ji
i
j Ni
j j ji
if u c and u c
cu
u if u c and u c and u c
uc
if u c and u c and u c
?
?
?
?
?
???
?
??? ?
? ? ?
? ? ? ? ?? ? ?
? ? ???
?
?? ??
??
? ? ? ????
??? ???
Recall that we had used
to denote the ith rule,In this notation the
indices in (the "tuple") (j,k,...,l) range
over,and
specify which linguistic value is used on
each input universe of discourse,
Correspondingly,each index in the tuple
(j,k,...,l) also specifies the linguistic-
numeric value of the input membership
function used on each input universe of
discourse,
? ?,,,;,ij k l p qK
121,1,,1 nj N k N l N? ? ? ? ? ?
Let
denote the output membership function (a
singleton) center for the ith rule (of course,
q = 1 in our MISO case),Note that we use
“i” in the notation
simply as a label for each rule (i.e.,we
number the rules in the rule-base,and i is
this number),
? ?,,,;,ij k l p qb
? ?,,,;,ij k l p qK
Hence,when we are given i,we know the
values of j,k,...,l,p,and q,Because of
this,an explicit description of the fuzzy
system in Equation (2.18) is given by
(2.19)
? ?
12
12
,,,;,
1
1
i
R j k l p q j k l
ni
R j k l
ni
b
y
? ? ?
? ? ?
?
?
? ?
?
K L
L
This formula clearly shows the use of the
product to represent the premise,Notice
that since we use all possible
combinations of input membership
functions to form the rules there are
rules,and hence it takes
(2.20)
parameters to describe the fuzzy system
since there are two parameters for each
input membership function and R output
membership function centers,
1
n
j
j
RN
?
? ?
nn
j1 j1
2 jjNN
? ?
?? ?
For some applications,however,all the
output membership functions are not
distinct,For example,consider the
pendulum example where five output
membership function centers are defined,
and there are R = 25 rules,To define the
center positions so that they
take on only a fixed number of given
values,that is less than R,one approach is
to specify them as a function of the indices
of the input membership functions,What is
this function for the pendulum example?
? ?,,,;,ij k l p qb K
A different approach to avoiding some of
the complications encountered in
specifying a fuzzy system
mathematically is to use a different
notation,and hence a different
definition for the fuzzy system,For this
alternative approach,for the sake of
variety,we will use Gaussian input
membership functions,In particular,for
simplicity,suppose that for the input
universes of discourse we only use
membership functions of the "center"
Gaussian form shown in Table 2.4,
For the ith rule,suppose that the input
membership function is
for the jth input universe of discourse,
Hence,even though we use the same
notation for the membership function,
these centers are different from those
used above,both because we are using
Gaussian membership functions here,
and because the "i" in is the index
for the rules,not the membership
function on the jth input universe of
discourse,
2
1e xp
2
j
j
i
j
i
uc
?
???? ?
?????
????
j
ic
Similar comments can be made about
the,i = 1,2,...,R,j = 1,2,...,n,If we let bi,
i = 1,2,...,R,denote the center of the ith
output membership function for the rule,
use center-average defuzzification,and
product to represent the conjunctions in the
premise,then
(2.21)
j
i?
2
1 1
2
1 1
1
e xp
2
1
e xp
2
j
j
j
j
i
nR j
i ii j
i
nR j
ii j
uc
b
y
uc
?
?
? ?
? ?
????
?
?????
????
????
?
????
?
?????
????
????
? ?
? ?
Note that we do not use the "left" and
"right" versions of the Gaussian
membership functions in Table 2.4 as
this complicates the notation,There are
nR input membership function centers,
nR input membership function spreads,
and R output membership function
centers,Hence,we need a total of
R(2n+1)
parameters to describe this fuzzy system,
Now,while the fuzzy systems in Equations (2.19) and
(2.21) are in general different,it is interesting to
compare the number of parameters needed to describe
a fuzzy system using each approach,In practical
situations,we often have for each j = 1,2,...,n,
and sometimes the number of membership functions
on each input universe of discourse can be quite large,
From Equation (2.20) we can clearly see that large
values of n will result in a fuzzy system with many
parameters (there is an exponential increase in the
number of rules),On the other hand,using the fuzzy
system in Equation (2.21) the user specifies the
number of rules and this,coupled with the number of
inputs n,specifies the total number of parameters,
There is not an exponential growth in the number of
parameters in Equation (2.21) in the same way as there
is in the fuzzy system in Equation (2.19) so you may be
tempted to view the definition in Equation (2.21) as a
better one,Such a conclusion,can,however be
3jN ?
First,the type of fuzzy system defined by Equation
(2.19)is sometimes more natural in control design
when you use triangular membership functions
since you often need to make sure that there will
be no point on any input universe of discourse
where there is no membership function with a
nonzero value, Of course,if you are careful,you
can avoid this problem with the fuzzy system
represented by Equation (2.21) also,Second,
suppose that the number of rules for Equation
(2.21) is the same as that for Equation (2.19),In
this case,the number of parameters needed to
describe the fuzzy system in Equation (2.21) is
? ?n
j1
21jNn
?
?? ???
???
Now,comparing this to Equation (2.20) you see that
for many values of Ni,j = 1,2,...,n,and number of
inputs n,it is possible that the fuzzy system in
Equation (2.21) will require many more
parameters to specify it than the fuzzy system in
Equation (2.19),Hence,the inefficiency in the
representation in Equation (2.19) lies in having all
possible combinations of output membership
function centers,which results in exponential
growth in the number of parameters needed to
specify the fuzzy system,The inefficiency in the
representation in Equation (2.21) lies in the fact
that,in a sense,membership functions on the
input universes of discourse are not reused by
each rule,There are new input membership
functions for every rule,
Generally,it is difficult to know which is the best
fuzzy system for a particular problem,In this
book,we will sometimes (e.g.,in Chapter 5)
use the mathematical representation in
Equation (2.21) because it is somewhat simpler,
and possesses some properties that we will
exploit,At other times we will be implicitly
using the representation in Equation (2.19)
because it will lend to the development of
certain techniques (e.g.,in Chapter 6),In every
case,however,that we use Equation (2.21)
(Equation (2.19)) you may want to consider
how the concepts,approaches,and results
change (or do not change) if the form of the
fuzzy system in Equation (2.19) (Equation
Finally,we would like to recommend that you
practice creating mathematical
representations of fuzzy systems,For
instance,it is good practice to create a
mathematical representation of the fuzzy
controller for the inverted pendulum of the
form of Equation (2.19),then also use
Equation (2.21) to specify the same fuzzy
system,Comparing these two approaches,
and resolving the issues in specifying the
output centers for the Equation (2.19) case,
will help clarify the issues discussed in this
section,
2.3.7 Takagi-Sugeno Fuzzy
Systems
The fuzzy system defined in the previous sections
will be referred to as a "standard fuzzy system."
In this section we will define a "functional fuzzy
system" of which the Takagi-Sugeno fuzzy
system is a special case,
For the functional fuzzy system,we use singleton
fuzzification,and the MISO rule has the form
where "?" simply represents the argument of the
function and the are not output
membership function centers,ig
? ?1 1 2 2I f a n d a n d,,a n d t h e nj k ln n i iu i s A u i s A u i s A b g??% % %% % %K
ib
The premise of this rule is defined the same as it is
for the MISO rule for the standard fuzzy system
in Equation (2.4),The consequents of the rules
are different,however,Instead of a linguistic
term with an associated membership function,in
the consequent we use a function bi=gi(.) (hence
the name "functional fuzzy system") that does
not have an associated membership function,
Notice that often the argument of gi contains the
terms ui,i = 1,2,...,n,but other variables may
also be used,The choice of the function
depends on the application being considered,
Below,we will discuss linear and affine functions
but many others are possible,
For instance,you may want to choose
Virtually any function can be used (e.g.,a
neural network mapping or another fuzzy
system),which makes the functional
fuzzy system very general,
? ? ? ? ? ?
? ? ? ? ? ?
22
,0,1 1,
,1 1,
e x p s i n s i n
i i i i i n n
i i i i n n
b g a a u a u
or
b g a u a u
? ? ? ? ? ?
??? ? ? ? ???
L
L
For the functional fuzzy system we can use an
appropriate operation for representing the
premise (e.g.,minimum or product),and
defuzzification may be obtained using
(2.22)
where is defined in Equation (2.13),It is
assumed that the functional fuzzy system is
defined so that no matter what its inputs are,we
have, One way to view the
functional fuzzy system is as a nonlinear
interpolator between the mappings that are
defined by the functions in the consequents of
the rules,
1
1
R
iii
R
ii
by ?
?
?
?
? ??
i?
1 0
R i
i ?? ??
An Interpolator Between
Linear Mappings
In the case where
(where the are real numbers) the functional fuzzy
system is referred to as a,Takagi-Sugeno fuzzy
system",If,then the mapping is a
linear mapping and if,then the mapping
is called "affine." Often,however,as is standard,
we will refer to the afflne mapping as a linear
mapping for convenience,Overall,we see that
the Takagi-Sugeno fuzzy system essentially
performs a nonlinear interpolation between
linear mappings,
? ?,0,1 1,i i i i i n nb g a a u a u? ? ? ? ? ?L
,jia
,0 0ia ? ? ?ig ?
,0 0ia ?
As an example,suppose that n=1,R = 2,
and that we have rules
with the universe of discourse for u1 given in
Figure 2.24 so that represents
and represents, We have
1
1 1 1 1
2
1 1 2 1
if th e n 2
if th e n 1
u is A b u
u is A b u
??
??
%%
%%
1? 1
1A%
2?
21A%
1 1 2 2
1 1 2 2
12
bby b b?? ??
??
?? ? ?
?
Figure 2.24 Membership functions for Takagi-
Sugeno fuzzy system example,
1
- 1 1
1? 2? 1u
We see that for,so,
which is a line,If,
so,which is a different line,In
between,the output y is an
interpolation between the two lines,Plot y versus
u1 to show how this interpolation is achieved,
Finally,it is interesting to note that if we pick
(i.e.,ai,j=0 for j > 0),then the Takagi-Sugeno fuzzy
system is equivalent to a standard fuzzy system
that uses center-average defuzzification with
singleton output membership functions at ai.0, It
is in this sense that the Takagi-Sugeno fuzzy
system—or,more generally,the functional fuzzy
system—is sometimes referred to as a "general
fuzzy system."
111,0u ??? 11yu??
12 1,0u ?? ? ? 12yu??
111u? ? ?
i,0g ia?
An Interpolator Between Linear
Systems
It is important to note that a Takagi-Sugeno
fuzzy system may have any linear
mapping (affine mapping) as its output
function,which also contributes to its
generality,One mapping that has proven
to be particularly useful is to have a linear
dynamic system as the output function so
that the ith rule has the form
? ? ? ?1 1 2 2 1i f a n d a n d,,a n d t h e n j k l ip p i iz i s A z i s A z i s A x t A x t B u??% % % &% % %K
Here,is the n-
dimensional state (now n is not
necessarily the number of inputs);
is the m-dimensional model input; Ai and
Bi,i = 1,2,...,R are the state and input
matrices of appropriate dimension; and
is the p-dimensional
input to the fuzzy system,
? ? ? ? ? ? ? ?12,,,Tnx t x t x t x t? ???? K
? ? ? ? ? ? ? ?12,,,Tmu t u t u t u t? ????K
? ? ? ? ? ? ? ?12,,,Tpz t z t z t z t??? ?? K
This fuzzy system can be thought of as a
nonlinear interpolator between R linear
systems,It takes the input z(t) and has
an output
? ?
? ? ? ?? ? ? ?? ?
? ?? ?
? ? ? ?? ? ? ? ? ?? ? ? ?
? ? ? ?
1
1
11
11
1
1
,,,,
R
i i ii
i
R
i
i
RR
i
i i i i
ii
T
RR R
i
i
A x t B u t z t
xt
zt
or
x t A z t x t B z t u t
whe re
?
?
??
? ? ? ? ?
?
?
?
??
?
?
?
? ? ? ?
??
? ? ? ?
? ? ? ?
??
????
??
??
?
?
??
?
&
&
KK
If R = 1,we get a standard linear system,Generally,
for R > 1 and a given value of z(t),only certain
rules will turn on and contribute to the output,
Many choices are possible for z(t),For instance,
we often choose
z(t) = x(t),or sometimes z(t)=[xT(t),uT(t)]T,
As an example,suppose that z(t) = x(t),p = n = m =1,
and R = 2 with rules
Suppose that we use μ1and μ2 from Figure 2.24 as
the membership functions for,
respectively (i.e.,we relabel the horizontal axis of
Figure 2.24 with x1),
1211 A a n d A%%
11
1 1 1
22
1 1 1 1
2
2
if is A th e n x x u
if x is A th e n x x u
? ? ?
? ? ?
% &
% &%
In this case Equation (2.23) becomes
If x1(t)>1,then μ1=0 and μ2=1,so the
behavior of the nonlinear system is
governed by
which is the linear system specified by the
second rule above,However,if x1(t) <-1,
then μ1=1 and μ2=0,so the behavior of the
nonlinear system is governed by
which is the linear system specified by the first
rule above,
? ? ? ? ? ?1 1 12x t x t u t? ? ?&
? ? ? ? ? ?1 1 12x t x t u t? ? ?&
? ? ? ? ? ? ? ? ? ?1 1 2 1 1 2 2 122x t x t u t? ? ? ? ?? ? ? ? ?&
For,the Takagi-Sugeno fuzzy
system interpolates between the two linear
systems,We see that for changing values of x1(t),
the two linear systems that are in the consequents
of the rules contribute different amounts,
We think of one linear system being valid on a
region of the state space that is quantified via μ1
and another on the region quantified by μ2 (with a
"fuzzy boundary" in between),For the higher-
dimensional case,we have premise membership
functions for each rule quantify whether the linear
system in the consequent is valid for a specific
region on the state space,As the state evolves,
different rules turn on,indicating that other
combinations of linear models should be used,
Overall,we find that the Takagi-Sugeno fuzzy
system provides a very intuitive representation of
a nonlinear system as a nonlinear interpolation
? ?111xt? ? ?
2.3.8 Fuzzy Systems Are
Universal Approximators
Fuzzy systems have very strong
functional capabilities,That is,if
properly constructed,they can
perform very complex operations
(e.g.,much more complex than those
performed by a linear mapping),
Actually,many fuzzy systems are
known to satisfy the "universal
approximation property",
For example,suppose that we use center-average
defuzzification,product for the premise and
implication,and Gaussian membership functions,
Name this fuzzy system f(u),Then,for any real
continuous function defined on a closed and
bounded set and an arbitrary,there exists a
fuzzy system f(u) such that
Note,however,that all this "universal
approximation property" does is guarantee that
there exists a way to define the fuzzy system f(u)
(e.g.,by picking the membership function
parameters),It does not say how to find the
fuzzy system,which can,in general,be very
difficult,Furthermore,for arbitrary accuracy you
may need an arbitrarily large number of rules,
? ?u?
0? ?
? ? ? ?s u p
u
f u u????
The value of the universal approximation property for
fuzzy systems is simply that it shows that if you work
hard enough at tuning,you should be able to make the
fuzzy system do what you are trying to get done,For
control,practically speaking,it means that there is
great flexibility in tuning the nonlinear function
implemented by the fuzzy controller,Generally,
however,there are no guarantees that you will be able
to meet your stability and performance specifications
by properly tuning a given fuzzy controller,You also
have to choose the appropriate controller inputs and
outputs,and there will be fundamental limitations
imposed by the plant that may prohibit achieving
certain control objectives no matter how you tune the
fuzzy controller (e.g.,a nonminimum phase system
may provide certain limits on the quality of the
performance that can be achieved),
Charpter 2
END
Chapter 4 Adaptive Fuzzy
Control
4.1 Overview
The design process for fuzzy controllers
that is based on the use of heuristic
information from human experts has
found success in many industrial
applications,Moreover,the approach to
constructing fuzzy controllers via
numerical input-output data is
increasingly finding use,
Regardless of which approach is used,however,there are
certain problems that are encountered for practical
control problems,including the following,(1) The
design of fuzzy controllers is performed in an ad hoc
manner so it is often difficult to choose at least some of
the controller parameters,For example,it is sometimes
difficult to know how to pick the membership functions
and rule-base to meet a specific desired level of
performance,(2) The fuzzy controller constructed for
the nominal plant may later perform inadequately if
significant and unpredictable plant parameter variations
occur,or if there is noise or some type of disturbance
or some other environmental effect,Hence,it may be
difficult to perform the initial synthesis of the fuzzy
controller,and if the plant changes while the closed-
loop system is operating we may not be able to
maintain adequate performance levels,
With our heuristic knowledge we could design a fuzzy
controller for the rotational inverted pendulum,However,
we could also do that if a bottle half-filled with water is
attached to the endpoint,the performance of the fuzzy
controller degraded,While we certainly could have tuned
the controller for this new situation,it would not then
perform as well without a bottle of liquid at the endpoint,
It is for this reason that we need a way to automatically
tune the fuzzy controller so that it can adapt to different
plant conditions,Indeed,it would be nice if we had a
method that could automatically perform the whole
design task for us initially so that it would also
synthesize the fuzzy controller for the nominal condition,
In this chapter we study systems that can automatically
synthesize and tune (direct) fuzzy controllers,
There are two general approaches to adaptive
control,the first of which is depicted in Figure
4.1,In this approach the "adaptation
mechanism" observes the signals from the
control system and adapts the parameters of
the controller to maintain performance even if
there are changes in the plant,Sometimes,the
desired performance is characterized with a
"reference model," and the controller then
seeks to make the closed-loop system behave
as the reference model would even if the plant
changes,This is called "model reference
adaptive control" (MRAC)
FIGURE 4.1 direct adaptive controls,
A d a p t a t i o n
m e c h a n i s m
p l a n tc o n t r o l l e r
r ( t )
u ( t )
y ( t )
In Section 4.2 we use a simple example to
introduce a method for direct (model reference)
adaptive fuzzy control where the controller that
is tuned is a fuzzy controller,Next,we provide
several design and implementation case
studies to show how it compares to
conventional adaptive control for a ship
steering application,how to make it work for a
multi-input multi-output (MIMO) fault-tolerant
aircraft control problem,and how it can
perform in implementation for the two-link
flexible robot,
In the second general approach to
adaptive control,which is shown in
Figure 4.2,we use an on-line system
identification method to estimate the
parameters of the plant and a "controller
designer" module to subsequently
specify the parameters of the controller,
If the plant parameters change,the identifier will
provide estimates of these and the controller
designer will subsequently tune the controller,It is
inherently assumed that we are certain that the
estimated plant parameters are equivalent to the
actual ones at all times (this is called the
"certainty equivalence principle"),Then if the
controller designer can specify a controller for
each set of plant parameter estimates,it will
succeed in controlling the plant,The overall
approach is called "indirect adaptive control"
since we tune the controller indirectly by first
estimating the plant parameters (as opposed to
direct adaptive control,where the controller
parameters are estimated directly without first
identifying the plant parameters),
FIGURE 4.2 indirect adaptive controls,
S y s t e m
i d e n t i f i c a t i o n
p l a n tc o n t r o l l e r
r ( t )
u ( t )
y ( t )
C o n t r o l l e r
d e s i g n e r
P l a n t
p a r a m e t e r s
C o n t r o l l e r
p a r a m e t e r s
Upon completing this chapter,the reader
will be able to design a variety of
adaptive fuzzy controllers for practical
applications,The reader should consider
this chapter fundamental to the study of
fuzzy control systems as adaptation
techniques such as the ones presented
in this chapter have proven to be some
of the most effective fuzzy control
methods,
4.2 Fuzzy Model Reference
Learning Control (FMRLC)
A "learning system" possesses the capability to
improve its performance over time by
interacting with its environment,A learning
control system is designed so that its
"learning controller" has the ability to improve
the performance of the closed-loop system by
generating command inputs to the plant and
utilizing feedback information from the plant,
In this section we introduce the "fuzzy model reference
learning controller" (FMRLC),which is a (direct) model
reference adaptive controller,The term "learning" is
used as opposed to "adaptive" to distinguish it from
the approach to the conventional model reference
adaptive controller for linear systems with unknown
plant parameters,In particular,the distinction is drawn
since the FMRLC will tune and to some extent
remember the values that it had tuned in the past,
while the conventional approaches for linear systems
simply continue to tune the controller parameters,
Hence,for some applications when a properly
designed FMRLC returns to a familiar operating
condition,it will already know how to control for that
condition,Many past conventional adaptive control
techniques for linear systems would have to retune
each time a new operating condition is encountered,
FIGURE 4.3 Fuzzy model reference learning controller
The functional block diagram for the FMRLC is
shown in Figure 4.3,It has four main parts,the
plant,the fuzzy controller to be tuned,the
reference model,and the learning mechanism
(an adaptation mechanism),We use discrete
time signals since it is easier to explain the
operation of the FMRLC for discrete time
systems,The FMRLC uses the learning
mechanism to observe numerical data from a
fuzzy control system (i.e.,r(kT) and y(kT)
where T is the sampling period),Using this
numerical data,it characterizes the fuzzy
control system's current performance and
automatically synthesizes or adjusts the fuzzy
controller so that some given performance
objectives are met,
These performance objectives (closed-loop
specifications) are characterized via the
reference model shown in Figure 4.3,In a
manner analogous to conventional MRAC
where conventional controllers are adjusted,
the learning mechanism seeks to adjust the
fuzzy controller so that the closed-loop system
(the map from r(kT) to y(kT)) acts like the given
reference model (the map from r(kT) to ym(kT)),
Basically,the fuzzy control system loop (the
lower part of Figure 6.3) operates to make y(kT)
track r(kT) by manipulating u(kT),while the
upper-level adaptation control loop (the upper
part of Figure 4.3) seeks to make the output of
the plant y(kT) track the output of the reference
model ym(kT) by manipulating the fuzzy
controller parameters,
Next,we describe each component of the
FMRLC in more detail for the case where
there is one input and one output from
the plant (we will use the design and
implementation case studies in Section
4.3 to show how to apply the approach to
MIMO systems),
4.2.1 The Fuzzy Controller
The plant in Figure4.3 has an input u(kT) and
output y(kT),Most often the inputs to the fuzzy
controller are generated via some function of
the plant output y(kT) and reference input r(kT),
Figure 4.3 shows a simple example of such a
map that has been found to be useful in some
applications,For this,the inputs to the fuzzy
controller are the error e(kT) = r(kT) — y(kT)
and change in error
(i.e.,a PD fuzzy controller),
? ? ( ) ( )e k T e k T Tc k T T???
There are times when it is beneficial to place a
smoothing filter between the r(kT) reference input
and the summing junction,Such a filter is
sometimes needed to make sure that smooth and
reasonable requests are made of the fuzzy
controller (e.g.,a square wave input for r(kT) may
be unreasonable for some systems that you know
cannot respond instantaneously),Sometimes,if
you ask for the system to perfectly track an
unreasonable reference input,the FMRLC will
essentially keep adjusting the "gain" of the fuzzy
controller until it becomes too large,Generally,it
is important to choose the inputs to the fuzzy
controller,and how you process r(kT) and
y(kT),properly; otherwise performance can be
adversely affected and it may not be possible to
maintain stability,
Returning to Figure 4.3,we use scaling gains ge,gc
and gu for the error e(kT),change in error c(kT),
and controller output u(kT),respectively,A first
guess at these gains can be obtained in the
following way,The gain ge,can be chosen so that
the range of values that e(kT) typically takes on
will not make it so that its values will result in
saturation of the corresponding outermost input
membership functions,The gain gc can be
determined by experimenting with various inputs
to the fuzzy control system (without the adaptation
mechanism) to determine the normal range of
values that c(kT) will take on,Using this,we
choose the gain so that normally encountered
values of c(kT) will not result in saturation of the
outermost input membership functions,
We can choose gu so that the range of
outputs that are possible is the maximum
one possible yet still so that the input to
the plant will not saturate (for practical
problems the inputs to the plant will
always saturate at some value),Clearly,
this is a very heuristic choice for the
gains and hence may not always work,
Sometimes,tuning of these gains will
need to be performed when we tune the
overall FMRLC,
Rule-Base
The rule-base for the fuzzy controller has rules of
the form
where and denote the linguistic variables
associated with controller inputs e(kT) and c(kT),
respectively,denotes the linguistic variable
associated with the controller output u,
denote the jth (lth) linguistic value associated
with,respectively,denotes the
consequent linguistic value associated with,
j l mI f e i s E a n d c i s C t h e n u i s U
e c
u
jlE a n d C
? ?ec mU
u
Hence,as an example,one fuzzy control rule could
be
If error is positive-large and change-in-error is
negative-small Then plant-input is positive-big
(in this case = "error",= "positive-large",etc.),
We use a standard choice for all the membership
functions on all the input universes of discourse,
such as the ones shown in Figure 4.4,Hence,we
would simply use some membership functions
similar to those in Figure 4.4,but with a scaled
horizontal axis,for the c(kT) input,
e 4E
FIGURE 4.4 Membership functions for input
universe of discourse (figure taken from [112],?
EEEE),
()e k T
EE
E
- 1
- 2
0
1
2
E
E
0, 60, 4
0, 2
- 0, 2- 0, 4- 0, 6
1
- 0, 8
- 1
0, 8 1
E E E
E
- 5
- 3- 4
5
43
E
E
We will use all possible combinations of rules for
the rule-base,For example,we could choose to
have 11 membership functions on each of the
two input universes of discourse,in which
case we would have 112 = 121 rules in the rule-
base,At first glance it would appear that the
complexity of the controller could make
implementation prohibitive for applications
where it is necessary to have many inputs to
the fuzzy controller,However,in Section 2.6,
we explained how implementation tricks can
be used to significantly reduce computation
time when there are input membership
functions of the form shown in Figure 4.4,
Rule-Base Initialization
The input membership functions are defined to
characterize the premises of the rules that define
the various situations in which rules should be
applied,The input membership functions are left
constant and are not tuned by the FMRLC,The
membership functions on the output universe
of discourse are assumed to be unknown,They
are what the FMRLC will automatically
synthesize or tune,Hence,the FMRLC tries to
fill in what actions ought to be taken for the
various situations that are characterized by the
premises,
We must choose initial values for each of the output
membership functions,For example,for an output universe
of discourse [-1,1] we could choose triangular-shaped
membership functions with base widths of 0.4 and centers at
zero,This choice represents that the fuzzy controller initially
knows nothing about how to control the plant so it inputs u
= 0 to the plant initially (well,really it does know something
since we specify the remainder of the fuzzy controller a
priori),Of course,one can often make a reasonable best
guess at how to specify a fuzzy controller that is "more
knowledgeable" than simply placing the output membership
function centers at zero,For example,we could pick the
initial fuzzy controller to be the best one that we can design
for the nominal plant,Notice,however,that this choice is not
always the best one,Really,what you often want to choose
is the fuzzy controller that is best for the operating condition
that the plant will begin in (this may not be the nominal
condition),Unfortunately,it is not always possible to pick
such a controller since you may not be able to measure the
operating condition of the plant,so making a best guess or
simply placing the membership function centers at zero are
common choices,
To complete the specification of the fuzzy
controller,we use minimum or product
to represent the conjunction in the
premise and the implication and the
standard center-of-gravity
defuzzification technique,As an
alternative,we could use appropriately
initialized singleton output membership
functions and center-average
defuzzification,
Learning,Memorization,and
Controller Input Choice
For some applications you may want to use an integral of
the error or other preprocessing of the inputs to the
fuzzy controller,Sometimes the same guidelines that
are used for the choice of the inputs for a nonadaptive
fuzzy controller are useful for the FMRLC,We have
found,however,times where it is advantageous to
replace part of a conventional controller with a fuzzy
controller and use the FMRLC to tune it,In these cases
the complex preprocessing of inputs to the fuzzy
controller is achieved via a conventional controller,
Sometimes there is also the need for postprocessing
of the fuzzy controller outputs,
Generally,however,choice of the inputs also involves
issues related to the learning dynamics of the FMRLC,
As the FMRLC operates,the learning mechanism will
tune the fuzzy controller's output membership
functions,In particular,in our example,for each
different combination of e(kT) and c(kT) inputs,it will
try to learn what the best control actions are,In
general,there is a close connection between what
inputs are provided to the controller and the
controller's ability to learn to control the plant for
different reference inputs and plant operating
conditions,We would like to be able to design the
FMRLC so that it will learn and remember different
fuzzy controllers for all the different plant operating
conditions and reference inputs; hence,the fuzzy
controller needs information about these,
Often,however,we cannot measure the
operating condition of the plant,so the FMRLC
does not know exactly what operating
condition it is learning the controller for,
Moreover,it then does not know exactly when
it has returned to an operating condition,
Clearly,then,if the fuzzy controller has better
information about the plant's operating
conditions,the FMRLC will be able to learn and
apply better control actions,If it does not have
good information,it will continually adapt,but
it will not properly remember,
For instance,for some plants e(kT) and c(kT)
may only grossly characterize the operating
conditions of the plant,In this situation the
FMRLC is not able to learn different controllers
for different operating conditions; it will use its
limited information about the operating
condition and continually adapt to search for
the best controller,It degrades from a learning
system to an adaptive system that will not
properly remember the control actions (this is
not to imply,however,that there will
automatically be a corresponding degradation
in performance),
Generally,we think of the inputs to the fuzzy
controller as specifying what conditions we
need to learn different controllers for,This
should be one guideline used for the choice of
the fuzzy controller inputs for practical
applications,A competing objective is,
however,to keep the number of fuzzy
controller inputs low due to concerns about
computational complexity,In fact,to help with
computational complexity,we will sometimes
use multiple fuzzy controllers with fewer inputs
to each of them rather than one fuzzy
controller with many inputs; then we may,for
instance,sum the outputs of the individual
controllers,
6.2.2 The Reference Model
Next,you must decide what to choose for the
reference model that quantifies the desired
performance,Basically,you want to specify a
desirable performance,but also a reasonable
one,If you ask for too much,the controller will
not be able to deliver it; certain characteristics
of real- world plants place practical constraints
on what performance can be achieved,It is not
always easy to pick a good reference model
since it is sometimes hard to know what level
of performance we can expect,or because we
have no idea how to characterize the
performance for some of the plant output
variables,
In general,the reference model may be
discrete or continuous time,linear or
nonlinear,time-invariant or time-varying,
and so on,For example,suppose that we
would like to have the response track the
continuous time model
? ? 11Gs s? ?
Suppose that for your discrete-time
implementation you use T = 0,1 sec,Using
a bilinear (Tustin) transformation to find the
discrete equivalent to the continuous-time
transfer function G(s),we replace s with
to obtain
Where Ym(z) and R(z) are the z-transform of
ym(kT) and r(kT),respectively,Now,for a
discrete-time implementation we would
choose
21
1
z
Tz
?
?
? ?
? ? ? ?
? ?1 121
19
21
m
zYz
HzRz
z
?
??
?
? ? ? ? ? ? ? ?1 9 1 12 1 2 1 2 1mmy k T T y k T r k T T r k T? ? ? ? ?
This choice would then represent that we
would like our output y(kT) to track a
smooth,stable,first-order type response
of ym(kT),A similar approach can be
used to,for example,track a second-
order system with a specified damping
ratio ζ and undamped natural frequency
ωn,
The performance of the overall system is
computed with respect to the reference
model by the learning mechanism by
generating an error signal
Ye(kT)=ym(kT)-y(kT)
Given that the reference model characterizes design
criteria such as rise-time and overshoot and the
input to the reference model is the reference input
r(kT),the desired performance of the controlled
process is met if the learning mechanism forces
ye(kT) to remain very small for all time no matter
what the reference input is or what plant
parameter variations occur,Hence,the error ye(kT)
provides a characterization of the extent to which
the desired performance is met at time kT,If the
performance is met (i.e.,ye(kT) is small),then the
learning mechanism will not make significant
modifications to the fuzzy controller,On the other
hand if ye(kT) is big,the desired performance is
not achieved and the learning mechanism must
adjust the fuzzy controller,Next,we describe the
operation of the learning mechanism,
4.2.3 The Learning Mechanism
The learning mechanism tunes the rule-base of the direct
fuzzy controller so that the closed-loop system
behaves like the reference model,These rule-base
modifications are made by observing data from the
controlled process,the reference model,and the fuzzy
controller,The learning mechanism consists of two
parts,a "fuzzy inverse model" and a "knowledge-base
modifier." The fuzzy inverse model performs the
function of mapping ye(kT) (representing the deviation
from the desired behavior),to changes in the process
inputs p(kT) that are necessary to force ye(kT) to zero,
The knowledge-base modifier performs the function of
modifying the fuzzy controller's rule-base to affect the
needed changes in the process inputs,
Fuzzy Inverse Model
Using the fact that most often a control engineer will
know how to roughly characterize the inverse
model of the plant,we use a fuzzy system to map
ye(kT),and possibly functions of ye(kT) such as
(or any other closed-loop
system data),to the necessary changes in the
process inputs,This fuzzy system is sometimes
called the "fuzzy inverse model" since information
about the plant inverse dynamics is used in its
specification,Some,however,avoid this
terminology and simply view the fuzzy system in
the adaptation loop in Figure 4.3 to be a controller
that tries to pick p(kT) to reduce the error ye(kT),
This is the view taken for some of the design and
implementation case studies in the next section,
? ? ? ? ? ?? ?1c e ey k T y k T y k T TT? ? ?
Note that similar to the fuzzy controller,the
fuzzy inverse model shown in Figure 4.3
contains scaling gains,but now we denote
them with, We will explain how
to choose these scaling gains below,Given
that are inputs to the fuzzy
inverse model,the rule-base for the fuzzy
inverse model contains rules of the form
Where and denote linguistic values and
denotes the linguistic value associated
with the mth output fuzzy set,
,ecy y pg g a n d g
ecy e y cg y a n d g y
I f a n d t h e nj l me e c cy i s Y y i s Y p i s P
jeY lcY
mP
We often utilize membership functions for the
input universes of discourse as shown in
Figure 4.4,symmetric triangular-shaped
membership functions for the output
universes of discourse,minimum to
represent the premise and implication,and
COG defuzzification,Other choices can
work equally well,For instance,we could
make the same choices,except use
singleton output membership functions and
center-average defuzzification,
Knowledge-Base Modifier
Given the information about the necessary changes in the
input,which are represented by p(kT),to force the error y,
to zero,the knowledge-base modifier changes the rule-
base of the fuzzy controller so that the previously applied
control action will be modified by the amount p(kT),
Consider the previously computed control action u(kT-T),
and assume that it contributed to the present good or bad
system performance (i.e.,it resulted in the value of Y(kT)
such that it did not match ym(kT) ),Hence,for illustration
purposes we are assuming that in one step the plant input
can affect the plant output; in Section 4.2.4 we will explain
what to do if it takes d steps for the plant input to affect the
plant output,
Note that e(kT) and c(kT-T) would have
been the error and change in error that
were input to the fuzzy controller at that
time,By modifying the fuzzy controller's
knowledge-base,we may force the fuzzy
controller to produce a desired output
u(kT-T)+p(kT),which we should have put
in at time kT - T to make ye(kT) smaller,
Then,the next time we get similar values
for the error and change in error,the
input to the plant will be one that will
reduce the error between the reference
model and plant output,
Assume that we use symmetric output
membership functions for the fuzzy
controller,and let bm denote the center of
the membership function associated
with, Knowledge-base modification is
performed by shifting centers bm of the
membership functions of the output
linguistic value that are associated
with the fuzzy controller rules that
contributed to the previous control
action u(kT-T),
mU
mU
This is a two-step process,
1,Find all the rules in the fuzzy controller whose premise
certainty
(4.1)
and call this the "active set" of rules at time kT - T,We
can characterize the active set by the indices of the
input membership functions of each rule that is on
(since we use all possible combinations of rules,there
will be one output membership function for each
possible rule that is on),
2,Let bm(kT) denote the center of the mth output
membership function at time kT,For all rules in the
active set,use
(4.2)
to modify the output membership function centers,Rules
that are not in the active set do not have their output
membership functions modified,
? ? ? ?? ?,0i e k T T c k T T? ? ? ?
? ? ? ? ? ?mmb k T b k T T p k T? ? ?
Notice that for our development,when COG is used,
this update will guarantee that the previous input
would have been u(kT-T)+p(kT) for the same e(kT-
T) and c(kT-T) (to see this,simply analyze the
formula for COG to see that adding the amount
p(kT) to the centers of the rules that were on will
make the output shift by p(kT) ),For the case
where the fuzzy controller has input membership
functions of the form shown in Figure 4.4,there
will only be at most four rules in the active set at
any one time instant (i.e.,four rules with
at time kT ),Then we only need
to update at most four output membership function
centers via Equation (4.2),
? ? ? ?? ?,0i e k T T c k T T? ? ? ?
Example
As an example of the knowledge-base modification
procedure,assume that all the scaling gains for
both the fuzzy controller and the fuzzy inverse
model are one,Suppose that the fuzzy inverse
model produces an output p(kT) = 0.5,indicating
that the value of the output to the plant at time kT -
T should have been u (kT- T) +0.5 to improve
performance (i.e.,to force ).Next,suppose
that e(kT -T) = 0.75 and c(kT - T) = -0.2 and that
the membership functions for the inputs to the
fuzzy controller are given in Figure 4.4,
ey0?
Then rules
are the only rules that are in the active set
(notice that we chose to use the indices for
the rule "1" and "2" simply for convenience),
In particular,from Figure 6.4 we have
,so rules are the only
ones that have their consequent fuzzy sets
(U1,U2) modified,Suppose that at time kT -
T we had and,
3 1 1
1
4 1 2
2
,I f t h e n
,I f t h e n
E i s C U
and
E i s C U
?
?
?
?
120, 2 5 0, 7 5and???? 12and??
? ?1 1b k T T?? ? ?2 3b k T T??
To modify these fuzzy sets we simply shift
their centers according to Equation (4.2)
to get
? ? ? ? ? ?
? ? ? ? ? ?
11
22
1 0.5 1.5
3 0.5 4.5
b k T b k T T p k T
and
b k T b k T T p k T
? ? ? ? ? ?
? ? ? ? ? ?
Learning,Memorization,and
Inverse Model Input Choice
Notice that the changes made to the rule-base are only
local ones,That is,the entire rule-base is not updated
at every time step,just the rules that needed to be
updated to force ye(kT) to zero,Notice that this local
learning is important since it allows the changes that
were made in the past to be remembered by the fuzzy
controller,Recall that the type and amount of memory
depends critically on the inputs to the fuzzy controller,
Different parts of the rule-base are "filled in" based on
different operating conditions for the system (as
characterized by the fuzzy controller inputs),and when
one area of the rule-base is updated,other rules are
not affected,Hence,if the appropriate inputs are
provided to the fuzzy controller so that it can
distinguish between the situations in which it should
behave differently,the controller adapts to new
situations and also remembers how it has adapted to
past situations,
Just as the choice of inputs to the fuzzy controller
has a fundamental impact on learning and
memorization,so does the choice of inputs to the
inverse model,For instance,you may want to
choose the inputs to the inverse model so that it
will adapt differently in different operating
conditions,In one operating condition we may
want to adapt more slowly than in another,In
some operating condition the direction of
adjustment of the output membership function
centers may be the opposite of that in another,If
there are multiple fuzzy controllers,you may want
multiple inverse models to adjust them,This can
sometimes help with computational complexity
since we could then be using fewer inputs per
fuzzy inverse model,
The choice of inputs to the fuzzy inverse
model shown in Figure 4.3 indicates that
we want to adapt differently for different
errors and error rates between the
reference model and plant output,The
inverse model may be designed so that,
for example,if the error is small,then the
adjustments to the fuzzy controller
should be small,and if the error is small
but the rate of error increase is high,
then the adjustments should be larger,It
is rules such as these that are loaded
into the fuzzy inverse model,
6.2.4 Alternative Knowledge-
Base Modifiers
Recall that we had assumed that the plant
input u(kT) would affect the plant output in
one time step so that y(kT + T) would be
affected by u(kT),To remove this
assumption and hence generalize the
approach,let d denote the number of time
steps that it takes for an input to the plant
u(kT) to first affect its output,That is,y(kT
+dT) is affected by u(kT),
To handle this case,we use the same
approach but we go back d steps to modify
the rules,Hence,we use
(4.3)
to form the "active set" of rules at time kT—dT,
To update the rules in the active set,we let
(4.4)
(when d = 1,we get the case in Equations (4.1)
and (4.2)),This ensures that we modify the
rules that actually contributed to the current
output y(kT) that resulted in the performance
characterization ye(kT),
? ? ? ?? ?,0i e k T d T c k T d T? ? ? ?
? ? ? ? ? ?mmb k T b k T d T p k T? ? ?
For applications we have found that we
can most often perform a simple
experiment with the plant to find d (e.g.,
put a short-duration pulse into the plant
and determine how long it takes for the
input to affect the output),and with this
choice we can often design a very
effective FMRLC,However,this has not
always been the case,Sometimes we
need to treat d as a tuning parameter for
the knowledge-base modifier,
There are several alternatives to how the basic
knowledge-base modification procedure can
work that can be used in conjunction with the
d-step back approach,For instance,note that
an alternative to Equation (4.1) would be to
include rules in the active set that have
Where, In this case we will not modify
rules whose premise certainty is below some
given threshold a,This makes some intuitive
sense since we will then not modify rules if the
fuzzy system is not too sure that they should
be on,
? ? ? ?? ?,i e k T d T c k T d T??? ? ?
01???
However,one could argue that any rule
that contributed to the computation of
u(kT - dT) should be modified,This
approach may be needed if you choose
to use Gaussian membership functions
for the input universes of discourse
since it will ensure that you will not have
to modify all the output centers at each
time step,and hence the local learning
characteristic is maintained,
There are also alternatives to the center
update procedure given in Equation (6.2),
For instance,we could choose
so that we scale the amount we shift the
membership functions by the certainty of
their premises,Intuitively,this makes sense
since we will then change the membership
functions from rules that were on more by
larger amounts,and for rules that are not on
as much we will not modify them as much,
? ? ? ? ? ? ? ?? ? ? ?,m m mb k T b k T d T e k T d T c k T d T p k T?? ? ? ? ?
m?
Another modification to the center update law is also
necessary in some practical applications to ensure
that the centers stay in some prespecified range,For
instance,you may want the centers to always be
positive so that the controller will never provide a
negative output,Other times you may want the centers
no larger than some prespecified value to ensure that
the control output will become no larger than this
value,In general,suppose that we know a priori that
the centers should be in the range
[bmin,bmax] where bmin and bmax are given scalars,
We can modify the output center update rule to ensure
that if the centers start in this range they will stay in
the range by adding the following two rules after the
update formula,
In other words,if the centers jump over the boundaries,
they are set equal to the boundary values,
? ? ? ?
? ? ? ?
m in m in
m a x m a x
I f the n
I f the n,
mmb k T b b k T b
b k T b b k T b
??
??
Notice that you could combine the above alternatives to
knowledge-base modification so that we set a threshold for
including rules in the active set,scale the updates to the
centers,bound the updates to the centers,and use any
number of time steps back to form the active set,There are
yet other alternatives that can be used for knowledge-base
modification procedures,For instance,parts of the rule-
base could be left intact (i.e.,We would not let them be
modified),This can be useful when we know part of the
fuzzy controller that is to be learned,we embed this part
into the fuzzy controller that is tuned,and do not let the
learning mechanism change it,Such an approach is used
for the vibration damping problem for the two-link flexible
robot in Section 4.3,As another alternative,when a center
is updated,you could always wait d or more steps before
updating the center again,This can be useful as a more
"cautious" update procedure,It updates,then waits to see
if the update was sufficient to correct the error,before it
updates again,We have successfully used this approach to
avoid inducing oscillations when operating at a set-point,
6.2.5 Design Guidelines for the
Fuzzy Inverse Model
In this section we provide some design
guidelines for the fuzzy inverse model
and its scaling gains,The choice of a
particular fuzzy inverse model is
application-dependent,so we will use the
case studies in Section 4.3 to show how
it is chosen,There are,however,some
general guidelines for the choice of the
fuzzy inverse model that we will outline
here,
First,we note that for a variety of
applications we find that the
specification of the fuzzy inverse model
is not much more difficult than the
specification of a direct fuzzy controller,
In fact,the fuzzy inverse model often
takes on a form that is quite similar to a
direct fuzzy controller,For instance,as
you will see in the case studies in
Section 4.3,the rule-base often has some
typical symmetry properties,
Second,for some practical applications it is
necessary to define the inverse model so that
when the response of the plant is following the
output of the reference model very closely,the
fuzzy inverse model turns off the adaptation,In
this way once the inputs to the fuzzy inverse
model get close to zero,the output of the fuzzy
inverse model becomes zero,We think of this
as forcing the fuzzy inverse model to be
satisfied with the response as long as it is
quite close to the reference model; there is no
need to make it exact in many applications,
Designing this characteristic into the fuzzy
inverse model can sometimes help ensure
stability of the overall closed-loop system,
Another way to implement such a strategy is to directly
modify the output of the fuzzy inverse model by using
the rule,
Where is a small number that is specified a priori,
For typical fuzzy inverse model designs (i.e.,ones
where the size of the output of the fuzzy inverse model
is directly proportional to the size of the inputs to the
fuzzy inverse model),this rule will make sure that
when the inputs to the fuzzy inverse model are in a
region of zero,its output will be modified to zero,
Hence,for small fuzzy inverse model inputs the
learning mechanism will turn off,If,however,the error
between the plant output and the reference input
grows,then the learning mechanism will turn back on
and it will try to reduce the error,Such approaches to
modifying the adaptation on-line are related to
"robustification" methods in conventional adaptive
control,
? ? ? ?I f t he n 0pp k T p k T???
0p? ?
Next,we provide general tuning
procedures for the scaling gains of a
given fuzzy inverse model,For the sake
of discussion,assume that both the
fuzzy controller and fuzzy inverse model
are normalized so that their input and
output effective universes of discourse
are all [-1,1],
Fuzzy Inverse Model Design
Procedure 1
Generally,we have found the following procedure to
be useful for tuning the scaling gains of the
inverse model,
1,Select the gain so that ye(kT) will not saturate
the input membership function certainty (near the
endpoints),This is a heuristic choice since we
cannot know a priori how big ye(kT) will get;
however,we have found that for many
applications intuition about the process can be
quite useful in determining the maximum value,
eyg
2,Choose the gain gp to be the same as for
the fuzzy controller output gain gu, Let
,
3,Apply a step reference input r(kT) that is
of a magnitude that may be typical
during normal operation,
0cyg ?
4,Observe the plant and reference model responses,
There are three cases,
? (a) If there exist unacceptable oscillations in the
plant output response about the reference model
response,then increase (we need additional
derivative action in the learning mechanism to
reduce the oscillations),Go to step 3,
? (b) If the plant output is unable to "keep up" with
the reference model response,then decrease,
Go to step 3,
? (c) If the plant response is acceptable with respect
to the reference model response,then the
controller design is completed,
We will use this gain selection procedure for the ship
steering application in Section 4.3,
eyg
eyg
Fuzzy Inverse Model Design
Procedure 2
For a variety of applications,the above gain
selection procedure has proven to be very
successful,For other applications,however,
it has been better to use an alternative
procedure,In this procedure you pick the
fuzzy controller and inverse model using
intuition,then focus on tuning the scaling
gain gp,which we will call the "adaptation
gain" using an analogy with conventional
adaptive controllers,
The procedure is as follows,
? 1,Begin with gp = 0 (i.e.,with the adaptation
mechanism turned off) and simulate the system,
With a well-designed direct fuzzy controller you
should get a reasonable response,but if there is
good reason to have adaptive control you will find
that the performance is not what you specified in
the reference model (at least for some plant
conditions),
? 2,Choose the gains of the inverse model so that
there is no saturation on its input universes of
discourse,
? 3,Increase gp slightly so that you just turn on the
learning mechanism and it makes only small changes
to the rule-base at each step,For small gp you will
allow only very small updates to the fuzzy controller so
that the learning rate (adaptation rate) will be very slow,
Perform any necessary tuning for the inverse model,
? 4,Continue to increase gp and subsequently tune the
inverse model as needed,With gp large,you increase
the adaptation rate,and hence if you increase it too
much,you can get undesirable oscillations and
sometimes instability,You should experiment and then
choose an adaptation rate that is large enough to make
it so that the FMRLC can quickly adapt to changes in
the plant,yet slow enough so that it does not cause
oscillations and instability,
This design approach is what we will use for the fault-
tolerant aircraft control problem,and it is one that we
have successfully used for several other FMRLC
applications,
This approach has proven to be more
effective than the one in Equation (4.2)
for some applications; however,it is
difficult to determine a priori which
approach to use,We usually try the
scaled approach if the one in Equation
(4.2) does not seem to work well,
particularly if there are some unwanted
oscillations in the system that seem to
result from excessive modification of
output membership function center
positions,
4.3 FMRLC,Design and
Implementation Case Studies
The FMRLC has been used in simulation studies for a
variety of applications,including an inverted pendulum
(translational for swing-up and balancing,and
rotational for balancing); rocket velocity control; a
rigid two-link robot; fault-tolerant control for aircraft;
ship steering; longitudinal and lateral control for
automated highway systems; antilock brake
systems(ABSs); base braking control; temperature,
pressure,and level control in a glass furnace; and
others,It has been implemented for balancing the
rotational inverted pendulum,a ball-on-abeam
experiment,a liquid level control problem,a single-link
flexible robot,the two-link flexible robot,and an
induction machine,
In this section we will study the cargo ship
control problem in simulation,The cargo
ship application helps to illustrate all the
steps in how to design an FMRLC,
Moreover,we design two conventional
adaptive controllers and compare their
performance to that of the FMRLC,
4.3.1 Cargo Ship Steering
To improve fuel efficiency and reduce wear on ship components,
autopilot systems have been developed and implemented for
controlling the directional heading of ships,Often,the autopilots
utilize simple control schemes such as PID control,However,the
capability for manual adjustments of the parameters of the
controller is added to compensate for disturbances acting upon
the ship such as wind and currents,Once suitable controller
parameters are found manually,the controller will generally work
well for small variations in the operating conditions,For large
variations,however,the parameters of the autopilot must be
continually modified,Such continual adjustments are necessary
because the dynamics of a ship vary with,for example,speed,
trim,and loading,Also,it is useful to change the autopilot
control law parameters when the ship is exposed to large
disturbances resulting from changes in the wind,waves,current,
and water depth,Manual adjustment of the controller parameters
is often a burden on the crew,Moreover,poor adjustment may
result from human error,As a result,it is of great interest to have
a method for automatically adjusting or modifying the underlying
controller,
Ship Model
Generally,ship dynamics are obtained by
applying Newton's laws of motion to the
ship,For very large ships,the motion in
the vertical plane may be neglected since
the "bobbing" or,bouncing" effects of
the ship are small for large vessels,The
motion of the ship is generally described
by a coordinate system that is fixed to
the ship [11,149],See Figure 4.5,
FIGURE 4.5 Cargo ship
A simple model of the ship's motion is given
by
(4.5)
Where ψ is the heading of the ship and δ is
the rudder angle,Assuming zero initial
conditions,we can write Equation (4.5) as
(4.6)
Where are parameters that are a
function of the ship's constant forward
velocity u and its length l,
? ? ? ? ? ? ? ? ? ?? ?3
1 2 1 2 1 2
1 1 1 1 Kt t t t t? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ?
? ? ? ? ?? ? ? ?
? ? ? ?
? ?? ? ? ?? ? ? ?3
12
1
11
s K s
s s s s
??
? ? ?
??
??
1 2 3,,,K a n d? ? ?
In particular,
where we assume that for a cargo ship
meters [11],
Also,we will assume that the ship is
traveling in the x direction at a velocity of
5 m/s,
0
0 i= 1,2,3ii
u
KK
l
l
u
??
???
??
??
???
??
??
0 1 0 2 0 3 03, 8 6,5, 6 6,0, 3 8,0, 8 9,1 6 1K a n d a n d l? ? ?? ? ? ? ? ?
In normal steering,a ship often makes only
small deviations from a straight-line path,
Therefore,the model in Equation (4.5) is
obtained by linearizing the equations of
motion around the zero rudder angle (= 0),
As a result,the rudder angle should not
exceed approximately 5 degrees,otherwise
the model will be inaccurate,For our
purposes,we need a model suited for
rudder angles that are larger than 5 degrees;
hence,we use the model proposed in,
This extended model is given by
(4.7)
Where is a nonlinear function of, The
function can be found from the relationship
between in steady state such
that, An experiment known as the
"spiral test" has shown that can be
approximated by
where are real-valued constants such that
is always positive,For our simulations,we choose
the values of both to be one,
? ? ? ? ? ?? ? ? ? ? ?? ?3
1 2 1 2 1 2
1 1 1 1 Kt t H t t t? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ?? ? ? ? ?
? ? ? ?
? ? ? ?
? ?H ? ??t?
? ?H ?
0? ? ?? ? ?
? ?H ?
? ? 3H a b? ? ???
a and b a
a and b
and??
Simulating the Ship,
When we evaluate our controllers,we will use
the nonlinear model in simulation,Note that
to do this we need to convert the nth-order
nonlinear ordinary differential equations
representing the ship to n first-order ordinary
differential equations; for convenience,let
12
12
3
12
11
11
a
b
K
c
??
??
?
??
??
????
??
??
? ??
??
?
And
(this notation is not to be confused with the d-
step delay of Section 4.2.4),We would like
the model in the form
where x(t) = [x1(t),x2(t),x3(t)]T and F = [F1,
F2,F3]T for use in a nonlinear simulation
program,We need to choose,so that Fi
depends only on xi and δ for i = 1,2,3,
12
Kd
???
? ? ? ? ? ?? ?
? ? ? ? ? ?? ?
,
,
x t F x t t
y t G x t t
?
?
?
?
ix
Choose
so that F3 will not depend on and
Choose so that,
Finally,choose,
? ? ? ? ? ?3x t t c t????
? ?ct?
? ? ? ? ? ?3x t t c t????
? ? ? ?2x t t?? ? ? ? ?2x t t??
? ?1xt ??
This gives us
But,so
This provides the proper equations for the
simulation,Next,suppose that the initial
conditions are, This implies
that, For a
discrete-time implementation,we simply
discretize the differential equations,
? ? ? ? ? ? ? ?? ?
? ? ? ? ? ? ? ? ? ?? ?
? ? ? ? ? ?? ? ? ?
1 2 1
2 3 2
3
,
,
x t x t F x t t
x t x t c t F x t t
x t a t bH t d t
?
??
? ? ?
??
? ? ?
? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?233 2 2 2,,t x t c t t x t a n d H x x t x t? ? ?? ? ? ? ?
? ? ? ? ? ?? ? ? ? ? ?? ? ? ?233 3 2x t a x t c t b x t x t d t??? ? ? ? ? ?
? ? ? ? ? ?0 0 0 0??????
? ? ? ? ? ? ? ? ? ? ? ? ? ?1 2 3 30 0 0 0 0 0 0 0x x a n d x c o r x c? ? ?? ? ? ? ? ?
We have
(4.8)
Choose
so that F3 will not depend on and
Choose so that,
? ? ? ? ? ?? ? ? ? ? ?t a t b H t c t d t? ? ? ? ?? ? ? ? ? ?
? ? ? ? ? ?3x t t c t????
??ct?
? ? ? ? ? ?3x t t c t????
? ? ? ?2x t t?? ? ? ? ?2x t t??
Finally,choose, This gives us
But,so
This provides die proper equations for the simulation,
Next,suppose that the initial conditions
are, This implies that
,
For a discrete-time implementation,we simply
discretize the differential equations,
? ?1xt ??
? ? ? ? ? ? ? ?? ?
? ? ? ? ? ? ? ? ? ?? ?
? ? ? ? ? ?? ? ? ?
1 2 1
2 3 2
3
,
,
x t x t F x t t
x t x t c t F x t t
x t a t bH t d t
?
??
? ? ?
??
? ? ?
? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?233 2 2 2,,t x t c t t x t a n d H x x t x t? ? ?? ? ? ? ?
? ? ? ? ? ?? ? ? ? ? ?? ? ? ?233 3 2x t a x t c t b x t x t d t??? ? ? ? ? ?
? ? ? ? ? ?0 0 0 0??????
? ? ? ? ? ? ? ? ? ? ? ? ? ?1 2 3 30 0 0 0 0 0 0 0x x a n d x c o r x c? ? ?? ? ? ? ? ?
FMRLC Design
In this section we explain how to design an
FMRLC for controlling the directional
heading of the cargo ship,The inputs to the
fuzzy controller are the heading error and
change in heading error expressed as
And
respectively,where is the desired ship
heading (T = 5O milliseconds),
? ? ? ? ? ?re k T k T k T????
? ? ? ? ? ?e k T e k T Tc k T T???
? ?r kT?
The controller output is the rudder angle
of the ship,For our fuzzy controller
design,11 uniformly spaced triangular
membership functions are defined for
each controller input,as shown in Figure
4.4,
? ?kT?
The scaling controller gains for the error,change in
error,and the controller output are chosen via the
design procedure to be (since the error e(k T)
can never be over 180° ),gc = 100 (since we
have found via simulations that the ship does not
move much faster than 0.01 rad/sec),and
(since we want to limit δbetween ± 80°,we
have ),The fuzzy sets for the fuzzy
controller output are assumed to be symmetric
and triangular-shaped with a base width of 0.4,
and all centered at zero on the normalized
universe of discourse (i.e.,121 output membership
functions all centered at zero),
1
eg ??
818ug ??
80 8180 18ug ????
The reference model was chosen so as to represent
somewhat realistic performance requirements as
Where specifies the desired system performance
for the ship heading,
The input to the fuzzy inverse model includes the
error and change in error between the reference
model and the ship heading expressed as
And
respectively,
? ? ? ? ? ? ? ?0, 1 0, 0 0 2 5 0, 0 0 2 5m m m rt t t t? ? ? ?? ? ?
??m t?
? ?t?
? ? ? ? ? ?emk T k T k T? ? ???
? ? ? ? ? ?ec k T k T TkT T?? ???
For each of these inputs,11 symmetric
and triangular-shaped membership
functions are defined that are evenly
distributed on the appropriate universes
of discourse (the same as shown in
Figure 4.4 on page 306),The normalizing
controller gains associated with
are chosen to be
,respectively,
according to design procedure 1 in
Section 4.2.5,
? ? ? ? ? ?,,eck T k T a n d p k T??
18,5,
18ec pg g and g??
?
?? ? ?
For a cargo ship,an increase in the rudder
angle will generally result in a decrease
in the ship heading angle (see Figure 4.5),
This is the information about the inverse
dynamics of the plant that we use in the
fuzzy inverse model rules,Specifically,we
will use rules of the form
? ?kT?
I f i s a n d i s T h e n i s Peci j mec p? ? ? ?
In Table 4.1,denotes the ith fuzzy set
associated with the error signal
denotes the jth fuzzy set associated with the
change in error signal, The entries of
the table represent the center values of
symmetric triangular-shaped membership
functions ci,j with base widths 0.4 for output
fuzzy sets Pm on the normalized universe of
discourse,
e
i?
,cie and??
c?
Table 4.1 Knowledge-Base Array Table for the
Cargo Ship Fuzzy Inverse Model
The meaning of the rules in Table 4.1 is best explained by
studying the meaning of a few specific rules,For
instance,if i = j = 0 then we see from the table that
ci,j=c0,0=0 (this is the center of the table),This cell in
the table represents the rule that says "if ψe =0 and
ψc=0 then y is tracking ym perfectly so you should not
update the fuzzy controller." Hence,the output of the
fuzzy inverse model will be zero,If,on the other hand i
= 2 and j = 1 then ci,j=c0,0=-0.6, This rule indicates that
"if ψe is positive (i.e.,ψm is greater than ψ ) and ψc is
positive (i.e.,ψm- ψ is increasing) then change the
input to the fuzzy controller that is generated to
produce these values of by decreasing it." Basically,
this is because we want ψ to increase,so we want to
decrease δto achieve this (see Figure 4.5),We see that
the inverse model indicates that whatever the input
was in this situation,it should have been less so it
subtracts some amount (the amount affected by the
scaling gain gp),
It is a good idea for you to convince
yourself that other rules in Table 4,1
make sense,For instance,consider the
case where i = -2 and j = -4 so that c-2,-4
=1,explain why this rule makes sense
and how it represents information about
the inverse behavior of the plant,
It is interesting to note that we can often pick a form
for the fuzzy inverse model that is similar inform to
that shown in Table 4.1 (at least,the pattern of the
consequent mem bership function centers often
has this type of symmetry,or has the sequence of
zeros along the other diagonal),At other times we
will need to incorporate additional inputs to the
fuzzy inverse model or we may need to use a
nonlinear mapping for the output centers,For
example,a cubic mapping of the centers is
sometimes useful,so if y is close to ym we will slow
adaptation,but if they are far apart we will speed
up adaptation significantly,
Gradient-Based Model Reference
Adaptive Control
The controller parameter adjustment mechanism
for the gradient approach to MRAC can be
implemented via the "MIT rule." For this,the
cost function
where holds the parameters of the controller
that will be tuned,,and
so that
? ? ? ?212 eJt???
?
? ? ? ? ? ?emt t t? ? ???
dJ
dt
? ?
?
???
?
? ? ? ?ee td tdt ?? ?? ???? ?
For developing the MIT rule for the ship we
assume that the ship may be modeled by a
second-order linear differential equation,
This model is obtained by eliminating the
process pole resulting from in Equation
(4.5) since its associated dynamics are
significantly faster than those resulting
from, Also,for small heading variations
the rudder angle derivative 8 is likely to be
small and may be neglected,Therefore,we
obtain the following reduced-order model for
the ship,
(4.9)
1?
2?
? ? ? ? ? ?
11
1 Kt t t? ? ?
??
? ? ? ???? ? ? ?
? ? ? ?
The PD-type control law that will be employed
for this process may be expressed by
(4.10)
where kp and kd are the proportional and
derivative gains,respectively,and ψr(t) is
the desired process output,Substituting
Equation (4.10) into Equation (4.9),we
obtain
(4.11)
It follows from Equation (4.11) that
(4.12)
where p is the differential operator,
? ? ? ? ? ? ? ?
11
pp
r
K k K kt t t t? ? ? ?
??
? ? ? ?? ? ?? ? ? ?
? ? ? ?
? ? ? ?1
2
11
1
p
r
pd
Kk
tt
KkKk
pp
???
??
?
???
????
??
? ? ? ? ? ?
11
1()? ? ?
??
???? ??
??
Kt t t
The reference model for this process is chosen to be
(4,13)
where to be consistent with the FMRLC design we
choose and, Combining Equations
(4.13) and (4.12) and finding the partial derivatives with
respect to the proportional gain kp and the derivative
gain kd,we find that
(4.14)
And
(4.15)
? ? ? ?2222? ?? ?? nm
nn
wttp w p w
? ?1
2
11
1
? ? ??
??
????
? ??
? ???????
????
e
r
pp d
K
Kkk Kkpp
1
2
11
1
? ? ?
??
??
???
?? ??
???
??????
??
e
pp d
K p
Kkk Kkpp
1? ? 0.05?nw
? In general,Equations (6.14) and (6.15) cannot be
used because the controller parameters kp and kd
are not known,Observe that for the "optimal
values" of kp and kd,we have
? Furthermore,the term may be absorbed into
the adaptation gain, However,this requires that
the sign of be known since,in general,
should be positive to ensure that the controller
updates are made in the direction of the negative
gradient,
2 2 2
11
1 2 ?
??
???? ? ? ? ???
??
pd
nn
KkKkp p p w p w
1?
K
1?
K
?
?
? For a forward-moving cargo ship the sign of
happens to be negative,which implies that the
term with absorbed into it must be negative
to achieve the appropriate negative gradient,After
making the above approximations,we obtain the
following differential equations for updating the PD
controller gains,
? where and are negative real numbers,After
many simulations,the best values that we could
find for the are = -0.005 and = -0,1,
1?
K
?
1?
K
? ?
2 22
1 22
2
1
2
? ? ?
?
? ? ? ?
?
??
?? ??
????
??
? ? ???
????
p
e
nn
p
re
nn
dk p
d t p w p w
dk
d t p w p w
1? 2?
?i 2?1?
?
Chapter 4
Chapter 5
Perspectives on
Fuzzy Control
5.1 Overview
Fuzzy control does not exist as an isolated
topic devoid of relationships to other fields,
and it is important to understand how it
relates to these other fields in order to
strengthen your understanding of it,We
have emphasized that fuzzy control has its
foundations in conventional control and that
there are many relationships to techniques,
ideas,and methodologies there,Fuzzy
control is also an "intelligent control"
technique,and hence there are certain
relationships between it and other intelligent
control methods,
We begin the chapter in Section 5.2 by providing a
conventional control engineering perspective on fuzzy
control,This is essentially a summary of many of the
points that we have made throughout the text,but here
we bring them all together,Following this,in Section 5.3
we introduce two popular areas in neural networks,the
multilayer perceptron and the radial basis function neural
network,We explain that a class of radial basis function
neural networks is identical to a class of fuzzy systems,
Moreover,we explain how techniques covered in this
book (e.g.,gradient training and adaptive control) can be
used for neural networks,In Section 5.4 we explain
genetic algorithms,their relationship to the field of
control,and particularly their use with fuzzy systems,
Next,in Section 5.5 we provide an overview of some of
the relationships to knowledge-based systems,
particularly expert systems (and hence expert control)
and planning systems,Finally,in Section 5.6 we provide
an overview of the general area of (hierarchical) intelligent
and autonomous control where we offer some ideas on
how to define the field of intelligent control and how some
of the most general intelligent controllers operate,
This chapter is meant to provide a view of,
and motivation for,the main areas in the
field of intelligent control,
5.2 Fuzzy Versus Conventional
Control
What are the advantages and disadvantages of
fuzzy control as compared to conventional control?
What are the perspectives of conventional control
engineers on fuzzy control?
We will attempt to give answers to these questions
by asking,and at least partially answering,a
series of questions that we have accumulated over
the years from a variety of engineers in industry
and universities concerned about whether to use
fuzzy or conventional control,We break the
questions into three categories and use the
questions to summarize several points made in
earlier chapters,
5.2.1 Modeling Issues and
Design Methodology
First,we will discuss several issues related to modeling
and the overall fuzzy controller design methodology,
1,Is the fuzzy controller design methodology viable?
Success in a variety of applications (e.g.,the flexible-
link robot application studied in this book) has proven
fuzzy control to be a viable methodology and therefore
worthy of consideration,
2,Do engineers like the methodology? Some do,and
some do not,Engineers who have found success with
it tend to like it,Often,we find that if engineers invest
the time into learning it,they find it to be a tool with
which they are comfortable working (they feel like it is
"one more tool in their toolbox"),This may be because
fuzzy systems are interpolators and engineers are
used to thinking about using interpolation as a
solution to a wide variety of problems,
3,Will the methodology always work? No,The reason we can be
so definite in this answer is that it is not the methodology that
ultimately leads to success; it is the clever ideas that the control
engineer uses to achieve high-performance control,Fuzzy
control is a vehicle,and the engineer is the driver,Some find
that the vehicle is comfortable and that they can coax it into
performing all kinds of functions for them,Others are not so
comfortable with it,
4,Does the design methodology always shorten the "lead time"
to design and implementation? In talking with many people in
industry,we have found that most often it does (and this is very
important,especially in today's competitive climate),but we
have also heard of instances where people factor in the cost of
having their engineers learn the method and then found the
membership functions very hard to tune,In these cases the
clear answer from the engineers was that it did not make things
easier,We have heard from some that fuzzy logic implements,
in a similar way,the standard logic and interpolation methods
they already use,Sometimes such engineers find that the fuzzy
control jargon clouds the issues that are central to the control
problem,Others like that it helps to formalize what they have
been doing and helps to suggest ideas for other approaches,
5,Is a model used in the fuzzy control design
methodology? It is possible that a mathematical model
is not used,However,often it is used in simulation to
redesign a fuzzy controller,Others argue that a model
is always used,even if it is not written down,some
type of model is used "in your head."
6,Since most people claim that no formal model is used
in the fuzzy control design methodology,the following
questions arise,
? (a) Is it not true that there are few,if any,assumptions
to be violated by fuzzy control and that the technique
can be indiscriminately applied? Yes,and sometimes it
is applied to systems where it is clear that a PID
controller or look-up table would be just as effective,
So,if this is the case,then why not use fuzzy control?
Because it is more computationally complex than a PID
controller and the PID controller is much more widely
understood,
? (b) Are heuristics all that are available to perform
fuzzy controller design? No,Any good models that can
be used,probably should be,
? (c) By ignoring a formal model,if it is available,is it not the
case that a significant amount of information about how to
control the plant is ignored? Yes,If,for example,you have
a model of a complex process,we often use simulations to
gain an understanding of how best to control the plant—
and this knowledge can be used to design a fuzzy
controller,
? (d) Can standard control theoretic analysis be used to
verify the operation of the resulting control system?
Sometimes,if the fuzzy control system satisfies the
assumptions needed for the mathematical analysis,This
will be discussed in more detail in the next section,
? (e) Will it be difficult to clearly characterize the limitations
of various fuzzy control techniques (i.e.,to classify which
plants can be controlled best with different fuzzy or
conventional controllers)? Yes,
? (f) Will it be difficult to clearly relate the results of using the
fuzzy controller to previous work in conventional control to
definitively show that contributions are being made to the
field of control? Yes,
7,Is there always a formal model available for
control design? No,but for most systems there is
at least an approximate model available,This
information is often valuable and should not be
ignored,
8,Does the use of fuzzy controllers limit the design
methodology as compared to the use of more
general expert controllers? Expert controllers use
more general knowledge-representation schemes
and inference strategies (see more details in
Section 8.5.1),so for some plants it may be
advantageous to use the expert controller,It is,
however,not clear at this point what class of
plants call for the use of expert control,
8.2.2 Stability and Performance
Analysis
Next,we will discuss several issues related to
the performance analysis of fuzzy control
systems,
? 1,Is verification and certification of fuzzy
control systems important? Yes,especially for
safety-critical systems (e.g.,an aircraft),It may
not be as important for certain applications
(e.g.,a washing machine with a fuzzy control
system),
? 2,What are the roles of simulation and
implementation in evaluating the performance
of fuzzy control systems? They play exactly
the same role as for conventional control
systems,
3,What are the roles of the following nonlinear
analysis approaches in fuzzy control system
design?
? (a) Phase plane analysis,
? (b) Describing function analysis,
? (c) Stability analysis,Lyapunov's first and second
methods; absolute stability; and the small gain
theorem,
? (d) Analysis of steady-state errors,
? (e) Method of equivalent gains,
? (f) Cell-to-cell mapping approaches,
Several of these approaches may apply to the
analysis of the behavior of the fuzzy control
system you design,
? 4,What are the problems with utilizing mathematical analysis
for fuzzy control system verification? The techniques take
time to learn,The problems for which fuzzy control are
particularly well suited,and where there is often very good
motivation to use fuzzy rather than conventional control,are
the control problems where the plant has complex nonlinear
behavior,and where a model is hard to derive due to inherent
uncertainties,Each of these characteristics often makes the
assumptions that are needed for the nonlinear analysis
techniques invalid,so the theory often does not end up
offering much when it is really needed,
? 5,Does fuzzy control provide "robust control"? If so,can this
be demonstrated mathematically or experimentally? There
has been a recent focus in research on stability analysis to
show that fuzzy control does provide robust control,It is very
difficult,of course,to show robustness via experimentation
since by its very definition robustness verification requires
extensive experimentation,
8.2.3 Implementation and
General Issues
Finally,we will discuss several issues related to
implementation and the overall fuzzy controller design
methodology,
? 1,Are there computational advantages in using fuzzy
control as compared to conventional control? Not always,
PID control is simpler than fuzzy control; however,there
are some types of conventional control that are very
difficult to implement where a fuzzy controller can be
simpler,It depends on the application and the methods you
choose,
? 2,Should I use a conventional or "fuzzy processor" for
implementation? We have typically found that our needs
can be met if we use a conventional processor that has a
better track record with reliability; however,there may be
some advantages to fuzzy processors when large rule-
bases are used and fast sampling times are needed,
? 3,Are there special "tricks of the trade" in the
implementation of fuzzy controllers that have
many rules? Yes,Several of these are listed in
Chapter 2,in Section 2.6 beginning on page 91,
? 4,Does fuzzy control provide for a user-friendly
way to tune the controller during implementation
studies? Often it does,We have found in field
studies that when you know generally what to do
to get a controller to work,it is sometimes hard to
get this information into the gains of a
conventional controller and easier to express it in
rules and load them into a fuzzy controller or fuzzy
supervisor,
Overall,in comparing fuzzy to conventional control,it
is interesting to note that there are conventional
control schemes that are analogous to fuzzy ones,
(1) direct fuzzy control is analogous to direct
nonlinear control,(2) fuzzy adaptive control is
analogous to conventional adaptive control (e.g.,
model reference adaptive control),and (3) fuzzy
supervisory control is analogous to hierarchical
control,Does there exist an analogous
conventional approach to every fuzzy control
scheme? If so,then in doing fuzzy control
research it seems to be very important to compare
and contrast the performance of the fuzzy versus
the conventional approaches,
5.3 Neural Networks
Artificial neural networks are circuits,computer
algorithms,or mathematical representations
of the massively connected set of neurons
that form biological neural networks,They
have been shown to be useful as an
alternative computing technology and have
proven useful in a variety of pattern
recognition,signal processing,estimation,
and control problems,Their capabilities to
learn from examples have been particularly
useful,
In this section we will introduce two of the
more popular neural networks and discuss
how they relate to the areas of fuzzy
systems and control,We must emphasize
that there are many topics in the area of
neural networks that are not covered here,
For instance,we do not discuss associative
memories and Hopfield neural networks,
recurrent networks,Boltz-mann machines,
or Hebbian or competitive learning,
5.3.1 Multilayer
Perceptrons
The multilayer perceptron is a feed-
forward neural network (i.e.,it does not
use past values of its outputs or other
internal variables to compute its current
output),It is composed of an
interconnection of basic neuron
processing units,
The Neuron
For a single neuron,suppose that we use,i = 1,2,...,n,to
denote its inputs and suppose that it has a single output y,
Figure 8.1 shows the neuron,Such a neuron first forms a
weighted sum of the inputs
where ωi are the interconnection "weights" and θis the "bias"
for the neuron (these parameters model the
interconnections between the cell bodies in the neurons of
a biological neural network),The signal z represents a
signal in the biological neuron,and the processing that the
neuron performs on this signal is represented with an
"activation function." This activation function is represented
with a function f,and the output that it computes is
( 5.1)
1
n
iiizx ???
??????
???
? ?
1
n
ii
i
y f z f x??
?
????? ? ?????
?????
Basically,the neuron model represents the
biological neuron that "fires" (turns on) when
its inputs are significantly excited (i.e.,z is
big enough),The manner in which the
neuron fires is defined by the activation
function f, There are many ways to define
the activation function,
?? Threshold function,For this type of
activation function we have
so that once the input signal z is above zero
the neuron turns on,
? ? 1 i f 00 i f 0zfz z ??? ? ?
?
? ? Sigmoid function,For this type of activation function we
have
(5.2)
so that the input signal z continuously turns on the neuron an
increasing amount as it increases (plot the function values
against z to convince yourself of this),The parameter b
affects the slope of the sigmoid function,There are many
functions that take on a shape that is sigmoidal,For
instance,one that is often used in neural networks is the
hyperbolic tangent function
Equation (8.1),with one of the above activation functions,
represents the computations made by one neuron in the
neural network,Next,we define how we interconnect these
neurons to form a neural network—in particular,the
multilayer perceptron,
1()
1 e x p ( )fz bz? ??
1 e x p ( )( ) ta n h ( )
2 1 e x p ( )
zzfz
z
???
?
FIGURE 5.1 Single neuron model,
y
z
A c t i v a t i o n
f u n c t i o n
b i a s
w e i g h t s
-
1x
2x
3x
1w
2w
f ( z )
?
nw
Network of Neurons
The basic structure for the multilayer perceptron
is shown in Figure 5.2,There,the circles
represent the neurons (weights,bias,and
activation function) and the lines represent
the connections between the inputs and
neurons,and between the neurons in one
layer and those in the next layer,This is a
three-layer perceptron since there are three
stages of neural processing between the
inputs and outputs,More layers can be added
by concatenating additional "hidden" layers of
neurons,
The multilayer perceptron has inputs,i =
1,2,...,n,and outputs,j =1,2,...,m,The
number of neurons in the first hidden layer
(see Figure 8.2) is, In the second hidden
layer there are neurons,and in the output
layer there are m neurons,Hence,in an N
layer perceptron there are neurons in the
ith hidden layer,i = 1,2,...,N- 1,
2n
1n
in
FIGURE 5.2 multilayer perceptron models,
1y
2y
my
1x
2x
nx
? ?
1
1x
? ?
2
1x
? ?
1
1
n
x
? ?
1
2x
? ?
2
2x
? ?
2
2
n
x
O u t p u t
l a y e r
S e c o n d
h i d d e n
l a y e r
F i r s t
h i d d e n
l a y e r
The neurons in the first layer of the multilayer
perceptron perform computations,and the outputs
of these neurons are given by
with j = 1,2.....n1,The neurons in the second layer of
the multilayer perceptron perform
computations,and the outputs of these neurons are
given by
with j = 1,2,...,n2,The neurons in the third layer of
the multilayer perceptron perform computations,
and the outputs of these neurons are given by
with j = 1,2,...,m,
( 1 ) ( 1 ) ( 1 ) ( 1 )
1
( ( ) )nj j i j i j
i
x f w x ?
?
?? ?
1( 2 ) ( 2 ) ( 2 ) ( 1 ) ( 2 )
1
( ( ) )nj j i j i j
i
x f w x ?
?
???
2 ( 2 )
1
( ( ) )nj j i j i j
i
y f w x ?
?
???
The parameters (scalar real numbers) are called the weights
of the first hidden layer,The are called the weights of the
second hidden layer,The are called the weights of the
output layer,The parameters are called the biases of the
first hidden layer,The parameters are called the biases of
the second hidden layer,and the are the biases of the
output layer,The functions fj (for the output layer),(for the
second hidden layer),and (for the first hidden layer)
represent the activation functions,The activation functions can
be different for each neuron in the multilayer perception (e.g.,
the first layer could have one type of sigmoid,while the next
two layers could have different sigmoid functions or threshold
functions),
This completes the definition of the multilayer perception,Next,
we will introduce the radial basis function neural network,After
that we explain how both of these neural networks relate to
the other topics covered in this book,
??1
ijw
? ?2
ijw
ijw
(1)j?
(2)j?
j?
(2)
jf
(1)
jf
5.3.2 Radial Basis Function
Neural Networks A locally tuned,overlapping receptive field is found in parts of
the cerebral cortex,in the visual cortex,and in other parts
of the brain,The radial basis function neural network model
is based on these biological systems,
A radial basis function neural network is shown in Figure 5.3,
There,the inputs are xi,i = 1,2,...,n,and the output is y
=f(x) where f represents the processing by the entire radial
basis function neural network,Let, The input
to the ith receptive field unit is x,and its output is denoted
with Ri (x),lt has what is called a "strength" which we
denote by, Assume that there are M receptive field units,
Hence,from Figure 5.3,
(5.3)
is the output of the radial basis function neural network,
? ?12,,Tnx x x x?
iy
? ? ? ?
1
M
ii
i
y f x y R x
?
?? ?
FIGURE 5.3 Radial basis function neural network
model,
1x
2x
nx
y
There are several possible choices for the
"receptive field units" R i (x),
1,We could choose
Where,is a scalar,and if
z is a vector then,
2,We could choose
where are defined in choice 1,
? ?
2
2e x p
i
i
i
xcRx
?
?? ?
? ? ? ???
??
12,,Ti i iinc c c c??? ??
Tz z z?
i?
iic a n d ?
? ? 2
2
1
1 e x p
i
i
i
Rx
xc
?
?
?? ?
?? ??
??
There are also alternatives to how to compute the
output of the radial basis function neural network,
For instance,rather than computing the simple
sum as in Equation (8.3),you could compute a
weighted average
( 5.4)
It is also possible to define multilayer radial basis
function neural networks,
This completes the definition of the radial basis
function neural network,Next,we explain the
relationships between multilayer perceptions and
radial basis function neural networks and fuzzy
systems,
? ?
? ?
? ?
1
1
M
ii
i
M
i
i
y R x
y f x
Rx
?
?
??
?
?
5.3.3 Relationships Between Fuzzy
Systems and Neural Networks
There are two ways in which there are relationships
between fuzzy systems and neural networks,First,
techniques from one area can be used in the other,
Second,in some cases the functionality (i.e.,the
nonlinear function that they implement) is identical,
Some label the intersection between fuzzy
systems and neural networks with the term "fuzzy-
neural" or "neuro-fuzzy" to highlight that
techniques from both fields are being used,Here,
we avoid this terminology and simply highlight the
basic relationships between the two fields,
Multilayer Perceptrons
The multilayer perceptron should be viewed as a nonlinear
network whose nonlinearity can be tuned by changing the
weights,biases,and parameters of the activation functions,
The fuzzy system is also a tunable nonlinearity whose
shape can be changed by tuning,for example,the
membership functions,Since both are tunable
nonlinearities,the following approaches are possible,
? ? Gradient methods can be used for training neural
networks to perform system identification or to act as
estimators or predictors in the same way as fuzzy systems
Indeed,the gradient training of neural networks,called
"back-propagation training," was introduced well before the
gradient training of fuzzy systems,and the idea for training
fuzzy systems this way came from the field of neural
networks,
? ? Hybrid methods for training can also be used for
neural networks,For instance,gradient methods
may be used in conjunction with clustering
methods applied to neural networks,
? ? Indirect adaptive control can also be achieved
with a multilayer perceptron,To do this we use two
multilayer perceptrons as the tunable
nonlinearities in the certainty equivalence control
law and the gradient method for tuning,
? ? Gain scheduled control may be achieved by
training a multilayer perceptron to map the
associations between operating conditions and
controller parameters,
This list is by no means exhaustive,It simply
shows that multilayer perceptron networks
can take on a similar role to that of a fuzzy
system in performing the function of being a
tunable nonlinearity,An advantage that the
fuzzy system may have,however,is that it
often facilitates the incorporation of heuristic
knowledge into the solution to the problem,
which can,at times,have a significant
impact on the quality of the solution,
Radial Basis Function Neural
Networks
Some radial basis function neural networks are
equivalent to some standard fuzzy systems in the
sense that they are functionally equivalent (i.e.,
given the same inputs,they will produce the
same outputs),To see this,suppose that in
Equation (5.4) we let M =R (i.e.,the number of
receptive field units equal to the number of rules),
(i.e.,the receptive field unit strengths
equal to the output membership function centers),
and choose the receptive field units as
(i.e.,choose the receptive field units to be the same
as the premise membership functions),
iiyb?
( ) ( )iiR x x??
In this case we see that the radial basis
function neural network is identical to a
certain fuzzy system that uses center-
average defuzzification,This fuzzy
system is then given by
It is also interesting to note that the
functional fuzzy system (the more
general version of the Takagi-Sugeno
fuzzy system is equivalent to a class of
two-layer neural networks [200],
1
1
()()
()
R
iii
R
ii
bxy f x
x
?
?
?
?
?? ??
The equivalence between this type of fuzzy system
and a radial basis function neural network shows
that all the techniques in this book for the above
type of fuzzy system work in the same way for the
above type of radial basis function neural network
(or,using [200],the techniques for the Takagi-
Sugeno fuzzy system can be used for a type of
multilayer radial basis function neural network),
Due to the above relationships between fuzzy
systems and neural networks,some would like to
view fuzzy systems and neural networks as
identical areas,This is,however,not the case for
the following reasons,
? ? There are classes of neural networks (e.g.,dynamic
neural networks) that may have a fuzzy system analog,but
if so it would have to include not only standard fuzzy
components but some form of a differential equation
component,
? ? There are certain fuzzy systems that have no clear
neural analog,Consider,for example,certain "fuzzy
dynamic systems" [48,167],We can,however,envision
(i.e.,imagine) how you could go about "designing a neural
analog to such fuzzy systems,
? ? The neural network has traditionally been a "black box"
approach where the weights and biases are trained (e.g.,
using gradient methods like back-propagation) using data,
often without using extra heuristic knowledge we often
have,In fuzzy systems you can incorporate heuristic
information and use data to train them,This last difference
is often quoted as being one of the advantages of fuzzy
systems over neural networks,at least for some
applications,
Regardless of the differences,it is important to note that
many methods in neural control (i.e.,when we use a
neural network for the control of a system) are quite
similar to those in adaptive fuzzy control,For instance,
since the fuzzy system and radial basis function neural
network can be linearly parameterized (see [200]),we
can use them as the identifier structures in direct or
indirect adaptive control schemes and use gradient or
least squares methods to update the parameters (see
Chapters 5 and 6 and [200,229,50]),Indeed,we could
have used neural networks as the structure that we
trained for all of the identification methods in Chapter
3,In this sense we can use neural networks in system
identification,estimation,and prediction,and as a
direct (fixed) controller that is trained with input-output
data,Basically,to be fluent with the methods of
adaptive fuzzy systems and control,you must know
the methods of neural control—and vice versa,
5.4 Genetic Algorithms
A genetic algorithm (GA) uses the principles
of evolution,natural selection,and
genetics from natural biological systems
in a computer algorithm to simulate
evolution,Essentially,the genetic
algorithm is an optimization technique
that performs a parallel,stochastic,but
directed search to evolve the most fit
population,In this section we will
introduce the genetic algorithm and
explain how it can be used for design and
tuning of fuzzy systems,
5.4.1 Genetic Algorithms,A
Tutorial The genetic algorithm borrows ideas from and
attempts to simulate Darwin's theory on natural
selection and Mendel's work in genetics on
inheritance,The genetic algorithm is an
optimization technique that evaluates more than
one area of the search space and can discover
more than one solution to a problem,In particular,
it provides a stochastic optimization method where
if it "gets stuck" at a local optimum,it tries to
simultaneously find other parts of the search
space and "jump out" of the local optimum to a
global one,
Representation and the Population
of Individuals
The "fitness function" measures the fitness of an
individual to survive in a population of individuals,
The genetic algorithm will seek to maximize the
fitness function J (θ) by selecting the individuals
that we represent with θ, To represent the genetic
algorithm in a computer,we make θ a string,In
particular,we show such a string in Figure 5.4,A
string is a chromosome in a biological system,It is
a string of "genes" that can take on different
"alleles." In a computer we use number systems to
encode alleles,Hence,a gene is a "digit location"
that can take on different values from a number
system (i.e.,different types of alleles),
Figure 5.4 String for representing an
individual
V a l u e s h e r e = a l l e l e s
G e n e = d i g i t l o c a t i o n
S t r i n g o f g e n e s = c h r o m o s o m e
For instance,in a base-2 number system,alleles come from
the set {0,1},while in a base-l0 number system,alleles
come from the set {0,1,2,3,4,5,6,7,,8,9},Hence,abinary
chromosome has zeros or ones in its gene locations,As an
example,consider the binary chromosome
? 1011110001010
which is a binary string of length 13,If we are seeking to
optimize parameters of a system that come in a base-10
number system then we will need to encode the numbers
into the binary number system (using the standard method
for the conversion of base-10 numbers to base-2 numbers),
We will also need to decode the binary strings into base-10
numbers to use them,Here,we will develop the genetic
algorithm for base-2 or base-10 number systems but we
will favor the use of the base-10 representation since then
there is no need for encoding or decoding (which can be
computationally expensive for on-line,real-time
applications),
As an example of a base-10 chromosome,consider
8219345127066
that has 13 gene positions,For such chromosomes we add
a gene for the sign of the number (either "+" or "-") and fix a
position for the decimal point,For instance,for the above
chromosome we could have
+821934.5127066
where there is no need to carry along the decimal point; the
computer will just have to remember its position,Note that
you could also use a floating point representation where
we could code numbers in a fixed-length string plus the
number in the exponent (e.g.,as ),The ideas
developed here work just as readily for this number
representation system as for standard base-2 or base-10,
10 YYXXX ?
Since we are interested in applying the genetic algorithm to
controller or estimator design and tuning,we will have as
individuals parameters that represent,for instance,a
conventional or fuzzy controller (i.e.,a vector of parameters),
The vector of parameters that encodes a fuzzy or conventional
controller can be loaded into a single chromosome,For
example,suppose that you have a PD controller with
Kp = +5.12,Kd = -2.137
then we would represent this in a chromosome as
+051200-021370
which is a concatenation of the digits,where we assume that
there are six digits for the representation of each parameter
plus the sign digit (this is why you see the extra padding of
zeros),The computer will have to keep track of where the
decimal point is,We see that each chromosome will have a
certain structure (its "genotype" in biological terms),but here
rather than a set of chromosomes for the structure we just
concatenate the parameters and use one chromosome for
convenience,Each chromosome represents a point in the
search space of the genetic algorithm (i.e.,a "phenotype" in
biological terms),
Next,we develop a flotation for representing a whole set of
individuals (i.e.,a population),Let be a single
parameter at time k (a fixed-length string with sign digit),
and suppose that chromosome j is composed of N of
these parameters,which are sometimes called "traits."
Let
be the jth chromosome,Note that earlier we had
concatenated elements in a string while here we simply
take the concatenated elements and form a vector from
then),We do this simply because this is probably the
way that you will want to code the algorithm in the
computer,We will at times,however,still let θj be a
concatenated string when it is convenient to do so,
12( ) [ ( ),( ),,( ) ]j j j j TNk k k k? ? ? ??
The population of individuals at time k is given
by
(5.5)
and the number of individuals in the
population is given by S,We want to pick S
to be big enough so that the population
elements can cover the search space,
However,we do not want S to be too big
since this increases the number of
computations we have to perform,
? ?( ) ( ) | 1,2,,SjP k k j??? … …
Genetic Operations
The population P(k) at time k is often referred to as
the "generation" of individuals at time k,Evolution
occurs as we go from a generation at time k to the
next generation at time k+1,Genetic operations of
selection,crossover,and mutation are used to
produce one generation from the next,
Selection,Basically,according to Darwin the most
qualified individuals survive to mate,We quantify
"most qualified" via an individual's fitness at
time k,For selection we create a "mating pool" at
time k,which we denote by
(5.6)
? ?? ?jJk?
? ?( ) ( ) | 1,2,,SjM k m k j?? … …
The mating pool is the set of chromosomes that are selected
for mating,We select an individual for mating by letting
each mj(k) be equal to
with probability
(5.7)
To clarify the meaning of this formula and hence the selection
strategy,Goldberg [58] uses the analogy of spinning a unit
circumference roulette wheel where the wheel is cut like a
pie into S regions where the ith region is associated with
the ith element of P(k),Each pieshaped region has a
portion of the circumference that is given by,in Equation
(5.7),You spin the wheel,and if the pointer points at region
i when the wheel stops,then you place into the mating
pool M(k),You spin the wheel S times so that 5 elements
end up in the mating pool,Clearly,individuals who are
more fit will end up with more copies in the mating pool;
hence,chromosomes with larger-than-average fitness will
embody a greater portion of the next generation,At the
same time,due to the probabilistic nature of the selection
process,it is possible that some relatively unfit individuals
may end up in the mating pool,
1
( ( ) )
( ( ) )
i
i S j
j
JkP
Jk
?
??? ?
( ) ( )j k P k? ?
i?
Reproduction Phase,Crossover
We think of crossover as mating in biological terms,
which at a fundamental biological level involves the
process of combining chromosomes,The crossover
operation operates on the mating pool M(k),First,
you specify the "crossover probability" pc (usually
chosen to be near one since when mating occurs in
biological systems,genetic material is swapped
between the parents),The procedure for crossover
con sists of the following steps,
1,Randomly pair off the individuals in the mating pool
M(k) (i.e.,form pairs to mate by the flip of a coin),If
there are an odd number of individuals in M(k),then,
for instance,simply take the last individual and pair it
off with another individual who has already been
paired off,
2,Consider chromosome pair,that was
formed in step 1,Generate a random number,
(a) If r < pc then cross over, To cross over
these chromosomes select at random a "cross site"
and exchange all the digits to the right of the cross
site of one string with those of the other,This
process is pictured in Figure 5.5,In this example the
cross site is position five on the string,and hence we
swap the last eight digits between the two strings,
Clearly,the cross site is a random number between
one and the number of digits in the string minus one,
(b) If r > pc then we will not cross over; hence,we do
not modify the strings,and we go to the mutation
operation below,
j? i?
? ?0,1r?
jiand??
FIGURE 5.5 Crossover operation examples,
1 2 3 4 5 6 7 8 9
1 0 1 1 1 2
1 3
1 2 3 4 5 6 7 8 9
1 0 1 1 1 2
1 3
S w i t c h t h e s e t w o p a r t s o f t h e s t r i n g s
C r o s s s i t e
i?
j?
3,Repeat step 2 for each pair of strings that is in
M(k),
As an example,suppose that S = 10 and that in step
1 above we randomly pair off the chro mosomes,
Suppose that (j = 5,i = 9) are paired off
where
= +2.9845
and,
= +1.9322
Suppose that pc =0.9 and that when we randomly
generate r we get r = 0.34,Hence,by step 2 we
will cross over, According to step 2 we
randomly pick the cross site,
59 and??
59 and??
5?
9?
Suppose that it is chosen to be position three on the
string,In this case the strings that are produced by
crossover are
= +2.9322
and
= +1.9845
Besides the fact that crossover helps to model the
mating part of the evolution process,why should
the genetic algorithm perform crossover? Basically,
the crossover operation perturbs the parameters
near good positions to try to find better solutions to
the optimization problem,It tends to help perform
a localized search around the more fit individuals
(since on average the individuals in the mating
pool at time k are more fit man the ones in the
population at time k),
5?
9?
Reproduction Phase,Mutation
Like crossover,mutation modifies the mating pool (i.e.,after
selection has taken place),The operation of mutation is
normally performed on the elements in the mating pool
after crossover has been performed,The biological analog
of our mutation operation is the random mutation of genetic
material,To perform mutation in the computer,first choose
a mutation probability pm,With probability pm,change
(mutate) each gene location on each chromosome
randomly to a member of the number system being used,
For instance,in a base-2 genetic algorithm,we could
mutate
1010111
to
1011111
where the fourth bit was mutated to one,
For a base-10 number system you would simply pick a
number at random to replace a digit with if you are
going to mutate a digit location,
Besides the fact that this helps to model mutation in a
biological system,why should the genetic algorithm
perform mutation? Basically,it provides random
excursions into new parts of the search space,It is
possible that we will get lucky and mutate to a good
solution,It is the mechanism that tries to make sure
that we do not get stuck at a local maxima and that we
seek to explore other areas of the search space to help
find a global maximum for J (9),Usually,the mutation
probability is chosen to be quite small (e.g.,less than
0.01) since this will help guarantee that all the
individuals in the mating pool are not mutated so that
any search progress that was made is lost (i.e.,we
keep it relatively low to avoid degradation to
exhaustive search via a random walk in the search
space),
After mutation we get a modified mating pool
at time k,M(k),To form the next generation
for the population,we let
P(k+1)=M(k)
where this M(k) is the one that was formed by
selection and modified by crossover and
mutation,Then the above steps repeat,
successive generations are produced,and
we thereby model evolution (of course it is a
very crude model),
Optional Features
There have been many different options used in the
definition of a genetic algorithm,These include the
following,
? There is the possibility of using other genetic
operators,For instance,there is an operation
called "elitism" where the most fit individual in P(k)
is copied directly to P(k +1) without being changed
by the other operations,This operator is
sometimes used to try to make sure that there will
be a reasonably fit individual present in the
population at every time step; it helps to avoid
having all the strings get modified by crossover
and mutation in a way so that no good solution
exists at some time k,
? ? Some use a "population splitting" approach
where the population of S members is partitioned
into subsets and the genetic operations are
constrained to only mix within these partitions,
This can produce different subpopulations that will
seek different solutions,
? ? There are many options for the crossover
operation,For instance,some consider crossing
over at every site in the chromosome,Others will
perform crossover for each separate parameter
(trait) on the chromosome,
? ? Some will grow and shrink the population,
There are many other options besides the ones
listed above,The interested reader should consult
Section 5.8,For Further Study,for more details
about genetic algorithms,
Termination Conditions,Initialization,
and Implementation Issues
The above discussion showed how to produce
successive generations and thereby simulate evolution,
While the biological evolutionary process continues,
perhaps indefinitely,there are many times when we
would like to terminate out artificial one and find the
following,
? The population individual—say,—that best maximizes
the fitness function,Notice that to determine this we
also need to know the generation number k where the
most fit individual existed (it is not necessarily in the
last generation),You may want to design the computer
code that implements the genetic algorithm to always
keep track of the highest J value and the generation
number and individual that achieved this value of J,
? The value of the fitness function,
While for some applications this value may
not be important,for others it is critical (e.g.,
in many function optimization problems),
? Information about the way that the
population has evolved,which areas of the
search space were visited,and how the
fitness function has evolved over time,You
may want to design the code that
implements the genetic algorithm to provide
plots or printouts of all the relevant genetic
algorithm data,
? ?* ()Jk?
There is then the question of how to terminate the
genetic algorithm,There are many ways to
terminate a genetic algorithm,many of them
similar to termination conditions used for
conventional optimization algorithms,To introduce
a few of these,let be a small number and M1 > 0
and M2 > 0 be integers,Consider the following
options for terminating the genetic algorithm,
? Stop the algorithm after generating generation
P(M2)—that is,after M2 generations,
? Stop the algorithm after at least M2 generations
have occurred and at least M1 steps have
occurred where the maximum (or average) value
of J for all population members has increased by
no more than ε,
? Stop the algorithm once J takes on a value above
some fixed value,
Of course,there are other possibilities for
termination conditions,The above ones are easy
to implement on a computer but sometimes you
may want to watch the parameters evolve and
decide yourself when to stop the algorithm,
Initialization of the genetic algorithm is done by first
choosing the representation to be used (including
the structure of the chromosomes,the number
base,and the number of digits to be used),Next,
you need to specify the size of the population,
decide which genetic operations will be used,
specify the crossover and mutation probabilities pc
and pm,and pick a termination method (if it is
needed),
Sometimes for problems that are solved by the genetic
algorithm it is known that the parameters that are
manipulated by the genetic algorithm will lie in a
certain fixed range (e.g.,you may know that you would
never want to make the proportional gain of a PID
controller negative),Suppose,for the sake of
discussion,that is a scalar and we know a priori that it
will stay in a certain interval—say,,It is
important to note that crossover and mutation can
generate strings that are out of a fixed range even if
parameters all start within the proper ranges (provide
an example of this),Due to this there is a problem
when it comes to implementing the genetic algorithm
of what to do when the algorithm generates a
chromosome that is out of range,There are several
approaches to solving this problem,
? ?m i n m a x,??
For instance,if a scalar parameter θ is to lie
in,and at time k crossover or
mutation makes,then simply
choose, If at time k crossover or
mutation makes,then simply
choose, An alternative approach
would be to simply repeat the crossover or
mutation operation again and hope that the
newly generated parameters will be in range,
Of course,this may not solve the problem
since the next time they are generated they
may also be out of range (and the number of
tries that it takes to get in range is random),
? ?m i n m a x,??
m ax()k???
m a x()k???
m a x()k???
m in()k???
5.4.2 Genetic Algorithms for
Fuzzy System Design and
Tuning
There are basically two ways that the genetic
algorithm can be used in the area of fuzzy
systems,They can be used for the off-line
design of fuzzy systems and in their on-line
tuning,Both of these options are considered
next
Computer-Aided Design of Fuzzy
Systems
The genetic algorithm can be used in the (off-line) computer-
aided design of control systems since it can artificially
evolve an appropriate controller that meets the
performance specifications to the greatest extent possible,
To do this,the genetic algorithm maintains a population of
strings that each represent a different controller (digits on
the strings characterize parameters of the controller),and
it uses a fitness measure that characterizes the closed-
loop specifications,Suppose,for instance,that the closed-
loop specifications indicate that you want,for a step input,
a (stable) response with a rise-time of,a percent
overshoot of,and a settling time of, We need to
define the fitness function so that it measures how close
each individual in the population at time k (i.e.,each
controller candidate) is to meeting these specifications,
*
pM
*
rt
*st
Suppose that we let tr,Mp,and ts,denote the rise-time,
overshoot,and settling time,respectively,for a given
individual (we compute these for an individual in the
population by performing a simulation of the closed-
loop system with the candidate controller and a
model of the plant),Given these values,we let (for
each individual and every time step k)
where,i=1,2,3,are positive weighting factors,The
function characterizes how well the candidate
controller meets the closed-loop specifications where
if it meets the specifications perfectly,The
weighting factors can be used to prioritize the
importance of meeting the various specifications
(e.g.,a high value of w2 relative to the others
indicates that the percent overshoot specification is
more important to meet than the others),
* 2 * 2 * 21 2 3( ) ( ) ( )r r p p s sJ w t t w M M w t t? ? ? ? ? ?
J
0J ?
Now,we would like to minimize,but the
genetic algorithm is a maximization routine,
To minimize with the genetic algorithm,
we can choose the fitness function
Where is a small positive number,
Maximization Of J can only be achieved by
minimization of,so the desired effect is
achieved,Another way to define the fitness
function
is to let
J
1J
J ?? ?
0? ?
J
? ?()( ( ) ) ( ( ) ) m a x ( ( ) )kJ k J k J k?? ? ?? ? ?
The minus sigh in front of the term turns
the minimization problem into a
maximization problem (to see this,
consider,where θ is a scalar,as
an example),The term is needed
to shift the function up so that is
always positive,We need it positive since in
selection,Equation (5.7) defines a
probability that must always be positive and
between one and zero,
( ( ))Jk?
2()J ???
? ?()m a x ( ( ) )k Jk? ?
( ( ))Jk?
This completes the definition of how to use a genetic
algorithm for computer-aided control system design,
Note that the above approach depends in no way on
whether the Controller that is evolved is a conventional
controller (e.g.,a PID controller) or a fuzzy system or
neural network,For instance,you could use a Takagi-
Sugeno fuzzy system or a standard fuzzy system for
the controller and let the genetic algorithm tune the
appropriate parameters,Moreover,we could take any
of the controllers and parameterize them and use the
above approach to tune these adaptive or supervisory
controllers,We have used the genetic algorithm to
tune direct,adaptive,and supervisory controllers for
several applications,and while this approach is
computationally intensive,and we did have to make
some application-dependent modifications to the
above fitness evaluation approach,it did produce
successful results,
The above approach can also be used in system
identification and for the construction of
estimators and predictors,just as we used
gradient optimization for these in Chapter 3,
The genetic algorithm can be used for the
tuning of fuzzy system parameters that enter in
a nonlinear fashion and can be used in
conjunction with other methods,To use the
genetic algorithm for tuning fuzzy systems as
estimators,we could choose to be Equation
(3.7) or (3.6),Then we would choose the fitness
function J similarly to how we did above,We
have used such an approach to construct a
Takagi-Sugeno fuzzy system that acted as a
gain scheduler,One possible advantage that
the GA approach could offer over,for example,
a gradient method is that it may be able to
better avoid local optima and hence find the
global optimum,
On-Line Timing of Fuzzy Systems
Traditionally,genetic algorithms have been used for off-line design,
search,and optimization,There are ways,however,to evolve
controllers (fuzzy or conventional) while the system is operating,
rather man in off-line design,Progress in this direction has been
made by the introduction of the "genetic model reference
adaptive controller" (GMRAC) shown in Figure 5.6,As in the
FMRLC,the GMRAC uses a reference model to characterize the
desired performance,For the GMRAC there is a genetic
algorithm mat maintains a population of strings each of which
represents a candidate controller,This genetic algorithm uses a
process model (e.g.,a linear model of the process) and data
from the process to evaluate the fitness of each controller in the
population,It does this evaluation at each time step by
simulating out into the future with each candidate controller and
forming a fitness function based on the error between the
predicted output for each controller and that of the reference
model,Using this fitness evaluation,the genetic algorithm
propagates controllers into the next generation via the standard
genetic operations,The controller that is the most fit one in the
population at each time step is used to control the system,
FIGURE5.6 Genetic model reference adaptive controller
(figure taken from [158],? IEEE),
p l a n t
M o s t f i t
c o n t r o l l e r
r ( t )
u ( t )
y ( t )
R e f e r e n c e
m o d e l
A d a p t a t i o n
l e v e l
G e n e t i c
a l g o r i t h n
P
o
p
u
l
a
t
i
o
n
o
f
c
o
n
t
r
o
l
l
e
r
s
P
o
r
c
e
s
s
m
o
d
e
l
? ?myt
This allows the GMRAC to automatically evolve a
controller from generation to generation (i.e.,from
one time step to the next,but of course multiple
generations could occur between time steps) and
hence to tune a controller in response to changes
in the process or due to User change of the
specifications in the reference model,Overall,the
GMRAC provides unique features where
alternative controllers can be quickly applied to the
problem if they appear useful (e.g.,the process
(re)enters a new operating condition) and since it
has some inherent capabilities to learn via
evolution of its population of controllers,It is also
possible to use the genetic algorithm in on-line
tuning of estimators,The closest analogy to such
an approach is the use of the gradient method for
on-line estimator tuning,You can adapt the
GMRAC approach above for such a purpose,
5.5 Knowledge-Based Systems
In this section we will introduce two types of
knowledge-based approaches to control that
can be viewed as more general forms of
controllers than the basic (knowledge-based)
fuzzy controller,First,we provide an
overview of how to use an expert system as
a controller (i.e.,"expert control"); then we
highlight ideas on how to use planning
systems for control,
5.5.1 Expert Control
For the sake of our discussion,we will simply
view the expert system that is used here as a
controller for a dynamic system,as is shown in
Figure 5.7,Here,we have an expert system
serving as feedback controller with reference
input r and feedback variable y,It uses the
information in its knowledge-base and its
inference mechanism to decide what command
input u to generate for the plant,Conceptually,
we see that the expert controller is closely
related to the fuzzy controller,
FIGURE 5.7 expert control systems,
E x p e r t c o n t r o l l e r
I n f e r e n c e
m e c h a n i s m
k n o w l e d g e - b a s e
P r o c e s s
I n p u t s
u ( t )
O u t p u t s y
( t )
R e f e r e n c e i n p u t
r ( t )
There are,however,several differences,
1,The knowledge-base in the expert controller could
be a rule-base but is not necessarily so,It could be
developed using other knowledge-representation
structures,such as frames,semantic nets,causal
diagrams,and so on,
2,The inference mechanism in the expert controller is
more general than that of the fuzzy controller,It can
use more sophisticated matching strategies to
determine which rules should be allowed to fire,It
can use more elaborate inference strategies,For
instance,some expert systems use (a) "refraction,"
where if a rule has fired recently it may not be
allowed back into the "conflict set" (i.e.,the set of
rules that are allowed to fire),(b) "recency," where
rules that were fired most recently are given priority
in being fired again,and (c) various other priority
schemes,
It is in fact the case that an expert system is in a
sense more general than a fuzzy system since it
can be shown that a single rule in an expert
controller can be used to represent an entire fuzzy
controller [163],From another perspective,we can
"fuzzify" the expert controller components and
make it a more general fuzzy system,Regardless,
it is largely a waste of time to concern ourselves
with which is more general,What is of concern is
whether the traditional ideas from expert systems
offer anything on how to design fuzzy systems,
The answer is certainly affirmative,Clearly,certain
theory and applications may dictate the need for
different knowledge-representation schemes and
inference strategies,
Next,we should note that Figure 5.7 shows a
direct expert controller,It is possible to use
an expert system in adaptive or supervisory
control systems,Expert systems can be
used in a supervisory role for conventional
controllers or for the supervision of fuzzy
controllers (e.g.,for supervision of the
learning mechanism and reference model in
an adaptive fuzzy controller),Expert
systems themselves can also be used as
the basis for general learning controllers,
5.5.2 Planning Systems for Control
Artificially intelligent planning systems (computer programs
that emulate the way experts plan) have been used in path
planning and high-level decisions about control tasks for
robots,A generic planning system can be configured in the
architecture of a standard control system,as shown in
Figure 5.8,Here,the "problem domain" (the plant) is the
environment that the planner operates in,There are
measured outputs yk at step k (variables of the problem
domain that can be sensed in real time),control actions
Mk(the ways in which we can affect the problem domain),
disturbances dk (which represent random events that can
affect the problem domain and hence the measured
variable yk),and goals gk (what we would like to achieve in
the problem domain),There are closed-loop specifications
that quantify performance specifications and stability
requirements,
FIGURE 5.8 Closed-loop planning system (figure taken
from [162],? Hemisphere Publishing Corp.),
P l a n
d e c i s i o n s
P l a n
e x e c u t i o n
( R e ) P l a n P r o j e c t
P l a n g e n e r a r i o n
P l a n
s t e p
F i n d
p r o b l e m
P r o b l e m
d o m a i n
E x e c u t i o n m o n i t o r i n g
S e t
o f
p l a n s
O n e
p l a n
C o n t r o l
a c t i o n s
D i s t u r b a n c e s
kd
M e a s u r e d
o u t p u t s k
yku
P l a n
f a i l u r e
P l a n n e r
G o a l s k
g
It is the task of the planner in Figure 5.8 to monitor the
measured outputs and goals and generate control
actions that will counteract the effects of the
disturbances and result in the goals and the closed-
loop specifications being achieved,To do this,the
planner performs "plan generation," where it projects
into the future (usually a finite number of steps,and
often using a model of the problem domain) and tries
to determine a set of candidate plans,Next,this set of
plans is pruned to one plan that is the best one to
apply at the current time (where "best" can be
determined based on,e.g.,consumption of resources),
The plan is then executed,and during execution the
performance resulting from the plan is monitored and
evaluated,Often,due to disturbances,plans will fail,
and hence the planner must generate a new set of
candidate plans,select one,then execute that one,
? While not pictured in Figure 5.8,some planning systems
use "situation assessment" to try to estimate the state of
the problem domain (this can be useful in execution
monitoring and plan generation); others perform "world
modeling," where a model of the problem domain is
developed in an on-line fashion (similarly to on-line
system identification),and "planner design" uses
information from the world modeler to tune the planner
(so that it makes the right plans for the current problem
domain),We will,perhaps,think of such a planning
system as a general adaptive controller,
? The role of planning systems in fuzzy control could be
any one of the following,(1) the use of a fuzzy planner as
a controller,(2) the use of fuzzy "situation assessment"
in determining control actions,(3) the use of fuzzy "world
modeling" to generate a model of the plant that is useful
in making control decisions,(4) the use of a fuzzy
adaptive planning system (e.g.,a fuzzified version of the
adaptive planner in [ 162]),or (5) the use of a planning
system in a supervisory control role,
5.6 Intelligent and Autonomous
Control
Autonomous systems have the capability to independently
perform complex tasks with a high degree of success,
Consumer and governmental demands for such systems
are frequently forcing engineers to push many functions
normally performed by humans into machines,For
instance,in the emerging area of intelligent vehicle and
highway systems (IVHS),engineers are designing
vehicles and highways that can fully automate vehicle
route selection,steering,braking,and throttle control to
reduce congestion and improve safety,In avionic
systems a "pilot's associate" computer program has
been designed to emulate the functions of mission and
tactical planning that in the past may have been
performed by the copilot,In manufacturing systems,
efficiency optimization and flow control are being
automated,and robots are replacing humans in
performing relatively complex tasks,
From a broad historical perspective,each of these
applications began at a low level of automation,and
through the years each has evolved into a more
autonomous system,For example,today's automotive
cruise controllers are the ancestors of the controllers
that achieve coordinated control of steering,braking,
and throttle for autonomous vehicle driving,And the
terrain following,terrain avoidance control systems for
low-altitude flight are ancestors of an artificial pilot's
associate that can integrate mission and tactical
planning activities,The general trend has been for
engineers to incrementally,add more intelligence” in
response to consumer,industrial,and government
demands and thereby creates systems with increased
levels of autonomy,In this process of enhancing
autonomy by adding intelligence,engineers often
study how humans solve problems,then try to directly
automate their knowledge and techniques to achieve
high levels of automation,
Other times,engineers study how intelligent biological
systems perform complex tasks,then seek to
automate "nature's approach" in a computer algorithm
or circuit implementation to solve a practical
technological problem (e.g.,in certain vision systems),
Such approaches where we seek to emulate the
functionality of an intelligent biological system (e.g.,
the human) to solve a technological problem can be
collectively named "intelligent systems and control
techniques." It is by using such techniques that some
engineers are trying to create highly autonomous
systems such as those listed above,
In this section we will explain how "intelligent" control
methods can be used to create autonomous systems,
First we will define "intelligent control." Next,we
provide a framework for the operation of autonomous
systems to clarify the ultimate goal of achieving
autonomous behavior in complex technological
systems,
5.6.1 What Is "Intelligent Control"?
Since the answer to this question can get rather
philosophical,let us focus on a working definition
that does not dwell on definitions of "intelligence"
(since there is no widely accepted one partly
because biological intelligence seems to have
many dimensions and appears to be very complex)
and issues of whether we truly model or emulate
intelligence,but instead focuses on (1) the
methodologies used in the construction of
controllers and (2) the ability of an artificial system
to perform activities normally performed by
humans,
"Intelligent control" techniques offer alternatives to
conventional approaches by borrowing ideas from
intelligent biological systems,Such ideas can
either come from humans who are,for example,
experts at manually solving the control problem,or
by observing how a biological system operates
and using analogous techniques in the solution of
control problems,For instance,we may ask a
human driver to provide a detailed explanation of
how she or he manually solves an automated
highway system intervehicle distance control
problem,then use this knowledge directly in a
fuzzy controller,In another approach,we may train
an artificial neural network to remember how to
regulate the intervehicle spacing by repeatedly
providing it with examples of how to perform such
a task,
After the neural network has learned the task,it can
be implemented on the vehicle to regulate the
intervehicle distance by recalling the proper
throttle input for each value of the intervehicle
distance that is sensed,In another approach,
genetic algorithms may be used to automatically
synthesize and tune a control algorithm for the
intervehicle spacing control problem by starting
with a population of candidate controllers and then
iteratively allowing the most fit controller,which is
determined according to the performance
specifications,to survive in an artificial evolution
process implemented in a computer,In this way
the controller evolves over time,successively
improving its performance and adapting to its
environment,until it meets the prespecified
performance objectives,
Such intelligent control techniques may exploit the
information represented in a mathematical model
or may heavily rely on heuristics on how best to
control the process,The primary difference from
conventional approaches,such as PID control,is
that intelligent control techniques are motivated by
the functionality of intelligent biological systems,
either in how they perform the control task or in
how they provide an innovative solution to another
problem that can be adapted to solve a control
problem,This is not to say that systems that are
not developed using intelligent systems and
control techniques such as those listed above
cannot be called "intelligent"; traditionally,we have
often called any system intelligent if it is designed
to perform a task that has normally been
performed by humans (e.g.,we use the term
"intelligent" vehicle and highway systems),
A full discussion on defining intelligent control
involves considering additional issues in
psychology,human cognition,artificial
intelligence,and control,
5.6.2 Architecture and
Characteristics
Figure 5.9 shows a functional architecture for
an intelligent autonomous controller with an
interface to the process involving sensing
(e.g.,via conventional sensing technology,
vision,touch,smell,etc.),actuation (e.g.,via
hydraulics,robotics,motors,etc.),and an
interface to humans (e.g.,a driver,pilot,
crew,etc.) and other systems,
The "execution level" has low-level numeric signal
processing and control algorithms (e.g.,PID,optimal,
adaptive,or intelligent control; parameter estimators,
failure detection and identification (FDI) algorithms),
The "coordination level" provides for tuning,
schedul ing,supervision,and redesign of the
execution-level algorithms,crisis management,
planning and learning capabilities for the coordination
of execution-level tasks,and higher-level symbolic
decision making for FDI and control algorithm
management,The "management level" provides for the
supervision of lower-level functions and for managing
the interface to the human(s) and other systems,In
particular,the management level will interact with the
users in generating goals for the controller and in
assessing the capabilities of the system,The
management level also monitors performance of the
lower-level systems,plans activities at the highest
level (and in cooperation with humans),and performs
high-level learning about the user and the lower-level
algorithms,
FIGURE 5.9 intelligent autonomous controllers,
M a n a g e m e n t
l e v e l
C o o r d i n a t i o n
l e v e l
E x e c u t i o n
l e v e l
H u m a n s a n d o t h e r s u b s y s t e m s
P r o c e s s
Intelligent systems or intelligent controllers (e.g.,fuzzy,
neural,genetic,expert,and planning) can be employed
as appropriate in the implementation of various
functions at the three levels of the intelligent
autonomous controller,For example,adaptive fuzzy
control may be used at the execution level for
adaptation,genetic algorithms may be used in the
coordination level to pick an optimal coordination
strategy,and planning systems may be used at the
management level for sequencing operations,
Hierarchical controllers composed of a hybrid mix of
intelligent and conventional Systems are commonly
used in the intelligent control of complex dynamic
systems,This is because to achieve high levels of
autonomy,we often need high levels of intelligence,
which calls for incorporating a diversity of decision-
making approaches for complex dynamic learning and
reasoning,
There are several fundamental characteristics that have
been identified for intelligent autonomous control
systems,For example,there is generally a successive
delegation of duties from the higher to lower levels,
and the number of distinct tasks typically increases as
we go down the hierarchy,Higher levels are often
concerned with slower aspects of the system's
behavior and with its larger portions,or broader
aspects,There is then a smaller contextual horizon at
lower levels—that is,the control decisions are made
by considering less information,Higher levels are
typically concerned with longer time horizons than
lower levels,It is said that there is "increasing
intelligence with decreasing precision as one moves
from the lower to the higher levels" (see [179]),At the
higher levels there is typically a decrease in time-scale
density,a decrease in bandwidth or system rate,and a
decrease in the decision (control action) rate,In
addition,there is typically a decrease in the granularity
of models used—or,equivalently,an increase in model
abstractness at the higher levels,
Finally,we note that there is an ongoing
evolution of the intelligent functions of an
autonomous controller so that by the time
you implement its functions,they no longer
appear intelligent,just algorithmic,It is
because of this evolution principle,doubts
about our ability to implement "artificial
intelligence," and the fact that implemented
intelligent controllers are nonlinear
controllers,that many researchers feel more
comfortable focusing on enhancing
autonomy rather than achieving intelligent
behavior,
5.6.3 Autonomy
Next,we explain how to incorporate the notion of
autonomy into the conventional manner of thinking
about control problems,Consider the general control
system shown in Figure 5.10 where P is a model of the
plant,C represents the controller,and T represents
specifications on how we would like the closed-loop
system to behave (i.e.,closed-loop specifications),For
some classical control problems,the scope is limited
so that C and P are linear and T simply represents,for
example,stability,robustness,rise-time,and
overshoot specifications,In this case intelligent
control techniques may not be needed,As engineers,
we must remember that the simplest solution that
works is the best one,We tend to need more complex
controllers for more complex plants (where,for
example,there is a significant amount of uncertainty)
and more demanding closed loop specifications T,
Consider the case where the following statements hold,
? P is so complex that it is most convenient to represent
it with ordinary differential equations and discrete-
event system (DES) models (or some other hybrid mix
of models),and for some parts of the plant the model
is not known (or is too expensive to determine),
? T is used to characterize the desire to make the system
perform wetland act with high degrees of autonomy
(i.e.,via "so that the system performs well under
significant uncertainties in the system and its
environment for extended periods of time,and
compensates for significant system failures without
external intervention"),
The general control problem is how to construct C,given
P,so that T holds,The intelligent autonomous
controller described briefly in the previous section
provides a general architecture for C to achieve highly
autonomous behavior specified by T for very complex
plants P,
FIGURE 5.10 general control systems,
C P
T
From a control engineer's perspective,we are trying to
solve the general control problem (i.e.,we are trying to
find C to enhance autonomy),Often,in practice,
engineers in intelligent (and conventional) control are
often examining portions of the above general control
problem and trying to make incremental progress
toward a solution,For example,a simple direct fuzzy
controller could,perhaps,be called an "intelligent
controller" (although some would never call a
controller without adaptation capabilities an intelligent
controller) but not an "autonomous controller," as most
of them do not achieve high levels of autonomous
operation but merely help enhance performance as
many conventional controllers do (adaptive and
supervisory approaches slightly increase performance
but typically do not achieve full autonomy),
It is important to note that researchers in
intelligent control have been naturally led to
focus on the very demanding general control
problem described above for two reasons,
(1) in order to address pressing needs for
practical applications,and (2) since often
there is a need to focus on representing
more aspects of the process so that they
can be used to reduce the uncertainty in
making high-level decisions about how to
perform control functions that are normally
performed by humans,
Have we achieved autonomous control via intelligent
control or any other methods? This is a difficult
question to answer since certain levels of
autonomy have certainly been achieved but there
are no rigorous definitions of "degrees of
autonomy." For instance,relatively autonomous
robots and autonomous vehicles have been
implemented,It is clear that current intelligent
systems only roughly model their biological
counterparts,and hence from one perspective
they can achieve relatively little,What will we be
able to do if we succeed in emulating the functions
of their biological counterparts? Achieve full
autonomy via the correct orchestration of
intelligent control?
5.6.4 Example,Intelligent
Vehicle and Highway Systems
To make the operation of autonomous systems and
the notion of autonomy more concrete,let us
examine an intelligent vehicle and highway
systems (IVHS) problem of automating a highway
system,One possible general functional
architecture for automated highway sys tems is
shown in Figure 5.11,Here,suppose that we have
many vehicles operating on a large roadway
system in the metropolitan area of a large city,
Execution Level
Each vehicle is equipped with a (1) vehicle control
system that can control the brakes,throttle,and
steering to automate the driving task (for normal
operation or collision avoidance),In addition,suppose
that there is a (2) vehicle information system in each
vehicle that provides information to the driver (e.g.,
platoon lead vehicle information; vehicle health status;
information on traffic congestion,road construction,
accidents,weather,road conditions,lodging,and food;
etc.) and information to the overall system about the
vehicle (e.g.,if the vehicle has had an accident Or if the
vehicle's brakes have failed),For the roadway there are
(3) the traffic signal controllers (e.g.,for intersections
and ramp metering) and (4) the roadway information
systems that provide information to the driver and
other subsystems (e.g.,automatic signing systems
that provide rerouting information in case of
congestion,road condition warning systems,accident
information,etc.),
Coordination Level
In the coordination level shown in Figure 5.11,there
is a manager for vehicle control that (1) may
coordinate the control of vehicles that are in close
proximity to form "platoons," maneuver platoons,
and avoid collisions; and (2) provide information
about such control activities to the rest of the
system,In addition,there is a manager for vehicle
information that (1) makes sure that appropriate
vehicles get the correct information about road,
travel,and traffic conditions; and (2) manages and
distributes the information that comes in from
vehicles on accidents and vehicle failures (e.g.,so
that the control manager can navigate platoons to
avoid collisions),
The manager for traffic signal control could (1) utilize
information from the roadway information system
(e.g.,on accidents or congestion) to adaptively
change the traffic light sequences at several
connected intersections to reduce congestion; and
(2) provide information to the other subsystems
about signal control changes (e.g.,to the vehicle
information systems),The manager for roadway
information (1) provides information on road
Conditions,accidents,and congestion to the other
subsystems; and (2) provides information from the
other subsystems to the roadway for changeable
message signs (e.g.,rerouting information from
the traffic signal control manager),As indicated in
Figure 8.11,there are multiple copies of each of
the managers and the entire coordination level as
needed for different areas in the metropolitan
region,
Management Level
The management level is the traffic and vehicle
management center,which provides for high-
level management of traffic flow,It provides
an interface to other automated highway
systems (perhaps in rural areas or other
nearby metropolitan areas) and to traffic
authorities (e.g.,to provide information to
police and emergency services on accidents
and to input information on construction,
weather predictions,and other major events
that affect traffic flow),
FIGURE 5.11 Intelligent autonomous controller
for an intelligent vehicle and highway system,
It can interact with traffic authorities to advise
them on the best way to avoid congestion
given current weather conditions,
construction,and expected traffic loads,It
can monitor the performance of all the
lower-level subsystems in the coordination
and execution levels,and suggest corrective
actions if there are problems,
Fundamental Characteristics
Notice that in terms of the fundamental characteristics of
intelligent autonomous control systems discussed in
Section 5.6.2,we find a successive delegation of duties
as we go down the hierarchy of the controller in Figure
5.11,For example,high-level tasks at the management
level may involve reconfiguring traffic signaling due to
construction and weather,The coordination-level
manager for roadway information and traffic signal
control may develop a new signaling strategy,This
strategy would be implemented in the execution level on
the changeable message signs (to inform drivers) and
the traffic signal control strategy,The higher levels of the
hierarchy are often concerned with slower and broader
aspects of the system behavior (of course,in an accident
situation the traffic and vehicle management center
would react as quickly as possible to alert emergency
vehicles),The lower levels of the system have a smaller
"contextual horizon" since they consider much less
information in making decisions,
Also,the decision rate tends to be higher at the lower
levels (e.g.,the rate at which control corrections are
made as a vehicle automatically steers around a curve
may be on the order of milliseconds,while the decision
rate at the management level may be on the order of
minutes or hours),
Clearly,there is the need for a significant amount of
interdisciplinary activity to implement such a complex
control system that involves a wide range of
technologies and falls beyond the traditional scope of
control problems,There is no single control technique
(conventional or intelligent) that can be used to solve the
diversity of problems that is found in a complex
automated highway system problem,While conventional
systems and control technologies will certainly find wide
use in IVHS,it seems likely that intelligent systems and
control techniques will prove to be useful for at least
some functions,especially considering the focus on
automating what has traditionally been largely a human
control activity,Similar statements seem to hold for
many complex autonomous systems,
5.7 Summary
In this chapter we have provided an overview of the
relationships between fuzzy control and intelligent
control,Our overall objective is twofold,First,we wish
to provide the students who understands the basics of
fuzzy control with a view of the other areas of
intelligent control,as this tends to strengthen one's
understanding of fuzzy control,Second,we wish to
provide the students who knows some other area of
intelligent control with a view of fuzzy control,We
provided an overview of a conventional control-
engineering perspective on fuzzy control,Next,we
highlighted some ideas from expert control,planning
systems,neural networks,genetic algorithms,and
intelligent autonomous control,
Upon completing this chapter,the students should understand the
following,
? ? The general ideas in how conventional control compares to
fuzzy control,
? ? The basics of the operation of the multilayer perceptron and the
radial basis function neural network,
? ? The general ideas on how fuzzy systems and neural networks
are related and how techniques from each of the fields can be
used in the other,
? ? The basic mechanics of the operation of the genetic algorithm,
? ? How genetic algorithms can be used for the design of fuzzy
estimators or control systems,and some basic ideas on how a
genetic algorithm can be used in an adaptive controller to tune a
fuzzy or conventional controller,
? ? The connections to expert control,particularly in how expert
systems use more general knowledge representation and
inference,
? ? The basics of how a planning system operates and how a
planning system might be used in a fuzzy control system,
? A general definition of intelligent controllers,
? The general hierarchical functional architecture for
intelligent autonomous control systems,
? Some of the basic characteristics of intelligent
autonomous control systems,
? How to view the autonomous control problem as a
general control problem,
? Basic ideas in how to form an intelligent
autonomous controller for an IVHS application,
Essentially,this is a checklist of the major topics of
this chapter,
Chapter 5
第 6章 神经网络控制
6.1 概述
6.1.1生物神经元模型
6.1.2 人工神经元模型
6.1.3 人工神经网络模型
6.1.4 神经网络的学习方法
6.1.1生物神经元模型
人脑大约包含 1012个神经元,分成约 1000种
类型,每个神经元大约与 102~ 104个其他神经
元相连接,形成极为错综复杂而又灵活多变的
神经网络。每个神经元虽然都十分简单,但是
如此大量的神经元之间、如此复杂的连接却可
以演化出丰富多彩的行为方式。同时,如此大
量的神经元与外部感受器之间的多种多样的连
接方式也蕴含了变化莫测的反应方式。
从生物控制论的观点来看,神经元作
为控制和信息处理的基本单元,具有下列
一些重要的功能与特性,
? 时空整合功能
?兴奋与抑制状态
?脉冲与电位转换
?神经纤维传导速度
?突触延时和不应期
?学习、遗忘和疲劳
6.1.2 人工神经元模型
?人工神经元是对生物神经元的一种模拟
与简化。它是神经网络的基本处理单元。
如图所示为一种简化的人工神经元结构。
它是一个多输入、单输出的非线性元件。
?其输入、输出关系可描述为
?其中,是从其他神经元传来的
输入信号; 表示从神经元 j到神经元 i的
连接权值; 为阈值; 称为激发函数
或作用函数。
?
?
??
n
j
ijiji xwI
1
?
)( ii Ify ?
),,2,1( njx j ????
ijw
i? )(?f
输出激发函数 又称为变换函数,它决
定神经元(节点)的输出。该输出为 1或 0,
取决于其输入之和大于或小于内部阈值 。
函数 一般具有非线性特性。下图表示
了几种常见的激发函数。
1,阈值型函数(见图( a),( b))
2,饱和型函数(见图( c))
3,双曲函数(见图( d))
4,S型函数(见( e))
5,高斯函数(见图( f))
)(?f
i? )(?f
6.1.3 人工神经网络模型
?人工神经网络是以工程技术手段来模拟
人脑神经元网络的结构与特征的系统。
利用人工神经元可以构成各种不同拓扑
结构的神经网络,它是生物神经网络的
一种模拟和近似。就神经网络的主要连
接型式而言,目前已有数十种不同的神
经网络模型,其中前馈型网络和反馈型
网络是两种典型的结构模型。
1,前馈型神经网络
? 前馈型神经网络,又称前向网络( Feed forward NN)。
如图所示,神经元分层排列,有输入层、隐层(亦称
中间层,可有若干层)和输出层,每一层的神经元只
接受前一层神经元的输入。
? 从学习的观点来看,前馈网络是一种强有力的学习系
统,其结构简单而易于编程;从系统的观点看,前馈
网络是一静态非线性映射,通过简单非线性处理单元
的复合映射,可获得复杂的非线性处理能力。但从计
算的观点看,缺乏丰富的动力学行为。大部分前馈网
络都是学习网络,它们的分类能力和模式识别能力一
般都强于反馈网络,典型的前馈网络有感知器网络、
BP 网络等。
2,反馈型神经网络
? 反馈型神经网络( Feedback NN)的结构如图
所示。如果总节点(神经元)数为 N,那么每
个节点有 N个输入和一个输出,也就是说,所
有节点都是一样的,它们之间都可相互连接。
? 反馈神经网络是一种反馈动力学系统,它需要
工作一段时间才能达到稳定。 Hopfield神经网
络是反馈网络中最简单且应用广泛的模型,它
具有联想记忆( Content一 Addressible
Memory,CAM)的功能,如果将 Lyapunov函
数定义为寻优函数,Hopfie1d神经网络还可以
用来解决快速寻优问题。
6.1.4 神经网络的学习方法
? 学习方法是体现人工神经网络智能特性的主要标志,
离开了学习算法,人工神经网络就失去了自适应、自
组织和自学习的能力。目前神经网络的学习方法有多
种,按有无导师来分类,可分为有教师学习
( Supervised Learning)、无教师学习
( Unsupervised Learning)和再励学习
( Reinforcement Learning)等几大类。在有教师的学
习方式中,网络的输出和期望的输出(即教师信号)
进行比较,然后根据两者之间的差异调整网络的权值,
最终使差异变小。在无教师的学习方式中,输入模式
进人网络后,网络按照一预先设定的规则(如竞争规
则)自动调整权值,使网络最终具有模式分类等功能。
再励学习是介于上述两者之间的一种学习方式。
神经网络中常用的几种最基本的学习方法
1,Hebb学习规则
?两个神经元同时处于激发状态时,它们
之间的连接强度将得到加强,这一论述
的数学描述被称为 Hebb学习规则
?Hebb学习规则是一种无教师的学习方法,
它只根据神经元连接间的激活水平改变
权值,因此这种方法又称为相关学习或
并联学习。
2,Delta( δ)学习规则
?δ规则实现了 E中的梯度下降,因此使误
差函数达到最小值。但 δ学习规则只适用
于线性可分函数,无法用于多层网络。
BP网络的学习算法称为 BP算法,是在 δ
规则基础上发展起来的,可在多网络上
有效地学习。
3.概率式学习
? 从统计力学、分子热力学和概率论中关于系统
稳态能量的标准出发,进行神经网络学习的方
式称概率式学习。神经网络处于某一状态的概
率主要取决于在此状态下的能量,能量越低,
概率越大。同时,此概率还取决于温度参数 T。
T越大,不同状态出现概率的差异便越小,较
容易跳出能量的局部极小点而到全局的极小点;
T越小时,情形正相反。概率式学习的典型代
表是 Boltzmann机学习规则。它是基于模拟退
火的统计优化方法,因此又称模拟退火算法。
4.竞争式学习
?竞争式学习属于无教师学习方式。此种学
习方式利用不同层间的神经元发生兴奋性
联接,以及同一层内距离很近的神经元间
发生同样的兴奋性联接,而距离较远的神
经元产生抑制性联接。在这种联接机制中
引人竟争机制的学习方式称为竟争式学习。
它的本质在于神经网络中高层次的神经元
对低层次神经元的输入模式进行竞争识别。
6.2 前向神经网络
6.2.1 感知器网络
?感知器( perceptrvon)是一个具有单层
神经元的神经网络,并由线性阈值元件
组成,是最简单的前向网络。它主要用
于模式分类,单层的感知器网络结构如
下图所示。
感知器的一种学习算法,
?随机地给定一组连接权
?输入一组样本和期望的输出(亦称之为
教师信号)
?计算感知器实际输出
?修正权值
?选取另外一组样本,重复上述 2)~ 4)
的过程,直到权值对一切样本均稳定不
变为止,学习过程结束。
6.2.2 BP网络
?误差反向传播神经网络,简称 BP网络
( Back Propagation),是一种单向传
播的多层前向网络。在模式识别、图像
处理、系统辨识、函数拟合、优化计算、
最优预测和自适应控制等领域有着较为
广泛的应用。如图是 BP网络的示意图。
? 误差反向传播的 BP算法简称 BP算法,其基本
思想是最小二乘算法。它采用梯度搜索技术,
以期使网络的实际输出值与期望输出值的误差
均方值为最小。
? BP算法的学习过程由正向传播和反向传播组成。
在正向传播过程中,输入信息从输入层经隐含
层逐层处理,并传向输出层,每层神经元(节
点)的状态只影响下一层神经元的状态。如果
在输出层不能得到期望的输出,则转人反向传
播,将误差信号沿原来的连接通路返回,通过
修改各层神经元的权值,使误差信号最小。
1,BP网络的前馈计算
2,BP网络权值的调整规则
1),输出层权系数的调整
2),隐含层节点权系数的调整
3,BP学习算法的计算步骤
3,BP学习算法的计算步骤
1),初始化 置所有权值为较小的随机数
2),提供训练集
3),计算实际输出,计算隐含层、输出层
各神经元输出
4),计算目标值与实际输出的偏差 E
5),计算
6),计算
7),返回, 2), 重复计算,直到误差满足
要求为止
jkpw?
ijpw?
? 在使用 BP算法时,应注意的几个问题是,
? 1),学习开始时,各隐含层连接权系数的初值
应以设置较小的随机数较为适宜。
? 2),采用 S型激发函数时,由于输出层各神经元
的输出只能趋于 1或 0,不能达到 1或 0。在设置
各训练样本时,期望的输出分量 dpk不能设置为
1或 0,以设置为或 0,1较为适宜。
? 3),学习速率 η的选择,在学习开始阶段,η选
较大的值可以加快学习速度。学习接近优化区
时,η值必须相当小,否则权系数将产生振荡
而不收敛。平滑因子 α的选值在左右。
6.2.3 BP网络学习算法的改进
1.多层前向 BP网络的优点,
? 1),网络实质上实现了一个从输入到输出的映
射功能,而数学理论已证明它具有实现任何复
杂非线性映射的功能。这使得它特别适合于求
解内部机制复杂的问题;
? 2),网络能通过学习带正确答案的实例集自动
提取, 合理的, 求解规则,即具有自学习能力;
2.多层前向 BP网络的问题,
1),BP算法的学习速度很慢
2),网络训练失败的可能性较大
3),难以解决应用问题的实例规模和网络规模间的矛

4),网络结构的选择尚无一种统一而完整的理论指导,
一般只能由经验选定
5),新加入的样本要影响已学习成功的网络,而且刻
画每个输入样本的特征的数目也必须相同
6),网络的预测能力(也称泛化能力、推广能力)与
训练能力(也称逼近能力、学习能力)的矛盾
3,BP网络学习算法的改进
?1),增加, 惯性项
?2),采用动态步长
?3),与其他全局搜索算法相结合
?4),模拟退火算法
?目前在神经网络的学习中,基于梯度的
算法都不能从理论上保证收敛结果是全
局最优的。
6.2.4 神经网络的训练
? 可以任意逼近一个紧集上的任意函数这
一特点是神经网络广泛应用的理论基础。
但是,在实际应用中,目前尚未找到较
好的网络构造方法,确定网络的结构和
权值参数,来描述给定的映射或逼近一
个未知的映射,只能通过学习来得到满
足要求的网络模型。
神经网络训练的具体步骤如下
1.获取训练样本集
获取训练样本集合是训练神经网络的第一步,也是十分
重要和关键的一步。它包括训练数据的收集、分析、选择
和预处理等
2.选择网络类型与结构
神经网络的类型很多,需要根据任务的性质和要求来选
择合适的网络类型。
3.训练与测试
最后一步是利用获取的训练样本对网络进行反复训练,
直至得到合适的映射结果。
6.3 反馈神经网络
? 反馈网络 (Recurrent Network),又称自联想记忆网络,
其目的是为了设计一个网络,储存一组平衡点,使得
当给网络一组初始值时,网络通过自行运行而最终收
敛到这个设计的平衡点上。
? 反馈网络能够表现出非线性动力学系统的动态特性。
它所具有的主要特性为以下两点,
? 第一、网络系统具有若干个稳定状态。当网络从某一
初始状态开始运动,网络系统总可以收敛到某一个稳
定的平衡状态;
? 第二,系统稳定的平衡状态可以通过设计网络的权值
而被存储到网络中。
6.3.1 离散 Hopfield网络
1,网络的结构和工作方式
? 离散 Hopfield网络是一个单层网络,有个神经
元节点,每个神经元的输出均接到其它神经元
的输入。
? 各节点没有自反馈,每个节点都附有一个阀值。
每个节点都可处于一种可能的状态( 1或- 1),
即当该神经元所受的刺激超过其阀值时,神经
元就处于一种状态(比如 1),否则神经元就
始终处于另一状态(比如- 1)。
? 整个网络有两种工作方式:即异步方式和同步
方式。
? 1),异步方式
? 2),同步方式
2,稳定性和吸引子
3,连接权的设计
4,联想记忆
6.3.2 连续 Hopfield网络
?连续 Hopfield 网络也是单层的反馈网络。
其实质上是一个连续的非线性动力学系
统,它可以用一组非线性微分方程来描
述。当给定初始状态,通过求解非线性
微分方程组即可求得网络状态的运行轨
迹。若系统是稳定的,则它最终可收敛
到一个稳定状态。
6.3.3 Boltzmann机
1,Boltzmann机网络结构和工作方式
Boltzmann机网络是一个相互连接的神经网
络模型,具有对称的连接权系数,及 wij= wji
且 wii=0。网络由可见单元( Visible Unit)和
隐单元( Hidden Unit)构成。可见单元由输
入、输出部分组成。每个单元节点只取 1或 0
两种状态。 1代表接通或接受,0表示断开或
拒绝。当神经元的输入加权和发生变化时,
神经元的状态随之更新。各单元之间状态的
更新是异步的。
?与 Hopfield网络相似,Boltzmann机的实际
运行也分为两个阶段,
?第一阶段是学习和训练阶段,即根据学习
样本对网络进行训练,将知识分布地存储
于网络的连接权中;
?第二阶段是工作阶段,即根据输入运行网
络得到合适的输出,这一步实质上是按照
某种机制将知识提取出来。
2,网络的学习和训练
网络学习的目的是通过给出一组学习样本,经学习后得
到 Boltzmann机各种神经元之间的连接权 wij,
Boltzmann机网络学习的步骤可归纳如下,
1),随机设定网络的连接权 wij(0)及初始高温。
2),按照已知的概率 p(xα),依次给定学习样本。在样本
的约束下,按照模拟退火程度运行网络,直至达到平衡
状态,统计出各 pij。在无约束条件下,按同样的步骤并
同样的次数运行网络,统计出各 p’ij。
3),按下述公式修改权值
wij(k+1)=wij(k)+η(pij-p’ij),η>0
4),重复上述步骤,直到 pij-p’ij小于一定的容限。
6.4 神经网络 PID控制
? 尽管神经网络控制技术有许多潜在的优势,但单纯使
用神经网络的控制方法的研究仍有待进一步发展。通
常将人工神经网络技术与传统的控制理论或智能技术
综合使用。神经网络在控制中的作用有以下几种,
? 1.在传统的控制系统中用以动态系统建模,充当对象
模型;
? 2.在反馈控制系统中直接充当控制器的作用;
? 3.在传统控制系统中起优化计算作用;
? 4.与其他智能控制方法如模糊逻辑、遗传算法、专家
控制等相融合。
6.4.1 基于 BP神经网络控制参数自学习 PID
控制
BP神经网络具有逼近任意非线性函数的能力,而且
结构和学习算法简单明确。通过神经网络自身的学习,
可以找到某一最优控制律下的 P,I,D参数。基于 BP
神经网络的 PD控制系统结构如图所示,控制器由两个
部分组成:①经典的 PID控制器:直接对被控对象进行
闭环控制,并且 KP,KI,KD三个参数为在线整定;②神经
网络 NN:根据系统的运行状态,调节 PID控制器的参
数,以期达到某种性能指标的最优化。即使输出层神
经元的输出状态对应于 PID控制器的三个可调参数
KP,KI,KD,通过神经网络的自学习、调整权系数,从而
使其稳定状态对应于某种最优控制律下的 PID控制器参
数。
基于 BP神经网络的 PID控制算法可归纳如下,
1),事先选定 BP神经网络 NN的结构,即选定输入层节点
数 M和隐含层节点数 Q,并给出权系数的初值 w(2)ij(0),
w(3)li(0),选定学习速率 η和平滑因子 α,k=1;
2),采样得到 r(k)和 y(k),计算 e(k)=z(k)=r(k)-y(k);
3),对 r(i),y(i),u(i-1),e(i)进行归一化处理,作为 NN的输入;
4),前向计算 NN的各层神经元的输入和输出,NN输出层
的输出即为 PID控制器的三个可调参数 KP(k),KI(k),KD(k);
5),计算 PID控制器的控制输出 u(k),参与控制和计算;
6),计算修正输出层的权系数 w(3)li(k);
7),计算修正隐含层的权系数 w(2)ij(k);
8),置 k=k+1,返回到, 2), 。
6.4.2 改进型 BP神经网络控制参数自学习
PID控制
?将神经网络用于控制器的设计或直接学
习计算控制器的输出(控制量),一般
都要用到系统的预测输出值或其变化量
来计算权系数的修正量。但实际上,系
统的预测输出值是不易直接测得的,通
常的做法是建立被控对象的预测数学模
型,用该模型所计算的预测输出来取代
预测处的实测值,以提高控制效果。
1.采用线性预测模型的 BP神经网络 PID控制器
采用线性预测模型的 BP神经网络 PID控制系统算法归纳如下,
1),事先选定 BP神经网络 NN的结构,即选定输入层节点数
M和隐含层节点数 Q,并给出权系数的初值 w(2)ij(0),w(3)li(0),
选定学习速率 η和平滑因子 α,k=1;
2),用线性系统辨识法估计出参数矢量 θ(k),从而形成一步
预报模型式;
3),采样得到 r(k)和 y(k),计算 e(k)=z(k)=r(k)-y(k);
4),对 r(i),y(i),u(i-1),e(i)进行归一化处理,作为 NN的输入;
5),前向计算 NN的各层神经元的输入和输出,NN输出层的
输出即为 PID控制器的三个可调参数 KP(k),KI(k),KD(k);
6),计算 PID控制器的控制输出 u(k),参与控制和计算;
7).计算 和 ;
8),计算修正输出层的权系数 w(3)li(k);
9),计算修正隐含层的权系数 w(2)ij(k);
10),置 k=k+1,返回到, 2), 。
)1( ?? ky )(/)1( kuky ??? ?
2.采用非线性预测模型的 BP神经网络 PID控制

基于 BP神经网络的 PID控制算法可归纳如下,
1),事先选定 BP神经网络 NN的结构,即选定输入层节点数
M和隐含层节点数 Q,并给出权系数的初值 w(2)ij(0),w(3)li(0),
选定学习速率 η和平滑因子 α,k=1;
2),采样得到 r(k)和 y(k),计算 e(k)=z(k)=r(k)-y(k);
3),对 r(i),y(i),u(i-1),e(i)进行归一化处理,作为 NN的输入;
4),前向计算 NN的各层神经元的输入和输出,NN输出层的
输出即为 PID控制器的三个可调参数 KP(k),KI(k),KD(k);
5),计算 PID控制器的控制输出 u(k),参与控制和计算;
6).前向计算 NNM的各层神经元的输入和输出,NNM的输出
为,计算修正隐含层和输出层的权系数;
7).计算 ;
8),计算修正输出层的权系数 w(3)li(k);
9),计算修正隐含层的权系数 w(2)ij(k);
10),置 k=k+1,返回到, 2), 。
)1( ?? ky
)(/)1( kuky ??? ?
第 7章 专家控制系统
7.1 概述
7.1.1 专家系统的起源与发展
7.1.2 专家系统的一般结构
7.1.3 专家系统的知识表示和获取
7.1.4 专家系统的特点及分类
7.1.1 专家系统的起源与发展
?从本质上讲,专家系统是一类包含着知
识和推理的智能计算机程序,其内部含
有大量的某个领域专家水平的知识和经
验,能够利用人类专家的知识和解决问
题的方法来处理该领域的问题。
?专家系统可以解决额问题一般包括解释、
预测、诊断、设计、规划、监视、修理、
指导和控制等。发展专家系统的关键是
表达和运用专家知识,即来自人类的并
已经被证明对解决有关领域内的典型问
题是有用的事实和过程。专家系统和传
统的计算机, 应用程序, 最本质的不同
之处在于,专家系统所要解决的问题一
般没有算法解,并且经常要在不完全、
不精确或不确定的信息基础上做出结论。
7.1.2 专家系统的一般结构
?专家系统由知识库( Knowledge
Base)、推理机( Inference Engine)、
综合数据库( Global Database)、解
释接口( Explanation Interface)和知
识获取( Knowledge Acquisition)等
五部分组成。
7.1.3 专家系统的知识表示和获取
1,知识的表示
一种好的知识表示方法应具备如下性质,
? 充分表达:它应当有能力表达有关领域内的各种
所需知识。
? 充分推理:知识表示的形式应当有利于从旧知识
推出新知识,导出新结构。
? 有效推理:它应当有能力把附加信息结合到结构
中去,这些信息能使推理机把搜索方向放到最有
希望获得最佳解的方向上。
? 有效的知识获取:它有能力促使很方便的获取新
知识,更新知识库。
?2.知识的获取
?早期专家系统的知识获取工作由知识工
程师完成。
?随着专家系统研究的进展,人们研制出
了知识库编辑器,帮助知识工程师完成
知识获取工作。
?在知识获取过程中引人机器学习的方法,
促进了专家系统的进一步发展。
7.1.4 专家系统的特点及分类
1,专家系统的特点
?具有专家水平的专门知识
?能进行有效的推理
?专家系统的透明性和灵活性
?具有一定的复杂性与难度
2.专家系统的分类
? 诊断型专家系统
? 解释型专家系统
? 预测型专家系统
? 设计型专家系统
? 决策型专家系统
? 规划型专家系统
? 控制专家系统
? 教学型专家系统
? 监视型专家系统
6.2 专家控制系统的工作原理
7.2.1 专家控制系统的特点
7.2.2 专家控制系统的工作原理
7.2.3 建立专家系统的步骤
7.2.1 专家控制系统的特点
专家控制虽然引用了专家系统的思想和方法,
但它与一般的专家系统还有重要的差别,
? 通常的专家系统只完成专门领域问题的咨询功
能,它的推理结果一般用于辅助用户的决策;
而专家控制则要求能对控制动作进行独立的、
自动的决策,它的功能一定要具有连续的可靠
性和较强的抗扰性。
? 通常的专家系统一般处于离线工作方式,而专
家控制则要求在线地获取动态反馈信息,因而
是一种动态系统,它应具有使用的灵活性和实
时性,即能联机完成控制。
7.2.2 专家控制系统的工作原理
专家控制系统有知识基系统、数值算法
库和人-机接口三个并发运行的子过程。
三个运行子过程之间的通信是通过五个
信箱进行的,这五个信箱即出口信箱
( Outbox)、人口信箱( In box)、应
答信箱( Answer box)、解释信箱
( Result box)和定时器信箱( Timer
box)。
专家控制器通常由知识库( KB)、控制规则
集( CRS)、推理机( IE)和特征识别与信息
处理( FR& IP)四部分组成。
知识库用于存放工业过程控制的领域知识,
由经验数据库( DB)和学习与适应装置( LA)
组成。控制规则集是对被控对象的各种控制模
式和经验的归纳和总结。特征识别与信息处理
模块的作用是实现对信息的提取与加工,为控
制决策和学习适应提供依据。
7.2.3 建立专家系统的步骤
?建造一个建立专家系统的步骤专家系统。
大致需要确认、概念化、形式化、实现
和测试五个步骤。
?由于用于问题求解的专门知识的获取过
程是建造专家系统的核心,并且与建造
系统的每一步都密切相关,因此,从各
种知识源获取专家系统可运用的知识是
建造专家系统的关键环节。
专家控制器的设计原则
专家控制器对被控过程或对象进行实时
控制,必须在每个采样周期内都给出控
制信号,所以对专家系统运算(推理)
速度的要求是很高的。专家控制器在设
计上应遵循以下两条原则。
?提高专家系统的运行速度
?确保在每个采样周期内都能提供控制信

第 8 章
智能控制在过程控制中的应用
8.1 概述
工业生产过程的自动控制在很多工业领域占有重要
位置,控制效果的优劣直接影响到产品的质量、产量和生
产设备的运行寿命,影响到生产的安全、稳定和工人的劳
动强度,先进控制方法的研究具有明显的经济和社会意义。
对于简单过程系统,采用传统的经典或现代控制理论方法,
可以获得满意的控制效果。而对于复杂过程系统,由于其
具有非线性、时变、纯滞后、不确定等特性,采用传统的
控制方法难以取得好的控制效果,因此,其智能控制方法
成为研究热点。
智能控制理论是继经典控制理论, 现代控制理论之后
发展起来的, 是控制理论发展新阶段的产物, 其建立和发展
是以众多新兴学科为基础的 。 智能控制的基本出发点是采用
人工智能方法对复杂, 不确定性系统进行有效控制 。 智能控
制方法包括专家系统控制, 模糊控制, 神经网络控制和仿人
智能控制等, 这几种方法各有其不同的特点, 并已在不同领
域中取得了一些相当成功的应用, 但这些方法在单独模拟人
类智能活动时, 又存在着各自的局限性 。 因此, 许多学者试
图综合几种方法的优点, 以克服各自的局限性 。
实际上,智能活动既有感知(直观、形象)活
动,又有认知(逻辑)活动,两者是密切相关的,而
且又是可以互相转换的,也是符合生理和心理现象的,
神经网络计算和模糊逻辑推理恰恰反映了这两种活动
的特性,因此基于神经网络的模糊控制近年来逐渐成
为研究的热点。模糊控制和神经网络二者各自的优势
在于:模糊控制易于获得由语言表达的专家知识,能
有效的控制难以建立精确模型而凭经验可控制的系统,
而神经网络则由于其仿生特性更能有效利用系统本身
的信息,并能映射任意函数关系,具有并行处理和自
学习能力,容错能力也很强。
在集成大系统中,神经网络可用于处理低层感知数据,
模糊逻辑可用于描述高层的逻辑框架。神经网络和模糊系统
均属于无模型控制器和非线性动力学系统,但神经网络适合
处理非结构化信息,而模糊系统对处理结构化的知识更有效。
模糊神经网络控制大致可分为三类,第一类是直接在神经网
络的学习模型中引入模糊逻辑推理的方法,使其具有直接处
理模糊信息的能力;第二类是利用神经网络功能及映射能力,
去等效模糊系统中的各个模糊功能块;第三类是把模糊系统
和神经网络集成在一个系统中,以发挥各自的优势。
专家系统是符号逻辑人工智能中一个最重要、最活跃
的分支,但存在知识获取的困难,而神经网络方法具有很
强的自学习能力和自适应能力,能够实现快速推理。因此
将专家系统和神经网络方法集成应用,将能发挥他们的综
合优势。
在一些大型复杂系统中,采用单一的某种智能控制方
法往往不能满足控制要求,这时应考虑综合应用模糊控制、
神经网络控制和专家系统控制等方法的集成智能控制方法。
本章首先讨论复杂工业过程控制发展及其智能控制
方法的研究现状,然后具体介绍具有典型意义的氧乐果合
成过程智能控制方法的研究,以便对智能控制的应用方法
有一个比较完整的了解。
8.2 复杂工业过程控制的研究现状
关于复杂工业过程,目前尚无统一定义。其复杂性
可概括为两个方面:客观复杂性和认识复杂性。前者是指
客观工业过程中某种运动或性态跨越层次后整合的、不可
还原的新性态和相互关系;后者是指对客观工业过程中复
杂性的有效理解及其表达。但在实际工程中,有些专家认
为,若工业过程受行为变量影响很弱且过程主要由状态变
量描述,可认为是一个简单系统,即复杂工业过程的关键
是由行为变量所致。
按系统科学理论,工业过程有多种分类方法:若组成工
业过程系统的子过程或元部件比较少且其关系比较单纯,则
称为简单的工业过程;若组成工业过程系统的子过程或元部
件很多或非常大且其关系复杂,则称之为大系统工业过程;
若在其中子过程的种类不太多且关系又比较简单,一般可用
线性或易于表达的非线性关系描述,则称为简单大系统工业
过程;若在其中子过程种类很多且关系复杂,递阶层次结构
复杂,子过程间又耦合很紧,一般又不可用线性或易于表达
的非线性关系描述,则称为复杂大系统工业过程。
传统的经典控制或现代控制理论在解决复杂工业过程的控
制方面,有很大局限性,主要表现如下,
(1) 不确定性问题
(2) 高度非线性问题
(3) 半结构化与非结构化问题
(4) 不可确定性的问题
(5) 可靠性问题
复杂工业过程的控制问题期盼着用新的理论与方法
来实实在在地解决工业现场的实际问题。人们研究的复杂
工业过程是一个具有高度复杂、不可确定、多层次、网络
性系统,在一个层次上是不可能把工业过程完全弄清楚,
对其研究需要在多个层次上进行。所谓复杂工业过程乃是
工业过程中带有根本性的、普遍性的又是远远没有解决的
问题。这就需要我们在未来研究中,运用复杂系统理论提
供的新概念、新方法及新成果,结合已经形成的复杂工业
过程特有的概念体系和方法学,通过多个层次以及对多个
层次的综合集成研究,最终在个体层面上解答和揭示工业
过程。
从现阶段发展趋势看,在工业过程控制中控制策略的
智能化,决策支持的, 专家, 化已成为必然。通过知识工
程方法,将有关对象的定性知识、人的经验知识与技巧和
启发式逻辑推理有效地集成起来,从而构成知识库系统,
以支持系统控制策略和算法的优选及运行状态的优化,已
成为复杂工业过程控制的重要技术手段。其实质是对人的
能力放大和增强。计算机集成过程系统 (Computer
Integrated Process System, CIPS) 是工业过程控制进
入计算机时代的产物,以连续生产过程为研究对象,其目
标是实现计算机集成综合自动化。
虽然计算机在系统中起很大作用,但仍然是辅助工
具,人在监控级总体闭环中仍然起着不可取代的关键作用。
这包括人在内的系统,实质上是一种人机智能系统,在协
同作用过程中将展现出超过人的智力和才能的能力。但关
键在于加强控制理论同生产实际密切结合,注意引入智能
化方法和智能技术以及知识工程方法,逐步形成不同形式
的既简单又实用的控制结构和算法,使控制理论智能化和
工程化,以加快复杂工业过程控制的智能化进程。
8.3 复杂过程智能控制方法的研究现状
20世纪 60年代,由于空间技术,海洋技术和机器人
技术发展的需要,控制领域面临着被控对象的复杂性和不
确定性,以及人们对控制性能要求越来越高的挑战。被控
对象的复杂性和不确定性表现为对象特性的高度非线性和
不确定性,高噪声干扰,系统工作点动态突变性,以及分
散的传感元件与执行元件,分层和分散的决策机构,复杂
的信息模式和庞大的数据量。面对复杂的对象和复杂的环
境,用传统控制的理论和方法已经不能很好的完成控制任
务。因此,解决复杂系统控制问题的智能控制应运而生。
近年来,把传统控制理论与模糊逻辑、神经网络、
模式识别、遗传算法、小波分析等人工智能技术相结合,
充分利用人类的控制知识对复杂系统进行控制。世界各国
控制理论界也都在探索建立新一代的控制理论,以解决复
杂系统的控制问题。经过长期的孕育与探索研究,人们认
识到将人工智能原理和方法以及人的经验与智能用于复杂
工业过程,是解决复杂工业过程控制问题很有希望和前景
看好的途径。
人们在实践中观察到人类具有很强的学习和适应周围
环境的能力。有些复杂的系统,凭人的直觉和经验能很好地
进行操作并达到理想的结果,这就产生了一种仿人的控制理
论和方法,出现了新的、具有远大前程的, 智能控制理论,
研究方向。智能控制理论是对传统控制理论的发展,传统控
制是智能控制的一个组成部分,是智能控制的低级阶段,因
此,智能控制理论无疑是控制理论发展的高级阶段。
智能控制的建立和发展是以众多新兴学科为基础的,
其中思维科学是研究智能控制的重要认识论基础。智能控制
的基本出发点是仿人的智能实现对复杂不确定系统的有效的
控制,要模仿人的智能就要模仿人的思维方式,因此,必须
研究人的思维形式和特点。这主要从三个方面着手:一是模
拟人的抽象 (逻辑 )思维;二是模拟人的形象 (直觉 )思维;三
是模拟人的灵感 (顿悟 )思维。
神经网络理论和知识工程是研究智能控制的重要基础。
要从人脑神经系统结构和功能上模拟人的智能,必须研究
基于连接机制的神经网络理论。由于神经网络具有逼近任
意非线性函数的能力,并行信息处理及自学习等特点,因
此它已成为研究智能控制的重要基础。智能控制系统是以
知识为基础的系统,因此以研究知识表示、利用和获取为
中心内容的知识工程也是研究智能控制的重要基础。
研究和模仿人类智能是智能控制的最高目标,为模仿
和构造智能控制系统,生命科学和脑科学关于人体和脑功能
更深入的知识是不可缺少的,要研究生命系统中的自组织能
力、免疫能力和遗传能力的精确结构。可见智能控制必须靠
多学科联合才能取得新的质的突破。
智能控制系统由于被控对象的复杂性及不确定性,本
质上决定了它必然是非线性系统,因此,研究非线性系统的
理论如耗散结构论、突变论、协同论及混沌理论都可以作为
主要工具用于智能控制的研究。
智能控制的研究领域十分广泛,除了传统控制理论
外还包括:计划、学习、搜索算法、思维进化算法、复合
系统、容错、纠错、重构、自主,petri网、神经网络、模
糊逻辑、粗糙集理论等。智能控制所研究的被控对象可以
是某一复杂的生产过程控制系统,也可以是社会经济管理
系统、交通运输系统、环保及能源系统等,这里所说的被
控对象是广义的,它的规模可以很大,象全球人口系统稳
定性问题;也可以很小,如一个精密复杂的智能电子仪器。
基于人工神经网络理论、模糊数学理论,模式识别
理论及专家系统理论等基础理论,并融合生理学、心理学、
行为学、运筹学、传统控制理论等多学科的知识和方法,
出现了许多有效的智能控制理论和方法,主要有,(1) 模
糊控制 (FC); (2) 神经网络控制 (NNC); (3)专家控制 (EC);
(4)分层递阶智能控制 (HIC); (5)仿人智能控制 (AHIC); (6)
集成智能控制 (IIC),即将几种智能控制方法或机理融合在
一起而构成的智能控制方法; (7)组合智能控制,即将智
能控制和传统控制有机地结合起来而形成的控制方法。
8.4 氧乐果合成反应温度智能控制
8.4.1氧乐果合成反应过程简介
氧乐果又称氧化乐果,分子式为 C5H12NO4PS,
是在农业生产中使用较为广泛的一种农药。其生产方法
主要有后胺解法、先胺解法和异氰酸酯法,较为常用的
是后胺解法,其生产流程如图 8.1所示。
图 8.1 氧乐果生产流程示意图
缩 合 脱 溶氨 解缩 合重 排 成 盐
三 氯 化 磷
甲 醇
硫, 氨 氯 乙 酸 甲 酯 甲 胺
成 品
氧乐果生产中的合成
(胺解)工序是整个氧乐果生
产的关键,直接影响着氧乐果
粗原油的收率、含量等指标。
氧乐果的合成反应是一个剧烈
的放热反应。反应物是一甲胺
和精酯,反应产物是氧乐果粗
原油。氧乐果合成反应工艺如
图 8.2所示。
图 8.2 氧乐果合成反应工艺图
计量罐中的一甲胺滴注到反应釜内,经搅拌后均匀地
喷洒到反应釜中,与其中预先备好的精酯混合,发生剧烈的
放热反应,生成氧乐果粗原油。反应釜外壁缠有冷却盐水管
道,反应放出的热量经过热交换后被冷却盐水带走。有的计
量罐内也装有冷却盘管。开始投一甲胺以前,要把精酯冷却
到 -20℃ 以下。操作工根据反应釜内精酯量 计算出一甲
胺应投料量 。计算公式为,
(8-1)
式中 一般取 0.44或 0.43,其具体数值由技术人员根据一
甲胺的含量来确定。
JZM
M
JZkMM ?
k
影响反应釜温度的因素有很多,经认真分析,主要因素
如下,
① 一甲胺流量
一甲胺流量是影响反应釜温度的最主要因素,流量大,
则合成反应放热量多,温升快;流量小,则反应放热量少,
温升慢。其中一甲胺流量主要受调节阀的影响,调节阀开
度增大,则流量增加;反之,则流量减少。一甲胺流量还
受计量罐中一甲胺液位的影响,阀位不变时,液位越高,
则流量越大;反之,则流量越小。
② 冷却盐水流量和温度
冷却盐水流量越大,则冷却效果越好,温升越慢;反
之,则温升越快。冷却盐水温度越低,则冷却效果越好;
反之,则越差。其中一个反应釜的冷却盐水流量除受自身
阀门开度影响外,还受其它反应釜的冷却盐水阀门开关状
态的影响。
③ 精酯量
精酯量越多,则所需一甲胺量也越多,反应放热量就
越多;反之,则反应放热量就越少。
④ 一甲胺累积投料量
随着一甲胺累积投料量的增加,合成反应的放热量也
在增加。累积投料量达到总量的 25%时,反应最为剧烈,
温升较快;投料总量剩余 20%时,精酯已大部分被消耗掉,
即使以较快的速度投一甲胺,反应温度也不会有较大上升。
⑤ 反应进行时间
反应刚开始时,由于精酯较多,反应较为剧烈,局
部温升较大。随着反应时间的延长,精酯逐步被消耗掉,
与反应刚开始时相比,在一甲胺流量相等的情况下,反应
放热量减少,温升变慢。
⑥ 一甲胺温度
反应温度受一甲胺温度的影响,一甲胺温度越低,
则反应温度上升越慢;反之,则越快。但通常一甲胺温度
比较稳定,波动不大。
⑦ 反应起始温度
反应刚开始时,精酯被冷却到的温度称为反应起始温度。
起始温度越低,则温升越慢;反之,则越快。
⑧ 环境温度
环境温度影响冷却效果,环境温度越低,则冷却效果
越好,温升越慢;反之,则温升越快。
以上这些因素对氧乐果合成反应同时作用,共同影响
着反应温度。
氧乐果合成反应包含 7道工序,反应釜工艺流程如图
8.3所示。在这 7道工序中,氧乐果的合成反应过程对温度
和一甲胺投料速度均有较高的要求。
图 8.3 反应釜工艺流程图
投 料 中 和保 温滴 加预 冷 补 加 出 料
精 酯 投 料
目 标 M j z
氯 仿 投 料
盐 水 常
开 控 制
一 甲 胺 滴
加 控 制 目
标 是 - 1 2 ℃
盐 水 控 制
目 标 - 1 2 ℃
盐 水 控 制
温 度 保 持
在 - 1 2 ℃
盐 水 停 控
滴 加 盐 酸
进 行 中 和
补 加 氯 仿 反 应 工 序
结 束, 将
生 成 物 放

根据氧乐果合成的工艺要求,反应开始前先将精酯
冷却到 -20℃ 以下,然后,开始投一甲胺进行合成反应。当
反应釜温度上升到 -14~ -12℃ 后,在温度不超过 -12℃ 前提
下,要求尽可能快地完成一甲胺投料。
反应初始阶段,即使反应温度很低,温升较慢,甚
至是负增长,一甲胺的投料速度也不宜过快。因为,此时
反应釜内精酯含量较多,合成反应比较剧烈,容易造成局
部温度过高,降低合成质量。
一甲胺累积投料量已达到总量的 25%时,合成反应的
总体放热效果开始超过系统的冷却效果,系统的热平衡被打
破,反应温度开始快速增长,此时要采用较低的投料速度,
抑制合成反应的放热量和放热速度,从而使反应温度上升趋
势放缓。反应釜温度上升到接近 -12℃ 后,保持适当的投料速
度,系统处于热平衡状态,反应温度在小范围内变化。一甲
胺的剩余量少于总量的 20%时,由于反应釜内的精酯大部分
已经被消耗掉,此时可以以较快的速度进行投料,而反应釜
温度不会出现快速攀升 。
8.4.2 氧乐果合成反应对象模型分析
氧乐果合成反应具有多变量、非线性、时变、扰
动复杂的特点。系统的基本扰动是一甲胺流量。此外,
各反应釜冷却系统可能同时开或者部分开部分关,对每
次合成反应来说,还存在着冷却扰动。对同一个反应釜
的每一次合成反应,一甲胺的总投料量存在差异,即使
总投料量相同,还会存在由一甲胺的含量波动引起的总
投料量事实上的差异。因此一甲胺总投料量也是系统不
能忽视的一个扰动。
可以认为氧乐果合成反应过程控制系统如图 8.4所示。
被控系统有 3个输入量,,和, 其中 为一
甲胺流量,是控制系统的基本输入; 和 分别为冷
却扰动和一甲胺总投料量扰动。
图 8.4 氧乐果合成反应过程控制系统框图
)(tp )(1 tf )(2 tf )(tp
)(1 tf )(2 tf
调 节 器 W ( S )
测 量 变 送
)( tp
)(
1
tf )(
2
tf
)( te
)( tz
)( tx
+ ()yt
经过对氧乐果合成反应的运行参数和控制参数仔细观察,
可以将对象近似为一阶环节加纯滞后,其相应的传递函数为
(8-2)
反应是一个时变系统,模型参数从反应开始到结束,
在大范围内变化。纯滞后时间 从几秒钟变化到几分钟。
)1()( ??
?
Ts
KesG s?
?
与反应进行时间,精酯含量,一甲胺含
量,反应釜初始温度 和其它因素 有关,可以
用下式表示
(8-3)
是一个多因素决定的、在反应过程中不断变化的、
而且变化范围比较大的参数。也就是说,对同一釜的合成反
应,在不断的变化;对同一个反应釜的不同批次合成反应,
的变化曲线不完全相同;不同反应釜的合成反应,的变
化曲线也存在差异。时间常数 和 具有类似的特性。
? t JZM
LGM 0T O
),,,,( 0 OTMMtf LGJZ??
?
?
? ?
T ?
氧乐果合成反应的静特性具有明显的非线性。反应釜
温度响应曲线的增益 是在不断变化的,反应初期增益较
大,一甲胺累加已投料约为投料总量的 25%左右时,达
到最大,然后慢慢减小,到投料结束减至最小。 的大小
与一甲胺含量、总投料量有关,的变化规律如图 8.5,
Mt(kg)表示投料累积量。增益 使得系统具有高度非线性。
图 8.5 增益系数 K变化曲线
K
K
K
K
K
综合上述分析,可以看出氧乐果合成反应具有多变
量、非线性、时变、分布复杂等特点,传统的经典控制方
法已难以满足要求。因此要舍弃对对象模型的精确求解,
寻求新的控制方法。
8.4.3氧乐果合成反应温度智能控制
智能控制作为一个新兴的学科领域,不要求对象的精确
模型,对模型不确定、高度非线性的系统,能够对一个问题
的激励输入,由自身的智能行为,产生合适的求解问题响应。
智能控制已经广泛应用于用传统方法难以解决的复杂系统的
控制问题。国内外已经有很多研究人员将智能控制方法运用
到生化过程和化学合成过程的控制,取得了较好的效果。经
过认真分析和研究,氧乐果的合成反应过程适合采用智能控
制方法。
综合多方面的考虑,对氧乐果的合成反应实行分段控制。
即按照一甲胺累积投料量把反应过程划分为四段。记一甲胺投
料量为,累积投料量为,则可以把氧乐果合成反应过
程划分为 4个阶段,
Ⅰ 反应初始阶段,对应的反应时间为 [0,]
Ⅱ 温度上升阶段,对应的反应时间为
[, ]
Ⅲ 稳定反应阶段,对应的反应时间为
[, ]
Ⅳ 反应结束阶段,对应的反应时间为
[, ]
其中,, 的值分别为大约 60kg,90kg和 50kg,
M tM
1MM t ? 1t
21 MMM t ??
lt MMMM ???2
lt MMM ??
1t 2t
2t
3t
3t
4t
1M 2M lM
Ⅰ 反应初始阶段的控制策略
根据氧乐果的合成反应工艺规定,反应初始阶段的
流量要控制在 420kg/h左右,并可以根据反映釜初始温度
进行小范围调整。反应初始阶段的控制目标是反应釜温度
℃ 。因此可以对反应釜初始温度
℃ 时设定一个一甲胺初始流量,根据此初始流量和反
应初始温度确定一甲胺在反应初始阶段的流量控制。如果
℃ 则关阀。
6?? SDTT 200 ??T
0L
6?? SDTT
在反应初始阶段由经验可以归纳出反一甲胺流量的专
家控制算法,
IF THEN CONTROL_METHOD_INDEX=1
反应初始阶段控制算法( CONTROL_METHOD_INDEX=1)
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
1MM t ?
200 ??T 0?L
2021 0 ???? T 01 LkL ?
2122 0 ???? T 02 LkL ?
2223 0 ???? T 03 LkL ?
2324 0 ???? T 04 LkL ?
2425 0 ???? T 05 LkL ?
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF ℃ THEN
IF THEN
IF THEN
其中 根据经验获取,并可以在程
序运行时修改。这里取
2526 0 ???? T 06 LkL ?
2627 0 ???? T 07 LkL ?
2728 0 ???? T 08 LkL ?
2829 0 ???? T 09 LkL ?
2930 0 ???? T 010 LkL ?
300 ??T 011 LkL ?
6?? SDTT 0?L
0?T? LL 1.1?
? ?TkkK 111 ??
? ? ?? TkkK 111 ? ? ? T48.145.14.138.135.13.125.12.115.11.11
Ⅱ 温度上升阶段控制策略
该阶段对于后期氧乐果合成反应较为重要。如果温升过
快,会导致温度超标;反之,如果温升比较慢,则会使整体
投料时间延长。因此必须控制好温度上升速度,使其斜率在
合理的范围内。类似反应初始阶段,为本阶段的一甲胺流量
设定一个基本值,在此基础上进行调整。
记 为氧乐果合成反应进入 Ⅱ 阶段时的反应釜温度。则
可以认为理想温升速率
1L
20T
12
20)2(
tt
TTv SD
R ?
???
关键在于确定 Ⅱ 阶段的反应时间,根据经
验,的值为 12分钟。由此可以求得氧乐果合成反应 Ⅱ 阶段
的理想温升速率 。该反应阶段,一甲胺的流量由反应釜
温度,反应釜温度变化率 和一甲胺累加已投料量
决定。即控制器的输入输出映射关系为
如果知道映射关系,那么对任一确定的,,,
就能求出控制器的输出。但是氧乐果的合成是一个非常复杂
的化学反应过程,要求出精确的映射关系 是非常困难的。
只能对合成反应历史数据中的控制和运行参数采用抽取典型
样本点的方法,对 进行逼近,获得近似的映射关系 。
122 ttt ???
t?
Rv
T T? tM
LMTTf t ?,,,?
f T T? tM
f
f f?
对其它非样本值由 依据插
值法来确定相应的输出 。因
此我们决定采用神经网络技术对
该阶段合成反应进行投料控制。
如图 8.6所示,构造 3× 4× 1的 BP
网络,采用 型激励函数。为方
便起见,以温度变化率与理想温
升速率的比值 来反映温
度变化率,以实际流量与该反应
阶段的基本流量 的比值
作为控制器的输出。于是有
图 8.6 温升阶段神
经网络示意图
f?
K?
S
RvT /?
1L
1L
LK
L ?
1LKL L?
系统在第一阶段的试运行期间对氧乐果合成反应已
采集了近百釜的合成反应数据,我们从这些数据中挑选出
控制效果比较好的 27釜反应数据,然后在这 27釜数据中
选取 32组数据作为学习样本对网络进行训练。利用
MATLAB仿真工具对网络进行训练。网络的初始权值由
MATLAB仿真工具随机给定。
经过 4187步学习后网络收敛,误差平方和达到 0.02。
学习后的网络权值如下,
从挑选出的 27釜反应数据中选取 16组作为测试样本
对训练好的网络进行测试,网络的输出结果与实际基本吻
合。
T
ijW
?
?
?
?
?
?
?
?
?
?
?
??
??
?
8 7 4 6.03 0 2 1.13 6 7 7.00 3 3 8.2
1 4 8 5.03 2 1 6.20 1 6 5.22 3 8 7.0
9 4 6 6.08 1 6 9.19 7 2 1.03 1 8 4.0
? ? TjW 7614.05413.08513.03914.01 ???
Ⅲ 平稳反应阶段控制策略
由于氧乐果合成反应对一甲胺投料工艺要求在保证
温度不超标的情况下,应尽可能快的完成一甲胺投料,因
此,本阶段理想的控制效果应该是让反应釜温度曲线沿着
设定温度 呈水平直线走。对该反应阶段必须进行比较
精确的控制。根据经验,仍然对该反应阶段设定一个一甲
胺流量的基本值,在该流量值的基础上进行调节。
SDT
2L
该反应阶段由于温度允许变化的范围尤其是向上变化
的范围比较小,因此,当温度贴近 并处于上升情况时,
不但要考虑曲线的变化率,还要考虑曲线的二次变化率。
比如说,当 ℃ (假定 ℃ )时,曲线的
斜率为,那么当 和 这两种情况下
对一甲胺流量的调节是不一样的,对于前者显然调节的幅
度要大一些。当温度处于下降趋势时,也会遇到类似情况。
因此,与温升阶段相比较,该反应阶段除了考虑反应釜温
度,温度的一次变化率, 一甲胺累积已投料量
外,还应该考虑反应釜温度的二次变化率 。
SDT
9.11??T 12??SDT
0?? kT? 0?T?? 0?T??
T,T
tM T?
控制器的输入为
输入输出的映射关系为
可以看出,该映射关系比温升
反应阶段更为复杂,要求出其精确解
更为困难,因此,我们依然决定采用
神经网络技术对该映射关系进行逼近,
从而实现对该反应阶段的一甲胺投料
控制。构造的神经网络结构如图 8.7所
示。
? ?TtMTTTI ????
图 8.7 平稳反应阶
段神经网络示意图
T
T?
T?
tM
LK
LMTTTf t ?,,,,???
神经网络采用 4× 5× 1结构,网络的输出依然为一
甲胺的控制流量 与该阶段流量基本值 的比例系
数,即 学习后网络的权值为
控制器的输出与实际流量基本吻合。
L 2L
LK
2L
LK
L ?
T
ijW
?
?
?
?
?
?
?
?
?
?
?
?
??
??
??
??
?
3 3 1 6.22 6 4 4.07 6 5 9.03 3 1 4.25 3 2 7.1
1 1 3 4.25 6 4 8.11 0 1 4.23 3 2 6.02 1 3 6.0
0 1 2 1.29 6 5 4.14 2 1 1.06 3 3 4.08 6 5 1.0
1 1 2 8.28 7 4 3.03 3 1 7.21 6 9 7.23 3 2 3.0
? ? TjW 3 3 6 7.03 7 4 9.05 4 9 8.04 1 4 2.03 3 1 6.01 ???
Ⅳ 反应结束阶段控制策略
在该阶段,由于氧乐果的合成反应已经接近尾声,反
应釜内的精酯大部分已被消耗掉,因此一甲胺的投料速度
对反应釜温度的影响不太敏感。可以以较快的速度进行投
料。对该阶段的投料控制只需要考虑反应釜温度 和温
度的一次变化率 的大小。因此可以采用基于专家的控
制方法,实现该反应阶段的投料控制。
T
T?
8.4.4 控制效果及总结
至此,已经完成了对氧乐果合成反应的一甲胺投料
控制。控制系统的实际运行效果与人工控制相比较,如图
8.8所示。图中各曲线的意义:①反应釜温度曲线;②一甲
胺流量曲线;③冷却盐水温度曲线;④计量罐内一甲胺液
位曲线;⑤一甲胺投料阀开度曲线。系统的控制软件既能
进行自动控制,又能进行人工控制,人工 -自动控制还可以
随时切换。
图 8.8a 人工控制反应曲线 T0=-32.6℃ TL=-35.3℃




t

图 8.8b 人工控制反应曲线 T0=-23.5℃ TL=-31.5℃




t

图 8.8c 自动控制反应曲线 T0=-22.0℃ TL=-33.6℃




t

图 8.8d 自动控制反应曲线 T0=-24.1℃ TL=-29.5℃




t

自动控制是由控制软件根据设计好的控制算法对氧乐果
的合成反应进行投料控制,不需要人的干预。人工控制则是
由操作工观察计算机采集到的反应数据和反应釜温度曲线的
变化趋势,根据自己的经验,通过键盘输入控制量,对合成
反应的一甲胺投料进行控制。图 8.8a,b是由操作工进行人工
控制的反应曲线图。可以看出,在 8.8a中,由于操作工过于
保守,曲线还未上升到设定温度就拐弯了,这势必会延长投
料时间。在 8.8b中,则由于操作工初始投料过快,没有及时
减慢一甲胺流量,造成温度超标。而在 8.8c,d所示的自动控
制曲线中,显然克服了上述不足,取得了良好的控制效果。
在氧乐果的合成反应投料控制中,反应初始阶段由于
反应釜温度较低和投料工艺的规定,可以对其进行粗调。反
应结束阶段,由于反应接近尾声,系统放热量降低,对整体
温度的影响已经很微弱。对这两个反应阶段运用基于专家的
控制算法,可以获得令人满意的控制效果。在温升阶段,由
于化学反应比较剧烈,系统的温度效应非常明显,对该反应
阶段的控制效果直接影响着后期的合成反应和总体投料时间。
在反应平稳运行阶段,要求反应釜温度只能在小范围内波动,
并不得超标。因此对这两个阶段的合成反应的控制就比较关
键。采用基于神经网络技术的控制算法,比较好的实现了这
两个阶段的投料控制 。
氧乐果的合成反应是一个十分复杂的化学反应过程,
每一釜合成反应,不同釜的合成反应都存在着差异。因此,
对神经网络训练样本的选择就成为影响控制效果的关键。
选择训练样本必须要考虑各个反应釜温度值、各个温度下
的温度一次变化率、二次变化率和各个一甲胺累积已投料
量下的运行参数。系统在试运行初期,由操作工通过计算
机对氧乐果的合成反应进行人工控制,系统自动记录反应
的运行参数和控制参数,然后从控制效果比较好的参数中
抽取样本点对神经网络进行训练,训练后的网络在一定范
围内取得了比较好的控制效果。
第八章
END