Skip to content

honda: tune N-BOX kp/ki, split from Insight - #3711

Draft
miettal wants to merge 1 commit into
commaai:masterfrom
miettal:honda-nbox-speed-dependent-kp-ki
Draft

honda: tune N-BOX kp/ki, split from Insight#3711
miettal wants to merge 1 commit into
commaai:masterfrom
miettal:honda-nbox-speed-dependent-kp-ki

Conversation

@miettal

@miettal miettal commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

HONDA_NBOX_2G shared its lateral PID gains with HONDA_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

  • Dongle ID:
  • Route:

(WIP: recording a clean, dedicated verification route without unrelated personal driving data. Will fill in before marking ready for review.)

Test plan

  • On-road A/B testing on a Honda N-BOX 2018, multiple drives, comparing flat kp=0.6/ki=0.18 vs the new speed-tapered gains
  • Verified reduced output sign-flip rate and angleError stddev, and improved angleError percentiles, especially in the 18-36km/h band
  • Attach verification dongle ID / route above

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.
@github-actions github-actions Bot added car related to opendbc/car/ honda labels Aug 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Car behavior report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

car related to opendbc/car/ honda

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant