Skip to content

fix computation of default response time for constant systems - #383

Merged
murrayrm merged 2 commits into
python-control:masterfrom
murrayrm:fix-step-response
May 17, 2020
Merged

murrayrm merged 2 commits into
python-control:masterfrom
murrayrm:fix-step-response

Conversation

@murrayrm

Copy link
Copy Markdown
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

coveralls commented Mar 22, 2020 •

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

@bnavigator bnavigator left a comment

Copy link
Copy Markdown
Contributor

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) ?

Comment thread control/timeresp.py Outdated
# No dynamics; use 100 time steps
T = range(100)
else:
tvec = _default_response_times(sys.A, 100)

Copy link
Copy Markdown
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
@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