%\setcounter{chapter}{7}
\chapter{Fuzzy Systems}
\label{chp:fuzzysys}
\begin{flushright}
\parbox{5.5in}{It is in the response to mistakes, of technique or of judgment, that one sees most clearly the human side of science's practitioners: a mix of pride, stubbornness, humility, honesty, dismay, and regret that one could expect to encounter in any section of the population. There are the inevitable diehards, whose pride forces them to concoct ever-more-elaborate explanations for the facts in order to avoid confession of error. There are the crusaders, determined at all costs to expose the foolishness. And there are the ``told-you-so's,'' generally members of the scientific elite, who make little contribution while the debate is raging but are ready to heap scorn on the perpetrators afterward for their ``obvious'' mistakes. All this, of course, is the antithesis of objective science, but follows as inevitably as night follows day from the fact that science is practiced by people and not by automatons.~\cite[page~291]{ball99}}
\end{flushright}

\bigskip

\section{Motivation and Basic Definitions}
%Conventional control algorithms require a mathematical model of the dynamical system to be controlled. The mathematical model is then used to construct a controller. In many practical situations, however, it is not always feasible to obtain an accurate mathematical model of the controlled system.

In Chapter~\ref{chap:PID_control}, we present a controller design approach when a mathematical model of the process to be controlled is not available to the control engineer.\index{mathematical model!not available to control engineer} In this Chapter, we discuss an alternative approach to the controller design when a mathematical model of the controlled system is not available to us. {\em Fuzzy logic control\/}\index{fuzzy logic control} offers a way of dealing with modeling problems by implementing linguistic, non-formally expressed control laws\index{control laws!linguistic based} derived from expert knowledge.\index{expert knowledge!to design a controller} This approach is especially successful in the case of processes such as washing machines, camera focusing, or drying processes that are being controlled well by human operators. The control of such processes can be captured in the form of rules
\[
\mb{IF (process state) THEN (control action)}.
\]
Thus, by a rule we will understand an IF-THEN statement\index{IF-THEN statement}\index{IF-THEN rules} that defines the set of facts that must be true (the IF part) before a set of actions (the THEN part) can be executed. The basic notion of fuzzy logic\index{fuzzy logic} is {\em fuzzy set}.\index{fuzzy set} An ordinary set, or simply a set,\index{ordinary set|see{set}}\index{set!collection of objects} is a collection of objects. Ordinary sets have two membership states: inclusion or exclusion.\index{ordinary set!two membership states}\index{membership states!inclusion or exclusion} An object is either in the set or it is not. Thus the degree to which an object is a member of a set is either 0 or 1. For example, a car is fast if it is driven faster than $65$ mph, and slow if it is driven slower than $65$ mph---see Figure~\ref{fig:crisp}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{crisp.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/crisp.bmp}
%\hskip1.75in\special{bmp:c:/mybook/crisp.bmp x=3.33in y=2.5in}
\caption{An example of a crisp set---fast cars.}
\label{fig:crisp}
\end{figure}
This is the reason we sometimes refer to ordinary sets as {\em crisp\/} sets.\index{crisp set|see{ordinary set}} Fuzzy sets, on the other hand, allow for partial membership\index{partial membership} in a set. The degree to which an object is a member of a fuzzy set can vary between $0$ and $1$. With a fuzzy set, we have a gradual transition from membership to nonmembership. For example, a car moving with velocity of $65$ mph is a member of the fuzzy set FAST to degree $0.5$. A car being driven $57.5$ mph is FAST to degree $0.25$---see Figure~\ref{fig:fuzzy}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{fuzzy.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/fuzzy.bmp}
%\hskip1.75in\special{bmp:c:/mybook/fuzzy.bmp x=3.33in y=2.5in}
\caption{A fuzzy set FAST.}
\label{fig:fuzzy}
\end{figure}


We next illustrate the crisp and fuzzy versions of the sets SLOW and FAST. Observe the sudden change of membership in the crisp SLOW and FAST sets at a speed of $65$ mph in Figure~\ref{fig:crisp2}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{crisp2.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/crisp2.bmp}
%\hskip1.75in\special{bmp:c:/mybook/crisp2.bmp x=3.33in y=2.5in}
\caption{Crisp sets for SLOW and FAST.}
\label{fig:crisp2}
\end{figure}
The fuzzy SLOW and FAST sets allow for a gradual change from SLOW to FAST for a car moving between $50$ and $80$ mph as it is illustrated in Figure~\ref{fig:fuzzy2}. Notice that a car moving at a speed between $50$ and $80$ mph has partial membership in SLOW and partial membership in FAST at the same time.
\begin{figure}
\centering
\includegraphics[scale=0.5]{fuzzy2.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/fuzzy2.bmp}
%\hskip1.75in\special{bmp:c:/mybook/fuzzy2.bmp x=3.33in y=2.5in}
\caption{Fuzzy sets for SLOW and FAST.}
\label{fig:fuzzy2}
\end{figure}
In the above example, the variable SPEED can have two possible linguistic values: SLOW and FAST. For this reason, we refer to the variable SPEED as the {\em linguistic variable\/}\index{linguistic variable} because its possible values are the linguistic values: in this example they are SLOW and FAST.\index{linguistic values}

With the above examples in mind, we formally define a fuzzy set. For this, we need to introduce some notation. Let $U$ be a set. We use $u\in U$ to denote that $u$ is an element of $U$. We call $U$ the {\em universe of discourse\/},\index{universe!of discourse}\index{universe} or just the {\em universe}. We first recall the definition of a function. A function $A$ from a set $X$ to a set $Y$ is a set of ordered pairs in $X\times Y$\index{function!set of ordered pairs} with the property that if $(x,y)$ and $(x,z)$ are elements of $A$, then $y=z$.
\begin{defn}[Fuzzy set]
A fuzzy set $A$ on $U$ is a function that maps $U$ into the interval $[0,1]$.\index{fuzzy set!definition of} Equivalently,
\[
A=\{(u,\mu_{A}(u))\,:\,u \in U\},
\]
where $\mu_{A}$ is commonly called the membership function\index{membership function} of the fuzzy set $A$.
\end{defn}\markdefn

Note that the concept of a fuzzy set generalizes that of a crisp set in the following way. Let $V\subset U$. Define $\mu_V: U \to [0,1]$ by $\mu_V(u)=1$ if $u\in V$ and $\mu_V(u)=0$ otherwise. Then $V$ can be identified with the fuzzy set associated with $\mu_V$. In other words, the subsets of $U$ are identified with the functions from $U$ to the two point set $\{0,1\}$.
\begin{example} \rm
Consider the following universe $U=\{4,5,6,7,8\}$. Let
\[
A=\{(4,0.0),(5,0.5),(6,1.0),(7,0.5),(8,0.0)\}.
\]
Then $A$ is a fuzzy set. One interpretation of $A$ is closeness to $6$.
\end{example}
\markex
Let $A$ and $B$ be fuzzy sets on $U$. We define the {\em union\/}, {\em intersection\/}, and {\em complement\/} using the following membership\index{union!of fuzzy sets} functions:

\begin{tabular}{l}
{\bf union}: $\mu_{A \cup B}(u)=\max\{\mu_{A}(u)\,,\,\mu_{B}(u)\}$ for all $u\in U$;\\
{\bf intersection}: $\mu_{A \cap B}(u)=\min\{\mu_{A}(u)\,,\,\mu_{B}(u)\}$  for all $u\in U$;\\
{\bf complement}: $\mu_{\bar{A}}(u)=1-\mu_{A}(u)$ for all $u\in U$.
\end{tabular}
\begin{example}\rm
Consider another fuzzy set $B$, ``number close to 4'', given by
\[
B=\{(4,1.0),(5,0.8),(6,0.5),(7,0.2),(8,0.0)\}.
\]
Then,
\[
A \cup B=\{(4,1.0),(5,0.8),(6,1.0),(7,0.5),(8,0.0)\}.
\]
The intersection of the two fuzzy sets $A$ and $B$\index{intersection!of fuzzy sets} is
\[
A \cap B=\{(4,0.0 ),(5,0.5 ),(6,0.5),(7,0.2 ),(8,0.0 )\}.
\]
The complement of the fuzzy set $A$ is\index{complement!of fuzzy sets}
\[
\bar{A}=\{(4,1.0),(5,0.5),(6,0.0),(7,0.5),(8,1.0)\}.
\]
\end{example}
\markex
\begin{defn}[Fuzzy number]
A fuzzy number\index{fuzzy number!definition of} is a fuzzy set $F$ on a universe $U\subset \mb{\Bb R}$ such that
\[
\max_{u \in U} \mu_{F}(u)=1,
\]
and
\[
\mu_{F}(\lambda u_1+(1-\lambda)u_2)\ge \min(\mu_{F}(u_1),\mu_{F}(u_2)),
\]
for all $u_1,\,u_2\, \in U$ and all $\lambda\in [0,1]$.
\end{defn}\markdefn

A fuzzy set that satisfies the conditions $\max_{u \in U} \mu_{F}(u)=1$ and $\mu_{F}(\lambda u_1+(1-\lambda)u_2)\ge \min(\mu_{F}(u_1),\mu_{F}(u_2))$ is called {\em normal\/} and {\em convex\/}, respectively. Thus, a fuzzy number is a fuzzy set that is both normal and convex. Examples of convex and non-convex fuzzy sets\index{fuzzy set!non-convex}\index{non-convex!fuzzy set} are given in Figure~\ref{fig:connon}.\index{fuzzy number!normal and convex fuzzy set}\index{fuzzy set!normal}\index{fuzzy set!convex}
\begin{figure}
\centering
\includegraphics[scale=0.5]{connon.eps}
%\vspace{3in}
%\hskip1.5in\special{bmp:c:/mybook/connon.bmp x=4in y=3in}
\caption{The first fuzzy set is a fuzzy number, while the second one is not.}
\label{fig:connon}
\end{figure}

%\section{Fuzzy Arithmetic and Fuzzy Relations}
%\label{sec:fuzarith}
%\subsection{Interval Arithmetic}
%We begin our discussion by introducing the concept of the {\em interval of confidence}. For this, imagine an experiment where a measurement was performed, resulting in a data point $a$. The measurement was performed in non-ideal conditions. As a result of the presence of the noise measurement in the experiment, we can say that the data point $a$ lies in the interval $\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$, that is,
%\[
%a \in \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right].
%\]
%We refer to the closed interval $A=\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ as the interval of confidence. A fuzzy number can be viewed as an extension of the concept of the interval of confidence. This extension can be used to devise useful interpretations to various operations on fuzzy numbers. We now discuss operations that we can perform on the intervals of confidence. We start with the operation of addition.
%
%Let $A=\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ and $B=\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$ be two intervals of confidence. If $x \in \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$, and $y \in\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$, then $x+y \in \left[
%\begin{array}{cc}
%a_1+b_1,& a_2+b_2
%\end{array}\right]$. We write this symbolically as
%\begin{eqnarray*}
%A(+)B &=& \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right](+)\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%a_1+b_1,& a_2+b_2
%\end{array}\right].
%\end{eqnarray*}
%To prove the above, note that if $a_1 \le x$ and $b_1 \le y$, then $a_1+b_1 \le x+y$. Similarly, if $x \le a_2$ and $y \le b_2$, then $x+y \le a_2 +b_2$.
%
%We now define the operation of subtraction on the intervals of confidence. Let $A=\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ and $B=\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$ be two intervals of confidence. If $x \in \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ and $y \in \left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$, then $x-y \in \left[
%\begin{array}{cc}
%a_1-b_2,& a_2-b_1
%\end{array}\right]$. We write this symbolically as
%\begin{eqnarray*}
%A(-)B &=& \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right](-)\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%a_1-b_2,& a_2-b_1
%\end{array}\right].
%\end{eqnarray*}
%
%We can also multiply the given intervals of confidence. We first discuss the simple case when the intervals of confidence belong to the set of non-negative real numbers denoted $\mb{\Bb R}^{+}$. Let $A=\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ and $B=\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$ be two intervals of confidence such that $A, B \subset \mb{\Bb R}^{+}$. If $x \in \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$, and $y \in \left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$, then $x y \in \left[
%\begin{array}{cc}
%a_1 b_1,& a_2 b_2
%\end{array}\right]$, written symbolically as
%\begin{eqnarray*}
%A( \cdot )B &=& \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]( \cdot)\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%a_1b_1,& a_2b_2
%\end{array}\right].
%\end{eqnarray*}
%When the intervals of confidence are arbitrary intervals of the set of real numbers $\mb{\Bb R}$, we have nine possible combinations that are discussed in Kaufmann and Gupta~\cite{kaufmann85}. We list the above mentioned nine cases in Table~\ref{tab:fuzy_multip}.
%\begin{table}
%\caption{Multiplication of the intervals of confidence in $\mb{\Bb R}$.}
%\label{tab:fuzy_multip}
%\begin{center}
%\begin{tabular}{ccc} \hline
%$A$ & $B$ & $A(\cdot)B$\\ \hline
%$0 \le a_1 \le a_2$ & $0 \le b_1 \le b_2$ & $\left[
%a_1b_1,\, a_2b_2\right]$\\
%$0 \le a_1 \le a_2$ & $b_1 \le 0 \le b_2$ & $\left[
%a_2b_1,\, a_2b_2\right]$\\
%$0 \le a_1 \le a_2$ & $b_1\le b_2 \le0$ & $\left[
%a_2b_1,\, a_1b_2\right]$\\
%$a_1 \le 0 \le a_2$ & $0 \le b_1 \le b_2$ & $\left[
%a_1b_2,\, a_2b_2\right]$\\
%$a_1 \le 0 \le a_2$ & $b_1 \le 0 \le b_2$ & $\left[
%\min (a_1b_2,a_2b_1 ),\, \max (a_1b_1, a_2b_2)\right]$\\
%$a_1 \le 0 \le a_2$ & $b_1 \le b_2 \le 0$ & $\left[
%a_2b_1,\, a_1b_1\right]$\\
%$a_1 \le a_2 \le 0$ & $0 \le b_1 \le b_2$ & $\left[
%a_1b_2,\, a_2b_1\right]$\\
%$a_1 \le a_2 \le 0$ & $b_1 \le 0 \le b_2$ & $\left[
%a_1b_2,\, a_1b_1\right]$\\
%$a_1 \le a_2 \le 0$ & $b_1 \le b_2 \le 0$ & $\left[
%a_2b_2,\, a_1b_1\right]$\\ \hline
%\end{tabular}
%\end{center}
%\end{table}
%
%Observe that the multiplication of an interval of confidence $A \subset \mb{\Bb R}^{+}$ by a real number $k \in \mb{\Bb R}$ can be easily deduced from the operation of multiplication of two intervals of confidence. First, assume that $k \in \mb{\Bb R}^{+}$ and represent it as
%\[
%k=\left[
%\begin{array}{cc}
%k,& k
%\end{array}\right].
%\]
%Then,
%\begin{eqnarray*}
%k \cdot A &=& k \cdot \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%k,& k
%\end{array}\right](\cdot ) \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]\\
%&=& [ka_1,\, ka_2].
%\end{eqnarray*}
%If $k < 0$, then
%\[
%k \cdot \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]=\left[
%\begin{array}{cc}
%k a_2,& k a_1
%\end{array}\right].
%\]
%
%We now discuss the operations of maximum and minimum of two intervals of confidence. First, we explain the meaning of the symbols we are going to use. Consider two real numbers $a$ and $b$. By definition, we have
%\begin{eqnarray*}
%a \wedge b &=& \min(a,b)\\
%&=& \left\{\begin{array}{ccc}
%a& \mb{if} & a \le b\\
%b & \mb{if} & b < a,
%\end{array} \right.
%\end{eqnarray*}
%and
%\begin{eqnarray*}
%a \vee b &=& \max(a,b)\\
%&=& \left\{\begin{array}{ccc}
%b& \mb{if} & a \le b\\
%a & \mb{if} & b < a .
%\end{array} \right.
%\end{eqnarray*}
%Consider now two intervals of confidence $A, B \subset \mb{\Bb R}$, where $A=\left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right]$ and $B=\left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]$. We introduce two operations $( \wedge )$ and $( \vee )$ on the intervals of confidence. We define
%\begin{eqnarray*}
%A (\wedge ) B &=& \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right] (\wedge ) \left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%a_1 \wedge b_1,& a_2 \wedge b_2
%\end{array}\right],
%\end{eqnarray*}
%and
%\begin{eqnarray*}
%A (\vee ) B &=& \left[
%\begin{array}{cc}
%a_1,& a_2
%\end{array}\right] (\vee ) \left[
%\begin{array}{cc}
%b_1,& b_2
%\end{array}\right]\\
%&=& \left[
%\begin{array}{cc}
%a_1\vee b_1,& a_2\vee b_2
%\end{array}\right].
%\end{eqnarray*}
%
%The above operations on the intervals will be used in the next section to define the corresponding operations on fuzzy numbers.
%
%\subsection{Manipulating Fuzzy Numbers}
%By relating the concept of the interval of confidence with the new concept of the {\em level of presumption\/}, we arrive at the concept of fuzzy number. Recall that a fuzzy number is a fuzzy set that is convex and normal. The fuzzy set $A \subset \mb{\Bb R}\times \mb{\Bb R}$ is convex if for any $x, y \in \mb{\Bb R}$ and $\lambda \in [0,\,1]$
%\[
%\mu_{A}\left( \lambda x + (1 - \lambda) y \right) \ge \mu_{A}(x) \wedge \mu_{A}(y).
%\]
%The fuzzy set $A \subset \mb{\Bb R}\times\mb{\Bb R}$ is normal if for all $x \in \mb{\Bb R}$
%\[
%\bigvee_x \mu_{A}(x)=1,
%\]
%where $\bigvee$ denotes the operation of taking a maximum. Thus, the fuzzy set $A \subset \mb{\Bb R}\times \mb{\Bb R}$ is normal if the largest value of $\mu_{A}(x)$ is equal to $1$.
%
%We consider now a fuzzy zero as depicted in Figure~\ref{fig:fuz_zero}.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{fuz_zero.eps}
%%\vspace{3in}
%%\centerbmp{3.33in}{2.5in}{c:/mybook/fuz_zero.bmp}
%%\hskip1.5in\special{bmp:c:/mybook/fuz_zero.bmp x=4in y=3in}
%\caption{A fuzzy zero.}
%\label{fig:fuz_zero}
%\end{figure}
%The interval of confidence corresponding to the level of presumption of $0$ is $\left[
%\begin{array}{cc}
%-1,& 1
%\end{array}\right]$. The interval of confidence corresponding to the level of presumption of $0.5$ is $\left[
%\begin{array}{cc}
%-0.5,& 0.5
%\end{array}\right]$, etc. Thus the level of presumption $\alpha \in \left[
%\begin{array}{cc}
%0,& 1
%\end{array}\right]$ gives an interval of confidence
%\[
%A_{\alpha}=\left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right].
%\]
%Note that if $\alpha_1 < \alpha_2$, then
%\[
%\left[\begin{array}{cc}
%a_1^{(\alpha_2)}, & a_2^{(\alpha_2)}
%\end{array}\right] \subseteq \left[\begin{array}{cc}
%a_1^{(\alpha_1)}, & a_2^{(\alpha_1)}
%\end{array}\right],
%\]
%or equivalently, $A_{\alpha_2} \subseteq A_{\alpha_1}$. Thus, if the presumption level $\alpha$ is increasing, then the corresponding interval of confidence is nonincreasing, that is, $A_{\alpha}$ is a nonincreasing function of $\alpha$. In the previous section, we discussed how to add intervals of confidence. The addition of fuzzy numbers can be performed following the same process, level by level. For example, let $A$ and $B$ be two fuzzy numbers, and let $A_{\alpha}$ and $B_{\alpha}$ be their intervals of confidence for the level of presumption $\alpha \in [0,\,1]$, that is, $A_{\alpha}=\{x:\mu_{A}(x) \ge \alpha \}$ and $B_{\alpha}=\{x:\mu_{B}(x) \ge \alpha \}$. Then,
%\begin{eqnarray*}
%A_{\alpha}(+)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right](+)\left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%a_1^{(\alpha)}+b_1^{(\alpha)}, & a_2^{(\alpha)}+b_2^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%Similarly, we can subtract two given fuzzy numbers,
%\begin{eqnarray*}
%A_{\alpha}(-)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right](-)\left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%a_1^{(\alpha)}-b_2^{(\alpha)}, & a_2^{(\alpha)}-b_1^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%\begin{example} \rm
%\label{ex:fuzy_add}
%Consider two triangular fuzzy numbers whose membership functions are:
%\[
%\mu_{A}(x)=\left \{ \begin{array}{ccc}
%0 & \mb{if} & x \le 0.5\\
%2/5x-1/5 &\mb{if} & 0.5 < x < 3\\
%-1/2x +5/2 &\mb{if} & 3 \le x < 5\\
%0 & \mb{if} & x \ge 5,
%\end{array} \right.
%\]
%and
%\[
%\mu_{B}(x)=\left \{ \begin{array}{ccc}
%0 & \mb{if} & x \le 1\\
%x-1 &\mb{if} & 1 < x < 2\\
%-1/5x +7/5 &\mb{if} & 2 \le x < 7\\
%0 & \mb{if} & x \ge 7.
%\end{array} \right.
%\]
%We now compute the intervals of confidence for the above fuzzy numbers for each level of presumption $\alpha \in [0,\,1]$. We begin with the fuzzy number $A$. In a sense, our goal is to express the triangular shape of the fuzzy number $A$ in the form $A_{\alpha}=[a_1^{(\alpha)},\,a_2^{(\alpha)}]$ in terms of $\alpha$. From the description of $A$ above, we obtain
%\[
%\alpha=2/5a_1^{(\alpha)}-1/5,
%\]
%and
%\[
%\alpha = -1/2a_2^{(\alpha)} +5/2.
%\]
%Hence, the interval of confidence at the level $\alpha$ for the fuzzy number $A$ is
%\begin{eqnarray*}
%A_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%5/2\alpha + 1/2, & -2\alpha + 5
%\end{array}\right].
%\end{eqnarray*}
%Proceeding in a similar manner, we express the triangular shape of the fuzzy number $B$ in the form $B_{\alpha}=[b_1^{(\alpha)},\,b_2^{(\alpha)}]$ in terms of $\alpha$. From the description of $B$ above, we obtain
%\[
%\alpha=b_1^{(\alpha)}-1,
%\]
%and
%\[
%\alpha=-1/5b_2^{(\alpha)} +7/5.
%\]
%To find the interval of confidence at the level $\alpha$ for the fuzzy number $B$, we perform simple manipulations to get
%\begin{eqnarray*}
%B_{\alpha} &=& \left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%\alpha + 1, & -5\alpha + 7
%\end{array}\right].
%\end{eqnarray*}
%We next compute the sum of the above intervals of confidence,
%\begin{eqnarray*}
%A_{\alpha}(+)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}+b_1^{(\alpha)}, & a_2^{(\alpha)}+b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%7/2\alpha+3/2, &  -7\alpha+12
%\end{array}\right].
%\end{eqnarray*}
%From the above, we can find analytic description of the fuzzy number $A(+)B$ in terms of its membership function $\mu_{A(+)B}$. Because $a_1^{(\alpha)}+b_1^{(\alpha)}=7/2\alpha+3/2$, and $a_2^{(\alpha)}+b_2^{(\alpha)}=-7\alpha+12$, solving for $\alpha$ yields
%\[
%\mu_{A(+)B}(x)=\left\{\begin{array}{ccc}
%0& \mb{if} & x \le 3/2\\
%2/7x-3/7& \mb{if}& 3/2 < x \le 5\\
%-1/7x+12/7& \mb{if}& 5< x \le 12\\
%0&\mb{if}& x>12.
%\end{array}\right.
%\]
%
%We now compute the fuzzy number $A(-)B$. First, we find the expression for the interval of confidence $A_{\alpha}(-)B_{\alpha}$ corresponding to the level $\alpha$,
%\begin{eqnarray*}
%A_{\alpha}(-)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}-b_2^{(\alpha)}, & a_2^{(\alpha)}-b_1^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%15/2\alpha-13/2, &  -3\alpha+4
%\end{array}\right].
%\end{eqnarray*}
%Thus,
%\[
%a_1^{(\alpha)}-b_2^{(\alpha)}=15/2\alpha-13/2,
%\]
%and
%\[
%a_2^{(\alpha)}-b_1^{(\alpha)}=-3\alpha+4.
%\]
%We use the above two equations to solve for $\alpha$, which then allows us to find analytic expression for the membership function $\mu_{A(-)B}$. Performing simple manipulations yields
%\[
%\mu_{A(-)B}(x)=\left\{\begin{array}{ccc}
%0& \mb{if} & x \le -13/2\\
%2/15x+13/15& \mb{if}& -13/2 < x \le 1\\
%-1/3x+4/3& \mb{if}& 1< x \le 4\\
%0&\mb{if}& x>4.
%\end{array}\right.
%\]
%\end{example}
%\markex
%As far as the multiplication is concerned, we consider only the case when for $\alpha \in [0,\,1]$ the intervals of confidence $A_{\alpha}, B_{\alpha} \subset \mb{\Bb R}^{+}$. In such a case the multiplication of the two fuzzy numbers $A$ and $B$ can be performed level by level on the intervals of confidence following the process of multiplication of the intervals of confidence in $\mb{\Bb R}^{+}$, where
%\begin{eqnarray*}
%A_{\alpha}(\cdot)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right](\cdot)\left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%a_1^{(\alpha)}b_1^{(\alpha)}, & a_2^{(\alpha)}b_2^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%From the above we can deduce the way we can multiply a fuzzy number by a nonnegative real number $k$. We have
%\begin{eqnarray*}
%k \cdot A_{\alpha} &=& \left[\begin{array}{cc}
%k, & k
%\end{array}\right](\cdot)\left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%ka_1^{(\alpha)}, & ka_2^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%The multiplication of fuzzy numbers in $\mb{\Bb R}$ is discussed in detail in Kaufmann and Gupta~\cite[pages 325--334]{kaufmann85}.
%
%The fuzzy minimum of two fuzzy numbers $A$ and $B$ is the fuzzy number that can be obtained by performing the following level by level operation:
%\begin{eqnarray*}
%A_{\alpha}(\wedge)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right](\wedge)\left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%a_1^{(\alpha)} \wedge b_1^{(\alpha)}, & a_2^{(\alpha)} \wedge b_2^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%We illustrate a graphical procedure for calculating the fuzzy minimum in Figure~\ref{fig:fuz_minm}.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{fuz_minm.eps}
%%\vspace{3in}
%%\centerbmp{3.33in}{2.5in}{c:/mybook/fuz_minm.bmp}
%%\hskip1.5in\special{bmp:c:/mybook/fuz_minm.bmp x=4in y=3in}
%\caption{Calculating the fuzzy minimum.}
%\label{fig:fuz_minm}
%\end{figure}
%
%The fuzzy maximum of the two fuzzy numbers is a fuzzy number that can be obtained by performing the following level by level operation:
%\begin{eqnarray*}
%A_{\alpha}(\vee)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right](\vee)\left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%a_1^{(\alpha)} \vee b_1^{(\alpha)}, & a_2^{(\alpha)} \vee b_2^{(\alpha)}
%\end{array}\right].
%\end{eqnarray*}
%The process of calculating the fuzzy maximum is illustrated in Figure~\ref{fig:fuz_maxm}.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{fuz_maxm.eps}
%%\vspace{3in}
%%\centerbmp{3.33in}{2.5in}{c:/mybook/fuz_maxm.bmp}
%%\hskip1.5in\special{bmp:c:/mybook/fuz_maxm.bmp x=4in y=3in}
%\caption{Calculating the fuzzy maximum of two fuzzy numbers.}
%\label{fig:fuz_maxm}
%\end{figure}
%We now present a numerical example to illustrate analytical method for calculating the fuzzy minimum and maximum of two fuzzy numbers.
%\begin{example} \rm
%\label{ex:fuzy_minmax}
%Consider the two triangular fuzzy numbers $A$ and $B$ from Example~\ref{ex:fuzy_add}. Recall that
%\[
%A_{\alpha} = \left[\begin{array}{cc}
%a_1^{(\alpha)}, & a_2^{(\alpha)}
%\end{array}\right]= \left[\begin{array}{cc}
%5/2\alpha + 1/2, & -2\alpha + 5
%\end{array}\right],
%\]
%and
%\[
%B_{\alpha} = \left[\begin{array}{cc}
%b_1^{(\alpha)}, & b_2^{(\alpha)}
%\end{array}\right]= \left[\begin{array}{cc}
%\alpha +1, & -5 \alpha +7
%\end{array}\right].
%\]
%Therefore, for the fuzzy minimum
%\[
%A_{\alpha}(\wedge)B_{\alpha}=\left[\begin{array}{cc}
%(5/2 \alpha +1/2) \wedge (\alpha +1), & (-2 \alpha +5) \wedge (-5 \alpha +7)
%\end{array}\right]
%\]
%we find that
%\[
%A_{\alpha}(\wedge)B_{\alpha} = \left\{\begin{array}{ccc}
%\left[
%5/2\alpha+1/2, \, -2\alpha+5
%\right] &\mb{if}& 0 \le \alpha \le 1/3\\
%\left[
%\alpha+1, \, -2\alpha+5
%\right] &\mb{if}& 1/3 < \alpha \le 2/3\\
%\left[\
%\alpha+1,\, -5\alpha+7
%\right] &\mb{if}&  2/3 < \alpha \le 1.
%\end{array}\right.
%\]
%From the above we can find an analytic expression for the membership function of the fuzzy number $A(\wedge)B$,
%\[
%\mu_{A(\wedge)B}(x)=\left\{\begin{array}{ccc}
%0 &\mb{if}& x \le 1/2\\
%2/5x-1/5 &\mb{if}& 1/2 < x \le 4/3\\
%x-1 &\mb{if}& 4/3 < x \le 2\\
%-1/5x+7/5 &\mb{if}& 2 < x \le 11/3\\
%-1/2x+5/2 &\mb{if}& 11/3 < x \le 5\\
%0 &\mb{if}& 5 < x.
%\end{array}\right.
%\]
%
%We next find the fuzzy maximum of the fuzzy numbers $A$ and $B$,
%\begin{eqnarray*}
%A_{\alpha}(\vee)B_{\alpha} &=& \left[\begin{array}{cc}
%a_1^{(\alpha)} \vee b_1^{(\alpha)}, &  a_2^{(\alpha)} \vee b_2^{(\alpha)}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%(5/2 \alpha +1/2) \vee (\alpha +1), & (-2 \alpha +5) \vee (-5 \alpha +7)
%\end{array}\right].
%\end{eqnarray*}
%Performing simple manipulations yields
%\[
%A_{\alpha}(\vee)B_{\alpha} = \left\{\begin{array}{ccc}
%\left[
%\alpha+1, \, -5\alpha+7
%\right] &\mb{if}& 0 \le \alpha \le 1/3\\
%\left[
%5/2\alpha+1/2,\, -5\alpha+7
%\right] &\mb{if}& 1/3 < \alpha \le 2/3\\
%\left[
%5/2\alpha+1/2, \, -2\alpha+5
%\right] &\mb{if}&  2/3 < \alpha \le 1.
%\end{array}\right.
%\]
%Using the above, we compute
%\[
%\mu_{A(\vee)B}(x)=\left\{\begin{array}{ccc}
%0 &\mb{if}& x \le 1\\
%x-1 &\mb{if}& 1 < x \le 4/3\\
%2/5x-1/5 &\mb{if}& 4/3 < x \le 3\\
%-1/2x+5/2 &\mb{if}& 3 < x \le 11/3\\
%-1/5x+7/5 &\mb{if}& 11/3 < x \le 7\\
%0 &\mb{if}& 7 < x.
%\end{array}\right.
%\]
%\end{example}
%\markex
%\subsection{Fuzzy Relations}
%In this subsection, we discuss fuzzy relations. We begin with the definition of a fuzzy relation.
%\begin{defn}
%\label{definition:binary_rln}
%Let $U$ and $V$ be two universes of discourse. A fuzzy relation $R$ between $U$ and $V$ is a fuzzy set in the product space
%\[
%U \times V=\left\{ (u,\, v):u \in U,\, v \in V \right\}
%\]
%characterized by a membership function
%\[
%\mu_{R}:U \times V \to \left[ 0,\,1 \right].
%\]
%\end{defn}\markdefn
%
%Suppose we are given two universes of discourse:
%\[
%U=\left\{u_1, u_2,\ldots, u_m \right\}\quad \mbox{and} \quad V=\left\{v_1, v_2,\ldots, v_n \right\}.
%\]
%A fuzzy relation in $U \times V$ can be represented by an $m \times n$ matrix
%\[
%\mbox{\boldmath$R$}=\left[\begin{array}{cccc}
%\mu_{R}\left(u_1,v_1\right) & \mu_{R}\left(u_1,v_2\right) & \cdots & \mu_{R}\left(u_1,v_n\right)\\
%\mu_{R}\left(u_2,v_1\right) & \mu_{R}\left(u_2,v_2\right) & \cdots & \mu_{R}\left(u_2,v_n\right)\\
%\vdots & \vdots & \ddots & \vdots \\
%\mu_{R}\left(u_m,v_1\right) & \mu_{R}\left(u_m,v_2\right) & \cdots & \mu_{R}\left(u_m,v_n\right)
%\end{array}\right].
%\]
%Terano, Asai, and Sugeno~\cite{terano92} refer to the matrix $\mbox{\boldmath$R$}$ as a fuzzy matrix. Because $\mu_{R}:U \times V \to \left[0,\, 1\right]$, the values of the elements of the fuzzy matrix $\mbox{\boldmath$R$}$ are in the interval $\left[ 0,\, 1 \right]$.
%\begin{example} \rm
%\label{ex:b_relation}
%Let $U=\left\{ -1, 0, 1 \right\}$ and $V=\left\{ 1, 2, 3, 4 \right\}$. An example of a fuzzy matrix corresponding to a fuzzy relation in $U \times V$ is
%\[
%\mbox{\boldmath$R$}=\left[\begin{array}{cccc}
%0.2 & 0.6 & 0.7 & 0.9\\
%0.0 & 0.3 & 0.6 & 1\\
%0.1 & 0.4 & 0.5 & 0.8
%\end{array}\right].
%\]
%\end{example}
%\markex
%Definition~\ref{definition:binary_rln} is concerned with a binary fuzzy relation. We can generalize this definition to the $n$-ary fuzzy relation $R$ in $X_1 \times X_2 \times \cdots \times X_n$ as a fuzzy set in the product space $X_1 \times X_2 \times \cdots \times X_n$ with a membership function
%\[
%\mu_{R}:X_1 \times X_2 \times \cdots \times X_n \to \left[ 0,\,1 \right].
%\]
%
%A special kind of a fuzzy relation is a fuzzy implication that we discuss next. Let $A$ and $B$ be fuzzy sets in $U$ and $V$, respectively. A fuzzy implication from $A$ to $B$, denoted $A \to B$, is a fuzzy relation in $U \times V$ that is characterized by a specific membership function. Among different types of membership functions that can characterize a fuzzy implication we list two classes. They are:
%\begin{itemize}
%\item a fuzzy conjunction denoted $\mu_{A}(u) \star \mu_{B}(v)$, and
%\item a fuzzy disjunction denoted $\mu_{A}(u) \dot{+} \mu_{B}(v)$.
%\end{itemize}
%A fuzzy conjunction, also called a t-norm, represents a generalized intersection operator, while a fuzzy disjunction, also called a t-conorm, represents a generalized union operator. Examples of a t-norm are:
%\begin{itemize}
%\item fuzzy intersection = $\min \left\{\mu_{A}(u), \mu_{B}(v)\right\}$,
%\item algebraic product = $\mu_{A}(u)\mu_{B}(v)$,
%\item bounded product = $\max \left\{ 0,\mu_{A}+\mu_{B}-1 \right\}$,
%\item drastic product = $\left\{ \begin{array}{ccc}
%\mu_{A} &\mbox{if}& \mu_{B}=1\\
%\mu_{B} &\mbox{if}& \mu_{A}=1\\
%0 &\mbox{if}& \mu_{A}, \mu_{B}<1.
%\end{array}\right.$
%\end{itemize}
%Examples of a t-conorm are:
%\begin{itemize}
%\item fuzzy union = $\max \left\{\mu_{A}(u), \mu_{B}(v)\right\}$,
%\item algebraic sum = $\mu_{A}(u)+\mu_{B}(v) - \mu_{A}(u)\mu_{B}(v)$,
%\item bounded sum = $\min\left\{1,\mu_{A} + \mu_{B} \right\}$,
%\item drastic sum = $\left\{\begin{array}{ccc}
%\mu_{A} &\mbox{if}& \mu_{B}=0\\
%\mu_{B} &\mbox{if}& \mu_{A}=0\\
%1 &\mbox{if}& \mu_{A}, \mu_{B}>0.
%\end{array}\right.$
%\end{itemize}
%A fuzzy implication $A \to B$ can be viewed as a fuzzy IF-THEN rule of the form
%\[
%\mbox{IF}\quad x \quad \mbox{is} \quad A,\quad \mbox{THEN} \quad y \quad \mbox{is} \quad B,
%\]
%where $x$ and $y$ are linguistic variables and $A$ and $B$ are the corresponding values of the linguistic variables.
%
%\subsection{Composition of Fuzzy Relations}
%Suppose we are given a fuzzy relation in $U \times V$ labeled $R$, and a fuzzy relation in $V \times W$ labeled $S$. The max-star composition of $R$ and $S$ is a fuzzy relation, denoted $R \circ S$, that is characterized by the membership function
%\[
%\mu_{R \circ S}(u,w) = \bigvee_{v \in V} \left\{\mu_{R}(u,v) \star \mu_{S}(v,w) \right\},
%\]
%where $\vee$ denotes the maximum operator, and $\star$ refers to any operator in the class of t-norms. Note that $R\circ S$ is a fuzzy set in $U \times W$.
%\begin{example} \rm
%\label{ex:max_star}
%Let $U=\left\{u_1,u_2\right\}$, $V=\left\{v_1,v_2,v_3\right\}$, and $W=\left\{w_1,w_2\right\}$ be the given three universes of discourse. Let
%\[
%\mbox{\boldmath$R$}=\left[\begin{array}{ccc}
%0.5 & 0.7 & 0.0\\
%0.8 & 1.0 & 0.2
%\end{array}\right]
%\]
%be the fuzzy matrix that represents the relation $R$ in $U \times V$, and
%\[
%\mbox{\boldmath$S$}=\left[\begin{array}{cc}
%0.4 & 0.6\\
%0.2 & 0.9\\
%0.0 & 0.5
%\end{array}\right]
%\]
%be the given fuzzy matrix representing the relation $S$ in $V \times W$. Let the $\star$-operator be the minimum operator $\wedge$. Then the fuzzy matrix representing the $\max-\min$ fuzzy relation $R \circ S$ has the form
%\begin{eqnarray*}
%&{}&\mbox{\boldmath$R$} \circ \mbox{\boldmath$S$}\\
%&=&\left[\begin{array}{ccc}
%0.5 & 0.7 & 0.0\\
%0.8 & 1.0 & 0.2
%\end{array}\right] \circ \left[\begin{array}{cc}
%0.4 & 0.6\\
%0.2 & 0.9\\
%0.1 & 0.5
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%(0.5 \wedge 0.4)\vee (0.7 \wedge 0.2) \vee (0.0 \wedge 0.1) & (0.5 \wedge 0.6)\vee (0.7 \wedge 0.9) \vee (0.0 \wedge 0.5)\\
%(0.8 \wedge 0.4)\vee (1.0 \wedge 0.2) \vee (0.2 \wedge 0.1) & (0.8 \wedge 0.6)\vee (1.0 \wedge 0.9) \vee (0.2 \wedge 0.5)
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%0.4 & 0.7\\
%0.4 & 0.9
%\end{array}\right].
%\end{eqnarray*}
%\end{example}
%\markex
%Other kinds of composition of fuzzy relations are possible. In particular, we can define the dual composition to the $\max-\star$ as the $\min-\dot{+}$. The $\min-\dot{+}$ composition of the fuzzy relations $R$ and $S$ is characterized by the membership function
%\[
%\mu_{R \circ S}(u,w)=\bigwedge_{v \in V}\left\{\mu_{R}(u,v) \dot{+} \mu_{S}(v,w) \right\},
%\]
%where $\wedge$ refers to the minimum operator, and $\dot{+}$ can be any operator from the class of t-conorm that we discussed in the previous section.
%
%A particular type of the composition of fuzzy relations is the $\max-\star$ composition when $S$ is just a fuzzy set $A$ in $V$, rather than a fuzzy relation in the product space $V \times W$. In this case the fuzzy matrix representing $S$ is a column vector. This means that the fuzzy matrix representing the composition $R\circ A$ is also a column vector. A general form of the membership function that characterizes such a composition is
%\[
%\mu_{R \circ A}(w)=\bigvee_{v\in V}\left\{\mu_{R}(u,v) \star \mu_{A}(v) \right\}.
%\]
%Note that the composition of the fuzzy relation $R$ and the fuzzy set $A$ is a fuzzy set in $U$.
%\begin{example} \rm
%\label{ex:row_rfrln}
%Let $U=\left\{u_1,u_2,u_3 \right\}$ and $V=\left\{v_1,v_2,v_3\right\}$ be given two universes of discourse. Let $A$ be a fuzzy set in $V$ described by the fuzzy column vector $\mbox{\boldmath$A$}=\left[\begin{array}{ccc}
%0.2 & 0.8 & 1.0
%\end{array}\right]^{\top}$. The fuzzy matrix $\mbox{\boldmath$R$}$ that describes the fuzzy relation $R$ in $U \times V$ is
%\[
%\mbox{\boldmath$R$}=\left[\begin{array}{ccc}
%0.5 & 0.4 & 0.8\\
%0.8 & 0.6 & 0.7\\
%0.9 & 0.7 & 0.1
%\end{array}\right].
%\]
%Assume the $\wedge$-operator for the $\star$ operator, that is, the membership function of the composition of $R$ and $A$ has the form
%\[
%\mu_{R \circ A}(w)=\bigvee_{v\in V}\left\{\mu_{R}(u,v) \wedge \mu_{A}(v) \right\}.
%\]
%The fuzzy column vector corresponding to the composition $R \circ A$ is
%\begin{eqnarray*}
%\mbox{\boldmath$R$} \circ \mbox{\boldmath$A$} &=& \left[\begin{array}{ccc}
%0.5 & 0.4 & 0.8\\
%0.8 & 0.6 & 0.7\\
%0.9 & 0.7 & 0.1
%\end{array}\right] \circ \left[\begin{array}{c}
%0.2\\
%0.8\\
%1.0
%\end{array}\right]\\
%&=& \left[ \begin{array}{c}
%[(0.5 \wedge 0.2) \vee (0.4 \wedge 0.8) \vee (0.8 \wedge 1.0)\\
%(0.8 \wedge 0.2) \vee (0.6 \wedge 0.8) \vee (0.4 \wedge 1.0)\\
%(0.9 \wedge 0.2) \vee (0.7 \wedge 0.8) \vee (0.1 \wedge 1.0)
%\end{array}\right]\\
%&=& \left[\begin{array}{c}
%0.8 \\
%0.6 \\
%0.7
%\end{array}\right].
%\end{eqnarray*}
%\end{example}
%\markex
%We can think of $A$ as the fuzzy input to the fuzzy system modeled by the fuzzy relation $R$. Let $B=R \circ A$. Then the output of the fuzzy system is $B$, which is a fuzzy set. In other words, the fuzzy system modeled by a fuzzy relation $R$ yields a fuzzy output in response to a fuzzy input. We illustrate the above in Figure~\ref{fig:fuz_syaa}.
%\begin{figure}
%\setlength{\unitlength}{.1in}
%\begin{center}
%\begin{picture}(60,20)
%\thicklines
%\put(12,9){\vector(1,0){10}}
%\put(12,10){Fuzzy Input}
%\put(16,7){$A$}
%\put(22,5){\framebox(14,8){}}
%\put(24,10){Fuzzy System}
%\put(28,7){$R$}
%\put(36,9){\vector(1,0){11}}
%\put(37,10){Fuzzy Output}
%\put(41,7){$B$}
%\end{picture}
%\end{center}
%\caption{A fuzzy system produces a fuzzy output in response to a fuzzy input.}
%\label{fig:fuz_syaa}
%\end{figure}




\section{Standard Additive Model}
\label{sec:sam}
Let $X$ and $Y$ be nonempty sets and let $I$ and $J$ be nonempty index sets. Suppose we are given collections of fuzzy sets $\{A_{\alpha}:\alpha \in I\}$ and $\{B_{\beta}:\beta \in J\}$ on $X$ and $Y$, respectively, and rules of the form
\begin{center}
IF $A_{\alpha}$ THEN $B_{\beta}$.
\end{center}
The IF-THEN rules along with the collections of fuzzy sets form a function $R$ from $\{A_{\alpha}:\alpha \in I\}$ to $\{B_{\beta}:\beta \in J\}$, which we call the {\em fuzzy system\/} associated with the rules.

The {\em support} of a function\index{support!of a function}\index{function!support of} into $\mb{\Bb R}$ is the subset of the domain where the function is nonzero. The support of the fuzzy sets $A_\alpha$ and $B_\beta$ and the IF-THEN rules\index{IF-THEN rules!describe subsets} describe subsets, or patches, in the Cartesian product\index{Cartesian product} space $X\times Y$, as illustrated in Figure~\ref{fig:patch}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{patch.eps}
%\vspace{3in}
%\centerbmp{4in}{3in}{c:/mybook/patch.bmp}
%\hskip1.1in\special{bmp:c:/mybook/patch.bmp x=4in y=3in}
\caption{Function approximation using IF-THEN rules.}
\label{fig:patch}
\end{figure}
Suppose the support of each $A_{\alpha}$ and each $B_{\beta}$ is a one point set, say $x_\alpha\in X$ and $y_\beta\in Y$, respectively.  If $X=\bigcup \{x_\alpha:\alpha\in I\}$, then $R$ can be identified with a function $\tilde R$ from $X$ to $Y$ by
\[ \tilde{R}(x_\alpha)=y_\alpha\]
if
\[R(A_\alpha)=B_\alpha .\]
One can think of this case as having complete knowledge and the patches are just points.

A {\em fuzzy system}\index{fuzzy system!``fuzzified''  function} can be thought of as a ``fuzzified''  function from $X$ to $Y$ with fuzzy sets replacing points in the domain. The size of a patch is usually inversely proportional to the knowledge or confidence of the situation. A point $x\in X$ is usually in the support of more than one $A_\alpha$ with confidence represented by the values of the membership functions $\mu_\alpha$. The fuzzy set $R(A_\alpha)$ represents the desired action corresponding to $A_\alpha$. This is illustrated in Figure~\ref{fig:1d_con}. Suppose we are given the following two rules:
\begin{center}
IF $A_3$ THEN $B_3$,\\
IF $A_4$ THEN $B_2$.
\end{center}
\begin{figure}
\centering
\includegraphics[scale=0.5]{1d_con.eps}
%\vspace{3in}
%\centerbmp{4in}{3in}{c:/mybook/1d_con.bmp}
%\hskip1.1in\special{bmp:c:/mybook/1d_con.bmp x=4in y=3in}
\caption{Generating output fuzzy sets from THEN-part sets of IF-THEN rules.}
\label{fig:1d_con}
\end{figure}
The point $x_0$ is contained in the support of $A_3$ and $A_4$. Thus, according to the given rules, both $B_3$ and $B_2$ need to be taken into account. The process by which we combine these actions is called {\em defuzzification\/}. The process of defuzzification\index{defuzzification!fuzzy reasoning} is also known as fuzzy reasoning\index{fuzzy reasoning!defuzzification} in the literature. The outcome of defuzzification is a numerical value $y\in Y$. An example of a defuzzification algorithm is a centroidal defuzzifier\index{centroidal defuzzifier}\index{defuzzifier!centroidal} of the form
\begin{equation}
y=\frac{\sum_\alpha \mu_{A_\alpha}(x)\xi(x,A_\alpha,R(A_\alpha))}{\sum_{\alpha}\mu_{A_\alpha}(x)},
\label{eq:centroidal_d}
\end{equation}
where $\xi(x,A_\alpha,R(A_\alpha))$ is a function into the real numbers. We now give an example of $\xi$.

Let $\xi(x,A_\alpha,R(A_\alpha))$ be the centroid of the support of $R(A_\alpha)$. For example, the centroids\index{centroid!of the support} of the support of $R(A_3)=B_3$ is $c_3$ and that of $R(A_4)=B_2$ is $c_2$. A fuzzy system with the centroidal defuzzifier is called the {\em standard additive model}~(SAM).\index{standard additive model (SAM)}\index{SAM|see{standard additive model}}\index{standard additive model!fuzzy system with centroidal defuzzifier} The term standard additive model was coined by Kosko~\cite{kosko97}. A schematic representation of a SAM is shown in Figure~\ref{fig:sam1}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{sam1.eps}
%\vspace{3in}
%\centerbmp{4in}{3in}{c:/mybook/sam1.bmp}
%\hskip1.1in\special{bmp:c:/mybook/sam1.bmp x=4in y=3in}
\caption{Single-input single-output standard additive model schematic representation.}
\label{fig:sam1}
\end{figure}
In the above description of the SAM, we were concerned with a single-input single-output case. The above construction can be extended to a many-inputs case. Suppose we are given IF-THEN rules of the form
\begin{center}
IF $A_i$ AND $B_i$ THEN $C_i$,
\end{center}
The SAM corresponding to this case is illustrated in Figure~\ref{fig:2d_con}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{2d_con.eps}
%\vspace{3.5in}
%\centerbmp{4in}{3in}{c:/mybook/2d_con.bmp}
%\hskip0.7in\special{bmp:c:/mybook/2d_con.bmp x=4.67in y=3.5in}
\caption{Two-input single-output standard additive model representation.}
\label{fig:2d_con}
\end{figure}
We could use a defuzzification algorithm of the form
\begin{equation}
z=\frac{\sum_{l=1}^M\mu_{A_l}(x)\mu_{B_l}(y)c_l}{\sum_{l=1}^M\mu_{A_l}(x)\mu_{B_l}(y)},
\label{eq:product_de}
\end{equation}
where $M$ is the number of IF-THEN rules, and $c_l$ is the centroid of the fuzzy set $C_l$, $l=1,2,\ldots,M$. This type of defuzzifier is called the {\it center average defuzzifier\/} or the {\it algebraic product
defuzzifier\/}.\index{center average defuzzifier}\index{algebraic product defuzzifier}\index{defuzzifier!center average}\index{defuzzifier!algebraic product}



 Another type of defuzzifier that we could use is
\begin{equation}
z=\frac{\sum_{l=1}^M\min\left\{\mu_{A_l}(x),\mu_{B_l}(y)\right\}c_l}{\sum_{l=1}^M\min\left\{\mu_{A_l}(x), \mu_{B_l}(y)\right\}}.
\label{eq:min_de}
\end{equation}
The above type of defuzzifier is called the {\it center-of-gravity defuzzifier\/}.\index{center-of-gravity defuzzifier}\index{defuzzifier!center-of-gravity}



An illustration of fuzzy reasoning using defuzzification scheme~(\ref{eq:min_de}) is given in Figure~\ref{fig:infer}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{infer.eps}
%\vspace{4in}
%\centerbmp{5.33in}{4in}{c:/mybook/infer.bmp}
%\hskip0.2in\special{bmp:c:/mybook/infer.bmp x=5.33in y=4in}
\caption{An illustration of fuzzy reasoning in a two-input fuzzy system.}
\label{fig:infer}
\end{figure}
In general, for $q$ inputs, the center average defuzzifier takes the form
\begin{equation}
z=\frac{\sum_{l=1}^M\prod_{j=1}^q\mu_{A_j^l}(x_j)c_l}{\sum_{l=1}^M\prod_{j=1}^q\mu_{A_j^l}(x_j)}.
\label{eq:gen_product}
\end{equation}

\section{Fuzzy Logic Control}
A block diagram of a closed-loop system with a fuzzy logic controller~(FLC)\index{fuzzy logic controller (FLC)}\index{FLC|see{fuzzy logic controller}} is shown in Figure~\ref{fig:typ_fuza}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{typ_fuza.eps}
%\vspace{3.5in}
%\centerbmp{4in}{3in}{c:/mybook/typ_fuza.bmp}
%\hskip.5in\special{bmp:c:/fuzzy/typ_fuza.bmp x=4.67in y=3.5in}
\caption{A diagram of a closed-loop system with a fuzzy logic controller.}
\label{fig:typ_fuza}
\end{figure}
%A typical fuzzy logic control architecture is depicted in Figure~\ref{fig:typ_fdt}.
The controller uses the control error $e$ and the rate of change in the control error, $\dot{e}$ or $\Delta e$, as its inputs.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{typ_fdt.eps}
%%\vspace{3.5in}
%%\centerbmp{4in}{3in}{c:/mybook/typ_fdt.bmp}
%%\hskip.5in\special{bmp:c:/mybook/typ_fdt.bmp x=4.67in y=3.5in}
%\caption{Standard additive model as a fuzzy logic controller.}
%\label{fig:typ_fdt}
%\end{figure}
A typical fuzzy logic control architecture has the structure of a SAM.
 %hence, it is composed of two basic components. They are: a decision making logic module also referred to as an inference engine, and a defuzzifier. The inference engine processes the inputs using a knowledge base. The outputs of the inference engine are converted into crisp values, defuzzified, by a defuzzifier.
Designing a fuzzy logic controller can be summarized in the following six-step algorithm:
\begin{itemize}
\item Identify ranges of the controller inputs;
\item Identify ranges of the controller outputs;
\item Create fuzzy sets for each input and output;
\item Translate the interaction of the inputs and outputs into IF-THEN rules, and then form the rules matrix;\index{rules matrix}
\item Decide on %the inference engine and
the defuzzifier, then apply it to crisp inputs to produce crisp outputs;
\item Implement the controller, test it, and modify it if necessary.
\end{itemize}
As an example, suppose we use five membership functions for the controller's inputs and its output. We then generate the rules. A possible set of rules\index{set!of rules} is shown in Table~\ref{tab:rule_s}, where LN denotes large negative, N means negative, ZE is zero, P is positive, and LP refers to large positive.
\begin{table}
\caption{The rules matrix.}
\begin{center}
\begin{tabular}{c||c|c|c|c|c} \hline
{\bf change-in-error} & LN & N & ZE & P & LP \\ \cline{1-1}
{\bf error}& {}&{}&{}&{}&{}\\ \hline \hline
LN & LN & LN & LN & N & ZE \\ \hline
N & LN & LN & N & ZE & P \\ \hline
ZE & N & N & ZE & P & P \\ \hline
P & N & ZE & P & LP & LP \\ \hline
LP & ZE & P & LP & LP & LP \\ \hline
\end{tabular}
\end{center}
\label{tab:rule_s}
\end{table}
The next step involves choosing a defuzzifier. We use the modified center average defuzzifier\index{modified center average defuzzifier}\index{defuzzifier!modified center average} to obtain
\[
u=\frac{\sum_{k=1}^{25} m_k^o p_k/ s_k^o}{\sum_{k=1}^{25}p_k /s_k^o},
\]
where for $k=1,2,\ldots,25$, following the rules shown in Table~\ref{tab:rule_s}, we compute
\[
p_k=\mu_{i_k}^{e}\mu_{j_k}^{ce},\quad i,j=1,2,\ldots,5.
\]
The functions $\mu_{i}^{e}$, $\mu_{j}^{ec}$ are the membership functions corresponding to the linguistic variables ERROR and CHANGE-IN-ERROR, respectively. The parameters $m_k^o$ and $s_k^o$ are the $m$ and $s$ parameters of the controller output membership functions---see figures below for their definition. The modified center average defuzzifier\index{modified center average defuzzifier} takes into account the shape of the membership functions, and in particular their ``spread''.\index{membership functions!their ``spread''} As it is pointed out by Wang~\cite{lxwang94}, the sharper the shape of $\mu$, the stronger is our belief that the value should be closer to its $m$. This observation is reflected in the formula for the defuzzifier we use, where we divide the weights $p_k$ by $s_k^o$---the spread of the corresponding controller output membership function. We can use triangular membership functions whose equations are given next.
The expression for the function shown in Figure~\ref{fig:tri_s} is
\[
\mu(x,m,s)=\max \left(0,1-\frac{|x-m|}{s}\right).
\]
\begin{figure}
\centering
\includegraphics[scale=0.5]{tri_s.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/tri_s.bmp}
%\hskip1.5in\special{bmp:c:/ee680/tri_s.bmp x=3.33in y=2.5in}
\caption{A triangular shaped fuzzy set.}
\label{fig:tri_s}
\end{figure}
The expression for the function shown in Figure~\ref{fig:tri_r} is
\[
\mu(x,m,s)=\min\left(1,\max\left(0,1+\frac{x-m}{s} \right) \right).
\]
\begin{figure}
\centering
\includegraphics[scale=0.5]{tri_r.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/tri_r.bmp}
%\hskip1.5in\special{bmp:c:/ee680/tri_r.bmp x=3.33in y=2.5in}
\caption{A fuzzy set at the right end of a universe of discourse.}
\label{fig:tri_r}
\end{figure}
Finally, the expression for the function shown in Figure~\ref{fig:tri_l} is
\[
\mu(x,m,s)=\min\left(1,\max\left(0,1-\frac{x-m}{s} \right) \right).
\]
\begin{figure}
\centering
\includegraphics[scale=0.5]{tri_l.eps}
%\vspace{2.5in}
%\centerbmp{3.33in}{2.5in}{c:/mybook/tri_l.bmp}
%\hskip1.5in\special{bmp:c:/ee680/tri_l.bmp x=3.33in y=2.5in}
\caption{A fuzzy set at the left end of a universe of discourse.}
\label{fig:tri_l}
\end{figure}
\begin{example}\label{ex:fuzzy_vehi}\rm
Consider the vehicle model\index{vehicle model} given in Subsection~\ref{subs:vehmod}. Let the input signal be $u=\delta_f$---the front wheel steer angle, and $\delta_r=0$. We design a simple fuzzy logic controller\index{fuzzy logic controller!for vehicle model} for the above vehicle model. The range for the error is $[-0.5, 0.5]$. The range for the change-in-error is $[-0.06, 0.06]$. The range for the controller output is $[-3\,\mb{deg},3\,\mb{deg}]$. The parameters of the membership functions are given in Table~\ref{tab:v-mem_fns}.
\begin{table}
\caption{The $m$ and $s$-parameters of the membership functions.}
\begin{center}
{\small\begin{tabular}{c c|c c|c c}\hline
\multicolumn{2}{c|}{\bf error} &
\multicolumn{2}{c|}{\bf change-in-error} &
\multicolumn{2}{c}{\bf output}\\
$m$ & $s$ & $m$ & $s$ & $m$ & $s$ \\ \hline \hline
$m_{1}=-0.4$ & $s _{1}=0.1$ & $m_{1}=-0.05$ & $s_{1}=0.025$ & $m_{1}=-2.5$ & $s_{1}=1$ \\
$m_{2}=-0.2$ & $s _{2}=0.2$ & $m_{2}=-0.025$ & $s_{2}=0.025$ & $m_{2}=-1$ & $s_{2}=1$ \\
$m_{3}=0$ & $s _{3}=0.2$ & $m_{3}=0$ & $s_{3}=0.025$ & $m_{3}=0$ & $s_{3}=1$ \\
$m_{4}=0.2$ & $s _{4}=0.2$ & $m_{4}=0.025$ & $s_{4}=0.025$ & $m_{4}=1$ & $s_{4}=1$ \\
$m_{5}=0.4$ & $s _{5}=0.1$ & $m_{5}=0.05$ & $s_{5}=0.025$ & $m_{5}=2.5$ & $s_{5}=1$\\\hline
\end{tabular}}
\end{center}
\label{tab:v-mem_fns}
\end{table}

Plots of the error, the change-in-error, and controller's output membership functions are given in Figures~\ref{fig:hw6s7er}, \ref{fig:hw6s7ce}, and~\ref{fig:hw6s7u}, respectively.
\begin{figure}
\centering
\includegraphics[scale=0.5]{hw6s7er.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/hw6s7er.bmp}
%\hskip.7in\special{bmp:c:/ee680/hw6s7er.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable ERROR in Example~\ref{ex:fuzzy_vehi}.}
\label{fig:hw6s7er}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{hw6s7ce.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/hw6s7ce.bmp}
%\hskip.7in\special{bmp:c:/ee680/hw6s7ce.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable CHANGE-IN-ERROR in Example~\ref{ex:fuzzy_vehi}.}
\label{fig:hw6s7ce}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{hw6s7u.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/hw6s7u.bmp}
%\hskip.7in\special{bmp:c:/ee680/hw6s7u.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable CONTROL in Example~\ref{ex:fuzzy_vehi}.}
\label{fig:hw6s7u}
\end{figure}
We created a nonlinear mapping from the controller's input space into its output space and formed a look-up table that implements the obtained nonlinear mapping representing fuzzy logic controller.\index{look-up table!to implement FLC} We used SIMULINK's 2-D Look-Up Table block\index{SIMULINK's 2-D Look-Up Table block} to implement the controller. The look-up table size was $22 \times 22$. The output of the look-up table was scaled by the factor $-2\pi/180$ before using it as the vehicle's steering input. The negative sign is to take into account the opposite directions of the lateral axes of the vehicle coordinate system and the fixed system. The factor $\pi/180$ converts degrees into radians. We multiplied the output of the look-up table by 2 to increase the control authority. This allows us to use the same controller to track step inputs with large amplitudes. A plot of the control surface\index{control surface!of FLC} is given in Figure~\ref{fig:hw6s71}. Next, a reference signal generator\index{reference signal} was constructed. We selected the following transfer function of the signal generator:
\[
\frac{R(s)}{H(s)}=\frac{1}{s^3+1.75s^2+2.15s+1},
\]
where $R(s)={\cal L}(r(t))$, $H(s)={\cal L}(6 1(t))$, and $1(t)$ is the unit step function.\index{unit step function}
The closed-loop system was simulated using SIMULINK. Plots of $Y$ and $r$ versus $X$ are shown in Figure~\ref{fig:hw6s7xr}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{hw6s71.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/hw6s71.bmp}
%\hskip.7in\special{bmp:c:/ee680/hw6s71.bmp x=4.67in y=3.5in}
\caption{A plot of the control surface $u=f(\dot{e},e)$ in Example~\ref{ex:fuzzy_vehi}.}
\label{fig:hw6s71}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{hw6s7xr.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/hw6s7xr.bmp}
%\hskip.7in\special{bmp:c:/ee680/hw6s7xr.bmp x=4.67in y=3.5in}
\caption{Plots of $Y$ and $r$ versus $X$ in Example~\ref{ex:fuzzy_vehi}.}
\label{fig:hw6s7xr}
\end{figure}
\end{example}
\markex
\begin{example}\label{ex:drianetal}\rm
This example is based on Example~6.1 found in Driankov, Hellendoorn, and Reinfrank~\cite[pages~266--272]{driankov93}. We consider a nonlinear dynamical system modeled by the differential equation,
\begin{equation}
\ddot{x}+a_1(1-x^2)\dot{x}+a_2x=bu,
\label{eq:nonmotefo}
\end{equation}
where $|u|\le 15$, $a_1=2.2165$, $a_2=b=12.7388$. Let $x_1=x$ and $x_2=\dot{x}_1$. Then, the above system model in state space format has the form
\[
\left[\begin{array}{c}
\dot{x}_1\\
\dot{x}_2
\end{array}\right]=\left[\begin{array}{c}
x_1\\
-a_2x_1-a_1\left( 1-x_1^2\right)x_2
\end{array}\right]+\left[\begin{array}{c}
0\\
b
\end{array}\right]u.
\]
A phase-plane portrait\index{phase-plane portrait!of uncontrolled system} of the uncontrolled system is shown in Figure~\ref{fig:t4f7pho}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{t4f7pho.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/t4f7pho.bmp}
%\hskip1.25in\special{bmp:c:/ee680/t4f7pho.bmp x=3.97in y=3.5in}
\caption{A phase-plane portrait of the uncontrolled system in Example~\ref{ex:drianetal}.}
\label{fig:t4f7pho}
\end{figure}
Plots of $x_1$ and $x_2$ versus time for the initial conditions $x_1(0)=-1$ and $x_2(0)=0$ are shown in Figure~\ref{fig:t4f7x12}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{t4f7x12.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/t4f7x12.bmp}
%\hskip1.25in\special{bmp:c:/ee680/t4f7x12.bmp x=3.97in y=3.5in}
\caption{Plots of $x_1$ and $x_2$ versus time of the uncontrolled system of Example~\ref{ex:drianetal}.}
\label{fig:t4f7x12}
\end{figure}
The relevant membership functions are shown in Figure~\ref{fig:xonefuz}, \ref{fig:xtwofuz}, \ref{fig:uallfuz}, and~\ref{fig:udetfuz}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{xonefuz.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/xonefuz.bmp}
%\hskip1in\special{bmp:c:/ee680/xonefuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $x_1$ of Example~\ref{ex:drianetal}.}
\label{fig:xonefuz}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{xtwofuz.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/xtwofuz.bmp}
%\hskip1.25in\special{bmp:c:/ee680/xtwofuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $x_2$ of Example~\ref{ex:drianetal}.}
\label{fig:xtwofuz}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{uallfuz.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/uallfuz.bmp}
%\hskip1.25in\special{bmp:c:/ee680/uallfuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $u$ of Example~\ref{ex:drianetal}.}
\label{fig:uallfuz}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{udetfuz.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/udetfuz.bmp}
%\hskip1.25in\special{bmp:c:/ee680/udetfuz.bmp x=3.97in y=3.5in}
\caption{Magnification of the membership functions of $u$ on the interval $[-1.5,1.5]$ of Example~\ref{ex:drianetal}.}
\label{fig:udetfuz}
\end{figure}
The following MATLAB function can be used to generate all the relevant membership functions.\index{MATLAB function!to generate membership functions}
\begin{verbatim}
function y = trap_a(x,a1,a2,c,s)
%TRAP_A is an asymmetric trapezoid type membership function,
% also called a ``pi'' function,
% where x is the function domain, a1 is the length of the
% left trapezoid's side
% at the base, a2 is the length of the right side at the base,
% c is the trapezoid's center, and s is a half of the
% trapezoid upper side. Thus the length of the trapezoid upper
% side is 2*s. The length of the trapezoid base is then 2*s+a1+a2.
% Set s=0 to get a triangular membership function.

y1=min(0.5,(max((-0.5),(0.5 +((x-c+s)./a1)))));
y2=min(0.5,(max((-0.5),(0.5 -((x-c-s)./a2)))));
y=y1+y2;
\end{verbatim}
We used the rules matrix given in Table~\ref{tab:rulestefofa} to produce a nonlinear mapping $u=\Phi(x_1,x_2)$ and to construct a look-up table that implements the obtained mapping representing a fuzzy logic controller.\index{look-up table!to implement control surface} The 2-D Look-Up Table block to implement the controller was used. The look-up table size was $22 \times 22$. A plot of $u=\Phi(x_1,x_2)$ is shown in Figure~\ref{fig:t4f7cos}.
\begin{figure}
\centering
\includegraphics[scale=0.7]{t4f7cos.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/t4f7cos.bmp}
%\hskip1.25in\special{bmp:c:/ee680/t4f7cos.bmp x=3.97in y=3.5in}
\caption{A plot of $u=\Phi(x_1,x_2)$ of Example~\ref{ex:drianetal}.}
\label{fig:t4f7cos}
\end{figure}
\begin{table}
\caption{The rules matrix of Example~\ref{ex:drianetal}.}
\begin{center}
\begin{tabular}{c||c|c|c|c|c} \hline
$x_1$ & LN & N & ZE & P & LP \\ \cline{1-1}
$x_2$& {}&{}&{}&{}&{}\\ \hline \hline
LN & PVB & PM & PM & PM & PVB \\ \hline
N & PB & P & PS& PS & PM \\ \hline
ZE & P & PVS & ZE & NVS & N \\ \hline
P & NM & NS & NS & N & NB \\ \hline
LP & NVB & NM & NM & NM & NVB \\ \hline
\end{tabular}
\end{center}
\label{tab:rulestefofa}
\end{table}
A SIMULINK diagram of the closed-loop system is given in Figure~\ref{fig:t4f7sid}.
\begin{figure}
\centering
\includegraphics[scale=0.7]{t4f7sid.eps}
%\vspace{4in}
%\centerbmp{5.33in}{4in}{c:/mybook/t4f7sid.bmp}
%\hskip.25in\special{bmp:c:/ee680/t4f7sid.bmp x=5.33in y=4in}
\caption{A SIMULINK diagram of the closed-loop system of Example~\ref{ex:drianetal}.}
\label{fig:t4f7sid}
\end{figure}
A phase-portrait of the closed-loop system\index{phase-portrait!of closed-loop system} is depicted in Figure~\ref{fig:t4f7phc}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{t4f7phc.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/t4f7phc.bmp}
%\hskip1.25in\special{bmp:c:/ee680/t4f7phc.bmp x=3.97in y=3.5in}
\caption{A phase-plane portrait of the closed-loop system of Example~\ref{ex:drianetal}.}
\label{fig:t4f7phc}
\end{figure}
Plots $x_1$ and $x_2$ versus time for $x_1(0)=-1$ and $x_2(0)=0$ for the closed-loop system are shown in Figure~\ref{fig:t4f7x12c}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{t4f7x12c.eps}
%\vspace{3.5in}
%\centerbmp{3.97in}{3.5in}{c:/mybook/t4f7x12c.bmp}
%\hskip1.25in\special{bmp:c:/ee680/t4f7x12c.bmp x=3.97in y=3.5in}
\caption{Plots $x_1$ and $x_2$ versus time for $x_1(0)=-1$ and $x_2(0)=0$ for the closed-loop system in Example~\ref{ex:drianetal}.}
\label{fig:t4f7x12c}
\end{figure}
\end{example}
\markex


\section{Stabilization Using Fuzzy Models}
\label{sec:fuzmostabli}
In this section, a systematic Lyapunov based stabilizing control design\index{Lyapunov based!stabilizing control design}\index{stabilizing control design!Lyapunov based} method for uncertain nonlinear dynamical systems using fuzzy models is presented. The controller is constructed using a design model of the dynamical process to be controlled. Recall that the dynamical process to be controlled is also called the plant.\index{plant!process to be controlled} We obtain the design model\index{design model} from the truth model\index{truth model} using a fuzzy modeling\index{fuzzy modeling} approach.
%The truth model represents a detailed description of the process dynamics. %The truth model is used in a simulation experiment to evaluate performance %of the controller design. A method for generating local models that %constitute the design models is proposed. Sufficient conditions for %stability and stabilizability of fuzzy models using fuzzy state-feedback %controllers are given. The results obtained are illustrated with a %numerical example involving a four dimensional nonlinear model of a stick %balancer.

\subsection{Fuzzy Modeling}
\label{subsec:fuzzymodeling}
In many situations there may be human experts that can provide a linguistic description,\index{human experts!provide a linguistic description}\index{linguistic description!provided by human experts} in terms of IF-THEN rules\index{IF-THEN rules}, of the plant dynamical behavior. Combining available mathematical description of the plant with its linguistic description results in a fuzzy system model.\index{fuzzy system model!mathematical and linguistic descriptions} Such an approach to modeling of continuous-time dynamical processes was proposed by Takagi and Sugeno~\cite{takagi85} and further developed by Sugeno and Kang~\cite{sugeno88}. This type of model is called the Takagi-Sugeno~(T-S)\index{Takagi-Sugeno (T-S) fuzzy model|see{Takagi-Sugeno-Kang (TSK) fuzzy model}} or Takagi-Sugeno-Kang~(TSK) fuzzy model.\index{Takagi-Sugeno-Kang (TSK) fuzzy model}\index{TSK fuzzy model|see{Takagi-Sugeno-Kang (TSK) fuzzy model}} We mention here that the discrete-time version of the TSK model was analyzed by Tanaka and Sugeno~\cite{tanaka92}, and Tanaka~\cite{tanaka95}, while Wang, Tanaka, and Griffin~\cite{wang96}, Cao, Rees, and Feng~\cite{cao96}, and Feng et al.~\cite{feng97} used TSK fuzzy models to design stabilizing controllers for nonlinear systems. One can construct a TSK model\index{TSK model|see{Takagi-Sugeno-Kang (TSK) fuzzy model}} if local description of the plant is available in terms of local linear models,
\[
\dot{\b x}(t)=\b A_i\b x(t)+\b B_i\b u(t),\quad i=1,2,\ldots,r,
\]
where the state vector $\b x(t) \in \mb{\Bb R}^n$, the control input $\b u(t) \in \mb{\Bb R}^m$, and the matrices $\b A_i$ and $\b B_i$ are of appropriate dimensions. The above information is then fused with the available IF-THEN rules,\index{IF-THEN rules} where the $i$-th rule can have the form:
\[
\mb{Rule i }:\mb{ IF } x_1(t)\mb{ is } F_1^i\mb{ AND} \cdots\mb{ AND }x_n(t)\mb{ is }F_n^i,
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_i\b x(t)+\b B_i\b u(t),
\]
where $F_j^i$, $j=1,2,\ldots,n$, is the $j$-th fuzzy set of the $i$-th rule. Let $\mu_j^i(x_j)$ be the membership function of the fuzzy set $F_j^i$, and let
\[
w^i = w^i(\b x)=\prod_{j=1}^n\mu_j^i(x_j).
\]
Then, the resulting fuzzy system model is constructed as the weighted average of the local models\index{fuzzy system model!weighted average of local models} and has the form,
\begin{eqnarray}
\dot{\b x} &=& \frac{\sum_{i=1}^r w^i\left( \b A_i\b x+\b B_i\b u\right)}{\sum_{i=1}^r w^i}\nonumber\\
&=&\sum_{i=1}^r \alpha_i\left( \b A_i\b x+\b B_i\b u\right)\nonumber\\
&=&\left(\sum_{i=1}^r \alpha_i \b A_i\right)\b x + \left(\sum_{i=1}^r \alpha_i\b B_i\right)\b u \nonumber\\
&=& \b A(\b \alpha)\b x+\b B(\b \alpha)\b u,
\label{eq:fuzzy_modeltsk}
\end{eqnarray}
where for $i=1,2,\ldots,r$,
\begin{equation}
\alpha_i=\frac{w^i}{\sum_{i=1}^r w^i}.
\label{eq:defnofalpha}
\end{equation}
Note that, for $i=1,2,\ldots,r$,
\begin{equation}
\label{eq:alphastsk}
\alpha_i\ge 0,\quad \sum_{i=1}^r \alpha_i=1\quad \mb{and}\quad \b \alpha =\left[\begin{array}{cccc}
\alpha_1&\alpha_2&\cdots&\alpha_r
\end{array}\right]^{\top}
\in [0,1]^r.
\end{equation}
A system model given by~(\ref{eq:fuzzy_modeltsk}) and~(\ref{eq:alphastsk}) is also referred to as in the literature as the {\em polytopic system\/}---see, for example, Takaba~\cite{takaba00}.\index{polytopic system|see{fuzzy system model}}



\subsection{Constructing a Fuzzy Design Model Using a Nonlinear Model}
\label{subsection:design}

In the stabilization problem\index{stabilization problem} of a nonlinear plant, we are concerned with constructing a controller so that starting from an arbitrary point, in some neighborhood of the operating point, the controller forces the closed-loop system trajectory to converge to this operating point. On the other hand, if the starting point coincides with the operating point, the closed-loop system trajectory is expected to stay at this point for all subsequent time. When designing a controller, we use a TSK fuzzy design model\index{TSK fuzzy design model} obtained by combining a mathematical description of the plant in terms of its truth model and a linguistic description of the plant. The essential components of the TSK model are linear local models,\index{local models!components of the TSK model} which describe the plant dynamical behavior at its different operating points. We show that using common linearization approach to construct local models may result in a fuzzy design model different from what the designer had in his or her mind. For example, suppose that the truth model of a plant has the form
\begin{equation}
\dot{\b x}=\b f(\b x)+\b G(\b x)\b u.
\label{eq:linearinu}
\end{equation}
For simplicity of notation, let
\[
\b F(\b x,\b u)=\b f(\b x)+\b G(\b x)\b u.
\]
Then, we can represent~(\ref{eq:linearinu}) as
\begin{equation}
\dot{\b x}=\b F(\b x,\b u).
\label{eq:general}
\end{equation}
Expanding $\b F$ into a Taylor series around $(\b x_0,\b u_0)$ yields
\begin{equation}
\dot{\b x} = \b F(\b x_0,\b u_0)+\left.\frac{\partial \b F}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}\left(\b x-\b x_0\right)+\left.\frac{\partial \b F}{\partial \b u}\right\arrowvert_{{\b x=\b x_0 \atop\b u=\b u_0}}\left(\b u-\b u_0\right)+ \mb{higher order terms},
\label{eq:abouteq}
\end{equation}
where
\begin{equation}
\b F(\b x,\b u)=\b f(\b x)+\b G(\b x)\b u=\b f(\b x)+\sum_{k=1}^mu_k\b g_k(\b x),
\label{eq:leftover}
\end{equation}
where $\b g_k$ is the $k$-th column of $\b G$. To write expressions for the second and the third terms of~(\ref{eq:abouteq}) as functions of $\b f$ and $\b G$, let $g_{ij}$ be the $(i,j)$-th element of the matrix $\b G$. Then,
\begin{equation}
\left.\frac{\partial \b F}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}=\left.\frac{\partial \b f}{\partial \b x}\right\arrowvert_{\b x=\b x_0}+\left.\sum_{k=1}^m u_k\frac{\partial \b g_k}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}=\left.\frac{\partial \b f}{\partial \b x}\right\arrowvert_{\b x=\b x_0}+\b H(\b x_0,\b u_0),
\label{eq:prea}
\end{equation}
where the $(i,j)$-th element of the $n\times n$ matrix $\b H$ has the form
\[
\left.\sum_{k=1}^{m}u_k\frac{\partial g_{ik}(\b x)}{\partial x_j}\right\arrowvert_{{\b x=\b x_0\atop \b u=\b u_0}}.
\]
Finally,
\begin{equation}
\left.\frac{\partial \b F}{\partial \b u}\right\arrowvert_{{\b x=\b x_0\atop \b u=\b u_0}}=\b G(\b x_0).
\label{eq:preb}
\end{equation}
A point $(\b x^{\top}_0,\b u^{\top}_0)^{\top}\in \mb{\Bb R}^{n+m}$ is an equilibrium point of~(\ref{eq:general}) if $\b F(\b x_0,\b u_0)=\b 0$, that is, if at $(\b x_0,\b u_0)$ we have $\dot{\b x}=\b 0$. Let $\Delta \b x=\b x-\b x_0$ and $\Delta \b u=\b u-\b u_0$. Note that
\[
\frac{d \b x_0}{dt}=\b 0.
\]
Then, the linearized model about the equilibrium\index{linearized model!about the equilibrium} $(\b x_0,\b u_0)$ is obtained by neglecting higher order terms and observing that at the equilibrium point $\b F(\b x_0,\b u_0)=\b 0$. The linearized model has the form
\begin{equation}
\frac{d}{dt}\Delta \b x=\b A\Delta \b x+\b B \Delta \b u,
\label{eq:linmodel}
\end{equation}
where
\[
\b A=\left.\frac{\partial \b F}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}\;\mb{and}\quad\b B= \left.\frac{\partial \b F}{\partial \b u}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}.
\]

Suppose now that we wish to construct a stabilizing controller for the truth model $\dot{\b x}=\b f(\b x)+\b G(\b x)\b u$, where $\b f(\b 0)=\b 0$, so that the pair $(\b x=\b 0,\b u=\b 0)$ constitutes an asymptotically stable equilibrium point of the closed-loop system. Our first step is to construct a fuzzy design model. We start with generating linear local models describing plant's behavior at selected operating points.\index{local models!describe plant's behavior at operating points} It is natural to first construct a local linear model that describes plant's behavior about the equilibrium state $\b x=\b 0$. We can obtain this first local linear model using the above described linearization technique. The resulting model is given by
\[
\dot{\b x}=\b A_1\b x+\b B_1\b u.
\]
Next, we construct local linear models describing plant's behavior at the remaining operating points. Suppose that $\b x=\b x_j$ is the next operating state of interest. The result of Taylor's linearization\index{Taylor's linearization} of a nonlinear model about an operating non-equilibrium point is, in general, an affine,\index{affine!rather than linear} rather than a linear model. Even if the operating point is an equilibrium point, Taylor series linearization, in general, will not yield, in general, a local model that is linear. Indeed, suppose that the operating point $(\b x_j, \b u_j)$ is an equilibrium point, that is,
\begin{equation}
\b f(\b x_j)+\b G(\b x_j)\b u_j=\b 0.
\label{eq:zerooffset}
\end{equation}
By~(\ref{eq:abouteq}), the resulting linearized model is
\begin{eqnarray}
\frac{d}{dt}(\b x-\b x_j)&=&\b f(\b x_j)+\b G(\b x_j)\b u_j+\b A_j(\b x-\b x_j)+\b B_j(\b u-\b u_j)\\
&=& \b A_j(\b x-\b x_j)+\b B_j(\b u-\b u_j).
\label{eq:loctaylor}
\end{eqnarray}
We can represent model~(\ref{eq:loctaylor}) in the form
\begin{equation}
\dot{\b x}=\b A_j\b x+\b B_j\b u-\left(\b A_j\b x_j+\b B_j\b u_j \right).
\label{eq:affine}
\end{equation}
The term $\left(\b A_j\b x_j+\b B_j\b u_j \right)$ does not have to be equal to zero, and hence~(\ref{eq:affine}) is not a linear model, but rather an affine model.\index{affine model} We illustrate, on a numerical example, that the term $\left(\b A_j\b x_j+\b B_j\b u_j \right)$ is indeed, in general, not equal to zero.
\begin{example}\rm
\label{ex:secondord}
Consider a subsystem of model~(\ref{eq:state_stick}) of the form
\begin{equation}
\left[\begin{array}{c}
\dot{x}_1\\
\dot{x}_2
\end{array}\right]=\left[\begin{array}{c}
x_2\\
\frac{g\sin(x_1)-mlax_2^2\sin(2x_1)/2}{4l/3-mla\cos^2(x_1)}\end{array}\right]+\left[\begin{array}{c}
0\\
-\frac{a\cos(x_1)}{4l/3-mla\cos^2(x_1)}\end{array}\right]u,
\label{eq:subsystem}
\end{equation}
where $g=9.8$~m/sec$^2$, $m=2$~kg, $M=8$~kg, $a=1/(m+M)$, $l=0.5$~m. We linearize (\ref{eq:subsystem}) about $x_1=\pi/4$. For $x_1=\pi/4$ to be a component of an equilibrium state,\index{equilibrium state} we have to have $x_2=0$. Hence, the equilibrium state is
\[
\b x_e=\left[\begin{array}{cc}
\pi/4 & 0
\end{array}\right]^{\top}.
\]
We next compute $u=u_e$ so that equation~(\ref{eq:zerooffset}) holds. Performing simple calculations, we get $u_e=98$. Then, using~(\ref{eq:prea}) we obtain
\begin{equation}
\b A=\left[\begin{array}{cc}
0 & 1\\
22.4745 & 0
\end{array}\right].
\label{eq:a_reduced}
\end{equation}
Next, using~(\ref{eq:preb}) gives
\begin{equation}
\b B=\left[\begin{array}{c}
0\\
-0.1147
\end{array}\right].
\label{eq:b_reduced}
\end{equation}
\label{ex:reduced}
Note that
\[
\b A\b x_e+\b Bu_e=\left[\begin{array}{c}
0\\
6.4108
\end{array}\right]\neq \b 0.
\]
\end{example}
\markex
The above example illustrates the fact that the system being linear in $\Delta \b x=\b x-\b x_0$ and $\Delta \b u=\b u-\b u_0$ is, in general, only affine, and not linear in $\b x$ and $\b u$ because of the presence of the offset term\index{offset term} $-\left( \b A\b x_0+\b B\b u_0\right)$. The designer must than be careful when constructing local models using Taylor series linearization because this approach, in general, will not yield local models linear in $\b x$ and $\b u$. We note that Taylor's linearization\index{Taylor's linearization} yields a linear system in $\b x$ and $\b u$ if the equilibrium point is $(\b x_0^{\top},\b u_0^{\top})=(\b 0^{\top},\b 0^{\top})$.


We now describe our method of constructing local models using the truth model of the given plant. We assume that the truth model has the form of~(\ref{eq:linearinu}). Suppose that we are given an operating state\index{operating state} $\b x_0$ that does not have to be an equilibrium state of~(\ref{eq:linearinu}). Our goal is to construct a linear model in $\b x$ and $\b u$ that approximates the behavior of~(\ref{eq:linearinu}) in the vicinity of the operating state $\b x_0$, that is, we wish to find constant matrices $\b A$ and $\b B$ such that in a neighborhood of $\b x_0$,
\begin{equation}
\b f(\b x)+\b G(\b x)\b u\approx\b A\b x+\b B\b u,
\label{eq:abapprox}
\end{equation}
and
\begin{equation}
\b f(\b x_0)+\b G(\b x_0)\b u=\b A\b x_0+\b B\b u\quad\mb{for all}\quad \b u.
\label{eq:ablininu}
\end{equation}
Because $\b u$ is arbitrary, we have to have
\begin{equation}
\b G(\b x_0)=\b B.
\label{eq:condonu}
\end{equation}
Thus, we are left with finding a constant matrix $\b A$ such that in a neighborhood of $\b x_0$,
\begin{equation}
\b f(\b x)\approx\b A\b x,
\label{eq:condonaapprox}
\end{equation}
and
\begin{equation}
\b f(\b x_0)=\b A\b x_0.
\label{eq:condona}
\end{equation}
Let $\b a_i^{\top}$ denote the $i$-th row of the matrix $\b A$. Then, for the purpose of further analysis, we represent condition~(\ref{eq:condonaapprox}) as
\begin{equation}
f_i(\b x)\approx \b a_i^{\top}\b x,\quad i=1,2,\ldots,n,
\label{eq:aasimple}
\end{equation}
and we represent~(\ref{eq:condona}) as
\begin{equation}
f_i(\b x_0)=
\b a_i^{\top}\b x_0,\quad i=1,2,\ldots,n,
\label{eq:condoneq}
\end{equation}
where the $i$-th component of $\b f$ is $f_i:\mb{\Bb R}^n \to \mb{\Bb R}$. Expanding the left hand side of~(\ref{eq:aasimple}) about $\b x_0$ and neglecting second and higher order terms\index{higher order terms!neglecting} yields
\begin{equation}
f_i(\b x_0)+\nabla f_i(\b x_0)^{\top}(\b x-\b x_0) \approx \b a_i^{\top}\b x,
\label{eq:taylorapprox}
\end{equation}
where $\nabla f_i(\b x):\mb{\Bb R}^n \to \mb{\Bb R}^n$ is the gradient (a column vector)\index{gradient!a column vector} of $f_i$ at $\b x$.
Now, using~(\ref{eq:condoneq}), we represent~(\ref{eq:taylorapprox}) as
\begin{equation}
\nabla f_i(\b x_0)^{\top}(\b x-\b x_0) \approx \b a_i^{\top}\left(\b x-\b x_0\right),
\label{eq:tayloreq}
\end{equation}
where $\b x$ is arbitrary but ``close'' to $\b x_0$. Our task now is to determine a constant vector $\b a_i$ that is as ``close as possible'' to $\nabla f_i(\b x_0)$ and satisfies the constraint $\b a_i^{\top}\b x_0=f_i(\b x_0)$. Let
\[
E=\frac{1}{2}\left\| \nabla f_i(\b x_0)-\b a_i\right\|_2^2.
\]
Then, we can formulate our task as a constrained optimization problem of the form
\begin{equation}
\left.\begin{array}{l}
\stackrel{\textstyle\mb{minimize }E}{\footnotesize{\b a}_i}\\
\mb{subject to  } \b a_i^{\top}\b x_0=f_i(\b x_0).
\end{array}\right\}
\label{eq:optyai}
\end{equation}
We note that~(\ref{eq:optyai}) is a convex constrained optimization\index{convex constrained optimization} problem. This means that the first-order necessary condition for a minimum\index{first-order necessary condition!for a minimum} of $E$ is also sufficient, see, for example, Luenberger~\cite[Section~6.5]{luenberger84} or Chong and \.{Z}ak~\cite[Chapter~21]{chong08}. The first-order conditions for the optimization problem given by~(\ref{eq:optyai}) are
\begin{eqnarray}
&{}&\nabla_{\b a_i} E+\lambda \nabla_{\b a_i} \left(\b a_i^{\top}\b x_0-f_i(\b x_0) \right) = \b 0,\label{eq:firstcond}\\
&{}&\b a_i^{\top}\b x_0 = f_i(\b x_0),
\end{eqnarray}
where $\lambda$ is the Lagrange multiplier\index{Lagrange multiplier} and the subscript $\b a_i$ in $\nabla_{\footnotesize{\b a}_i}$ indicates that the gradient, $\nabla$ is computed with respect to $\b a_i$. Performing the required differentiation in~(\ref{eq:firstcond}) yields
\begin{eqnarray}
&{}&\b a_i-\nabla f_i(\b x_0)+\lambda \b x_0 = \b 0,\label{firstl}\\
&{}&\b a_i^{\top}\b x_0 = f_i(\b x_0).
\label{eq:firsteva}
\end{eqnarray}
Recall that we consider now the case when $\b x_0\ne \b 0$. Premultiplying~(\ref{firstl}) by $\b x_0^{\top}$ and substituting~(\ref{eq:firsteva}) into the resulting equation yields
\begin{equation}
\lambda=\frac{\b x_0^{\top}\nabla f_i(\b x_0)-f_i(\b x_0)}{\|\b x_0\|^2}.
\label{eq:lamo}
\end{equation}
Substituting $\lambda$ given by~(\ref{eq:lamo}) into~(\ref{firstl}), we obtain
\begin{equation}
\fbox{$\displaystyle \b a_i=\nabla f_i(\b x_0)+\frac{f_i(\b x_0)-\b x_0^{\top}\nabla f_i(\b x_0)}{\|\b x_0\|^2}\b x_0,\quad \b x_0\ne \b 0 $}
\label{eq:optimalai}
\end{equation}

We now summarize the above development. Let
\[
\b J(\b x_0)=\left.\frac{\partial \b f}{\partial \b x}\right\arrowvert_{\b x=\b x_0}
\]
be the Jacobian matrix\index{Jacobian matrix} of $\b f$ evaluated at the operating state $\b x=\b x_0$. Then a linear model in $\b x$ and $\b u$ that approximates the behavior of~(\ref{eq:linearinu}) in the vicinity of the operating state $\b x_0$\index{linear model!in $\b x$ and $\b u$}\index{linear model!in the vicinity of the operating state} has the form
\begin{equation}
\fbox{$\displaystyle \dot{\b x} = \left[ \b J(\b x_0) + \frac{\left(\b f(\b x_0)-  \b J(\b x_0)\b x_0 \right)\b x_0^{\top}}{\|\b x_0\|^2} \right]\b x + \b G(\b x_0)\b u ,\quad \b x_0\ne \b 0 $}
\label{eq:lin_in_u_and_x_approx_nonl}
\end{equation}

On the other hand, if the operating pair $(\b x_0, \b u_0)$ is an equilibrium pair, then Taylor's linearization\index{Taylor's linearization} of~(\ref{eq:linearinu}) would yield the following linearized model;
\[
\frac{d}{dt}(\b x-\b x_0)=\left[\left.\frac{\partial \b f}{\partial \b x}\right\arrowvert_{\b x=\b x_0}+\left.\sum_{k=1}^m u_k\frac{\partial \b g_k}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}} \right](\b x-\b x_0) + \b G(\b x_0)(\b u - \b u_0),
\]
where the matrix
\[
\left.\frac{\partial \b f}{\partial \b x}\right\arrowvert_{\b x=\b x_0}+\left.\sum_{k=1}^m u_k\frac{\partial \b g_k}{\partial \b x}\right\arrowvert_{{\b x=\b x_0\atop\b u=\b u_0}}
\]
is computed in~\eqref{eq:prea}.


\begin{example}\rm
We apply~\eqref{eq:optimalai} to construct local linear models of the nonlinear model~(\ref{eq:subsystem}) that we analyzed in Example~\ref{ex:secondord}. This nonlinear model was also considered by Wang et al.~\cite[page 20]{wang96}. Suppose that, as in Wang et al.~\cite{wang96}, we wish to construct two local models;\index{local models!pendulum} one describing the plant operation about $x_1=0$ and the other local model when $x_1$ is about $\pm \pi/2$. In both models, we assume that $x_2=0$ and $u$ is arbitrary. Note that the nonlinear model~(\ref{eq:subsystem}) is in the format given by~(\ref{eq:linearinu}).
We first construct a local model about the operating state $x_1=x_2=0$. The local model for this case can be obtained using Taylor's linearization about the equilibrium point $(\b x_0,\b u_0)=(\b 0,\b 0)$.

We next construct the second local model that corresponds to $x_1=88^{\circ}\pi/180^{\circ}$ and $x_2=0$. Let $\beta=\cos(88^{\circ})$. Then, the input matrix $\b B$ can be obtained from~(\ref{eq:subsystem}) using~(\ref{eq:condonu}),
\[
\b B=\left[\begin{array}{c}
0\\
-\frac{a\beta}{4l/3-mla\beta^2}
\end{array}\right].
\]
We then compute the matrix $\b A$ of the second local model using~(\ref{eq:optimalai}). We first compute the first row $\b A$. We note that $f_1(\b x)=x_2$, and hence
\[
\nabla f_1=\left[\begin{array}{cc}
0 & 1
\end{array}\right]^{\top}.
\]
The operating state is $\b x_0=\left[\begin{array}{cc}
88^{\circ}\pi/180^{\circ} & 0
\end{array}\right]^{\top}$. We compute $\b a_1^{\top}$, the first row of $\b A$, using~(\ref{eq:optimalai}) to get
\[
\b a_1^{\top} = \nabla^{\top} f_1(\b x_0)+\left[\begin{array}{cc}
0 & 0
\end{array}\right]= \left[\begin{array}{cc}
0 & 1
\end{array}\right].
\]
We again use~(\ref{eq:optimalai}) to compute $\b a_2^{\top}$, the second row of the matrix $\b A$, of the second local model,
\[
\b a_2^{\top} = \left[\begin{array}{cc}
f_2(\b x_0)/(88^{\circ}\pi/180^{\circ}) & 0
\end{array}\right] \approx  \left[\begin{array}{cc}
\frac{g}{4l/3-mla\beta^2}(\frac{2}{\pi}) & 0
\end{array}\right].
\]
The above obtained local models are the same as the ones that were proposed by Wang et al.~\cite{wang96} using a heuristic approach.
\end{example}\markex

\subsection{Stabilizability of Fuzzy Models}
\label{subsection:stability}

In this subsection, we first present sufficient conditions for asymptotic stability in the large of unforced continuous-time fuzzy model\index{fuzzy model!unforced continuous-time}\index{unforced fuzzy model}
\begin{equation}
\dot{\b x}=\sum_{i=1}^r \alpha_i \b A_i\b x,
\label{eq:unforced}
\end{equation}
where $\alpha_i=\alpha_i(\b x(t)) \ge 0$ for $i=1,2,\ldots,r$, and $\sum_{i=1}^r \alpha_i=1$. The above model can be viewed as an example of unforced continuous-time polytopic model. We next discuss the stabilizability problem of forced fuzzy models using fuzzy state-feedback\index{fuzzy state-feedback} control strategies.

It is straightforward to show that a sufficient condition for asymptotic stability in the large of the equilibrium state $\b x=\b 0$ of system~(\ref{eq:unforced}) is that there exists a symmetric positive definite matrix $\b P$ such that for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^{\top}\b P+\b P\b A_i < 0.
\label{eq:lyap_unforced}
\end{equation}
It is obvious that a necessary condition for the existence of a common symmetric positive definite\index{common!symmetric positive definite $\b P$} $\b P$ satisfying~(\ref{eq:lyap_unforced}) is that each $\b A_i$ be asymptotically stable, that is, the eigenvalues of each $\b A_i$ be in the open left-hand complex plane. We now give another necessary condition for the existence of a common $\b P$ that satisfies~(\ref{eq:lyap_unforced}).
\begin{thm}
Suppose that each $\b A_i$, $i=1,2,\ldots,r$, in the model~(\ref{eq:unforced}) is asymptotically stable and there exists a symmetric positive definite $\b P$ such that conditions~(\ref{eq:lyap_unforced}) hold. Then, the matrices
\[
\sum_{k=1}^s \b A_{i_k},
\]
where $i_k \in \{1,2,\ldots,r \}$ and $s=1,2,3,\ldots,r$ are asymptotically stable.
\label{thm:analog}
\end{thm}
{\bf Proof}\quad Suppose that conditions~(\ref{eq:lyap_unforced}) hold. Let
\begin{equation}
\b A_{i_k}^{\top}\b P+\b P\b A_{i_k} =- \b Q_{i_k},
\label{eq:lyap_sum}
\end{equation}
where $\b Q_{i_k}=\b Q_{i_k}^{\top} > 0$ for $i_k\in \{1,2,\ldots,r\}$. Summing both sides of~(\ref{eq:lyap_sum}) yields
\begin{equation}
\left( \sum_{k=1}^s\b A_{i_k}^{\top}\right)\b P+\b P\left( \sum_{k=1}^s \b A_{i_k}\right)=-\sum_{k=1}^s \b Q_{i_k}.
\label{eq:lyap_summ}
\end{equation}
By assumption $\b P=\b P^{\top}>0$, and because $\b Q_{i_k}=\b Q_{i_k}^{\top} > 0$ for $i_k \in \{1,2,\ldots,r\}$, the symmetric matrices
\[
\sum_{k=1}^s\b Q_{i_k},\quad s=2,3,\ldots,r,
\]
are also positive definite. Hence, by the Lyapunov theorem, the matrices $\sum_{k=1}^s\b A_{i_k}$, $s=2,3,\ldots,r$, are asymptotically stable.\\
\hspace*{5.5in}$\Box$

The following corollary can be viewed as a continuous-time counterpart of Theorem~4.3 of Tanaka and Sugeno~\cite[pages 146--147]{tanaka92}.
\begin{corollary}
Suppose that each $\b A_i$, $i=1,2,\ldots,r$ in fuzzy model~(\ref{eq:unforced}) is asymptotically stable and there exists a symmetric positive definite $\b P$ such that conditions~(\ref{eq:lyap_unforced}) hold. Then, the matrices
\[
\b A_i+\b A_j,\quad i,j=1,2,\ldots,r,
\]
are asymptotically stable.
\end{corollary}

We mention that Tanaka and Sugeno's Theorem~4.3 in~\cite{tanaka92} can be generalized to correspond to Theorem~\ref{thm:analog} rather than to the above corollary.

The above corollary can be restated in an equivalent way as follows. If there exist $i$ and $j$ such that a matrix $\b A_i+\b A_j$ is not asymptotically stable, then there is no positive definite matrix $\b P$ such that $\b A_i^{\top}\b P+\b P\b A_i<0$ for $i=1,2,\ldots,r$. The following example illustrates this fact.
\begin{example}\label{ex:infeasp_two_mats}\rm
Given the unforced fuzzy system model\index{unforced fuzzy!system model} described by~(\ref{eq:unforced}), where $r=2$ and
\[
\b A_1=\left[\begin{array}{cc}
-1 & 4\\
0 & -2
\end{array}\right], \quad \b A_2=\left[\begin{array}{cc}
-1 & 0\\
4 & -2
\end{array}\right].
\]
Obviously each $\b A_i$, $i=1,2$, is asymptotically stable. However, there is no common positive definite $\b P$ such that $\b A_i^{\top}\b P+\b P\b A_i<0$ for $i=1,2$ because the matrix
\[
\b A_1+\b A_2=\left[\begin{array}{cc}
-1 & 4\\
0 & -2
\end{array}\right]+\left[\begin{array}{cc}
-1 & 0\\
4 & -2
\end{array}\right]=\left[\begin{array}{cc}
-2 & 4\\
4 & -4
\end{array}\right]
\]
is unstable since its eigenvalues are
\[
\{1.1231, -7.1231\}.
\]
\end{example}
\markex
Theorem~\ref{thm:analog} can be used to check if there does not exist a positive definite matrix $\b P$ satisfying conditions~(\ref{eq:lyap_unforced}) because this theorem gives us a sufficient condition for non-existence of a common $\b P$ that satisfies~(\ref{eq:lyap_unforced}).\index{non-existence of a common $\b P$!sufficient condition}

We now present a sufficiency condition for asymptotic stabilizability in the large of the model given by~(\ref{eq:fuzzy_modeltsk}) and~(\ref{eq:alphastsk}) using fuzzy state feedback control law
\begin{equation}
\b u=-\sum_{j=1}^r \alpha_j\b K_j\b x.
\label{eq:fuzzy_feed}
\end{equation}
The closed-loop system has the form
\begin{equation}
\fbox{$ \displaystyle \dot{\b x}=\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x $}
\label{eq:closed_fuzzy}
\end{equation}
To obtain the above model we used the fact that $\sum_{j=1}^r \alpha_j = 1$. Suppose that the gain matrices, $\b K_i$, were chosen so that the matrices
\[
\b A_i-\b B_i\b K_i,\quad i=1,2,\ldots,r,
\]
have their eigenvalues in the open left-hand complex plane, that is, they are asymptotically stable.
Let
\[
\b G_{ij}=\left(\b A_i-\b B_i\b K_j \right)+\left(\b A_j-\b B_j\b K_i \right)\quad \mb{for}\quad i<j\le r.
\]
We present sufficient conditions of Wang et al.~\cite{wang96} for the closed-loop system modeled by~(\ref{eq:closed_fuzzy}) to be asymptotically stable in the large.\index{asymptotically stable!in the large}
\begin{thm}
\label{thm:wangssufco}
If for some symmetric positive definite $\b P$ the following conditions are satisfied:
\begin{equation}
\left(\b A_i-\b B_i\b K_i \right)^{\top}\b P+\b P\left(\b A_i-\b B_i\b K_i \right)<0,\quad i=1,2,\ldots,r
\label{eq:compforai}
\end{equation}
and
\begin{equation}
\b G_{ij}^{\top}\b P+\b P\b G_{ij}<0,\quad i<j\le r,
\label{eq:compforg}
\end{equation}
then the closed-loop system modeled by~(\ref{eq:closed_fuzzy}) is asymptotically stable in the large.
\end{thm}
{\bf Proof}\quad Let $\b P$ be such that~(\ref{eq:compforai}) and~(\ref{eq:compforg}) are satisfied. We evaluate the time derivative of $\b x(t)^{\top}\b P\b x(t)$ on the trajectories of~(\ref{eq:closed_fuzzy}) to get\index{time derivative!on system trajectories}
\begin{eqnarray}
\frac{d}{dt}\left( \b x(t)^{\top}\b P\b x(t) \right) &=& 2\b x^{\top}\b P\dot{\b x}\nonumber\\
&=& 2\b x^{\top}\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x\right)\nonumber\\
&=& \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\b x^{\top}\left(\left( \b A_i-\b B_i\b K_j\right)^{\top}\b P+\b P\left( \b A_i-\b B_i\b K_j\right)\right)\b x\nonumber\\
&=& \sum_{i=1}^r\alpha_i^2 \b x^{\top}\left( \left( \b A_i-\b B_i\b K_i\right)^{\top}\b P+\b P\left( \b A_i-\b B_i\b K_i\right)\right)\b x\nonumber\\
&{}&\quad + \sum_{i=1}^r \sum_{j>i}^r \alpha_i \alpha_j\b x^{\top}\left(\b G_{ij}^{\top}\b P+\b P\b G_{ij}\right)\b x.
\label{eq:expantideofp}
\end{eqnarray}
Hence, when~(\ref{eq:compforai}) and~(\ref{eq:compforg}) are satisfied, the positive definite quadratic function $\b x^{\top}\b P\b x$ becomes a Lyapunov function for the system~(\ref{eq:closed_fuzzy}), which implies asymptotic stability in the large of~(\ref{eq:closed_fuzzy}). The proof of the theorem is complete.\\
\hspace*{5.5in}$\Box$


We give a sufficient condition for the stability of system~(\ref{eq:closed_fuzzy}) for the case when conditions~(\ref{eq:compforg}) are not satisfied. To proceed, we need the following notation. Suppose that there is a positive definite $\b P$ such that conditions~(\ref{eq:compforai}) are satisfied. Represent conditions~(\ref{eq:compforai}) as
\begin{equation}
\left(\b A_i-\b B_i\b K_i \right)^{\top}\b P+\b P\left(\b A_i-\b B_i\b K_i \right)=-\b Q_i,\quad i=1,2,\ldots,r,
\label{eq:comqi}
\end{equation}
where each $\b Q_i$ is symmetric positive definite. Let $\lambda_i$ denote the minimum eigenvalue of $\b Q_i$. We have
\begin{equation}
\lambda_i>0,\quad i=1,2,\ldots,r,
\label{eq:positivelams}
\end{equation}
because $\b Q_i=\b Q_i^{\top}>0$. Let
\begin{equation}
\b G_{ij}^{\top}\b P+\b P\b G_{ij}=-\b Q_{ij},\quad i<j\le r,
\label{eq:comgij}
\end{equation}
where now we do not require $\b Q_{ij}$ to be positive definite. Note that $\b Q_{ij}=\b Q_{ij}^{\top}$, and hence the eigenvalues of $\b Q_{ij}$ are real. Let $\lambda_{ij}$ denote the minimum eigenvalue of $\b Q_{ij}$. We are ready to state and prove the following theorem.
\begin{thm}
Suppose that each $(\b A_i-\b B_i\b K_i)$, $i=1,2,\ldots,r$, in~(\ref{eq:closed_fuzzy}) is asymptotically stable and there exists a symmetric positive definite $\b P$ such that conditions~(\ref{eq:compforai}) hold. Then, the closed-loop fuzzy model~(\ref{eq:closed_fuzzy}) is asymptotically stable in the large if the matrix
\begin{equation}
\b \Lambda=\left[\begin{array}{cccc}
\lambda_1&\lambda_{12}/2&\cdots&\lambda_{1r}/2\\
\lambda_{12}/2 & \lambda_2 &{}&\lambda_{2r}/2\\
\vdots&{}&\ddots&\vdots\\
\lambda_{1r}/2 & \lambda_{2r}/2 &\cdots&\lambda_{r}
\end{array}\right]
\label{eq:lambdasijk}
\end{equation}
is positive definite.
\label{thm:gijnots}
\end{thm}
{\bf Proof}\quad Let
\[
W=W(\b x(t))=\b x(t)^{\top}\b P\b x(t).
\]
be the Lyapunov function candidate\index{Lyapunov function candidate} for the closed-loop system modeled by~(\ref{eq:closed_fuzzy}). We then evaluate the time derivative of $W$ on the trajectories of~(\ref{eq:closed_fuzzy}) to get
\begin{eqnarray}
\dot{W} &=& 2\b x^{\top}\b P\dot{\b x}\nonumber\\
&=& 2\b x^{\top}\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x\right)\nonumber\\
&=& \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\b x^{\top}\left(\left( \b A_i-\b B_i\b K_j\right)^{\top}\b P+\b P\left( \b A_i-\b B_i\b K_j\right)\right)\b x\nonumber\\
&=& -\sum_{i=1}^r\alpha_i^2\b x^{\top}\b Q_i\b x-\sum_{i=1}^r\sum_{j>i}^r \alpha_i\alpha_j\b x^{\top}\b Q_{ij}\b x.
\label{eq:timeder}
\end{eqnarray}
Recall that for any symmetric matrix $\b M=\b M^{\top}$,
\[
\lambda_{\min}(\b M)\|\b x\|^2 \le \b x^{\top}\b M\b x,
\]
where $\lambda_{\min}(\b M)$ is the smallest eigenvalue of $\b M$. Using this fact in~(\ref{eq:timeder}) yields
\begin{eqnarray}
\dot{W}&\le& -\left( \sum_{i=1}^r \alpha_i^2 \lambda_i + \sum_{i=1}^r\sum_{j>i}^r \alpha_i\alpha_j \lambda_{ij}\right)\|\b x\|^2\nonumber\\
&=&-\left(\left[\begin{array}{cccc}
\alpha_1&\alpha_2&\cdots&\alpha_r
\end{array}\right]\left[\begin{array}{cccc}
\lambda_1&\lambda_{12}/2&\cdots&\lambda_{1r}/2\\
\lambda_{12}/2 & \lambda_2 &{}&\lambda_{2r}/2\\
\vdots&{}&\ddots&\vdots\\
\lambda_{1r}/2 & \lambda_{2r}/2 &\cdots&\lambda_{r}
\end{array}\right]\left[\begin{array}{c}
\alpha_1\\
\alpha_2\\
\vdots\\
\alpha_r
\end{array}\right] \right)\|\b x\|^2\nonumber\\
&=&-\left(\b \alpha^{\top}\b \Lambda\b \alpha \right)\|\b x\|^2.
\label{eq:mfact}
\end{eqnarray}
The Lyapunov derivative is negative definite\index{Lyapunov derivative!negative definite} if the matrix $\b \Lambda$ is positive definite, which completes the proof.\\
\hspace*{5.5in}$\Box$

\subsection{A Lyapunov Based Stabilizer}
\label{subsection:controller}

In this subsection, we apply a Lyapunov approach to the fuzzy control design for uncertain dynamical systems\index{uncertain dynamical systems} of the form
\begin{equation}
\dot{\b x}=\b A(\b{\alpha})\b x+\b B(\b{\alpha})(\b u+\b h(t,\b x)),
\label{eq:uncertain}
\end{equation}
where $\b{\alpha}$ satisfies~(\ref{eq:alphastsk}) and the vector-valued function $\b h$ represents modeling uncertainties or disturbances. The only information about uncertainties available to the designer are their bounds. Specifically, we assume that the uncertainty modeling function\index{function!uncertainty modeling} is bounded by a non-negative function $\eta=\eta(t,\b x)$, that is,
\[
\|\b h(t,\b x)\|\le \eta(t,\b x),
\]
where $\|\cdot \|$ denotes the vector $p$-norm. Observe that $\b h$ affects the system dynamics via the input matrix $\b B(\b{\alpha})$ in a similar fashion as the control input $\b u$ does. For this reason, we say that the uncertainty $\b h$ satisfies the matching condition.\index{matching condition}

Some of the Lyapunov based control strategies, using non-fuzzy controllers, for uncertain systems are documented in Zinober~\cite{zinober90}. The method of constructing stabilizing controllers,\index{stabilizing controllers!construction} presented in this section, requires that each of the matrices $\b A_i$, $i=1,2,\ldots,r$ is already asymptotically stable, and that there exists a common symmetric positive definite\index{common $\b P$! symmetric positive definite} $\b P=\b P^{\top}>0$ such that, for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^{\top}\b P+\b P\b A_i < 0.
\label{eq:manyai}
\end{equation}
If this is not the case, we break the design of stabilizing control law, $\b u$, into two parts $\b u=\b u_1+\b u_2$. We first design $\b u_1$ of the form
\begin{equation}
\b u_1=-\sum_{j=1}^r \alpha_j\b K_j\b x
\label{eq:wang}
\end{equation}
so that the system
\[
\dot{\b x}=\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x
\]
is asymptotically stable in the large and there exists a common $\b P$ such that conditions~(\ref{eq:compforai}) and~(\ref{eq:compforg}) or conditions of Theorem~\ref{thm:gijnots} are satisfied. Note that the system modeled by~(\ref{eq:uncertain}) and driven by~(\ref{eq:wang}) has the form
\begin{eqnarray}
\dot{\b x} &=& \sum_{i=1}^r \alpha_i \b A_i\b x - \sum_{i=1}^r \alpha_i\b B_i\left( \sum_{j=1}^r \alpha_j\b K_j\b x \right)+\sum_{i=1}^r \alpha_i\b B_i\left(\b u_2+\b h\right)\nonumber\\
&=& \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x+\sum_{i=1}^r \alpha_i\b B_i\left(\b u_2+\b h\right).
\label{eq:syswithu1}
\end{eqnarray}

We next proceed with the design of $\b u_2$. The role of $\b u_2$ is to reject the uncertainty $\b h$. Then, $\b u=\b u_1+\b u_2$ will asymptotically stabilize in the large the uncertain system~(\ref{eq:uncertain}). We propose a family of fuzzy controllers $\b u_2$ that reject the uncertainty $\b h$. These controllers are obtained by fuzzifying the controllers\index{fuzzifying the controllers} proposed in~\cite{hui93}. To proceed, we need the following notation. Let
\begin{equation}
\b \mu=\left[\begin{array}{cccc}
\mu_1&\mu_2&\ldots&\mu_m
\end{array}\right]^{\top}=
\sum_{i=1}^r \alpha_i\b B_i^{\top}\b P\b x.
\label{eq:boldmu}
\end{equation}
Let $\|\cdot\|_p$ denote the $p$-norm of a vector,\index{p-norm!of a vector} that is, if a vector $\b v \in \mb{\Bb R}^m$, then its $p$-norm is defined as
\[
\|\b v\|_p=\left( |v_1|^p+|v_2|^p+\cdots+|v_m|^p\right)^{1/p}, \quad p\ge 1.
\]
A well-known result concerning $p$-norms is the H\"{o}lder's inequality,\index{H\"{o}lder's inequality}
\[
\left| \b v^{\top} \b w\right|\le \|\b v\|_p\|\b w\|_q,\quad \frac{1}{p}+\frac{1}{q}=1.
\]
All norms on $\mb{\Bb R}^m$ are equivalent\index{equivalent norms} in the sense that if $\|\cdot\|_{\alpha}$ and $\|\cdot\|_{\beta}$ are norms on $\mb{\Bb R}^m$, then there exist positive constants $C_1$ and $C_2$ such that
\begin{equation}
C_1\|\b v\|_{\alpha}\le \|\b v\|_{\beta}\le C_2\|\b v\|_{\alpha}\quad\mb{for all}\quad \b v \in \mb{\Bb R}^m.
\label{eq:equi_norm}
\end{equation}
Finally, the gradient of $\|\b \mu\|_p$, where it is defined, has the form
\begin{equation}
\nabla \|\b \mu\|_p = \left[\begin{array}{cccc}
\frac{\partial \|\b \mu\|_p}{\partial \mu_1}&\frac{\partial \|\b \mu\|_p}{\partial \mu_2}&\ldots&\frac{\partial \|\b \mu\|_p}{\partial \mu_m}
\end{array}\right]^{\top}, \quad p \ge 1.
\label{eq:grad}
\end{equation}
Applying the chain rule, we compute
\begin{equation}
\nabla \|\b \mu\|_p=\frac{1}{\|\b \mu\|_p^{p-1}}\left[\begin{array}{c}
\left|\mu_1\right|^{p-1}\mb{sign}(\mu_1)\\
\left|\mu_2\right|^{p-1}\mb{sign}(\mu_2)\\
\vdots\\
\left|\mu_m\right|^{p-1}\mb{sign}(\mu_m)
\end{array}\right].
\label{eq:chainrule}
\end{equation}
Let $\|\b h(t,\b x)\|_q \le \eta_q$, where $\eta_q \ge 0$ is a constant. We then show that when
\begin{equation}
\b u_2=-\eta_q\nabla\|\b \mu\|_p, \quad p\ge 1,\quad \mb{and}\quad \frac{1}{p}+\frac{1}{q}=1,
\label{eq:u2}
\end{equation}
then the closed-loop system driven by $\b u=\b u_1+\b u_2$ is asymptotically stable in the large for any uncertainty $\b h$ such that $\|\b h\|_q\le \eta_q$.
\begin{thm}
Suppose that $\b u_1$, given by~(\ref{eq:wang}), is such that there exists a common $\b P$ satisfying conditions~(\ref{eq:compforai}) and~(\ref{eq:compforg}) or conditions of Theorem~\ref{thm:gijnots}. Then, the system~(\ref{eq:uncertain}) driven by $\b u=\b u_1+\b u_2$, where $\b u_2$ is given by~(\ref{eq:u2}), is asymptotically stable in the large for any uncertainty $\b h$ such that $\|\b h\|_q\le \eta_q$.
\end{thm}
{\bf Proof}\quad Suppose that $\b u_1$, given by~(\ref{eq:wang}), was constructed  such that~(\ref{eq:compforai}) and~(\ref{eq:compforg}), or conditions of Theorem~\ref{thm:gijnots} hold. Then,~(\ref{eq:uncertain}) driven by $\b u_1$ takes the form~(\ref{eq:syswithu1}), that is,
\[
\dot{\b x}=\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x+\sum_{i=1}^r \alpha_i\b B_i\left(\b u_2+\b h\right).
\]
We now show that
\begin{equation}
W=\b x^{\top}\b P\b x,
\label{eq:lyap}
\end{equation}
is the Lyapunov function for the closed-loop system,\index{Lyapunov function!for the closed-loop system} where $\b P=\b P^{\top}>0$ satisfies~(\ref{eq:compforai}) and~(\ref{eq:compforg}) or conditions of Theorem~\ref{thm:gijnots}. For this, we evaluate the Lyapunov derivative\index{Lyapunov derivative} of $W$, that is, we evaluate $\frac{d}{dt}W$ on the trajectories of~(\ref{eq:syswithu1}), and show that the Lyapunov derivative of $W$ is negative definite. Before we proceed with evaluating $\frac{d}{dt}W$, observe that using the fact that
\[
\mb{sign}(\mu_j)=\frac{|\mu_j|}{\mu_j},
\]
and~(\ref{eq:chainrule}), we obtain
\[
\b{\mu}^{\top} \nabla\|\b \mu\|_p=\|\b \mu\|_p.
\]
Hence,
\begin{eqnarray}
\frac{d}{dt}W &=& 2\b x^{\top}\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b K_j\right)\b x+\sum_{i=1}^r \alpha_i\b B_i\left(\b u_2+\b h\right)\right)\nonumber\\
&<& -2\eta_q\b \mu^{\top} \nabla \|\b \mu\|_p+2\b \mu^{\top} \b h\nonumber\\
&\le&-2\eta_q \|\b \mu\|_p + 2\left| \b \mu^{\top} \b h\right|.
\label{eq:lyap_der}
\end{eqnarray}
Applying H\"{o}lder's inequality\index{H\"{o}lder's inequality} to the above yields
\begin{eqnarray}
\frac{d}{dt}W &<& -2\eta_q \|\b \mu\|_p + 2\|\b \mu\|_p\|\b h\|_q\nonumber\\
&\le& -2\eta_q \|\b \mu\|_p+2\|\b \mu\|_p\,\eta_q.
\label{eq:lyap_holder}
\end{eqnarray}
Therefore, $\frac{d}{dt}W < 0$ and by Lyapunov's theorem,\index{Lyapunov's theorem} the closed loop-system is asymptotically stable in the large.\\
\hspace*{5.5in}$\Box$

\begin{example}\label{example:stick}\rm
Using system model~(\ref{eq:stick_eqiv}), we propose the following two rules describing the plant dynamics:
\[
\mb{Rule 1 }:\mb{ IF } x_1(t)\mb{ is about 0}
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_1\b x(t)+\b B_1(u(t)+h),
\]
and
\[
\mb{Rule 2 }:\mb{ IF } x_1(t)\mb{ is about }\pm\pi/4
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_2\b x(t)+\b B_2(u(t)+h),
\]
where $h=-f_c+mlx_2^2\sin(x_1)$. Local linear models\index{Local linear models!inverted pendulum}\index{inverted pendulum!local models of} are constructed using the procedure described in the previous section, and in particular relations~(\ref{eq:condonu}) and~(\ref{eq:optimalai}). We have
\[
\b A_1=\left[\begin{array}{cccc}
0 & 1 & 0 & 0\\
\frac{g}{4l/3-aml}& 0 & 0 & 0\\
0 & 0 & 0 & 1\\
-\frac{amg}{4/3-am} & 0 & 0 & 0
\end{array}\right],\quad \b B_1=\left[\begin{array}{c}
0\\
-\frac{a}{4l/3-aml}\\
0\\
\frac{4a/3}{4/3-ma}
\end{array}\right].
\]
The matrices $\b A_2$ and $\b B_2$ of the local model corresponding to the second rule are:
\[
\b A_2=\left[\begin{array}{cccc}
0 & 1 & 0 & 0\\
\frac{g\sin(x_1)}{4l/3-mla\cos^2(x_1)}\left(\frac{1}{x_1} \right)& 0 & 0 & 0\\
0 & 0 & 0 & 1\\
\frac{-mag\sin(2x_1)/2}{4/3-ma\cos^2(x_1)}\left(\frac{1}{x_1}\right) & 0 & 0 & 0
\end{array}\right]_{\arrowvert x_1=\pm \pi/4}\quad\mb{and}\quad
\b B_2=\left[\begin{array}{c}
0\\
\frac{-a\cos(x_1)}{4l/3-mla\cos^2(x_1)}\\
0\\
\frac{4a/3}{4/3-ma\cos^2(x_1)}\end{array}\right]_{\arrowvert x_1=\pm \pi/4}\!\!\!\!\!.
\]
The parameter values are the same as in Example~\ref{ex:secondord}. We use weighting functions\index{weighting functions} of the form:
\[
w_1(x_1) = \frac{1-1/\left(1+\exp(-14(x_1-\pi/8))\right)}{1+\exp(-14(x_1+\pi/8))}\quad\mb{and}\quad
w_2(x_1) = 1-w_1(x_1).
\]
The corresponding fuzzy system model\index{fuzzy system model!inverted pendulum} is
\begin{equation}
\dot{\b x}=\left(\alpha_1\b A_1+\alpha_2\b A_2 \right)\b x+\left(\alpha_1\b B_1+\alpha_2\b B_2 \right)(u-\mu_c\mb{sign}(x_4)+mlx_2^2\sin(x_1)),
\label{eq:invpenfuzzy}
\end{equation}
where $\alpha_i=w_i$, $i=1,2$. Note that $w_1+w_2=1$ for all $t$. The friction coefficient $\mu_c=0.005$. We then proceed to construct a stabilizing controller.\index{fuzzy stabilizing controller} We first construct
\[
u_1=-\left(\alpha_1 \b K_1+\alpha_2\b K_2 \right)\b x
\]
such that the system
\begin{equation}
\dot{\b x}=\sum_{i=1}^2 \sum_{j=1}^2 \alpha_i \alpha_j \left( \b A_i-\b B_i\b K_j\right)\b x
\label{eq:exsys}
\end{equation}
is asymptotically stable in the large. To test our stabilization algorithm, we randomly chose the set of desired poles for $\left( \b A_1-\b B_1\b K_1\right)$ to be in the interval $[-4,-1]$. The set of desired poles is
\[
\{-1.0970, -2.1263, -2.5553, -3.9090\}.
\]
The desired poles for $\left( \b A_2-\b B_2\b K_2\right)$ were also chosen in random fashion to be in the interval $[-4,-1]$. In this case, we generated the set of poles of the form,
\[
\{-1.5794, -1.6857, -2.7908, -3.6895 \}.
\]
For this choice of the closed-loop poles of the local models, we obtain the following feedback gain matrices:
\[
\b K_1=\left[\begin{array}{cccc}
-294.8766 & -73.1208 & -13.4726 & -27.3362
\end{array}\right],
\]
and
\[
\b K_2=\left[\begin{array}{cccc}
-440.3915 & -118.5144 & -19.1611 & -35.5575
\end{array}\right].
\]
Let
\[
\b G_{12}=\b A_1-\b B_1\b K_2+\b A_2-\b B_2\b K_1,
\]
and
\[
\b P=\left[\begin{array}{cccc}
54.9580 & 15.6219 & 6.9389 & 12.1165\\
15.6219 & 4.5429 & 2.1011 & 3.5488\\
6.9389 & 2.1011 &1.3972 & 1.7978\\
12.1165 & 3.5488 & 1.7978 & 2.9375
\end{array}\right].
\]
Then, it is easy to check that sufficient conditions, given by~(\ref{eq:compforai}) and~(\ref{eq:compforg}), for asymptotic stability in the large\index{asymptotic stability in the large!sufficient conditions for} of system~(\ref{eq:exsys}) are satisfied. This completes the design of $u_1$.

