You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across an error in the bode plot function. When you specify the frequency limits of the bode plot using the 'omega'-statement, the plot seems to scale linear instead of logarithmic. Hence, the plot is wrong.
To reproduce this try the following: sys = control.tf([1], [1,1]) control.bode(sys) control.bode(sys, omega=[0.1, 10])
The omega keyword is a list of frequencies, not just the endpoints. If you want to just specify the endpoints, use omega_limits.
Let me know if that fixes the issue. We should make this more clear in the docstring (it says that omega gives a "range" of frequencies; not clear this should be a list).
I have version 0.7 and the docstring of bode/bode_plot says Range of frequencies (list or bounds) in rad/sec so it is indeed confusing. When looking into the returned omega values, they are more then only 2 values. So bounds is somewhat correct :)
The keyword omega_limits is unknown and not in the code of bode_plot, although it can be found in the web-documentation. I installed it via pip. Is there are a newer dev-version?
Ah, that's the problem. This has been fixed and will appear in release 0.8 (which is almost done, just hasn't been officially released and pushed on on standard platforms.
Activity
murrayrm commentedon May 4, 2018
The
omegakeyword is a list of frequencies, not just the endpoints. If you want to just specify the endpoints, useomega_limits.Let me know if that fixes the issue. We should make this more clear in the docstring (it says that
omegagives a "range" of frequencies; not clear this should be a list).physici commentedon May 5, 2018
I have version 0.7 and the docstring of
bode/bode_plotsays Range of frequencies (list or bounds) in rad/sec so it is indeed confusing. When looking into the returned omega values, they are more then only 2 values. So bounds is somewhat correct :)The keyword
omega_limitsis unknown and not in the code ofbode_plot, although it can be found in the web-documentation. I installed it via pip. Is there are a newer dev-version?murrayrm commentedon May 5, 2018
Ah, that's the problem. This has been fixed and will appear in release 0.8 (which is almost done, just hasn't been officially released and pushed on on standard platforms.
In the meantime, you can grab the latest release using git from https://github.com/python-control/python-control.git
I'm changing the title of this bug to reflect the need to tweak the documentation in 0.8.0 so we don't forget that part.
[-]Bode plot wrong when using omega keyword[/-][+]Bode plot omega keyword documentation unclear[/+]physici commentedon May 6, 2018
I wouldn't call it a problem. Just a glitch :)
You guys do an awesome job with the control package. Saved me a lot of money and trouble, because I did not have to by Matlab.
DOC: clarify frequency list argument in bode() docstring (python-cont…
murrayrm commentedon Dec 23, 2018
Fixed in PR #228.