Skip to content

Optimization-based and moving horizon estimation #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 31, 2023

Conversation

murrayrm
Copy link
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.

@coveralls
Copy link

coveralls commented Mar 25, 2023

Coverage Status

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

@murrayrm murrayrm added this to the 0.9.4 milestone Mar 27, 2023
: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
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

@sawyerbfuller sawyerbfuller left a 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

murrayrm and others added 2 commits March 30, 2023 21:31
Co-authored-by: Sawyer Fuller <58706249+sawyerbfuller@users.noreply.github.com>
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants