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 — Optimization-based and moving horizon estimation by murrayrm · Pull Request #877 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Mar 25, 2023

Copy link
Copy Markdown
Member

This PR adds new functionality for computing the optimal estimate for a (nonlinear) I/O system using an explicit cost function of a fixed window of applied inputs and measured outputs. This optimal estimation problem is then used to create a system for solving moving horizon estimation (MHE) problems. Documentation and unit tests are included.

Summary of changes:

  • Added the obc.OptimalEstimationProblem class and obc.create_mhe_iosystem() function, which implement that main new functionality.
  • Added gaussian_likelyhood_cost() to create cost function corresponding to Gaussian likelihoods for use in optimal estimation.
  • Added disturbance_range_constraint() to create a range constraint on disturbances.
  • Moved processing of control and disturbance indices for estimation problems into iosys.py and use that functionality consistently for obc.create_estimator_iosystem and obc.OptimalEstimationProblem.
  • Created a function for processing legacy keywords in config.py and updated legacy keyword processing class to use that functionality.
  • Added a pytest mark for slow tests (@pytest.mark.slow), which can be used during development to skip slow tests by running pytest -m "not slow".
  • Added unit tests, docstrings, and user documentation for new functionality, including a Jupyter notebook demonstrating optimal estimation and moving horizon estimation the PVTOL model system (from FBS2e and OBC notes).
  • Additional small updates to docstrings to fix typos and formatting issues.

Sorry, something went wrong.

Uh oh!

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

All reactions
murrayrm added 11 commits March 18, 2023 10:34
@murrayrm
add pytest --skipslow
b0b6121
@murrayrm
mark selected optimal, rlocus tests as slow
823dfbc
@murrayrm
initial implementation of optimal estimation problem
cf45109
@murrayrm
updated documentation + Jupyter notebook
bd7ba6d
@murrayrm
add standard _process_indices function
8375127
@murrayrm
add {control, disturbance}_indices to create_estimator_iosystem
e165dd5
@murrayrm
implement {control, disturbance}_indices in oep
1c1ce0c
@murrayrm
regularize *_labels processing across create_*_iosystem
ebedf19
@murrayrm
updated docstrings and docs, trim slow unit tests
df4508c
@murrayrm
remove pytest --skipslow; use pytest -m "not slow" instead
039b22d
@murrayrm
fix dtime integral cost calculation; trim unit tests for speed
9373f8e
@coveralls

coveralls commented Mar 25, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Coverage Status

Coverage: 94.533% (-0.3%) from 94.841% when pulling a329323 on murrayrm:oep_mhe-26Feb2023 into 26c44e1 on python-control:main.

All reactions

Sorry, something went wrong.

Uh oh!

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

@murrayrm
add benchmarks for optimal estimation
2a42fe8
@murrayrm murrayrm added this to the 0.9.4 milestone Mar 27, 2023
sawyerbfuller
sawyerbfuller reviewed Mar 30, 2023
View reviewed changes
Comment thread doc/optimal.rst
:math:`Y[k] \in \mathbb{R}^p`, and :math:`V[k] \in \mathbb{R}^q` and
:math:`W[k] \in \mathbb{R}^p` represent random processes that are not
necessarily Gaussian white noise processes. The estimation problem that we
wish to solve is to find the estimate :math:`\hat x[\cdot]` that matches

@sawyerbfuller sawyerbfuller Mar 30, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Should these be capital X-hat and Y-hat in keeping with the notation above?

Sorry, something went wrong.

Uh oh!

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

All reactions

@sawyerbfuller sawyerbfuller Mar 30, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Never mind, I realize now they're random processes.

Sorry, something went wrong.

Uh oh!

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

All reactions
sawyerbfuller
sawyerbfuller reviewed Mar 30, 2023
View reviewed changes
Comment thread doc/optimal.rst Resolved

Uh oh!

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

sawyerbfuller
sawyerbfuller approved these changes Mar 30, 2023
View reviewed changes

@sawyerbfuller sawyerbfuller left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This looks like a great feature, LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
murrayrm and others added 2 commits March 30, 2023 21:31
@murrayrm @sawyerbfuller
Update doc/optimal.rst
1599f44
Co-authored-by: Sawyer Fuller <[email protected]>
@murrayrm
add executed mhe-pvtol.ipynb to fix doctest failure
a329323
@murrayrm
murrayrm merged commit 0422c82 into python-control:main Mar 31, 2023
@murrayrm
murrayrm deleted the oep_mhe-26Feb2023 branch March 31, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sawyerbfuller sawyerbfuller sawyerbfuller approved these changes

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

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 @sawyerbfuller
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.