TTK4130: Modelling and Simulation
$$
% * Energy based systems and passivity
$$
# Energy-based methods and passivity
When designing systems we often are dependent on dividing the system into smaller sub-sections and study them seperately. Energy-based methods is a practical way of examining the stability
properties of the whole system with respect to its sub-systems. Here is the general motivation:
> The interconnection of stable systems is not necessarily stable, however the interconnection of **passive** systems is passive
> and passive systems are stable
## Energy-based methods
When studying stability properties of systems, we can use the fact that the energy in a system will decrease if the system is stable, e.g. if the kinetic energy of any mechanic system is
monotonically increasing, it is certainly unstable.
### The energy function
Let $V(\textbf{x},t) \geq 0$ be an energy function for the system
$$\dot{\textbf{x}} = \textbf{f}(\textbf{x},\textbf{u},t)$$
It may be the total energy of the system or some other property related to the energy. We then define the time derivative of the system to be
$$\dot{V} = \frac{\partial V}{\partial t} + \frac{\partial V}{\partial \textbf{x}}\textbf{f}(\textbf{x},\textbf{u},t)$$
If $\dot{V}\leq 0$ the energy of the system is monotonically decreasing, which may be important concidering the stability properties of the system
For a second-order system $\ddot{x} = \textbf{f}(\textbf{x},\dot{\textbf{x}},t)$, the time derivative of the energy function $V(\textbf{x},\dot{\textbf{x}},t) \geq 0$ is
$$\dot{V} = \frac{\partial V}{\partial t} + \frac{\partial V}{\partial \textbf{x}}\dot{\textbf{x}} +\frac{\partial V}{\partial \dot{\textbf{x}}}\textbf{f}(\textbf{x},\dot{\textbf{x}},t)$$
### Lyapunov methods
In this method, we are concidering a plant
$$\dot{\textbf{x}} = \textbf{f}(\textbf{x},\textbf{u})$$
we then select a suitable energy function $V(\textbf{x})$ called a **Lyapunov function candidate**, which is ** positive definite **, i.e. $V(\textbf{x}_0=0) = 0$, and $V(\textbf{x})>0,
\forall \textbf{x} \neq 0$. A typical Lyapunov function candidate is
$$V(\textbf{x}) = \textbf{x}^\top \textbf{P} \textbf{x}, \quad \textbf{P}=\textbf{P}^\top > 0$$
Given this function, we have that
$$\frac{\lambda_{min}(\textbf{P})}{2}\textbf{x}^\top\textbf{x}\leq V(\textbf{x}) \leq \frac{\lambda_{max}(\textbf{P})}{2}\textbf{x}^\top\textbf{x}$$
Where $ \lambda_{min}(\textbf{P}) > 0 $ is the smalles eigenvialue of $\textbf{P}$, and $ \lambda_{max}(\textbf{P}) > 0 $ is the largest eigenvialue of $\textbf{P}$.
## Passivity
If a system can be described as a parallell or feedback interconnection of passive subsystems, then the total system will be passive, and it will not generate energy. This will under certain
assumptions imply that the system is stable.
> Concider a system with input $u(t)$ and output $y(t)$. Suppose that there is a constant $E_0 \geq 0$ so that for all control time histories of u and all $T\geq 0$ the integral of $u(t)y(t)$
> satisfies $$ \int_0^T u(t)y(t) dt \geq -E_0 $$
> then the system is said to be passive.
### Positive real transfer functions
A system is *only* passive if, and only if the transfer function from input to output is **positive real**.
> The function $H(s)$ is positive real if
> 1. $H(s)$ is analytic for all $Re[s] > 0$
> 2. $H(s)$ is real for all positive and real $s$
> 3. $Re[H(s)]\geq 0, \quad \forall Re[s] > 0$
If the function $H(s)$ is also **rational**, we can in addition affirm
> The rational function $H(s)$ is positive real if and only if
> 1. All the poles of $H(s)$ have real parts less than or equal to zero
> 2. $Re[H(j\omega)] \geq 0, \quad \forall j\omega \neq \text{pole of } H(s)$
> 3. If $j\omega_0 $ is a pole of $H(s)$, then it is a simple pole and $$Res_{s = j\omega_0}[H(s)] = \lim\limits_{s\to j\omega_0}(s-j\omega_0)H(s) $$
is real and positive. If $H(s)$ is a pole at infitity, then it is a simple pole, and $$R_\infty = \lim\limits_{\omega\to \infty}\frac{H(j\omega)}{j\omega}$$
exsists and is real and positive
### Bounded real transfer functions
> The function B(s) is bounded real if
> 1. $B(s)$ is analytic for all $Re[s] > 0$
> 2. $|B(s)| \leq 1$ for all positive and real s
These properties can be usefull by defining
$$B(s) = \frac{H(s)-1}{H(s)+1}.$$
Then we have the property that *$B(s)$ is bounded real if and only if H(s) is positive real*
### Storage function formulation