User:Egm6341.s11.team4.yang/hw5

=HW 5.4 problem: Drive equation of motion and plot system=

Refer to lecture slide [[media:nm1.s11.mtg29.djvu|mtg-29]] for the problem statement.

Objective
1. drive eq of motion in terms of d, c, k, m, u 2. let $$\underline{x}=\{\begin{matrix} d \\ {\dot{d}} \\ \end{matrix}\}$$. Find ( $$\underline{F}$$, $$\underline{G}$$ ). 3. find C in terms of k, m, such that systen is critically damped. 4. let k=1, m=1/2, x0=$${{[0.8,-0.4]}^{T}}$$ a. For u=0, plot $$\underline$$ for $$c=0.5*{{C}_{cr}},{{C}_{cr}},1.5*{{C}_{cr}}$$ b. For u=0.5 gaussian noise and c=$$1.5*{{C}_{cr}}$$, plot $$\underline$$ c). For u=0.5 Cauchy noise and c=$$1.5*{{C}_{cr}}$$, plot $$\underline$$

solution
1. According the balance of force on the mass of M, we obtain that:
 * {| style="width:100%" border="0"

$$\begin{align} & {{F}_{c}}=c\centerdot \dot{d} \\ & {{F}_{k}}=k\centerdot d \\ \end{align}$$ $$u-{{F}_{c}}-{{F}_{k}}=m\centerdot a=m\centerdot \ddot{d}$$ So, the equation of motion can be represented as: $$u-c\centerdot \dot{d}-k\centerdot d=m\centerdot \ddot{d}$$ 2. From above, we can drive the following equation:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$\ddot{d}=-\frac{k}{m}\centerdot d-\frac{c}{m}\centerdot \dot{d}+\frac{u}{m}$$

And it is obvious that :
 * 
 * }
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$\dot{d}=0\centerdot d+1\centerdot \dot{d}+0$$

Then, we can form the matrix equation using the above two equations:
 * 
 * }
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$\left[ \begin{matrix} {\dot{d}} \\ {\ddot{d}} \\ \end{matrix} \right]=\left[ \begin{matrix} 0 & 1 \\   -\frac{k}{m} & -\frac{c}{m}  \\ \end{matrix} \right]\centerdot \left[ \begin{matrix} d \\ {\dot{d}} \\ \end{matrix} \right]+\frac{1}{m}\centerdot \left[ \begin{matrix} 0 \\   u  \\ \end{matrix} \right]$$

Discretization of model with $$\underline=({{\underline{x}}_{k+1}}-{{\underline{x}}_{k}})/h$$, then:
 * 
 * }
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$${{\underline{x}}_{k+1}}=[\underline{I}+h\centerdot \left[ \begin{matrix} 0 & 1 \\   -\frac{k}{m} & -\frac{c}{m}  \\ \end{matrix} \right]]\centerdot {{\underline{x}}_{k}}+\frac{h}{m}\centerdot \left[ \begin{matrix} 0 \\   u  \\ \end{matrix} \right]$$

Simplying the above equation,
 * 
 * }
 * {| style="width:100%" border="0"

$${{\underline{x}}_{k+1}}=\left[ \begin{matrix} 1 & h \\ -\frac{kh}{m} & 1-\frac{hc}{m} \\ \end{matrix} \right]\centerdot {{\underline{x}}_{k}}+\frac{h}{m}\centerdot \left[ \begin{matrix} 0 \\   u  \\ \end{matrix} \right]$$ So,
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$\begin{align} & \underline{F}=\left[ \begin{matrix} 1 & h \\ -\frac{kh}{m} & 1-\frac{hc}{m} \\ \end{matrix} \right] \\ & \underline{G}=\frac{h}{m} \\ \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

3. The equation of motion is represented as:
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$\ddot{d}=-\frac{k}{m}\centerdot d-\frac{c}{m}\centerdot \dot{d}+\frac{u}{m}$$


 * 
 * }
 * Then, the natural frequency and damping ration are: $$\omega_0 = \sqrt{\frac{k}{m}}$$ and $$\zeta = \frac{c}{2 m \omega_0} \, .$$
 * Critically damped(ζ=1): The system returns to equilibrium as quickly as possible without oscillating.


 * Then, $${{C}_{cr}}=2\centerdot \sqrt{km}$$

4. a). For u=0, plot $$\underline$$ for $$c=0.5*{{C}_{cr}},{{C}_{cr}},1.5*{{C}_{cr}}$$

b). For u=0.5 gaussian noise and c=$$1.5*{{C}_{cr}}$$, plot $$\underline$$



c). For u=0.5 Cauchy noise and c=$$1.5*{{C}_{cr}}$$, plot $$\underline$$



This problem was solved by shengfeng yang