Script an Open Loop Acceleration Event

In this step, you will script an event with 50% throttle, 0% brake and 0 steering angle.

An event can be broken down into smaller sub-events or maneuvers. You will model this as a single maneuver event.

Figure 1.
  1. Open any text editor and copy and paste the following text into it.
    Important: All blank lines must be removed prior to saving the file.
    Tip: Read through the comments for a better understanding of what is written in the ADF.
    $-----------------------------------------------------------------ALTAIR_HEADER
    $ This block is required for version control             
    [ALTAIR_HEADER]                                                                             
    FILE_TYPE 		= 'ADF'                                                                  
    FILE_VERSION 	= 1.0                                                                
    FILE_FORMAT 	= 'ASCII'                                                            
    $--------------------------------------------------------------------------UNITS 
    $In this block we specify the units in which this file should be read
    [UNITS]                                                                                     
    (BASE)                                                                                      
    {length  force      	angle       mass   time}                                               
    'meter'   'newton'   	'radians'  'kg'      'sec'                                              
    $--------------------------------------------------------------------VEHICLE_IC
    $In this block we specify the initial conditions specifically initial speed of the 
    $vehicle with respect to the vehicle IC marker in the driver attachments                     
    [VEHICLE_INITIAL_CONDITIONS]                                                                 
    VX0 = -20.0                                                                                     
    VY0 = 0.0                                                                                    
    VZ0 = 0.0                                                                                    
    $--------------------------------------------------------------STEERING_STANDARD
    $This block specifies the saturation and cutoff frequency for the low pass filter for
    $steering output signal. These signals are global and are active for the entire event            
    [STEER_STANDARD]                                                                            
    MAX_VALUE 			= 3.141593                                                         
    MIN_VALUE 			= -3.141593                                                         
    SMOOTHING_FREQUENCY 	= 10.0
    INITIAL_VALUE 		= 0.0
    $--------------------------------------------------------------THROTTLE_STANDARD
    $This block specifies the saturation and cutoff frequency for the low pass filter for
    $throttle output signal            
    [THROTTLE_STANDARD]                                                                         
    MAX_VALUE 			= 1.0                                                      
    MIN_VALUE 			= 0.00                                                      
    SMOOTHING_FREQUENCY 	= 10.0
    INITIAL_VALUE 		= 0.5                                        
    $---------------------------------------------------------------BRAKING_STANDARD            
    $This block specifies the saturation and cutoff frequency for the low pass filter for
    $brake output signal            
    [BRAKE_STANDARD]                                                                            
    MAX_VALUE 			= 1.0                                                         
    MIN_VALUE 			= 0.0                            
    SMOOTHING_FREQUENCY 	= 10.0                             
    INITIAL_VALUE 		= 0.0 
    $-----------------------------------------------------------------MANEUVERS_LIST 
    $This block provides the list of all the maneuvers, simulation time for each maneuver
    $maximum solver step size (hmax) and print interval           
    [MANEUVERS_LIST]                                                                            
    { name       		simulation_time  h_max  print_interval}                         
    'MANEUVER_1'	5.0                     0.01     0.01                        
    $---------------------------------------------------------------------MANEUVER_1            
    [MANEUVER_1]
    $This block provides the ties controllers to each driver output                                                                                 
    TASK = 'STANDARD'                                                                           
    (CONTROLLERS)                                                                               
    {DRIVER_SIGNAL  	PRIMARY_CONTROLLER 	ADDITIONAL_CONTROLLER}      
     STEER                   	OL_STEER_0	  		NONE                                
     THROTTLE             	OL_0.5	  		NONE                            
     BRAKE                   	OL_0	  			NONE                                
    $---------------------------------------------------------OL_STEER
    $This is controller block containing all the information required by
    $the driver to construct the controller. Different controllers have
    $different requirements. Here we are using open loop constant type
    $of controller.                                                                                              
    [OL_STEER_0]                                                                      
    TAG	= 'OPENLOOP'                                                             
    TYPE	= 'CONSTANT'                                            
    VALUE	= 0.0                                       
    $---------------------------------------------------------OL_BRAKE             
    [OL_0]                                                                      
    TAG	= 'OPENLOOP'                                                             
    TYPE	= 'CONSTANT'                                            
    VALUE	= 0.0                                            
    $---------------------------------------------------------OL_THROTTLE             
    [OL_0.5]                                                                      
    TAG	= 'OPENLOOP'                                                             
    TYPE	= 'CONSTANT'                                            
    VALUE	= 0.5
  2. Save the file.
  3. Source the file in the Altair Driver File browser.
    Figure 2.
    Note: The Edit driver file button can be used to edit the file.
  4. Click to run the simulation.
  5. After the simulation is over and the solver creates the h3d and plt files, from the menu bar, click Analysis > View Reports.
    Figure 3.


  6. Select the recent run in the View Reports dialog and click OK.
    Figure 4.
  7. The noise in the steering is numerical error of negligible magnitude – 0 for all practical purposes. Throttle is constant at 0.5 (driver throttle, brake and clutch outputs are normalized so, 50%) and brake is constant at 0.
    Figure 5.
  8. Next we will try slightly different initial conditions. We will start the throttle at 0 and brake at 100%. Click the Edit Driver File button to open up the file editor.
  9. Change the INITIAL_VALUE attribute in the THROTTLE_STANDARD block in the ADF, from 0.5 to 0.
    [THROTTLE_STANDARD]                                                                         
    MAX_VALUE 			= 1.0                                                      
    MIN_VALUE 			= 0.00                                                      
    SMOOTHING_FREQUENCY 	= 10.0
    INITIAL_VALUE 			= 0.5 0     
  10. Similarly, change the INITIAL_VALUE attribute in the BRAKE_STANDARD block in the ADF, from 0.0 to 1.0.
    [BRAKE_STANDARD]                                                                            
    MAX_VALUE 			= 1.0                                                         
    MIN_VALUE 			= 0.0                            
    SMOOTHING_FREQUENCY 	= 10.0                             
    INITIAL_VALUE 			= 0.0 1.0 
  11. Save the ADF.
  12. Run the simulation and study the results.
  13. Now, we see that throttle and brake start from respective initial values and step up to the controller outputs. The time taken to step up is roughly (5x1/SMOOTHING_FREQUENCY).
    Figure 6.