Docs: rewire LQI load-disturbance example with advanced feedback interface#150
Merged
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Rewire the LQI load-disturbance example in
docs/src/lqg_disturbance.mdto use the named-systemfeedback(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:
:u_plantin bothw1andu1reuses the plant input as the summing point for the load disturbance — no augmented disturbance port onGis needed.:y_plant_rfrom bothw2andu2silently grounds the reference (r = 0) without paddinglsiminputs with a zero column. A commented# w2 = :y_plant_rline 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-3and the plot labels are preserved verbatim.Test plan
lsimcomparison of old vs. new closed-loop on the samedisturbanceclosure — identical to round-off@example LQG_DISTblock builds in the Documenter pipeline (CI)🤖 Generated with Claude Code