User:Egm6341.s11.team5.oh/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

=Problem 5.7: Pros and Cons of Various Numerical Integration Techniques=

Objective
Discuss the pros and cons of the following numerical integration methods:
 * 1) Taylor Series
 * 2) Composite Trapezoidal Rule
 * 3) Composite Simpson's Rule
 * 4) Romberg Table(Richardson Extrapolation)
 * 5) Corrected Trapezoidal Rule

Solution
Solved by William Kurth.

= Problem 5.8 - Proof of Higher Order Trapezoidal Rule Error(HOTRE)= From [[media:Nm1.s11.mtg30.djvu|Mtg 30-2,3,7]]

Given
,where $$\begin{align} x_k := a+kh, \; \ h :=(b-a)/n, \; \ x(t)= \frac{x_k+x_{k+1}}{2} + t \cdot \frac{h}{2}, \; \ t \in [-1,+1] \end{align}$$ $$ x(-1) = x_k, \qquad x(0)= \frac{(x_k + x_{k+1})}{2}, \qquad x(+1) = x_{k+1} $$ ,where $$\begin{align} g_k(t):=f(x(t)) \; \ x \in [x_k,x_{k+1}] \end{align}$$

Find
 Proove that (8-1) and (8-2) are same 

Solution
 Therefore, (8-1) will be changed as same as (8-2) 


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

$$\displaystyle E_n^T=\dfrac{h}{2} \sum_{k=0}^{n-1} \left[ \int_{-1}^{+1}g_k(t)dt- \left\{g_k(-1)+g_k(+1) \right\} \right] $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |


 * style= |


 * }
 * }

Find
 Proove (8-3) 

Solution
 Using Integration by parts, 

$$\displaystyle\begin{align} \int_{a}^{b} u {v}^{'}= [uv]_{a}^{b} - \int_{a}^{b} {u}^{'} v \end{align}$$

 In this problem, u = -t, v = g(t), a = -1, b = +1  $$\displaystyle\begin{align} (8-3) \rightarrow [(-t) \cdot g(t)]_{-1}^{+1} - \int_{-1}^{+1} (-1) \cdot g(t) dt \end{align}$$

$$\displaystyle\begin{align} \rightarrow [-g(+1)-g(-1)] - \int_{-1}^{+1} (-1) \cdot g(t) dt \ = \ \int_{-1}^{+1} g(t) dt - [g(+1) + g(-1)] \end{align}$$

 Therefore, clearly we can proove (8-3) 

Given
where $$\displaystyle \begin{align} \; g_k^{(i)}(t)=\frac{d^i}{dt^i} g_k^{(t)}, \;x \in [x_k, x_{k+1}] \end{align}$$

Find
 Proove (8-4) 

Solution
 Therefore, clearly we can proove (8-4) 

Given

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

p_{5}(t) = -\frac{t^5}{120} + \frac{t^3}{36} + \underbrace{\alpha}_{c_{5}} t + \underbrace{\beta}_{c_{6}} $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 * $$\displaystyle (8-5)
 * }


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


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

p_{5}(0) =0, \qquad p_{5}(\pm 1) = 0 $$ $$.
 * $$ \displaystyle
 * $$\displaystyle (8-6)
 * }

Find
$$\displaystyle c_5 \, \ c_6 $$

Solution

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

$$ \displaystyle p_{5}(0) = -\frac{0}{120} + \frac{0}{36} + c_{5} (0) + c_{6} = 0 $$
 *  Plug (8-6) into (8-5) 
 * }
 * }


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

\therefore c_{6} = 0 $$ 
 * $$ \displaystyle
 * }


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

p_{5}(1) = -\frac{1}{120} + \frac{1}{36} + c_{5} \cdot (1) = 0 $$
 * $$ \displaystyle
 * }


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

\therefore c_{5} = \frac{3}{360} - \frac{10}{360} = -\frac{7}{360} $$ 
 * $$ \displaystyle
 * }


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

p_{5}(-1) = -\frac{-1}{120} + \frac{-1}{36} + c_{5} \cdot (-1) = 0 $$
 * $$ \displaystyle
 * }


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

\therefore c_{5} = -\frac{-3}{360} + \frac{-10}{360} = -\frac{7}{360} $$ 
 * $$ \displaystyle
 * }


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

$$ \displaystyle c_6 = 0 \, \ c_5 = -\frac{7}{360} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }


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

.
 * }

Author and proof-reader
[Author] Oh

[Proof-reader]