Skip to content

generate error for tf2ss of non-proper transfer function #492

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, 2020

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Dec 31, 2020

This PR resolves issue #399 when tf2io is called with a non-proper transfer function (which cannot be represented as a state space system). The underlying issue turned out to be in tf2ss, which had the same bug and was probably introduced in PR #370 when we started allowing non-proper transfer functions.

Added unit tests to catch the case and then fixed them by generating a ValueError when you try to convert a non-proper transfer function into a StateSpace object.

Also did some PEP8 cleanup on statesp.py.

@coveralls
Copy link

coveralls commented Dec 31, 2020

Coverage Status

Coverage increased (+0.007%) to 87.527% when pulling 9c409eb on murrayrm:iosys-nonproper-tf into d1502f4 on python-control:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 87.09% when pulling 8c707dd on murrayrm:iosys-nonproper-tf into 6ed3f74 on python-control:master.

@bnavigator
Copy link
Contributor

I like the style cleanup, but of course this created conflicts with #431/#490

@bnavigator bnavigator merged commit 383e7a4 into python-control:master Dec 31, 2020
@murrayrm murrayrm deleted the iosys-nonproper-tf branch January 15, 2021 22:04
@murrayrm murrayrm added this to the 0.9.0 milestone Mar 20, 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.

Bugs in InterconnectedSystem: different dt's [fixed] and non-proper TFs [open]
3 participants