path planning optimization using adams and heeds
DESCRIPTION
Optimization using ADAMS and HEEDS software is very useful document for vehicle engineers.TRANSCRIPT
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Path Optimization using ADAMS/Car
and HEEDS/MDO 2012 International Ground Vehicle Users Symposium
Presented By: Jesper Slattengren, Pratt & Miller Engineering
October 23, 2012
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Find a trajectory for the driver to follow so that
– The vehicle clears the boundaries of the given path
– Follows this maneuver at a specified speed, or maximizes the speed
through the desired path
– Need only to find A feasible solution, not the BEST solution
Problem
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Limit handling problem
• Small variation of factors can cause vehicle roll-over
– Up to a third of evaluations result in roll-over
– Error evaluations do not contribute to solution space
What makes this interesting?
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Background
4
Speed requirement has
increased over the years
HMMWV was designed for 40
mph
Current requirement is usually
45-50 mph
50 mph is used as target in this
presentations
Path outline is scaled to
vehicle length and width
Among standard
requirements for
military vehicles in
the US is to pass a
NATO lane change
AVTP 03-160W at
specified speed
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Animation
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Traditional approach
6
Copy and paste to driver
control data file (dcd)
Simulate, postprocess, adjust
trajectory, repeat…
Manual iteration of
path using Excel to
calculate trajectory
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Create request for clearance of cones for outside of all four
corners
– 3 requests components for each corner
• Each segment of the track
• Set clearance to 1000 when not in segment
– Minimum of each request is used as constraint
• Total of 12 constraints
• The objective was to clear all constraints and maximize the sum of all
clearances
– Request statement:
IF(-DX(body.mal_front_corner,ground.MAR_Outline2, ground.MAR_Outline2)*
DX(body.mal_front_corner, ground.MAR_Outline4, ground.MAR_Outline4):
1000,1000,
DY(body.mal_front_corner, ground.MAR_Outline4, ground.MAR_Outline4))
Clearance request
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Baseline responses
Target: Min of each curve > 1 mm
Each corner clearance is the composite of the three section requests
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• HEEDS will copy specified files to a local working directory
– Used for local evaluation
• HEEDS will start ADAMS/Car in batch, using an input command
file “setup.cmd” that:
– Executes NATO.py that builds the dcd-file based on provided parameters
– Loads the binary file with the vehicle assembly
– Runs the simulation
– Writes an output file “HEEDS.out” that lists the relevant results from the
simulation.
• HEEDS uses “acar11batchclose.bat setup.cmd” as start
command for ADAMS.
– acar11batchclose.bat starts ADAMS/Car in batch mode and then closes
the window call "C:\MSC.Software\MD_Adams_x64\2011\common\mdi.bat" acar ru-acar b %1
exit
Process
9
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Dcf and dcd files should be local as should NATO.py and
setup.cmd
– Listed as input files to HEEDS
• Dcf.xml and NATO.py are used to tag optimization factors
(inputs; determined by HEEDS)
• HEEDS.out will be written to local working directory
– Specified as output file to HEEDS
File structure
10
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Use local dcf and dcd-files
– Bypass database search
– HEEDS copies required files to local working directory
• Python script to generate trajectory and build dcd-file
• ADAMS command file to
– Run python script
– Load binary
– Run simulation
– Generate ASCII output file
• Input tagging directly in python script and driver control file
(dcf.xml)
• Output tagging in ASCII file “HEEDS.out”
Using HEEDS/MDO with ADAMS/Car
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
-6
-5
-4
-3
-2
-1
0
1
2
-160 -140 -120 -100 -80 -60 -40 -20 0
Late
ral A
xis
(m)
Longitudinal Axis (m)
ADAMS Trajectory
z1Entryz1Entryz1Exit
z2Exit z2Entry
z3Entryz3Exit
trans1Entry
trans1Exittrans2Entry
trans2Exit
trans1Shifttrans2Shift
Direction of Travel
Parameterized trajectory
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Besides the trajectory factors, the driver lateral controller
parameters should be included
Factors
Min Baseline Max Res #points Tagged in
LatPthP 0.75 1 1.25 0.01 51 dcf.xml
LatPthI 0.25 0.1 2 0.01 176 dcf.xml
LatPthD 0 1.00E-05 1.00E-04 1.00E-06 101 dcf.xml
minPreviewDistance -1 -1 -1 constant dcf.xml
z1Entry -2.5 0 2.5 0.05 101 NATO.py
z1Exit -2.5 0 2.5 0.05 101 NATO.py
z2Entry -2 2.8 6 0.05 161 NATO.py
z2Exit -2 3.9 6 0.05 161 NATO.py
z3Entry -2 0.5 6 0.05 161 NATO.py
z3Exit -2 0.2 6 0.05 161 NATO.py
trans1Entry -2 4 8 0.05 201 NATO.py
trans1Exit -2 2 8 0.05 201 NATO.py
trans2Entry -12 5 8 0.05 401 NATO.py
trans2Exit -2 0.25 8 0.05 201 NATO.py
trans1Shift -1 0 1 0.02 101 NATO.py
trans2Shift -1 0 1 0.02 101 NATO.py
Speed 22352 22352 22352 constant dcf.xml
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
system &
command_text = "\"C:\\MSC.Software\\MD_Adams_x64\\2011\\common\\mdi.bat\" python NATO.py" &
send_output_to_info_window = off &
echo_to_logfile = off
file binary read file="E:/project/work/base_v61/Test_DLC.bin“
.
.
acar analysis full_vehicle sdi submit &
assembly=.Test_model &
output_prefix="Test" &
analysis_mode=interactive &
road_data_file="mdids://acar_shared/roads.tbl/2d_flat.rdf" &
dcf_file=“dcf.xml" &
log_file=yes
.
.
file text open file="Heeds.out" open=overwrite
file text write file="Heeds.out" &
format="FL_1 = %f" &
values=(eval(MIN( .Test_model.Test_dcf.DLC_Clearance_Left.U2 ))) &
newline=yes
.
.
file text close file="Heeds.out"
quit conf=no
setup.cmd
14
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
class natoLC:
def __init__(self):
### Following parameters can be modified ###
self.z1Entry = 0.0
self.z1Exit = 0.0
self.z2Entry = 2.8
self.z2Exit = 3.9
self.z3Entry = 0.5
self.z3Exit = 0.2
self.trans1Entry = 4.0
self.trans1Exit = 2.0
self.trans2Entry = 5.0
self.trans2Exit = 0.25
self.trans1Shift = 0.0
self.trans2Shift = 0.0
self.VehWidth = 2.32
self.vehLength = 4.57
self.DLC_X_offset = 0.0
self.DLC_Y_offset = 0.0
self.outFile = "tempDCD.dcd"
.
.
.
NATO.py
15
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
FL_1 = 32.472361
FL_2 = 189.953480
FL_3 = 181.878024
RL_1 = 98.256731
RL_2 = 150.678916
RL_3 = 352.526555
FR_1 = 240.500143
FR_2 = 78.848340
FR_3 = 124.713861
RR_1 = 238.895725
RR_2 = 128.640251
RR_3 = -8.220754
MaxRoll = 6.707427
SW_RMS = 41.060484
Dist = 110294.928090
HEEDS.out
16
These values are the output from the
simulation, extracted by the ADAMS
command file.
The minimum of the 12 clearance
requests are used for constraints.
The “MaxRoll” and “Dist” are used to
determine if the simulation was
successful.
SW_RMS (Steering Wheel angle RMS)
is an indication on how nervous the
driver controller behaves and minimizing
this can be used as objective.
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Which trajectory should the optimization start from?
– Best manual optimized?
– Path that works for lower speed?
– Nominal, center-of-path line?
– Straight line?
• Which optimization method works best?
• Can maximization of speed be included as well as trajectory
search?
Questions
No, that was a bad idea to start with
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• SHERPA, QP, Simplex methods evaluated
• Simplex gives very fast convergence only IF baseline guess is
VERY close to feasible solution
– Did not work well in this case
• QP converges fast if baseline is reasonable close to feasible
solution
• SHERPA does the job in almost all cases
Optimization method
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• Starting with trajectory that worked for 43 mph at a lighter
configuration
• Simplex did not find a solution
• Sherpa found a feasible solution after 551 evaluations
• QP needed only 57 iterations
• Not much difference in trajectory
• Quite a bit of difference in driver controller
Results
Baseline SHERPA
551 QP 57
LatPthP 1 1.62 1.05
LatPthI 0.1 1.55 0.22
LatPthI 1.00E-05 2.60E-05 1.07E-05
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
-6
-5
-4
-3
-2
-1
0
1
2
-160 -140 -120 -100 -80 -60 -40 -20 0
Cones
Baseline
SHERPA 551
QP 57
Results
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Different problem
21
A “best manual” baseline was
used
On a different
vehicle, very
different results
were achieved
-6
-5
-4
-3
-2
-1
0
1
2
-200 -150 -100 -50 0
Cones
Baseline
Optimized
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Different problem (cont.)
22
Neither QP or Simplex did
converge
solution too far off from baseline
SHERPA found a solution
in 149 evaluations
Starting from middle-
of-the-road “nominal
trajectory”
-6
-5
-4
-3
-2
-1
0
1
2
-200 -150 -100 -50 0
Cones
Baseline
Optimized Sherpa
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
Driver trajectory and corner paths
23
The corners of the vehicle will
not follow the driver trajectory
due to vehicle and driver
dynamics
Optimized driver path
and corner
trajectories
-6
-5
-4
-3
-2
-1
0
1
2
-200 -150 -100 -50 0
Cones
Baseline
Optimized Sherpa
MSC Software Confidential 2012 International Ground Vehicle Users Symposium
• HEEDS and ADAMS/Car works well together for path
optimization
• Use SHERPA if no good guess is available
– Use “middle-of-the-road” path
• Use QP if initial trajectory is sufficiently close to final trajectory
• No success in maximizing speed
– Multiple tries were performed using
• The same 12 constraints
• Maximize speed as objective
– Could not get speed increase even when starting from 43 mph
• As seen here, 50 mph is feasible
Conclusion
MSC Software Confidential 2012 International Ground Vehicle Users Symposium