GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sisotool small visual cleanup, new feature to show step response of different input-output than loop by sawyerbfuller · Pull Request #531 · python-control/python-control

Conversation

@sawyerbfuller

@sawyerbfuller sawyerbfuller commented Feb 4, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR adds a new feature to sisotool that allows it to show the step response of a system that is not the loop transfer function L. Some visual cleanup including reducing oversized axis tick labels.

  • To see a the step response of a more complicated system that includes a feedforward controller, or any other input-output pair, you can do so by passing sisotool a 2 input, 2-output system. The gain you choose when you click the rlocus plot gets inserted between output[0] and input[0], and then the step response is between input[1] and output[1].
  • Doubled the click threshold size in rlocus because I had a hard time aiming the mouse well enough to get successful click events.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sawyerbfuller added 3 commits February 4, 2021 12:48
@sawyerbfuller
bdalg.connect now works with scalar inputv and outputv
26a595f
@sawyerbfuller
sisotool's step response plot can be something other than feedback(K*…
9b10121
…sys) by providing a 2-input, 2-output system; some visual cleanup
@sawyerbfuller
relaxed fiddly click size threshold in rlocus
76b0507
@coveralls

coveralls commented Feb 4, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.3%) to 87.948% when pulling abca69d on sawyerbfuller:sisotooling into 73f65df on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnavigator

bnavigator commented Feb 4, 2021

Copy link
Copy Markdown
Contributor

👍

  • Pictures please?
  • Please cover the 2-in, 2-out case and the MIMO Exception with tests: https://coveralls.io/builds/36879506/source?filename=control%2Fsisotool.py#L162
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sawyerbfuller
fixed that full 2x2 system wasn't being passed around correctly, givi…
77bc5c5
…ng wrong step response
@sawyerbfuller

sawyerbfuller commented Feb 4, 2021

Copy link
Copy Markdown
Contributor Author

Here's a current screenshot:

image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sawyerbfuller
added the unit tests, which caught a bug : ) and docstring cleanup
03cdab7
@bnavigator

bnavigator commented Feb 5, 2021

Copy link
Copy Markdown
Contributor

Nice. Let's go all the way and cover these two lines as well:

https://coveralls.io/builds/36884037/source?filename=control%2Fsisotool.py#L170
https://coveralls.io/builds/36884037/source?filename=control%2Fsisotool.py#L172

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sawyerbfuller
improved test coverage, pep8 cleanup, doc clarification, removed comp…
fc8f8d7
…atibility with matplotlib 1 released 10 years ago
bnavigator
bnavigator reviewed Feb 5, 2021
View reviewed changes
Comment thread control/tests/sisotool_test.py
Comment on lines +124 to +137

# test supply tvect
sisotool(sys, tvect=np.arange(0, 1, .1))

# test discrete-time
sisotool(sysdt, tvect=5)

# test MIMO compatibility
# sys must be siso or 2 input, 2 output
with pytest.raises(ControlMIMONotImplemented):
sisotool(sys221)
# does not raise an error:
sisotool(sys222)

@bnavigator bnavigator Feb 5, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I would move these to separate tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sawyerbfuller sawyerbfuller Feb 5, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

sure, thanks for the suggestions. still getting the hang of best practices for testing

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bnavigator
bnavigator reviewed Feb 5, 2021
View reviewed changes
Comment thread control/tests/sisotool_test.py Outdated
ax_step.lines[0].get_data()[1][:10], step_response_moved, 4)

# test supply tvect
sisotool(sys, tvect=np.arange(0, 1, .1))

@bnavigator bnavigator Feb 5, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This still does not cover https://coveralls.io/builds/36911686/source?filename=control%2Fsisotool.py#L168

tvect is not passed through to _SisotoolUpdate

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sawyerbfuller sawyerbfuller Feb 5, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Let's see if that works

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnavigator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@sawyerbfuller
improved tvect test coverage
abca69d
@bnavigator
bnavigator merged commit 3adc610 into python-control:master Feb 7, 2021
@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

Reviewers

@bnavigator bnavigator bnavigator left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.9.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sawyerbfuller @coveralls @bnavigator @murrayrm
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.