Solving the Harmonic Oscillator Equation NCSU Department of Math - - PDF document
Solving the Harmonic Oscillator Equation NCSU Department of Math - - PDF document
Solving the Harmonic Oscillator Equation NCSU Department of Math Morgan Root Spring-Mass System Consider a mass attached to a wall by means of a spring. Define y=0 to be the equilibrium position of the block. y(t) will be a measure of
Spring-Mass System
Consider a mass attached to a wall by means of a
- spring. Define y=0 to be the equilibrium position of
the block. y(t) will be a measure of the displacement from this equilibrium at a given time. Take
. and ) (
) (
v y y
dt dy
= =
Basic Physical Laws
- Newton’s Second Law of motion states tells us that the
acceleration of an object due to an applied force is in the direction of the force and inversely proportional to the mass being moved.
- This can be stated in the familiar form:
ma Fnet =
- In the one dimensional case this can be written as:
y m F
net
& & =
Relevant Forces
Hooke’s Law (k is
called Hooke’s constant)
Friction is a force that
- pposes motion. We
assume a friction proportional to velocity.
ky FH − =
y c FF & − =
Harmonic Oscillator
Assuming there are no other forces acting on the system we have what is known as a Harmonic Oscillator or also known as the Spring-Mass- Dashpot.
) ( ) ( ) (
- r
t y c t ky t y m F F F
F H net
& & & − − = + =
Solving the Simple Harmonic System ) ( ) ( ) ( = + + t ky t y c t y m & & &
If there is no friction, c=0, then we have an “Undamped System”, or a Simple Harmonic Oscillator. We will solve this first.
) ( ) ( = + t ky t y m & &
Simple Harmonic Oscillator
t) K ( y(t) t) K ( y(t) t Ky t y K
m k
cos and sin equation. this solve that will functions least two at know We ) ( ) ( : system at the look and can take that we Notice = = − = = & &
Simple Harmonic Oscillator
. Where ) sin( ) cos( ) ( cos. and sin
- f
n combinatio linear a is solution general The
m k
t B t A t y = + = ω ω ω
Simple Harmonic Oscillator
( )
1 2 2
tan and ) ( and where ) sin( ) ( as solution the rewrite can We
v y v m k
y t t y
ω ω
φ ω φ ω
−
= + = Α = + Α =
Visualizing the System
2 4 6 8 10 12 14 16 18 20
- 2
- 1.5
- 1
- 0.5
0.5 1 1.5 2 Undamped SHO Time Displacement m=2 c=0 k=3
Alternate Method: The Characteristic Equation
: have e equation w the into this Subbing ) ( and ) ( . ) ( solution, l exponentia an Assume ) ( ) ( : system at the look and take Again we
2 2 2 2
= + = = ⇒ = = + =
rt rt rt rt rt m k
e e r e r t y re t y e t y t y t y ω ω ω & & & & &
Alternate Method: The Characteristic Equation
) ( and ) ( solutions two have we Thus that require e solution w a have To
2 2 ω ω
ω ω
i i
e t y e t y i r r
−
= = ± = ⇒ − =
Alternate Method: The Characteristic Equation
As before, any linear combination of solutions is a
solution, giving the general solution:
t i t i
e B e A t y
* *
) (
ω ω −
+ =
Euler’s Identity
Recall that we have a
relationship between e and sine and cosine, known as the Euler identity.
Thus our two solutions
are equivalent
( ) ( ) ( ) ( )
t i t e t i t e
t i t i
sin cos and sin cos ω ω ω ω
ω ω
− = + =
−
Rewrite the solution
) sin( ) ( sine with
- ne
and ) ( ls exponentia complex with One : to solutions two have now We
* *
φ ω
ω ω
+ Α = + = = +
−
t t y e A e A t y ky(t) (t) y m
t i t i
& &
Damped Systems
If friction is not zero then we cannot used the same
- solution. Again, we find the characteristic equation.
rt rt rt
e r t y re t y e t y
2
) ( and ) ( then, ) ( Assume = = = & & &
Damped Systems
if
- nly work
can Which have, we and , in Subbing ) ( ) ( ) ( :
- solution t
a for looking now are hat we Remember t
2 2
= + + = + + = + + K Cr r Ke Cre e r y y y t Ky t y C t y
rt rt rt
& & & & & &
Damped Systems
d underdampe 3. damped critically 2.
- verdamped
1.
- ptions
three have We 4 Let where : that us gives This
2 2 2 4
2 2
< = > − = = =
− ± −
α α α ω α ω
ω
C r
m k C C
Underdamped Systems
The case that we are
interested in is the underdamped system.
4
2 2
< − ω C
m c mk C
C K t B t A e t y Be Ae t y
i C i C
2 4 2 2 1 2 /
2 2 2
4 )), sin( ) cos( ( ) (
- r
) ( is solution The
− −
= − = + = + =
− − + −
ω ω ω
α α
Underdamped Systems
ω
φ ω φ ω
2 2
and ), ( tan , , 2 4 Where ) sin( ) ( form, intuitive more a in this rewrite can We
1 2 2 2 y v B A t
m c m c
B y A B A m c mk t e t y
+ −
= = = + = Α − = + Α =
−
Visualizing Underdamped Systems
2 4 6 8 10 12 14 16 18 20
- 1.5
- 1
- 0.5
0.5 1 1.5 2 Underdamped System Time Displacement m=2 c=0.5 k=3
Visualizing Underdamped Systems
2 4 6 8 10 12 14 16 18 20
- 2
- 1.5
- 1
- 0.5
0.5 1 1.5 2 Time Displacement Underdamped Harmonic Oscillator y(t)=Ae-(c/2m)t y(t)=-Ae-(c/2m)t m=2 c=0.5 k=3
Visualizing Underdamped Systems
2 4 6 8 10 12 14 16 18 20
- 0.5
0.5 1 1.5 2 Another Underdamped System Time Displacement m=2 c=2 k=3
Visualizing Underdamped Systems
2 4 6 8 10 12 14 16 18 20
- 2.5
- 2
- 1.5
- 1
- 0.5
0.5 1 1.5 2 2.5 Time Displacement y(t)=Ae-(c/2m)t y(t)=-Ae-(c/2m)t m=2 c=2 k=3 Underdamped Harmonic Oscillator
Will this work for the beam?
The beam seems to fit the harmonic
conditions.
Force is zero when displacement is zero Restoring force increases with displacement Vibration appears periodic
The key assumptions are
Restoring force is linear in displacement Friction is linear in velocity
Writing as a First Order System
- Matlab does not work with second order equations
- However, we can always rewrite a second order ODE as a
system of first order equations
- We can then have Matlab find a numerical solution to this
system
Writing as a First Order System
) ( ) ( ) ( and ) ( ) ( Clearly, ). ( ) ( and ) ( ) ( let can We ) ( and ) ( with , ) ( ) ( ) ( ODE
- rder
second Given this
2 1 2 2 1 2 1
t Cz t Kz t z t z t z t y t z t y t z v y y y t Ky t y C t y − − = = = = = = = + + & & & & & & &
Writing as a First Order System
Matlab. in work that will form a in now is This with 1 where
- r
) ( 1 ) ( form vector
- matrix
in equation the rewrite can we Now
2 1 2 1
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ − − = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ − − = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡
=
v y C K t z z C K t z z z(0) A
Az(t) z(t)
& &
Constants Are Not Independent
Notice that in all our solutions we never have
c, m, or k alone. We always have c/m or k/m.
The solution for y(t) given (m,c,k) is the same
as y(t) given (αm, αc, αk).
Very important for the inverse problem
Summary
We can used Matlab to generate solutions to
the harmonic oscillator
At first glance, it seems reasonable to model a
vibrating beam
We don’t know the values of m, c, or k Need the inverse problem