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 — Add B-splines and solve_flat_ocp to flatsys by murrayrm · Pull Request #763 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Aug 24, 2022

Copy link
Copy Markdown
Member

This PR extends the flatsys module to include two new elements:

  • flatsys.BSplineFamily adds B-splines as a new type of basis for solving trajectory generation problems (within flatsys or optimal).

  • flatsys.solve_flat_ocp() allows solution of optimal control problems for differentially flat systems with trajectory and terminal costs and constraints, mirroring the functionality of optimal.solve_ocp().

In the process of making these additions, a few other changes:

  • The flatsys.BSplineFamily introduces the ability to have multi-variable basis functions (where each flat output uses a different basis function from a selected family). This is useful if you have a differentially flat system in which you would like to have different degrees for different variables.
  • Fixed a bug in the computation of derivatives for the Bezier family of basis functions with rescaled final time, and implemented a final time rescaling for the polynomial family of basis functions.
  • Added a more descriptive __repr__ for basis functions (show the family + information on attributes).
  • New documentation (sphinx + docstring) and units tests for the added functionality.

Sorry, something went wrong.

Uh oh!

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

All reactions
murrayrm added 6 commits August 20, 2022 10:11
@murrayrm
initial bspline implementation
3dcad07
@murrayrm
add support for multiple spline variables; update docstrings
0ab0d07
@murrayrm
initial implementation of solve_flat_ocp
78f7bbb
@murrayrm
unit tests, bug fixes, algorithm improvements
05084f3
* add initial_guess functionality to solve_flat_ocp
* pre-compute collocation matrices in point_to_point, solve_flat_ocp
* updated return values for solve_flat_ocp
* add __repr__ for flat basis functions
* docstring improvements
* additional unit tests + examples
@murrayrm
additional unit tests for coverage + bug fixes
e65c4f2
@murrayrm
updated flatsys documentation
2901cbe
@coveralls

coveralls commented Aug 24, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 94.766% when pulling 47262f5 on murrayrm:bspline-04Aug2022 into d4c1f14 on python-control:main.

All reactions

Sorry, something went wrong.

Uh oh!

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

@murrayrm
update coeff handling to allow multi-variable basis
47262f5
@murrayrm

murrayrm commented Aug 30, 2022

Copy link
Copy Markdown
Member Author

Merging this in since the functionality is pretty specialized and so not something that is going to break anything for others (plus I have additional updates coming that build on this one).

bnavigator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@murrayrm
murrayrm merged commit 58b1bc5 into python-control:main Aug 30, 2022
@bnavigator

bnavigator commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

Hi @murrayrm, I started to look through it a few days ago but wasn't done completely. I might have a few review comments later on, if that is okay.

All reactions

Sorry, something went wrong.

Uh oh!

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

@murrayrm

murrayrm commented Aug 30, 2022

Copy link
Copy Markdown
Member Author

Thanks for looking through this, @bnavigator. Comments are definitely welcome and I'm happy to address in a separate PR.

I'm working in putting some numba capability into python-control to allow for more efficient optimization, and this PR was in support of that. The changes are very specialized, so won't affect 99% of users (and perhaps 99.9% of users -:).

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.3 milestone Dec 24, 2022
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.3

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

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