Skip to content

debug: correct d0 at k+1 for MovingHorizonEstimator with collocations - #452

Merged
franckgaga merged 1 commit into
mainfrom
debug_d0_colloc
Sep 20, 2026
Merged

franckgaga merged 1 commit into
mainfrom
debug_d0_colloc

Conversation

@franckgaga

@franckgaga franckgaga commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

The bug affects the MovingHorizonEstimator with TrapezoidalCollocation and OrthogonalCollocation transcriptions. It was using the wrong measured disturbances value $\mathbf{d_0}$ at the end of the windows.

The next measured disturbance $\mathbf{d_0}(k+1)$ is not available for the MHE, and the prediction form (direct==false) requires it at the end of the windows with the collocation methods (since piecewise linear measured disturbances is assumed, disregard of the h argument). This PR implement the correct logic in the for loop for the approximation $\mathbf{d_0}(k+1) \approx \mathbf{d_0}(k)$.

@franckgaga
franckgaga marked this pull request as ready for review September 20, 2026 17:10
@franckgaga franckgaga changed the title debug: correct d0 value at k+1 for MovingHorizonEstimator with collocations debug: correct d0 at k+1 for MovingHorizonEstimator with collocations Sep 20, 2026
@codecov-commenter

codecov-commenter commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.22%. Comparing base (a6d5f55) to head (5e8c79a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #452   +/-   ##
=======================================
  Coverage   97.22%   97.22%           
=======================================
  Files          28       28           
  Lines        6811     6812    +1     
=======================================
+ Hits         6622     6623    +1     
  Misses        189      189           
Flag Coverage Δ
unittests 97.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@franckgaga
franckgaga merged commit 3ad80dc into main Sep 20, 2026
19 of 26 checks passed
@franckgaga
franckgaga deleted the debug_d0_colloc branch September 20, 2026 18:47
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.

2 participants