Skip to content

Bode, Nyquist, and root locus plots are crude #49

Description

@cwrowley

Bode, Nyquist, and root locus plots are all much nicer in Matlab, both because they make smarter choices for things like frequencies to plot, and because their plots are interactive, so you can click on points to get additional information, etc.
I have some ideas for how to improve this (e.g., more sophisticated ways of generating frequencies for Bode/Nyquist plots, with finer resolution near lightly damped poles or zeros; better gains for root locus plots, with finer resolution near break-out and break-in points, etc), and I'm planning to try implementing those.

Activity

  1. self-assigned this
    on Mar 20, 2015
  2. slivingston commented on Mar 20, 2015

    @slivingston
    Member

    Regarding making plots interactive, you could use events from Matplotlib to respond to clicks, e.g., using matplotlib.backend_bases.MouseEvent.

  3. roryyorke commented on Jun 16, 2015

    @roryyorke
    Contributor

    My 2c: don't forget about Nichols. It might be worth separating the frequency response and root-locus into separate issues.

    For the frequency plots, one could also consider showing low and high frequency asymptotes.

    One idea I had for this to have the number of sample points be a multiple of the number of poles and zeros, though that is a bit simplistic. Another idea is to relate the density of the sample points to the curvature of the graph (though I don't know how to turn that into an algorithm...)

  4. repagh commented on Jul 18, 2015

    @repagh
    Member

    one thing we also need are damping-omega grids for root-locus.

    for root-locus, having the break-in and break-out points in the gain vector already helps,

  5. Sup3rGeo commented on Oct 25, 2017

    @Sup3rGeo

    Concerning the damping-omega grids as @repagh said, I have written a simple function that draws the grid for Z-domain (zgrid):

    https://gist.github.com/Sup3rGeo/17d0eb2b0f4d60c1ebd24695ac692b5d

    Is there any possibility for this to be added to the python-control functions? I have never contributed to open source projects before, but if you tell me if what to do I can perhaps create a pull request for this.

  6. removed their assignment
    on Jan 1, 2018
  7. Sup3rGeo commented on Feb 19, 2018

    @Sup3rGeo

    Created a PR for this (#193)

  8. don4get commented on Jan 5, 2019

    @don4get
    Contributor

    Can we have more of what might be improved from what is already present in the library?

    Thanks to all the improvements you done since the creation of this issue, I can't say if it's closed or not.

  9. rxa254 commented on Jun 25, 2020

    @rxa254

    For the Nyquist plot, I would like to see:

    1. Smoother lines. This can be done by sampling the system better in regions where |d(Mag)/df| is large.
    2. Better scaling (not sure how to do this). With systems that have a lot of DC gain or if there is a deep bandstop filter, its difficult to see the detail just due to the dynamic range.
    3. It would be good to have arrows denoting the direction of increasing frequency, as matlab has.
    4. This is an example where the frequency is encoded as color changes in the curve (https://lpsa.swarthmore.edu/Nyquist/NyquistExamples.html).

    This paper (https://doi.org/10.1109/ECC.2014.6862243) shows a way to plot the Nyquist logarithmically.

  10. murrayrm commented on Jun 25, 2020

    @murrayrm
    Member

    Great set of suggestions @rxa254. If anyone wants to sign up for these changes, that would be great. Maybe some summer coding practice for @cwrowley?

  11. murrayrm commented on Feb 11, 2021

    @murrayrm
    Member

    PRs #522 and #534 address some (but not all) of the suggestions here. In particular, #522 adds more points for frequency response plots and #534 has directional arrows and other features.

  12. murrayrm commented on Jun 6, 2021

    @murrayrm
    Member

    There is some nice looking code for JuliaControl that we might take a look at for improving frequency response plots.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions