%\setcounter{chapter}{7}
\chapter{Fuzzy Systems}
\label{chp:fuzzysys}
\section{Motivation and Basic Definitions}
Conventional control algorithms require a mathematical model of the system to be controlled. The mathematical model is used to synthesize a controller. In many practical situations, however, it is not always feasible to obtain an accurate mathematical model of the system to be controlled. Fuzzy logic is used to implement linguistic, non-formally expressed control laws derived from expert knowledge. 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 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 on which fuzzy logic is based is {\em fuzzy set}. An ordinary set, or just a set, is a collection of objects. Ordinary sets have two 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}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/crisp.bmp x=4in y=3in}
\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. Fuzzy sets, on the other hand, allow for 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}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/fuzzy.bmp x=4in y=3in}
\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}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/crisp2.bmp x=4in y=3in}
\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}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/fuzzy2.bmp x=4in y=3in}
\caption{Fuzzy sets for SLOW and FAST.} 
\label{fig:fuzzy2}
\end{figure}

With the above examples in mind, we now 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 will call $U$ the {\em universe of discourse\/}, 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$ with the property that if $(x,y)$ and $(x,z)$ are elements of $A$, then $y=z$. Thus a function is a set of ordered pairs.
\begin{defn}[Fuzzy set]
A fuzzy set $A$ on $U$ is a function that maps $U$ into the interval $[0,1]$. Equivalently,
\[
A=\{(u,\mu_{A}(u))\,:\,u \in U\},
\]
where $\mu_{A}$ is commonly called the membership function of the fuzzy set $A$.
\end{defn}

