Skip to content

Bode plot omega keyword documentation unclear #202

Closed

Description

@physici

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])

Activity

  1. murrayrm commented on May 4, 2018

    @murrayrm
    Member

    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).

  2. physici commented on May 5, 2018

    @physici
    Author

    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?

  3. murrayrm commented on May 5, 2018

    @murrayrm
    Member

    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.

  4. changed the title [-]Bode plot wrong when using omega keyword[/-] [+]Bode plot omega keyword documentation unclear[/+] on May 5, 2018
  5. physici commented on May 6, 2018

    @physici
    Author

    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.

  6. self-assigned this
    on Jul 14, 2018
  7. added this to the 0.8.1 milestone on Jul 18, 2018
  8. murrayrm commented on Dec 23, 2018

    @murrayrm
    Member

    Fixed in PR #228.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions