Bode Plot slow under Manipulate
- To: undisclosed-recipients:;
- Subject: [mg128532] Bode Plot slow under Manipulate
- From: kiwibooga at googlemail.com
- Date: Thu, 1 Nov 2012 03:18:28 -0400 (EDT)
- Approved: Steven M. Christensen <steve@smc.vnet.net>, Moderator
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- Newsgroups: comp.soft-sys.math.mathematica
I am using the BodePlot command within Manipulate but find it slow and jerky compared to normal plot. For what it is doing it should be faster, or am I missing a trick?
V8 on Mac OS 10.6 MacBook Pro
Compare two methods of plotting a second order transfer function with variable damping - one using built in BodePlot and another using a LogLinearPlot
Gpp[\[Zeta]_] = \[Omega]^2/(s^2 +
2.0*\[Zeta]*\[Omega]*s + \[Omega]^2);
\[Omega] = 10000.0;
Manipulate[
BodePlot[Gpp[\[Zeta]] /. {s -> s*2 \[Pi]}, {10, 10^6},
ImageSize -> 300, GridLines -> Automatic,
GridLinesStyle -> Red], {{\[Zeta], 0.5, "damping ratio"}, 0, 1,
Appearance -> "Labeled"}];
MyBodePlot[tf_] :=
Manipulate[
Column[{LogLinearPlot[
20*Log10[Abs[tf[\[Zeta]] /. s -> 2.0*\[Pi]*I*f]], {f, 10, 10^6},
ImageSize -> 300, GridLines -> Automatic,
GridLinesStyle -> Red],
LogLinearPlot[
180*Arg[tf[\[Zeta]] /. s -> 2.0*\[Pi]*I*f]/\[Pi], {f, 10, 10^6},
ImageSize -> 300, GridLines -> Automatic,
GridLinesStyle -> Red]}], {{\[Zeta], 0.5, "damping ratio"}, 0,
1, Appearance -> "Labeled"}];
MyBodePlot[Gpp]