honda: tune N-BOX kp/ki, split from Insight - #3711
Draft
miettal wants to merge 1 commit into
Draft
Conversation
kp/ki were a straight copy from HONDA_INSIGHT and never tuned for this much lighter kei car, causing overshoot/oscillation. Binning drive logs by vEgo showed city-speed driving is consistently the hardest to track (18-36km/h |angleError| median 1.46deg/p90 12deg vs 36-54km/h 0.81/3.71deg vs 54-72km/h 0.39/0.98deg). Tapering kp/ki down with speed reduced oscillation while improving low-speed tracking, validated across multiple on-road drives.
Contributor
Car behavior reportReplays driving segments through this PR and compares the behavior to master. Testing 154 segments for: HONDA_ACCORD, HONDA_CIVIC_BOSCH, HONDA_CIVIC_2022, HONDA_CRV_5G, HONDA_CRV_HYBRID, HONDA_HRV_3G, HONDA_INSIGHT, HONDA_E, HONDA_PILOT_4G, HONDA_CRV, HONDA_FIT, HONDA_FREED, HONDA_HRV, HONDA_ODYSSEY, HONDA_PILOT, HONDA_RIDGELINE, HONDA_CIVIC ✅ 0 changed, 154 passed, 0 errors |
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
HONDA_NBOX_2Gshared its lateral PID gains withHONDA_INSIGHT(kp=0.6, ki=0.18), a much heavier hybrid sedan. On-road testing on an actual N-BOX showed overshoot/oscillation with those flat gains.Binning drive logs by vEgo showed tracking error and output usage both drop steadily as speed rises:
| speed | |angleError| median | |angleError| p90 |
|---|---|---|
| 18-36 km/h | 1.46 deg | 12.0 deg |
| 36-54 km/h | 0.81 deg | 3.71 deg |
| 54-72 km/h | 0.39 deg | 0.98 deg |
City-speed driving is consistently the hardest to track. Tapering kp/ki down with speed (kp 0.30->0.20, ki 0.09->0.06 between 36-72km/h) measurably reduced oscillation (output sign-flip rate, angleError stddev) while improving low-speed tracking (p90 error roughly halved in the 18-36km/h band), across multiple on-road test drives on the same car, without touching the already-comfortable higher-speed behavior.
Validation
(WIP: recording a clean, dedicated verification route without unrelated personal driving data. Will fill in before marking ready for review.)
Test plan