User:Egm6341.s11.team5.reiss/HW5

= Problem 5.4- Mass, spring, damper analysis = From [[media:Nm1.s11.mtg29.djvu|Mtg 29-1]]

Given
h=.02

Find
1) Determine the equation of motion of the system in terms of d, c, k, m and, u 2)$$\mathbf{x} = \left\{ {\begin{array}{*{20}{c}} d\\ {\dot d} \end{array}} \right\} = \left\{ {\begin{array}{*{20}{c}} \\

\end{array}} \right\}$$, Find F and G 3)Find $$c_{cr}$$ in terms of k and m such that the system is critically damped 4)Let k=1, m=0.5, $$\mathbf{x_{0}}={\left\lfloor {\begin{array}{*{20}{c}} {0.8}&{ - 0.4} \end{array}} \right\rfloor ^T}$$ a)For u=0, plot $$\mathbf{x_{k}}$$ for $$c = \frac{1}{2}{c_{cr}},{c_{cr}},\frac{3}{2}{c_{cr}}$$ b)For u=0.5 gaussian noise and $$c=\frac{3}{2}{c_{cr}}$$, plot $$\mathbf{x_{k}}$$ c)For u=0.5 cauchy noise and $$c=\frac{3}{2}{c_{cr}}$$, plot $$\mathbf{x_{k}}$$

5.4.1: Equation of Motion
The force of the spring is given by


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

$$ $$
 * $$F_s=-kx
 * $$F_s=-kx
 * $$\displaystyle (4-1)
 * }
 * }

The force of the damper is given by


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

$$ $$
 * $$F_d=-c\dot x
 * $$F_d=-c\dot x
 * $$\displaystyle (4-2)
 * }
 * }

The force of inertia is given by


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

$$ $$ The external force on the system is $$F_e=u$$ The total force on the system, the force balance, is given by
 * $$F_I=m\ddot x
 * $$F_I=m\ddot x
 * $$\displaystyle (4-3)
 * }
 * }


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

$$ $$ Substituting,
 * $$F_I=F_c+F_s+F_e
 * $$F_I=F_c+F_s+F_e
 * $$\displaystyle (4-4)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$m\ddot x=-c\dot x-kx+u
 * $$m\ddot x=-c\dot x-kx+u
 * $$\displaystyle (4-5)
 * }
 * }

Rearranging we see that the equation of motion is given by
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$\ddot x=-\frac{c}{m}\dot x-\frac{k}{m}x+\frac{1}{m}u
 * $$\ddot x=-\frac{c}{m}\dot x-\frac{k}{m}x+\frac{1}{m}u
 * $$\displaystyle (4-6)
 * }
 * }

5.4.2: Find F and G
We can now designate states such that


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

{x^1} = d\\ {x^2} = \dot d \end{array} $$ $$ Then
 * $$\begin{array}{l}
 * $$\begin{array}{l}
 * $$\displaystyle (4-7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\dot x^1\\ {\dot x^2} \end{array}} \right ) = \left ( {\begin{array}{*{20}{c}} \\
 * $$\dot \mathbf{x}=\left ( {\begin{array}{*{20}{c}}
 * $$\dot \mathbf{x}=\left ( {\begin{array}{*{20}{c}}

\end{array}} \right ) $$ $$ Putting this into matrix form
 * $$\displaystyle (4-8)
 * }
 * }


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

0&1\\ { - \frac{k}{m}}&{ - \frac{c}{m}} \end{array}} \right) \left( {\begin{array}{*{20}{c}} \\
 * $$\dot x = \left( {\begin{array}{*{20}{c}}
 * $$\dot x = \left( {\begin{array}{*{20}{c}}

\end{array}} \right) + \left( {\begin{array}{*{20}{c}} 0\\ {\frac{1}{m}} \end{array}} \right)u $$ $$
 * $$\displaystyle (4-9)
 * }
 * }


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

$$ $$ Where
 * $$\dot \mathbf{x}= \mathbf{A} \mathbf{x} + \mathbf{B}u
 * $$\dot \mathbf{x}= \mathbf{A} \mathbf{x} + \mathbf{B}u
 * $$\displaystyle (4-10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

0&1\\ { - \frac{k}{m}}&{ - \frac{c}{m}} \end{array}} \right) $$
 * $$\mathbf{A}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{A}=\left( {\begin{array}{*{20}{c}}
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

0\\ {\frac{1}{m}} \end{array}} \right) $$
 * $$\mathbf{B}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{B}=\left( {\begin{array}{*{20}{c}}
 * }
 * }

According to equations (1)-(4) of slide 29-7 equation 4-10 can be written as
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$ \mathbf{x_{k+1}}= \underbrace{\left[ \mathbf{I} + h \mathbf{A} \right]}_{\color{blue}\mathbf{F}} \mathbf{x_{k}} + \underbrace{h \mathbf{B}}_{\color{blue}\mathbf{G}}u
 * $$ \mathbf{x_{k+1}}= \underbrace{\left[ \mathbf{I} + h \mathbf{A} \right]}_{\color{blue}\mathbf{F}} \mathbf{x_{k}} + \underbrace{h \mathbf{B}}_{\color{blue}\mathbf{G}}u
 * $$\displaystyle (4-11)
 * }
 * }

