Skip to content

fix damp method for discrete time systems with a negative real-valued pole #647

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

Conversation

vincentchoqueuse
Copy link
Contributor

(first pull request on GitHub)

When a discrete time system has a real-valued negative pole, the discrete to continuous conversion using the log function returns nan. Then, the damp method is not able to compute the damping and the wn values.

To avoid this problem, the poles must be cast to complex values (https://numpy.org/doc/stable/reference/generated/numpy.log.html)

@coveralls
Copy link

coveralls commented Aug 17, 2021

Coverage Status

Coverage remained the same at 89.923% when pulling 140ca08 on vincentchoqueuse:fix_damp_bug_dlti_system into 6b7a9c7 on python-control:master.

Copy link
Contributor

@bnavigator bnavigator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Excellent first PR.

I left some comments, which can be refined before we merge.

@bnavigator bnavigator linked an issue Aug 17, 2021 that may be closed by this pull request
@bnavigator bnavigator merged commit 18976c1 into python-control:master Aug 19, 2021
@bnavigator
Copy link
Contributor

Thank you!

@vincentchoqueuse
Copy link
Contributor Author

Thank you for your advices @bnavigator !

@murrayrm murrayrm added this to the 0.9.1 milestone Dec 30, 2021
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.

Result of the damp function for discrete time systems
4 participants