We now construct $u_2$. We first use~(\ref{eq:boldmu}) to construct
\[
\mu=\left(\alpha_1\b B_1^{\top}\b P+\alpha_2 \b B_2^{\top} \b P\right)\b x.
\]
In this example, the number of inputs is $m=1$, and hence~(\ref{eq:u2}) reduces to
\[
u_2=-\eta_q\mb{sign}(\mu),
\]
where we can take $\eta_q=|h|$. We combine $u_1$ and $u_2$ to obtain the following stabilizing controller,
\begin{equation}
u = u_1+u_2= -\left(\alpha_1 \b K_1+\alpha_2\b K_2 \right)\b x
-\eta_q\mb{sign}(\mu).
\label{eq:ourcon}
\end{equation}
The above controller globally stabilizes the design model. In our simulations we connected the controller to the truth model given by~(\ref{eq:stick_eqiv}). Typical responses are shown in Figure~\ref{fig:stickx1} and Figure~\ref{fig:stickx3}. The controller locally stabilizes the truth model. We observed that when $|x_1(0)|>1.3$~rads, and $x_2(0)=x_3(0)=x_4(0)=0$, then the equilibrium state $\b x=\b 0$ of the closed-loop system consisting of the truth model driven by~(\ref{eq:ourcon}) becomes unstable.
\begin{figure}
\centering
\includegraphics[scale=0.5]{stickx1.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/stickx1.bmp}
%\hskip.75in\special{bmp:c:/papers/stickx1.bmp x=4.67in y=3.5in}
%\centerbmp{4.67in}{3.5in}{c:/papers/inp_free.bmp x=4.67in y=3.5in}
\caption{Plots of $x_1$ versus time for two different initial values of $x_1$: $x_1(0)=1.2$ and $x_1(0)=0.6$. In both cases $x_2(0)=x_3(0)=x_4(0)=0$.}
\label{fig:stickx1}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.5]{stickx3.eps}
%\vspace{3.5in}
%\centerbmp{4.67in}{3.5in}{c:/mybook/stickx3.bmp}
%\hskip.75in\special{bmp:c:/papers/stickx3.bmp x=4.67in y=3.5in}
%\centerbmp{4.67in}{3.5in}{c:/papers/inp_free.bmp x=4.67in y=3.5in}
\caption{Plots of $x_3$ versus time for two different initial values of $x_1$: $x_1(0)=1.2$ and $x_1(0)=0.6$. In both cases $x_2(0)=x_3(0)=x_4(0)=0$.}
\label{fig:stickx3}
\end{figure}
\end{example}
\markex

We summarize this section as follows. A common approach to the control system design is to use a design model to construct a controller. The design model is a simplified version of the truth model and usually neglects high frequency dynamics of the plant. Thus, the designer has to cope with an incomplete mathematical model\index{incomplete mathematical model}\index{mathematical model!incomplete} of the process to be controlled. To account for modeling uncertainties, we used a two-term controller. The first term of the controller stabilized the nominal plant, that is, the plant model that does not include modeling uncertainties. The role of the second term of the controller was to reject modeling uncertainties.\index{two-term controller} In both cases fuzzy state-feedback control strategies were used. In order to be able to apply the proposed controllers in real-life systems, we have to account for limited authority of actuators,\index{authority of actuators}\index{actuator authority} unmatched uncertainties, as well as inaccessibility of state variables.


\section{Stability of Discrete Fuzzy Models}

We analyze the model of the form
\begin{equation}
\b x[k+1]=\sum_{i=1}^{r}w_i(\b x[k])\b A_i\b x[k],
\label{eq:tsk}
\end{equation}
where
\[
w_i(\b x[k])\ge 0\quad\mb{and}\quad \sum_{i=1}^{r}w_i(\b x[k]) = 1.
\]
To proceed, we need the following notation. Given two $n\times n$ matrices $\b A$ and $\b B$. Then, $\b A < \b B$ means that
\[
\b x^{\top}\b A\b x < \b x^{\top}\b B\b x \quad\mb{for all}\quad \b x \in \mb{\Bb R}^n, \b x\ne \b 0,
\]
that is, the quadratic form $\b x^{\top}\left(\b A-\b B\right)\b x$ is negative definite.

We prove the following matrix inequality lemma\index{matrix inequality lemma} that is useful in the stability analysis of discrete fuzzy models.\index{discrete fuzzy models}
\begin{lemma}
Let $\b A, \b B, \b P \in \mb{\Bb R}^{n \times n}$. If $\b P=\b P^{\top}>0$ such that
\[
\b A^{\top}\b P\b A-\b P<0\quad\mb{and}\quad \b B^{\top}\b P\b B-\b P<0,
\]
then
\[
\b A^{\top}\b P\b B+\b B^{\top}\b P\b A-2\b P<0.
\]
\label{lemma:mil}
\end{lemma}
{\bf Proof}\quad We first represent $\b A^{\top}\b P\b B+\b B^{\top}\b P\b A-2\b P$ as
\begin{eqnarray*}
\b A^{\top}\b P\b B+\b B^{\top}\b P\b A-2\b P &=& -(\b A-\b B)^{\top}\b P(\b A-\b B)+\b A^{\top}\b P\b A+\b B^{\top}\b P\b B - 2\b P\\
&=& -(\b A-\b B)^{\top}\b P(\b A-\b B)+(\b A^{\top}\b P\b A-\b P)\\
&{}&\quad+(\b B^{\top}\b P\b B-\b P).
\end{eqnarray*}
The first term, $-(\b A-\b B)^{\top}\b P(\b A-\b B)$, is non-positive definite because by assumption $\b P=\b P^{\top}>0$, while the second and the third terms are negative definite by assumption. Hence,
\[
\b A^{\top}\b P\b B+\b B^{\top}\b P\b A-2\b P<0,
\]
and the lemma is proven.\\
\hspace*{5.5in}$\Box$

Using Lemma~\ref{lemma:mil}, we now prove a sufficient condition for global asymptotic stability\index{global asymptotic stability!sufficient condition for} of model~(\ref{eq:tsk}).
\begin{thm}
The equilibrium state, $\b x_e=\b 0$, of model~(\ref{eq:tsk}) is globally asymptotically stable if there exists a positive definite matrix $\b P=\b P^{\top}>0$ such that for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^{\top}\b P\b A_i-\b P < 0.
\label{eq:commondp}
\end{equation}
\end{thm}
{\bf Proof}\quad Suppose that there exists a symmetric positive definite matrix $\b P=\b P^{\top}>0$ such that for $i=1,2,\ldots,r$ inequalities given by~(\ref{eq:commondp}) are satisfied. Consider then the Lyapunov function candidate
\begin{equation}
V(\b x[k])=\b x[k]^{\top}\b P\b x[k].
\label{eq:lyapunovcand}
\end{equation}
To prove the theorem, it is enough to show that
\[
\Delta V(\b x[k]) < 0.
\]
We have
\begin{eqnarray}
\Delta V(\b x[k]) &=& V(\b x[k+1])-V(\b x[k])\nonumber\\
&=& \b x[k+1]^{\top}\b P\b x[k+1]-\b x[k]^{\top}\b P\b x[k]\nonumber\\
&=& \left( \sum_{i=1}^r w_i\b x^{\top}\b A_i^{\top}\right)\b P\left( \sum_{i=1}^r w_i\b A_i\b x\right)-\b x^{\top}\b P\b x\nonumber\\
&=& \b x^{\top}\left( \left( \sum_{i=1}^r w_i\b A_i^{\top}\right)\b P\left( \sum_{i=1}^r w_i\b A_i\right)-\b P\right)\b x.
\label{eq:deltav}
\end{eqnarray}
To proceed, we represent~(\ref{eq:deltav}) in an equivalent form as
\begin{equation}
\Delta V(\b x)=\b x^{\top}\left(\left( \sum_{i=1}^r w_i\b A_i^{\top}\right)\b P\left( \sum_{j=1}^r w_j\b A_j\right)-\b P \right)\b x.
\label{eq:deltaveq}
\end{equation}
By assumption
\[
\sum_{i=1}^r w_i = 1,
\]
and hence
\begin{equation}
\sum_{i=1}^r w_i\sum_{j=1}^r w_j =\sum_{i=1}^r \sum_{j=1}^r w_i w_j =  1.
\label{eq:wiwj}
\end{equation}
Substituting~(\ref{eq:wiwj}) into~(\ref{eq:deltaveq}) yields
\begin{eqnarray}
\Delta V(\b x)&=&\b x^{\top}\left(\left( \sum_{i=1}^r w_i\b A_i^{\top}\right)\b P\left( \sum_{j=1}^r w_j\b A_j\right)-\sum_{i=1}^r \sum_{j=1}^r w_i w_j \b P \right)\b x\nonumber\\
&=& \b x^{\top} \left(\sum_{i=1}^r \sum_{j=1}^r w_i w_j \left(\b A_i^{\top}\b P\b A_j-\b P \right) \right) \b x.
\label{eq:wiwjeq}
\end{eqnarray}
We rearrange~(\ref{eq:wiwjeq}) to get
\begin{eqnarray}
\Delta V(\b x[k]) &=& \sum_{i=1}^r w_i^2\b x^{\top}\left( \b A_i^{\top}\b P\b A_i-\b P\right)\b x + \sum_{i=1}^r \sum_{j=1\atop j\ne i}^r w_i w_j \b x^{\top}\left( \b A_i^{\top}\b P\b A_j - \b P\right)\b x\nonumber\\
&=& \sum_{i=1}^r w_i^2\b x^{\top}\left( \b A_i^{\top}\b P\b A_i-\b P\right)\b x \nonumber\\
&{}& \quad +\sum_{i=1}^r\sum_{j>i}^r w_i w_j \b x^{\top} \left( \b A_i^{\top}\b P\b A_j + \b A_j^{\top} \b P\b A_i- 2\b P \right) \b x.
\label{deltavrear}
\end{eqnarray}
The first term in~(\ref{deltavrear}) is negative definite because of the assumption and the fact that at least one of the weights, $w_i$, is positive because $w_i\ge 0$ and $\sum_{i=1}^r w_i =1$. The second term in~(\ref{deltavrear}) is nonpositive definite by virtue of Lemma~\ref{lemma:mil}. Hence, $V=\b x^{\top}\b P\b x$ is a Lyapunov function for the fuzzy model~(\ref{eq:tsk}), and by the Lyapunov theorem the equilibrium state $\b x_e=\b 0$ of the model is globally asymptotically stable.\\
\hspace*{5.5in}$\Box$

The above theorem gives no method for finding a common positive definite matrix $\b P$\index{finding a common $\b P$} that satisfies $r$ inequalities~(\ref{eq:commondp}). All of the matrices $\b A_i$, $i=1,2,\dots,r$, are asymptotically stable if there exists a common positive definite $\b P$ that satisfies~(\ref{eq:commondp}). However, the asymptotic stability of all the matrices $\b A_i$ is only necessary but not sufficient for the existence of a common symmetric positive definite $\b P$ that satisfies~(\ref{eq:commondp}). The following theorem provides a necessary, but not sufficient, condition for the existence of positive definite $\b P$ satisfying~(\ref{eq:commondp}).\index{existence of a common $\b P$}
\begin{thm}
Given $r$ square $n\times n$ matrices $\b A_i$ that are asymptotically stable and nonsingular. If there exists a symmetric positive definite matrix $\b P=\b P^{\top}>0$ such that for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^{\top}\b P\b A_i-\b P<0,
\label{eq:aipai}
\end{equation}
then for $i,j=1,2,\ldots,r$, the matrices $\b A_i\b A_j$ are asymptotically stable.
\label{thm:nocomp}
\end{thm}
{\bf Proof}\quad By assumption, there exists a symmetric positive definite matrix $\b P$ such  that for $j=1,2,\ldots,r$,
\begin{equation}
\b A_j^{\top}\b P\b A_j-\b P < 0.
\label{eq:startp}
\end{equation}
Premultiplying the above by $\left( \b A_j^{\top}\right)^{-1}$ and postmultiplying by $\b A_j^{-1}$ yields
\begin{equation}
\b P - \left( \b A_j^{\top}\right)^{-1}\b P\b A_j^{-1} <0.
\label{eq:ajinv}
\end{equation}
Hence,
\begin{equation}
\b P<\left( \b A_j^{\top}\right)^{-1}\b P\b A_j^{-1}.
\label{eq:pless}
\end{equation}
On the other hand, using~(\ref{eq:aipai}) we get
\begin{equation}
\b A_i^{\top}\b P\b A_i < \b P.
\label{eq:fromsp}
\end{equation}
Combining~(\ref{eq:pless}) and~(\ref{eq:fromsp}), we obtain
\begin{equation}
\b A_i^{\top}\b P\b A_i < \left( \b A_j^{\top}\right)^{-1}\b P\b A_j^{-1}.
\label{eq:combops}
\end{equation}
Premultiplying both sides of~(\ref{eq:combops}) by $\b A_j^{\top}$ and postmultiplying by $\b A_j$, we get, for $i,j=1,2,\ldots,r$,
\begin{equation}
\left( \b A_i\b A_j\right)^{\top}\b P\left( \b A_i\b A_j\right)-\b P < 0.
\label{eq:aiajp}
\end{equation}
Therefore, for $i,j=1,2,\ldots,r$, the matrices $\b A_i\b A_j$ are asymptotically stable, which completes the proof.\\
\hspace*{5.5in}$\Box$

The above theorem can be stated in an equivalent way as follows. Assume that for $i=1,2,\ldots,r$, the matrices $\b A_i$ are asymptotically stable and nonsingular. If for some $i,j=1,2,\ldots,r$, the matrix $\b A_i\b A_j$ is unstable, then there does not exist a common positive definite $\b P$ such that
\[
\b A_i^{\top}\b P\b A_i-\b P < 0\quad \mb{for}\quad i=1,2,\ldots,r.
\]
\begin{example}\rm
Let
\[
\b A_1=\left[\begin{array}{cc}
1 & -0.5\\
1 & 0
\end{array}\right]\quad\mb{and}\quad \b A_2=\left[\begin{array}{cc}
-1 & -0.5\\
1 & 0
\end{array}\right].
\]
Both matrices, $\b A_1$ and $\b A_2$, are asymptotically stable. Indeed, the eigenvalues  of $\b A_1$ are located at $\{0.5+j0.5,0.5-j0.5 \}$, while the eigenvalues of $\b A_2$ are located at $\{-0.5+j0.5,-0.5-j0.5 \}$. However, the matrix $\b A_1\b A_2$ has its eigenvalues located at $\{-1.866,-0.134 \}$, and hence is unstable. Thus, it follows from Theorem~\ref{thm:nocomp}, that there is no positive definite $\b P$ such that
\begin{equation}
\b A_i^{\top}\b P\b A_i-\b P<0\quad\mb{for}\quad i=1,2.
\label{eq:twoai}
\end{equation}
\end{example}
\markex
\section{Fuzzy Observer}\label{sect:fuzzy_observ}
%As we mentioned in Subsection~\ref{subsec:fuzzymodeling}, one of the %essential elements of the control problem is a model of a dynamical system %to be controlled. If a mathematical model of the plant is not available or %is incomplete and there are experts who can provide a linguistic %description, in terms of IF-THEN rules, of the plant, then combining the %available mathematical description of the plant with its linguistic %description results in a fuzzy system model. An example of a fuzzy system %model is the so called Takagi-Sugeno~(T-S), also known as the Takagi-%Sugeno-Kang~(TSK), fuzzy model.

