From 08522b830cd1dd1d0d1d5a060574f50f388205a7 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Thu, 19 Aug 2021 18:46:28 +0200
Subject: Continue working

---
 tex/state-space.tex | 44 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 6 deletions(-)

(limited to 'tex/state-space.tex')

diff --git a/tex/state-space.tex b/tex/state-space.tex
index fadc6dd..3923b9c 100644
--- a/tex/state-space.tex
+++ b/tex/state-space.tex
@@ -1,11 +1,11 @@
 \section{State space representation}
 
-\begin{figure}
+\begin{figure}[h]
   \centering
   \resizebox{\linewidth}{!}{
     \input{tex/tikz/mimo}
   }
-  \caption{A LTI MIMO system.}
+  \caption{Diagram of a LTI MIMO system with vector variables.}
 \end{figure}
 
 A system described by a system of linear differential equations of \(n\)-th order, can be equivalently be described by \(n\) first order differential equations. Which can be compactly written in matrix form as
@@ -41,7 +41,12 @@ If the system is time \emph{variant} the matrices are functions of time.
 
 \subsubsection{Diagonalized or Jordan form}
 
-The Jordan form diagonalizes the \(\mx{A}\) matrix. Thus we need to solve the eigenvalue problem \((\mx{A} - \lambda\mx{I})\vec{x} = \vec{0}\), which can be done by setting \(\det(\mx{A} -\lambda\mx{I}) = 0\), and solving the characteristic polynomial. The eigenvectors are obtained by plugging the \(\lambda\) values back into \((\mx{A} - \lambda\mx{I})\vec{x} = \vec{0}\), and solving an overdetermined system of equations.
+The Jordan form diagonalizes the \(\mx{A}\) matrix. Thus we need to solve the eigenvalue problem \((\mx{A} - \lambda\mx{I})\vec{x} = \vec{0}\), which can be done by setting \(\det(\mx{A} -\lambda\mx{I}) = 0\), and solving the characteristic polynomial. The eigenvectors are obtained by plugging the \(\lambda\) values back into \((\mx{A} - \lambda\mx{I})\vec{x} = \vec{0}\), and solving an overdetermined system of equations. Tip: for a \(2\times2\) matrix \(\mx{A}\) the eigenvalues can be quickly calculated with
+\[
+  m = \frac{1}{2} \tr \mx{A} = \frac{a + d}{2}, \quad
+  p = \det \mx{A} = ad - bc
+\]
+and then \(\lambda_{1,2} = m \pm \sqrt{m^2 - p}\).
 
 The transformation to the eigenbasis \(\mx{T}\), obtained by using the eigenvector as columns of a matrix \(\mx{T} = \begin{bmatrix} \vec{v}_1 & \cdots & \vec{v}_n \end{bmatrix}\), is then used to compute
 \begin{align*}
@@ -63,7 +68,7 @@ The state controllability condition implies that it is possible --- by admissibl
     \mx{B} & \mx{A}\mx{B} & \mx{A}^2\mx{B} \cdots \mx{A}^{n-1}\mx{B}
   \end{bmatrix}
 \]
-has \(\rank\mx{Q} = n\). Or equivalently for a SISO system, if all components of the vector \(\mx{\hat{C}}_{i} \neq 0\).
+has \(\rank\mx{Q} = n\). For a SISO system, if all components of the vector \(\mx{\hat{B}}\) are not zero, then the system is controllable.
 
 \subsection{Observability}
 Observability is a measure for how well internal states of a system can be inferred by knowledge of its external outputs. A LTI state space mode is observable iff the matrix
@@ -72,8 +77,35 @@ Observability is a measure for how well internal states of a system can be infer
     \mx{C} & \mx{C}\mx{A} & \cdots & \mx{C}\mx{A}^{n-1}
   \end{bmatrix}
 \]
-has \(\rank\mx{Q} = n\).
+has \(\rank\mx{Q} = n\). For a SISO system it is also possible to infer observability from the diagonalized form: if all elements of the \(\mx{\hat{C}}\) are not zero, then the system is observable.
 
 
 \subsection{Solutions in time domain}
-\subsection{Solutions in frequency domain}
+%% TODO: solutions in the time domain
+
+\subsection{Solutions in the \(s\)-domain}
+
+By taking the Laplace transform of the system of differential equations we obtain
+\begin{align*}
+  s\vec{X} - \vec{x}(0) &= \mx{A}\vec{X} + \mx{B}\vec{U} \\
+  \vec{Y} &= \mx{C}\vec{X} + \mx{D}\vec{U}.
+\end{align*}
+The first equation can be solved for \(\vec{X}\) giving
+\[
+  \vec{X} = (s\mx{I} - A)^{-1}\left(\vec{x}(0) + \mx{B}\vec{U}\right).
+\]
+Substituting in the second equation results in
+\[
+  \vec{Y} = \mx{C}(s\mx{I} - \mx{A})^{-1}\left(\vec{x}(0) + \mx{B}\vec{U}\right) + \mx{D}\vec{U}.
+\]
+Assuming that the initial conditions \(\vec{x}(0) = \vec{0}\), then
+\[
+  \vec{Y} = \left(\mx{C}(s\mx{I} - \mx{A})^{-1}\mx{B} + \mx{D}\right)\vec{U}.
+\]
+from which can define the \emph{transfer matrix} \(\mx{H}\) to be the matrix that takes \(\vec{Y}\) to \(\vec{U}\), i.e.
+\[
+  \vec{H} = \mx{C}(s\mx{I} - \mx{A})^{-1}\mx{B} + \mx{D},
+\]
+that we can use to compute \(y = \laplace^{-1}\left\{\mx{H}\laplace u\right\}\).
+
+In the special case of a SISO system the transfer matrix \(\mx{H}\) is one dimensional and exactly equal to the transfer function \(H\).
-- 
cgit v1.2.1

