Add dlqe filter-form gain option#1220
Open
marko1olo wants to merge 1 commit into
Open
Conversation
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.
Addresses #1173.
This keeps the existing
dlqedefault behavior unchanged: by default it still returns the one-step predictor gainA P C^T (C P C^T + R_N)^-1.The change adds
return_filter_form=Truefor callers that need the filter-form correction gainP C^T (C P C^T + R_N)^-1, which cannot be recovered from the default predictor gain whenAis singular. The returned covariance is documented as the steady-state prediction/prior covariance used by both gain formulas.I also corrected the
dlqeRiccati equation documentation and the stochastic docs wording that referred todlqr/lqrin the estimator section.Tests run locally:
python -m pytest control/tests/stochsys_test.py::test_DLQE_return_filter_form control/tests/stochsys_test.py::test_lqe_discrete -qpython -m pytest control/tests/stochsys_test.py -qpython -m pytest control/tests/docstrings_test.py -qpython -m pytest control/tests/mateqn_test.py::TestMatrixEquations::test_dare -qpython -m pytest control/tests/kwargs_test.py::test_unrecognized_kwargs -q -k "dlqe or lqe"python -m ruff check control/stochsys.py control/tests/stochsys_test.pypython -m compileall -q control\stochsys.py control\tests\stochsys_test.pypython -m numpydoc render control.stochsys.dlqe