solving the harmonic oscillator equation

30
Solving the Harmonic Oscillator Equation Morgan Root NCSU Department of Math

Upload: vankien

Post on 13-Jan-2017

254 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Solving the Harmonic Oscillator Equation

Solving the Harmonic Oscillator Equation

Morgan RootNCSU Department of Math

Page 2: Solving the Harmonic Oscillator Equation

Spring-Mass SystemConsider 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 )0( 0)0(

0 vyy dtdy ==

Page 3: Solving the Harmonic Oscillator Equation

Basic Physical LawsNewton’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:

maFnet =In the one dimensional case this can be written as:

ymFnet &&=

Page 4: Solving the Harmonic Oscillator Equation

Relevant ForcesHooke’s Law (k is called Hooke’sconstant)

Friction is a force that opposes motion. We assume a friction proportional to velocity.

kyFH −=

ycFF &−=

Page 5: Solving the Harmonic Oscillator Equation

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

)()()(or

tyctkytym

FFF FHnet

&&& −−=

+=

Page 6: Solving the Harmonic Oscillator Equation

Solving the Simple Harmonic System

0)()()( =++ tkytyctym &&&

If there is no friction, c=0, then we have an “UndampedSystem”, or a Simple Harmonic Oscillator. We will solve this first.

0)()( =+ tkytym &&

Page 7: Solving the Harmonic Oscillator Equation

Simple Harmonic Oscillator

t)K( y(t)t) K(y(t)

tKyty

K mk

cos and sin

equation. thissolve that willfunctions least twoat know We

)()(:system

at thelook and can take that weNotice

==

−=

=

&&

Page 8: Solving the Harmonic Oscillator Equation

Simple Harmonic Oscillator

. Where

)sin()cos()(

cos. andsin ofn combinatio linear a issolution general The

0

00

mk

tBtAty

=

+=

ω

ωω

Page 9: Solving the Harmonic Oscillator Equation

Simple Harmonic Oscillator

( )0

000

0 1220

0

0

tan and )(

and where

)sin()(

assolution therewritecan We

vyv

mk

y

tty

ωω φ

ω

φω

−=+=Α

=

+Α=

Page 10: Solving the Harmonic Oscillator Equation

Visualizing the System

0 2 4 6 8 10 12 14 16 18 20

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Undamped SHO

Time

Dis

plac

emen

t

m=2c=0k=3

Page 11: Solving the Harmonic Oscillator Equation

Alternate Method: The Characteristic Equation

0

:have eequation w theinto thisSubbing

)( and )(

.)( solution, lexponentiaan Assume

0)()(

:system at thelook and takeAgain we

20

2

2

20

0

=+

==⇒

=

=+

=

rtrt

rtrt

rt

mk

eer

ertyrety

ety

tyty

ω

ω

ω

&&&

&&

Page 12: Solving the Harmonic Oscillator Equation

Alternate Method: The Characteristic Equation

00 )( and )(

solutions twohave weThus

thatrequire esolution w a have To

0

20

2

ωω

ω

ω

ii etyety

ir

r

−==

±=⇒

−=

Page 13: Solving the Harmonic Oscillator Equation

Alternate Method: The Characteristic Equation

As before, any linear combination of solutions is a solution, giving the general solution:

titi eBeAty 00 **)( ωω −+=

Page 14: Solving the Harmonic Oscillator Equation

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

( ) ( )

( ) ( )tite

tite

ti

ti

00

00

sincos

andsincos

0

0

ωω

ωω

ω

ω

−=

+=

Page 15: Solving the Harmonic Oscillator Equation

Rewrite the solution

)sin()(

sine with one and

)(

lsexponentiacomplex with One

0

: tosolutions twohave now We

0

** 00

φω

ωω

+Α=

+=

=+

tty

eAeAty

ky(t)(t)ym

titi

&&

Page 16: Solving the Harmonic Oscillator Equation

Damped SystemsIf friction is not zero then we cannot used the same solution. Again, we find the characteristic equation.

rtrt

rt

ertyrety

ety

2)( and )(

then,

)( Assume

==

=

&&&

Page 17: Solving the Harmonic Oscillator Equation

Damped Systems

0

ifonly work can Which

0

have, we and ,in Subbing

0)()()(

:osolution tafor lookingnowarehat weRemember t

2

2

=++

=++

=++

KCrr

KeCreer

yyy

tKytyCty

rtrtrt

&&&

&&&

Page 18: Solving the Harmonic Oscillator Equation

Damped Systems

dunderdampe 0 3.

damped critically 0 2.

overdamped 0 1.

options threehave We

4Let

where

: thatus gives This

20

2

024 2

02

<

=

>

−=

== −±−

α

α

α

ωα

ωω

C

r mkCC

Page 19: Solving the Harmonic Oscillator Equation

Underdamped SystemsThe case that we are interested in is the underdamped system.

04 20

2 <− ωC

mcmk

C

CK

tBtAety

BeAetyiCiC

242

21

2/

2

22

4

)),sin()cos(()(

or

)(

issolution The

=−=

+=

+=−−+−

ω

ωω

αα

Page 20: Solving the Harmonic Oscillator Equation

Underdamped Systems

ω

φ

ω

φω

020

2

and

),(tan ,

,2

4 Where

)sin()(

form, intuitive more ain thisrewritecan We

0

122

2

yv

BA

t

mc

mc

ByA

BA

mcmk

tety

+

==

=+=Α

−=

+Α=−

Page 21: Solving the Harmonic Oscillator Equation

Visualizing Underdamped Systems

0 2 4 6 8 10 12 14 16 18 20-1.5

-1

-0.5

0

0.5

1

1.5

2Underdamped System

Time

Dis

plac

emen

t

m=2c=0.5k=3

Page 22: Solving the Harmonic Oscillator Equation

Visualizing Underdamped Systems

0 2 4 6 8 10 12 14 16 18 20-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Time

Dis

plac

emen

tUnderdamped Harmonic Oscillator

y(t)=Ae-(c/2m)t

y(t)=-Ae-(c/2m)t

m=2c=0.5k=3

Page 23: Solving the Harmonic Oscillator Equation

Visualizing Underdamped Systems

0 2 4 6 8 10 12 14 16 18 20-0.5

0

0.5

1

1.5

2Another Underdamped System

Time

Dis

plac

emen

t

m=2c=2k=3

Page 24: Solving the Harmonic Oscillator Equation

Visualizing Underdamped Systems

0 2 4 6 8 10 12 14 16 18 20-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

Time

Dis

plac

emen

t

y(t)=Ae-(c/2m)t

y(t)=-Ae-(c/2m)t

m=2c=2k=3

Underdamped Harmonic Oscillator

Page 25: Solving the Harmonic Oscillator Equation

Will this work for the beam?The beam seems to fit the harmonic conditions.

Force is zero when displacement is zeroRestoring force increases with displacementVibration appears periodic

The key assumptions areRestoring force is linear in displacementFriction is linear in velocity

Page 26: Solving the Harmonic Oscillator Equation

Writing as a First Order System

Matlab does not work with second order equationsHowever, we can always rewrite a second order ODE as a system of first order equationsWe can then have Matlab find a numerical solution to this system

Page 27: Solving the Harmonic Oscillator Equation

Writing as a First Order System

)()()(and

)()( Clearly,

).()( and )()(let can We)0( and )0( with ,0)()()(

ODEorder second Given this

212

21

21

00

tCztKztz

tztz

tytztytzvyyytKytyCty

−−=

=

=====++

&

&

&

&&&&

Page 28: Solving the Harmonic Oscillator Equation

Writing as a First Order System

Matlab.in work that willform ain now is This

with

10 where

or

)(10

)(

formvector -matrixin equation therewritecan weNow

0

0

2

1

2

1

⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡−−

=

⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡−−

=⎥⎦

⎤⎢⎣

=

vy

CK

tzz

CKt

zz

z(0)

A Az(t)z(t)

&

&

Page 29: Solving the Harmonic Oscillator Equation

Constants Are Not IndependentNotice 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

Page 30: Solving the Harmonic Oscillator Equation

SummaryWe can used Matlab to generate solutions to the harmonic oscillatorAt first glance, it seems reasonable to model a vibrating beamWe don’t know the values of m, c, or kNeed the inverse problem