Note that the concept of a fuzzy set generalizes that of a 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$ in $U$ be fuzzy sets on $U$. We define the {\em union\/}, {\em intersection\/}, and {\em complement\/} using the following memebership 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$ 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
\[
\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 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}
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 are given in Figure~\ref{fig:connon}.
\begin{figure}
\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{Standard Additive Model}
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 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$ in the IF-THEN rules describe subsets, or patches, in the Cartesian product space $X\times Y$, as it is illustrated in Figure~\ref{fig:patch}.
\begin{figure}
\vspace{3in}
\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 fuzzy system 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}
\vspace{3in}
\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 is also known as fuzzy reasoning in the literature. The outcome of defuzzification is a numerical value $y\in Y$. An example of a defuzzification algorithm is a centroidal defuzzifier 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 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). 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}
\vspace{3in}
\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-input 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}
\vspace{3.5in}
\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 center average defuzzifier. 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}
An illustration of fuzzy reasoning using defuzzification scheme~(\ref{eq:min_de}) is given in Figure~\ref{fig:infer}.
\begin{figure}
\vspace{4in}
\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 closed-loop system with a fuzzy logic controller~(FLC) is shown in Figure~\ref{fig:typ_fuza}.
\begin{figure}
\vspace{3.5in}
\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 change in the control error $\dot{e}(t)$ as its inputs.
\begin{figure}
\vspace{3.5in}
\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 a structure of the SAM and 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;
\item Decide on the fuzzifier, the inference engine, and the defuzzifier, and then apply them 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 inputs and the output. We then generate the rules. A possible set of rules is shown in Table~\ref{tab:rule_s}, where LN denotes large negative, N means negative, ZE---zero, P---positive, and LP refers to large positive.
\begin{table}
\caption{The rules matrix.}
\begin{center}
\begin{tabular}{c||c|c|c|c|c} \hline
CHANGE-IN-ERROR & LN & N & ZE & P & LP \\ \cline{1-1}
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 an inference engine and a defuzzifier. We can use the product inference rule and the modified center average defuzzifier to get
\[
u(\dot{e},e)=\frac{\sum_{k=1}^{25}p_k m_k^o/ 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}^{e}\mu_j^{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. The modified center average defuzzifier takes into account the shape of the membership functions, and in particular 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}
\vspace{3in}
\hskip1in\special{bmp:c:/ee680/tri_s.bmp x=4in y=3in}
\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}
\vspace{3in}
\hskip1in\special{bmp:c:/ee680/tri_r.bmp x=4in y=3in}
\caption{A fuzzy set at the right end of a universe of discourse.}
\label{fig:tri_r}
\end{figure}
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}
\vspace{3in}
\hskip1in\special{bmp:c:/ee680/tri_l.bmp x=4in y=3in}
\caption{A fuzzy set at the left end of a universe of discourse.}
\label{fig:tri_l}
\end{figure}
\begin{example}\rm
Consider the vehicle model given in Subsection~2.4.2. Let the input signal be $u=\delta_f$---the front wheel steer angle, and $\delta_r=0$. We will design a simple fuzzy logic controller 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$ & $\sigma$ & $m$ & $\sigma$ & $m$ & $\sigma$ \\ \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}
\vspace{3.5in}
\hskip.7in\special{bmp:c:/ee680/hw6s7er.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable ERROR.}
\label{fig:hw6s7er}
\end{figure}
\begin{figure}
\vspace{3.5in}
\hskip.7in\special{bmp:c:/ee680/hw6s7ce.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable CHANGE-IN-ERROR.}
\label{fig:hw6s7ce}
\end{figure}
\begin{figure}
\vspace{3.5in}
\hskip.7in\special{bmp:c:/ee680/hw6s7u.bmp x=4.67in y=3.5in}
\caption{Fuzzy numbers of the linguistic variable CONTROL.}
\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. We used Simulink's the 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 to use the same controller to track step inputs with large amplitudes. A plot of the control surface is given in Figure~\ref{fig:hw6s71}. Next, a reference signal generator was constructed. The transfer function of the signal generator is
\[
\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}(6h(t))$, and $h(t)$ is the unit step function.
The closed-loop system was simulated using Simulink. Plots $Y$ and $r$ versus $X$are shown in Figure~\ref{fig:hw6s7xr}.
\begin{figure}
\vspace{3.5in}
\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)$.}
\label{fig:hw6s71}
\end{figure}
\begin{figure}
\vspace{3.5in}
\hskip.7in\special{bmp:c:/ee680/hw6s7xr.bmp x=4.67in y=3.5in}
\caption{Plots of $Y$ and $r$ versus $X$.}
\label{fig:hw6s7xr}
\end{figure}
\end{example}
\markex
\begin{example}\label{ex:drianetal}\rm
This example is based on Example~6.1, pages~266--272, found in Driankov, Hellendoorn, and Reinfrank~\cite{driankov93}. 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$. The 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 of the uncontrolled system is shown in Figure~\ref{fig:t4f7pho}.
\begin{figure}
\vspace{3.5in}
\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}
\vspace{3.5in}
\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.}
\label{fig:t4f7x12}
\end{figure}
The relevant membership functions shown in Figure~\ref{fig:xonefuz}, \ref{fig:xtwofuz}, \ref{fig:uallfuz}, and~\ref{fig:udetfuz}.
\begin{figure}
\vspace{3.5in}
\hskip1in\special{bmp:c:/ee680/xonefuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $x_1$.}
\label{fig:xonefuz}
\end{figure}
\begin{figure}
\vspace{3.5in}
\hskip1.25in\special{bmp:c:/ee680/xtwofuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $x_2$.}
\label{fig:xtwofuz}
\end{figure}
\begin{figure}
\vspace{3.5in}
\hskip1.25in\special{bmp:c:/ee680/uallfuz.bmp x=3.97in y=3.5in}
\caption{Membership functions of $u$.}
\label{fig:uallfuz}
\end{figure}
\begin{figure}
\vspace{3.5in}
\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]$.}
\label{fig:udetfuz}
\end{figure}
The following MATLAB function can be used used to generate all the relevant 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 use the rules matrix given in Table~\ref{tab:rulestefofa} to construct a nonlinear mapping $u=\Phi(x_1,x_2)$ and form a look-up table that implements the obtained mapping representing a fuzzy logic controller. The 2-D Look-Up Table block to implement the controller is then used. The look-up table size is $22 \times 22$. A plot of $u=\Phi(x_1,x_2)$ is shown in Figure~\ref{fig:t4f7cos}.
\begin{figure}
\vspace{3.5in}
\hskip1.25in\special{bmp:c:/ee680/t4f7cos.bmp x=3.97in y=3.5in}
\caption{A plot of $u=\Phi(x_1,x_2)$.}
\label{fig:t4f7cos}
\end{figure}
\begin{table}
\caption{The rules matrix.}
\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}
\vspace{4in}
\hskip.25in\special{bmp:c:/ee680/t4f7sid.bmp x=5.33in y=4in}
\caption{A SIMULINK diagram of the closed-loop system.}
\label{fig:t4f7sid}
\end{figure}
A phase-portrait of the closed-loop system is depicted in Figure~\ref{fig:t4f7phc}.
\begin{figure}
\vspace{3.5in}
\hskip1.25in\special{bmp:c:/ee680/t4f7phc.bmp x=3.97in y=3.5in}
\caption{A phase-plane portrait of the closed-loop system.}
\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}
\vspace{3.5in}
\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}
In this section, a Lyapunov based stabilizing control design method for uncertain nonlinear dynamic systems using fuzzy models is presented. The controller is constructed using a design model of the dynamic process to be controlled. The design model is obtained from the truth model using a 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, in terms of IF-THEN rules, of the process to be controlled. Combining the available mathematical description of the process with its linguistic description results in a fuzzy system model. Such an approach to modeling 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) or Takagi-Sugeno-Kang~(TSK) fuzzy model. The discrete-time version of this model was analyzed by Tanaka and Sugeno~\cite{tanaka92}, and Tanaka~\cite{tanaka95}. 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 if local description of the dynamic plant to be controlled 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, 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, given a pair $(\b x(t),\b u(t))$, the resulting fuzzy system model is inferred as the weighted average of the 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$,
\[
\alpha_i=\frac{w^i}{\sum_{i=1}^r w^i}.
\]
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]^T
\in [0,1]^r.
\end{equation}



