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

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.
…sys) by providing a 2-input, 2-output system; some visual cleanup

@coveralls

Coverage Status

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

@bnavigator

👍

@sawyerbfuller

Here's a current screenshot:

image

@bnavigator

…atibility with matplotlib 1 released 10 years ago

bnavigator

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)

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.

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

bnavigator

ax_step.lines[0].get_data()[1][:10], step_response_moved, 4)

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

Choose a reason for hiding this comment

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

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