8000 Stability margins for discrete time systems by bnavigator · Pull Request #469 · python-control/python-control · GitHub
[go: up one dir, main page]

Skip to content

Stability margins for discrete time systems #469

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 4 commits into from
Dec 21, 2020

Conversation

bnavigator
Copy link
Contributor

My attempt to fix #465

If someone has an idea how to solve min |1 + num(z) / den(z) | with z=exp(i w dt) analytically, that would be great. I opted for a numerical optimization instead.

Copy link
Contributor
@sawyerbfuller sawyerbfuller left a comment

Choose a reason for hiding this comment

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

Very nice, Looks good to me. Not sure why the previous author used an arcane incantation rather than just numpy.polyval in _poly_iw(), but maybe there is a numeric justification when working with imaginary arguments that I don’t know about.

I don’t have any good ideas for an analytic solution to the optimization problem.

@bnavigator
Copy link
Contributor Author

Not sure why the previous author used an arcane incantation rather than just numpy.polyval in _poly_iw(),

Both yours / @repagh's and @swaldherr's (is there a more current GitHub handle?) implementations are very similar. They split the polynomials up into real and imaginary parts after applying , and just store the result in a different variable structure. I just refactored to remove the "duplicate" code.

@coveralls
Copy link
coveralls commented Nov 17, 2020

Coverage Status

Coverage increased (+0.2%) to 86.319% when pulling d0f333e on bnavigator:discrete-margins into 2d7aad0 on python-control:master.

@python-control python-control deleted a comment from coveralls Nov 18, 2020
@bnavigator
Copy link
Contributor Author

I think this should go into 0.8.4. It enhances functionality, but does not change the API and it fixes the bug that it returns wrong results with discrete input.

@bnavigator bnavigator added this to the 0.8.4 milestone Nov 19, 2020
@bnavigator bnavigator merged commit e525ff6 into python-control:master Dec 21, 2020
@bnavigator bnavigator deleted the discrete-margins branch January 5, 2021 20:13
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.

control.margin() gives wrong result
4 participants
0