Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • $\begingroup$ This implies that BodePlot internally calls TransferFunctionModel if the model is in StateSpace representation? $\endgroup$
    – ercegovac
    Commented Oct 4, 2018 at 16:26
  • $\begingroup$ That is correct. $\endgroup$ Commented Oct 4, 2018 at 16:37
  • $\begingroup$ It appears that SetPrecision only helps inside BodePlot function. If you try to evaluate the following TransferFunctionModel[SetPrecision[osg2SSCL /. {k1 -> 0.5, k2 -> 0.5, omega1 -> 2 Pi 50, omega2 -> 2 Pi 500}, 20], s] on its own, wrong result is again obtained. On the other side if you change Method to "Inverse" as in TransferFunctionModel[osg2SSCL /. {k1 -> 0.5, k2 -> 0.5, omega1 -> 2 Pi 50, omega2 -> 2 Pi 500}, s, Method->"Inverse"] the correct result is obtained. $\endgroup$
    – ercegovac
    Commented Oct 4, 2018 at 16:49
  • $\begingroup$ Increasing the precision makes the result closer, and we cannot tell the difference by looking at the BodePlot. If you want to go one step further down the rabbit hole, the hiccup is in CharactersticPolynomial. The method "Inverse" does not use CharactersticPolynomial, although such a brute approach will choke for larger systems. $\endgroup$ Commented Oct 4, 2018 at 17:22
  • $\begingroup$ When I evaluate BodePlot[TransferFunctionModel[SetPrecision[osg2SSCL /. {k1 -> 0.5, k2 -> 0.5, omega1 -> 2 Pi 50, omega2 -> 2 Pi 500}, 20], s], {10^2, 10^4}, GridLines -> Automatic, PlotLayout -> "Magnitude"] I still get wrong result. MMA 11.3 @ Win10 $\endgroup$
    – ercegovac
    Commented Oct 4, 2018 at 17:54