Coupled Oscillator: Double Pendulum: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
 
(53 intermediate revisions by the same user not shown)
Line 1: Line 1:
By '''Jimmy Apablaza'''[[Image:Fig1_Double_Pendulum.png‎]]
By '''Jimmy Apablaza'''
 
This problem is described in Page 321-322, Section 7.6 of the ''A first Course in Differential Equations'' textbook, 8ED (ISBN 0-534-41878-3).
 
__TOC__
 
[[Image:Fig1_Double_Pendulum.png|thumb|Figure 1. Coupled Pendulum.‎]]
= Problem Statement =
Consider the double-pendulum system consisting  of a pendulum attached to another pendulum shown in Figure 1.
 
'''Assumptions:'''
* the system oscillates vertically under the influence of gravity.
* the mass of both rod are negligible
* no damping forces act on the system
* positive direction to the right.
 
The system of differential equations describing the motion is nonlinear
 
: <math>(m_1+m_2)l_1^2\theta_1^{\prime\prime} + m_2l_1l_2\theta_2^{\prime\prime}cos(\theta_1-\theta_2) + m_2l_1l_2(\theta_2^{\prime})^2sin(\theta_1-\theta_2) + (m_1+m_2)l_1gsin\theta_1 = 0</math>
: <math>m_2l_1^2\theta_2^{\prime\prime} + m_2l_1l_2\theta_1^{\prime\prime}cos(\theta_1-\theta_2) - m_2l_1l_2(\theta_1^{\prime})^2sin(\theta_1-\theta_2) + m_2l_2gsin\theta_2 = 0</math>
 
 
In order to linearize these equations, we assume that the displacements <math>\theta_1</math> and <math>\theta_2</math> are small enough so that <math>cos(\theta_1-\theta_2)\approx1</math> and <math>sin(\theta_1-\theta_2)\approx0</math>. Thus,
 
: <math>(m_1+m_2)l_1^2\theta_1^{\prime\prime} + m_2l_1l_2\theta_2^{\prime\prime} + (m_1+m_2)l_1g\theta_1 = 0</math>
: <math>m_2l_1^2\theta_2^{\prime\prime} + m_2l_1l_2\theta_1^{\prime\prime} + m_2l_2g\theta_2 = 0</math>
 
== Solution ==
 
Since our concern is about the motion functions, we will assign the masses <math>m_1</math> and <math>m_2</math>, the rod lenghts <math>l_1</math> and <math>l_1</math>, and gravitational force <math>g</math> constants to different variables as follows,
 
: <math>A=(m_1+m_2)l_1^2 \quad B=m_2l_1l_2 \quad C=(m_1+m_2)l_1g \quad D=m_2l_1^2 \quad E=m_2l_2g</math>
 
Hence,
 
: <math>A\theta_1^{''} + B\theta_2^{''} + C\theta_1 = 0</math>
: <math>D\theta_2^{''} + B\theta_1^{''} + E\theta_2 = 0</math>
 
Solving for <math>\theta_1^{''}</math> and <math>\theta_2^{''}</math> we obtain,
 
: <math>\theta_1^{''} = - \left ( \dfrac{B}{A} \right ) \theta_2^{''} - \left ( \dfrac{C}{A} \right ) \theta_1</math>
: <math>\theta_2^{''} = - \left ( \dfrac{B}{D} \right ) \theta_1^{''} - \left ( \dfrac{E}{D} \right ) \theta_2</math>
 
Therefore,
 
: <math>\theta_1^{''} = - \left ( \dfrac{CD}{AD+B^2} \right ) \theta_1 - \left ( \dfrac{BE}{AD+B^2} \right ) \theta_2 </math>
: <math>\theta_2^{''} = \left ( \dfrac{BC}{AD+B^2} \right ) \theta_1 - \left ( \dfrac{AE}{AD+B^2} \right ) \theta_2</math>
 
