Predicted_Curvature Weight Adjustments - #191
Conversation
Set the weight for predicted_curvature better throughout driving situations.
|
Do you have any routes to provide context to how this really affects the control? I experimented with variable blend ratios and found little effect, but 90% of my testing was in an F150, so perhaps the MachE is more sensitive. |
|
Anecdotally, it's allowed me to go back to Pop v2 model and not be completely annoyed by bouncing back and forth on straightaways. I can upload a new route, but not sure I have a good clean comparison route. I'd probably be willing to downgrade and grab one if you think that's necessary for completing the PR. I'll keep the "get route -> make change -> get new route" order of operations in mind for future changes! |
Above 55mph, predicted_curvature is not needed because PSCM delay is within stock live_delay ranges. PSCM delay smoothly decreases as speed increases, so should predicted_curvature weight. Interpolate b based on speed: interp b from _FORD_PATH_ANGLE_BLEND_RATIO to 0.0 between 25mph and 55mph Few minor tweaks to b_blend logic: Initialize b_blend halfway between 25 and 55 mph so it can quickly raise or lower. Remove re-initializations on interruptions. Remove straightaway logic since no more blending at highway speeds. Replace b_blend step function with smoother low pass filter.
|
Made some tweaks to my predicted_curvature logic. Main purpose was to reduce oscillations that were still occurring during speed changes, particularly around 50mph. More description is in the new commit. |
Purpose
Reduce predicted_curvature model noise on straightaway to combat some oscillations at the source rather than gain dampening.
Changes
Step function to smooth out transition between low and high b_blend values.
Add a percentage delta and a min curvature value to the logic that sets these. Prevents them from flipping true/false constantly.
Add new variable that reduces predicted_curvature blend on straightaways to reduce model noise. Set using entering == false, falling == false, and curve is minimal.
Notes
I'm treating 0.001 as the boundary for a meaningful curve that might warrant higher predictive blending.