User:Egm6341.s11.team3.ren

HW 2.13
(a) Trapezoidal rule Simple rule: $$I_1=\dfrac{b-a}{2}\left[f(a)+f(b)\right] $$

Composite rule:

$$I_n=\dfrac{x_1-x_0}{2}[f(x_0)+f(x_1)]+\dfrac{x_2-x_1}{2}[f(x_1)+f(x_2)]+\ \cdot\cdot\cdot\ +\dfrac{x_n-x_{n-1}}{2}[f(x_{n-1})+f(x_n)]$$

$$=\sum^n_{j=0}\dfrac{x_j-x_{j-1}}{2}[f(x_{j-1})+f(x_j)]$$

Using uniform intervals, $$h=x_j-x_{j-1} (j=0,1,2,\cdot\cdot\cdot,n)$$, the integral becomes

$$I_n=\frac{h}{2}\sum^n_{j=0}[f(x_{j-1})+f(x_j)]=\frac{h}{2}[f(x_0)+2f(x_1)+2f(x_2)+\ \cdot\cdot\cdot\ +2f(x_{n-1})+f(x_n)]$$ $$=h[\frac{1}{2}f(x_1)+f(x_2)+\ \cdot\cdot\cdot\ +f(x_{n-1})+\frac{1}{2}f(x_n)]$$

(b) Simpson's rule

Simple rule: $$I_2=\dfrac{h}{3}[f(x_0)+4f(x_1)+f(x_2)]$$

Composite rule:

Using uniform intervals, $$h=(b-a)/n\ (n=2k, k==0,1,2,\cdot\cdot\cdot)$$, the integral can be written as

$$I_n=\frac{h}{3}\sum^{n-1}_{j=1,3,5,\cdot\cdot\cdot}[f(x_{j-1})+4f(x_j)+f(x_{j+1})]$$

$$=\dfrac{h}{3}[f(x_0)+4f(x_1)+f(x_2)]+\dfrac{h}{3}[f(x_2)+4f(x_3)+f(x_4)]+\ \cdot\cdot\cdot\ +\dfrac{h}{3}[f(x_{n-2})+4f(x_n)+f(x_n)]$$

$$=\dfrac{h}{3}[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+2f(x_4)+ \cdot\cdot\cdot\ +2f(x_{n-2})+4f(x_n)+f(x_n)]$$

Egm6341.s11.team3.ren 22:55, 30 January 2011 (UTC)

HW 2.14

Assume y is related to x in a simple form $$y=g(x)=C_1x+C_2$$. We want y=-1 as x=a, and y=1 as x=b, which is

$$g(a)=aC_1+C_2=-1$$

$$g(b)=bC_1+C_2=1$$

Solving for $$C_1$$ and $$C_2$$, we have

$$C_1=\frac{2}{b-a}$$

$$C_2=\frac{a+b}{a-b}$$

$$\Rightarrow\ y=\frac{2}{b-a}x+\frac{a+b}{a-b}\ \Rightarrow\ x=\frac{b-a}{2}y-\frac{1}{2}\ \Rightarrow\ dx=\frac{b-a}{2}dy$$

$$\Rightarrow\ \int^{b}_{a}f(x)dx=\int^{1}_{-1}f(\frac{b-a}{2}y-\frac{1}{2})\frac{b-a}{2}dy=\int^{1}_{-1}\bar f(y)dy$$

Therefore,

$$\bar f(y)=\frac{b-a}{2}f(\frac{b-a}{2}y-\frac{1}{2})$$

Given
An ideal mass-spring-damper system with mass m, spring constant k and viscous damper of damping coefficient c is subject to an constant force F=u.

Find
1) Derive equation of motion in terms of d,c,k,m,u.

2) Let $$ x=\left\{ {\begin{array}{*{20}{c}} d \\  \dot d  \\ \end{array}} \right\} =\left\{ {\begin{array}{*{20}{c}} x_1  \\  x_2  \\ \end{array}} \right\}  \ $$, find $$\left(F,G\right)$$