We will combine the truth model of the process with its linguistic description to form a fuzzy design model. The class of the truth models that we consider is given by
\begin{equation}
\dot{\b x}=\b f(\b x)+\b G(\b x)(\b u+\b h(t,\b x)),
\label{eq:truth_mo}
\end{equation}
where $\b f:\mb{\Bb R}^n \to \mb{\Bb R}^n$, $\b G:\mb{\Bb R}^n \to \mb{\Bb R}^{n \times m}$, and the vector-valued function $\b h(t,\b x)$ represents modeling uncertainties. The only information about uncertainties available to the designer are their bounds. Specifically, we assume that the uncertainty modeling function $\b h$ is bounded by a non-negative function $\eta=\eta(t,\b x)$, that is,
\begin{equation}
\|\b h(t, \b x)\|\le \eta(t,\b x),
\label{eq:fun_h}
\end{equation}
where $\|\cdot\|$ denotes the vector $p$-norm. A detailed discussion of condition~(\ref{eq:fun_h}) is included in Section~\ref{subsection:controller}. Observe that $\b h$ affects the system dynamics via the input matrix $\b B(\b \alpha)$ in a similar fashion as the control input does. For this reason, we say that the uncertainty $\b h$ satisfies the matching condition.



The resulting fuzzy design model has the form
\begin{equation}
\dot{\b x}=\b A(\b \alpha)\b x+\b B(\b \alpha)\left(\b u+\b h(t,\b x)\right).
\label{eq:uncertain}
\end{equation}

Our goal, in this section, is to give methods for constructing stabilizing state-feedback controllers for nonlinear systems modeled by(~\ref{eq:truth_mo}). We construct stabilizing controller using fuzzy design model of the form~(\ref{eq:uncertain}) and a Lyapunov based approach. The fuzzy design model is obtained using the truth model and available linguistic description of the process. The controller performance is tested on the simulation model.


\subsection{Constructing the Design Model}
\label{subsection:design}
In the 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 the 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. It is clear from the above description that an operating point satisfying the above requirements must be an asymptotically stable equilibrium state of the closed-loop system. When designing a controller, we use a design model constructed from the truth model. We combine the mathematical description of the process in terms of the truth model and a linguistic description of the process to obtain a fuzzy design model. The fuzzy design model is of the form of the TSK fuzzy model. The essential components of the TSK model are linear local models. These linear local models describe the plant dynamical behavior at its different operating points. We now show that using common linearization approach to constructing 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 model~(\ref{eq:linearinu}) as
\begin{equation}
\dot{\b x}=\b F(\b x,\b u).
\label{eq:general}
\end{equation}
Expanding $\b F$ by means of 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_0,\b u_0)=\b f(\b x_0)+\b G(\b x_0)\b u_0.
\label{eq:leftover}
\end{equation}
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}+\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^T_0,\b u^T_0)^T\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 $(\b x_0,\b u_0)$ is obtained by neglecting higher order terms and observing that for 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 $(\b x=\b 0,\b u=\b 0)$ is 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. 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 by 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 of a nonlinear model about an operating non-equilibrium point is an affine, rather than a linear model. Even if the operating point is an equilibrium point, Taylor series linearization, in general, will not yield 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 model~(\ref{eq:affine}) is not a linear model, but rather an 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}
We 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 model~(\ref{eq:subsystem}) about $x_1=\pi/4$. For $x_1=\pi/4$ to be a component of an 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]^T.
\]
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 $-\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 a local model that is linear in $\b x$ and $\b u$. We note that Taylor's linearization will yield a linear system in $\b x$ and $\b u$ if the equilibrium point $(\b x_0^T,\b u_0^T)=(\b 0^T,\b 0^T)$.


