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 — MIMO impulse and step response by murrayrm · Pull Request #514 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Jan 19, 2021

Copy link
Copy Markdown
Member

This PR implements MIMO impulse and step responses, mirroring the style and functionality of frequency response functions for MIMO systems. It resolves issue #512 and is consistent with the discussion issue #453. Specifically:

  • If a system is MIMO, calling step_response or impulse_response will generate an array of responses (indexed by output, input, and time).
  • Consistent with frequency response methods, if a system is SISO then by default the output will just be indexed by time.
  • Input and output axes that are single dimensional can be removed by using the squeeze=True keyword.
  • SISO systems can be tried as MIMO systems (retaining the output and input axes in the response) using the squeeze=False keyword.

Note that the response for initial_response and forced_response is not indexed by the input (since there is no input in one case and a specifically applied input in the other). The processing of the squeeze keyword is the same: by default SISO systems will be returned without the output axis, use squeeze=True to remove single dimensional axes from MIMO systems, use squeeze=False to force SISO systems to be treated like MIMO systems.

Other (small changes):

  • Updated unit tests to make sure all of the squeezing rules are properly implemented with the new MIMO functionality.
  • Found a bug in the way that the transpose keyword was working: it changed [output, input, time] to [time, input, output] instead of [time, output, input]. This was caught when adding unit tests.
  • Found some errors in the MATLAB unit tests where the return arguments were in the wrong order (didn't show up with SISO only responses).

Sorry, something went wrong.

Uh oh!

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

All reactions
murrayrm added 2 commits January 19, 2021 11:01
@murrayrm
initial implementation of MIMO step, impulse response
e838b4b
@murrayrm
finalize MIMO implementation: remove duplicate code, unit test updates
85a480c
@murrayrm murrayrm linked an issue Jan 19, 2021 that may be closed by this pull request
allow arrays of step, impulse responses for LTI systems #512
Closed
@murrayrm murrayrm added this to the 0.9.0 milestone Jan 19, 2021
@coveralls

coveralls commented Jan 19, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.004%) to 87.611% when pulling 28bbe7f on murrayrm:mimo_impulse_step_response into 0a08ff2 on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

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

sawyerbfuller
sawyerbfuller reviewed Jan 20, 2021
View reviewed changes
Comment thread control/timeresp.py Outdated
If present, the response represents ony the listed input.

output : int, optional
If present, the response represents ony the listed input.

@sawyerbfuller sawyerbfuller Jan 20, 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.

Suggested change
If present, the response represents ony the listed input.
If present, the response represents only the listed output.

Sorry, something went wrong.

Uh oh!

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

All reactions
sawyerbfuller
sawyerbfuller approved these changes Jan 20, 2021
View reviewed changes

@sawyerbfuller sawyerbfuller left a comment

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.

Looks good to me with one small doc change.

also: not changed in this PR but maybe the right place to fix it: on line 20 in config.py is a duplicated setting:
'control.squeeze_time_response': True,

Sorry, something went wrong.

Uh oh!

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

All reactions
This was referenced Jan 20, 2021
Switch LTI class and subclasses to use ninputs, noutputs, nstates #515
Merged
Release 0.8.4 and 0.9.0 sequencing #451
Closed
@murrayrm
fixes for @sawyerbfuller review
28bbe7f
@murrayrm
murrayrm force-pushed the mimo_impulse_step_response branch from 6e64f92 to 28bbe7f Compare January 20, 2021 06:58
@murrayrm
murrayrm merged commit 1502d38 into python-control:master Jan 20, 2021
@murrayrm
murrayrm deleted the mimo_impulse_step_response branch January 24, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sawyerbfuller sawyerbfuller sawyerbfuller approved these changes

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.

allow arrays of step, impulse responses for LTI systems

Uh oh!

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

3 participants

@murrayrm @coveralls @sawyerbfuller
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.