Honda Bosch - live-learning gas pedal tuning #3014
Open
+35
−8
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.
This PR updates Honda Bosch gas control.
Honda Bosch A & C ACC uses a m/s2 deceleration command for brake, but uses gas-pedal-position command for acceleration.
Three different adjustments are needed to properly calculate what gas-pedal-position will result in a target acceleration.
Pitch/hill adjustment - This is a trigonometry calculation, mimicking the calculation used by Ford/Toyota
Wind drag adjustment - Wind drag for an average car is calculated here. However this can vary based on car shape, elevation, air density, and wind. Thus a live-learning factor is introduced to update the value used in the calculation.
Pedal-to-force mapping - 80% of Honda's use a linear mapping of pedal position to force. However, certain cars have physical or artificial reasons where this was not programmed linearly by Honda. For example, the CVT Honda Accord creates simulated gearshifts to "feel" like a regular automatic transmission and the factor changes per simulated gear, and the Acura RDX has increased force when the turbocharger spools up. Thus a live-learning factor quickly reacts to changing mapping ratios, the factor was tuned to react in approximately 1 second to changes, to behave like a human driver would react.
This logic has been added to all my custom forks that are widely used by many Honda drivers, and has been in place since December 12. The actuators.accel vs aEgo match is near perfect in plotjuggler curves for all tested Bosch A and C cars, after a few minutes of learning. Driver feedback is that this is a night and day improvement vs existing Honda Bosch long-alpha control.
I'm happy to ask testdrivers to provide whatever testlogs are needed by comma to validate this change. Please advise which logs to request.