We now describe our method for constructing local models using the truth model of the system to be controlled. We assume that the truth model has the form given by~(\ref{eq:linearinu}). Suppose that we are given an 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\quad\mb{for any}\quad \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 any}\quad \b u.
\label{eq:ablininu}
\end{equation}
Since $\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^T$ 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^T\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^T\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 yields
\begin{equation}
f_i(\b x_0)+\nabla^T f_i(\b x_0)(\b x-\b x_0) \approx \b a_i^T\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) of $f_i$ at $\b x$.
Now, using~(\ref{eq:condoneq}), we represent~(\ref{eq:taylorapprox}) as
\begin{equation}
\nabla^T f_i(\b x_0)(\b x-\b x_0) \approx \b a_i^T\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^T\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}{\b a_i}\\
\mb{subject to  } \b a_i^T\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 problem. This means that the 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]{chong96}. 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^T\b x_0-f_i(\b x_0) \right) = \b 0,\label{eq:firstcond}\\
&{}&\b a_i^T\b x_0 = f_i(\b x_0),
\end{eqnarray}
where $\lambda$ is the Lagrange multiplier and the subscript $\b a_i$ in $\nabla_{\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^T\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^T$ and substituting~(\ref{eq:firsteva}) into the resulting equation yields
\begin{equation}
\lambda=\frac{\b x_0^T\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^T\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}
\begin{example}\rm
We illustrate the above procedure for constructing linear local models on the nonlinear model~(\ref{eq:subsystem}) that we analyzed in Example~\ref{ex:secondord}. This 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; one describing the plant operation about $x_1=0$ and the other 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 matrix $\b B$ can be obtained from~(\ref{eq:subsystem}) using~(\ref{eq:condonu}). We have
\[
\b B=\left[\begin{array}{c}
0\\
-\frac{a\beta}{4l/3-mla\beta^2}
\end{array}\right].
\]
We next 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]^T.
\]
The operating state is $\b x_0=\left[\begin{array}{cc}
88^{\circ}\pi/180^{\circ} & 0
\end{array}\right]^T$. We compute $\b a_1^T$, the first row of $\b A$, using~(\ref{eq:optimalai}) to get
\begin{eqnarray*}
\b a_1^T &=& \nabla^T f_1(\b x_0)+\left[\begin{array}{cc}
0 & 0
\end{array}\right]\\
&=& \left[\begin{array}{cc}
0 & 1
\end{array}\right].
\end{eqnarray*}
We again use~(\ref{eq:optimalai}) to compute $\b a_2^T$, the second row of the matrix $\b A$, of the second local model. We get
\begin{eqnarray*}
\b a_2^T &=& \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].
\end{eqnarray*}
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
\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$. We next discuss the stabilizability problem of forced fuzzy models using 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 fuzzy 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^T\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 $\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 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
\[
\sum_{k=1}^s \b A_{i_k},
\]
where $i_k \in \{1,2,\ldots,r \}$ and $s=2,3,\ldots,r$ are asymptotically stable. 
\label{thm:analog}
\end{thm}
{\bf Proof}\quad Suppose conditions~(\ref{eq:lyap_unforced}) hold. Let
\begin{equation}
\b A_{i_k}^T\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}^T > 0$ for $i_k\in \{1,2,\ldots,r\}$. Adding both sides of~(\ref{eq:lyap_sum}) yields
\begin{equation}
\left( \sum_{k=1}^s\b A_{i_k}^T\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^T>0$, and since $\b Q_{i_k}=\b Q_{i_k}^T > 0$ for $i_k=\{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 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^T\b P+\b P\b A_i<0$ for $i=1,2,\ldots,r$. The following example illustrates this fact.
\begin{example}\rm
Given the 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^T\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}).

