User:Egm6341.s11.team2.cleveland/HW5

=Problem 5.2: Linear State Space Model =

Given: The Linear State Space Model (LSSM)
Where LSSM has the general form
 * {| style="width:100%" border="0"

$$ \displaystyle \mathbf{x_{k+1}}_{\color{red}(nx1)} = \mathbf{F}_{\color{red}(nxn)} \mathbf{x_{k}}_{\color{red}(nx1)} $$     (2.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

And $$ \displaystyle \mathbf{F}_{\color{red}(nxn)} $$ is defined as
 * {| style="width:100%" border="0"

$$ \displaystyle \mathbf{F}_{\color{red}(nxn)} = \mathbf{I}_{\color{red}(nxn)} + \Delta \mathbf{A}_{\color{red}(nxn)} $$     (2.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

If we choose $$ \displaystyle {\color{red} n=2} $$ and define the matrices in (2.2) as
 * {| style="width:100%" border="0"

$$ \displaystyle \mathbf{I}_{\color{red}(2x2)} = \left[ \begin{matrix} 1 & 0 \\   0 & 1  \\ \end{matrix} \right], \quad \mathbf{\Delta} = 0.02, \quad \mathbf{A}_{\color{red}(2x2)} = \left[ \begin{matrix} -0.2 & 1    \\   -1   & -0.2  \\ \end{matrix} \right] $$     (2.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

In addition we will consider the k-th step of the system $$ \displaystyle \mathbf{x_k} $$ and initial point $$ \displaystyle \mathbf{x_0} $$, in (2.1) as
 * {| style="width:100%" border="0"

$$ \displaystyle \mathbf{x_k}_{\color{red}(2x1)} = \left\{ \begin{matrix} x_k^ \\ x_k^ \\ \end{matrix} \right\} \quad and \quad
 * style="width:95%" |
 * style="width:95%" |

\mathbf{x_0}_{\color{red}(2x1)} = \left\{ \begin{matrix} x_k^ \\ x_k^ \\ \end{matrix} \right\} = \left\{ \begin{matrix} 3 \\   -2  \\ \end{matrix} \right\} $$     (2.3)
 * 
 * }

1. Run LSSM
And plot $$ \displaystyle \{ \mathbf{x_j}, j=0,1,...\} $$ in the state space $$ \displaystyle \left( x^1,x^2\right) =\left( x,y\right) $$

2. Find the Equilibrium Point
As $$ \displaystyle \underset{x \to \infty}{\mathop{\lim }} \mathbf{x_{k+1}} = \underset{x \to \infty}{\mathop{\lim }} \mathbf{F^{k+1}\cdot x_0} =: \mathbf{ \hat{x}} $$

a) Plot $$ \mathbf{ \hat{x}} $$
Using a BIG RED DOT

b) Plot $$ \displaystyle \mathbf{x_} $$
Using a BIG BLUE DOT in the same plane as $$ \displaystyle \{ \mathbf{x_j}, j=0,1,...\} $$ using small dots

3. Gaussian Random Noise:
====a) Let $$ \displaystyle \mathbf{G} = \alpha \cdot \left\{ \begin{matrix}  1  \\   1  \\ \end{matrix} \right\}_{\color{red}2x1}  $$.====

4. Cauchy Random Noise:
====a) Let $$ \displaystyle \mathbf{G} = \alpha \cdot \left\{ \begin{matrix}  1  \\   1  \\ \end{matrix} \right\}_{\color{red}2x1}  $$.====

Hint:
Find a Matlab command to generate $$ \displaystyle \{ \mathbf{\theta_{j}}, j=0,1,2,... \} $$ in single-slit diffraction experiment.

1. Run LSSM
And plot $$ \displaystyle \{ \mathbf{x_j}, j=0,1,...\} $$ in the state space $$ \displaystyle \left( x^1,x^2\right) =\left( x,y\right) $$

Matlab Code: Matlab Plot of the LSSM:
 * HW5-P2-1.tif

Using the above Matlab code we were able to track the time evolution over time to the equilibrium point. We considered $$ \displaystyle n = 1001 $$ points to obtain the equilibrium position. It is reasonable to infer that this behavior continues as $$ \displaystyle n \rightarrow \infty $$ since the stability of the phase space by eigenvalue analysis holds. Namely, for a given $$ \displaystyle 2x2 $$ matrix $$ \displaystyle \mathbf{A} $$ of the general form,


 * {| style="width:100%" border="0"

$$ \displaystyle \mathbf{A}_{\color{red}(2x2)} = \left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right] $$     (2.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Remarks:
Must satisfy the following two conditions to be classified as stable:

i) The trace, $$ \displaystyle T = a+d < 0 $$ and

ii) The determinant, $$ \displaystyle D = ad-bc > 0 $$

For our matrix $$ \displaystyle \mathbf{A} $$ we get:

i) The trace, $$ \displaystyle T = -0.2+(-0.2) = -0.4 < 0 $$ and

