Skip to content

Fix warning messages in rootlocus_pid_designer unit tests #684

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

Merged
merged 2 commits into from
Dec 31, 2021

Conversation

murrayrm
Copy link
Member

This PR gets rid of warning messages introduced in PR #662:

  • Since rootlocus_pid_designer leaves either r or d disconnected, the interconnect function was generating warnings (76 of them...). This was fixed by using check_unused=False.
  • Calling rootlocus_pid_designer with plot=True seems to generate a Bode plot that is -1 and this creates a warning:
control/ctrlutil.py:75: RuntimeWarning: invalid value encountered in remainder
  dangle_desired = (dangle + period/2.) % period - period/2.

For now this latter problem is fixed by skipping this test.

@sawyerbfuller I'm not quite sure how to fix this error. If I try running the test by hand using

ct.rootlocus_pid_designer(syscont, input_signal='r', Kp0=0.01,
    derivative_in_feedback_path=True, gain='P')

then I get the following plot:

Sisotool_pid_designer_bug

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 93.383% when pulling 7cfa42a on murrayrm:fix_pid_designer_warnings into 8356044 on python-control:master.

@murrayrm
Copy link
Member Author

Merging this for 0.9.1, but will create an issue to track the possible bug above.

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.

2 participants