Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nyquist plotting from FrequencyResponseData #996

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

wueestry
Copy link
Contributor

This PR resolves the issue #992, by adding a check for FrequencyResponseData during plotting of a nyquist plot and setting omega if not yet set correctly

@coveralls
Copy link

coveralls commented Apr 26, 2024

Coverage Status

coverage: 94.497% (-0.007%) from 94.504%
when pulling 7fa5960 on wueestry:nyquist_frd
into e1d21d2 on python-control:main.

@murrayrm
Copy link
Member

This is a good fix, but I think we could add a bit better support if there are multiple FRD systems with different frequencies and not explicit frequency list given. For example, try this:

import control as ct
sys = ct.rss(4, 1, 1)
sys1 = ct.frequency_response(sys, np.logspace(-1, 1, 10))
sys2 = ct.frequency_response(sys, np.logspace(-2, 2, 10))
ct.bode_plot([sys1, sys2])                     # works OK
ct.nyquist_plot(sys1, np.logspace(-1, 1, 10))  # works OK
ct.nyquist_plot(sys2, np.logspace(-1, 1, 10))  # generates error (as it should)
ct.nyquist_plot([sys1, sys2])                  # generates error (does it need to?)

It seems to me that the last case should work OK and just plot each system independently, without needing a common frequency range (as it does for Bode plots).

@murrayrm murrayrm merged commit dbc998d into python-control:main Jun 8, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants