Mass-Spring Systems and Resonance

Steve Dunbar

Department of Mathematics and Statistics
University of Nebraska-Lincoln
Lincoln, NE 68588-0323
sdunbar@mathlab01.unl.edu

Math 221H, Fall 1993

Covers Nagle & Saff, Section 5.3

JOHN MILTON 1608—1674
Sonorous metal blowing martial sounds:
At which the universal host upsent
A shout that tore hell's concave, and beyond
Frighted the reign of Chaos and old Night.

`JUNIUS' fl. 1770
Is this the wisdom of a great minister? or is it the ominous
vibration of a pendulum?
Letter 12, 30 May 1769

Comparing the effects of damping coefficients

An interesting problem is to compare the the effect of different values of the damping 
coefficient c on the resulting motion of the mass on the spring.   Consider the following problem:  A 3kg mass is attached to a spring with spring constant 12 newtons/meter.  Determine the equation of motion which results if the initial displacement is y(0) = 3, the initial velocity is 0, there is no forcing, and the friction coefficient is 
(a) c = 0
(b) c = 6
(c) c = 12
(d) c = 15

In any case the differential equation is
	3 y''(t) + c y'(t) + 12 y(t) = 0
	y(0) = 3
	y'(0) = 0

sol = DSolve[ {3 y''[t] +0 y'[t] + 12 y[t] == 0,
               y[0] == 3,
               y'[0] == 0},
               y[t],t]

eqa = sol[[1,1,2]]

sol = DSolve[ {3 y''[t] +6 y'[t] + 12 y[t] == 0,
               y[0] == 3,
               y'[0] == 0},
               y[t],t]

eqb = sol[[1,1,2]]

ComplexExpand[eqb]

sol = DSolve[ {3 y''[t] +12 y'[t] + 12 y[t] == 0,
               y[0] == 3,
               y'[0] == 0},
               y[t],t]

eqc = sol[[1,1,2]]

sol = DSolve[ {3 y''[t] +15 y'[t] + 12 y[t] == 0,
               y[0] == 3,
               y'[0] == 0},
               y[t],t]

eqd = sol[[1,1,2]]

Plot[ {eqa,eqb,eqc,eqd}, {t,0,5},
	PlotRange -> { -4,4},
		PlotStyle -> {GrayLevel[0], GrayLevel[.2], 
				GrayLevel[.4], GrayLevel[.6]}]

Resonance as a result of damping and forcing

The dictionary definition of resonance is an excellent preparation for the study of this subject:  So from Digital Webster:

res•o•nance \'rez-en-en(t)s, 'rez-nen(t)s\ n
[ME, fr. MF, fr. L resonatia echo, fr. resonant-, resonans, prp. of resonare to resound]
(15c)
1a: the quality or state of being resonant
b (1): a vibration of large amplitude in a mechanical or electrical system caused by a relatively small periodic stimulus of the same or nearly the same period as the natural vibration period of the system
 (2): the state of adjustment that produces resonance in a mechanical or electrical system
2a: the intensification and enriching of a musical tone by supplementary vibration

For simplicity, I will develop the notion of resonance in the context of  a  specific eequation.  This will simplify the notation.  

So consider a forced mass-spring oscillator system with friction or damping. The mass is taken to be 1 kg.  The spring constant is taken to be 4 newtons/meter.  The damping can be varied.  The frequency of the forcing term can also be varied.  We want to look at the response of the system  to the this forcing under a variety of damping conditions.

The equation is 
y''[t] + b y'[t] + 4 y[t] = 2 Sin[ a t]
y[0] = 0
y'[0] = 0
The forcing frequency coefficient is a.
The damping coefficient is b.

Clear[y,t]

hde = y''[t] + b y'[t] + 4 y[t] == 0

DSolve[hde, y[t], t]

yh = y[t] /. %

yh = First[%]

yp = A Cos[a t] + B Sin[ a t]

D[yp, {t,2}] + b D[yp, t] + 4 yp

Collect[ %, {Cos[a t], Sin[a t]}]

uceqns = { 4 A - A a^2 + B a b == 0, 4 B - B a^2 - A a b == 2}

coeffs = Solve[uceqns, {A, B}]

yp = First[ A Cos[ a t] + B Sin[ a t] /. coeffs]

Having solved for the particular solution, I now put that particular solution in amplitude-phase form.  All I really want is the amplitude, so I calculate that expression.

F0 = First[Sqrt[ A^2 + B^2] /. coeffs]

F0 = Simplify[F0]

This then is the amplitude of the steady state response to the input forcing term.  Now we wantt to plot the amplitude of the steady-state response as a function of the input  frequency and the damping coefficient.  (Here is where Mathematica really shines!  I've never seen this result revealed so clearly as in this graph!!)

Plot3D[ F0, {b, 0, 4}, {a, 1,3}, PlotRange -> {0, 5}]

Notice that something funny is happening near a = 2, and b = 0.  The error messages suggest that the graph "hits" inifinity near here.  Notice too that the natural frequency of the undamped oscillator is 2!  This sounds suspiciously like the dictionary definition given above!  Lets plot the response as a function of forcing frequnecy for a damping coefficient near b = 0.

Plot[F0 /. b -> 0.25, {a, 1,3}]

The responce gets large near a = 2, and b = 0.25.  Let's actually find the full solution to the initial value problem.

y =(yh + yp) /. {a -> 2, b -> 0.25}

ComplexExpand[ y]

ic1 =( y /. t-> 0) == 0

ic2 = (D[y,t] /. t-> 0) == 0

iceqns = { ic1, ic2}

Solve[ iceqns, {C[1], C[2]}]

y = y /. %

ComplexExpand[ First[%]]

trialsoln =Expand[%]

Plot[ trialsoln,{t, 0, 40},PlotPoints -> 50 ]

So the solution has been amplified !   The steady state amplitude is about double that of the input!  Now let's see what happpens when there is no friction.

Forced, Undamped Motion

Now let's see what happpens when there is no friction. 
  The equation has changed considerably, so we should properly re-solve from the beginning.

Clear[z,t]

hde = z''[t] + 4 z[t]  == 0

DSolve[hde, z[t], t]

zh = %[[1,1,2]]

zp = C t Cos[2 t] + D t Sin[2 t]

D[ zp, {t,2} ] + 4 zp

Simplify[%]

zp = (-1/2) t Cos[ 2t]

D[ zp, {t,2}] + 4 zp

z = zh + zp

ic1 = (z /. t -> 0) ==0

ic2 = (D[z,t] /. t -> 0) == 0

Solve[ {ic1, ic2}, {C[1], C[2]}]

z = First[First[z /. %]]

Plot[ z, {t, 0, 40}, PlotPoints -> 50]

Notice that growing factor of t  in the particualr solution.  No  wonder that  the graphing complained about an infinite output response amplitude when the friction coefficient b = 0.! This is the case of pure resonance, the previous graph was the case of damped resonance.

Exercise

Given the initial value problem
	
	x''(t )  + x(t) =  cos ω t + sim ω t 
	x(0) = 0
	x'(0) = 0

Find a value of  ω such that the solution has beats, and graph the solution.
Find a value such that the solution is resonance, and graph the solution.
Find a value of ω such that the solution is the superposition of two periodic functions, the ratio of whose periods is irrational.   Graph the solution.  Is the solution periodic?