ii) The determinant, $$ \displaystyle D = (-0.2)(-0.2)-(-1)(1)=1.04 > 0 $$

Therefore, we observe a stable near-equilibrium at $$ \displaystyle n=1001 $$ which sufficiently demonstrates the behavior of this system. Since it was easy enough to carry out the numerical verification at larger $$ \displaystyle $$ a calculation for $$ \displaystyle n=10001 $$ which provided points around the order of $$ \displaystyle 10^{-17} $$.

2. Find the Equilibrium Point
As $$ \displaystyle k $$ goes to infinity,

a) Plot $$ \mathbf{ \hat{x}} $$
Using a BIG RED DOT

b) Plot $$ \displaystyle \mathbf{x_} $$
Using a BIG BLUE DOT in the same plane as $$ \displaystyle \{ \mathbf{x_j}, j=0,1,...\} $$ using small dots

Matlab Code:

Matlab Plot of the LSSM:
 * HW5-P2-1.tif

3. Gaussian Random Noise:
====a) Let $$ \displaystyle \mathbf{G} = \alpha \cdot \left\{ \begin{matrix}  1  \\   1  \\ \end{matrix} \right\}_{\color{red}2x1}  $$.====

c) Using the Matlab command randn to generate $$ \displaystyle \{ \mathbf{w_{j}}, j=0,1,2,... \} $$.
Matlab Code:

d) Plot $$ \displaystyle \{ \mathbf{x_{j}}, j=0,1,2,... \} $$ for $$ \displaystyle \alpha=0.5,1,2 $$.
Shown Below is the Linear State Space Model With Random Gaussian Noise and $$ \displaystyle {\color{red}\alpha = 0.5} $$:
 * HW5-P2-3-guassianNoiseAlpha_05.tif

Shown Below is the Linear State Space Model With Random Gaussian Noise and $$ \displaystyle {\color{red}\alpha = 1} $$:
 * HW5-P2-3-guassianNoiseAlpha_2.tif

Shown Below is the Linear State Space Model With Random Gaussian Noise and $$ \displaystyle {\color{red}\alpha = 2} $$:
 * HW5-P2-3-guassianNoiseAlpha_2.tif

4. Cauchy Random Noise:
====a) Let $$ \displaystyle \mathbf{G} = \alpha \cdot \left\{ \begin{matrix}  1  \\   1  \\ \end{matrix} \right\}_{\color{red}2x1}  $$.====

c) Using the Matlab command randn to generate $$ \displaystyle \{ \mathbf{w_{j}}, j=0,1,2,... \} $$.
Matlab Code:

d) Plot $$ \displaystyle \{ \mathbf{x_{j}}, j=0,1,2,... \} $$ for $$ \displaystyle \alpha=0.5,1,2 $$.
Shown Below is the Linear State Space Model With Cauchy Noise and $$ \displaystyle {\color{red}\alpha = 0.5} $$:
 * HW5-P2-4cauchyNoiseAlpha_05.tif

Shown Below is the Linear State Space Model With Cauchy Noise and $$ \displaystyle {\color{red}\alpha = 1} $$:
 * HW5-P2-4-cauchyNoiseAlpha_1.tif

Shown Below is the Linear State Space Model With Cauchy Noise and $$ \displaystyle {\color{red}\alpha = 2} $$:
 * HW5-P2-4cauchyNoiseAlpha_2.tif

Hint:
Find a Matlab command to generate $$ \displaystyle \{ \mathbf{\theta_{j}}, j=0,1,2,... \} $$ in single-slit diffraction experiment.

=Problem 5.7: =