=== State Space ===
 
: <math>
\begin{bmatrix}
\theta_1^{'} \\ \theta_1^{''} \\ \theta_2^{'} \\ \theta_2^{''}
\end{bmatrix}
 
=
 
\widehat{A} \, \underline{x}(t) + \widehat{B} \, \underline{u}(t)
 
=
 
\begin{bmatrix}
0                  & 1 & 0                  & 0 \\
& & & \\
\dfrac{-CD}{AD-B^2} & 0 & \dfrac{BE}{AD-B^2}  & 0 \\
& & & \\
0                  & 0 & 0                  & 1 \\
& & & \\
\dfrac{BC}{AD-B^2}  & 0 & \dfrac{-AE}{AD-B^2} & 0 \\
\end{bmatrix}
 
\begin{Bmatrix}
\theta_1 \\ \theta_1^{'} \\ \theta_2 \\ \theta_2^{'}
\end{Bmatrix}
 
+
 
\widehat{0}
 
</math>
 
Let's plug some numbers. It's known that <math>g=32</math>. In addition, we assume that <math>m_1=3</math>, <math>m_2=1</math>, and <math>l_1=l_2=16</math>, so the constants defined previously become,
 
: <math>A=1024 \quad B=256 \quad C=2048 \quad D=256 \quad E=512</math>
 
Hence, the state space matrix is,
 
: <math>
\begin{bmatrix}
\theta_1^{'} \\ \theta_1^{''} \\ \theta_2^{'} \\ \theta_2^{''}
\end{bmatrix}
 
=
 
\begin{bmatrix}
0            & 1 & 0            & 0 \\
-\dfrac{8}{3} & 0 & \dfrac{2}{3}  & 0 \\
0            & 0 & 0            & 1 \\
\dfrac{8}{3}  & 0 & -\dfrac{8}{3} & 0 \\
\end{bmatrix}
 
\begin{Bmatrix}
\theta_1 \\ \theta_1^{'} \\ \theta_2 \\ \theta_2^{'}
\end{Bmatrix}
 
</math>
 
=== Eigenvalues & Eigenvectors ===
The eigenvalues and eigenvectors are easily obtained with the help of a TI-89 calculator. First, we consider the <math>\widehat{A}</math>'s identity matrix,
 
: <math>
[\lambda I-A]
 
=
 
\begin{bmatrix}
\lambda      & 1      & 0            & 0      \\
-\dfrac{8}{3} & \lambda & \dfrac{2}{3}  & 0      \\
0            & 0      & \lambda      & 1      \\
\dfrac{8}{3}  & 0      & -\dfrac{8}{3} & \lambda \\
\end{bmatrix}
 
</math>
 
Once we define the <math>\widehat{A}</math> matrix, the eigenvalues are determined by using the '''''eigVi()''''' function,
 
: <math>\lambda_1= 2 \mathbf{i}</math>
: <math>\lambda_2= -2 \mathbf{i}</math>
: <math>\lambda_3= 1.1547 \mathbf{i}</math>
: <math>\lambda_4= -1.1547 \mathbf{i}</math>
 
On the other hand, we use the '''''eigVc()''''' function to find the eigenvectors,
 
: <math>
k_1
 
=
 
\begin{bmatrix}
-0.2 \mathbf{i} \\
0.4            \\
0.4 \mathbf{i}  \\
-0.8            \\
\end{bmatrix}
 
\quad
 
k_2
 
=
 
\begin{bmatrix}
0.2 \mathbf{i} \\
0.4            \\
-0.4 \mathbf{i}  \\
-0.8            \\
\end{bmatrix}
 
\quad
 
k_3
 
=
 
\begin{bmatrix}
-0.29277 \mathbf{i} \\
0.33806            \\
0.58554 \mathbf{i}  \\
-0.67621            \\
\end{bmatrix}
 
\quad
 
k_4
 
=
 
