\chapter{Stability Analysis of Fuzzy Models}
The first step in the controller design procedure is the construction of a ``truth model'' of the dynamics of the process to be controlled. The truth model is a simulation model that includes all the relevant characteristics of the process. The truth model is too complicated for use in the controller design. Thus, we need to develop a simplified model that can be used to design a controller. Such a simplified model is labeled by Friedland~\cite{friedland96} as the design model. The design model should capture the essential feature of the process. In many situations there may be human experts that can provide a linguistic description, in terms of IF-THEN rules, of the process. 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 } A_1^i\mb{ AND} \cdots\mb{ AND }x_n(t)\mb{ is }A_n^i,
\]
\[
\mb{ THEN }\dot{\b x}(t)=\b A_i\b x(t)+\b B_i\b u(t),
\]
where $A_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 $A_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_model}
\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: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}


\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.
\]
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 V(\b x(k)) < 0.
\]
We have
\begin{eqnarray}
\Delta V(\b x(k)) &=& V(\b x(k+1))-V(\b x(k))\nonumber\\
&=& \b x^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<j}^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$ inequlities~(\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}

\section{Exercises}
\begin{exercise}\rm
Show
\end{exercise}