RAF Driving Algorithm
RAF Driving Algorithm
Abstract-This paper introduces a robust prediction- and cost- and sensor ranges were not fully considered. In analyzing
function based algorithm for autonomous freeway driving. A human driver behavior, Ahmed et al. focused on building a
prediction engine is built so that the autonomous vehicle is able mathematical model to simulate human driver acceleration
to estimate human drivers' intentions. A cost function library
is used to help behavior planners generate the best strategies. and lane-changing behavior [8], [9]. They successfully verified
Finally, the algorithm is tested in a real-time vehicle simulation this modelthrough real traffic data. However, their models'
platform used by the Tartan Racing Team for the DARPA Urban inputs are not fully compatible with the perception ability
Challenge 2007. of our autonomous vehicle. And if we directly port their
algorithms to our autonomous vehicle, the system may lose
I. INTRODUCTION
the potential to exceed human driving performance. In 2007,
A. Background the DARPA Urban Challenge provided researchers a prac-
Starting in the 1980s, autonomous driving has gradually tical scenario in which to test the latest sensors, computer
become a fast-developing and promising area. The abilities of technologies and artificial intelligence algorithms [10]. Basic
autonomous vehicles have been extended from lane-centering interaction between autonomous vehicles and human-driven
to intelligent route planning, off-road navigation and interact- vehicles was proven in low-density, low-velocity traffic. But
ing with human urban traffic. Autonomous freeway driving another challenging functionality, that of freeway driving,
is one of the most promising applications of robotics in was not included in the challenge. To finish the competition,
the next few decades. Statistics show that over one million most teams used rather conservative algorithms: their vehicles
people were killed worldwide in traffic accidents in 2007. The preferred to avoid difficult maneuvers in high-density traffic by
risk of death in a freeway accident is much higher than in stopping and waiting for a clear opening instead of interacting
other traffic environments. Most accidents on freeways are with it and operating the vehicle and human drivers. Compared
caused by tired or careless drivers or mistaken maneuvers to this previous work, our research can be summarized as
in emergency conditions. These can be efficiently avoided follows.
with an autonomous driving system. Another advantage of 1) Prediction Engine: We build an intelligent prediction en-
autonomous freeway driving is its ability to free people to gine with the ability to realizing the intentions of surrounding
perform tasks other than driving while traveling long distances. vehicles, which provides the autonomous vehicle a look-ahead
In a word, autonomous freeway driving technology has the ability similar to that of human drivers.
potential to significantly improve the quality of people's lives. 2) Cost Function-Based Scenario Evaluation: We construct
a cost function library which is called by behavior modules to
II. RELATED WORKS evaluate the predicted scenarios and generate best strategies.
In the 1990s, E.Dickmanns and his colleagues implemented 3) Prediction- and Cost Function-based Algorithm: A
an autonomous driving platform based on their 4-D approach prediction- and cost function-based algorithm is implemented
to vision data processing [1], [2]. The NAVLAB project at in three behavior modules related to freeway driving ability,
CMU has built a series of experimental platforms which are distance keeping, lane selecting and merge planning, which
also able to run autonomously on freeways [3], [4], but do improves the performance and robustness.
not include lane selecting, merging behavior and the ability to 4) Freeway Driving Performance Analysis: We build a
blend into the human traffic environment. Rahul Sukthankar hybrid performance analysis tool. It combines the advantages
introduced evolutionary algorithms into autonomous freeway of both qualitative and quantitative performance evaluation.
driving behavior control in the 1990s [5], [6]. A three-level
III. SYSTEM FRAMEWORK
lane-selecting algorithm was used by lun Miura et aI., and
estimated arrival time and event-triggered computation were A. Software Platform
used to handle a simulated uncertain freeway traffic envi- Because the autonomous driving systems are rather compli-
ronment [7]. However, none of these systems was designed cated and autonomous freeway driving tests can be dangerous,
for practical road testing. Many system parameters, such it is indispensable to simulate algorithms before conducting
as the latency, vehicle dynamic performance, input errors real freeway tests. In the DARPA Urban Challenge 2007,
B. Prediction Engine
the Tartan Racing team built a real-time vehicle controller While human drivers operate vehicles on the freeway, they
called TROCS (Tartan Racing Operator Control System) [11]. can react and communicate efficiently with each other by
Most of the artificial intelligence we used in the competition showing their intentions and also recognizing other vehi-
was developed and tested using the TROCS simulator, so cles' intentions. This mechanism provides experienced human
its performance and accuracy have been well proven. In drivers enough time to prepare and make suitable maneuvers in
order to implement the new robust freeway algorithms, we advance. To implement this look-ahead ability in autonomous
decided to use the TROCS simulator for better testability driving, we build two prediction engines into our algorithm.
and compatibility with previous work. There are four primary For better prediction performance and lower computing cost,
subsystems in TROCS, as shown in Figure 1. The perception we summarize the prediction engine's input into a single
system analyzes real-time data input from LIDAR, radar and structure, the Abstract Vehicle Map (AVM), which represents
GPS sensors. The role of mission planning is to optimize the micro traffic environment. As shown in Figure 3, in this
the path to achieve different checkpoints considering the structure, the distances and velocities of the 8 vehicles around
arrival time and distance. In the behavior executive system us are considered. There are three reasons of choosing this
we use artificial intelligence to control the vehicle's behaviors 8-vehicle Abstract Vehicle Map. First, it gives the minimum
and interactions with traffic. Motion planning executes the number of vehicles we should consider without adding un-
behavior command while considering the dynamic parameters necessary additional vehicles. It thus efficiently represents
and outputting steering and throttle commands. the micro traffic environment around a vehicle, especially on
In developing the behavior control algorithm, we used freeways. Second, in Rahul Sukthankar's research [5], [6] a
the simulation mode of TROCS. In this mode, TROCS will similar abstract input was proven to be feasible in tactical
simulate the perception output and also the traffic environment, controlling. Finally, it fits the autonomous vehicles' sensing
so that we can test our algorithm accurately in simulation. range and ability well. After abstracting the input of the
After the simulation, the tested algorithm can be directly prediction engine, we use two different assumptions described
ported to the vehicle for practical road tests. below to implement the prediction engine and compute the
IV. PREDICTION- AND COST FUNCTION- BASED simulated AVM results.
ALGORITHM 1) Constant-Velocity AVM: Due to the uncertainty of the
A. Algorithm Framework traffic environment, the longer the prediction period, the larger
the error. We therefore restrict the prediction time to less than
The diagram of this algorithm is shown in Figure 2. five seconds, which is also similar to human driver's prediction
There are three primary steps in this algorithm: candidate ability. Because most drivers keep their velocities relatively
parameter generation, prediction, and scenario evaluation. In constant on freeways, we just assume that the surrounding
the candidate parameter generation step, a set of candidate vehicles' velocities in the AVM are constant. Based on this, we
output parameters is generated. In the distance keeper module, build the prediction kernel equation in the prediction engine.
for example, the generator produces 20 different acceleration
values ranging from -3.0m/s to 3.0m/s. Then the parameter set v(i + 1) = v(i) + acmd~t (1)
as well as the map of the current moving vehicles are sent to d(i + 1) = d(i) + v(i)~t (2)
the prediction engine, which generates a series of simulated
scenarios in the following t seconds. For instance, if we set the In Equation 2, v(i) is the relative velocity array of sur-
prediction interval to 0.3 seconds and predict for 10 steps, we rounding vehicles, acmd is the commanded acceleration of
will get the predicted scenario of the next 3 seconds. The cost our autonomous vehicle, and d(i) is the relative distance of
function-based evaluation block then begins to compute the the surrounding cars in the AVM. The prediction model thus
cost value of each scenario, which represents the performance assumes that our autonomous vehicle is static while other
of a corresponding input parameter. By using this mechanism, surrounding vehicles move relative to it.
1016
~~[l ~ ~U\J ~ ~lZl ~ ~D
";'" 6[J 5l2J
~2O 0 20 40 60 ?100 ·50 0 50 100 00 50 100 00 500 1000
Gap Error (m) Clear Distance (m) Time Consumption (m) Distance To Goal (m)
Fig. 5. Cost Function Library Dependencies
Vi
4O~.(.
L~r.,~~',::
20'" "'i ~ 3 ~
4
:
DK Velocity
DK Acceleration
Output
Command
8 0 100 2 /
10 0 0 1 1
1017
When the intended lane is different from the current lane we After computing the estimated arrival time, merge risk penalty
are driving in, the merge planner will be triggered. It computes and distance to goal penalty are added as shown in Equation
the feasibility of merging and chooses the best opportunity to 10
merge. Three outputs are used to implement this. They are Clane = Cave + J.L6 C risk + J.L7CcloseToGoal (10)
merge acceleration, merge velocity and commanded lane.
The merging risk uses the clear distance cost in the library. It
1) Distance Keeper: We first implement our distance
reflects a strategy preference of merging into lanes with larger
keeper based on the prediction- and cost function-based al-
gaps. When the vehicle is close to goal, we add penalty times
gorithm framework. The objective of this module is to keep
to the estimated arrival time of the lanes other than the goal
a reasonable distance from the leading vehicle. The distance
lane, so that the lane selecting algorithm will not cause the
ddesired is computed according to the current velocity as
vehicle to miss destinations. Then this module will output the
shown in Equation 5.
lane corresponding to the lowest Cl ane .
Ddesired = D min + kVvehicle (5) 3) Merge Planner: The merge planner computes the merge
commands, including desired velocity, acceleration and merge
In this module, we use two cost functions for evaluating and
status. There are mainly two statuses in a typical merging ma-
selecting the best result for the gap error (~D = Dcurrent -
neuver, adjusting and merging. The rule-based merge planner
D desired) and the cost of acceleration, as shown in Equation
strategy we used in the Urban Challenge tries to make this
6.
maneuver as safe as possible. But on freeways its adjustment
(6)
strategy, such as slowing down or even stopping to wait
For each generated prediction scenario, we compute its corre- for merging gaps, is not proper and can be dangerous. We
sponding Cf:::,.D, C acc and then get Cscenario. As shown in therefore implemented a smarter merge planner with better
Equation 7, Ctotal is the average cost of all the predicted performance on freeways. In our prediction- and cost function-
scenarios, and n is the number of prediction steps. based implementation, there are four parameters that represent
a merging strategy, adjustment time, adjustment acceleration,
Ctotal = ~(Cscenario/n) (7)
merging time and merging acceleration. But since the merging
The acceleration and velocity corresponding to the lowest time is controlled by the lower-level motion planning subsys-
Ctotal is the module's output. The performance will be shown tem, we set it to a constant. We then send different combination
and analyzed in Section V. of the three inputs into the prediction engine. As shown in
2) Freeway Lane Selector: The role of the lane selector is to Equation 11, the cost of a merge strategy consists of two parts,
output the ID of the intended lane for the vehicle to merge into. adjustment cost and merging cost.
The previous lane-selecting algorithm is rather conservative.
It always tries to merge into the goal lane and then keep in Costtotal = + J.LgCmerge
J.LsCadj (11)
that lane no matter how far the destination is, except that Costadj = J.LIO~Cclear + J.LII CadjT + J.L12 C acc (12)
the lead vehicle is stopped or of abnormal low speed. Our Costmerge = J.L13~( Cclear) + J.L14~( C f:::,. v) + J.L15 C acc (13)
prediction- and cost function-based lane selector provides a
Adjustment cost considers the clear distance, adjustment time
more intelligent and robust ability on selecting intended lanes.
and acceleration only in the current lane. And the merging
One of the main component of the lane selection cost is
cost considers the clear distance, acceleration, and velocity
the estimated arrival time to the goal. However, since the
difference of both current and intended lanes, as shown in
traffic environment is uncertain, it is impossible to compute
Equation 12 and 13.
the arrival time with only local sensor data. We therefore use
a virtual goal instead. The estimated arrival time of virtual V. PERFORMANCE EVALUATION
goal consists of three parts as shown in Equation 8. A. Testing Scenario Generator
Carrival = Cmerge + Ccatch + Cjollow (8) To test the performance of our algorithm, the first step is to
build a freeway scenario in simulation. The scenario should
Cmerge represents the estimated time to perform the merg-
be random, but statistically repeatable, and should be similar
ing maneuver; if the vehicle stays in the current lane, then
to practical freeway environments.
Cmerge = O. Ccatch represents the estimated time for au-
1) Normal Freeway Traffic: The freeway traffic environ-
tonomous vehicle to catch up with a lead vehicle, if there is
ment is generated through a Gaussian random number gen-
one. Cjollow represents the remaining time cost after merging
erator. Both the distances between vehicles and velocities
and catching up maneuvers to reach the virtual goal.
have a Gaussian distribution. Therefore, by adjusting the four
For better adjustable and robustness to input noise, we
parameters, dave, dO', V ave and Va, we get different traffic
compute three estimated arrival time for virtual goals 450m,
environments.
350m and 250m down the road. We then weight the three time
2) Checkpoints: The testing autonomous vehicle enters the
cost and compute the sum fo them for the final evaluation, as
road in the center lane and its destination is in the same lane.
shown in Equation 9.
Currently, the more complicated traffic features near exits or
Cave = J.L3 C arrival450 + J.L4 C arrival350 + J.L5 C arrival250 (9) entrances are not included.
1018
i':~A'lU5=~
Comma-Separated
VAlues (CSV)
File j 0 - - - u3=1 u4=1
o 200 400 600 800 1000 1200 1400 1600 1800 2000 2200
lime(s)
! ,:t~1~~O~d:S,~ol
o 200 400 600 800 1000 1200 1400 1600 1800 2000 2200
lime(s)
! 'J5~iJJ6t~jl~~;'~2l
o 200 400 600 800 1000 1200 1400 1600 1800 2000 2200
lime(s)
repeatability.
B. Performance Analyzing
Because human evaluations of the driving skills are mainly
qualitative, there is no universally accepted way to compare Fig. 12. Circumventing Vehicles
different algorithms or set an optimization goal. Some previous
work in strategy optimization uses a global cost function
to evaluate the performances [5], [6]. However, there are the prediction- and cost function-based algorithm makes the
many factors in driving ability, so a single value is not distance-keeping strategy more similar to that of the human
representative enough. Other researches use the time-maneuver drivers.
plots to show the performance improvements [7]. But this 2) Lane Selector: Table I shows the performance improve-
qualitative evaluator is not able to show global performance ments of using prediction- and cost function-based algorithm.
improvements. We therefore propose a logging file analysis We also find that parameters J.-l3, J.-l4 and J.-l5, which represent
mechanism, as shown in Figure 7. The evaluator can summa- the respective weights of tarrival to 250m, 350m, 450m virtual
rize our simulation results using the following features: arrival goals, influence the performance a lot. With larger J.-l5 or
time, number of maneuvers, histogram of velocity, acceleration smaller J.-l3, the system emphasizes long-term time savings
and clear distances. It is then much easier for people to more than short-term advantages. However, if we consider
use their preliminary knowledge to analyze the algorithms' long-term time savings too much, the possible velocity vari-
the advantages and disadvantages. In our research, both the ances of surrounding vehicles will lead to inaccurate prediction
statistical features and explanation of specific examples will and cause the vehicle to make incorrect decisions. As shown
be used to show performance improvements. in Figure 10, with larger J.-l5, there are more oscillations
between lanes. In contrast, with more consideration of short-
C. Experiment Results term advantages, larger J.-l3, we failed to select the most time-
1) Distance Keeper: Figure 8 shows that due to the cost of saving lanes and the time consumption is larger.
the acceleration, the vehicle no longer strictly follows the lead 3) Merge Planner: There are two examples show the robust
vehicle's speed and keeps a constant distance from it. Instead, and smarter merge planner we implemented, which is in Figure
it considers the need of following and also the smoothness of 11 and 12. In the first scenario, the vehicle makes a smooth
driving at the same time. Figure 8 also shows that the ratio merge while keeping the most reasonable distances between
r = J.-l2/J.-l1 represent the strategy generators' preference of VI and V2. And by adjusting cost function parameters J.-l9
strict following or smooth driving. As shown is Figure 9, the the merge strategy can be either conservative (J.-l = 1.5)
latency of reaction is smaller using this algorithm in following or aggressive (J.-l = 0.5). The second example shows the
lead vehicle. With prediction the vehicle is able to accelerate autonomous vehicle's ability of emergency merging with the
or decelerate more resonablely. All these features show that relatively optimal safety clearances instead of a merge failure.
1019
TABLE II
AVERAGE OVERALL PERFORMANCE FROM 5 RANDOM SCENARIO TESTS a lot. The strategy generated by the new algorithm saves
(dc;=l, vc;=l) about 20% times while driving on a freeway with traffic.
And the maneuver numbers decreases 70%, which means
dave (m) V ave (mls) Nmerge
tarrival
± 130.2 that the merging and lane selecting are more reasonable and
Current 150 8 2173.4 36.4 ± 2.0
Previous 150 8 2985.9 ± 99.1 156.4 ± 20.1 efficient. In conclusion, the prediction- and cost function-based
Current 120 7.5 2220.0 ± 99.7 43.5 ± 5.3 algorithm has been proven to be functional and promising in
Previous 120 7.5 2726.4 ± 100.2 146.1 ± 2.0 improving autonomous vehicles' behavior abilities.
Current 90 7 2641.7 ± 54.2 51.0 ± 7.5
Previous 90 7 2941.0 ± 150.7 139.9 ± 19.6 B. Further Improvements and Works
Current 60 6.5 3195.5 ± 20.3 36.9 ± 2.0
Previous 60 6.5 3070.4 ± 190.5 146.0 ± 31.9 Though autonomous freeway driving ability is preliminarily
proven to be satisfactory on the simulated platform, there are
-Oave=60 -Oave=60
potential improvements. First, we plan to use machine learning
0.3
_._._.• Oave=90
0.3
! _._._..
Oave=90
and pattern recognition to refine our prediction model and
•••••••••• Oave=120 ~ Oave=120
extend it to a vehicle intention recognition system. Second,
1020