In this section, we are concerned with the problem of designing an observer using a TSK model of the plant.\index{fuzzy observer!design using a TSK model} We first discuss the issue of constructing a TSK model using input-output data. To construct a TSK model, we need local description of the plant in terms of linear models,
\[
\left\{\begin{array}{lcl}
\dot{\b x}(t)&=&\b A_i\b x(t)+\b B_i\b u(t)\\
\b y(t)&=&\b C_i\b x(t),
\end{array}\right.
\]
where $i=1,2,\ldots,r$, state vector $\b x(t) \in \mb{\Bb R}^n$, the control input $\b u(t) \in \mb{\Bb R}^m$, the output $\b y(t) \in \mb{\Bb R}^p$, and the matrices $\b A_i$, $\b B_i$, and $\b C_i$ are of appropriate dimensions.
The above information is then fused with the available IF-THEN rules, where the $i$-th rule can have the form:
\[
\mb{Rule i}:\mb{ IF } z_1(t)\mb{ is } F_1^i\mb{ AND } \cdots\mb{ AND } z_q(t)\mb{ is }F_q^i,
\]
\[
\mb{ THEN }\left\{\begin{array}{lcl}
\dot{\b x}(t)&=&\b A_i\b x(t)+\b B_i\b u(t)\\
\b y&=&\b C_i\b x(t),
\end{array}\right.
\]
where $F_j^i$, $j=1,2,\ldots,q$, is the $j$-th fuzzy set of the $i$-th rule, and $z_1(t),\ldots,z_q(t)$ are measurable system variables. Let $\mu_j^i(z_j)$ be the membership function of the fuzzy set $F_j^i$, and let
\[
w^i = w^i(\b z)=\prod_{j=1}^n\mu_j^i(z_j),
\]
where $r$ is the number of fuzzy rules. The resulting fuzzy system model is the weighted average of the local models and has the form of~(\ref{eq:fuzzy_modeltsk}), that is,
\begin{eqnarray*}
\dot{\b x} &=& \frac{\sum_{i=1}^r w^i\left( \b A_i\b x+\b B_i\b u\right)}{\sum_{i=1}^r w^i}\\
&=&\sum_{i=1}^r \alpha_i\left( \b A_i\b x+\b B_i\b u\right)\\
&=&\left(\sum_{i=1}^r \alpha_i \b A_i\right)\b x + \left(\sum_{i=1}^r \alpha_i\b B_i\right)\b u \\
&=& \b A(\b \alpha)\b x+\b B(\b \alpha)\b u,
%\label{eq:fuzzy_model}
\end{eqnarray*}
where for $i=1,2,\ldots,r$,
\[
\alpha_i=\frac{w^i}{\sum_{i=1}^r w^i}.
\]
Similarly,
\begin{eqnarray}
\b y &=& \frac{\sum_{i=1}^r w^i  \b C_i\b x}{\sum_{i=1}^r w^i}\nonumber\\
&=&\left(\sum_{i=1}^r \alpha_i \b C_i\right)\b x \nonumber\\
&=& \b C(\b \alpha)\b x.
\label{eq:outofpla}
\end{eqnarray}
The coefficients $\alpha_i$s satisfy~(\ref{eq:alphastsk}), that is,
\[
%\label{eq:alphas}
\alpha_i\ge 0,\quad \sum_{i=1}^r \alpha_i=1\quad \mb{and}\quad \b \alpha =\left[\begin{array}{cccc}
\alpha_1&\alpha_2&\cdots&\alpha_r
\end{array}\right]^{\top}
\in [0,1]^r.
\]
A fuzzy observer\index{fuzzy observer} for the system modeled by~(\ref{eq:fuzzy_modeltsk}) and~(\ref{eq:outofpla}) can have the form
\begin{equation}
\dot{\tilde{\b x}}=\b A(\b{\alpha})\tilde{\b x}+\b B(\b{\alpha})\b u+\b L(\b{\alpha})\left( \b y-\tilde{\b y}\right),
\label{eq:staestpoly}
\end{equation}
where $\tilde{\b x}$ is the estimate of the plant state $\b x$ and
\[
\b L(\b{\alpha})=\sum_{i=1}^r \alpha_i\b L_i.
\]
The observer~(\ref{eq:staestpoly}) can be represented equivalently as
\begin{equation}
\fbox{$ \displaystyle \dot{\tilde{\b x}}=\sum_{i=1}^{r}\alpha_i \b A_i \tilde{\b x}+\sum_{i=1}^{r}\alpha_i \b B_i \b u + \sum_{i=1}^{r}\alpha_i \b L_i \left( \b y-\tilde{\b y}\right) $}
\label{eq:eqrepofste}
\end{equation}
We note that the observer~(\ref{eq:eqrepofste}) can be viewed as a result of implementing the following $r$ fuzzy rules:
\[
\mb{Rule i}:\mb{ IF } z_1(t)\mb{ is } F_1^i\mb{ AND } \cdots\mb{ AND } z_q(t)\mb{ is }F_q^i,
\]
\[
\mb{ THEN }\left\{\begin{array}{lcl}
\dot{\tilde{\b x}}&=&\b A_i\tilde{\b x}+\b B_i\b u+\b L_i\left( \b y-\tilde{\b y}\right)\\
\tilde{\b y}&=&\b C_i\tilde{\b x},
\end{array}\right.
\]
where, as before, $z_1(t),\ldots,z_q(t)$ are measurable system variables. We use the state estimate in the controller implementation to get
\begin{equation}
\b u=-\sum_{j=1}^r \alpha_j\b K_j\tilde{\b x}+\b v.
\label{eq:statesincont}
\end{equation}
Substituting the above into the plant model yields
\begin{equation}
\dot{\b x}=\sum_{i=1}^r \alpha_i \b A_i \b x -\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \b B_i\b K_j \tilde{\b x} + \sum_{i=1}^r \alpha_i \b B_i \b v.
\label{eq:plancontr}
\end{equation}
Substituting~(\ref{eq:outofpla}) and~(\ref{eq:statesincont}) into the observer equation~(\ref{eq:eqrepofste}), we obtain
\begin{eqnarray}
\dot{\tilde{\b x}}&=&\sum_{i=1}^{r}\alpha_i \b A_i \tilde{\b x}-\sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \b B_i \b K_j\tilde{\b x} + \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \b L_i \b C_j\left( \b x-\tilde{\b x}\right)+\sum_{i=1}^r \alpha_i \b B_i \b v\nonumber \\
&=& \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \left( \b A_i-\b B_i \b K_j\right)\tilde{\b x}+ \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \b L_i \b C_j\left( \b x-\tilde{\b x}\right)+\sum_{i=1}^r \alpha_i \b B_i \b v.
\label{eq:estiwfecoandc}
\end{eqnarray}
Equations~(\ref{eq:plancontr}) and~(\ref{eq:estiwfecoandc}) constitute the closed-loop system driven by the combined fuzzy controller-observer compensator.\index{combined fuzzy controller-observer compensator} We represent the above two equations modeling the closed-loop system in matrix form as
\begin{eqnarray}
\left[\begin{array}{c}
\dot{\b x}\\
\dot{\tilde{\b x}}
\end{array}\right] &=& \left[\begin{array}{cc}
\sum_{i=1}^r \alpha_i \b A_i &  -\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \b B_i\b K_j\\
\sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \b L_i \b C_j & \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \left( \b A_i-\b B_i \b K_j- \b L_i \b C_j \right)
\end{array}\right]\left[\begin{array}{c}
\b x\\
\tilde{\b x}
\end{array}\right]\nonumber\\
&{}& \quad+\left[\begin{array}{c}
\sum_{i=1}^r \alpha_i \b B_i\\
\sum_{i=1}^r \alpha_i \b B_i
\end{array}\right]\b v \label{eq:staeclo}\\
\b y &=& \left[\begin{array}{cc}
\sum_{i=1}^r \alpha_i \b C_i & \b O
\end{array}\right]\left[\begin{array}{c}
{\b x}\\
{\tilde{\b x}}
\end{array}\right].
\label{eq:mafooffuzcls}
\end{eqnarray}

\subsection{The Comparison Method for Linear Systems}

We present the comparison method for linear systems.\index{comparison method!for linear systems} that is used by us to investigate stability properties of the closed-loop system, modeled by~(\ref{eq:staeclo}) and~(\ref{eq:mafooffuzcls}), consisting of a fuzzy model of a given plant and a fuzzy controller-estimator compensator.\index{fuzzy controller-estimator compensator}

Let $\b A$ be a constant $n\times n$ matrix and $e^{\footnotesize{\b A} t}$ denote the matrix exponential. We give a necessary and sufficient condition for the matrix exponential to have all its elements non-negative\index{non-negative matrix exponential}\index{matrix exponential!non-negative} for $t\ge 0$. This result appears in~\cite[page~171]{bellman60}.
\begin{lemma}\label{lem:nonofmatexp}
A necessary and sufficient condition that all elements of $e^{\b A t}$ be non-negative for $t\ge 0$ is that
\begin{equation}
a_{ij}\ge 0 \quad i\ne j.
\label{eq:nonnegnasc}
\end{equation}
\end{lemma}
{\bf Proof}\quad We follow the arguments of Bellman~\cite[page~172]{bellman60}, see also~\cite{beckenbach65}. We first prove the necessary condition. Because
\[
e^{\b At}=\b I_n+\b At +\frac{1}{2}\b A^2 t^2+\cdots
\]
it is clear that~(\ref{eq:nonnegnasc}) is necessary for the result to hold for small $t$, which establishes the necessity condition

To prove the sufficiency part, let $c_1$ be a scalar so that all the elements of $\b A+c_1\b I_n$ are non-negative. Then, obviously, all the elements of $e^{\left(\b A+c_1\b I_n\right) t}$ are non-negative. Also, the elements of $e^{-c_1\b I_n t}$ are non-negative because exponentials are always non-negative. The matrices $\b A+c_1\b I_n$ and $-c_1\b I_n$ commute. Hence,
\begin{eqnarray*}
e^{\b A t} &=& e^{\left(\b A+c_1\b I_n \right)t-c_1\b I_n t}\\
&=& e^{\left(\b A+c_1\b I_n \right)t}e^{-c_1\b I_n t},
\end{eqnarray*}
which establishes the desired non-negativity condition and the sufficiency condition.\\
\hspace*{5.5in} $\Box$

Using the above lemma, we prove the following lemma due to Bellman~\cite{bellman62}.\index{Bellman's lemma} We use the following notation: $\b x\le \b y$ implies component-by-component majorization,\index{majorization!component-by-component}\index{component-by-component!majorization} that is, $x_i\le y_i$ for $i=1,2,\ldots,n$, where $x_i$ and $y_i$ are the $i$-th components of $\b x$ and $\b y$, respectively.
\begin{lemma}
\label{lemma:veccomp}
If $a_{ij}\ge 0$, $i\ne j$, then for $t\ge 0$,
\begin{equation}
\frac{d\b x}{dt}\le \b A\b x, \quad \b x(0)=\b c,
\label{eq:derofxleax}
\end{equation}
implies $\b x\le \b y$, where
\begin{equation}
\frac{d\b y}{dt}= \b A\b y, \quad \b y(0)=\b c.
\label{eq:licomeqfl}
\end{equation}
\end{lemma}
{\bf Proof}\quad We can represent~(\ref{eq:derofxleax}) as
\begin{equation}
\frac{d \b x(t)}{dt}=\b A\b x(t)-\b f(t),\quad \b x(0)=\b c,
\label{eq:alrepofdifin}
\end{equation}
where $\b f(t)$ is a vector-valued function whose components are non-negative for all $t\ge 0$. The solution of~(\ref{eq:alrepofdifin}) is represented as
\begin{eqnarray}
\b x(t)&=&e^{\b A t}\b c - \int_{0}^t e^{\b A(t-s)}\b f(s)ds\nonumber \\
&=& \b y(t) - \int_{0}^t e^{\b A(t-s)}\b f(s)ds.
\label{eq:alsoofperde}
\end{eqnarray}
In the above, $s$ is the integration variable\index{integration variable} and $t\ge 0$. Hence, $t\ge s\ge 0$. Using Lemma~\ref{lem:nonofmatexp}, we conclude that the components of the integrand of the second term in~(\ref{eq:alsoofperde}) are all non-negative for $t\ge s\ge 0$. Therefore,
\[
\int_{0}^t e^{\b A(t-s)}\b f(s)ds \ge \b 0,\quad\mb{for}\quad t\ge 0,
\]
which implies
\[
\b x\le \b y.
\]
The proof is complete.\\
\hspace*{5.5in} $\Box$

Equation~(\ref{eq:licomeqfl}) is referred to as the {\em equation of comparison\/}\index{equation of comparison} for~(\ref{eq:derofxleax}).

\subsection{Stability Analysis of the Closed-Loop System}

We now perform a stability analysis of the closed-loop system given by~(\ref{eq:staeclo}) and~(\ref{eq:mafooffuzcls}). We first apply a state variable transformation to bring the system into a form convenient for further analysis. The transformation has the form,
\begin{equation}
\left[\begin{array}{c}
\b x\\
\tilde{\b x}-\b x
\end{array}\right]=
\left[\begin{array}{cc}
\b I_n & \b O\\
-\b I_n & \b I_n
\end{array}\right]\left[\begin{array}{c}
\b x\\
\tilde{\b x}
\end{array}\right].
\label{eq:bigtranstocls}
\end{equation}
The closed-loop system model in the new coordinates is
\begin{eqnarray}
\left[\begin{array}{c}
\dot{\b x}\\
\dot{\tilde{\b x}}-\dot{\b x}
\end{array}\right] &=& \left[\begin{array}{cc}
 \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \left(\b A_i-\b B_i\b K_j\right)&  -\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \b B_i\b K_j\\
\b O & \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \left( \b A_i- \b L_i \b C_j \right)
\end{array}\right]\left[\begin{array}{c}
\b x\\
\tilde{\b x}-\b x
\end{array}\right]\nonumber\\
&{}& \quad+\left[\begin{array}{c}
\sum_{i=1}^r \alpha_i \b B_i\\
\b O
\end{array}\right]\b v \label{eq:innecofipart}\\
\b y &=& \left[\begin{array}{cc}
\sum_{i=1}^r \alpha_i \b C_i & \b O
\end{array}\right]\left[\begin{array}{c}
{\b x}\\
{\tilde{\b x}}-\b x
\end{array}\right].
\label{eq:fuzclsinncoo}
\end{eqnarray}
Let $\b e=\tilde{\b x}-\b x$. We now present a sufficient condition for the unforced closed-loop system to be globally uniformly asymptotically stable, that is, we will give a condition for uniform asymptotic stability in the large\index{uniform asymptotic stability!in the large} of the system
\begin{equation}
\left[\begin{array}{c}
\dot{\b x}\\
\dot{\b e}
\end{array}\right] = \left[\begin{array}{cc}
 \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \left(\b A_i-\b B_i\b K_j\right)&  -\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \b B_i\b K_j\\
\b O & \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \left( \b A_i- \b L_i \b C_j \right)
\end{array}\right]\left[\begin{array}{c}
\b x\\
\b e
\end{array}\right].
\label{eq:unfcllosy}
\end{equation}
This condition was proposed by Ma, Sun, and He~\cite{ma98}.
\begin{thm}
\label{thm:staboffuzobs}
If there exist two scalar functions $V(\b x):\mb{\Bb R}^n \to \mb{\Bb R}$ and $\tilde{V}(\b e):\mb{\Bb R}^n \to \mb{\Bb R}$ and positive real numbers $\gamma_i$, $\tilde{\gamma}_i$, $i=1,\ldots,4$ such that
\begin{equation}
\gamma_1\|\b x\|^2 \le V(\b x) \le \gamma_2\|\b x\|^2, \quad \tilde{\gamma}_1\|\b e\|^2 \le \tilde{V}(\b e) \le \tilde{\gamma}_2\|\b e\|^2,
\label{eq:cononvanvt}
\end{equation}
\begin{equation}
\left.\begin{array}{l}
\frac{\partial V(\b x)}{\partial \b x}\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \left(\b A_i-\b B_i \b K_j \right)\b x \le -\gamma_3 \|\b x\|^2\\ \frac{\partial \tilde{V}(\b e)}{\partial \b e}\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \left(\b A_i-\b L_i \b C_j \right)\b e \le -\tilde{\gamma}_3 \|\b e\|^2,
\end{array}\right\}
\label{eq:conontimder}
\end{equation}
and
\begin{equation}
\left\Arrowvert \frac{\partial V(\b x)}{\partial \b x}\right\Arrowvert \le \gamma_4 \|\b x\|, \quad \left\Arrowvert \frac{\partial \tilde{V}(\b e)}{\partial \b e}\right\Arrowvert \le \tilde{\gamma}_4 \|\b e\|,
\label{cononthegraofvtv}
\end{equation}
then the system~(\ref{eq:unfcllosy}) is globally uniformly asymptotically stable.
\end{thm}
{\bf Proof}\quad We evaluate the time derivative of $V$ on the trajectories of the system~(\ref{eq:unfcllosy}),
\begin{eqnarray}
\dot{V}(\b x) &=& \frac{\partial V(\b x)}{\partial \b x}\dot{\b x}\nonumber\\
&=&\frac{\partial V(\b x)}{\partial \b x}\sum_{i=1}^r\sum_{j=1}^r \alpha_i \alpha_j\left(\b A_i-\b B_i\b K_j\right) \b x - \frac{\partial V(\b x)}{\partial \b x}\sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j \b B_i\b K_j {\b e}\nonumber\\
&\le & -\gamma_3\|\b x\|^2 + \left\Arrowvert \frac{\partial V(\b x)}{\partial \b x}\right\Arrowvert \sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \| {\b e}\|\nonumber\\
&\le & -\frac{\gamma_3}{2}\|\b x\|^2 -\frac{\gamma_3}{2}\|\b x\|^2 + \gamma_4 \sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \| {\b e}\|\|\b x\|.
\label{eq:vdotlessfuz}
\end{eqnarray}
To proceed, we observe that
\begin{equation}
\frac{\gamma_3}{2}\|\b x\|^2 - \gamma_4 \sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \| {\b e}\|\|\b x\|+\frac{\gamma_4^2}{2 \gamma_3} \left(\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \right)^2 \|{\b e}\|^2\ge 0.
\label{eq:adandsubtoggeo}
\end{equation}
Indeed, we can represent the left-hand side of the above as
\begin{equation}
\left[\begin{array}{cc}
\|\b x\| & \|\b e\|
\end{array}\right]\left[\begin{array}{cc}
\frac{\gamma_3}{2} & -\frac{\gamma_4}{2}\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \\
-\frac{\gamma_4}{2}\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert & \frac{\gamma_4^2}{2 \gamma_3}\left(\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert\right)^2
\end{array}\right]\left[\begin{array}{c}
\|\b x\|\\
\|\b e\|
\end{array}\right].
\label{eq:inforofsqma}
\end{equation}
It is easy to check that the above quadratic form is positive semi-definite---all three principle minors are non-negative.\index{positive semi-definite!principle minors non-negative} We use this fact and~(\ref{eq:cononvanvt}) to further evaluate~(\ref{eq:vdotlessfuz}) as
\begin{eqnarray}
\dot{V}(\b x) &\le & -\frac{\gamma_3}{2}\|\b x\|^2 + \frac{\gamma_4^2}{2 \gamma_3}\left(\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \right)^2 \|\b e\|^2\nonumber\\
&\le & -\frac{\gamma_3}{2 \gamma_2} V(\b x) + \frac{\gamma_4^2}{2 \gamma_3\tilde{\gamma}_1}\left(\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \right)^2 \tilde{V}(\b e).
\label{eq:evaltdovoncecc}
\end{eqnarray}
Let $a=\left(\sum_{i=1}^r \sum_{j=1}^r \left\Arrowvert \b B_i\b K_j\right\Arrowvert \right)^2$. Then, (\ref{eq:evaltdovoncecc}) can be written as
\begin{equation}
\dot{V}(\b x) \le  -\frac{\gamma_3}{2 \gamma_2} V(\b x)+\frac{a\gamma_4^2}{2 \gamma_3\tilde{\gamma}_1}\tilde{V}(\b e).
\label{eq:fifoofvdo}
\end{equation}
Evaluating the time derivative of $\tilde{V}(\b e)$ on the trajectories of~(\ref{eq:unfcllosy}) gives
\begin{eqnarray}
\dot{\tilde{V}}(\b e) &=& \frac{\partial \tilde{V}(\b e)}{\partial \b e}\dot{\b e}\nonumber\\
&\le & \frac{\partial \tilde{V}(\b e)}{\partial \b e} \sum_{i=1}^{r}\sum_{j=1}^r \alpha_i \alpha_j \left( \b A_i- \b L_i \b C_j \right)\b e\nonumber\\
&\le & -\tilde{\gamma}_3\|\b e\|^2\nonumber\\
&\le & -\frac{\tilde{\gamma}_3}{\tilde{\gamma}_2}\tilde{V}(\b e).
\label{eq:tderoftilv}
\end{eqnarray}
Combining~(\ref{eq:fifoofvdo}) and~(\ref{eq:tderoftilv}) into a single matrix differential inequality of the form yields
\begin{eqnarray}
\left[\begin{array}{c}
\dot{V}(\b x)\\
\dot{\tilde{V}}(\b e)
\end{array}\right]&\le & \left[\begin{array}{cc}
-\frac{\gamma_3}{2 \gamma_2} & \frac{a\gamma_4^2}{2 \gamma_3\tilde{\gamma}_1}\\
0 & -\frac{\tilde{\gamma}_3}{\tilde{\gamma}_2}
\end{array}\right]\left[\begin{array}{c}
{V}(\b x)\\
{\tilde{V}}(\b e)
\end{array}\right]\nonumber\\
&=& \b A \left[\begin{array}{c}
{V}(\b x)\\
{\tilde{V}}(\b e)
\end{array}\right].
\label{eq:comofvandtilv}
\end{eqnarray}
We then refer to Lemma~\ref{lemma:veccomp} to conclude that the system~(\ref{eq:unfcllosy}) is globally uniformly asymptotically stable. Indeed, because the equation of comparison\index{equation of comparison} for~(\ref{eq:comofvandtilv}) is globally uniformly asymptotically stable, we have to have
\[
V(\b x)\to 0\quad \mb{and}\quad \tilde{V}(\b e) \to 0\quad \mb{as}\quad t\to \infty.
\]
Because $V$ and $\tilde{V}$ are both positive definite decrescent\index{decrescent function} and radially unbounded\index{radially unbounded} functions, the above can hold provided $\b x\to \b 0$ and $\b e\to \b 0$ uniformly with respect to $t$ and irrespective of the initial conditions $\b x(0)$ and $\b e(0)$. Therefore, the closed-loop system is globally uniformly asymptotically stable.\\
\hspace*{5.5in} $\Box$



\section{Adaptive Fuzzy Control}
\label{sec:fuzzy_ada}
In this Section, we analyze adaptive fuzzy robust tracking controllers\index{adaptive fuzzy robust!tracking controllers}\index{tracking controllers!adaptive fuzzy robust} for a class of uncertain dynamical systems. The controllers' construction and their analysis involves sliding modes.


\subsection{Plant Model and Control Objective}
We consider a class of plants modeled by the
 differential equation
\begin{equation}
x^{(n)}=f\left(\b x\right)+g\left(\b x\right)u+\eta(t,\b x),
\label{eq:nthodemod}
\end{equation}
where $\b x=\left[\begin{array}{cccc}
x & \dot{x} & \cdots & x^{(n-1)}
\end{array}\right]^{\top}
$, and the functions $f=f\left(\b x\right)$ and $g=g\left
(\b x\right)$ are unknown to us. The function $\eta=\eta(t,\b x)$ models the plant's disturbances. We assume that
\begin{equation}
|\eta(t,\b x)|\leq d,
\label{eq:boundon eta}
\end{equation}
where $d>0$ is known to us. We further assume that the function $g(\b x)$
has a positive lower bound, that is, there exists a positive constant
$\underline{g}$ such that $g(\b{x})\geq \underline{g}>0$. Let
\[
\b x_d=\b x_d(t)=\left[\begin{array}{cccc}
x_d(t) & \dot{x}_d(t) & \cdots & x^{(n-1)}_d(t)
\end{array}\right]^{\top}
\]
denote the desired state trajectory and let
\begin{eqnarray*}
\b e&=&\b x-\b x_d\\
&=&\left[\begin{array}{cccc}
x-x_d & \dot{x}-\dot{x}_d & \cdots & x^{(n-1)}-x^{(n-1)}_d
\end{array}\right]^{\top}\\
&=&\left[\begin{array}{cccc}
e & \dot{e} & \cdots & e^{(n-1)}
\end{array}\right]^{\top}.
\end{eqnarray*}
We wish to construct a controller $u$ such that
\[
\lim_{t \to \infty} \b e(t) = \b 0.
\]
We analyze two different fuzzy adaptive tracking\index{fuzzy adaptive tracking} controllers
and show that the plant~(\ref{eq:nthodemod}) driven by these
controllers is stable and the adaptation parameters are bounded.

In the next subsection, we present background results used
in the adaptive fuzzy controllers' construction.

\subsection{Background Results}
\subsubsection{Fuzzy Logic System}
Recall, from Section~\ref{sec:sam}, that a fuzzy
logic controller with $q$ inputs, $v_1, v_2,\ldots,v_q$, and the
center average defuzzifier can be represented as
\begin{equation}
u=\frac{\sum_{l=1}^M\prod_{j=1}^q\mu_{F_j^l}(v_j)\theta_l}
{\sum_{l=1}^M\prod_{j=1}^q\mu_{F_j^l}(v_j)}, \label{eq:fuz_lo_co}
\end{equation}
where $M$ is the number of fuzzy rules\index{fuzzy rules} used to construct the
controller, $F_j^l$ is the $j$-th fuzzy set corresponding to the
$l$-th fuzzy rule, and $c_l$ can be taken as a centroid of the
$l$-th fuzzy set corresponding to the controller's output, $u$. To
proceed, we represent~(\ref{eq:fuz_lo_co}) as
\begin{equation}
u=\sum_{l=1}^M\left(\frac{\prod_{j=1}^q\mu_{F_j^l}(v_j)}
{\sum_{l=1}^M\prod_{j=1}^q\mu_{F_j^l}(v_j)} \right) \theta_l.
\label{eq:alt_rp_flc}
\end{equation}
Let
\[
\b{\theta}=\left[\begin{array}{cccc} \theta_1 & \theta_2 & \cdots
& \theta_M
\end{array}\right]^{\top}
\]
and
\[
\b{\xi}=\left[\begin{array}{cccc}
\xi_1 & \xi_2 & \cdots & \xi_M
\end{array}\right]^{\top}
=\left[\begin{array}{ccc}
\frac{\prod_{j=1}^q\mu_{F_j^1}(v_j)}{\sum_{l=1}^M\prod_{j=1}^q
\mu_{F_j^l}(v_j)} & \cdots & \frac{\prod_{j=1}^q\mu_{F_j^M}(v_j)}
{\sum_{l=1}^M\prod_{j=1}^q\mu_{F_j^l}(v_j)}
\end{array}\right]^{\top}.
\]
Then, we can represent~(\ref{eq:alt_rp_flc}) as
\begin{equation}
u=\b{\theta}^{\top}\b{\xi},
\label{eq:flc_as_xitheat}
\end{equation}
where the vector $\b{\xi}$ is referred to as the {\em regressor} vector\index{regressor} in the control literature.

\begin{example}\label{ex:adaptive example}\rm
Consider an uncertain dynamical system model,
\[
\left[\begin{array}{c}
\dot{x}_1\\
\dot{x}_2
\end{array}\right]=\left[\begin{array}{cc}
0 & 1\\
0 & -1
\end{array}\right]\left[\begin{array}{c}
x_1\\
x_2
\end{array}\right]+\left[\begin{array}{c}
0\\
1
\end{array}\right](u + \zeta),\quad |\zeta|\le 5.
\]
Our objective is to design a controller that contains an {\bf  adaptive fuzzy term}\index{adaptive fuzzy term} so that the state of the above system will track a reference signal generated by the reference model,\index{reference model}
\begin{eqnarray*}
\dot{\b z}&=&\left[\begin{array}{cc}
0 & 1\\
-1 & -1.4
\end{array}\right]{\b z}+\left[\begin{array}{c}
0\\
1
\end{array}\right]r\\
&=&{\b A}_d{\b z}+{\b b}_dr,
\end{eqnarray*}
where $r$ is a reference input such that $|r| \le 2$. We choose the controller settings and show that the tracking error of the closed-loop system driven by your controller asymptotically decays to zero. The solution to the Lyapunov matrix equation ${\b A}_d^{\top} \b P + \b P\b A_d=-\b I_2$ is
\[
{\b P}=\left[\begin{array}{cc}
1.4143 & 0.5000\\
0.5000 & 0.7143
\end{array}\right].
\]


To proceed, we define the tracking error ${\b e}_x(t)=\b x(t)-{\b z}(t)$. Note that $\b b=\b b_d$ and $\b A_d=\b A-\b b\b k$, where $\b k=\left[\begin{array}{cc}
-1 & -0.4
\end{array}\right]$. Then, the differential equation that describes the error dynamics is
\begin{eqnarray*}
\dot{\b e}_x&=&\dot{\b x}-\dot{\b z}\\
&=&{\b A}\b x+\b b(u + \zeta)-{\b A}_d{\b z}-{\b b}r\\
&=& (\b A_d+\b b\b k)\b x + \b b(u + \zeta)-{\b A}_d{\b z}-{\b b}r\\
&=&{\b A}_d{\b e}_x + {\b b}(u + \zeta -r +\b k\b x).
\end{eqnarray*}
We propose the following control strategy,
\[
u=-u_{fuzzy}-\eta\frac{\b b^{\top}\b P\b e_x}{|\b b^{\top}\b P\b e_x|}=-u_{fuzzy}-\eta\,\mbox{sign}(0.5e_1+0.7143e_2),
\]
where $\eta$ will be determined later, and
\[
u_{fuzzy}=\b{\theta}^{\top}\b{\xi},
\]
where the vector $\b{\xi}$ is bounded. The role of the fuzzy term is to minimize the effect of uncertainties\index{fuzzy term!to minimize effect of uncertainties} modeled by the bounded function $\zeta$. Let $\b{\theta}^*$ denote the ``optimal'' weight vector such that
\begin{equation}
\zeta=\b{\theta}^{*\top}\b{\xi}+ e,
\label{eq:approxzeta}
\end{equation}
where $e$ is the approximation error. We assume that the approximation error is bounded by $\rho$, that is,
\begin{equation}
|e|\le \rho.
\label{eq:bound_on_e}
\end{equation}
Consider the following Lyapunov function candidate\index{Lyapunov function candidate},
\[
V=\frac{1}{2}\b e_x^{\top}\b P\b e_x + \frac{1}{2\alpha}\b{\phi}^{\top}\b{\phi},
\]
where
\begin{equation}
\b{\phi}=\b{\theta}-\b{\theta}^*.
\label{eq:phi_eqls_thet_m_ths}
\end{equation}
We note that we are now in the augmented state space $(\b e_x, \b{\phi})$.\index{augmented state space} The Lyapunov derivative is
\begin{eqnarray*}
\dot{V} &=& \b e^{\top}_x\b P\dot{\b e}_x + \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}\\
&=& \b e^{\top}_x\b P\left( {\b A}_d{\b e}_x + {\b b}(u + \zeta -r + \b k\b x)  \right) + \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}\\
&=& -\frac{1}{2}\b e^{\top}_x\b e_x + \b e^{\top}_x\b P\b b u + \b e^{\top}_x\b P\b b\left(\zeta -r + \b k\b x   \right)  + \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}.
\end{eqnarray*}
Substituting~(\ref{eq:approxzeta}) and the control strategy into the above gives
\[
\dot{V} = -\frac{1}{2}\|\b e_x\|^2 - \eta\b e^{\top}_x\b P\b b \frac{\b b^{\top}\b P\b e_x}{|\b b^{\top}\b P\b e_x|}-\b e^{\top}_x\b P\b b\b{\theta}^{\top}\b{\xi} + \b e^{\top}_x\b P\b b \left(\b{\theta}^{*\top}\b{\xi}+ e -r + \b k\b x \right)  +  \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}.
\]
Substituting into the above~\eqref{eq:bound_on_e} and~\eqref{eq:phi_eqls_thet_m_ths} and performing manipulations yields
\begin{eqnarray*}
\dot{V} &=& -\frac{1}{2}\|\b e_x\|^2 - \eta|\b e^{\top}_x\b P\b b| - \b e^{\top}_x\b P\b b \left(\b{\theta}-\b{\theta}^*\right)^{\top}\b{\xi} + \b e^{\top}_x\b P\b b\left(e -r + \b k\b x   \right)  +  \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}\\
&\le & -\frac{1}{2}\|\b e_x\|^2 - \eta|\b e^{\top}_x\b P\b b| - \b e^{\top}_x\b P\b b \b{\phi}^{\top}\b{\xi} + \rho|\b e^{\top}_x\b P\b b|+ |\b e^{\top}_x\b P\b b|\left(|r| + |\b k\b x|   \right)  +  \frac{1}{\alpha}\b{\phi}^{\top}\dot{\b{\phi}}\\
&=& -\frac{1}{2}\|\b e_x\|^2 - |\b e^{\top}_x\b P\b b|\left(\eta - \rho - |r| - |\b k\b x| \right) -\b{\phi}^{\top}\left(\left(\b e^{\top}_x\b P\b b \right)\b{\xi} - \frac{1}{\alpha}\dot{\b{\phi}}  \right).
\end{eqnarray*}
We select
\[
\eta\ge \rho + |r| + |\b k\b x|\;\;\mb{and}\;\; \dot{\b{\phi}}=\dot{\b{\theta}}=\alpha\left(\b e^{\top}_x\b P\b b \right)\b{\xi}
\]
to obtain
\begin{equation}
\dot{V}\le -\frac{1}{2}\|\b e_x\|^2.
\label{eq:lyap_derb}
\end{equation}
Thus $\dot{V}$ is negative semi-definite in the augmented $(\b e_x, \b{\phi})$-space and therefore $\b e_x$ as well as $\b{\phi}$, and hence $\b{\theta}$ are bounded. Hence the proposed controller is also bounded, which implies that $\dot{\b e}_x$ is bounded. This in turn implies that
\[
\frac{d}{dt}\|\b e_x\|^2=2\b e_x^{\top}\dot{\b e}_x
\]
is bounded and hence $\|\b e_x\|^2$ is uniformly continuous. Integrating both sides of~(\ref{eq:lyap_derb}) gives
\[
\int_0^{t}\dot{V}(\tau)d\tau = V(t)-V(0)\le \int_0^{t}\left( -\frac{1}{2}\|\b e_x\|^2 \right)d\tau
\]
and hence
\[
\int_0^{t} \|\b e_x\|^2 d\tau\le 2 (V(0)-V(t))\le 2V(0)
\]
because $\dot{V}\le 0$ and $V > 0$, which means that
\[
\lim_{t\to \infty}\int_0^{t} \|\b e_x\|^2 d\tau
\]
exists and is finite. By Barbalat's lemma, stated on page~\pageref{lemma:barb_alter},\index{Barbalat's lemma} $\|\b e_x\|^2 \to 0 \;\;\mb{as}\;\; t\to \infty$, which implies that
\[
\lim_{t\to \infty} \b e_x = \b 0.
\]
\end{example}
\markex

\subsubsection{Projection Operator}
Consider a vector-valued function of time,
\[
\b{\theta}(t)=\left[\begin{array}{ccc}
\theta_1(t)&\cdots &\theta_m(t)
\end{array}\right]^{\top}\in\mb{\Bb R}^m,
\]
where, $\dot{\theta}_i(t)=\alpha_i(t)$, $i=1,\cdots,m$. We wish the
components $\theta_i(t)$s to lie between $\underline{\theta}_i$ and
$\bar{\theta}_i$, that is,
$\underline{\theta}_i\leq\theta_i(t)\leq\bar{\theta}_i$. One
way to achieve this goal is by setting $\dot{\theta}_i(t)=0$
when $\theta_i(t)$ reaches either of the bounds and tends
to go beyond the bound, that is,
\begin{equation} \label{theta_rate}
\dot{\theta}_i(t)=
  \left\{\begin{array}{ll}
    0& \mb{if}\;\; \theta_i={\underline \theta}_i\;\;\mb{and} \;\; \alpha_i(t)<0\\
    0& \mb{if}\;\; \theta_i=\bar{\theta}_i \;\; \mb{and} \;\; \alpha_i(t)>0\\
    \alpha_i(t)& \mb{otherwise.}
  \end{array}\right.
\end{equation}
For compactness, we use the notation {\em Proj}\index{notation Proj}\index{projection operator!Proj} for the right
hand side of (\ref{theta_rate}). Then, we write
\begin{equation}
\dot{\theta}_i(t)=Proj_{\theta_i}(\alpha_i),\; i=1,\ldots,m,
\end{equation}
or in vector notation,
\begin{equation}
\dot{\b{\theta}}(t)=Proj_{\b{\theta}}(\b{\alpha}).
\end{equation}

\subsubsection{Sliding Mode Tracking Controller}
Let
\[
\b s=\left[\begin{array}{ccccc} s_1 & s_2 & \cdots & s_{n-1} & 1
\end{array}\right]\in \mb{\Bb R}^{1\times n}
\]
and $\sigma(\b e)=\b s\b e$. Then, $\{\b e:\sigma(\b e)=0\}$ represents a sliding surface in the tracking
error, $\b e$, space.\index{sliding surface!in the tracking error space} The coefficients $s_i$ of the sliding surface are chosen so that the system~(\ref{eq:nthodemod}) restricted to the sliding surface is asymptotically stable---see Section~\ref{sec:slidingsurf} for a sliding surface design algorithm.\index{sliding surface!design algorithm} Our objective is to construct a fuzzy tracking controller\index{fuzzy tracking controller}
that forces the tracking error to converge to the sliding surface,
$\{\sigma(\b e)=0\}$, and then stay in some
neighborhood of the sliding surface for all subsequent time. If
$f$ and $g$ were known exactly to us and $\eta = 0$, then the controller
\begin{equation}
u^{*}=\frac{1}{g}\left(-f-\mu\sigma+x_d^{(n)}-\b k^{\top} \b e \right),
\label{eq:idealcon}
\end{equation}
where $\b{k}=\left[\begin{array}{cccc} 0 & s_1 & \cdots & s_{n-1}
\end{array}\right]^{\top}$ and $\mu >0$ is a design parameter, would force the tracking error, $\b e$, to behave as desired. We can verify this using standard arguments from sliding mode control practice---see Section~\ref{sec:slidingmode}. We consider the function $V=0.5\sigma^2$. Note that $V$ is positive definite with respect to the sliding surface\index{positive definite!with respect to the sliding surface} $\{\sigma=0\}$. The function $V$ can be viewed as a distance measure to the sliding surface\index{distance measure!to the sliding surface} $\{\sigma = 0\}$. The time derivative of $V$ evaluated on the trajectories of the closed-loop
system~(\ref{eq:nthodemod}), (\ref{eq:idealcon}) is
\begin{eqnarray}
\dot{V}&=&\sigma\dot{\sigma}\nonumber\\
&=&\sigma\b s\dot{\b e}\nonumber\\
&=&\sigma\left(e^{(n)}+s_{n-1}e^{(n-1)}+\cdots+s_1\dot{e}\right)\nonumber\\
&=&\sigma\left(x^{(n)}-x_d^{(n)}+\b{k}^{\top}\b{e}\right)\nonumber\\
&=&\sigma\left(f+gu-x_d^{(n)}+\b{k}^{\top}\b{e}\right)
\label{eq:sisigdot}
\end{eqnarray}
Substituting into the equation above the control law given by~(\ref{eq:idealcon}) yields
\begin{equation}
\dot{V}=-\mu\sigma^2.
\label{eq:finsidot}
\end{equation}
Thus, the sliding surface, $\{\sigma=0\}$, is asymptotically attractive\index{sliding surface!attractive}\index{attractive sliding surface} and the system restricted to the sliding surface can be made asymptotically stable with respect to the origin by an appropriate choice of the parameters, $s_i$, of the sliding surface.

The control law~(\ref{eq:idealcon}) requires perfect knowledge of the plant's model. However, the plant model components $f$ and $g$ are unknown to us. In the following subsection, we describe how to use adaptive
fuzzy logic controllers\index{adaptive fuzzy logic control} to approximate, as closely as possible, the
performance of~(\ref{eq:idealcon}). We consider two cases. In the first case, the function $f=f(\b x)$ is unknown to us while $g=g(\b x)>0$ is known to us. In the second case, both $f$ and $g$ are unknown to us. In both cases, we consider the presence of a bounded disturbance modeled by $\eta$.



\subsection{Controllers}

\subsubsection{Unknown $f(\b{x})$}
When in our plant model~(\ref{eq:nthodemod}) only $g(\b{x})$ is
known, $\eta\neq0$, and $f(\b{x})$ is unknown, we propose to
approximate $f(\b x)$ with fuzzy logic system\index{fuzzy logic system} of the form $\b{\theta}^{\top}_f\b{\xi}_f(\b{x})$, where the functions $\b{\theta}_f$ and $\b{\xi}_f$  are described after defining relevant symbols. We use $\b{\theta}_f^*$ to denote an ``optimal'' vector such that
\begin{equation}
\b{\theta}_f^*=\mb{argmin}_{\b{\theta}_f}
\mb{sup}_{\b{x}\in\Omega}\left|f(\b{x})-\b{\theta}_f^{\top}\b{\xi}_f(\b{x})\right|,
\end{equation}
where $\Omega \subseteq \mb{\Bb R}^n$ is a region to which the state
$\b{x}$ is constrained to reside.


The notation $\mb{argmin}$ (or $\arg \min$) stands\index{notation $\mb{argmin}$}\index{notation $\arg \min$|see{notation $\mb{argmin}$}} for the argument, $x^*$, that
yields the minimal value of the minimized function, $f(x)$. This is well-defined
only if the minimal value of $f(x)$ is reached at a single point. Thus,
$x^*=\arg\min_x f(x)$ holds if and only if $x^*$ is the unique minimizer of $f(x)$.




We assume that
\begin{equation}
\left|f(\b{x})-{\b{\theta}^*_f}^{\top}\b{\xi}_f(\b{x})\right|\le
d_f\quad\mb{for all}\quad \b{x} \in\Omega,
\label{eq:defdf}
\end{equation}
where $d_f>0$ and each element of $\b{\theta}^*_f$ is constant
and bounded below and above as follows
\begin{equation}
\underline{\theta}_{fi} \leq \theta^*_{fi} \leq
\bar{\theta}_{fi},\quad\mb{for all}\quad i=1,\ldots,m,
\end{equation}
or in vector notation,
\begin{equation}
\underline{\b{\theta}}_{f} \leq \b{\theta}^*_{f} \leq
\bar{\b{\theta}}_{f}.
\label{eq:vecnotthetaf}
\end{equation}
We define the adaptation parameter error\index{adaptation parameter error} as
\begin{equation}
\b{\phi}_f=\b{\theta}_f-\b{\theta}^*_f.
\label{eq:phifdef}
\end{equation}
We use the adaptation law\index{adaptation law}
\begin{equation}
\dot{\b{\phi}}_f(t)=\dot{\b{\theta}}_f(t)=Proj_{\b{\theta}_f}
(\gamma_f\sigma\b{\xi}_f(t)),
\label{eq:phideetad}
\end{equation}
where $\gamma_f>0$ is a design parameter. It is easy to verify,
using the definition of $Proj$ and the fact that
$\underline{\theta}_{fi} \leq \theta^*_{fi} \leq
\bar{\theta}_{fi}$ for each $i$, that
\begin{equation}\label{projp1}
\b{\phi}_f^{\top}\left(\frac{1}{\gamma_f}Proj_{\b{\theta}_f}
\left(\gamma_f\sigma\b{\xi}_f\right)-\sigma\b{\xi}_f\right)\leq 0.
\end{equation}
We analyze the following fuzzy adaptive control law,\index{fuzzy adaptive control}
\begin{equation}\label{u1}
\fbox{$\displaystyle u=\frac{1}{g}\left(-\b{\theta}_f^{\top}\b{\xi}_f-\mu\sigma+x_d^{(n)}
-\b{k}^{\top}\b{e}+u_s\right) $}
\end{equation}
with $u_s$ satisfying
\begin{eqnarray}\label{cond1}
&{}&\sigma\left(f-\b{\theta}_f^{\top}\b{\xi}_f+u_s+\eta\right)\leq \epsilon,\\
&{}&\sigma u_s\leq 0,
\label{cond2}
\end{eqnarray}
where $\epsilon>0$ is a design parameter. We state and prove a
theorem concerning the dynamical behavior of the closed-loop
system driven by the control law~(\ref{u1}).
\begin{thm} For the closed-loop system,
\begin{equation}
\left.\begin{array}{lll} x^{(n)}&=&f+gu+\eta\\
u&=&\frac{1}{g}\left(-\b{\theta}_f^{\top}\b{\xi}_f-\mu\sigma+x_d^{(n)}
-\b{k}^{\top}\b{e}+u_s\right)\\
\dot{\b{\theta}}_f&=&Proj_{\b{\theta}_f} (\gamma_f\sigma\b{\xi}_f)
\end{array}\right\}
\label{eq:closgivg}
\end{equation}
where $u_s$ satisfies~(\ref{cond1}) and~(\ref{cond2}), we
have:
\begin{itemize}
\item[(i)]
\begin{equation}\label{sigmabound}
\sigma^2(t) \leq e^{-2\mu t} \sigma^2(0)+\frac{\epsilon}{\mu};
\end{equation}
\item[(ii)] if $\eta=0$ and there exists $\b{\theta}^*_f$ such that
$f(\b{x})={\b{\theta}^*_f}^{\top}\b{\xi}_f(\b{x})$, then the origin of the augmented $(\sigma ,\; \b{\phi}_f)$-space is stable,
and hence $\sigma(t)$ and $\b{\phi}_f(t)$ are bounded for all
$t\ge 0$ and $e(t)\to 0$ as
$t\to \infty$.
\end{itemize}
\label{thm:u1}
\end{thm}
{\bf Proof}\quad
To  prove~{\it (i)}, consider $V=0.5\sigma^2$. The time derivative of $V$ evaluated on the solutions of the closed-loop system~(\ref{eq:nthodemod}), (\ref{u1}) is
\begin{eqnarray*}
\dot{V}&=& \sigma\dot{\sigma}\\
&=& -\mu\sigma^2+\sigma\left(f-\b{\theta
}_f^{\top}\xi_f +u_s+\eta\right).
\end{eqnarray*}
Taking into account~(\ref{cond1}) yields
\[
\dot{V}\le -\mu\sigma^2+\epsilon=-2\mu V+\epsilon.
\]
Applying to the above the comparison theorem,\index{comparison theorem} presented in Subsection~\ref{subsec:comparison}, we obtain
\begin{eqnarray*}
V(t) &\le& e^{-2\mu t}V(0)+\frac{\epsilon}{2 \mu }\left(1- e^{-2\mu t}\right)\\
&\le & e^{-2\mu t}V(0)+\frac{\epsilon}{2 \mu }.
\end{eqnarray*}
Noting in the above that $V=0.5\sigma^2$, we obtain~(\ref{sigmabound}), which proves the first part of the theorem.

