Gk = k/(s (s^2 + s + 1));
Manipulate[
Module[{p2, p3, a, b}, Switch[ctrl, 1, a = f[k, d]; b = g[k, d];
p2 = Quiet@
Plot[{1, a}, {t, 0, 50}, PerformanceGoal -> "Quality",
PlotRange -> {{0, 45}, {0, 1.8}}, AspectRatio -> 1,
Frame -> True, ImageSize -> {400, 400}, GridLines -> Automatic,
Filling -> {1 -> {2}}, FillingStyle -> LightGray,
PlotStyle -> {{Thick, Darker@Red, Dashed@Small}, {Thick,
Darker@Green}},
FrameLabel -> {Style["Time", 16, Blue, Italic],
Style["Response", 16, Blue, Italic]}];
p3 = BodePlot[b, {1, 100}];
Show[p2], 2, Show[p3]]], {{ctrl, 1, ""}, {1 -> "Time Response",
2 -> "Bode Diagram"}}, {{k, 1.25, "Proportional Gain Kp"}, 0.1, 6,
0.01, Appearance -> "Labeled"}, {{d, 1, "Feedback Coefficient V"},
1, 10, 0.05, Appearance -> "Labeled"},
SynchronousUpdating -> False, SynchronousInitialization -> False,
TrackedSymbols :> {k, d},
Initialization :> {f[k_, d_] :=
InverseLaplaceTransform[
1/s (k (1 + s))/(k + 5 d s (1 + 3 s + 2 s^2)), s, t] // Chop;
g[k_, d_] :=
TransferFunctionModel[
1/s (k (1 + s))/(k + 5 d s (1 + 3 s + 2 s^2)), s],
ImageSize -> {400, 400}}, ControlPlacement -> Top]
Manipulate[
Module[{p2, p3, a, b}, Switch[ctrl, 1, a = f[k, d]; b = g[k, d];
p2 = Quiet@
Plot[{1, a}, {t, 0, 50}, PerformanceGoal -> "Quality",
PlotRange -> {{0, 45}, {0, 1.8}}, AspectRatio -> 1,
Frame -> True, ImageSize -> {400, 400}, GridLines -> Automatic,
Filling -> {1 -> {2}}, FillingStyle -> LightGray,
PlotStyle -> {{Thick, Darker@Red, Dashed@Small}, {Thick,
Darker@Green}},
FrameLabel -> {Style["Time", 16, Blue, Italic],
Style["Response", 16, Blue, Italic]}];
p3 = BodePlot[b, {1, 100}];
Show[p2], 2, Show[p3]]], {{ctrl, 1, ""}, {1 -> "Time Response",
2 -> "Bode Diagram"}}, {{k, 1.25, "Proportional Gain Kp"}, 0.1, 6,
0.01, Appearance -> "Labeled"}, {{d, 1, "Feedback Coefficient V"},
1, 10, 0.05, Appearance -> "Labeled"},
SynchronousUpdating -> False, SynchronousInitialization -> False,
TrackedSymbols :> {k, d},
Initialization :> {f[k_, d_] :=
InverseLaplaceTransform[
1/s (k (1 + s))/(k + 5 d s (1 + 3 s + 2 s^2)), s, t] // Chop;
g[k_, d_] :=
TransferFunctionModel[
1/s (k (1 + s))/(k + 5 d s (1 + 3 s + 2 s^2)), s],
ImageSize -> {400, 400}}, ControlPlacement -> Top]