\begin{bmatrix}
0.29277 \mathbf{i} \\
0.33806            \\
0.58554 \mathbf{i}  \\
0.67621            \\
\end{bmatrix}
 
</math>
 
=== Standard Equation ===
Now, we plug the eigenvalues and eigenvectors to produce the standar equation,
 
: <math>\underline{x} = c_1 \underline{k_1} e^{\lambda_1 t} + c_2 \underline{k}_2 e^{\lambda_2 t} + c_3 \underline{k_3} e^{\lambda_3 t} + c_4 \underline{k_4} e^{\lambda_4 t}</math>
 
: <math>
 
\underline{x}
=
c_1
\begin{bmatrix}
-0.2 \mathbf{i} \\
0.4            \\
0.4 \mathbf{i}  \\
-0.8            \\
\end{bmatrix}
e^{2 \mathbf{i}}
+
c_2
\begin{bmatrix}
0.2 \mathbf{i} \\
0.4            \\
-0.4 \mathbf{i}  \\
-0.8            \\
\end{bmatrix}
e^{-2 \mathbf{i}}
+
c_3
\begin{bmatrix}
-0.29277 \mathbf{i} \\
0.33806            \\
0.58554 \mathbf{i}  \\
-0.67621            \\
\end{bmatrix}
e^{1.1547 \mathbf{i}}
+
c_4
\begin{bmatrix}
0.29277 \mathbf{i} \\
0.33806            \\
0.58554 \mathbf{i}  \\
0.67621            \\
\end{bmatrix}
e^{-1.1547 \mathbf{i}}
</math>
 
=== Matrix Exponential ===
The matrix exponential is,
 
: <math>\dot{\bar{z}}=\hat{A}\bar{z}=TAT^{-1}\bar{z}</math>
 
where
 
: <math>
A
=
\begin{bmatrix}
0            & 1 & 0            & 0 \\
-\dfrac{8}{3} & 0 & \dfrac{2}{3}  & 0 \\
0            & 0 & 0            & 1 \\
\dfrac{8}{3}  & 0 & -\dfrac{8}{3} & 0 \\
\end{bmatrix}
</math>,
 
and
 
: <math>
T^{-1}
=
[k_1|k_2|k_3|k_4]
=
\begin{bmatrix}
-0.2 \mathbf{i} &  0.2 \mathbf{i} & -0.29277 \mathbf{i} &  0.29277 \mathbf{i} \\
0.4            &  0.4            &  0.33806            &  0.33806            \\
0.4 \mathbf{i}  & -0.4 \mathbf{i} &  0.58554 \mathbf{i} &  0.58554 \mathbf{i} \\
-0.8            & -0.8            & -0.67621            &  0.67621            \\
\end{bmatrix}
</math>,
 
so
 
: <math>
T
=
(T^{-1})^{-1}
=
[k_1|k_2|k_3|k_4]^{-1}
=
\begin{bmatrix}
1.25 \mathbf{i}    &  0.625    & -0.625 \mathbf{i}    & -0.3125  \\
-1.25 \mathbf{i}    &  0.625    &  0.625 \mathbf{i}    & -0.3125  \\
0.853913 \mathbf{i} &  0.73951  &  0.426956 \mathbf{i}  &  0.369755 \\
-0.853913 \mathbf{i} &  0.73951  & -0.426956 \mathbf{i}  &  0.369755 \\
\end{bmatrix}
</math>
 
Again, we can resort to the TI-89 calculator. As it is mentioned above, the matrix exponential is obtained by typing '''''eigVc(a)^-1*a*eigVc(a)''''', where '''''a''''' is the <math>\widehat{A}</math> matrix. Thus,
 
