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 — Fixes to various optimization-based control functions by murrayrm · Pull Request #709 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Mar 13, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

I recently finished teaching an optimization-based controls course and found a but of small things in the code that needing fixing/improving:

  • Parameters were not being passed properly to differentially flat systems.
  • Basis functions derived from BasisFamily were not calling BasisFamily.__init__.
  • Changed constraints keyword in optimal.solve_ocp and flatsys.point_to_point to trajectory_constraints for more consistency (legacy keyword still works).
  • Initial conditions for simulation of discrete time systems was being passed as a list instead of an ndarray, which caused some odd behavior and wasn't consistent with continuous time system usage.
  • Added check for constraint types in optimal control problem setup (rather than when solving the optimal control problem).
  • Fixed small inconsistency in the way discrete time was handled in setting up an I/O system for model predictive control (should be inherited from system, not passed separately).
  • Unused keywords in OptimalControlProblem now generate an error (mentioned here).
  • To be consistent with the normal problem formulation, the discrete time optimal cost calculation no longer includes the endpoint (use terminal_cost instead).
  • create_mpc_iosystem now re-computes the optimal controller when returning the output, which eliminates an unintended one-step delay in the MPC dynamics.
  • Added unit tests.

Sorry, something went wrong.

Uh oh!

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

All reactions
murrayrm added 9 commits January 24, 2022 21:09
@murrayrm
fix handling of endpoint in discrete optimal
0060618
@murrayrm
check for unused keywords in OptimalControlProblem
395dbbb
@murrayrm
generate iosys warning if solve_ivp does not succeed
de4c75c
@murrayrm
remove one step delay in create_mpc_iosystem, discrete time only
93a5fae
@murrayrm
add params to flat systems + updated keywords
7396f76
@murrayrm
fix discrete time X0, U processing
994fedc
@murrayrm
fix optimal unit tests (matrix case) + PEP8
d01a52c
@murrayrm
default outfcn() bug fix + unit tests for flatsys
be660ce
@murrayrm
updated optimal constraint handling + unit tests
f807b33
@coveralls

coveralls commented Mar 13, 2022

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.006%) to 93.601% when pulling f807b33 on murrayrm:cds112 into e10855e on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

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

@murrayrm murrayrm added this to the 0.9.2 milestone Mar 19, 2022
@murrayrm
murrayrm merged commit 4ef15c4 into python-control:master Mar 19, 2022
@murrayrm
murrayrm deleted the cds112 branch March 19, 2022 18:12
@murrayrm murrayrm mentioned this pull request Apr 24, 2022
Need helps to figure out the Error and how to fix it #727
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.2

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

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