Skip to content

fix computation of default response time for constant systems #383

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

Conversation

murrayrm
Copy link
Member

Fixes issue #374 by added a check for constant systems (sys.A.shape == (0, 0)) and setting the default response time for those systems to either 1 second (continuous system) or 100 time steps (discrete system).

@coveralls
Copy link

coveralls commented Mar 22, 2020

Coverage Status

Coverage increased (+0.08%) to 84.704% when pulling 98f13be on murrayrm:fix-step-response into a09d059 on python-control:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 84.507% when pulling 4bad487 on murrayrm:fix-step-response into a09d059 on python-control:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 84.507% when pulling 4bad487 on murrayrm:fix-step-response into a09d059 on python-control:master.

@murrayrm murrayrm linked an issue Mar 22, 2020 that may be closed by this pull request
@murrayrm murrayrm added this to the 0.8.4 milestone Mar 22, 2020
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.

Instead of replicating the same code 4 times, put it into an internal function T = _get_response_times(sys, n=100) ?

# No dynamics; use 100 time steps
T = range(100)
else:
tvec = _default_response_times(sys.A, 100)
Copy link
Contributor

Choose a reason for hiding this comment

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

length reduced from 1000 to 100

@murrayrm murrayrm merged commit b9dad5e into python-control:master May 17, 2020
repagh pushed a commit to repagh/python-control that referenced this pull request Jun 9, 2020
…-control#383)

* fix computation of default response time for constant systems

* add single function to compute response times
@murrayrm murrayrm deleted the fix-step-response branch July 11, 2020 15:12
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.

Bug in step_response()
3 participants