We now present a sufficiency condition for asymptotic stabilizability in the large of fuzzy 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 F_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 F_j\right)\b x $}
\label{eq:closed_fuzzy}
\end{equation}
Suppose that the gain matrices, $\b F_i$, where chosen so that the matrices
\[
\b A_i-\b B_i\b F_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 F_j \right)+\left(\b A_j-\b B_j\b F_i \right)\quad \mb{for}\quad i<j\le r.
\]
We now 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.
\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 F_i \right)^T\b P+\b P\left(\b A_i-\b B_i\b F_i \right)<0,\quad i=1,2,\ldots,r
\label{eq:compforai}
\end{equation}
and
\begin{equation}
\b G_{ij}^T\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}) to be 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(t)\b P\b x(t)$ on the trajectories of~(\ref{eq:closed_fuzzy}) to get
\begin{eqnarray}
\frac{d}{dt}\left( \b x^T(t)\b P\b x(t) \right) &=& 2\b x^T\b P\dot{\b x}\nonumber\\
&=& 2\b x^T\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b F_j\right)\b x\right)\nonumber\\
&=& \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\b x^T\left(\left( \b A_i-\b B_i\b F_j\right)^T\b P+\b P\left( \b A_i-\b B_i\b F_j\right)\right)\b x\nonumber\\
&=& \sum_{r=1}^r\alpha_i^2 \b x^T\left( \left( \b A_i-\b B_i\b F_i\right)^T\b P+\b P\left( \b A_i-\b B_i\b F_i\right)\right)\b x\nonumber\\
&{}&\quad + \sum_{i=1}^r \sum_{j>i}^r \alpha_i \alpha_j\b x^T\left(\b G_{ij}^T\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^T\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 now 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 F_i \right)^T\b P+\b P\left(\b A_i-\b B_i\b F_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$. Since $\b Q_i=\b Q_i^T>0$, we have
\begin{equation}
\lambda_i>0,\quad i=1,2,\ldots,r.
\label{eq:positivelams}
\end{equation}
Now, let
\begin{equation}
\b G_{ij}^T\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}^T$, and hence the eigenvalues of $\b Q_{ij}$ are real. Let $\lambda_{ij}$ denote the minimum eigenvalue of $\b Q_{ij}$. We are now ready to state and prove the following theorem.
\begin{thm}
Suppose that each $(\b A_i-\b B_i\b F_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(t)\b P\b x(t).
\]
be the 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^T\b P\dot{\b x}\nonumber\\
&=& 2\b x^T\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b F_j\right)\b x\right)\nonumber\\
&=& \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\b x^T\left(\left( \b A_i-\b B_i\b F_j\right)^T\b P+\b P\left( \b A_i-\b B_i\b F_j\right)\right)\b x\nonumber\\
&=& -\sum_{i=1}^r\alpha_i^2\b x^T\b Q_i\b x-\sum_{i=1}^r\sum_{j>i}^r \alpha_i\alpha_j\b x^T\b Q_{ij}\b x.
\label{eq:timeder}
\end{eqnarray}
We now use that fact that for any symmetric matrix $\b M=\b M^T$, we have
\[
\lambda_{\min}(\b M)\|\b x\|^2 \le \b x^T\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^T\b \Lambda\b \alpha \right)\|\b x\|^2.
\label{eq:mfact}
\end{eqnarray}
The Lyapunov derivative is 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 control approach to the fuzzy control design for uncertain dynamic systems. Some of the Lyapunov based control strategies, using non-fuzzy controllers, for uncertain systems are nicely documented in Zinober~\cite{zinober90}. The method of constructing stabilizing controllers, 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 $\b P=\b P^T>0$ such that, for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^T\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 F_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 F_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 F_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 F_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 proposed by Hui and \.{Z}ak~\cite{hui93}. To describe this family we need the following notation. Let
\begin{equation}
\b \mu=\left[\begin{array}{cccc}
\mu_1&\mu_2&\ldots&\mu_m
\end{array}\right]^T=
\sum_{i=1}^r \alpha_i\b B_i^T\b P\b x.
\label{eq:boldmu}
\end{equation}
Let $\|\cdot\|_p$ denote the $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 inequality
\[
\left| \b v^T \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 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]^T, \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$. 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}
Given fuzzy system model~(\ref{eq:uncertain}). 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 closed-loop system 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. System~(\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 F_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^T\b P\b x,
\label{eq:lyap}
\end{equation}
is the Lyapunov function for the closed-loop system, where $\b P=\b P^T>0$ satisfies~(\ref{eq:compforai}) and~(\ref{eq:compforg}) or conditions of Theorem~\ref{thm:gijnots}. For this, we evaluate the Lyapunov derivative of $W$, that is, we evaluate $\frac{d}{dt}W$ on the trajectories of the closed-loop system, and show that the Lyapunov derivative of $W$ is negative definite. We have
\begin{eqnarray}
\frac{d}{dt}W &=& 2\b x^T\b P\left( \sum_{i=1}^r \sum_{j=1}^r \alpha_i \alpha_j\left( \b A_i-\b B_i\b F_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^T \nabla \|\b \mu\|_p+2\b \mu^T \b h\nonumber\\
&\le&-2\eta_q \|\b \mu\|_p + 2\left| \b \mu^T \b h\right|.
\label{eq:lyap_der}
\end{eqnarray}
Applying 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\\
&<& -2\eta_q \|\b \mu\|_p+2\|\b \mu\|_p\,\eta_q\nonumber\\
&<&0. 
\label{eq:lyap_holder}
\end{eqnarray}
By Lyapunov's theorem, the closed loop-system is asymptotically stable in the large.\\
\hspace*{5.5in}$\Box$

\begin{example}\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)$. Linear local models 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}
\]
and
\[
\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 membership functions of the form:
\begin{eqnarray*}
w_1(x_1) &=& \frac{1-1/\left(1+\exp(-14(x_1-\pi/8))\right)}{1+\exp(-14(x_1+\pi/8))}\\
w_2(x_1) &=& 1-w_1(x_1).
\end{eqnarray*}
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-\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$, because $w_1+w_2=1$ for all $t$, and the friction coefficient $\mu_c=0.005$. We then proceed to construct a stabilizing controller. We first construct
\[
u_1=-\left(\alpha_1 \b F_1+\alpha_2\b F_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 F_j\right)\b x
\label{eq:exsys}
\end{equation}
is asymptotically stable in the large. To better test our stabilization algorithm, we randomly chose the set of desired poles for $\left( \b A_1-\b B_1\b F_1\right)$ to be in the interval $[-4,-1]$, and we got
\[
\{-1.0970, -2.1263, -2.5553, -3.9090\}.
\]
The desired poles for $\left( \b A_2-\b B_2\b F_2\right)$ were also chosen in a random fashion to be in the interval $[-4,-1]$. In this case we got the set  
\[
\{-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 F_1=\left[\begin{array}{cccc}
-294.8766 & -73.1208 & -13.4726 & -27.3362
\end{array}\right],
\]
and
\[
\b F_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 F_2+\b A_2-\b B_2\b F_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 of system~(\ref{eq:exsys}) are satisfied. This completes the design of $u_1$.

We now construct $u_2$. We use~(\ref{eq:boldmu}) to construct
\[
\mu=\left(\alpha_1\b B_1^T\b P+\alpha_2 \b B_2^T \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 final form of stabilizing controller. This controller has the form
\begin{eqnarray}
u &=& u_1+u_2\nonumber\\
&=& -\left(\alpha_1 \b F_1+\alpha_2\b F_2 \right)\b x
-\eta_q\mb{sign}(\mu).
\label{eq:ourcon}
\end{eqnarray}
The above controller globally stabilizes the design model. In our simulations we connected the controller to the truth model. 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}
\vspace{3.5in}
\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}
\vspace{3.5in}
\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
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 of the process to be controlled. To account for modeling uncertainties, we propose to use a two-part controller. The first part stabilizes the nominal plant, that is, the plant model that does not include modeling uncertainties. The role of the second part of the controller is to reject modeling uncertainties. In both cases fuzzy state-feedback control strategies were used. In order to be able to apply the proposed controllers in real-life systems, further research is needed to account for limited authority of actuators, 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^T\b A\b x < \b x^T\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^T\left(\b A-\b B\right)\b x$ is negative definite.

We now prove the following matrix inequality lemma that is useful in the stability analysis of discrete fuzzy models.
\begin{lemma}
Let $\b A, \b B, \b P \in \mb{\Bb R}^{n \times n}$. If $\b P=\b P^T>0$ such that
\[
\b A^T\b P\b A-\b P<0\quad\mb{and}\quad \b B^T\b P\b B-\b P<0,
\]
then
\[
\b A^T\b P\b B+\b B^T\b P\b A-2\b P<0.
\]
\label{lemma:mil}
\end{lemma}
{\bf Proof}\quad We first represent $\b A^T\b P\b B+\b B^T\b P\b A-2\b P$ as
\begin{eqnarray*}
\b A^T\b P\b B+\b B^T\b P\b A-2\b P &=& -(\b A-\b B)^T\b P(\b A-\b B)+\b A^T\b P\b A+\b B^T\b P\b B - 2\b P\\
&=& -(\b A-\b B)^T\b P(\b A-\b B)+(\b A^T\b P\b A-\b P)\\
&{}&\quad+(\b B^T\b P\b B-\b P).
\end{eqnarray*}
The first term, $-(\b A-\b B)^T\b P(\b A-\b B)$, is non-positive definite because by assumption $\b P=\b P^T>0$, while the second and the third terms are negative definite by assumption. Hence,
\[
\b A^T\b P\b B+\b B^T\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 of fuzzy model~(\ref{eq:tsk}).
\begin{thm}
The equilibrium state, $\b x_e=\b 0$, of fuzzy model~(\ref{eq:tsk}) is globally asymptotically stable if there exists a positive definite matrix $\b P=\b P^T>0$ such that for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^T\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^T>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^T(k)\b P\b x(k).
\label{eq:lyapunovcand}
\end{equation}
To prove the theorem, it is enough to show that
\[
\Delta W(\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^T(k+1)\b P\b x(k+1)-\b x^T(k)\b P\b x(k)\nonumber\\
&=& \left( \sum_{i=1}^r w_i\b x^T\b A_i^T\right)\b P\left( \sum_{i=1}^r w_i\b A_i\b x\right)-\b x^T\b P\b x\nonumber\\
&=& \b x^T\left( \left( \sum_{i=1}^r w_i\b A_i^T\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^T\left(\left( \sum_{i=1}^r w_i\b A_i^T\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^T\left(\left( \sum_{i=1}^r w_i\b A_i^T\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^T \left(\sum_{i=1}^r \sum_{j=1}^r w_i w_j \left(\b A_i^T\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^T\left( \b A_i^T\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^T\left( \b A_i^T\b P\b A_j - \b P\right)\b x\nonumber\\
&=& \sum_{i=1}^r w_i^2\b x^T\left( \b A_i^T\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^T \left( \b A_i^T\b P\b A_j + \b A_j^T \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 since $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^T\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$ 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}).
\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^T>0$ such that for $i=1,2,\ldots,r$,
\begin{equation}
\b A_i^T\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 Aj$ 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^T\b P\b A_j-\b P < 0.
\label{eq:startp}
\end{equation}
Premultiplying the above by $\left( \b A_j^T\right)^{-1}$ and postmultiplying by $\b A_j^{-1}$ yields
\begin{equation}
\b P - \left( \b A_j^T\right)^{-1}\b P\b A_j^{-1} <0.
\label{eq:ajinv}
\end{equation}
Hence,
\begin{equation}
\b P<\left( \b A_j^T\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^T\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^T\b P\b A_i < \left( \b A_j^T\right)^{-1}\b P\b A_j^{-1}.
\label{eq:combops}
\end{equation}
Premultiplying both sides of~(\ref{eq:combops}) by $\b A_j^T$ 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)^T\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. 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^T\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 it 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^T\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 Estimator}
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. In many situations a mathematical model of the system is not available or is incomplete. However, there may be experts who can provide a linguistic description, in terms of IF-THEN rules, of the system. Combining the available mathematical description of the system 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. One can construct a TSK model if local description of the dynamical system to be controlled is available in terms of 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, 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(x_j)$ be the membership function of the fuzzy set $A_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. Then, given a pair $(\b x(t),\b u(t))$, the resulting fuzzy system model is inferred as the weighted average of the 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_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}
Note that
\begin{equation}
\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]^T
\in [0,1]^r.
\end{equation}
A fuzzy state estimator for the system modeled by~(\ref{eq:fuzzy_model}) and~(\ref{eq:outofpla}) can be represented as
\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
\[
\b L(\b{\alpha})=\sum_{i=1}^r \alpha_i\b L_i.
\]
The state estimator~(\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 state estimator~(\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.
\]
We use the state estimate in the controller implementation to get
\begin{equation}
\b u=-\sum_{j=1}^r \b K_j\tilde{\b x}+\b v.
\label{eq:statesincont}
\end{equation}
Substituting the above in to 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 estimator 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-estimator 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 will now present the Comparison Method for linear systems. This method will then be used in investigating the stability of the closed-loop system consisting of a fuzzy model of a plant and a fuzzy controller-estimator compensator. The closed-loop system is modeled by~(\ref{eq:staeclo}) and~(\ref{eq:mafooffuzcls}). Let $\b A$ be a constant $n\times n$ matrix and $e^{\b A t}$ denote the matrix exponential. We will now give a necessary and sufficient condition for the matrix exponential to have all its elements 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. Since
\[
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$, whch establishes the necessity condition

To prove the sufficiency, 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^{\b A+c_1\b I_n}$ are non-negative. Also, the elements of $e^{-c_1\b I_n t}$ are non-negative since exponentials are always non-negative. The matrices $\b A+c_1\b I_n$ and $-c_1\b I_n$ commute. Hence, we can write
\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 can prove the following lemma due to Bellman~\cite{bellman62}. We use the following notation: $\b x\le \b y$ implies 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
\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}{dt}=\b A\b x-\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}) can be represented as
\begin{eqnarray}
\b x&=&e^{\b A t}\b c - \int_{0}^t e^{\b A(t-s)}\b f(s)ds\nonumber \\
&=& \b y - \int_{0}^t e^{\b A(t-s)}\b f(s)ds.
\label{eq:alsoofperde}
\end{eqnarray}
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$. Hence,
\[
\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 as the {\em 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 that we will use has the form,
\begin{equation}
\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}}-\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}}
\end{array}\right].
\label{eq:fuzclsinncoo}
\end{eqnarray}
Let $\b e=\tilde{\b x}-\b x$. We will 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 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 first evaluate the time derivative of $V$ on the trajectories of the system~(\ref{eq:unfcllosy}). We obtain
\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\|.
\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. We use this fact and~(\ref{eq:cononvanvt}) to represent~(\ref{eq:adandsubtoggeo}) 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, we represent~(\ref{eq:evaltdovoncecc}) 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}
We now evaluate the time derivative of $\tilde{V}(\b e)$ on the trajectories of~(\ref{eq:unfcllosy}) to obtain
\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}
We combine~(\ref{eq:fifoofvdo}) and~(\ref{eq:tderoftilv}) into a single matrix differential inequality of the form,
\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, since the 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{for}\quad t\to 0.
\]
Since $V$ and $\tilde{V}$ are both positve definite decrescent and radially ubounded 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{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 the reader is referred to Klir, St.Clair and Yuan~\cite{klir97}, while for an introduction to fuzzy control, see Driankov, Hellendoorn, and Reinfrank~\cite{driankov93} and Palm, Driankov and Hellendoorn~\cite{palm97}. Kosko~\cite{kosko97} is the first book on fuzzy engineering. Graduate texts on fuzzy systems and control are Pedrycz~\cite{pedrycz93} and Wang~\cite{lxwang97}. Paradigms and practice of fuzzy modeling 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 fusing fuzzy logic and neural networks.

The first chapter of Kosko's book~\cite{kosko97} contains a thrilling account of the beginnings of fuzzy logic and fuzzy engineering. According to Kosko~\cite[page~5]{kosko97}, ``Fuzziness began as vagueness in the late nineteenth century.'' A concept is vague in case 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. In the 1920s, Polish mathematician Jan {\L}ukasiewicz invented the multivalued logic. 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 1965 Zadeh~\cite{zadeh65} used the term {\em fuzzy} to mean {\em vague}. ``Zadeh's 1965 paper applied Lukasiewicz'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.''~\cite[page~8]{kosko97} The beginning of fuzzy engineering, on the other hand, can be marked by the work of Mamdani and Assilian~\cite{mamdani75} who first used fuzzy calculus to construct a fuzzy logic controller.

