Adaptive Cruise Control
cbfpy.examples.adaptive_cruise_control_demo
Adaptive Cruise Control CLF-CBF Demo
This will enforce that the follower vehicle maintains a safe distance from the leader vehicle, while also tracking a desired velocity.
We define the state z as [v_follower, v_leader, follow_distance] and the control u as the follower's wheel force
The dynamics incorporate a simple drag force model using empirically-derived coefficients
Note: There are a few parameters to tune in this CLF-CBF, such as the weightings between the inputs the slack variable in the CLF objective. This is tricky to tune in general and values have been left at what has been seen in other references.
Reference:
- "Control Barrier Function Based Quadratic Programs for Safety Critical Systems" - TAC 2017
- "Control Barrier Function based Quadratic Programs with Application to Adaptive Cruise Control" - CDC 2014
Some parameters are based on Jason Choi's https://github.com/HybridRobotics/CBF-CLF-Helper
ACCConfig
Bases: CLFCBFConfig
Configuration for the Adaptive Cruise Control CLF-CBF demo
Source code in cbfpy/examples/adaptive_cruise_control_demo.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
drag_force(v)
Compute the drag force on the follower car using a simple polynomial model
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v |
float
|
Velocity of the follower vehicle, in m/s |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
Drag force, in Newtons |
Source code in cbfpy/examples/adaptive_cruise_control_demo.py
58 59 60 61 62 63 64 65 66 67 68 69 |
|