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
{{ message }}
Repository navigation
Plotting nyquist plot from FrequencyResponseData fails #992
the plotting fails with the following error AttributeError: 'FrequencyResponseData' object has no attribute 'poles' during the call of _default_frequency_range
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.
Activity
slivingston commentedon Apr 16, 2024
Is it possible to make a Nyquist plot given only frequency response data?
murrayrm commentedon Apr 17, 2024
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.murrayrm commentedon Jun 13, 2024
Fixed in #996.