# 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

# Control Systems:Key Relations

\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}}$$
[1, 2][State space $$\rightarrow$$ transfer function] [𝕯

8

]

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

[3][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

[4][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}\bn{\dot{x}}&=(\bn{A}-\bn{BK})\bn{x}+\bn{B}r\\ y &= \bn{CX}\end{align}}
[5] [Cl-sys design state equations]

$$\ds\boxed{\mtx{\bn{\dot{x}}}{\dot{x}_N}=\mtxx{(\bn{A}-\bn{BK})}{\bn{B}K_e}{-\bn{C}}{0}+\mtx{\bn{x}}{x_N}+\mtx{\bn{0}}{1}r}$$
$$\ds\boxed{y=[\bn{C}\ \ 0]\mtx{\bn{x}}{x_N}}$$
[6] [Integral control ss-error design]

• $$\ds\boxed{\bn{G}'=(\bn{a}_c-\bn{a})(\bn{T}_c\bn{W})^{-1}}$$
• $$\ds\bn{a}_c' = [a_{c1},...,a_{cn}],\ \bn{a}' = [a_1,...,a_n],\ \bn{T}_c = \t{Controllability test matrix}$$
• $$\ds W = \lrbra{\mtxxxx{1}{a_1}{\cdots}{a_{n-1}}{0}{1}{\cdots}{a_{n-2}}{}{}{\vdots}{}{0}{0}{\cdots}{1}}$$
• [8] [Pole Placement, Full-state Feedback] (Linear Systems)
• - $$\bn{T}_c$$ must be non-singular to allow pole placement
• - $$\bn{G}' =$$ feedback gain matrix in control law $$\bn{u} = -\bn{Gx}$$
• - $$\bn{G}$$ is proportional to distance b/n the coefficients of actual and desired characteristic polynomial
• - $$\bn{G}$$ is inversely proportional to $$\bn{T}_c$$; the more controllable the plant, the smaller the gain needed to change poles

$$\ds\boxed{\bn{G}_0 = (\bn{C}\bn{A}_c^{-1}\bn{B})^{-1}\bn{C}\bn{A}_c^{-1}\bn{E} = \bn{B}^{\t{#}}\bn{E}}$$
• [9] [Exogenous variable control]
• - Goal is to zero-out observed output in response to exogenous input $$x_0$$ - i.e., $$\bn{y}=\bn{Cx}=0$$, where $$\t{dim}(\bn{y}) = \t{dim}(\bn{u})$$
• - Must satisfy $$\bn{C}\bn{A}_c^{-1}\bn{B}\bn{G}_0 = \bn{C}\bn{A}_c^{-1}\bn{E}$$
• - $$\bn{B}^{\t{#}} =$$ left pseudo-inverse of $$\bn{B}$$; $$\bn{B}^{\t{#}}\bn{B} = \bn{I}$$
• - $$\bn{C}\bn{A}_c^{-1}\bn{B} =$$ square matrix
• - If $$\bn{E}=k\bn{B}$$, then $$\bn{G}_0 = \bn{I}$$