<< Graphics`Graphics`

memo   Fig 8.4    p.178

δ wn^2/(s^2 + 2 z wn s + 
            wn^2)
gw = 
      Simplify[% /. s ->  I w /. 
            w ->  p wn /. δ -> 1]

Plot[{Abs[gw /. z ->  0.1], Abs[gw /. z ->  0.2]}, {p, 0, 
        3}, GridLines -> Automatic ]

Plot[{Arg[gw /. z ->  0.1]/Degree, 
        Arg[gw /. z ->  0.2]/Degree}, {p, 0, 3}, 
      GridLines -> Automatic ]

yt =  Cos[w t] /. w -> 0.7
eq = x''[t] + 2 ζ wn  x'[t] + 
            wn^2 (x[t] - yt) == 
          0 /. {wn ->  1, ζ ->  0.1}

ans = NDSolve[{eq, x[0] == 1, x'[0] == 0}, 
          x[t], {t, 0, 100}][[1]]
Plot[{x[t] /. ans, yt}, {t, 0, 100}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}, 
      PlotRange ->  {-5, 5}]

Plot[{x[t] /. ans, yt}, {t, 80, 100}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}, 
      PlotRange ->  {-5, 5}]

memo   Fig 8.7

ϵ Exp[
        I θ] w^2/(s^2 + 2 ζ wn s + 
            wn^2)
gw = 
      Simplify[% /. s ->  I w /. 
            w ->  p wn /. {ϵ -> 1, θ ->  
              0}]

Plot[{Abs[gw /. ζ ->  0.1], 
        Abs[gw /. ζ ->  0.2]}, {p, 0, 3}, 
      GridLines -> Automatic ]

Plot[{Arg[gw /. ζ ->  0.1]/Degree, 
        Arg[gw /. ζ ->  0.2]/Degree}, {p, 0, 3}, 
      GridLines -> Automatic ]

example 8.2  Fig. 8.8  p.179

para = {wn ->  1, ζ ->  0.1, ϵ -> 
          1, θ -> 0  °}

ϵ Exp[I θ] 
        w^2/(s^2 + 2 ζ wn s + wn^2)  /. 
      para
gw = Simplify[%] /. s ->  I w /. w ->  p wn /. 
        para

zu1 = 
      Plot[Abs[gw], {p, 0, 3}, GridLines -> Automatic ]

ut = ϵ w^2  Exp[I (w t + θ)] /. para /. 
        w ->  1
eq = z''[t] + 2 ζ wn  z'[t] + wn^2 z[t] == ut /. 
        para

ans = NDSolve[{eq, z[0] == 1, z'[0] == 0}, 
          z[t], {t, 0, 100}][[1]]
Plot[{Re[z[t] /. ans], Re[ut]}, {t, 0, 100}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}, 
      PlotRange ->  {-5, 5}]

Plot[{Re[z[t] /. ans], Re[ut]}, {t, 80, 100}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}, 
      PlotRange ->  {-5, 5}]

oscillo[pin_ , 
        te_] := {pulse = 1 (Sign[Cos[2 Pi pin t] - 0.99] + 1); 
        gwin = gw /. p -> pin; 
apin = 
          Abs[gwin]; ϕpin = Arg[gwin]; 
        xt = apin Cos[
              2 Pi pin t + ϕpin]; 
Plot[{pulse, 
            xt}, {t, 0, te}, PlotPoints ->  500, 
          PlotRange ->  {-5, 5}, 
          PlotStyle ->  {Hue[0.9], Hue[0.7]}]}

oscillo[0.7, 8]; {apin, ϕpin/Degree}

oscillo[1, 2]; {apin, ϕpin/Degree}

oscillo[3, 1]; {apin, ϕpin/Degree}

example 8.3   p.181

ϵ Exp[I θ] 
      w^2/(s^2 + 2 z wn s + wn^2)
gw = 
      Simplify[% /. s ->  I w /. 
              w ->  p wn /. {ϵ -> 
                1, θ ->  0  °} /. 
          z ->  0.1]

zu1 = 
      Plot[Abs[gw /. z ->  0.1], {p, 0, 3}, 
        GridLines -> Automatic ]

oscillo[pin_ , 
        te_] := {pulse = (Sign[Cos[2 Pi pin t] - 0.99] + 1); 
        gwin = gw /. p -> pin; 
apin = 
          Abs[gwin]; ϕpin = Arg[gwin]; 
        xt = apin Cos[
              2 Pi pin t + ϕpin]; 
Plot[{pulse, 
            xt}, {t, 0, te}, PlotPoints ->  500, 
          PlotRange ->  {-5, 5}, 
          PlotStyle ->  {Hue[0.9], Hue[0.7]}]}

oscillo[0.3, 8]; {apin, ϕpin/Degree}

oscillo[1, 2]; {apin, ϕpin/Degree}

oscillo[3, 1]; {apin, ϕpin/Degree}

memo   Fig 8.9  p.182

ϵ Exp[
        I θ] w^2/(s^2 + 2 z wn s + 
            wn^2)
gw = 
      Simplify[% /. s ->  I w /. 
            w ->  p wn /. {ϵ -> 
              1, θ -> - 20 °}]

DisplayTogether[
      ParametricPlot[{Re[
            gw /. z ->  0.1], -Im[gw /. z ->  0.1]}, {p, 0, 
          3}, AspectRatio -> 
          Automatic ], 
ParametricPlot[{Re[
            gw /. z ->  0.2], -Im[gw /. z ->  0.2]}, {p, 0, 
          3}, AspectRatio -> Automatic]]