3) Find $$c_{cr}$$ in terms of k,m such that system is critically damped.

4) Let $$k=1,m=1/2,x_0=[0.8,-0.4]^T$$

a) For u=0, plot $$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 $$x_k$$ c) For u=0.5 Cauchy noise, and $$c=\frac{3}{2}c_{cr}$$, plot $$x_k$$

Solution
1)

For the spring k 
 * {| style="width:100%" border="0"

$$ f_k=kd \ $$ $$ (Eq.5.4.1) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

For the damping c 
 * {| style="width:100%" border="0"

$$ f_c=c\cdot \frac{d}{dt}d(t)=c\dot d \ $$ $$ (Eq.5.4.2) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

For the mass m 
 * {| style="width:100%" border="0"

$$ m\frac{d^2}{dt^2}d(t) =u-f_k-f_c  \ $$ $$ (Eq.5.4.3) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \Rightarrow\quad m\ddot d = u - c\dot d-kd \quad \Rightarrow\quad  m\ddot d + c\dot d+kd= u  \ $$ $$ (Eq.5.4.4) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

2)


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

$$ x=\left\{ {\begin{array}{*{20}{c}} d \\  \dot d  \\ \end{array}} \right\} =\left\{ {\begin{array}{*{20}{c}} x_1  \\  x_2  \\ \end{array}} \right\}  \ $$ $$ (Eq.5.4.5) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

From (Eq.5.4.4), we have


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

$$ \left\{ {\begin{array}{*{20}{c}} \dot x_1 = x_2 \\  \dot x_2 = u - \frac{c}{m}x_2-\frac{k}{m}x_1\\ \end{array}} \right. \ $$   $$ (Eq.5.4.6) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

that is


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

$$ \left\{ {\begin{array}{*{20}{c}} \dot x_1 \\ \dot x_2 \\ \end{array}} \right\} = \left[ {\begin{array}{*{20}{c}} 0 & 1 \\  -\frac{k}{m} & -\frac{c}{m} \\ \end{array}} \right] \left\{ {\begin{array}{*{20}{c}} x_1 \\ x_2 \\ \end{array}} \right\} + \left[ {\begin{array}{*{20}{c}} 0 & 0 \\  1 & 0 \\ \end{array}} \right] \left\{ {\begin{array}{*{20}{c}} u \\ 0 \\ \end{array}} \right\} $$   $$ (Eq.5.4.7) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \Rightarrow \quad A = \left[ {\begin{array}{*{20}{c}} 0 & 1 \\  -\frac{k}{m} & -\frac{c}{m} \\ \end{array}} \right] \quad B= \left[ {\begin{array}{*{20}{c}} 0 & 0 \\  1 & 0 \\ \end{array}} \right]$$ $$ (Eq.5.4.8) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

According to lecture notes

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Rightarrow \quad F=I+\Delta t A = \left[ {\begin{array}{*{20}{c}} 1 & \Delta t \\ -\frac{k\Delta t}{m} & 1-\frac{c\Delta t}{m} \\ \end{array}} \right] \quad G=\Delta t B= \left[ {\begin{array}{*{20}{c}} 0 & 0 \\  \Delta t & 0 \\ \end{array}} \right]$$ $$ (Eq.5.4.9) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

3) For critical damping system, the governing equation can be written as <span id="(1)">
 * {| style="width:100%" border="0"

$$ \ddot d + 2\omega_0\dot d+\omega^2 d=const. \ $$   $$ (Eq.5.4.10) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Comparing (Eq.5.4.10) with (Eq.5.4.4), we know

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \frac{k}{m} = \left(\frac{c_{cr}}{2m}\right)^2 \quad\Rightarrow\quad c_{cr}=2\sqrt{mk}\ $$ $$ (Eq.5.4.11) \ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

4) The governing equation can be integrated according to

<span id="(1)">
 * {| style="width:100%" border="0"

$$ x_{k+1}=Fx_k+Gu_{k+1} \quad\ $$ $$ (Eq.5.4.11) \ $$ with  $$\quad x_0=[0.8,-0.4]^T \ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }