Fall 2009/JonathanS: Difference between revisions
(Laplace Transforms for Simple Pendulum's) |
|||
(51 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Problem == |
== Problem == |
||
A simple pendulum is pulled back and released from an initial angle <math>\theta_0 = 12^o</math>. |
A simple pendulum with a length L = 0.5m is pulled back and released from an initial angle <math>\theta_0 = 12^o</math>. Then it is run with a forcing function of cos(3<math>\theta</math>) Find an equation that gives the angle of the pendulum at any given time '''t'''. |
||
== Solution == |
== Solution == |
||
Assuming no damping and a small angle(<math>\theta < 15^o</math>), the equation for the motion of a simple pendulum can be written as |
Assuming no damping and a small angle(<math>\theta < 15^o</math>), the equation for the motion of a simple pendulum can be written as |
||
:<math>{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{g\over \ell}\theta= |
:<math>{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{g\over \ell}\theta=cos(3\theta).</math> |
||
We can then use the Laplace Transform to convert from the '''time(t)''' domain into the '''s''' domain. |
|||
Substituting values we get |
|||
Given |
|||
:<math>\ |
:<math>{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{9.81\over 0.5}\theta=cos(3\theta).</math> |
||
<math>\Rightarrow{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{19.62}\theta=cos(3\theta).</math> |
|||
Remember the identities |
|||
:<math>\mathcal{L}\{f(t)\}=F(s)=\int_0^{\infty} e^{-st} f(t) \,dt. </math> |
|||
:<math>\mathcal{L}\{f^{ ''}(t)\}=s^2F(s)-sf(0)-f^{ '}(0)</math> |
:<math>\mathcal{L}\{f^{ ''}(t)\}=s^2F(s)-sf(0)-f^{ '}(0)</math> |
||
We have |
|||
:<math>\mathcal{L}\{{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{g\over \ell}\theta\}=s^2F(s)-sf(0)-f^{ '}(0)+{g\over \ell}\theta</math> |
|||
Now we can take the Laplace Transform to change the second order differential equation, from the t domain, into a simple linear equation, from the s domain, that's much easier to work with |
|||
:<math>\mathcal{L}\bigg\{{\mathrm{d}^2\theta\over \mathrm{d}t^2}+{19.62}\theta\bigg\}=s^2F(s)-sf(0)-f^{ '}(0)+{19.62}\theta=\mathcal{L}\{cos(3\theta)\}</math> |
|||
<math>\Rightarrow</math> <math> s^2\boldsymbol{\theta}-s\theta(0)-\theta^{ '}(0)+{19.62}\boldsymbol{\theta}={s\over {s^2+9}} \,</math> |
|||
Since we know that <math>\theta(0)=12^o</math> and the initial velocity <math>\theta^{ '}(0)=0</math> we get |
|||
:<math>s^2\boldsymbol{\theta}-12s+19.62\boldsymbol{\theta}={s\over {s^2+9}} \,</math> |
|||
<math>\Rightarrow</math> <math>\boldsymbol{\theta}(s^2+19.62)={s\over {s^2+9}}+12s \,</math> |
|||
<math>\Rightarrow</math> <math>\boldsymbol{\theta}(s^2+19.62)={s\over {s^2+9}}+{12s(s^2+9)\over {s^2+9}} \,</math> |
|||
<math>\Rightarrow</math> <math>\boldsymbol{\theta}(s^2+19.62)={(12s^3+109s)\over {s^2+9}} \,</math> |
|||
<math>\Rightarrow</math> <math>\boldsymbol{\theta}={(12s^3+109s)\over {(s^2+9)(s^2+19.62)}}</math> |
|||
<math>\Rightarrow</math> <math>\boldsymbol{\theta}={12s^3+109s\over {(s^4+28.62s^2+176.58)}}</math> |
|||
Now we can take the inverse Laplace Transform to convert our equation back into the time domain |
|||
:<math>\mathcal{L}^{-1}\bigg\{{12s^3+109s\over {(s^4+28.62s^2+176.58)}}\bigg\}=0.094162cos(3t)+11.9058cos(4.42945t)</math> |
|||
This will give us the angle (in degrees) of the pendulum at any given time '''t'''. |
|||
== Initial Value Theorem == |
|||
We can use the Initial Value Theorem as a check that our initial values for the problem are valid. |
|||
:<math>\mathcal{L}\{f^{ '}(t)\}=sF(s)-f(0^-)=\int_{0^-}^{\infty}f^{ '}(t)e^{-st}\, dt</math> |
|||
:<math>\begin{alignat}{3} |
|||
\lim_{n \to \infty}\mathcal{L}\{f^{ '}(t)\} & = \lim_{n \to \infty}sF(s)-f(0^-) \\ |
|||
& = \lim_{n \to \infty}sF(s)-f(0^-)=0 \\ |
|||
& = \lim_{n \to \infty}sF(s)=f(0^-) \\ |
|||
\end{alignat}</math> |
|||
Below we will use this theorem to check the values for our problem. |
|||
:<math>\begin{alignat}{3} |
|||
\lim_{n \to \infty}\mathcal{L}\{f^{ '}(t)\} & = \lim_{n \to \infty}sF(s)-f(0^-)=\lim_{n \to \infty}\int_{0^-}^{\infty}f^{ '}(t)e^{-st}\, dt \\ |
|||
& = \lim_{n \to \infty}s\bigg({12s^3+109s\over {(s^4+28.62s^2+176.58)}}\bigg)-f(0^-)=0 \\ |
|||
& = \lim_{n \to \infty}s\bigg({12s^3+109s\over {(s^4+28.62s^2+176.58)}}\bigg)=f(0^-) \\ |
|||
12 & = f (0^-) \\ |
|||
\end{alignat}</math> |
|||
This value <math>f(0^-)=12</math> is the initial angle we gave the pendulum so it checks out. |
|||
== Final Value Theorem == |
|||
We can use the Final Value Theorem as a check that our final values for the problem are valid. |
|||
:<math>\mathcal{L}\{f^{ '}(t)\}=sF(s)-f(\infty)=\int_{0^-}^{\infty}f^{ '}(t)e^{-st}\, dt</math> |
|||
:<math>\begin{alignat}{3} |
|||
\lim_{n \to 0}\mathcal{L}\{f^{ '}(t)\} & = \lim_{n \to 0}sF(s)-f(\infty) \\ |
|||
& = \lim_{n \to 0}sF(s)-f(\infty)=0 \\ |
|||
& = \lim_{n \to 0}sF(s)=f(\infty) \\ |
|||
\end{alignat}</math> |
|||
Below we will use this theorem to check the values for our problem. |
|||
:<math>\begin{alignat}{3} |
|||
\lim_{n \to 0}\mathcal{L}\{f^{ '}(t)\} & = \lim_{n \to 0}sF(s)-f(\infty)=\lim_{n \to 0}\int_{0^-}^{\infty}f^{ '}(t)e^{-st}\, dt \\ |
|||
& = \lim_{n \to 0}s\bigg({12s^3+109s\over {(s^4+28.62s^2+176.58)}}\bigg)-f(\infty)=0 \\ |
|||
& = \lim_{n \to 0}s\bigg({12s^3+109s\over {(s^4+28.62s^2+176.58)}}\bigg)=f(\infty) \\ |
|||
0 & = f (\infty) \\ |
|||
\end{alignat}</math> |
|||
This is zero because the average angle as time goes to infinity will be zero (halfway between -12 and 12 degrees). |
|||
== Bode Plots == |
|||
To find the bode plot we use the function |
|||
:<math>H(s)={12s^3+109s\over {(s^4+28.62s^2+176.58)}}</math> |
|||
Entering this into a program such as Maple, Octave, or MATLAB will give you a plot that looks like this |
|||
[[Image:Bode_Plot.jpg]] |
|||
== Asymptotes & Break Points == |
|||
In this section I will describe how you can use the transfer function to quickly estimate what the bode plot will look like. |
|||
To find the initial value we can take <math>20log(H(j\omega))</math>. Which gives us |
|||
:<math>H(j\omega)={1 \over {\sqrt{\omega^2+1}\sqrt{\omega^2-1}}}</math> |
|||
From our original input we know that <math>\omega=3</math> so |
|||
:<math>H(j\omega)={1 \over {\sqrt{3^2+1}\sqrt{3^2-1}}}</math> |
|||
:<math>H(j\omega)=0.1118\,</math> |
|||
Now we can plug that into our log function |
|||
:<math>\begin{alignat}{3} |
|||
db_0 & = 20log(H(j\omega)) \\ |
|||
& = 20log(0.1118) \\ |
|||
& = -19.0 \\ |
|||
\end{alignat}</math> |
|||
If we check that against our bode plot above we can see that this is pretty close. Now we can find the deflections using the transfer function. It will be easier to work with in factored form. |
|||
For every "s" we have in the numerator we will increase the slope by 20db/decade. For every "s" we have in the denominator we will decrease the slope by 20db/decade. These changes will occur at the poles which form our break points and asymptotes. |
|||
:<math>\boldsymbol{\theta}={2s(12s^2+109) \over {(s^2+9)(2s^2+39.24)}}</math> |
|||
We get asymptotes at s=3j and s=4.47j from the denominator. For our purposes we can just ignore the imaginary part. We should also have increases of 20db/decade at s=0 and s=3.01 which we find from the numerator. |
|||
== Convolution == |
|||
Convolution, by definition, states that H(s)=Y(s)/X(s) where H(s) is the transfer function, Y(s) is the output function, and X(s) is the input function. We would like to find the output of the system, so for our purposes we will rearrange the above equation like this. |
|||
:<math>\begin{alignat}{3} |
|||
Y(s) & = H(s)X(s) \\ |
|||
& = \bigg({12s^3+109s\over {s^4+28.62s^2+176.58}}\bigg)\bigg({s\over {s^2+9}}\bigg) \\ |
|||
& = {2s^2(12s^2+109)\over {(s^2+9)^2(2s^2+39.24)}} \\ |
|||
\end{alignat}</math> |
|||
== State Space Equations == |
|||
Now we can transfer the functions we already have into state space. This is simply taking our original differential equation and putting it in terms of vectors and matrices. This can make the equations easier to work with. |
|||
<math>\begin{bmatrix} |
|||
\dot{\theta} \\ |
|||
\ddot{\theta} |
|||
\end{bmatrix} |
|||
= |
|||
\begin{bmatrix} |
|||
0 & 1 \\ |
|||
{-g\over \ell} & 0 |
|||
\end{bmatrix} |
|||
\begin{bmatrix} |
|||
\theta \\ |
|||
\dot{\theta} |
|||
\end{bmatrix} |
|||
+ |
|||
\begin{bmatrix} |
|||
0 \\ |
|||
1 |
|||
\end{bmatrix}cos(3\theta)</math> |
Latest revision as of 18:17, 9 December 2009
Problem
A simple pendulum with a length L = 0.5m is pulled back and released from an initial angle . Then it is run with a forcing function of cos(3) Find an equation that gives the angle of the pendulum at any given time t.
Solution
Assuming no damping and a small angle(), the equation for the motion of a simple pendulum can be written as
Substituting values we get
Remember the identities
Now we can take the Laplace Transform to change the second order differential equation, from the t domain, into a simple linear equation, from the s domain, that's much easier to work with
Since we know that and the initial velocity we get
Now we can take the inverse Laplace Transform to convert our equation back into the time domain
This will give us the angle (in degrees) of the pendulum at any given time t.
Initial Value Theorem
We can use the Initial Value Theorem as a check that our initial values for the problem are valid.
Below we will use this theorem to check the values for our problem.
This value is the initial angle we gave the pendulum so it checks out.
Final Value Theorem
We can use the Final Value Theorem as a check that our final values for the problem are valid.
Below we will use this theorem to check the values for our problem.
This is zero because the average angle as time goes to infinity will be zero (halfway between -12 and 12 degrees).
Bode Plots
To find the bode plot we use the function
Entering this into a program such as Maple, Octave, or MATLAB will give you a plot that looks like this
Asymptotes & Break Points
In this section I will describe how you can use the transfer function to quickly estimate what the bode plot will look like.
To find the initial value we can take . Which gives us
From our original input we know that so
Now we can plug that into our log function
If we check that against our bode plot above we can see that this is pretty close. Now we can find the deflections using the transfer function. It will be easier to work with in factored form. For every "s" we have in the numerator we will increase the slope by 20db/decade. For every "s" we have in the denominator we will decrease the slope by 20db/decade. These changes will occur at the poles which form our break points and asymptotes.
We get asymptotes at s=3j and s=4.47j from the denominator. For our purposes we can just ignore the imaginary part. We should also have increases of 20db/decade at s=0 and s=3.01 which we find from the numerator.
Convolution
Convolution, by definition, states that H(s)=Y(s)/X(s) where H(s) is the transfer function, Y(s) is the output function, and X(s) is the input function. We would like to find the output of the system, so for our purposes we will rearrange the above equation like this.
State Space Equations
Now we can transfer the functions we already have into state space. This is simply taking our original differential equation and putting it in terms of vectors and matrices. This can make the equations easier to work with.