Repository navigation
Document and test LQR state-input cross terms - #1099
Open
dongxuelian2 wants to merge 1 commit into
Open
dongxuelian2 wants to merge 1 commit into
dongxuelian2 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1099 +/- ##
=======================================
Coverage 92.29% 92.29%
=======================================
Files 42 42
Lines 6177 6177
=======================================
Hits 5701 5701
Misses 476 476 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Closes #1098.
lqr(..., Q, R, N)already passes the cross term toMatrixEquations.arec/aredas their positionalSargument. Make this existing interface explicit for both matrix and state-space inputs, document the cost and dimensions, and give executable continuous/discrete examples. The positional API and solver implementation are unchanged.Document the completion-of-squares relation
F = R \ N',Abar = A - B*F,Qbar = Q - N*F,K = Kbar + F, together with the different continuous/discrete gain formulas and the standard LQR assumptions.Add regression tests for generalized CARE/DARE residuals, analytic scalar solutions, completion of squares, closed-loop stability, complex data, Float32, vector inputs, structured/view/static/sparse cross terms, dimension errors, semidefinite transformed costs, zero
N, input immutability, solver keyword forwarding, andextra=Val(true)outputs.Validation on Windows x64:
GROUP=ControlSystems/Pkg.test(): all 1,156 tests pass.Pkg.test("ControlSystemsBase"): full suite passes (7,384 passed, 6 expected broken).The Julia 1.10.12 Base run hits an existing allocation ceiling in
test_freqresp.jl:69(about 123.5 kB allocated versus a 68.0 kB limit). The same test fails on unmodified upstream3035fbdfwith the same dependencies and test settings; its other 414 frequency-response checks pass. This PR leaves that unrelated test unchanged.