You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this project, a pendulum is attached to a spinning frame. The frame has dimensions,
$h_1 = 0.2~m$
$w_1 = 0.1~m$
and the pendulum length is $L=0.15$ m with a $m=0.1$ kg point mass at the end of the system. The pendulum swings in the $x'$ - $z'$ plane as it rotates at a constant speed, $\Omega$
Your team's goal is to
build the equations of motion using Lagrange and least action $L=T-V$
solve for the motion for a slow rotation speed and a fast rotation speed
visualize the solution with plots and animations
Running the Program:
From the project directory, run:
julia main.jl
All source code is in the src/ directory.
Project Structure
TBD
Results
TBD (Include Plots, Animations, Comparison of hand derrived eqns to those derived using Julia)
Analysis:
To solve this problem, we can define a reference frame that rotates with the pivot about the z-axis. At time t, the rotating reference frame rotates by $\phi(t) = \Omega t$ relative to the inertial frame. Let's say we have some vector $\vec{v} = x' \widehat{i'} + y' \widehat{j'} = x \widehat{i} + y \widehat{j}$. We know that $\widehat{i'} = \cos(\phi) \widehat{i} + \sin(\phi) \widehat{j}$ and $\widehat{j'} = \cos(90^\circ + \phi) \widehat{i} + \sin(90^\circ + \phi) \widehat{j} = -\sin(\phi) \widehat{i} + \cos(\phi) \widehat{j}$. We also know that $z = z'$. Now, since the trajectory of the pendulum is defined in the inertial frame, we must introduce a method to transform coordinates from the rotational frame back to the inertial frame. Using our original expression for $\vec{v}$, we can substitute the expressions for $\widehat{i'}$ and $\widehat{j'}$ to find a rotation matrix about the z-axis, $R_{x}(\phi)$, such that
$$
\begin{bmatrix}
x \\
y \\
z
\end{bmatrix} = R_z(\phi)
\begin{bmatrix}
x' \\
y' \\
z'
\end{bmatrix}
$$
Therefore, the pivot position in the inertial frame can be expressed as:
$$
\vec{r}_{Pivot} =
\begin{bmatrix}
w_1 \cos(\Omega t) \
w_1 \sin(\Omega t) \
h_1
\end{bmatrix}
$$
The position of the mass the rotating frame relative to the pivot can be expressed as:
Where $\theta$ is the angle in the $x'- z'$ plane between the pendulum and the verticle $z'$ axis. Therefore, the position of the mass can be expressed in the inertial frame as:
$$
\vec{r}_{Mass, rel} =
\begin{bmatrix}
L \sin(\theta) \cos(\Omega t) \\
L \sin(\theta) \sin(\Omega t) \\
-L \cos(\theta)
\end{bmatrix}
$$
The absolute position of the mass in the inertial frame can then be expressed as:
Taking the time-derrivative of each allows us to find the speed of the mass, which can then be used to find the kinetic energy of the system:
$$
T = \frac{1}{2} m \left[L^2 \dot{\theta}(t)^2 + \Omega^2 (w_1 + L \sin \theta (t)^2) \right]
$$
The potential energy of the system can also be expressed as:
$$
V = mg \left(h_1 - L \cos \theta (t) \right)
$$
We can now write the Lagrangian as:
$$
L = T - V = \frac{1}{2} m \left[L^2 \dot{\theta}(t)^2 + \Omega^2 (w_1 + L \sin \theta (t)^2) \right] - mg \left(h_1 - L \cos \theta (t) \right)
$$
Finally we can used the Euler-Lagrange equation, $\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{\theta}} \right) - \frac{\partial L}{\partial \theta} = 0 $, to find the equation of motion for the system:
Therefore, we can choose a low speed of $ \Omega_s = 1 : \text{rad/s}$ and a high speed of $ \Omega_f = 12 : \text{rad/s}$. We can also evaluate the cases where the pendulum starts at rest, $\theta_o = 0$, and where the pendulum stars with a small displacement, $\theta_o = 0.05 : \text{rad}$.