So therefore


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

$$ $$
 * $$F = \left[ \mathbf{I} + h \mathbf{A} \right]
 * $$F = \left[ \mathbf{I} + h \mathbf{A} \right]
 * $$\displaystyle (4-12)
 * }
 * }

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

$$ $$ where I is the identity matrix, and A, B, and h are defined above
 * $$G = h \mathbf{B}
 * $$G = h \mathbf{B}
 * $$\displaystyle (4-13)
 * }
 * }

5.4.3: Finding $$c_{cr}$$
Critical damping occurs when the damping ratio is equal to 1. For systems like this one the damping ratio, according to Wikipedia, is given as


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

$$ $$
 * $$\varsigma = \frac{c}
 * $$\varsigma = \frac{c}
 * $$\displaystyle (4-14)
 * }
 * }

Therefore to determine c such that critical damping occurs we simply solve c in terms of m and k, setting the damping ratio equal to one. If we do this we will end up with


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

1 = \frac\\ {c_{cr}} = 2\sqrt {mk} \end{array} $$ $$
 * $$\begin{array}{l}
 * $$\begin{array}{l}
 * $$\displaystyle (4-15)
 * }
 * }

5.4.4: Plotting
Using the given values for the constants we are able to use the definitions of A and B along with equations (4-12) and (4-13) to find the values of the F and G matrices. Substituting we get,


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

F &= \left[ \mathbf{I} + h \mathbf{A} \right]\\ &= \left( {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}} \right) + .02\left( {\begin{array}{*{20}{c}} 0&1\\ { - 2}&{2c} \end{array}} \right)\\ &= \left( {\begin{array}{*{20}{c}} 1&.02\\ {-0.04}&{1.04c}\end{array}}\right)\end{align}$$ $$
 * $$\begin{align}
 * $$\begin{align}
 * $$\displaystyle (4-16)
 * }
 * }


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

0\\ {\frac{1}{m}} \end{array}} \right) = \left( {\begin{array}{*{20}{c}} 0\\ {0.04} \end{array}} \right) $$ $$
 * $$G = .02\left( {\begin{array}{*{20}{c}}
 * $$G = .02\left( {\begin{array}{*{20}{c}}
 * <p style="text-align:right;">$$\displaystyle (4-17)
 * }
 * }

5.4.4a:$$c=0.5c_{cr}$$
Taking into account $$c = \frac{1}{2}{c_{cr}},{c_{cr}},\frac{3}{2}{c_{cr}}$$ and no input force the equation becomes, respectively,


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

1&.02\\ {-0.04}&{0.7354}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * <p style="text-align:right;">$$\displaystyle (4-18)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1&.02\\ {-0.04}&{1.4708}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * <p style="text-align:right;">$$\displaystyle (4-19)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1&.02\\ {-0.04}&{2.206}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * <p style="text-align:right;">$$\displaystyle (4-20)
 * }
 * }

The results here are as we would expect. For the under-damped case, $$c=0.5c_{cr}$$ there is overshoot in both the position and the velocity graphs. Overshoot meaning that the value went past the final value and oscillated around the steady state value for a period of time. The critically damped case, $$c=c_{cr}$$ quickly rose to the steady state value and did not overshoot. And the over-damped system, $$c=1.5c_{cr}$$, did not overshoot but rose less quickly than the critically damped case.

5.4.4b: Gaussian noise
Using Gaussian noise as the forcing function for this system and using the over damped value for c the plot of x becomes



Notice that because of the Gaussian noise the system does not come to a steady state value as in the previous example. The system continuously fluctuates, though as time progresses the system fluctuates closely around the steady state values show in figure 1. The Gaussian noise causes instability in the system.

5.4.4c: Cauchy noise
Using Cauchy noise as the forcing function for this system and again using the over damped value for c, the plot of x becomes



Comparing the system's reaction to Cauchy noise and Gaussian noise we can see that the oscillations due to Cauchy noise are much more pronounced than the Gaussian oscillations. This is due to the heavy tails of the Cauchy distribution. The heavy tails cause the system to react to much greater changes in input, which causes the large magnitude spikes seen in figure 3.

Author and proof-reader
[Author] Reiss

[Proof-reader]