Laplace transforms:Mass-Spring Oscillator: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Problem Statement===
=Problem Statement=


'''Part 1'''
==Part 1==


An ideal mass ''m''=10kg is sitting on a plane, attached to a rigid surface via a spring. The spring with ''k''=10.8 kN/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. Find the equation of motion that the spring mass system follows if there is an initial impulse applied, and then find the kinematic viscosity value of the fluid so that the mass comes to a stop within three seconds with the initial impulse used.
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_-5.JPG‎|200px|thumb|center|Fig. 1]]
[[Image:Homework_-5b.JPG‎|300px|thumb|center|Fig. 1]]


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


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

==Part 2==


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


'''Part 3'''
==Part 3==


Make a bode plot.
Make a bode plot.


===Solution===
==Part 4==


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


==Part 5==


Use convolution to find the output.
First, a FBR:


==Part 6==


Make a the state equations for this problem
By Newton's first law:
math>\mathbf{F}=m{a} 21:28, 22 October 2009 (UTC) \Rightarrow 21:28, 22 October 2009 (UTC) \mathbf{f}_m(t)=m\ddot{x}</math>
By Hooke's law:
math>\mathbf{F}=k{x} 21:28, 22 October 2009 (UTC) \Rightarrow 21:28, 22 October 2009 (UTC) \mathbf{f}_k(t)=kx</math>


=Solution=



Now we set up our equation of motion:
==Part 1==


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




Line 67: Line 72:




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




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




Line 79: Line 84:




<math>b=\left\{(2)(.146)(10.5)(98.1)\right\}=300.775</math>
<math>b=\left\{(2)(0.2168)(7.07)(10)\right\}=30.667</math>




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




<math>\mathbf{X}(s)=\frac{\frac{1}{m}}{\left\{s^2+\frac{b}{m}s+\frac{k}{m}\right\}} </math>
<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>
We know from Laplace transforms that:




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>\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>


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


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:


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;
<math>\frac{k}{m}=w_0^2</math>
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.
Once we get the Laplace transform into the correct form, we have:




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.
<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>




The equation below is one of the standard shear stress equations:
Now we take the inverse Laplace transform:




<math>\tau=\mu\frac{\dot{x}}{t}</math>.....where <math>t</math> is the film thickness and <math>\mu</math> is the kinematic viscosity.
<math>\mathcal{L}_s^{-1}\left\{x_0\frac{s}{s^2+w_0^2}\right\}=x_0cos(w_0t)</math>




We know that force is just a certain stress applied to an area, so:
<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>




<math>b\dot{x}=\mu A \frac{\dot{x}}{t}</math>
Now that we are back in the time domain we just add the two parts together and we have:




<math>x(t)=x_0cos(w_0t)+\frac{v_0}{w_0}sin(w_0t)</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:
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.


'''Part 2'''


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


The Initial Value Theorem states:


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


<math>\lim_{s \to \infty}s\mathbf{F}(s)=f(o)</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.


So if we plug our equation into this we have:


==Part 2==


<math>\lim_{s \to \infty}s\left\{x_0\frac{s}{s^2+w_0^2}+\frac{v_0}{w_0}\frac{w_0}{s^2+w_0^2}\right\}=x(o)</math>


The Initial Value Theorem states:


<math>\lim_{s \to \infty}\left\{x_0\frac{s^s}{s^2+w_0^2}+\frac{v_0}{w_0}\frac{sw_0}{s^2+w_0^2}\right\}=x(o)</math>


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


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


So if we plug our equation into this we have:



<math>\left\{x_0\right\}=x(o)</math>
<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>




Line 155: Line 173:




<math>f(\infty)=\lim_{s \to 0}s\mathbf{F}(s)</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>


<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>


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
[[Image:HW-7.png‎|560px|thumb|center|Fig. 2]]


==Part 4==
From the transfer function derived earlier,


<math>
<math>x(\infty)=\lim_{s \to 0}s\left\{x_0\frac{s}{s^2+w_0^2}+\frac{v_0}{w_0}\frac{w_0}{s^2+w_0^2}\right\}</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.


==Part 5==
<math>x(\infty)=\lim_{s \to 0}\left\{x_0\frac{s^2}{s^2+w_0^2}+\frac{v_0}{w_0}\frac{sw_0}{s^2+w_0^2}\right\}</math>
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>
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>f(\infty)=\left\{0+0\right\}</math>


<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>f(\infty)=\left\{0\right\}</math>


<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==
It seems as though the Final Value Theorem predicts the final result to be 0. However, in this case, the function is an oscillating one, and the prediction is telling us the average, which is 0. So, in this case the Final Value Theorem is not used to its full potential.


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




<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>
----
----



Latest revision as of 11: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