: <math>
\dot{\bar{z}}
=
\hat{A}\bar{z}
=
TAT^{-1}\bar{z}
=
\begin{bmatrix}
2 \mathbf{i} &  0            &  0                  &  0                  \\
0            & -2 \mathbf{i} &  0                  &  0                  \\
0            &  0            &  1.1547 \mathbf{i}  &  0                  \\
0            &  0            &  0                  & -1.1547 \mathbf{i}  \\
\end{bmatrix}
\bar{z}
</math>
 
So, the exponential matrix becomes,
 
:<math>
\dot{\underline{x}}=\widehat{A}\underline{x}=T^{-1}e^{\hat{A}t}T\underline{x}=e^{At}\underline{x}
</math>
 
where
 
:<math>
e^{\hat{A}t}
=
\begin{bmatrix}
e^{2 \mathbf{i} t} &  0                  &  0                        &  0                        \\
0                  & e^{-2 \mathbf{i} t} &  0                        &  0                        \\
0                  &  0                  &  e^{1.1547 \mathbf{i} t}  &  0                        \\
0                  &  0                  &  0                        & e^{-1.1547 \mathbf{i} t}  \\
\end{bmatrix}
</math>
 
Hence,
 
: <math>
\dot{\underline{x}}
=
\begin{bmatrix}
-0.2 \mathbf{i} &  0.2 \mathbf{i} & -0.29277 \mathbf{i} &  0.29277 \mathbf{i} \\
0.4            &  0.4            &  0.33806            &  0.33806            \\
0.4 \mathbf{i}  & -0.4 \mathbf{i} &  0.58554 \mathbf{i} &  0.58554 \mathbf{i} \\
-0.8            & -0.8            & -0.67621            &  0.67621            \\
\end{bmatrix}
\begin{bmatrix}
e^{2 \mathbf{i} t} &  0                  &  0                        &  0                        \\
0                  & e^{-2 \mathbf{i} t} &  0                        &  0                        \\
0                  &  0                  &  e^{1.1547 \mathbf{i} t}  &  0                        \\
0                  &  0                  &  0                        & e^{-1.1547 \mathbf{i} t}  \\
\end{bmatrix}
\begin{bmatrix}
1.25 \mathbf{i}    &  0.625    & -0.625 \mathbf{i}    & -0.3125  \\
-1.25 \mathbf{i}    &  0.625    &  0.625 \mathbf{i}    & -0.3125  \\
0.853913 \mathbf{i} &  0.73951  &  0.426956 \mathbf{i}  &  0.369755 \\
-0.853913 \mathbf{i} &  0.73951  & -0.426956 \mathbf{i}  &  0.369755 \\
\end{bmatrix}
\underline{x}
</math>
 
so, the matrix exponential can be solved using matrix multiplication.

Latest revision as of 12:46, 13 December 2009

By Jimmy Apablaza

This problem is described in Page 321-322, Section 7.6 of the A first Course in Differential Equations textbook, 8ED (ISBN 0-534-41878-3).

Error creating thumbnail: File missing
Figure 1. Coupled Pendulum.‎

Problem Statement

Consider the double-pendulum system consisting of a pendulum attached to another pendulum shown in Figure 1.

Assumptions:

  • the system oscillates vertically under the influence of gravity.
  • the mass of both rod are negligible
  • no damping forces act on the system
  • positive direction to the right.

The system of differential equations describing the motion is nonlinear

(m1+m2)l12θ1+m2l1l2θ2cos(θ1θ2)+m2l1l2(θ2)2sin(θ1θ2)+(m1+m2)l1gsinθ1=0
m2l12θ2+m2l1l2θ1cos(θ1θ2)m2l1l2(θ1)2sin(θ1θ2)+m2l2gsinθ2=0


In order to linearize these equations, we assume that the displacements θ1 and θ2 are small enough so that cos(θ1θ2)1 and sin(θ1θ2)0. Thus,

(m1+m2)l12θ1+m2l1l2θ2+(m1+m2)l1gθ1=0
m2l12θ2+m2l1l2θ1+m2l2gθ2=0

Solution

