Add B-splines and solve_flat_ocp to flatsys#763
Merged
murrayrm merged 7 commits intopython-control:mainfrom Aug 30, 2022
Merged
Add B-splines and solve_flat_ocp to flatsys#763murrayrm merged 7 commits intopython-control:mainfrom
murrayrm merged 7 commits intopython-control:mainfrom
Conversation
* 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
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). |
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. |
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 -:). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR extends the
flatsysmodule to include two new elements:flatsys.BSplineFamilyadds B-splines as a new type of basis for solving trajectory generation problems (withinflatsysoroptimal).flatsys.solve_flat_ocp()allows solution of optimal control problems for differentially flat systems with trajectory and terminal costs and constraints, mirroring the functionality ofoptimal.solve_ocp().In the process of making these additions, a few other changes:
flatsys.BSplineFamilyintroduces 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.__repr__for basis functions (show the family + information on attributes).