\input{ccs_gyak_defs}
\author{Lecture 5}

\begin{document}
\selectlanguage{english}
\maketitle

\section{Stability}

\subsection{Input-output stability}

\begin{center}
\tikzstyle{block} = [draw, rectangle,
    minimum height=3em, minimum width=6em]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]

\begin{tikzpicture}[auto, node distance=2.5cm,>=latex']
    % We start by placing the blocks
    \node [input, name=input] {};
    \node [block, right of=input, node distance=2.5cm] (system1) {$h(t)$};
    \node [output, right of=system1] (output) {};

    % Once the nodes are placed, connecting them is easy.
    \draw [draw,->] (input) -- node {$u(t)$} (system1);
    \draw [->] (system1) -- node [name=y] {$y(t)$}(output);

\end{tikzpicture}
\end{center}
BIBO-stability: Bounded input $\rightarrow$ bounded output.
$$|u(t)| \leq M_1 < \infty ~ \forall t \Rightarrow \exists M_2: |y(t)| \leq M_2 < \infty ~ \forall t$$

\begin{cthmw}*{}\label{}
A SISO LTI system is BISO stable iff
$$\int_{0}^{\infty} |h(t)| dt \leq M < \infty $$
where $h(t)$ is the impulse response of the system and $M\in\mathbb{R}^{+}$.
\end{cthmw}


\subsection{Equilibrium points}
Given the following autonomous system
\begin{eqnarray}
\dot{x} = f(x), ~~~~~ x \in \mathbb{R}^{n} \text{ (state vector) }, ~~~~ f : \mathbb{R}^{n} \to \mathbb{R}^{n} \text{ (state transition function)}
\end{eqnarray}
where $x\in \mathbb{R}^n$ and $f: \mathbb{R}^n\rightarrow \mathbb{R}^n$ is a vector field.
This system has an equilibrium point in state $x^* \in \mathbb{R}^{n}$ if the values of the state variables in $x^*$ do not change, i.e. their derivative are zero.
In other words, $x^* \in \mathbb{R}^{n}$ is an equilibrium point if $f(x^*) = 0$.
In order to find all equilibrium point, we need to solve the (possibly nonlinear) system of equations:
\begin{eqnarray} \label{eq:equilibrium_egyenlet}
f(x) = 0
\end{eqnarray}

\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{fig/stable_unstable.png}
\caption{This system has two equilibrium points. One of it is stable, the other one is unstable.}
\label{fig:stab_unstab}
\end{figure}
An autonomous system $\dot x = f(x)$ may have several equilibrium points, depending on the number of solution of equation \eqref{eq:equilibrium_egyenlet}.
An important property of an equilibrium point is its stability, namely how the system reacts when we move the state of the system from the equilibrium equilibrium point to a near point in the state space.
Does it converge to the equilibrium point again, or goes away?
Consider the hill-valley problem illustrated in Figure \eqref{fig:stab_unstab}.
It is obvious that the lower equilibrium point (in the valley) is stable, since if we moves the ball away a bit, it returns to the same equilibrium point.
However, the upper equilibrium point is unstable, because if we hit the ball, it will fall down.

We aim to find a mathematical apparatus, which can point out whether an equilibrium point is stable or unstable.
This apparatus will be the theory of Lyapunov stability.

\subsection{Lyapunov stability}
The Lyapunov theory gives the sufficient conditions for stability of an equilibrium point.
Informally, the Lyapunov stability means the following: ``If I start the system enough close to the equilibrium point, the system will remain quite closed to it.''

\begin{cdefinitionw}*{Lyapunov stability}\label{}
    Given the autonomous system $\dot{x}=f(x)$, and its equilibrium point $x^* \in \mathbb{R}^{n}$, i.e. $f(x^{*})=0$.
    We say that $x^*$ is \Emph{stable in the sense of Lyapunov}, if for all $\varepsilon > 0$ there exists $\delta > 0$ such that
    \begin{align}
        \begin{aligned}
            \text{if} ~~ \norm{x^{*}(0)-x(0)} < \delta ~~\text{ than }~~ \norm{x^{*}(t)-x(t)} < \varepsilon ~~ \text{ for all } t > 0
        \end{aligned}
    \end{align}

    \begin{minipage}{0.4\textwidth}
    	\includegraphics[width=\textwidth]{fig/ljap_stab.png}
    \end{minipage}
    \hfill
    \begin{minipage}{0.59\textwidth}
        \refstepcounter{figure} Figure \thefigure.
        If the equilibrium point $x^* = x_e$ is stable in the sense of Lyapunov, than for all possible positive $\varepsilon$ we can find a positive value $\delta$ such that if we start the system within a sphere of radius $\delta$ of the equilibrium point, the trajectory will not move further then $\varepsilon$.

        \color{blue}
        Ha rendszer Ljapunov értelemben stabil, akkor minden $\varepsilon$-hoz tudok, találni egy olyan $\delta$ értéket, amire a rendszer trajektóriája $\varepsilon$ határon belül marad, ha a rendszer kezdeti állapota az egyensúlyi pont $\delta$ környezetén belül található.
	   \label{fig:obs}

    \end{minipage}
\end{cdefinitionw}

Considering this definition, we can conclude that in the case of the upper equilibrium point of the hill-valley example (Figure \eqref{fig:stab_unstab}) there exist a $\varepsilon > 0$
such that the trajectory of the ball will leave that interval for every little $\delta$ perturbation of the equilibrium point (i.e. the ball will fall down).

{
\color{blue}
Ha fenti definíció birtokában nézzük meg a \ref{fig:stab_unstab}. ábrát, akkor láthatjuk, hogy a domb tetjén lévő labdához nem tudunk bármilyen $\varepsilon$-hoz, $\delta$-t találni, hisz már a legkisebb $\delta$ elmozdulásra, a labda legurul a dombról és átlépi a tetszőleges választott $\varepsilon$ értéket.
}

\newpage
\subsection{Asymptotic stability}
\begin{cdefinitionw}*{}\label{}
If the state vector $x(t)$ of the system not only approaches the equilibrium point $x^*$ but also tends to it i.e.
\begin{align}
    \begin{aligned}
        \lim_{t \to \infty} x(t) = x^*
    \end{aligned}
\end{align}
than we say that $x^*$ is \Emph{asymptotically stable}.

We say that the system is \Emph{globally asymptotically stable if for all $x_0 \in \mathbb{R}^{n}$ the trajectory of the system will tend to $x^*$}

\begin{minipage}{0.4\textwidth}
    \includegraphics[width=\textwidth]{fig/aszim_stab.png}
\end{minipage}
\begin{minipage}{0.59\textwidth}
    \refstepcounter{figure} Figure \thefigure.
    If the system is asymptotically stable that the trajectory of the system will tend do the equilibrium point.

    \color{blue}
	Ha a rendszer aszimptotikusan stabil, akkor nem csak $\varepsilon$ határon belül marad a trajektóriája, de ez a trajektória vissza is tér az egyensúlyi pontba.
    \end{minipage}
\end{cdefinitionw}

\subsubsection{Stability of an LTI system}

\begin{cthmw}*{}\label{}
    An LTI system $(A,B,C)$ is asymptotically stable if and only if the real part of the eigenvalues of matrix $A$ are strictly negative.
    $\Re\qty(\lambda_i(A)) < 0$.
\end{cthmw}

{
\color{blue}
Megj: Ez pontosan azt jelenti, hogy sajátvektorok bázisában felírt $A$ mátrixhoz tartozó $e^{At}$ mátrix minden elemében a kitevő negatív. Azaz minden exponencális értéke nullához tart.
}

\subsection{Lyapunov's direct method}
\begin{cthmw}*{}\label{}
Consider a system $\dot x(t) = f(x(t))$ with the equilibrium point $x^*$, namely $f(x^*) = 0$.
Let $V(x): \mathbb{R}^n \rightarrow \mathbb{R}$ be a \emph{scalar valued differentiable} function of the state vector $x \in \mathbb{R}^{n}$.

\bigskip
If $\TODO{$V(x) > 0$} \text{ for all } x\neq x^*, ~ V(x^*)=0$,
and $\dot V(x) := \qty[\pdv{V(x)}{t}]_{\dot x = f(x)} = \TODO{$\dotprod{\mathrm{grad}\, V, f(x)} \leq 0$}$ \\
than $x^*$ is \Emph{stable in the sense of Lyapunov}.

\bigskip
If $\TODO{$V(x) > 0$} \text{ for all } x\neq x^*, ~ V(x^*)=0$,
and $\dot V(x) := \qty[\pdv{V(x)}{t}]_{\dot x = f(x)} = \TODO{$\dotprod{\mathrm{grad}\, V, f(x)} < 0$}$ \\
than $x^*$ is \Emph{asymptotically stable}.

\end{cthmw}
%\textbf{Tétel:} Ha $\dot{x}=f(x)$ és $f(x^*)=0$-hoz létezik $V(x)$ Ljapunoy függvény, akkor $x^*$ asszimptotikusan stabil.


\pagebreak
\subsection{Examples}
\begin{cexamplew}{}\label{}%
    Given the following LTI system
    $   \dot{x}=\begin{psmallmatrix}
    0 & 1 \\
    -2 & 1
    \end{psmallmatrix} x$,
    with $x^* = \begin{psmallmatrix} 0 \\ 0 \end{psmallmatrix}$ being an equilibrium point.
    Is $V(x)=x_1^2+2x_2^2$ an appropriate Lyapunov function?

    Solution:
    $$V(x)>0 \quad\checkmark$$
    $$V(x^*) = 0 \quad\checkmark$$
    $$\dot V(x) := \qty[\pdv{V(x)}{t}]_{\dot x = f(x)} = \dotprod{\mathrm{grad}\, V, f(x)} = $$
    $$\begin{pmatrix}
    2x_1 & 4x_2
    \end{pmatrix}
    \cdot
    \begin{pmatrix}
    x_2 \\ -2x_1+x_2
    \end{pmatrix}
    =
    2x_1 x_2 -8 x_1 x_2 + 4x_2^2=4x_2^2-6x_1x_2 \not< 0 \text{ for all } x \not= x^*$$
    Let $x_1=0$ and $x_2=1$. Since $4 \cdot 1 - 6 \cdot 0 \cdot 1=4$, which is grater than 0, therefore, $V(x)$ is not an appropriate Lyapunov function.
    \\
    But this does not mean that the $x^*$ is NOT stable.
    Since this is an LTI system, we have other possibilities to analyse its stability (e.g. the eigenvalues of matrix $A$):
    $$\lambda I -A =
    \begin{pmatrix}
    \lambda & -1 \\
    2 & \lambda-1
    \end{pmatrix}$$
    $$
    \det(\lambda I -A )=\lambda(\lambda-1)+2=\lambda^2-\lambda +2
    $$
    $$\frac{1+\sqrt{1-8}}{2} \rightarrow 0.5+i\frac{\sqrt{7}}2$$
    $$\frac{1-\sqrt{1-8}}{2} \rightarrow 0.5-i\frac{\sqrt{7}}2$$

    Since the real part of the eigenvalues are positive, the equilibrium point is unstable.
    \smallskip

    \color{blue}
    Mivel mindkét esetben a gyök  valós része nagyobb mint nulla, ezért nem teljesül az a feltétel, hogy minden sajátértéke valós része negatív, ebből következően ez a rendszer nem stabil. Tehát nem csak hogy a megadott függvény nem volt Ljapunov függvény, hanem a rendszerhez nem is lehet ilyet megadni.
\end{cexamplew}

\begin{example}{}
    Given a system with its transfer function $H(s)=\frac{2}{(s+3)(s+2)}$. Is it stable? \\
    Solution: Stable, since the real parts of its poles $\lambda_1=-3$ and $\lambda_2 = -2$ are negative.
\end{example}


\begin{example}{}
    Determine $c$ such that the system $\dot x = A x$ is stable, $A=\begin{pmatrix}
    1&c\\
    -2&-3
    \end{pmatrix}$. \\
    Solution.
    $$\det(\lambda I - A)=
    \begin{vmatrix}
    \lambda - 1 & -c\\
    2&\lambda+3
    \end{vmatrix}=(\lambda-1)(\lambda+3)+2c$$
    $$\lambda^2+2\lambda-3+2c=0$$
    $$\lambda_{1,2}=\frac{-2+-\sqrt{4-4(-3+2c)}}{2}$$

    If $\sqrt{4-4(2c-3)} < 2$ both eigenvalues will have a negative real part.
    $$-(2c-3)<0$$
    $$-2c < 3$$
    $$c > \frac{3}{2}$$
\end{example}

\begin{example}{}
    Given the following system:
    $$
    \dot{x}=\begin{pmatrix}
    3 & 0 & 0 & 0 \\
    0 & -1 & 0 & 0 \\
    0 & 0 & -10 & 0 \\
    0 & 0 & 0 & -3
    \end{pmatrix}
    x +
    \begin{pmatrix}
    0 \\
    1 \\
    1 \\
    0
    \end{pmatrix}u
    $$
    $$
    y=\begin{pmatrix}
    1 & 0 & 1 & 1
    \end{pmatrix}
    x$$
    \begin{enumerate}
        \item Is it asymptotically stable? \\
        Obviously no, since its first eigenvalue is positive.
        \item Is it BIBO stable? \\
        We shall check whether the integral of the impulse response is finite or not.
        $$H(s)=\frac{1}{s+10}$$
        $$h(t)=e^{-10t}$$
        $$\int_{0}^{\infty} e^{-10t} dt = \left[ \frac{e^{-10t}}{-10} \right]_0^\infty=\frac{1}{10}$$
        Therefore, the system is BIBO stable.
        It is important to note, that BIBO stability does not imply asymptotic stability. But asymptotic stability implies BIBO stability.
        \smallskip

        \color{blue}
        Tehát a rendszer BIBO stabil. Ez egy fontos példa az előadáson bizonyított tételre, hogy az aszimptotikus stabilitásból következik a BIBO stabilitás, de ez visszafelé nem feltétlenül igaz.
    \end{enumerate}
\end{example}

\subsubsection{Total energy as a Lyapunov function in case of a mechanical system}
We are searching for an appropriate Lyapunov function for the mass-spring-damper system. Its dynamics is given by the following equation:
\color{blue}

Keressünk Ljapunov függvényt az alábbi rendszerhez! Adott a korábban bevezetett tömeg-rugó-csillapítás rendszer. Az erők egyensúlyát a következő differenciálegyenlet adja meg:
\color{black}
$$
m\ddot{y}+D y+C\dot{y}=F
$$
where $m$ is the mass of the body, $D$ is spring coefficient, $C$ is the damping factor.
Let $x_1 := y$ be the position of the body, and let $x_2 := \dot y = \dot x_1$ be the velocity of the body, which together gives the state vector.
% \color{blue}
% Ahol, $m$ a test tömege, a $D$ a rugó állandó, $C$ csillapítási állandó.
% Legyen $x_1=x$ és $x_2=\dot{x}$, tehát a mozgó test kitérése, valamint sebessége legyen az állapotvektor  \\
% \color{black}
\begin{align}
    \begin{aligned}
        &\dot{x_1}=x_2 \\
        &\dot{x_2}=-\frac{D}{m} x_1-\frac{C}{m} x_2 + \frac{u}{m} \\
    \end{aligned}~~~~~~\implies~~~~~
    A=\begin{pmatrix}
    0 & 1 \\
    -\frac{D}{m} & -\frac{C}{m}
    \end{pmatrix}
    \quad
    B=\begin{pmatrix}
    0 \\
    \frac{1}{m}
    \end{pmatrix}
    \quad
    C=\begin{pmatrix}
    1 & 0
    \end{pmatrix}
\end{align}
The output of the system (the measured quantity) will be the position of the body $y = x_1$.
We use the following parameter configuration: $m=1kg$, $D=10\frac{N}{m}$, $C=0.2\frac{Ns}{m}$, $u=0N$
$$A=\begin{pmatrix}
0 & 1 \\
-10 & 0.2
\end{pmatrix}
\quad
B=\begin{pmatrix}
0 \\
1
\end{pmatrix}
\quad
C=\begin{pmatrix}
1 & 0
\end{pmatrix}
$$
In case of mechanical systems it is a good strategy if we chose the total energy as a Lyapunov function.
The total energy is the sum of the followings:
% Mechanikai rendszereknél jó stratégia, ha a rendszer összenergiáját választjuk Ljapunov függvény-jelöltnek.
% Egyrészt van egy mozgási energiája a rendszernek, amelyet a tömege és sebessége határoz meg:
\begin{align}
    \begin{aligned}
        &E_m=\frac{1}{2}mv^2 \text{ (kinetic energy)} \\
        &E_h=\frac{1}{2}Dx^2 \text{ (potential energy due to the extension of spring)} \\
    \end{aligned}
\end{align}
Then
\begin{eqnarray}
V(x)=\frac{1}{2}Dx_1^2 + \frac{1}{2}mx_2^2 > 0 ~~ \forall x \not= 0 \qquad \checkmark
\end{eqnarray}
Its time derivative regarding the system's dynamics is:
\begin{align}
    \mathrm{grad} V &= \begin{pmatrix}Dx_1 & mx_2 \end{pmatrix}
\shortintertext{therefore}
    \dot V(x) = \dotprod{\mathrm{grad} V, A x}
    &= \begin{pmatrix}Dx_1 & mx_2 \end{pmatrix}
    \begin{pmatrix}x_2 \\ -\frac{D}{m}x_1-\frac{C}{m} x_2 \end{pmatrix}  \\
    &= Dx_1x_2 +mx_2(-\frac{D}{m}x_1-\frac{C}{m} x_2) \\
    &= -Cx_2^2 = -0.4x_2^2 < 0 ~~\forall x \neq 0 \qquad \checkmark
\end{align}
The time derivative of the Lyapunov function is negative, for all $x \neq 0$ state vector. This physically means that the system loses its energy during its operation, and finally it will stop at the equilibrium point $x^* = 0$.
The decrease in the system's total energy is owing to the damper \mbox{(with damping coefficient $C$)}.

\color{blue}
A derivált értéke minden $x_2$ érték esetén negatív lesz. Fizikailag ez azt jelenti, hogy a rendszer kezdeti energiáját elveszti a csillapításon keresztül, és végül megáll.
\color{black}

\subsubsection{Total energy as a Lyapunov function in case of an electronic system}
We consider the well-known LRC circuit (see the previous lecture notes). Its state space model is the following:
\begin{eqnarray*}
	\begin{pmatrix}
		\dot{i} \\
		\dot{u}_C
	\end{pmatrix}
	&=&
	\begin{pmatrix}
		-\frac{R}{L} & -\frac{1}{L} \\
		\frac{1}{C} & 0
	\end{pmatrix}
	\cdot
	\begin{pmatrix}
		i \\
		u_C
	\end{pmatrix}
	+
	\begin{pmatrix}
		\frac{1}{L} \\
		0
	\end{pmatrix}
	u_{be}
\end{eqnarray*}
In this physical system there are two energy conserving elements: the capacitor $C$ and the inductance $L$:.

\color{blue}
A rendszerben két energiatároló elem található, az egyik a kondenzátor, a másik tekercs.
\color{black}

Their energy is given by:
\begin{align}
&E_C = \frac{1}{2}Cu^2 \\
&E_L = \frac{1}{2}Li^2
\end{align}
Therefore, let the Lyapunov function be the following:
\begin{align}
    V(x) &= E_C + E_L > 0 ~~~ \forall x \neq 0 ~~~~~~~~~ \checkmark
\shortintertext{its derivative}
    \dot V(x) &=
	\begin{pmatrix}
	Lx_1 & Cx_2
	\end{pmatrix}
	\begin{pmatrix}
	\frac{R}{L}x_1 -\frac{1}{L}x_2 \\
	\frac{1}{C}x_2
	\end{pmatrix} = -Rx_1^2 < 0 ~~~ \forall x \neq 0 ~~~~~~~~~ \checkmark
\end{align}
Since the Lyapunov function is negative for all nonzero state vectors, the system is asymptotically stable.
Note that, if there is no resistance ($R$), than the total energy of the LRC circuit is constant during its operation, hence shall we obtain a harmonically oscillating system.

\color{blue}
Mivel a derivált mindig negatív, ezért ez egy jó Ljapunov függvény. Az előző példával analóg módon itt is az egyetlen energiaveszteség az ellenálláson keletkezik, és hő formájában távozik a rendszerből. Tehát ha nincs ellenállás a rendszerben, akkor csillapítatlan rezgést végez a rendszer.
\color{black}

\subsection{Lyapunov function in case of an LTI system}
If there exist matrix $P > 0 $ and matrix $Q > 0$, such that $PA+A^TP=-Q$, than $V(x) = x^T P x = \dotprod{Px,x}$ is an appropriate Lyapunov function, thus the system is asymptotically stable.
Matrix $P$ can be constructed as follows:
\begin{eqnarray*}
P = \int_0^\infty e^{A^Tt}Qe^{At}dt
\end{eqnarray*}
However, in case of LTI systems, the eigenvalues of matrix $A$ gives a full knowledge about the system's stability.

\color{blue}
Habár lineáris rendszereknél az $A$ mátrix sajátértékei valós részének negativitása garantálja a stabilitást, azonban lehet olyan rendszerméret, ahol a sajátértékek kiszámításánál "olcsóbb", a fenti mátrix-egyenlőtlenség megoldása.
\color{black}

\begin{example}{}
$$
A=\begin{pmatrix}
  -2 & 0 \\
  0 & -1
  \end{pmatrix}
\quad
B = \begin{pmatrix}
     1 \\
     1
    \end{pmatrix}
\quad
C = \begin{pmatrix}
     0 & 1
    \end{pmatrix}
\quad
   u(t) = 0
$$
\begin{enumerate}
  \item Construct a matrix $P$ such that $V(x) = x^T P x$ is an appropriate Lyapunov function, i.e. the followings are satisfied:
    \begin{eqnarray}
    Q=Q^T \quad Q>0\\
    P=P^T \quad P>0 \\
    A^TP+PA=-Q.
    \end{eqnarray}
Solution:
    \begin{eqnarray*}
    \quad P = \int_0^\infty e^{A^Tt}Qe^{At} dt. \\
    \end{eqnarray*}
where the positive definite matrix $Q$ can be arbitrarily chose. Let it be
    \begin{eqnarray*}
    Q = \begin{pmatrix}
         4 & -2 \\
         -2 & 2
        \end{pmatrix}.
    \end{eqnarray*}
   \item Check, whether conditions (1),(2),(3) are indeed satisfied!
   \item Give the time derivative of the Lyapunov function $\dot V(x) = \dotprod{\mathrm{grad} V, A x}$!
\end{enumerate}
\end{example}


\subsection{Local stability analysis of a nonlinear system around the operating point using the linear linearized model}
\color{blue}
Operating point = munkapont.
\color{black}

Local stability analysis of nonlinear system $\dot x = f(x)$, step-by-step:
\begin{itemize}
  \item Determine the equilibrium points $x^*$ (steady states) of the system by solving the nonlinear system of algebraic equations $f(x)=0$.
  \item Compute the Jacobian matrix $f(x)$: $J_f(x) = \mathrm{D}f(x)$.
  \item Compute the value of $J_f(x)$ when $x = x^*$: $A := \big[J_f(x)]_{x = x^*}$.
  \item Compute the eigenvalues of matrix $A$, which gives whether the system is locally asymptotically stable ($\Re\lambda_i < 0$) or not ($\Re\lambda_i > 0$).
\end{itemize}


\begin{cexamplew}*[Lotka-Volterra model]{}\label{lv}
    Let $x_1$ and $x_2$ denote the number of prays and predators, respectively.
    Their population-dynamics can be described by the following system of nonlinear differential equation:

    \smallskip
    \color{blue}
    Jelölje $x_1$ és $x_2$ a zsákmányállatok illetve a ragadozók számát, a populáció-dinamikát pedig írja le a következő differenciálegyenlet-rendszer:
    \color{black}
    \begin{align}
        \begin{aligned}
            \dot x_1&=&ax_1-bx_1x_2 \\
            \dot x_2&=& -cx_2+dx_1x_2
        \end{aligned} ~~~~~~~~~~~~~
        \text{with } a,b,c,d>0
    \end{align}
    where $a$ and $c$ are the growth rate of the two species in the absence of the other species,
    the seconds terms in the equations represent the interaction between the two species. If a predator consumes a pray that means a decrease in the number of prays, but also entails an increase in the number of predators. The rate of the mentioned decrease/increase is given by $b$ and $d$.

    \smallskip
    \color{blue}
    Az egyenletben az $a$ ($c$) koefficiens a zsákmányállatok (regadozók) szaporulata (elhullási aránya zsákmányállatok nélkül)
    $b$ a ragadozók hatékonysága és $d$ írja le a ragadozók táplálékbevitel melletti szaporulatát.
    \color{black}
    \smallskip

    Equilibrium points
    $$
    x^*_1=\left(
            \begin{array}{c}
              0 \\
              0 \\
            \end{array}
          \right)
          ~~~~
    x^*_2=\left(
            \begin{array}{c}
              \frac{c}{d} \\
              \frac{a}{b} \\
            \end{array}
          \right)
    $$
    The Jacobian of $f$ is
    $$
    \left(
      \begin{array}{cc}
        a-bx_1 & -bx_1 \\
        dx_2 & -c+dx_1 \\
      \end{array}
    \right)
    $$
    The Jacobian of $f$ evaluated in the equilibrium point $x^*_1$ is:
    $$
    \left(
      \begin{array}{cc}
        a & 0 \\
        0 & -c \\
      \end{array}
    \right)
    ~~~~~ \rightsquigarrow ~~~~~ \lambda_1=a, ~~~ \lambda_2=-c
    $$
    This equilibrium point is locally unstable since there exist eigenvalues with negative real part.

    The Jacobian matrix in $x^*_2$ is:

    $$
    \left(
      \begin{array}{cc}
        0 & \frac{-bc}{d} \\
        \frac{ad}{b} & 0 \\
      \end{array}
    \right) ~~~~~~~
    \rightsquigarrow ~~~~~ \lambda^2+ac=0 ~~\rightsquigarrow~~ \lambda_1=-i\sqrt{ac},\lambda_2=i\sqrt{ac},
    $$

    This system is locally stable but NOT asymptotically stable. This means that the system will oscillate around the equilibrium point.
\end{cexamplew}

\section{Further extra material}
\begin{cdefinitionw}*{}\label{}
    The $\mathcal H_\infty$ norm of a system operator is the peak gain of the system, namely
    \begin{align}
        \begin{aligned}
            \mathcal H_\infty = \max_{\omega \ge 0} \abs{H(j \omega)}
        \end{aligned}
    \end{align}
    Alternatively, $\mathcal H_\infty$ norm is the induced $\mathcal L_2$ norm of the convolution operator $\mathcal S[u]$:
    \begin{align}
        \begin{aligned}
            y(t) = \mathcal S[u(t)] = (h * u)(t) = \int_0^t h(t - \tau) u(\tau) \diffd \tau ~~
            \implies~~
            \mathcal H_\infty = \norm{\mathcal S}_2 = \sup_{u \in \mathcal L_2} \frac{\norm{S[u]}_2}{\norm{u}_2}
        \end{aligned}
    \end{align}
\end{cdefinitionw}

\begin{cthmw}*{}\label{}
    The $\mathcal H_\infty$ norm is always smaller or equal than the absolute integral of the impulse response.
    Namely:
    \begin{equation}
        \max_{\omega} \vqty{H(j\omega)}  \le \norm{h}_1 = \int_0^\infty \vqty{h(t)} \diffd t
    \end{equation}
\end{cthmw}
\smallbreak
\begin{proof}
    $H(j\omega)$ is the Fourier transform of the impulse repsose $h(t)$, thus, we can write:
    \begin{equation}
        \vqty{H(j\omega)} = \vqty{\int_0^\infty h(t) e^{-j\omega t} \diffd t} \le
        \int_0^\infty \vqty{h(t)} \cdot \underbrace{\vqty{e^{-j\omega t}}}_{1} \diffd t =
        \int_0^\infty \vqty{h(t)} \diffd t
    \end{equation}
    This inequality holds for every $\omega$, therefore,
    $\max_{\omega} \vqty{H(j\omega)} \le \int_0^\infty \vqty{h(t)} \diffd t$.
\end{proof}
\begin{center}
    \includegraphics[width=\textwidth]{fig/fig_16/fig.pdf}
    {\small Figure \refstepcounter{figure}\thefigure. Bode diagram of system $H(s) = \frac{s+4}{s^2 + s + 2}$}
\end{center}

\end{document}
