Laplace transforms:Mass-Spring Oscillator: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Problem Statement:'''
=Problem Statement=


==Part 1==


An ideal mass ''m'' sliding on a frictionless surface, attached via an ideal spring ''k'' to a rigid wall. The spring is at rest when the mass is centered at ''x=0''. Find the equation of motion that the spring mass follows.
An ideal mass ''m''=10kg is sitting on a plane, attached to a rigid surface via a spring. The spring with ''k''=500N/m is exerting zero force when the mass is centered at ''x=0''. Between the mass and plane there is a 1 mm layer of a viscous fluid and the block has an area of .1m^2 in contact the plane. Find the equation of motion that the spring mass system follows if there is an initial impulse applied, and then find the viscosity value of the fluid so that the mass comes to a stop within three seconds with the initial impulse used. Below is a picture/FBR of the system.




[[Image:Homework_-5b.JPG‎|300px|thumb|center|Fig. 1]]
'''Solution:'''




As set up, the mass is sitting at x=0 with positive being to the right.
By Newton's first law:


==Part 2==


Apply the Initial Value and Final Value Theorems to this problem.
<math>\mathbf{F}=m{a} ~~~~~ \Rightarrow ~~~~~ \mathbf{f}_m(t)=m\ddot{x}</math>


==Part 3==


Make a bode plot.
By Hooke's law:


==Part 4==


Find how to use the break points and asymptotes to obtain the magnitude frequency response.
<math>\mathbf{F}=k{x} ~~~~~ \Rightarrow ~~~~~ \mathbf{f}_k(t)=mx</math>


==Part 5==


Use convolution to find the output.
By Newton's third law of motion that states ''every action produces an equal and opposite reaction'', we have f_''k'' = -f_''m''. That is, the force f_''k'' applied by the mass to the spring is equal and opposite to the accelerating force f_''m'' exerted in the -''x'' direction by the spring on the mass:


==Part 6==


Make a the state equations for this problem
<math>\mathbf{f}_m(t)+\mathbf{f}_k(t)=0 ~~~~~~ \Rightarrow ~~~~~ m\ddot{x}(t)+k{x}(t)=0</math>


=Solution=


We now have a second order differential equation that governs the motion of the mass. Taking the Laplace transform of both sides gives:


==Part 1==


<math>0=\mathcal{L}_s\left\{m\ddot{x}+k{x}\right\}</math><br />


Using the FBR from the problem statement we can set up our differential equation:
&nbsp;&nbsp;&nbsp;&nbsp;<math>=m\mathcal{L}_s\left\{\ddot{x}\right\}+k\mathcal{L}_s\left\{x\right\}</math>


&nbsp;&nbsp;&nbsp;&nbsp;<math>=m\left\{s[s\mathbf{X}(s)-x(0)]-\dot{x}(0)\right\}+k\mathbf{X}(s)</math>


&nbsp;&nbsp;&nbsp;&nbsp;<math>=ms^2\mathbf{X}(s)-msx(0)-m\dot{x}(0)+k\mathbf{X}(s)</math>
<math>m\ddot{x}+b\dot{x}+kx=\delta(t)</math>


<math>\ddot{x}+\frac{b}{m}\dot{x}+\frac{k}{m}x=\frac{\delta(t)}{m}</math>


We now have a second order differential equation that governs the motion of the mass. If we make our initial conditions equal to zero, we save a few steps. Taking the Laplace transform of both sides gives:


<math>\mathcal{L}_s\left\{\frac{\delta(t)}{m}\right\}=\mathcal{L}_s\left\{\ddot{x}+\frac{b}{m}\dot{x}+\frac{k}{m}x\right\}</math><br /><br />

<math>\frac{1}{m}\mathcal{L}_s\left\{\delta(t)\right\}=\mathcal{L}_s\left\{\ddot{x}\right\}+\frac{b}{m}\mathcal{L}_s\left\{\dot{x}\right\}+\frac{k}{m}\mathcal{L}_s\left\{x\right\}</math><br /><br />


<math>\frac{1}{m}\left\{1\right\}=\mathbf{X}(s)s^2+\frac{b}{m}\mathbf{X}(s)s+\frac{k}{m}\mathbf{X}(s)</math><br /><br />


<math>\frac{1}{m}=\left\{s^2+\frac{b}{m}s+\frac{k}{m}\right\}\mathbf{X}(s)</math><br /><br />




Line 41: Line 63:




<math>\mathbf{X}(s)=\frac{sx(0)+\dot{x}}{s^2+\frac{k}{m}} </math>
<math>\mathbf{X}(s)=\frac{\frac{1}{m}}{\left\{s^2+\frac{b}{m}s+\frac{k}{m}\right\}} </math>


We now have the function in terms of '''X'''(s). We will use the above equation to help in part 3, but for now we want to continue with part 1. We now want to find the value of ''b'' so that the mass stops oscillating after t=3s. However, we know that it will never actually be zero until a long time after, so for now we will consider motion >2% of original to be stopped. The below formula helps us find the value of ''b'':


<math>t_s=\frac{4.6}{\zeta w_n}</math>


<math>\frac{k}{m}=w_n^2=50</math>


<math>\zeta=\frac{4.6}{(3)(7.07)}=0.2168</math>


Now using the relationship below, we are able to compute the value of ''b'':


<math>\frac{b}{m}=2\zeta w_n</math>


<math>b=\left\{(2)(0.2168)(7.07)(10)\right\}=30.667</math>


When we plug this number into the Laplace transform equation along with the values given:


<math>\mathbf{X}(s)=\frac{\frac{1}{10}}{\left\{s^2+\frac{30.667}{10}s+\frac{500}{10}\right\}} </math>


<math>\mathbf{X}(s)=\frac{0.1}{\left\{s^2+3.066s+50\right\}} </math>


The next step of taking the inverse Laplace transform is pretty complicated since we have complex roots, so I will just show the equation after it has been put back through:


<math>x(t)=0.2cos(6.9029t)e^{-1.533t} \,</math>


If we want to plot the equation above to see whether or not it looks good, we can use the below code in Matlab:

t=0:.01:4;
x=0.2.*cos(6.9029.*t).*exp(-1.533.*t);
plot(t,x);
grid
xlabel('time (sec)');
ylabel('amplitude (m)');
[[Image:HW-5.png|560px|thumb|center|Fig. 1]]


Well, it looks good within that 2% value that we were looking for.


We have found the equation that the mass follows with the value of ''b'' that brings the mass to a "stop" within three seconds. But now we need to find the viscosity of the fluid that goes with that ''b'' value.


The equation below is one of the standard shear stress equations:


<math>\tau=\mu\frac{\dot{x}}{t}</math>.....where <math>t</math> is the film thickness and <math>\mu</math> is the kinematic viscosity.


We know that force is just a certain stress applied to an area, so:


<math>b\dot{x}=\mu A \frac{\dot{x}}{t}</math>


<math>b=\mu\frac{A}{t}</math>


Now we just plug in the values that are given and what we have found and we get:


<math>30.667=\mu\frac{.1}{.001}</math>


<math>\mu=0.3067 \frac{kg}{ms}</math>


We have now found the viscosity value of the fluid used to damper the system. If we look that value up in a book, we find that this is about the viscosity of some SAE-10W oils at reasonable temperatures.


==Part 2==


The Initial Value Theorem states:


<math>\lim_{s \to \infty}s\mathbf{X}(s)=x(o)</math>


So if we plug our equation into this we have:


<math>\lim_{s \to \infty}s\left\{\frac{0.1}{\left\{s^2+3.066s+50\right\}}\right\}=x(o)</math>


<math>\lim_{s \to \infty}\left\{\frac{0.1s}{\left\{s^2+3.066s+50\right\}}\right\}=x(o)</math>


<math>\left\{0\right\}=x(o)</math>


As expected, the Initial Value Theorem shows us that the initial value is just the initial x value.




The Final Value Theorem States:
Using the idea that the initial position x=0 and velocity is just the derivative of position:




<math>\mathbf{X}(s)=\frac{sx_0+v_0}{s^2+\frac{k}{m}} </math>
<math>x(\infty)=\lim_{s \to 0}s\mathbf{X}(s)</math>




<math>x(\infty)=\lim_{s \to 0}s\left\{\frac{0.1}{\left\{s^2+3.066s+50\right\}}\right\}</math>
Now, let's split it into two parts:




<math>\mathbf{X}(s)=\frac{sx_0+v_0}{s^2+\frac{k}{m}}~~~~~\Rightarrow~~~~~\mathbf{X}(s)=\frac{sx_0}{s^2+\frac{k}{m}}+\frac{v_0}{s^2+\frac{k}{m}}</math>
<math>x(\infty)=\lim_{s \to 0}\left\{\frac{0.1s}{\left\{s^2+3.066s+50\right\}}\right\}</math>




<math>s\infty)=\left\{0\right\}</math>
We know from Laplace transforms that:




As expected, the final value will be zero because the mass will come back to rest in the position from which it began at x=0.
<math>\mathcal{L}_s\left\{sin(w_0t)\right\}=\frac{w_0}{s^2+w_0^2}</math>


<math>\mathcal{L}_s\left\{cos(w_0t)\right\}=\frac{s}{s^2+w_0^2}</math>


==Part 3==


From this we know that we are going to have two parts to our solution, and sine wave and a cosine wave. We can also tell that:


I used maple to plot the bode plots of the system using the below code which is pretty simple.


<math>\frac{k}{m}=w_0^2</math>


g = tf([.1],[1 3.066 50]);
bode(g);
grid
[[Image:HW-7.png‎|560px|thumb|center|Fig. 2]]


==Part 4==
Once we get the Laplace transform into the correct form, we have:
From the transfer function derived earlier,


<math>
H(s)=\frac{.1}{s^2 + 3.066s +50}
</math>


it can be seen that there are no zeros (no s variables in the numerator that would make the function equal zero), but there are places in the s-domain in the denominator that would exhibit some interesting behavior. This will occur when the <math>s^2</math> and the <math>k/m</math> term, in this case "50", are on the same order of magnitude. When this happens, one value will quit dominating the other, and therefore cause problems on the real-imaginary coordinate system. This point can be visually observed by finding the intersection of the asymptotes in the Bode Plot. Where they intersect is (roughly) a breakpoint. It looks as though this is also the max of the Bode Plot and possibly the resonant frequency.
<math>\mathbf{X}(s)=x_0\frac{s}{s^2+w_0^2}+\frac{v_0}{w_0}\frac{w_0}{s^2+w_0^2}</math>


==Part 5==
The convolution is a equation that relates the output to the input in terms of the transfer function. As derived in class, it is


<math>
Now we take the inverse Laplace transform:
x(t)=x_{in}(t) * h(t) = \int_{0}^{t} {x(t_0) \, h(t-t_0) \, dt_0}
</math>


Where <math>h(t)</math> is the inverse laplace of the transfer function.


<math>
<math>\mathcal{L}_s^{-1}\left\{x_0\frac{s}{s^2+w_0^2}\right\}=x_0cos(w_0t)</math>
h(t)=\mathcal{L}^{-1} \left\{ \frac{.1}{s^2 + 3.066s + 50} \right\} = x(t)=0.2cos(6.9029t)e^{-1.533t}
</math>


So


<math>
<math>\mathcal{L}_s^{-1}\left\{\frac{v_0}{w_0}\frac{w_0}{s^2+w_0^2}\right\}=\frac{v_0}{w_0}sin(w_0t)</math>
x(t)=
x_{in}(t)*h(t) =
\int_{0}^{t} {\delta(t)0.2cos(6.9029(t-t_0))e^{-1.533(t-t_0)} \, dt_0}
</math>


==Part 6==


If we choose the state variables to be <math> x\frac{}{} </math> and <math> \dot{x} </math>, then the equation is the matrix we have below
Now that we are back in the time domain we just add the two parts together and we have:




<math>
<math>x(t)=x_0cos(w_0t)+\frac{v_0}{w_0}sin(w_0t)</math>
\begin{bmatrix}
\dot{x} \\
\ddot{x}
\end{bmatrix}
=
\begin{bmatrix}
0 & 1 \\
\frac{-b}{m} & \frac{-k}{m}
\end{bmatrix}
\,
\begin{bmatrix}
x \\
\dot{x}
\end{bmatrix}
+
\begin{bmatrix}
0 \\
\frac {1}{m}
\end{bmatrix}
\,\delta(t)
</math>
----


Written by: David Steinweg


Checked by: Nathan Reeves
So we have found the equation that governs the motion of the spring mass system, all that is left is putting in constants for the variables to find numerical answers for any problem of this type.

Latest revision as of 12:54, 23 November 2009

Problem Statement

Part 1

An ideal mass m=10kg is sitting on a plane, attached to a rigid surface via a spring. The spring with k=500N/m is exerting zero force when the mass is centered at x=0. Between the mass and plane there is a 1 mm layer of a viscous fluid and the block has an area of .1m^2 in contact the plane. Find the equation of motion that the spring mass system follows if there is an initial impulse applied, and then find the viscosity value of the fluid so that the mass comes to a stop within three seconds with the initial impulse used. Below is a picture/FBR of the system.


Fig. 1


As set up, the mass is sitting at x=0 with positive being to the right.

Part 2

Apply the Initial Value and Final Value Theorems to this problem.

Part 3

Make a bode plot.

Part 4

Find how to use the break points and asymptotes to obtain the magnitude frequency response.

Part 5

Use convolution to find the output.

Part 6

Make a the state equations for this problem

Solution

Part 1

Using the FBR from the problem statement we can set up our differential equation:




We now have a second order differential equation that governs the motion of the mass. If we make our initial conditions equal to zero, we save a few steps. Taking the Laplace transform of both sides gives:













Now that we have the Laplace transform of the differential equation that governs the motion of the spring and mass system, we need to solve for X(s):



We now have the function in terms of X(s). We will use the above equation to help in part 3, but for now we want to continue with part 1. We now want to find the value of b so that the mass stops oscillating after t=3s. However, we know that it will never actually be zero until a long time after, so for now we will consider motion >2% of original to be stopped. The below formula helps us find the value of b:





Now using the relationship below, we are able to compute the value of b:




When we plug this number into the Laplace transform equation along with the values given:




The next step of taking the inverse Laplace transform is pretty complicated since we have complex roots, so I will just show the equation after it has been put back through:



If we want to plot the equation above to see whether or not it looks good, we can use the below code in Matlab:

t=0:.01:4;
x=0.2.*cos(6.9029.*t).*exp(-1.533.*t);
plot(t,x);
grid
xlabel('time (sec)');
ylabel('amplitude (m)');
Fig. 1


Well, it looks good within that 2% value that we were looking for.


We have found the equation that the mass follows with the value of b that brings the mass to a "stop" within three seconds. But now we need to find the viscosity of the fluid that goes with that b value.


The equation below is one of the standard shear stress equations:


.....where is the film thickness and is the kinematic viscosity.


We know that force is just a certain stress applied to an area, so:




Now we just plug in the values that are given and what we have found and we get:




We have now found the viscosity value of the fluid used to damper the system. If we look that value up in a book, we find that this is about the viscosity of some SAE-10W oils at reasonable temperatures.


Part 2

The Initial Value Theorem states:



So if we plug our equation into this we have:





As expected, the Initial Value Theorem shows us that the initial value is just the initial x value.


The Final Value Theorem States:






As expected, the final value will be zero because the mass will come back to rest in the position from which it began at x=0.


Part 3

I used maple to plot the bode plots of the system using the below code which is pretty simple.


g = tf([.1],[1 3.066 50]);
bode(g);
grid 
Fig. 2

Part 4

From the transfer function derived earlier,

it can be seen that there are no zeros (no s variables in the numerator that would make the function equal zero), but there are places in the s-domain in the denominator that would exhibit some interesting behavior. This will occur when the and the term, in this case "50", are on the same order of magnitude. When this happens, one value will quit dominating the other, and therefore cause problems on the real-imaginary coordinate system. This point can be visually observed by finding the intersection of the asymptotes in the Bode Plot. Where they intersect is (roughly) a breakpoint. It looks as though this is also the max of the Bode Plot and possibly the resonant frequency.

Part 5

The convolution is a equation that relates the output to the input in terms of the transfer function. As derived in class, it is

Where is the inverse laplace of the transfer function.

So

Part 6

If we choose the state variables to be and , then the equation is the matrix we have below



Written by: David Steinweg

Checked by: Nathan Reeves