User:Darkspore52/sandbox

Series mass-spring damper systems
For a 1-D, n-DOF system of n masses connected in series by springs and dampers between two driven platforms, the Lagrangian method can be used to find the equation that describes the motion of each mass. The gravitational potential energy terms $$(\Delta V_g=mg\Delta h)$$ in this example cancel, and are omitted for simplicity. Note that $x_0 $ and $$x_{n+1} $$ are driven, and we have assumed that they are rigid (in the sense that their motion is not affected by the motion of the internal masses). To make this clear, they have been instead labelled as $$y_a $$ and $$y_b $$ respectively.

Kinetic energy terms:

$T = {1\over2} ({m_1} {\dot{x}}_1^2 + {m_2} {\dot{x}}_2^2 + {m_3} {\dot{x}}_3^2 + \ldots + {m_n} {\dot{x}}_n^2)$

Potential energy terms:

$V = {1\over2} ({k_1 (x_1 - y_a)^2} + {k_2 (x_2 - x_1)^2} + {k_3 (x_3 - x_2)^2} + \ldots + {{k_n} (x_n - x_{n-1})^2} + {{k_{n+1}} (y_b - x_n)^2})$    $= {1\over2} ({{k_1} ({y_a}^2 + {x_1}^2 - 2{y_a}{x_1}) } + {{k_2} ({x_1}^2 + {x_2}^2 - 2{x_1}{x_2}) } + \ldots + {{k_{n}} ({x_{n-1}}^2 + {x_{n}}^2 - 2{x_{n-1}}{x_{n}}) } + {{k_{n+1}} ({x_n}^2 + {y_b}^2 - 2{x_n}{y_b}) })$

Dissipation terms (expands similarly to potential energy terms):

$D = {1\over2} ({c_1} ({\dot{x}_1} - \dot{x}_0)^2 + {c_2} (\dot{x}_2 - \dot{x}_1)^2 + \ldots + {c_n} (\dot{x}_n - {\dot{x}}_{n-1})^2 + {c_{n+1}} (\dot{y}_{a} - {\dot{x}}_{n})^2 )$

Work energy term:

$$W=0$$

Lagrangian:                     $$\mathcal{L} = T-V$$

n equations of motion (one for each degree of freedom for each mass) are given by:

${d \over dt} ({\partial\over\partial \dot{x}_i}) \mathcal{L} - ({\partial\over\partial x_i}) \mathcal{L} + ({\partial\over\partial x_i}) {D} - ({\partial\over\partial x_i}) {W} = 0 \ \ \ \ \ {\forall i=1,2,3,\ldots,n}$

I.e.:

${\ddot{x}_1} {m_1} - {k_1}({x_1} - {y_a}) - {k_2}({x_1} - {x_2}) + {c_1}({\dot{x}_1} - {\dot{y}_a}) + {c_2}({\dot{x}_1} - {\dot{x}_2}) = 0 $ $${\ddot{x}_2} {m_2} - {k_1}({x_2} - {x_1}) - {k_2}({x_2} - {x_3}) + {c_1}({\dot{x}_2} - {\dot{x}_1}) + {c_2}({\dot{x}_2} - {\dot{x}_3}) = 0 $$${\ddot{x}_3} {m_3} - {k_2}({x_3} - {x_2}) - {k_3}({x_3} - {x_4}) + {c_2}({\dot{x}_3} - {\dot{x}_2}) + {c_3}({\dot{x}_3} - {\dot{x}_4}) = 0 $

$ {\vdots} $

${\ddot{x}_n} {m_n} - {k_n}({x_n} - {x_{n-1}}) - {{k_{n+1}}({x_n} - {y_{b}})} + {c_n}({\dot{x}_n} - {\dot{x}_{n-1}}) + {{c_{n+1}}({\dot{x}_n} - {\dot{y}_{b}})} = 0 $

$$ {k_{n+1}}({y_{b}} - {x_{n}}) - {c_{n+1}}({\dot{y}_{b}} - {\dot{x}_{n}}) = 0 $$

This can be written in matrix notation as:

$${\begin{bmatrix} {m_1} & 0 & 0 & {\ldots} & 0 \\ 0 & {m_2} & 0 & {\ldots} & 0 \\ 0 & 0 & {m_3} & {\ldots} & 0 \\ {} & {} & {} & {\ddots} & {} \\ 0 & 0 & 0 & {\ldots} & {m_n} \end{bmatrix}} {\begin{bmatrix} {\ddot{x}_1} \\ {\ddot{x}_2} \\ {\ddot{x}_3} \\ {\vdots} \\ {\ddot{x}_n} \end{bmatrix}} + {\begin{bmatrix} {-(k_1 +k_2)} & k_2 & 0 & 0 & {\ldots} & 0 & 0\\ {k_2} & {-(k_2 + k_3)} & k_3 & 0 & {\ldots} & 0 & 0\\ 0 & {k_3} & {-(k_3 + k_4)} & {k_4} & {\ldots} & 0 & 0\\ {} & {} & {} & {} & {\ddots} & {} \\ 0 & 0 & 0 & 0 & {\ldots} & {k_{n}} & {-(k_n + {k_{n+1}})} \end{bmatrix}} {\begin{bmatrix} {{x}_1} \\ {{x}_2} \\ {{x}_3} \\ {{x}_4} \\ {\vdots} \\ {{x}_{n-1}} \\{{x}_n} \end{bmatrix}} + y_a {\begin{bmatrix} {k_1} \\ 0 \\ 0 \\ 0 \\ {\vdots} \\ 0 \\0 \end{bmatrix}}

$$