Skip to content

Fix place varga#197

Merged
murrayrm merged 3 commits into
python-control:masterfrom
rabraker:fix_place_varga
Dec 22, 2018
Merged

Fix place varga#197
murrayrm merged 3 commits into
python-control:masterfrom
rabraker:fix_place_varga

Conversation

@rabraker

Copy link
Copy Markdown
Contributor

This pull request address issue #177 .

Summary of Changes:

  1. Calculate the alpha parameter such it is always twice as small as the smallest (real part) open-loop eigenvalue.

  2. Add support for discrete time systems by exposing the DICO parameter

  3. Expose the alpha parameter to the user, since it seems like interesting functionality to be able to place only the slowest eigenvalues.

  4. Add tests to exercise these changes, including a test against the example in issue place function fails for simple case #177 .

@coveralls

coveralls commented Feb 24, 2018

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-12.9%) to 65.995% when pulling 33c59a8 on rabraker:fix_place_varga into 4b0101c on python-control:master.

@murrayrm murrayrm added this to the 0.8.0 milestone Jun 30, 2018

@murrayrm murrayrm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of suggestions for your consideration.

Comment thread control/statefbk.py Outdated
# SB01BD ignores eigenvalues with real part less than alpha
# (if DICO='C') or with modulus less than alpha
# (if DICO = 'D').
if DICO == 'C':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if the users passes something other than 'C' or 'D' for DICO? There should probably be a final else that generates an error message. Also, should we allow 'c' and 'd' (lower case) as well?

Alternatively, use isdtime as the option and then there are only two possibilities (True or not True).

Comment thread control/statefbk.py Outdated

Optional Parameters
---------------
DICO : 'C' for continuous time pole placement or 'D' for discrete time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The use of DICO as a parameter seems odd since it is not used in other functions. A couple of possibilities:

  • _rss_generate (internal function) uses type
  • gram uses dico (lower case) as an internal variable
  • We use use isdtime and isctime as functions to check for discrete and continuous time. We could use isdtime=False as the option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am also in favour of isdtime, or maybe simply "dtime". The C / D character is a really Fortran-like approach.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agree that dtime=False would be a better choice for the option (and default value).

@murrayrm murrayrm modified the milestones: 0.8.0, 0.8.1 Jul 2, 2018
@murrayrm

Copy link
Copy Markdown
Member

Thanks for the updates. I think this looks good to go. I will do some local testing and then merge in the coming days.

@murrayrm murrayrm self-assigned this Dec 21, 2018
@murrayrm

Copy link
Copy Markdown
Member

Tested locally and looks fine. Merging.

@murrayrm murrayrm merged commit 0434508 into python-control:master Dec 22, 2018
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.

4 participants