Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow static gain StateSpace objects to be straightforwardly created.#107

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

roryyorke
Copy link
Contributor

Lets the (fairly?) obvious StateSpace([],[],[],D) work. One could previously create these by, e.g., converting a static gain TransferFunction to a StateSpace object.

In this case A will be 0-by-0, B 0-by-inputs, and C outputs-by-0. My intuition is that this is a generally correct approach (consider the simplification of _remove_useless_states, for example), but it may require some thought during review.

…ects.Allows StateSpace([],[],[],D), which failed previously.  Static gainshave sizes enforced as follows: A 0-by-0, B 0-by-ninputs, Cnoutputs-by-0.Tests added for instantiation, and sum, product, feedback, and appending,of 1x1, 2x3, and 3x2 static gains StateSpace objects.
On Python 2.7, the special case "all states useless" in_remove_useless_states resulted in A=[[0]] (and similarly for B and C).The special case is no longer needed, since empty A, B, C matrices canbe handled.  numpy.delete does the right thing w.r.t. matrixsizes (e.g., deleting all columns of a nxm matrix gives an nx0 matrix).Added test for this.
@coveralls
Copy link

coveralls commentedAug 11, 2016
edited
Loading

Coverage Status

Coverage increased (+0.04%) to 76.048% when pulling7382644 on roryyorke:rory-ss-static-gain intod0528fd on python-control:master.

raise ValueError("D must have the same column size as B.")
if self.outputs != D.shape[0]:
raise ValueError("D must have the same row size as C.")
raise ValueError("A and C C must have the same number of columns.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's oneC too many here. 😸

@roryyorke
Copy link
ContributorAuthor

D'oh! Thanks, will fix.

@coveralls
Copy link

coveralls commentedAug 12, 2016
edited
Loading

Coverage Status

Coverage increased (+0.04%) to 76.048% when pulling2794260 on roryyorke:rory-ss-static-gain intod0528fd on python-control:master.

@cwrowley
Copy link
Contributor

I like this syntax for creating static gain objects. This PR looks good to me.

@roryyorkeroryyorke mentioned this pull requestAug 31, 2016
@roryyorke
Copy link
ContributorAuthor

One case not covered by this PR is the "empty" system,StateSpace([],[],[],[]). My first attempt at handling this brokeStateSpace.__getitem__; I haven't yet come up with a tidy fix. The source of the hassle, IMO, is thatnumpy.matrix([]) returns a 1x0 matrix, rather than 0x0. My current thinking is to have anumpy.matrix wrapper,statesp._matrix, for which_matrix([] is 0x0.

Wanting 0-input, 0-output systems may seem like fussiness, but it turns out to be necessary (or useful, at least), in a prototype ofaugw I've written. (augw ends up being part ofmixsyn; see Octave's docs foraugw at [1]).

[1]http://octave.sourceforge.net/control/function/augw.html

@coveralls
Copy link

coveralls commentedDec 25, 2016
edited
Loading

Coverage Status

Coverage decreased (-0.3%) to 75.714% when pullinge640b17 on roryyorke:rory-ss-static-gain intod0528fd on python-control:master.

@slivingston
Copy link
Member

Pull request#110 subsumes this one.

@roryyorkeroryyorke deleted the rory-ss-static-gain branchDecember 29, 2016 17:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@roryyorke@coveralls@cwrowley@slivingston@mp4096

[8]ページ先頭

©2009-2025 Movatter.jp