(* Using Impulse Invariance to Convert an Analog to a Discrete System
by Nasser M. Abbasi
Version: May 3, 2010*)
Manipulate[
 process[\[Xi], \[CapitalOmega]n, T],
 Panel[Labeled[Grid[{
     {Text["\[Xi]"], 
      Control[{{\[Xi], .07, ""}, 0, 1.2, .1, Appearance -> "Labeled" ,
         ImageSize -> Small}]},
     {Text[
       "\!\(\*SubscriptBox[\(\[CapitalOmega]\), \(n\)]\) (rad/sec)"], 
      Control[{{\[CapitalOmega]n, 1, ""}, 0.01, Pi, .1, 
        Appearance -> "Labeled" , ImageSize -> Small}]},
     {Text@Row[{Style["T", Italic], " (sec)"}], 
      Control[{{T, 1, ""}, 0.01, 2 Pi, .1, Appearance -> "Labeled" , 
        ImageSize -> Small}]}
     }, Spacings -> {0, 0}], 
   Column[{Text@Style["second-order system specification", 11], 
     Text@Row[{Style["y", Italic]'', "(", Style["t", Italic], 
        ") + 2 \[Xi] ", Subscript[\[CapitalOmega], 
        Style["n", Italic]], Style["y", Italic]', "(", 
        Style["t", Italic], ") + ", 
\!\(\*SubsuperscriptBox[\(\[CapitalOmega]\), \(Style["\", 
          Italic]\), \(2\)]\), Style["y", Italic], "(", 
        Style["t", Italic], ") = \[Delta](", Style["t", Italic], 
        ")"}]}, Center],
   {{Top, Center}}, Spacings -> {0, 1}
   ], FrameMargins -> 7, ImageSize -> 260],
 Panel[Grid[{{Dynamic[If[\[Xi] > 0, Text@Style[Row[{
           Style["y", Italic]'', "(", Style["t", Italic], ") + ", 
           ToString[
            NumberForm[2 \[Xi] \[CapitalOmega]n, {4, 3}, 
             NumberPadding -> {"", "0"}]], Style["y", Italic]', "(", 
           Style["t", Italic], ") + ", 
           ToString[
            NumberForm[\[CapitalOmega]n^2, {4, 3}, 
             NumberPadding -> {"", "0"}]], Style["y", Italic], "(", 
           Style["t", Italic], ") = \[Delta](", Style["t", Italic], 
           ")"}], 11], 
       Text@Style[
         Row[{Style["y", Italic]'', "(", Style["t", Italic], ") + ", 
           ToString[
            NumberForm[\[CapitalOmega]n^2, {4, 3}, 
             NumberPadding -> {"", "0"}]], Style["y", Italic], "(", 
           Style["t", Italic], ") = \[Delta](", Style["t", Italic], 
           ")"}], 11]]]}}, Spacings -> {0, 0}, Alignment -> Left, 
   ItemSize -> 30, Frame -> None], FrameMargins -> 7, ImageSize -> 260
  ], Panel[Grid[{{Labeled[Control[{{maxy, 1, ""}, 0.1, 10, .1,
        ImageSize -> Small,
        ControlType -> VerticalSlider, 
        Enabled -> Dynamic@TrueQ[fixScale == 0]}], 
      Text@Column[{Row[{Style["y", Italic], "(", Style["t", Italic], 
           ")"}], " scale"}, Alignment -> Center], {{Top, Center}}, 
      Spacings -> {0, 0}],
     Dynamic[
      Plot[If[\[Xi] == 1, 
        t Exp[-t \[CapitalOmega]n], -((
         E^(t (-\[Xi] \[CapitalOmega]n - \[CapitalOmega]n Sqrt[-1 + \
\[Xi]^2])) - E^(
          t (-\[Xi] \[CapitalOmega]n + \[CapitalOmega]n Sqrt[-1 + \
\[Xi]^2])))/(2 \[CapitalOmega]n Sqrt[-1 + (\[Xi]^2) ]))], {t, 0, 
        If[TrueQ[fixScale == 1], 50, maxt]}, ImageMargins -> 0, 
       ImageSize -> 220, ImagePadding -> {{40, 40}, {10, 20}}, 
       AspectRatio -> .6,
       PlotRange -> {{0, If[TrueQ[fixScale == 1], Automatic, maxt]}, 
         If[TrueQ[fixScale == 1], All, {-maxy, maxy}]},
       AxesLabel -> {Text@Row[{Style["t", Italic], " (sec)"}], 
         Text@Row[{Style["y", Italic], "(", Style["t", Italic], ")"}]},
       PlotLabel -> Text@Row[{Style["impulse response", 11],
           
           If[\[Xi] < 1, Style[" (underdamped)", 11], 
            If[\[Xi] > 1, Style[" (overdamped)", 11], 
             Style[" (critcally damped)", 11]]]
           },
          Alignment -> Center],
       AxesOrigin -> {0, 0}, TicksStyle -> Directive[8], 
       PlotStyle -> Red]]},
    {Control[{{maxt, 50, Text["time scale"]}, 0.1, 100, .1, 
       Appearance -> "Labeled" , ImageSize -> Small, 
       Enabled -> Dynamic@TrueQ[fixScale == 0]}], 
     SpanFromLeft}, {Control[{{fixScale, 1, 
        Text["use automatic scale"]}, {0, 1} , 
       ControlType -> Checkbox, ImageSize -> Small}], SpanFromLeft}
    }, Alignment -> Center, Spacings -> {0, 0}, Frame -> None],
  FrameMargins -> 5
  ],
 Panel[Grid[{
    {Column[{Dynamic[
        Plot[0, {t, .5, 
          If[\[Xi] < .5, -2, 
           If[\[CapitalOmega]n < 1, -2, 
            If[\[CapitalOmega]n < 2, -4.5, -6]]] }, 
         ImageSize -> {130}, ImageMargins -> 0, 
         ImagePadding -> {{15, 5}, {5, 20}},
         AspectRatio -> 1.6,
         PlotRange -> 
          If[TrueQ[fixScaleHsPoles == 1], 
           
           If[\[Xi] < 
             1, {{-1.2 \[CapitalOmega]n \[Xi], .2 \[CapitalOmega]n \
\[Xi]}, {-1.2 (\[CapitalOmega]n Sqrt[ 1 - \[Xi]^2]), 
              1.2 \[CapitalOmega]n Sqrt[ 1 - \[Xi]^2]}}, 
            If[\[Xi] > 
              1, {{-1.2 (\[CapitalOmega]n \[Xi] + \[CapitalOmega]n \
Sqrt[ \[Xi]^2 - 
                    1]), .5}, {-.2, .2}}, {{-\[CapitalOmega]n, .5}, \
{-.2, .2}}]], 
           If[\[Xi] < .5, {{-2, .5}, {-3.5, 3.5}}, 
            If[\[CapitalOmega]n < 1, {{-2, .5}, {-3.5, 3.5}}, 
             If[\[CapitalOmega]n < 
               2, {{-4.5, .5}, {-3.5, 3.5}}, {{-6, .5}, {-3.5, 
                3.5}}]]]],
         AxesOrigin -> {0, 0},
         Ticks -> 
          If[TrueQ[fixScaleHsPoles == 1], 
           If[\[Xi] < 
             1, {{-1.2 \[CapitalOmega]n \[Xi], -.5 \[CapitalOmega]n \
\[Xi]}, Automatic}, 
            If[\[Xi] > 
              1, {{-1.2 (\[CapitalOmega]n \[Xi] + \[CapitalOmega]n \
Sqrt[ \[Xi]^2 - 
                    1]), -.5 (\[CapitalOmega]n \[Xi] + \
\[CapitalOmega]n Sqrt[ \[Xi]^2 - 1])}, 
              Automatic}, {{-\[CapitalOmega]n, .5}, Automatic}]], 
           If[\[Xi] < .5, {{-2, -1}, , {-3, 3}}, 
            If[\[CapitalOmega]n < 1, {{-2, -1}, , {-3, 3}}, 
             
             If[\[CapitalOmega]n < 
               2, {{-4, -2}, , {-3, 3}}, {{-6, -4, -2}, , {-3, 3}}]]]],
         TicksStyle -> Directive[8], 
         PlotLabel -> Text@Row[{Style[H[s], 11], Style[" poles", 11]}],
         AxesLabel -> {None, 
           Text@Row[{Style["j", Italic], "\[CapitalOmega]"}]}, 
         Epilog -> {{Thin, Red, 
            Line[{{0, 0}, 
              If[\[Xi] < 
                1, {-\[CapitalOmega]n \[Xi], \[CapitalOmega]n Sqrt[ 
                 1 - \[Xi]^2]}, 
               If[\[Xi] > 
                 1, {-\[CapitalOmega]n \[Xi] + \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 0}, {-\[CapitalOmega]n, 0}]]}]}, {Thin, Red, 
            Line[{{0, 0}, 
              If[\[Xi] < 
                1, {-\[CapitalOmega]n \[Xi], -\[CapitalOmega]n Sqrt[ 
                 1 - \[Xi]^2]}, 
               If[\[Xi] > 
                 1, {-\[CapitalOmega]n \[Xi] - \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 0}, {-\[CapitalOmega]n, 0}]]}]}, 
           Text[Style["\[Cross]", Bold, 16], 
            If[\[Xi] < 
              1, {-\[CapitalOmega]n \[Xi], \[CapitalOmega]n Sqrt[ 
               1 - \[Xi]^2]}, 
             If[\[Xi] > 
               1, {-\[CapitalOmega]n \[Xi] + \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 0}, {-\[CapitalOmega]n, 0}]], {0, 0}], 
           
           Text[Style["\[Cross]", Bold, 16], 
            If[\[Xi] < 
              1, {-\[CapitalOmega]n \[Xi], -\[CapitalOmega]n Sqrt[ 
               1 - \[Xi]^2]}, 
             If[\[Xi] > 
               1, {-\[CapitalOmega]n \[Xi] - \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 0}, {-\[CapitalOmega]n, 0}]], {0, 0}]}]]
       , Control[{{fixScaleHsPoles, 0, 
          Text["use automatic scale"]}, {0, 1} , 
         ControlType -> Checkbox, ImageSize -> Small}]}, 
      Spacings -> {0, 0}],
     Dynamic[Plot[0, {t, -1.1, 1.1}, ImageSize -> {130},
       ImageMargins -> 0, ImagePadding -> {{1, 1}, {5, 10}}, 
       AspectRatio -> 1, PlotRange -> All, AxesOrigin -> {0, 0},
       PlotLabel -> Style[Text@Row[{H[z], Style[" poles"]}], 11],
       Ticks -> None, 
       Epilog -> {Circle[{0, 0}, 1], 
         Text[Style["\[Cross]", Bold, 16], 
          If[\[Xi] < 
            1, {Exp[-\[CapitalOmega]n \[Xi] T] Cos[\[CapitalOmega]n T \
Sqrt[1 - \[Xi]^2]], 
            Exp[-\[CapitalOmega]n \[Xi] T] Sin[
              T \[CapitalOmega]n Sqrt[1 - \[Xi]^2]]}, 
           If[\[Xi] > 
             1, {Exp[-\[CapitalOmega]n \[Xi] T + \[CapitalOmega]n T \
Sqrt[ -1 + \[Xi]^2]], 0}, {Exp[-\[CapitalOmega]n T], 0}]], {0, 0}], 
         Text[Style["\[Cross]", Bold, 16], 
          If[\[Xi] < 
            1, {Exp[-\[CapitalOmega]n \[Xi] T] Cos[-T \
\[CapitalOmega]n Sqrt[1 - \[Xi]^2]], 
            Exp[-T \[CapitalOmega]n \[Xi]] Sin[-T \[CapitalOmega]n \
Sqrt[1 - \[Xi]^2]]}, 
           If[\[Xi] > 
             1, {Exp[-\[CapitalOmega]n \[Xi] T - \[CapitalOmega]n T \
Sqrt[ -1 + \[Xi]^2]], 0}, {Exp[-\[CapitalOmega]n T], 0}]], {0, 0}],
         {Thin, Red, 
          Line[{{0, 0}, 
            If[\[Xi] < 
              1, {Exp[-\[CapitalOmega]n \[Xi] T] Cos[
                T \[CapitalOmega]n Sqrt[1 - \[Xi]^2]], 
              Exp[-T \[CapitalOmega]n \[Xi]] Sin[
                T \[CapitalOmega]n Sqrt[1 - \[Xi]^2]]}, 
             If[\[Xi] > 
               1, {Exp[-T \[CapitalOmega]n \[Xi] + 
                 T \[CapitalOmega]n Sqrt[ -1 + \[Xi]^2]], 
               0}, {Exp[-T \[CapitalOmega]n], 0}]]}]}, {Thin, Red, 
          Line[{{0, 0}, 
            If[\[Xi] < 
              1, {Exp[-T \[CapitalOmega]n \[Xi]] Cos[-T \
\[CapitalOmega]n Sqrt[1 - \[Xi]^2]], 
              Exp[-T \[CapitalOmega]n \[Xi]] Sin[-T \[CapitalOmega]n \
Sqrt[1 - \[Xi]^2]]}, 
             If[\[Xi] > 
               1, {Exp[-T \[CapitalOmega]n \[Xi] - 
                 T \[CapitalOmega]n Sqrt[ -1 + \[Xi]^2]], 
               0}, {Exp[-T \[CapitalOmega]n], 0}]]}]}
         }]]}},
   Alignment -> Left,
   Spacings -> {0, 0}, Frame -> None, ItemSize -> {12, 5}], 
  FrameMargins -> 1, ImageSize -> {{260, 180}}
  ],
 
 {{t, 0}, ControlType -> None},
 {{maxy, 1}, ControlType -> None},
 {{maxt, 50}, ControlType -> None},
 {{fixScale, 1}, ControlType -> None},
 ContinuousAction -> False,
 SynchronousUpdating -> True,
 AutorunSequencing -> {1, 2, 3},
 ControlPlacement -> Left,
 Initialization :> 
  {
   
   str[expr_] := 
    Module[{}, 
     StringReplace[ToString[expr, FormatType -> TraditionalForm], 
      c : LetterCharacter ~~ "$" ~~ DigitCharacter .. :> c]
     ];
   
   numIt[v_, s1_, s2_] := Module[{},
     ToString[
      AccountingForm[Chop[v], {s1, s2}, NumberPadding -> {" ", "0"}, 
       NumberSigns -> {"-", ""}]]
     ];
   
   formatHsPoles[\[CapitalOmega]n_, \[Xi]_, T_] := Module[{p1, p2},
     p1 = 
      If[\[Xi] == 0, 
       Row[{Style["j", Italic], numIt[T \[CapitalOmega]n, 6, 4]}], 
       If[\[Xi] < 1, 
        Row[{numIt[-\[CapitalOmega]n \[Xi] T, 6, 4], " + ", 
          Style["j", Italic], 
          numIt[\[CapitalOmega]n T Sqrt[ 1 - \[Xi]^2], 6, 4]}], 
        Row[{numIt[-\[CapitalOmega]n \[Xi] T + \[CapitalOmega]n T \
Sqrt[ \[Xi]^2 - 1], 6, 4]}]]];
     
     p2 = 
      If[\[Xi] == 0, 
       Row[{Style["- j", Italic], numIt[\[CapitalOmega]n T, 6, 4]}], 
       If[\[Xi] < 1, 
        Row[{numIt[-\[CapitalOmega]n \[Xi] T, 6, 4], " - ", 
          Style["j", Italic], 
          numIt[\[CapitalOmega]n T Sqrt[ 1 - \[Xi]^2], 6, 4]}], 
        Row[{numIt[-\[CapitalOmega]n \[Xi] T - \[CapitalOmega]n T \
Sqrt[ \[Xi]^2 - 1], 6, 4]}]]];
     {p1, p2}
     ];
   
   formatHsPoles[\[CapitalOmega]n_, \[Xi]_] := Module[{p1, p2},
     p1 = 
      If[\[Xi] == 0, 
       Row[{Style["j", Italic], numIt[\[CapitalOmega]n, 6, 4]}], 
       If[\[Xi] < 1, 
        Row[{numIt[-\[CapitalOmega]n \[Xi], 6, 4], " + ", 
          Style["j", Italic], 
          numIt[\[CapitalOmega]n Sqrt[ 1 - \[Xi]^2], 6, 4]}], 
        Row[{numIt[-\[CapitalOmega]n \[Xi] + \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 6, 4]}]]];
     
     p2 = 
      If[\[Xi] == 0, 
       Row[{Style["- j", Italic], numIt[\[CapitalOmega]n, 6, 4]}], 
       If[\[Xi] < 1, 
        Row[{numIt[-\[CapitalOmega]n \[Xi], 6, 4], " - ", 
          Style["j", Italic], 
          numIt[\[CapitalOmega]n Sqrt[ 1 - \[Xi]^2], 6, 4]}], 
        Row[{numIt[-\[CapitalOmega]n \[Xi] - \[CapitalOmega]n Sqrt[ \
\[Xi]^2 - 1], 6, 4]}]]];
     {p1, p2}
     ];
   
   formatHzPoles[\[CapitalOmega]n_, \[Xi]_, T_] := 
    Module[{p1, p2, t1, tt1, t2, tt2, t3, tt3},
     (*for  zeta < 1*)
     tt1 = 
      N[Exp[-\[CapitalOmega]n \[Xi] T] Cos[\[CapitalOmega]n T Sqrt[
          1 - \[Xi]^2]]];
     tt2 = 
      N[Exp[-\[CapitalOmega]n \[Xi] T] Sin[
         T \[CapitalOmega]n Sqrt[1 - \[Xi]^2]]];
     
     (*for  zeta > 1*)
     t1 = 
      N[Exp[T (-\[CapitalOmega]n \[Xi] + \
\[CapitalOmega]n  Sqrt[\[Xi]^2 - 1])]];
     t2 = 
      N[Exp[T (-\[CapitalOmega]n \[Xi] - \
\[CapitalOmega]n  Sqrt[\[Xi]^2 - 1])]];
     
     (*for  zeta = 1*)
     t3 = 
      N[Exp[-\[CapitalOmega]n \[Xi] T + \[CapitalOmega]n T \
Sqrt[\[Xi]^2 - 1]]];
     tt3 = 
      N[Exp[-\[CapitalOmega]n \[Xi] T - \[CapitalOmega]n T \
Sqrt[\[Xi]^2 - 1]]];
     
     p1 = 
      If[\[Xi] < 1, 
       Row[{numIt[tt1, 6, 4], If[Sign[tt2] == 1, " + ", " - "], 
         Style[" j", Italic], numIt[Abs[tt2], 6, 4]}], 
       If[\[Xi] > 1, Row[{numIt[t1, 6, 4]}], 
        numIt[N[Exp[- \[CapitalOmega]n T]], 6, 4]]];
     
     p2 = 
      If[\[Xi] < 1, 
       Row[{numIt[tt1, 6, 4], If[Sign[tt2] == 1, " - ", " + "], 
         Style["j", Italic], numIt[Abs[tt2], 6, 4]}], 
       If[\[Xi] > 1, Row[{numIt[t2, 6, 4]}], 
        numIt[N[Exp[-\[CapitalOmega]n T]], 6, 4]]];
     
     {p1, p2}
     ];
   
   process[\[Xi]_, \[CapitalOmega]n_, Ts_] := 
    Module[{s, \[CapitalOmega], plotOptions, hz, z, dtft, \[Omega], 
      fourierTransformPlot, dtftPlot, tfLaplace, tfFourier, ps1, ps2, 
      absMag, fourierTransformPlotLabel, ps1Str, ps2Str, f1, f2, 
      dtftPlotLabel, pz1Str, pz2Str, f3, f4, p1Coeff, p2Coeff},
     
     plotOptions = {ImageSize -> {310}, ImageMargins -> 0, 
       ImagePadding -> {{45, 55}, {20, 30}},
       AspectRatio -> .45, PlotStyle -> {Thick, Red}};
     
     ps1 = 
      Chop[-\[CapitalOmega]n \[Xi] - \[CapitalOmega]n Sqrt[-1 + \
\[Xi]^2]]; 
     ps2 = Chop[ -\[CapitalOmega]n \[Xi] + \[CapitalOmega]n Sqrt[-1 + \
\[Xi]^2]];
     {ps1Str, ps2Str} = formatHsPoles[\[CapitalOmega]n, Chop[\[Xi]]];
     {pz1Str, pz2Str} = 
      formatHzPoles[\[CapitalOmega]n, Chop[\[Xi]], Ts];
     tfLaplace = 1/(
      s^2 + 2 \[Xi] \[CapitalOmega]n s + \[CapitalOmega]n^2);
     
     tfFourier = tfLaplace /. s -> I \[CapitalOmega];
     absMag = ComplexExpand[Abs[tfFourier]];
     
     fourierTransformPlotLabel = Grid[{
        {Graphics[Text@Style["H(s)", Italic, 12], 
          ImageSize -> {35, 30}],
         Graphics[
          Text["1"/
            If[\[Xi] > 0, 
             Style[Row[{Style["s", Italic]^2, " +", 
                ToString[
                 NumberForm[2 \[Xi] \[CapitalOmega]n, {6, 4}, 
                  NumberPadding -> {" ", "0"}]], Style[" s", Italic], 
                " +", ToString[
                 NumberForm[\[CapitalOmega]n^2, {6, 4}, 
                  NumberPadding -> {" ", "0"}]]}, ImageMargins -> 0], 
              12], Style[
              Row[{Style["\!\(\*SuperscriptBox[\(s\), \(2\)]\)", 
                 Italic], " + ", 
                ToString[
                 NumberForm[\[CapitalOmega]n^2, {6, 4}, 
                  NumberPadding -> {" ", "0"}]]}]]]], 
          ImageSize -> {280, 30}], 
         SpanFromLeft}, {Graphics[Text[Style["poles", 12]], 
          ImageSize -> {35, 30}], 
         Graphics[Text@Style[ps1Str, 12], ImageSize -> {110, 30}], 
         Graphics[Text@Style[ps2Str, 12], ImageSize -> {110, 30}]}
        }, Frame -> All, Alignment -> Center, Spacings -> {0, 0}];
     
     fourierTransformPlot = 
      Framed@Plot[20 Log[10, absMag], {\[CapitalOmega], 0, 2 Pi},
        AxesOrigin -> {0, 0},
        Evaluate[plotOptions],
        PlotRange -> {{0, 2 Pi}, {-40, 80}},
        AxesLabel -> {Style[
           Text@TraditionalForm@
             Row[{"\[CapitalOmega] ", "(rad/sec)"}], 10], 
          Style[Text@
            TraditionalForm@
             Row[{"20 log|", Subscript[H, a], "(", Style["j", Italic],
                " \[CapitalOmega])|", " (db)"}], 10]}, 
        PlotLabel -> 
         Style["continuous\[Hyphen]time Fourier transform magnitude \
spectrum", Bold, 12]];
     
     If[\[Xi] == 1, hz = (Ts z  Exp[ps1 Ts])/(Exp[ps1 Ts] - z)^2, 
      hz = (Ts z)/(z - Exp[ps1 Ts]) + (Ts z)/(z - Exp[ps2 Ts])];
     
     If[\[Xi] != 
       1, {f1 = (-Ts Exp[\[Xi] \[CapitalOmega]n])/(
        2 Sin[\[CapitalOmega]n Sqrt[1 - \[Xi]^2]]); 
       f2 = (Ts Exp[\[Xi] \[CapitalOmega]n])/(
        Exp[\[CapitalOmega]n Sqrt[\[Xi]^2 - 1]] - 
         Exp[-\[CapitalOmega]n Sqrt[\[Xi]^2 - 1]]); f3 = -f1; 
       f4 = (Ts Exp[\[Xi] \[CapitalOmega]n])/(
        Exp[-\[CapitalOmega]n Sqrt[\[Xi]^2 - 1]] - 
         Exp[\[CapitalOmega]n Sqrt[\[Xi]^2 - 1]])}];
     
     p1Coeff = 
      numIt[If[\[Xi] < 1, Abs[f1], If[\[Xi] > 1, Abs[f2], 0]], 6, 4];
     p2Coeff = 
      numIt[If[\[Xi] < 1, Abs[f3], If[\[Xi] > 1, Abs[f4], 0]], 6, 4];
     
     {ps1Str, ps2Str} = 
      formatHsPoles[\[CapitalOmega]n, Chop[\[Xi]], Ts];
     dtftPlotLabel = Grid[{
        {Graphics[Text@Style["H(z)", Italic, 12], 
          ImageSize -> {35, 30}],
         Graphics[
          If[\[Xi] == 1, 
           Style[Text@
             Row[{Row[{numIt[Ts, 6, 4], Style[" z ", Italic], "exp", 
                  "(", ps1Str, ")"}]/
                Row[{"(", Style["z", Italic], " - ", "exp", "(", 
                  ps1Str, 
                  ") \!\(\*SuperscriptBox[\()\), \(2\)]\)"}]}], 9], 
           Text@Row[{Row[{If[\[Xi] < 1, 
                  If[f1 < 0, Style["j ", Italic], 
                   Style["- j ", Italic]], If[f2 < 0, "- "]], p1Coeff,
                  Style[" z", Italic]}]/
               Style[Row[{Style["z", Italic], " - ", "exp", "(", 
                  ps1Str, ")"}], 9], 
              If[\[Xi] < 1, If[f3 < 0, " - ", " + "], 
               If[f4 < 0, " - ", " + "]], 
              Row[{If[\[Xi] < 1, Style[" j ", Italic]], p2Coeff, 
                 Style[" z", Italic]}]/
               
               Style[Row[{Style["z", Italic], " - ", "exp", "(", 
                  ps2Str, ")"}], 9]}]], ImageSize -> {280, 30}], 
         SpanFromLeft},
        {Graphics[Text@Style["poles", 12], ImageSize -> {35, 30}], 
         Graphics[Text@Style[pz1Str, 12], ImageSize -> {110, 30}], 
         Graphics[Text@Style[pz2Str, 12], ImageSize -> {110, 30}]}
        }, Frame -> All, Alignment -> Center, Spacings -> {0, 0}];
     
     dtft = hz /. z -> Exp[I \[Omega]];
     absMag = ComplexExpand[Abs[dtft]];
     dtftPlot = 
      Framed@Plot[20 Log[10, absMag], {\[Omega], 0.001, 2 Pi},
        Evaluate[plotOptions],
        AxesOrigin -> {0, 0},
        PlotRange -> {All, {-75, 50}},
        AxesLabel -> {Style[
           Grid[{{Text@
               Row[{"\[Omega] = \[CapitalOmega] ", 
                 Style[" T", Italic]}]}, {Text@
               TraditionalForm["(rad)"]}}, Spacings -> {0, 0}], 10], 
          Style[Text@
            Row[{"20 log|", Style["H", Italic], 
              "(\!\(\*SuperscriptBox[\(e\), \(j\\\ \[Omega]\)]\))|", 
              " (db)"}], 10]},
        Ticks -> {{0, Pi/4, Pi/2, 3/4 Pi, Pi, 5/4 Pi, 6/4 Pi, 7/4 Pi, 
           2 Pi}, Automatic}, 
        PlotLabel -> 
         Style["discrete\[Hyphen]time Fourier transform magnitude \
spectrum", Bold, 12]];
     
     Grid[
      {{fourierTransformPlotLabel}, {dtftPlotLabel}, \
{fourierTransformPlot}, {dtftPlot}},
      Alignment -> Center, Spacings -> {0, .5}, Frame -> None
      ]]}
 ]