Since our concern is about the motion functions, we will assign the masses m1 and m2, the rod lenghts l1 and l1, and gravitational force g constants to different variables as follows,

A=(m1+m2)l12B=m2l1l2C=(m1+m2)l1gD=m2l12E=m2l2g

Hence,

Aθ1'+Bθ2'+Cθ1=0
Dθ2'+Bθ1'+Eθ2=0

Solving for θ1' and θ2' we obtain,

θ1'=(BA)θ2'(CA)θ1
θ2'=(BD)θ1'(ED)θ2

Therefore,

θ1'=(CDAD+B2)θ1(BEAD+B2)θ2
θ2'=(BCAD+B2)θ1(AEAD+B2)θ2

State Space

[θ1'θ1'θ2'θ2']=A^x_(t)+B^u_(t)=[0100CDADB20BEADB200001BCADB20AEADB20]{θ1θ1'θ2θ2'}+0^

Let's plug some numbers. It's known that g=32. In addition, we assume that m1=3, m2=1, and l1=l2=16, so the constants defined previously become,

A=1024B=256C=2048D=256E=512

Hence, the state space matrix is,

[θ1'θ1'θ2'θ2']=[01008302300001830830]{θ1θ1'θ2θ2'}

Eigenvalues & Eigenvectors

The eigenvalues and eigenvectors are easily obtained with the help of a TI-89 calculator. First, we consider the A^'s identity matrix,

[λIA]=[λ10083λ23000λ183083λ]

Once we define the A^ matrix, the eigenvalues are determined by using the eigVi() function,

λ1=2i
λ2=2i
λ3=1.1547i
λ4=1.1547i

On the other hand, we use the eigVc() function to find the eigenvectors,

k1=[0.2i0.40.4i0.8]k2=[0.2i0.40.4i0.8]k3=[0.29277i0.338060.58554i0.67621]k4=[0.29277i0.338060.58554i0.67621]

Standard Equation

Now, we plug the eigenvalues and eigenvectors to produce the standar equation,

x_=c1k1_eλ1t+c2k_2eλ2t+c3k3_eλ3t+c4k4_eλ4t
x_=c1[0.2i0.40.4i0.8]e2i+c2[0.2i0.40.4i0.8]e2i+c3[0.29277i0.338060.58554i0.67621]e1.1547i+c4[0.29277i0.338060.58554i0.67621]e1.1547i

Matrix Exponential

The matrix exponential is,

z¯˙=A^z¯=TAT1z¯

where

A=[01008302300001830830],

and

T1=[k1|k2|k3|k4]=[0.2i0.2i0.29277i0.29277i0.40.40.338060.338060.4i0.4i0.58554i0.58554i0.80.80.676210.67621],

so

T=(T1)1=[k1|k2|k3|k4]1=[1.25i0.6250.625i0.31251.25i0.6250.625i0.31250.853913i0.739510.426956i0.3697550.853913i0.739510.426956i0.369755]

Again, we can resort to the TI-89 calculator. As it is mentioned above, the matrix exponential is obtained by typing eigVc(a)^-1*a*eigVc(a), where a is the A^ matrix. Thus,

z¯˙=A^z¯=TAT1z¯=[2i00002i00001.1547i00001.1547i]z¯

So, the exponential matrix becomes,

x_˙=A^x_=T1eA^tTx_=eAtx_

where

eA^t=[e2it0000e2it0000e1.1547it0000e1.1547it]

Hence,

x_˙=[0.2i0.2i0.29277i0.29277i0.40.40.338060.338060.4i0.4i0.58554i0.58554i0.80.80.676210.67621][e2it0000e2it0000e1.1547it0000e1.1547it][1.25i0.6250.625i0.31251.25i0.6250.625i0.31250.853913i0.739510.426956i0.3697550.853913i0.739510.426956i0.369755]x_

so, the matrix exponential can be solved using matrix multiplication.