 # Dragon Notes UNDER CONSTRUCTION
Latest content:
 Apr 05 Deep Learning Mar 19 Anomaly Detection - ML Mar 13 +Data Tables Mar 08 Clustering - Machine Learning Feb 28 Support Vector Machines - ML Feb 20 Regression - Data Science

# Linear Systems Subtopics

Basics

State-space equations

\ds\boxed{\begin{align}\dot{\bn{x}}&=\bn{Ax}+\bn{Bu}\\ \bn{y}&=\bn{Cx}+\bn{Du}\end{align}}\ds\ \ \begin{align}&\t{State equation}\\ &\t{Output equation}\end{align}

$$\hspace{70px}$$ for $$t\geq t_0$$ and IC's $$\bn{x}_0(t)$$, where
\ds \begin{align} \bn{x} &= \t{state vector} &&& \bn{A} &= \t{system matrix} \\ \dot{\bn{x}} &= \t{time-derivative of state vector} &&& \bn{B} &= \t{input matrix} \\ \bn{y} &= \t{output vector} &&& \bn{C} &= \t{output matrix} \\ \bn{u} &= \t{input or control vector} &&& \bn{D} &= \t{feedforward matrix} \end{align}

$$\hspace{70px}$$ System matrix: relates how the current state $$\bn{x}$$ affects the state change $$\bn{x}'$$
$$\hspace{70px}$$ Control matrix: determines how the system input affects the state change
$$\hspace{70px}$$ Output matrix: relates the system state to the system output
$$\hspace{70px}$$ Feedforward matrix: determines the direct relationship between the system input and output. For feedback systems, $$\bn{D}=0$$
$$\hspace{70px}$$ State transition matrix: $$e^{\bn{A}t}$$ - matrix whose product with the state vector $$\bn{x}$$ gives at an initial time $$t_0$$ gives $$\bn{x}$$ at a later time $$t$$

$$\hspace{70px}$$ Can be computed via: (1) diagonal matrices: raise each diagonal entry of the (diagonal) matrix $$\bn{A}$$ as a power of $$e$$;
$$\hspace{230px}$$ (2) inverse Laplace: $$e^{\bn{A}t}=\mathcal{L}^{-1}[(s\bn{I}-\bn{A})^{-1}]$$

For a second-order LTI system with a single input $$v(t)$$, the state equations could take on the following form:

\ds\begin{align}\frac{dx_1}{dt}&=a_{11}x_1+a_{12}x_2+b_1v(t),\\ \frac{dx_2}{dt}&=a_{21}x_1+a_{22}x_2+b_2v(t),\end{align}
where $$x_1$$ & $$x_2$$ are the state variables. If there is a single output, the output equation could take on the following form:

$$\ds y=c_1x_1+c_2x_2+d_1v(t)$$
State variables are non-unique, must be linearly-independent, and chosen in some minimum number
\ds \boxed{\begin{align} \dot{x} &= ax+by \\ \dot{y} &= cx+dy \end{align}}
$$\dsup \boxed{\bn{\dot{x}}=\bn{Ax}}$$

State space $$\rightarrow$$ transfer function
[𝕯

8

]

\ds\boxed{\begin{matrix}\bn{\dot{x}}=\bn{Ax}+\bn{Bu}\\\bn{y}=\bn{Cx}+\bn{Du}\end{matrix}\Rightarrow \begin{matrix}\begin{align}\bn{X}(s)&=(s\bn{I}-\bn{A})^{-1}\bn{BU}(s)\\ \bn{Y}(s)&=[\bn{C}(s\bn{I}-\bn{A})^{-1}\bn{B}+\bn{D}]\bn{U}(s)\end{align}\end{matrix}}
$$\ds\boxed{T(s)=\frac{Y(s)}{U(s)}=\bn{C}(s\bn{I}-\bn{A})^{-1}\bn{B}+\bn{D}}$$

- $$\t{I.C.}$$'s $$=0$$
- $$\bn{U}(s)$$ & $$\bn{Y}(s)$$ are scalar functions $$U(s)$$ & $$Y(s)$$
State-space representation

A state-space representation can be obtained as follows:
 $$\bb{1}$$ Select a subset of all possible system variables, call them state variables $$\bb{2}\vplup$$ For an $$n$$-th order system, write $$n$$ simultaneous, first-order differential equations in terms of state variables $$\bb{3}\vplup$$ If IC's of all the state variables at $$t_0$$ are known, as well as the system input for $$t\geq t_0$$, the diff-eq's can be solved for the state variables for $$t\geq t_0$$ $$\bb{4}\vplup$$ Algebraically combine the state variables with the input and find all the other system variables for $$t\geq t_0$$, call it the output equation $$\bb{5}\vplup$$ The state equations and output equations form the state-space representation of the system

Controllability

Ability to go from any present state to any future state:
$$\phi(x(t),u[t,T])=c$$
A system is controllable iff for any present state $$x(t)$$, there exists an input $$u[t,T]$$ which takes the system to any desired state $$x(T)=c$$.
Controllability Conditions

Grammian condition: (time-variant & time-invariant)
$$\ds \bn{G}_c = \int_t^T \bn{\Phi}(\bn{T},\tau)\bn{B}(\tau)\bn{B'}(\tau)\bn{\Phi'}(\bn{T},\tau)d\tau$$ is nonsingular $$(\t{det}\neq 0)$$
Test matrix$$\Up$$:
asm
time-invariant sys.
$$\Up \bn{T}_c = [\bn{B},\bn{AB},...,\bn{A}^{(n-1)}\bn{B}]$$ is of rank $$n$$ $$(n$$ lin-indep. cols/rows$$)$$

Observability

Ability to determine the initial state from the output:
A system is observable iff for any $$x(t)$$ there is an operation on $$y[t,T]$$ by which one can determine $$x(t)$$
Observability Conditions

One-to-one: (time-variant & time-invariant)
If two or more initial states yield the same output, the system's not observable
Grammian condition$$\Up$$: (time-invariant & possibly time-varying):
$$\ds \bn{G}_o = \int_{t}^{T}\bn{\Phi'}(\bn{T},\tau)\bn{C'}(\tau)\bn{C}(\tau)\bn{\Phi}(\bn{T},\tau)d\tau$$ is nonsingular $$(\t{det}\neq 0)$$
Test matrix$$\Up$$:
asm
time-invariant sys.
$$\Up \bn{T}_o = [\bn{C'},\bn{A'C'},...,\bn{A'}^{(n-1)}\bn{C'}]$$ is of rank $$n$$ $$(n$$ lin-indep. cols/rows$$)$$

Fourier Transform Visual
($$\mathcal{F}[\delta (t)] = 1$$)   