{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Fo nt 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 255 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "drivnosc.mws 9/22/97" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 96 "Plot the \+ phase and amplitude response of a driven, damped oscillator as a funct ion of frequency." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 106 "It is interesting that very heavy damping (b=10, k=10, m =1) crushes the response away from zero frequency." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "restart;with(plots) :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "assume(k,real);assume( m,real);assume(A,real);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 " assume(omega>0);assume(t,real);assume(b,real);assume(phi,real);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "eqn:=A*exp(I*(omega*t+phi))- k*x(t)-b*diff(x(t),t) = m*diff(x(t),t,t);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 20 "s:=dsolve(eqn,x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "x:=rhs(s);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "values:=\{A=1,m=1,k=10,b=1/5\};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "xs:=subs(values,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "steady:=op(1,xs); # keep only the oscillating terms f or steady state response" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "ev:=evalc(subs(t=0,phi=0,steady));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 131 "The conventional phase response is the driver phase - the resp onding phase, so the amplitude response will be found as exp(-I alph) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "assume(alph,real); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "cosal:=op(1,ev);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "sinal:=-op(2,ev)/I;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "alph:=arctan(sinal/cosal);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "plot(alph+Pi*Heaviside(-alph),omega=2..4, title=` phase [0->Pi] vs. omega`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "The driver is in phase with the driven system at very low freq uencies, and pulls ahead until it is Pi/2 ahead at resonance, and goes on to be Pi ahead (180 degrees out of phase) at very high frequencies ." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 111 "The Heaviside function forces the inverse tangent to run between 0 and Pi , rather than between -Pi/2 and +Pi/2." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "xcc:=subs(I=-I,steady); # get complex conjugate" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "xmag:=simplify(steady*xcc); # get m agnitude squared" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "xev:=si mplify(evalc(xmag));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "plo t(sqrt(xev),omega=0..6,title=`Response amplitude vs freq.`);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 4 0" 106 } {VIEWOPTS 1 1 0 1 1 1803 }