Skip to content

Plotting nyquist plot from FrequencyResponseData fails #992

Description

@wueestry

When trying to create the nyquist plot from an FRD system

freq_response = ct.FRD(response, frequencies)
ct.nyquist_plot(freq_response)

the plotting fails with the following error
AttributeError: 'FrequencyResponseData' object has no attribute 'poles' during the call of _default_frequency_range

version: 0.10.0

Activity

  1. slivingston commented on Apr 16, 2024

    @slivingston
    Member

    Is it possible to make a Nyquist plot given only frequency response data?

  2. murrayrm commented on Apr 17, 2024

    @murrayrm
    Member

    You can get a valid Nyquist plot from the frequency response in some instances and with some assumptions. Basically, if the open loop dynamics are assumed stable, the zero frequency gain is finite, and the high frequency gain is zero, it should work.

    The error above comes when it tries to compute the default frequency range for the plot, but in the case of frequency response data you don't actually need to do that.

    A quick fix is to change the call to be ct.nyquist_plot(freq_response, freq_response.omega), which bypasses the computation of the default frequency range.

  3. murrayrm commented on Jun 13, 2024

    @murrayrm
    Member

    Fixed in #996.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions