Skip to content

Docs: rewire LQI load-disturbance example with advanced feedback interface#150

Merged
baggepinnen merged 2 commits into
masterfrom
docs/lqi-disturbance-advanced-feedback
May 18, 2026
Merged

Docs: rewire LQI load-disturbance example with advanced feedback interface#150
baggepinnen merged 2 commits into
masterfrom
docs/lqi-disturbance-advanced-feedback

Conversation

@baggepinnen
Copy link
Copy Markdown
Member

Summary

Rewire the LQI load-disturbance example in docs/src/lqg_disturbance.md to use the named-system feedback(s1, s2; w1, u1, w2, u2, z1, z2, pos_feedback) interface, matching the style already used by the model-mismatch section that follows it on the same page.

Two features of the advanced interface make the wiring direct:

  • Listing :u_plant in both w1 and u1 reuses the plant input as the summing point for the load disturbance — no augmented disturbance port on G is needed.
  • Omitting :y_plant_r from both w2 and u2 silently grounds the reference (r = 0) without padding lsim inputs with a zero column. A commented # w2 = :y_plant_r line shows readers that exposing it externally is one keyword away.

Time response is numerically identical to the previous wiring (max |Δ| ≈ 5e-15 over the full 100-step trajectory). The existing in-block @test res.y[:, end] ≈ [0, -1] atol=1e-3 and the plot labels are preserved verbatim.

Test plan

  • Side-by-side lsim comparison of old vs. new closed-loop on the same disturbance closure — identical to round-off
  • @example LQG_DIST block builds in the Documenter pipeline (CI)

🤖 Generated with Claude Code

…rface

Use the named-system `feedback(s1, s2; w1, u1, w2, u2, z1, z2, pos_feedback)`
interface for the disturbance closed-loop in the LQI section, mirroring the
style already used in the model-mismatch section that follows. Listing
`:u_plant` in both `w1` and `u1` reuses the plant input as the summing point
for the load disturbance — no augmented disturbance port on `G` — and leaving
`:y_plant_r` out of both `w2` and `u2` keeps `r = 0` without padding `lsim`
inputs.

Time response is numerically identical to the previous wiring (verified
side-by-side: max |Δ| ≈ 5e-15 over the full trajectory).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.84%. Comparing base (b0b41fb) to head (0578c7f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #150      +/-   ##
==========================================
+ Coverage   91.78%   91.84%   +0.06%     
==========================================
  Files          20       20              
  Lines        3067     3067              
==========================================
+ Hits         2815     2817       +2     
+ Misses        252      250       -2     
Flag Coverage Δ
unittests 91.84% <ø> (+0.06%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@baggepinnen baggepinnen merged commit ac3cb66 into master May 18, 2026
0 of 2 checks passed
@baggepinnen baggepinnen deleted the docs/lqi-disturbance-advanced-feedback branch May 18, 2026 07:52
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