To prove~{\it{(ii)}}, consider the following Lyapunov function candidate,\index{Lyapunov function candidate}
\begin{equation}
V=\frac{1}{2}\left(\sigma^2+\frac{1}{\gamma_f}\b{\phi}_f^{\top}\b{\phi}_f\right).
\label{lya_canft1}
\end{equation}
We evaluate the time derivative of the above Lyapunov function candidate on the solutions of the closed-loop system~(\ref{eq:closgivg}), where $\eta = 0$. We obtain,
\[
\dot{V}= \sigma\left(-\mu\sigma+f-\b{\theta}^{\top}_f\b{\xi}_f+u_s\right)
+\frac{1}{\gamma_f}\b{\phi}_f^{\top}\dot{\b{\phi}}_f.
\]
Taking into account the assumption that $f={\b{\theta}_f^*}^{\top}\b{\xi}_f$ and
using~(\ref{eq:phifdef}), (\ref{eq:phideetad}), (\ref{projp1}) and (\ref{cond2}) gives
\begin{eqnarray}
\dot{V}&=&
-\mu\sigma^2+\sigma u_s-\left(\b{\theta}_f^{\top}\b{\xi}_f-\b{\theta}^{*T}_f
\b{\xi}_f\right)\sigma+\frac{1}{\gamma_f}\b{\phi}_f^{\top}\dot{\b{\phi}}_f\nonumber\\
&=& -\mu\sigma^2+\sigma u_s-\b{\phi}_f^{\top}\b{\xi}_f\sigma+\b{\phi}_
f^{\top}\frac{1}{\gamma_f}Proj_{\b{\theta}_f} (\gamma_f\sigma\b{\xi}_f)
\nonumber\\ &\leq&-\mu\sigma^2+\sigma u_s\nonumber\\
&\leq& -\mu\sigma^2.
\label{eq:dotvlemus}
\end{eqnarray}
Thus, $\dot{V}\le 0$ in the $\left[\begin{array}{cc}
\sigma & \b{\phi}_f
\end{array}\right]^{\top}$-space, which implies that the zero solution of the closed-loop system~(\ref{eq:closgivg}) is stable, and therefore, $\sigma(t)$ and $\b{\phi}_f(t)$ are bounded for $t\ge 0$.

To show that $\sigma(t)\to 0$ as $t \to \infty$, we integrate~(\ref{eq:dotvlemus}) from $0$ to $t$ to obtain
\begin{equation}
\int_{0}^{t}\dot{V}(\tau)d\tau=V(t)-V(0)\leq \int_{0}^{t}
\left(-\mu\sigma^2\right) d\tau,
\end{equation}
or equivalently,
\begin{equation}
\int_{0}^{t}\mu\sigma^2d\tau\leq V(0)-V(t)\leq V(0).
\end{equation}
Thus, $\lim_{t\rightarrow\infty}\int_{0}^{t}\sigma^2(\tau)d\tau$
exists and is finite. It follows from the first part of the theorem that $\sigma^2$ is bounded and because
\begin{equation}
\frac{d}{dt}{\sigma^2}=2\sigma\dot{\sigma}\leq -\mu\sigma^2+\epsilon,
\end{equation}
we conclude that $\frac{d}{dt}{\sigma^2}$ is also bounded. Therefore, $\sigma^2$ is uniformly continuous.\index{uniformly continuous} By Barbalat's
lemma,\index{Barbalat's lemma} stated on page~\pageref{lemma:barb_alter}, $\sigma^2\to 0$ as $t\to \infty$. This implies that the tracking error, $e(t)\to 0$ as $t\to \infty$, which concludes the proof of the theorem.\\
\hspace*{5.5in} $\Box$

\subsubsection{Selecting $u_s$ in control law~(\ref{u1})}

We discuss a method that can be used to select the component $u_s$ while implementing the control law~(\ref{u1})). Let $h$ be a constant such that
\[
h\geq\left\Arrowvert\b{\xi}_f\right\Arrowvert\left\Arrowvert\bar{\b{\theta}}_f - \underline{\b{\theta}}_f\right\Arrowvert.
\]
Given the design parameter $\epsilon$, choose positive
numbers $\epsilon_1$, $\epsilon_2$, and $\epsilon_3$ such that $\epsilon=\epsilon_1+\epsilon_2+\epsilon_3$. Then, $u_s$ can be chosen as
\begin{equation}\label{us}
u_s=-k_s\sigma,
\end{equation}
where
\begin{equation}
k_s\geq \frac{d_f^2}{4\epsilon_1}+\frac{h^2}{4\epsilon_2}+
\frac{d^2}{4\epsilon_3}.
\label{eq:ks}
\end{equation}
We verify that the above choice of $u_s$ guarantees that (\ref{us}) satisfies (\ref{cond1}) and (\ref{cond2}). We first consider the left-hand side of~(\ref{cond1}). Adding and subtracting ${\b{\theta}^*_f}^{\top}\b{\xi}_f$ and using~(\ref{eq:phifdef}) yields
\begin{eqnarray}
\sigma(f-\b{\theta}_f^{\top}\b{\xi}_f+u_s+\eta)
&=&\sigma(f-{\b{\theta}^*_f}^{\top}\b{\xi}_f+{\b{\theta}^*_f}^{\top}\b{\xi}_f
-\b{\theta}_f^{\top}\b{\xi}_f+u_s+\eta)\nonumber\\
&=& \sigma(f-{\b{\theta}
^*_f}^{\top}\b{\xi}_f-{\b{\phi}_f}^{\top}\b{\xi}_f-k_s\sigma+\eta).
\label{eq:sigus}
\end{eqnarray}
We use~(\ref{eq:ks}) and group the terms to obtain
\begin{eqnarray}
\sigma(f-\b{\theta}_f^{\top}\b{\xi}_f+u_s+\eta)
&\leq& \sigma\left( f-{\b{\theta}^*_f}^{\top}\b{\xi}_f-\frac{d_f^2}
{4\epsilon_1}\sigma\right)\nonumber\\
&{}&\quad-\sigma\left({\b{\phi}
_f}^{\top}\b{\xi}_f+\frac{h^2}{4\epsilon_2}\sigma\right)
+\sigma\left(\eta-\frac{d^2}{4\epsilon_3}\sigma\right).
\label{eq:threeterms}
\end{eqnarray}
Next, we consider each term on the right hand side of the above inequality separately. We start with the first term. Completing the squares, we obtain
\[
\sigma\left(f-{\b{\theta}^*_f}^{\top}\b{\xi}_f-\frac{d_f^2}{4\epsilon_1}
\sigma\right)
=-\left(\frac{d_f}{2\sqrt{\epsilon_1}}\sigma-
\frac{f-{\b{\theta}^*_f}^{\top}\b{\xi}_f}{d_f/\sqrt{\epsilon_1}}\right)^2+
\left(\frac{f-{\b{\theta}^*_f}^{\top}\b{\xi}_f}{d_f/\sqrt{\epsilon_1}}
\right)^2.
\]
Neglecting the first term in the above and using the assumption~(\ref{eq:defdf}), we get
\begin{equation}
\sigma\biggl(f-{\b{\theta}^*_f}^{\top}\b{\xi}_f-\frac{d_f^2}{4\epsilon_1}
\sigma\biggr)\le\frac{d_f^2}{d_f^2/\epsilon_1}\le \epsilon_1.
\label{eq:firsteps}
\end{equation}
Completing the squares in the second term on the right-hand side of~(\ref{eq:threeterms}) gives
\begin{eqnarray}
-\sigma\left({\b{\phi}_f}^{\top}\b{\xi}_f+\frac{h^2}{4\epsilon_2}
\sigma\right)&=&-\left(\frac{h}{2\sqrt{\epsilon_2}}\sigma+\frac{\b
{\phi}_f^{\top}\b{\xi}_f}{h/\sqrt{\epsilon_2}}\right)^2+\left(\frac{\b
{\phi}_f^{\top}\b{\xi}_f}{h/\sqrt{\epsilon_2}}\right)^2\nonumber\\
&\leq& \left(\frac{\b{\phi}_f^{\top}\b{\xi}_f}{h/\sqrt{\epsilon_2}}\right)^2
\nonumber\\
&=&\left(\frac{(\b{\theta}_f-\b{\theta}_f^*)^{\top}\b{\xi}}
{h}\right)^2\epsilon_2\nonumber\\
&\leq&\frac{\left\Arrowvert\b{\theta}_f-\b
{\theta}^*_f\right\Arrowvert ^2 \left\Arrowvert\b{\xi}_f \right\Arrowvert ^2}{h^2} \epsilon_2\nonumber\\
&\leq&\frac{\left\Arrowvert\b{\theta}_f - \b{\theta}^*_f \right\Arrowvert^2 \left\Arrowvert\b{\xi}_f \right\Arrowvert^2} {\left\Arrowvert\b{\xi}_f\right\Arrowvert^2\left\Arrowvert\bar{\b{\theta}}_f-\underline{\b{\theta}}_f\right\Arrowvert ^2} \epsilon_2 \\
&\leq& \epsilon_2.
\end{eqnarray}
Completing the squares\index{completing the squares} in the third term on the right-hand side of~(\ref{eq:threeterms}) yields
\begin{eqnarray*}
\sigma\left(\eta(t)-\frac{d^2}{4\epsilon_3}\sigma\right)
&=&-\left(\frac{d}{2\sqrt{\epsilon_3}}\sigma-\frac{\eta}
{d/\sqrt{\epsilon_3}}\right)^2+\frac{\eta^2}{d^2}\epsilon_3\\
&\leq& \epsilon_3.
\end{eqnarray*}
Thus,
\[
\sigma\left(f-\b{\theta}_f^{\top}\b{\xi}_f+u_s+\eta\right)\leq\epsilon_1+\epsilon_2
+\epsilon_3=\epsilon.
\]
and hence~(\ref{cond1}) is satisfied.

Also, $u_s=-k_s\sigma$, $k_s>0$, satisfies~(\ref{cond2}).


\subsubsection{Unknown $f(\b{x})$ and $g(\b x)$}

We assume that $g(\b{x})$ and $f(\b{x})$ are
unknown to us  and $\eta\neq 0$. We approximate $f(\b{x})$ and $g(\b{x})$ with fuzzy logic systems,\index{fuzzy logic system} $\b{\theta}^{\top}_f\b{\xi}_f(\b{x})$
and $\b{\theta}^{\top}_g\b{\xi}_g(\b{x})$, respectively. The conditions
on $\b{\theta}^{\top}_f\b{\xi}_f(\b{x})$ are the same as in the previous case,
and the conditions on $\b{\theta}^{\top}_g\b{\xi}_g(\b{x})$ are similar, that is, the optimal parameter vector,\index{optimal parameter vector} $\b{\theta}_g^*$, satisfies
\begin{equation}
\b{\theta}_g^*=\mb{argmin}_{\b{\theta}_g}
\mb{sup}_{\b{x}\in\Omega}\left|g(\b{x})-{\b{\theta}_g}^{\top}\b{\xi}_g(\b{x})\right|.
\end{equation}
We assume that
\begin{equation}
\left|g(\b{x})-{\b{\theta}^*_g}^{\top}\b{\xi}(\b{x})\right| \le d_g,\quad \mb{for all}\;\b{x} \in\Omega,
\end{equation}
where
\begin{equation}
\underline{\theta}_{gi} \leq \theta^*_{gi} \leq
\bar{\theta}_{gi},\quad\mb{for all}\; i=1,\cdots,m .
\label{eq:thlothh}
\end{equation}
The parameter error, $\b{\phi}_g=\b{\theta}_g-\b{\theta}^*_g$, is
adapted according to the law,
\[
\dot{\b{\phi}}_g=\dot{\b{\theta}}_g=Proj_{\b{\theta}_g}
(\gamma_g\sigma\b{\xi}_g u_a),
\]
where
\begin{equation}
u_a=\frac{1}{\b{\theta}_g^{\top}\b{\xi}_g}\left(-\b{\theta}_f^{\top}\b{\xi}_f+x_d^{(n)}
-\b k^{\top}\b e\right).
\label{defnua}
\end{equation}
The initial values of the components of $\b{\theta}_g$ are chosen to satisfy~(\ref{eq:thlothh}), where for each $i=1,\ldots,m$, we have $\theta_{gi}>0$. This ensures that $\b{\theta}_g^{\top}\b{\xi}_g>0$ because we choose fuzzy sets so that at any $t$ at least one rule fires and so at least one component of $\b{\xi}$ is nonzero and in fact positive. Using the definition of $Proj$, one can verify that
\begin{equation}\label{projp2}
\b{\phi}_g^{\top}\left(\frac{1}{\gamma_g}Proj_{\b{\theta}_g}
\left(\gamma_g\sigma\b{\xi}_gu_a\right)-\sigma\b{\xi}_gu_a\right)\leq 0.
\end{equation}

We analyze the following fuzzy adaptive control law,\index{fuzzy adaptive control law}
\begin{equation}\label{u2}
\fbox{$\displaystyle u=\frac{1}{\b{\theta}_g^{\top}\b{\xi}_g}\left(-\b{\theta}_f^{\top}\b{\xi}_f+x_d^{(n)}-\b k^{\top}\b e\right)-\frac{1}{\underline{g}}\mu\sigma+u_s $}
\end{equation}
with $u_s$ satisfying the following conditions,
\begin{eqnarray}\label{cond3}
&{}&\sigma\left(f-x_d^{(n)}+\b{k}^{\top}\b{e}+gu_a+gu_s+\eta\right)\leq \epsilon,\\
&{}&\sigma u_s\leq 0,
\label{cond4}
\end{eqnarray}
where $\epsilon>0$ is a design parameter.  Using the definition of $u_a$, given by~(\ref{defnua}), we represent~(\ref{u2}) as
\begin{equation}
u=u_a-\frac{1}{\underline{g}}\mu\sigma+u_s.
\label{eq:altu2}
\end{equation}

\begin{thm}For the closed-loop system,
\begin{equation}
\left.\begin{array}{lll} x^{(n)}&=&f+gu+\eta\\
u&=&\frac{1}{\b{\theta}_g^{\top}\b{\xi}_g}\left(-\b{\theta}_f^{\top}\b{\xi}_f+
x_d^{(n)}-\b k^{\top}\b e\right)-\frac{1}{\underline{g}}\mu\sigma+u_s\\
\dot{\b{\theta}}_f&=&Proj_{\b{\theta}_f}
(\gamma_f\sigma\b{\xi}_f)\\
\dot{\b{\theta}}_g&=&Proj_{\b{\theta}_g}
(\gamma_g\sigma\b{\xi}_gu_a)
\end{array}\right\}
\label{eq:closadasy}
\end{equation}
where $u_s$ satisfies~(\ref{cond3}) and~(\ref{cond4}), we have:
\begin{itemize}
\item[(i)]
\begin{equation}\label{sigmabound2}
\sigma^2(t)\leq e^{-2\mu t} \sigma^2(0)+\frac{\epsilon}{\mu};
\end{equation}
\item[(ii)] if $\eta=0$ and there exist $\b{\theta}^*_f$ and
$\b{\theta}^*_g$ such that
$f(\b{x})={\b{\theta}^*_f}^{\top}\b{\xi}_f(\b{x})$ and
$g(\b{x})={\b{\theta}^*_g}^{\top}\b{\xi}_g(\b{x})$, then  the origin of the $\left[\begin{array}{ccc}
\sigma & \b{\phi}_f & \b{\phi}_g
\end{array}\right]^{\top}$-space
is stable and hence $\sigma(t)$, $\b{\phi}_f(t)$, and $\b{\phi}_g(t)$
are bounded and $e(t)\to 0$ as $t\to \infty$.
\end{itemize}
\end{thm}
{\bf Proof}\quad To prove~{\it (i)}, consider $V=0.5\sigma^2$. The time derivative of $V$ evaluated on the solutions of the closed-loop system~(\ref{eq:nthodemod}), (\ref{u2}) is
\begin{eqnarray*}
\dot{V}&=&\sigma\dot{\sigma}\\
&=&\sigma\left(f+gu+\eta-x_d^{(n)}+\b{k}^{\top}\b{e}\right).
\end{eqnarray*}
Substituting into the above the alternative expression for the control law given by~(\ref{eq:altu2}) and applying~(\ref{cond3}) gives
\begin{eqnarray*}
\dot{V}&=&\sigma\left(f+gu_a-\frac{g}{\underline{g}}\mu{\sigma}+gu_s+\eta-x^{(n)}_d
+\b{k}^{\top}\b{e}\right)\\
&\leq& -\frac{g}{\underline{g}}\mu\sigma^2 +\epsilon\\
&=&-2\mu V+\epsilon.
\end{eqnarray*}
Invoking the comparison theorem,\index{comparison theorem} we obtain (\ref{sigmabound2}).


To prove~{\it{(ii)}}, consider the following Lyapunov function candidate,\index{Lyapunov function candidate}
\begin{equation}
V=\frac{1}{2}\left(\sigma^2+\frac{1}{\gamma_f}\b{\phi}_f^{\top}\b{\phi}_f
+\frac{1}{\gamma_g}\b{\phi}_g^{\top}\b{\phi}_g\right).
\end{equation}
By assumption, $f={\b{\theta}_f^*}^{\top}\b{\xi}_f$,
$g={\b{\theta}_g^*}^{\top}\b{\xi}_g$, $\eta=0$ as well as conditions (\ref{projp1}), (\ref{projp2}), and (\ref{cond4}) hold. In addition, it follows from~(\ref{defnua}) that
\[
x_d^{(n)}
-\b k^{\top}\b e=\b{\theta}_f^{\top}\b{\xi}_f + \b{\theta}_g^{\top}\b{\xi}_g u_a.
\]
Taking into account all of the above in evaluating the time derivative of $V$ on the trajectories of the closed-loop system~(\ref{eq:closadasy}), we obtain
\begin{eqnarray*}
\dot{V}&=&
\sigma\left(-\frac{g}{\underline{g}}\mu\sigma+f-\b{\theta}_f^{\top} \b{\xi}_f+\left(g-\b{\theta}_g^{\top}\b{\xi}_g\right)u_a+gu_s\right)+\frac{1}{\gamma_f}\b{\phi}_f^{\top}\dot{\b{\phi}}_f+\frac{1}{\gamma_g}\b{\phi}_g^{\top}\dot{\b{\phi}}_g\\ &=&\sigma\left(f-\b{\theta}_f^{\top}\b{\xi}_f+\left(g-\b{\theta}_g^{\top}\b{\xi}_g\right)u_a+gu_s\right)-\frac{g}{\underline{g}}\mu\sigma^2\\
&{}&\quad+\b{\phi}_f^{\top}\frac{1}
{\gamma_f}Proj_{\b{\theta}_f}(\gamma_f\sigma\b{\xi}_f)+\b{\phi}_g^{\top}\frac{1}
{\gamma_g}Proj_{\b{\theta}_g}(\gamma_g\sigma\b{\xi}_gu_a)\\
&\leq& -\frac{g}{\underline{g}}\mu\sigma^2+\sigma gu_s
-\b{\phi}_f^{\top}\b{\xi}_f \sigma+\b{\phi}_f^{\top}\frac{1}{\gamma_f}
Proj_{\b{\theta}_f} (\gamma_f\sigma\b{\xi}_f)\\
&{}&\quad-\sigma\b{\phi}_g^{\top}\b{\xi}_g u_a+\b{\phi}_g^{\top} \frac{1}{\gamma_g}Proj_{\b{\theta}_g}
(\gamma_g\sigma\b{\xi}_gu_a)\\
&\leq&-\mu\sigma^2+g\sigma u_s\\
&\leq& -\mu\sigma^2.
\end{eqnarray*}
It follows from the above that the closed-loop system~(\ref{eq:closadasy}) is stable, and therefore, $\sigma(t)$, $\b{\phi}_f(t)$ and $\b{\phi}_g(t)$ are bounded for $t\ge 0$.

Applying Barbalat's lemma,\index{Barbalat's lemma} similarly the way we did in the proof of Theorem~\ref{thm:u1}, we conclude that $\sigma(t)\to 0$ as $t \to \infty$, which completes the proof of the theorem.\\
\hspace*{5.5in} $\Box$

\subsubsection{Selecting $u_s$ in control law~(\ref{u2})}

The component $u_s$ appearing in the control law~(\ref{u2})
can be chosen similarly as in the previous case. We now give a lower bound on the gain $k_s$. Let
\[
h_f\geq\left\Arrowvert\b{\xi}_f\right\Arrowvert\left\Arrowvert\bar{\b{\theta}}_f -
\underline{\b{\theta}}_f\right\Arrowvert\;\mbox{and}\;
h_g\geq\left\Arrowvert\b{\xi}_g\right\Arrowvert\left\Arrowvert\bar{\b{\theta}}_g -
\underline{\b{\theta}}_g\right\Arrowvert\left|u_a\right|.
\]
Given the design parameter $\epsilon$, select positive
numbers $\epsilon_1,\;\epsilon_2,\;\epsilon_3,$ and $\epsilon_4$
such that $\epsilon=\epsilon_1+\epsilon_2+\epsilon_3+\epsilon_4$.
Then, $k_s$ should satisfy the following condition,
\begin{equation}
k_s\geq\frac{1}{\underline{g}}\left(\frac{d^2_f+\left|u_a\right|^2d^2_g}
{2\epsilon_1}+\frac{h_f^2}{4\epsilon_2}+\frac{h_g^2}{4\epsilon_3}
+\frac{d^2}{4\epsilon_4}\right). \label{eqn:ks2}
\end{equation}
When the gain $k_s$ satisfies the above condition, $u_s=-k_s\sigma$ guarantees that~(\ref{cond3})
and~(\ref{cond4}) are satisfied. To show that this is indeed the case, consider the left-hand
side of~(\ref{cond3}). Use $\b{\theta}_g^{\top}\b{\xi}_gu_a+
\b{\theta}_f^{\top}\b{\xi}_f=x_d^{(n)}-\b{k}^{\top}\b{e}$ from~(\ref{defnua}), and then add and subtract
${\b{\theta}^*_f}^{\top}\b{\xi}_f$ and ${\b{\theta}^*_g}^{\top}\b{\xi}_gu_a$
to obtain
\begin{eqnarray*}
\sigma\left(f-x_d^{(n)}+\b{k}^{\top}\b{e}+gu_a+gu_s+\eta\right)
&=& \sigma\left(f-\b{\theta}_f^{\top}\b{\xi}_f-\b{\theta}_g^{\top}\b{\xi}_g u_a
+g u_a+gu_s+\eta\right)\\
&=&\sigma\left(f-{\b{\theta}^*_f}^{\top}\b{\xi}_f
-\b{\phi}_f^{\top}\b{\xi}_f+(g-{\b{\theta}^*_g}^{\top}\b{\xi}_g)u_a\right.\\
&{}&\quad\left.-\b{\phi}_g^{\top}\b{\xi}_gu_a+gu_s+\eta\right).
\end{eqnarray*}
Taking into account~(\ref{eqn:ks2}) in the above and rearranging terms gives
\begin{eqnarray*}
\sigma\left(f-x_d^{(n)}+\b{k}^{\top}e+gu_a+gu_s+\eta\right)
&\le& \sigma\left(f-\b{\theta}_f^{\top}\b{\xi}_f-\frac{d^2_f}{2\epsilon_1}\sigma\right)\\
&{}&\quad+\sigma \left(\left(g-{\b{\theta}^*_g}^{\top}\b{\xi}_g\right)u_a-\frac{\left|u_a\right|^2 d^2_g}{2\epsilon_1}\sigma\right)\\
&{}&\quad -\sigma\left(\b{\phi}_f^{\top}\b{\xi}_f+\frac{h_f^2}{4\epsilon_2}\sigma\right)-\sigma\left(
\b{\phi}_g^{\top}\b{\xi}_gu_a+\frac{h^2_g}{4\epsilon_3}\sigma\right)\\
&{}&\quad+\sigma\left(\eta-
\frac{d^2}{4\epsilon_4}\sigma\right).
\end{eqnarray*}
Completing the squares, similarly as in the previous case, yields
\begin{eqnarray*}
\sigma\left(f-x_d^{(n)}+\b{k}^{\top}e+gu_a+gu_s+\eta\right)&\leq&
\left(\frac{f-\b{\theta}_f^{\top}\b{\xi}_f}{\sqrt{2}d_f/\sqrt{\epsilon_1}}\right)^2
+\left(\frac{(g-{\b{\theta}^*_g}^{\top}\b{\xi}_g)u_a}{\sqrt{2}\left|u_a\right|d_g/
\sqrt{\epsilon_1}}\right)^2\\
&{}&\quad+\left(\frac{\b{\phi}_f^{\top}\b{\xi}_f}{h^2_f/\sqrt{\epsilon_2}}\right)^2
+\left(\frac{\b{\phi}_g^{\top}\b{\xi}_gu_a}{h^2_g/\sqrt{\epsilon_3}}\right)^2
+\left(\frac{\eta}{d/\sqrt{\epsilon_4}}\right)^2\\
&\leq&\;\frac{1}{2}\epsilon_1+\frac{1}{2}\epsilon_1+\epsilon_2+\epsilon_3
+\epsilon_4\\
&=&\epsilon.
\end{eqnarray*}
Hence, (\ref{cond3}) is satisfied, and so is (\ref{cond4}) by the
fact that $u_s=-k_s\sigma$, where $k_s>0$.


\subsection{Examples}
In this Subsection, we present simulation results illustrating the
performance of the control strategies discussed above. The controllers are tested on a simplified model of an electric drive system\index{electric drive system!simplified model} used by Fischle and Schr\"{o}der~\cite{fischle99} to test their
fuzzy adaptive controllers. The plant is modeled by the
differential equation,
\begin{equation}
\ddot{x}=-\frac{5}{J}\arctan(5\dot{x})+\frac{c_T}{J}u=f(x,\dot{x})+g u,
\end{equation}
where $x$ is the angular position, $c_T=$10~Nm/A, and $J=0.1$~kg$\cdot$m$^2$. We generate a reference signal $x_d$ using the reference system\index{reference system}
whose transfer function is given by $\frac{400}{s^2+40s+400}$. The
input signal, $w(t)$, to the reference system is changing its
value randomly between -1.5 and 1.5 every 0.5 seconds.\index{reference system!changing its
value randomly}

\begin{example}\label{ex:fuzada1}\rm
In this example, we assume that we know $g$, where $g=100$, and that there are no disturbances affecting the system, that is, $\eta=0$. We use the control law
given by~(\ref{u1}), where $f(\b{x})$ is approximated by a fuzzy
logic system.\index{fuzzy logic system}\index{approximated by!fuzzy logic system} We use fuzzy sets for $x$ and $\dot{x}$ as in Fischle
and Schr\"{o}der~\cite{fischle99}. They are shown in
Figure~\ref{fig:mf}.
\begin{figure}
\par
\centerline{\psfig{figure=farcmf.eps,height=4in}}
\par
\caption{Fuzzy sets for $x$ and $\dot{x}$.}
\label{fig:mf}
\end{figure}
There are two fuzzy sets\index{fuzzy sets!electric drive system} for $x$ and six
fuzzy sets for $\dot{x}$. Thus, we can have twelve fuzzy rules\index{fuzzy rules!electric drive system}
possible. They have the form:
\begin{center}
Rule 1: IF $x$ is N AND $\dot{x}$ is LN THEN $y=\theta_1$\\
$\vdots$
\\ Rule 12: IF $x$ is P AND $\dot{x}$ is LP THEN $y=\theta_{12}$,
\end{center}
where $\theta_{fi}$, $i=1,\ldots,12$ are the adaptation parameters.\index{adaptation parameters}
The bounds on the components of the adaptation parameter vector, $\b{\theta}_f$, are chosen to be $\bar{\theta}_{fi}=200$ and $\underline{\theta}_{fi}=-200$. All the initial values of the components of $\b{\theta}_f$ are set to zero. We chose $d_f=50$, $d_g=10$, and $\gamma_f=5000$. The values of the remaining design parameters are: $\mu=250$, $\epsilon_1=50$, $\epsilon_2=50$. As $\eta(t)=0$, we do not need to worry about $\epsilon_3$.

SIMULINK\index{SIMULINK!to simulate the closed-loop system} is used to simulate the closed-loop system. Its block diagram is depicted in Figure~\ref{fig:system1}.
\begin{figure}
\par
\centerline{\psfig{figure=farc1main.eps,height=4in,angle=90}}
\par
\caption{SIMULINK block diagram of fuzzy adaptive robust
control system of Example~\ref{ex:fuzada1}.}
\label{fig:system1}
\end{figure}
The regressor generator\index{regressor generator} block produces $\b{\xi}$ using the input $x$ and the parameter adaptation block updates $\b{\theta}_f$. It is made up of sets of integrators as shown in Figure~\ref{fig:rate1}.
\begin{figure}
\par
\centerline{\psfig{figure=farc1rate.eps,height=4in,angle=90}}
\par
\caption{Parameter adaptation block of Example~\ref{ex:fuzada1}.} \label{fig:rate1}
\end{figure}
Adaptation rates of the parameters $\theta_{fi}$ are computed with the \verb!MATLAB function! block,\index{MATLAB function!block} depicted in Figure~\ref{fig:rate1}, using the m-file shown in Figure~\ref{fig:mfilerateo}.
\begin{figure}\begin{verbatim}
%FARC1f_UPDATE.M calculates adapation rates
% (needs 'farc1.mdl' 'farc1_fuzzifier.m', 'af_input_gen.m')

function rate = farc1f_update(x)
% x(1)--x(12) are components of xi,
% x(13) is sigma,  x(14)--x(25) are components of theta
rate = zeros(12,1);
r = 5000;               %adaptation gain(learning rate)
theta_lb = -200;
theta_ub =  200;

for i = 1:12;
   alpha = r*x(13)*x(i);
   rate(i) = alpha*(((x(i+13)>theta_lb)|(alpha>0))&((x(i+13)<...
             theta_ub)|(alpha<0)));
end;
\end{verbatim}
\label{fig:mfilerateo}
\caption{An m-file used in the block diagram of Figure~\ref{fig:rate1} to compute adaptation rates.}
\end{figure}
The vector $\b s$ that defines the sliding surface, $\{\b e:\b s\b e=0 \}$, was chosen as $\b
s=\left[\begin{array}{cc} 40 &  1
\end{array}\right]$.
The simulation results are shown in Figures~\ref{fig:xe1} and~\ref{fig:ud1}.  The output $x(t)$, the reference signal $x_d(t)$, and the tracking error $e(t)$ are shown in~Figure~\ref{fig:xe1}. The tracking error, $e(t)$, is so small that one cannot distinguish between the actual state $x(t)$ and the desired state $x_d(t)$. The plots of the control signal $u$ and the components of $\b{\theta}_f$ versus time are depicted in Figure~\ref{fig:ud1}. As the fuzzy logic system adapts the
parameter $\b{\theta}_f$, the error, $e(t)$, gets smaller and smaller. If we used smaller $\epsilon$, we would achieve even smaller tracking error,
at the expense of higher control effort.
\begin{figure}
\par
\centerline{\psfig{figure=farc1xe.eps,height=4in}}
\par
\caption{Plots of $x(t)$ and error $e(t)$ in Example~\ref{ex:fuzada1}.}
\label{fig:xe1}
\end{figure}
\begin{figure}
\par
\centerline{\psfig{figure=farc1ud.eps,height=4in}}
\par
\caption{Plots of control
effort $u(t)$ and the components of the parameter vector $\b{\theta}_f$ versus time in Example~\ref{ex:fuzada1}.}
\label{fig:ud1}
\end{figure}
\label{eg1}
\end{example}
\markex

\begin{example}\label{ex:fuzada2}\rm
In this example, we assume that $f(\b{x})$ and $g$ are
unknown to us and we employ the control law~(\ref{u2}). Unknown
$f(\b{x})$ and $g$ are approximated by two separate fuzzy
logic systems\index{fuzzy logic systems!to approximate nonlinearties} using fuzzy sets shown in~Figure~\ref{fig:mf} for both fuzzy logic systems.


The bounds on the adaptation parameters are chosen as:
$\bar{\theta}_{fi}=200$, $\underline{\theta}_{fi}=-200$,
$\bar{\theta}_{gi}=150$, and $\underline{\theta}_{gi}=50$. All the
initial values of the components of the adaptation parameter vector $\b{\theta}_f$ are set to zero. The initial values of $\b{\theta}_g$ are set to $150$ to avoid excessively large control signal in the early stages of the simulation run. The selected gains are $\gamma_f=5000$ and
$\gamma_g=1000$. The other design parameters are: $\epsilon_1=50$,
$\epsilon_2=100$, $\epsilon_3=50$, and $\epsilon_4=50$. The
remaining parameters are the same as in the previous example.

SIMULINK block diagrams\index{SIMULINK!block diagrams} of the closed-loop system and the parameter adaptation law\index{parameter adaptation law} are depicted in Figure~\ref{fig:system2}
and Figure~\ref{fig:rate2}, respectively.
\begin{figure}
\par
\centerline{\psfig{figure=farc2main.eps,height=4in,angle=90}}
\par
\caption{SIMULINK block diagram of the fuzzy adaptive robust
control system of Example~\ref{ex:fuzada2}.}
\label{fig:system2}
\end{figure}
\begin{figure}
\par
\centerline{\psfig{figure=farc2rate.eps,height=4in,angle=90}}
\par
\caption{Parameter adaptation block of Example~\ref{ex:fuzada2}.}
\label{fig:rate2}
\end{figure}
The disturbance, $\eta$, is a random signal, whose plot versus time is shown in Figure~\ref{fig:ud2}.
\begin{figure}
\par
\centerline{\psfig{figure=farc2ud.eps,height=4in}}
\caption{Plots of the control effort $u(t)$ and disturbance $\eta(t)$ versus time in Example~\ref{ex:fuzada2}.}
\label{fig:ud2}
\end{figure}
We used $d=100$ so that the condition, $\left|\eta(t)\right|\leq d$, is satisfied. We chose, as before, $\b s=\left[\begin{array}{cc} 40 &  1
\end{array}\right]$. The simulation results are shown in Figures~\ref{fig:xe2}, \ref{fig:ud2}, and \ref{fig:para2}.
\begin{figure}
\par
\centerline{\psfig{figure=farc2xe.eps,height=4in}}
\par
\caption{Plots of $x(t)$ and error $e(t)$ versus time in Example~\ref{ex:fuzada2}.}
\label{fig:xe2}
\end{figure}
As can be seen in Figure~\ref{fig:xe2}, the tracking error, $e(t)$, remains very small even in the presence of the disturbance, $\eta$. Plots of the time history of the adaptation parameters are shown in Figure~\ref{fig:para2}.
\begin{figure}
\par
\centerline{\psfig{figure=farc2fg.eps,height=4in}}
\par
\caption{Plots of the components of the parameter vectors $\b{\theta}_f$ and $\b{\theta}_g$ versus time in Example~\ref{ex:fuzada2}}
\label{fig:para2}
\end{figure}
\end{example}
\markex






\section{Notes}
The reader is encouraged to peruse a text on classical logic to become familiar with basic concepts of logic before undertaking his or her further study of fuzzy logic. An excellent introduction to logic is Copi~\cite{copi78}. For an introduction to fuzzy set theory\index{fuzzy set theory} the reader is referred to Klir, St.Clair, and Yuan~\cite{klir97}, while for an introduction to fuzzy control,\index{fuzzy control} see Driankov, Hellendoorn, and Reinfrank~\cite{driankov93}. Kosko~\cite{kosko97} is the first book on fuzzy engineering.\index{fuzzy engineering} Graduate texts on fuzzy systems and control are Pedrycz~\cite{pedrycz93} and Wang~\cite{lxwang97}. Paradigms and practice of fuzzy modeling\index{practice of fuzzy modeling}\index{fuzzy modeling!practice of} are the topics of the edited book by Pedrycz~\cite{pedrycz96}. Lee and Lin~\cite{lin96}, and Jang, Sun, and Mizutani~\cite{jang97} cover applications of fuzzy systems as well as issues of merging fuzzy logic and neural networks. Mendel~\cite{mendel01}, on the other hand, presents extensions of the original fuzzy logic to deal with uncertainties.

The first chapter of Kosko's book~\cite{kosko97} contains a thrilling account of the beginnings of fuzzy logic and fuzzy engineering. Kosko~\cite[page~5]{kosko97} observes that ``Fuzziness began as vagueness in the late nineteenth century.''\index{fuzziness!began as vagueness} A concept is vague when it has blurred boundaries. For example, the concept {\em mountain} is vague because we do not know where a mountain ends and a hill begins. It was Bertrand Russell who in 1923 published a paper in which he described the concept of vagueness in terms of symbolic logic.\index{vagueness!in terms of symbolic logic} In the 1920s, Polish mathematician Jan {\L}ukasiewicz invented the multivalued logic.\index{Lukasiewicz!inventor of multivalued logic}\index{multivalued logic!of {\L}ukasiewicz} Max Black applied multivalued logic to sets of objects in the 1930s. In the 1950s, a number of logicians worked out a vague set algebra. In his 1965 paper, Zadeh~\cite{zadeh65} used the term {\em fuzzy} to mean {\em vague}. According to Kosko~\cite[page~8]{kosko97}, ``Zadeh's 1965 paper applied {\L}ukasiewicz's logic to each object in a set to work out a complete fuzzy set algebra and to extend the convex separation theorem to pattern recognition.'' The beginning of fuzzy engineering,\index{fuzzy engineering} on the other hand, can be marked by the work of Mamdani and Assilian~\cite{mamdani75} who first used fuzzy calculus\index{fuzzy calculus} to construct a fuzzy logic controller.\index{fuzzy logic controller}

The method of constructing fuzzy design models described in Section~\ref{sec:fuzmostabli} as well as the stabilizability conditions of fuzzy models\index{stabilizability!of fuzzy models} along with a Lyapunov based stabilizer\index{Lyapunov based!stabilizer} were first reported in~\cite{teixeira99}. Teixeira, Assun{\c{c}}{\~{a}}o, and Avellar~\cite{teixeira03} present Lyapunov-based design methods of fuzzy regulators and observers using LMIs.\index{Lyapunov-based design!using LMIs}\index{fuzzy regulator design!using LMIs}\index{fuzzy observer design!using LMIs} The controllers analyzed in Section~\ref{sec:fuzzy_ada} come from Lee et al.~\cite{yonggon_acc01}. Other fuzzy adaptive control strategies were developed by Wang~\cite{wang93} and by Fischle and Schr\"{o}der~\cite{fischle99}. Fischle and Schr\"{o}der~\cite[page~38]{fischle99} observe that a major limitation of all existing stable adaptive fuzzy controllers, including the ones analyzed by us, is that they were developed for systems with unlimited actuators' authority, that is, for systems with no constraints on the effort level of the actuators. If we are serious about real-life applications of fuzzy adaptive  controllers, then the case of the actuators with limited authority\index{actuators!with limited authority} has to be rigorously analyzed. Another issue of practical importance is the convergence of the adaptation parameters to their ``correct'' values. Friedland~\cite[page~345]{friedland96} states: ``One may argue that the failure of a parameter estimate to converge to its correct value is a subsidiary issue as long as the adaptive control works (even with the incorrect parameter estimate). This reasoning might be valid if you can ascertain that the algorithm works for every input to which the system might be subjected. But in most applications the performance of the algorithm is tested only with a limited set of inputs. Satisfactory performance for this set of inputs is not a reliable indicator that its performance will be satisfactory for inputs outside the test set.''  In the current state-of-the-art adaptive control algorithms, the convergence of the adaptation parameters is usually ensured through the so called {\em persistently exciting\/} inputs\index{persistently exciting!inputs} to the adaptation algorithms. However, the injection of the persistently exciting signals\index{persistently exciting!signals} into the adaptation algorithms may not be feasible in real life applications. Thus, an alternative approach to the issues of the convergence of the adaptation parameters is needed.


\section{Exercises}
\begin{exercise}\label{ex:simfuzzexer}\rm
Consider a process whose input $u$ is a function of two variables $e$ and $\dot{e}$. The membership functions\index{membership functions} for $e$, $\dot{e}$ and $u$ are given in Table~\ref{tab:eecumem}.
\begin{table}[h]
\caption{Membership matrix table for $e$, $\dot{e}$ and $u$ for Exercise~\ref{ex:simfuzzexer}.}
\begin{center}
\begin{tabular}{c|c|c|c|c|c|c|c}\hline
\multicolumn{1}{c|} {Fuzzy} &
\multicolumn{7}{c}{ Universe of discourse} \\ \cline{2-8}
{Numbers} & -3 & -2 & -1 & 0 & 1 & 2 & 3 \\ \hline \hline
LN & 1 & 0.5 & 0.25 & 0 & 0 & 0 & 0  \\ \hline
SN & 0.5 & 1 & 0.5 & 0.25 & 0 & 0 & 0 \\ \hline
ZE & 0 & 0.25 & 0.5 & 1 & 0.5 & 0.25 & 0 \\ \hline
SP & 0 & 0 & 0 & 0.25 & 0.5 & 1 & 0.5 \\ \hline
LP & 0 & 0 & 0 & 0 & 0.25 & 0.5 & 1 \\ \hline
\end{tabular}
\end{center}
\label{tab:eecumem}
\end{table}
The control rules are:
\begin{enumerate}
\item If $e$ is ZE and $\dot{e}$ is SP then $u$ is SN
\item If $e$ is ZE and $\dot{e}$ is ZE then $u$ is ZE
\item If $e$ is SN and $\dot{e}$ is SN then $u$ is LP
\item If $e$ is SP and $\dot{e}$ is ZE then $u$ is SN.
\end{enumerate}
Determine the value of $u$, for $e=1$ and $\dot{e}=-2$, using
\begin{itemize}
\item[(a)] the algebraic product defuzzifier;\index{algebraic product defuzzifier}
\item[(b)] the center-of-gravity defuzzifier.\index{center-of-gravity defuzzifier}
\end{itemize}
\end{exercise}
\begin{exercise}\rm
Use Lemma~\ref{lemma:veccomp} to prove the following result due to Bailey~\cite{bailey66}:\\
Let $\b B$ be a matrix with negative diagonal elements and non-negative off-diagonal elements.\index{matrix!with negative diagonal and non-negative off-diagonal elements} If $\b x(t;\b x_0,t_0)$ and $\b y(t;\b y_0,t_0)$ are solutions of $\dot{\b x}\le \b B\b x$ and $\dot{\b y}=\b B\b y$, respectively, and $\b x_0=\b y_0$, then $\b x(t;\b x_0,t_0)\le\b y(t;\b y_0,t_0)$ for all $t\ge t_0$.
\end{exercise}
\begin{exercise}\label{exe:fuzzyconelink}\rm
Consider the one-link robot manipulator\index{one-link robot} of Exercise~\ref{exer:one_linkman}, whose model is given by~(\ref{eq:nomoolinum}) and~(\ref{eq:ouoonlima}). Let
\[
\b P=\b s^{\top}\left( \b s\b s^{\top}\right)^{-1}\b s,
\]
where $\b s\in \mb{\Bb R}^{1\times 2}$ is the row vector that was found in Exercise~\ref{exer:one_linkman}. Then, $(\b I_n-\b P)$ is the orthogonal projector of $\b x$ onto the sliding surface $\{\b x:\b s\b x=0\}$. The Euclidean distance of the point $\b x$ to the surface $\{\b x:\b s\b x=0\}$ is
\[
\|\b P\b x\|_2.
\]
Design a fuzzy sliding mode controller\index{fuzzy sliding mode controller} whose inputs are:
\[
\|\b P\b x(t)\|_2\mb{sign}(\sigma(\b x(t))\quad\mb{and}\quad \Delta \|\b P\b x(t)\|_2=\|\b P\b x(t)\|_2-\|\b P\b x(t-T_d)\|_2,
\]
where $T_d$ is the time delay that is a design parameter. Use the rules matrix given in Table~\ref{tab:rulesforexerc}.
\begin{table}
\caption{The rules matrix for Exercise~\ref{exe:fuzzyconelink}.}
\begin{center}
\begin{tabular}{c||c|c|c|c|c} \hline
{\bf change-in-error} & LN & N & ZE & P & LP \\ \cline{1-1}
{\bf error}& {}&{}&{}&{}&{}\\ \hline \hline
LN & LP & LP & LP & LP & LP \\ \hline
N & P & P & P & LP & LP \\ \hline
ZE & ZE & ZE & ZE & ZE & ZE \\ \hline
P & LN & LN & N & N & N\\ \hline
LP & LN & LN & LN & LN & LN \\ \hline
\end{tabular}
\end{center}
\label{tab:rulesforexerc}
\end{table}

\end{exercise}
\begin{exercise}\rm
Consider a dynamical system modeled by~(\ref{eq:fuzzy_modeltsk})--(\ref{eq:alphastsk}). Let
\begin{equation}
\alpha_j(t)=1-\sum_{{i=1}\atop{i \ne j}}^r \alpha_i(t).
\label{eq:oneminus}
\end{equation}
Represent~(\ref{eq:fuzzy_modeltsk}) as
\begin{eqnarray}
\!\!\!\!\!\!\!\dot{\b x}&=&\left(\alpha_j\b A_j + \sum_{{i=1}\atop{i\ne j}}^r \alpha_i \b A_i \right)\b x+\left(\alpha_j\b B_j + \sum_{{i=1}\atop{i\ne j}}^r \alpha_i\b B_i \right) \b u\nonumber\\
&=&\left(\b A_j + \sum_{{i=1}\atop{i\ne j}}^r \alpha_i\left( \b A_i-\b A_j\right) \right)\b x+\left(\b B_j + \sum_{{i=1}\atop{i\ne j}}^r \alpha_i\left(\b B_i -\b B_j\right)\right) \b u.
\label{eq:fuzzytouncertain}
\end{eqnarray}
Let
\[
\b \alpha^j(t)=\b \alpha^j=\left[\begin{array}{cccccc}
\alpha_1&\cdots&\alpha_{j-1} & \alpha_{j+1}&\cdots&\alpha_r
\end{array}\right]^{\top}.
\]
Observe that $\b \alpha^j \in [0,1]^{r-1}$, that is, the values of the vector-valued function $\b \alpha^j(\cdot)$ are in the $(r-1)$-dimensional unit hypercube. Next, let
\[
\Delta \b A(\b \alpha^j)=\sum_{{i=1}\atop{i\ne j}}^r \alpha_i\left( \b A_i-\b A_j\right)\quad\mb{and}\quad
\Delta \b B(\b \alpha^j)=\sum_{{i=1}\atop{i\ne j}}^r \alpha_i\left(\b B_i -\b B_j\right).
\]
Using the above notation, represent model~(\ref{eq:fuzzytouncertain}), in an equivalent way, as
\begin{eqnarray}
\label{eq:uncertainex}
\dot{\b x}&=&\left(\b A_j+\Delta \b A(\b \alpha^j)\right)\b x+\left(\b B_j+\Delta \b B(\b \alpha^j)\right)\b u\nonumber\\
&=& \b A_j\b x+\b B_j\b u+\b F(\b \alpha^j,\b x,\b u),
\end{eqnarray}
where $\b F(\b \alpha^j,\b x,\b u)=\Delta \b A(\b \alpha^j)\b x+\Delta \b B(\b \alpha^j)\b u$. Let
\begin{equation}
\b F(\cdot)=\b f(\cdot)+\b B_j\b h(\cdot).
\label{eq:bigf}
\end{equation}
We refer to $\b f$ as the {\em unmatched uncertainty\/},\index{unmatched uncertainty} while $\b h$ is referred to as the {\em matched uncertainty\/}.\index{matched uncertainty} Hence, (\ref{eq:uncertainex}) takes the form
\begin{equation}
\dot{\b x} = \b A_j\b x+\b B_j\b u +\b f+\b B_j\b h.
\label{eq:genfuzzy}
\end{equation}
Assume that
\begin{equation}
\label{eq:normbounds}
\left\{\begin{array}{lcl}
\|\b f\|&=&\|\b f(\b \alpha^j, \b x)\| \le \alpha_f \|\b x\|\\
\|\b h\|&=&\|\b h(\b \alpha^j, \b x, \b u)\| \le \beta_x\|\b x\|+\beta_u\|\b u\|,
\end{array}\right.
\end{equation}
Prove the following theorem:
\begin{thm}
\label{theorem}
Suppose that $\b A_j$ is asymptotically stable, and $\b P=\b P^{\top} >0$ is the solution to the Lyapunov matrix equation $\b A_j^{\top}\b P+\b P\b A_j=-2\b Q$ for some $\b Q=\b Q^{\top} >0$. Suppose also that
\[
\alpha_f < \frac{\lambda_{\min}(\b Q)}{\lambda_{\max}(\b P)}\quad\mb{and}\quad \beta_u < 1.
\]
Then, the state feedback controller $\b u=-\gamma\b B_j^{\top}\b P\b x$, where
\[
\gamma > \frac{\beta_x^2}{4\left(\lambda_{\min}(\b Q)-\alpha_f \lambda_{\max}(\b P) \right)(1-\beta_u)}
\]
globally asymptotically stabilizes the uncertain system for arbitrary $\b f$ and $\b h$ that satisfy the norm bounds~(\ref{eq:normbounds}).
\end{thm}
\label{exer:linconforfuzz}
\end{exercise}
\begin{exercise}\label{exer:linredcofuz}\rm In this Exercise, the following definition is used:
\begin{defn}
We say that system~(\ref{eq:uncertainex}) satisfies the matching conditions if there exist continuous matrix functions $\b D(\cdot):\mb{\Bb R}^{r-1} \to \mb{\Bb R}^{m\times n}$ and $\b E(\cdot):\mb{\Bb R}^{r-1} \to \mb{\Bb R}^{m\times m}$ such that
\begin{equation}
\left\{\begin{array}{lll}
\Delta \b A(\b \alpha^j)&=&\b B_j\b D(\b \alpha^j)\nonumber \\
\Delta \b B(\b \alpha^j)&=&\b B_j\b E(\b \alpha^j)
\end{array}\right.
\label{eq:matchings}
\end{equation}
for all $\b \alpha^j \in [0,1]^{r-1}$.
\end{defn}\markdefn

Consider the following algorithm for linear controller design for fuzzy system models of the form~(\ref{eq:fuzzytouncertain}) that is the subject of Exercise~\ref{exer:linconforfuzz}. The algorithm is a consequence of Theorem~\ref{theorem} of Exercise~\ref{exer:linconforfuzz}.\index{controller design for fuzzy systems algorithm}\index{algorithm!controller design for fuzzy systems}
\begin{algorithm}\rm
\begin{center}
{\bf Linear Controller Design for Fuzzy Systems}
\end{center}
Given fuzzy model~(\ref{eq:fuzzytouncertain})
\begin{enumerate}
\item Set $j=1$;
\item\label{item:one} Check matching conditions~(\ref{eq:matchings}). If the matching conditions are satisfied, calculate matrices $\b D$ and $\b E$, and check if $\alpha_u<1$. If the matching conditions are not satisfied, express the uncertain element as $\b F=\b f+\b B_j\b h$, calculate $\beta_u$ and check if $\beta_u<1$. If $\beta_u>1$, set $j=j+1$ and repeat the above computations.
\item Stabilize $\b A_j$, if necessary. Calculate $\b u_1=-\b K_1\b x$ so that the matrix $\b A_j-\b B_j\b K_1$ has its eigenvalues in the desired locations. Update the matched uncertainty involving the state vector, that is, replace $\b D$ with $\b D-\b E\b K_1$;
\item Solve the Lyapunov equation $\b A_j^{\top}\b P+\b P\b A_j=-2\b Q$ for some $\b Q=\b Q^{\top} >0$. Choosing $\b Q=\b I_n$ maximizes the ratio $\lambda_{\min}(\b Q)/\lambda_{\max}(\b P)$. Check if $\alpha_f < \lambda_{\min}(\b Q)/\lambda_{\max}(\b P)$. If $\alpha_f$ does not satisfy the condition, set $j=j+1$ and go to step~\ref{item:one};
\item Construct $\b u_2=-\gamma\b B_j^{\top}\b P\b x$;
\item Construct the resulting state feedback linear control law $\b u=\b u_1+\b u_2$.
\end{enumerate}
%\begin{center}
%\rule{3in}{.01in}
%\end{center}
\end{algorithm}\markex

Illustrate the above algorithm on a reduced-order model of an inverted pendulum\index{reduced-order model!of an inverted pendulum} mounted on a cart. The equations of motion for the pendulum are
\begin{equation}
\left\{\begin{array}{lll}
\dot{x}_1 &=& x_2\\
\dot{x}_2 &=& \frac{g \sin(x_1)-amlx_2^2\sin(2x_1)/2-a\cos(x_1)u}{4l/3-aml\cos^2(x_1)},
\end{array}\right.
\label{eq:truthmex}
\end{equation}
where $x_1$ is the angle of the pendulum from the vertical line, $x_2$ is the angular velocity of the pendulum, $u$ is the control force applied to the cart, and $g=9.8$~m/sec$^2$ is the magnitude of the acceleration due to gravity. Numerical values of the parameters are given in Table~\ref{table1ex}.
\begin{table}[h]
\caption{Parameter numerical values of the model of Exercise~\ref{exer:linredcofuz}.}
\begin{center}
\begin{tabular}{ll}\hline
$m$=mass of pendulum & $2.0$ kg\\
$M$=mass of cart & $8.0$ kg\\
$2l$=length of pendulum & $1.0$ m\\
$a=1/(m+M)$ \\ \hline
\end{tabular}
\end{center}
\label{table1ex}
\end{table}
Consider modeling equations~(\ref{eq:truthmex}) as a truth model. Use the truth model\index{truth model!to simulate} in your simulations to evaluate the performance of the design. Design a linear stabilizing controller\index{linear stabilizing controller!for fuzzy systems} using the above algorithm utilizing a design model. Assume that, by using insight and experience, you obtained the following two rules describing the plant dynamics:
\[
\mb{Rule 1 }:\mb{ IF } x_1(t)\mb{ is about 0}
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_1\b x(t)+\b b_1 u(t),
\]
and
\[
\mb{Rule 2 }:\mb{ IF } x_1(t)\mb{ is about }\pm\pi/2
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_2\b x(t)+\b b_2 u(t),
\]
where
\[
\b A_1=\left[\begin{array}{cc}
0 & 1\\
\frac{g}{4l/3-aml}& 0
\end{array}\right],\quad \b b_1=\left[\begin{array}{c}
0\\
-\frac{a}{4l/3-aml}
\end{array}\right],
\]
and
\[
\b A_2=\left[\begin{array}{cc}
0 & 1\\
\frac{2g}{\pi(4l/3-amlb^2)}& 0
\end{array}\right],\quad \b b_2=\left[\begin{array}{c}
0\\
-\frac{ab}{4l/3-amlb^2}
\end{array}\right],
\]
where $b=\cos(88^{\circ})$. Use the following membership functions:
\[
\mu_1(x_1) = \frac{1-1/\left(1+\exp(-7(x_1-\pi/4))\right)}{1+\exp(-7(x_1+\pi/4))}\quad\mb{and}\quad
\mu_2(x_1) = 1-\mu_1(x_1).
\]
The above membership functions are the same as the ones employed by Cao et al.~\cite{cao96}. The corresponding fuzzy system model is
\begin{equation}
\dot{\b x}=\left(\alpha_1\b A_1+\alpha_2\b A_2 \right)\b x+\left(\alpha_1\b b_1+\alpha_2\b b_2 \right)u,
\label{eq:invpenfuzzyex}
\end{equation}
where $\alpha_i=\mu_i$, $i=1,2$, because $\mu_1+\mu_2=1$ for all $t$. Proceed to construct a stabilizing linear controller according to the above algorithm. First, represent model~(\ref{eq:invpenfuzzyex}) as
\begin{equation}
\dot{\b x}=\left(\b A_1+\alpha_2\left( \b A_2-\b A_1\right)\right)\b x +\left(\b b_1+\alpha_2\left( \b b_2-\b b_1\right)\right)u.
\label{eq:invpenfuzuncerex}
\end{equation}
Check that the uncertain elements of system model~(\ref{eq:invpenfuzuncerex}) satisfy the matching conditions. Suppose that the desired eigenvalues of $\b A_1-\b b_1\b k_1$ are $\{-2,-2\}$. Construct the controller, and test its performance on the truth model. Generate plots of $x_1$ versus time for different initial angular displacements $x_1(0)$. You can set $x_2(0)=0$.
\end{exercise}

\begin{exercise}\label{exer:proj_op}\rm The objective of this exercise is to understand better the dynamical behavior of the nonlinear projector\index{nonlinear projector!adaptive fuzzy control}
used by us in adaptive fuzzy control and defined by~(\ref{theta_rate}). For example, take $\alpha(t)= \sin(0.5\pi t)$, $\underline{\theta}=-0.3$, and $\bar{\theta}= 0.5$. Compare solutions of $\dot{\theta}=Proj_{\theta}(\alpha)$ and $\dot{\theta}=\alpha$ for a number of  initial conditions. Below is an example of MATLAB's function that implements the differential equation, $\dot{\theta}=Proj_{\theta}(\alpha)$, where \tt{low}$=\underline{\theta}$ and \tt{upper}$=\bar{\theta}$.
\begin{verbatim}
function theta_dot = Proj(t,theta)
low=-0.3;
upper=0.5;
alpha=sin(0.5*pi*t);
if (theta <= low)&(alpha<0)
   theta_dot=0;
elseif (theta >= upper)&(alpha>0)
   theta_dot=0;
else
   theta_dot=alpha;
   end
\end{verbatim}

\end{exercise}
\begin{exercise}\rm
For the fuzzy model the stick balancer\index{stick balancer!fuzzy model}\index{fuzzy model!of the stick balancer} given in Example~\ref{example:stick} by equation~(\ref{eq:invpenfuzzy}), where
\[
\b y=\left[\begin{array}{cccc}
1 & 0 & 0 & 0\\
0 & 0 & 1 & 0
\end{array}\right]\left[\begin{array}{c}
x_1\\
x_2\\
x_3\\
x_4
\end{array}\right],
\]
construct a fuzzy observer.\index{fuzzy observer} (Note that we have $\b C_1=\b C_2=\b C(\b{\alpha})$.) Implement the combined controller-observer compensator\index{combined controller-observer compensator} using first the fuzzy model and then the nonlinear model of the  stick balancer. Write MATLAB scripts that animate the dynamical behavior of the closed-loop systems along with animation of the angle $\theta$ and the input $u$ data.\index{animation!using MATLAB}
\end{exercise} 