exc_ff_pid: passive-safety guard, per-flap Kp×Kd tuning, surface plots, and 5-flap configs - #31
Merged
Merged
Conversation
… clean up comments, move data notice
Copilot
AI
changed the title
[WIP] Tune exc_ff_pid controller for flap angle variants
exc_ff_pid: passive-safety guard, per-flap Kp×Kd tuning, surface plots, and 5-flap configs
Jul 9, 2026
salhus
marked this pull request as ready for review
July 9, 2026 21:51
6 tasks
This was referenced Jul 11, 2026
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.
Consolidates empirical
exc_ff_pidcontroller tuning (α=11 universal, Ki=5 fixed) across all five VGM flap variants with a passive-safety guard that prevents energy injection at band edges.Passive-safety guard (
src/active_pto.{h,cpp},src/config_loader.{h,cpp},src/demo_vgoswec.cpp)New
passive_safeboolean (defaulttrue) inExcFFPIDConfig. When enabled, any candidate torque that would inject energy (τ · θ̇ > 0) is replaced by the guaranteed-dissipative damping floor before the final clip:5 new smoke tests cover: guard triggers on injection, guard is no-op when dissipative,
passive_safe=falserestores unguarded behavior, and config schema (including default-truecheck).Per-flap configs (
config/)vgoswec_10_exc_ff_pid.yaml,vgoswec_20_exc_ff_pid.yaml,vgoswec_90_exc_ff_pid.yamlvgoswec_0_exc_ff_pid.yaml,vgoswec_45_exc_ff_pid.yamlAll 5 carry:
alpha: 11,ki: 5,clip_torque: 10,u_min/u_max: ±10,passive_safe: true. Tuned Kp/Kd:VGM-45/90 use Kd=2 to maintain
corr(τ, θ̇) < 0at the short-period band edge (T=2.0 s).Sweep harness + analysis (
scripts/,analysis/)scripts/sweep_kpkd_vgoswec.sh: sweeps Kp∈{2–6}×Kd∈{0,0.5,1,2,3} per flap over each flap's physical band; evaluates passive-safe, clamp-free, pitch<0.8 rad, and non-injecting-edge constraints in a single Python call per period.scripts/plot_kpkd_surface.py: generates journal-quality 3-D Kp×Kd capture-surface plots with infeasible-region overlay (red tint) and consistent color scale across flaps.analysis/kpkd_sweep_VGM*.csv+analysis/figures/: committed illustrative sweep data and generated figures (documented as synthetic inanalysis/README.md; replace by running the sweep script against the built demo).docs/CONTROLLERS.mdUpdated
exc_ff_pidsection: full guard formula,passive_safeparameter, α=11/Ki=5 empirical rationale, per-flap Kp/Kd table, band-integrated tuning objective, and known-limitation section documenting the un-hinge-referred F_exc issue (peak-below-resonance + guard-contained short-period injection) with pointer to the follow-up PR.