Yaw Stability on Varying Road Surfaces

This example shows how to run the vehicle dynamics double-lane change maneuver on different road surfaces, analyze the vehicle yaw stability, and determine the maneuver success.

ISO 3888-21 defines the double-lane change maneuver to test the obstacle avoidance performance of a vehicle. In the test, the driver:

  • Accelerates until vehicle hits a target velocity

  • Releases the accelerator pedal

  • Turns steering wheel to follow path into the left lane

  • Turns steering wheel to follow path back into the right lane

Typically, cones mark the lane boundaries. If the vehicle and driver can negotiate the maneuver without hitting a cone, the vehicle passes the test.

For more information about the reference application, see Double-Lane Change Maneuver.

Run a Double-Lane Change Maneuver

  1. Create and open a working copy of the double-lane change reference application.

  2. Open the Lane Change Reference Generator block. By default, the maneuver is set with these parameters:

    • Longitudinal entrance velocity setpoint — 35 mph

    • Vehicle width — 2 m

    • Lateral reference position breakpoints and Lateral reference data — Values that specify the lateral reference trajectory as a function of the longitudinal distance

  3. In the Visualization subsystem, open the 3D Engine block. By default, 3D Engine parameter is set to Disabled. For the 3D visualization engine platform requirements and hardware recommendations, see 3D Visualization Engine Requirements.

  4. Run the maneuver. As the simulation runs, view vehicle information.

    • In the Vehicle Position window, view the vehicle longitudinal distance as a function of lateral distance.

    • In the Visualization subsystem, open the Lane Change scope block to display the lateral displacement as a function of time.

      • Red line — Cones marking lane boundary

      • Blue line — Reference trajectory

      • Green line — Actual trajectory

      The green line does come close to the red line that marks the cones.

    • In the Visualization subsystem, if you enable the 3D Engine block visualization environment, you can view the vehicle response in the AutoVrtlEnv window.

Sweep Surface Friction

Run the reference application on three road surfaces with different friction scaling coefficients. Use the results to analyze the yaw stability and help determine the success of the maneuver.

  1. In the double-lane change reference application model DLCReferenceApplication, open the Environment subsystem. The Friction block parameter Constant value specifies the friction scaling coefficient. By default, the friction scaling coefficient is 1.0. The reference application uses the coefficient to adjust the friction at every time step.

  2. In the Visualization subsystem, enable signal logging. You can use the Simulink® editor or, alternatively, MATLAB® commands. Save the model.

    Model Element

    Simulink Editor

    VehFdbk inport

    Lane inport

    ISO 15037-1:2006 block

    3D Engine block

    Alternatively, use these commands to enable the signal logging and save the model.

    % Open the model
    mdl = 'DLCReferenceApplication';
    open_system(mdl);
    
    % Enable signal logging for VehFdbk
    ph=get_param('DLCReferenceApplication/Visualization/VehFdbk','PortHandles');
    set_param(ph.Outport,'DataLogging','on');
    
    % Enable signal logging for Lane
    ph=get_param('DLCReferenceApplication/Visualization/Lane','PortHandles');
    set_param(ph.Outport,'DataLogging','on');
    
    % Enable signal logging for ISO block
    set_param([mdl '/Visualization/ISO 15037-1:2006'],'Measurement','Enable');
    
    % Disable 3D environment
    set_param([mdl '/Visualization/3D Engine'],'engine3D','Disabled');
    
    save_system(mdl)

  3. Set up a vector with the friction scaling coefficients, lambdamu, that you want to investigate. For example, to examine friction scaling coefficients equal to 0.9, 0.95, and 1.0, at the command line enter:

    mdl = 'DLCReferenceApplication';
    open_system(mdl);
    % Define the set of parameters to sweep
    lambdamu = [0.9, 0.95, 1.0];
    numExperiments = length(lambdamu);

  4. Create an array of simulation inputs that sets lambdamu equal to the Friction constant block parameter.

    % Create an array of Simulink.SimulationInputs
    for idx = numExperiments:-1:1
        in(idx) = Simulink.SimulationInput(mdl);
        in(idx) = in(idx).setBlockParameter([mdl '/Environment/Friction'],'Value',['ones(4,1).*',num2str(lambdamu(idx))]);
    end

  5. Set the simulation stop time at 30 s. Save the model and run the simulations. If available, use parallel computing.

    set_param(mdl,'StopTime','30')
    save_system(mdl)
    tic; 
    simout = parsim(in,'ShowSimulationManager','on');
    toc;

  6. Import the simulation results to the Simulation Data Inspector.

    1. On the Simulink Editor toolbar, click the Data Inspector button .

    2. In the Simulation Data Inspector, select Import.

    3. In the Import dialog box, clear logsout. Select simout(1), simout(2), and simout(3). Select Import.

    4. Select each of the runs. For each run, right-click to rename the run to the friction scaling coefficient that corresponds to the simulation.

  7. Explore the results in the Simulation Data Inspector.

    • To assess the success of the maneuver test when lambdamu is equal to .9, .95, and 1.0, plot the upper lane boundary, <UB>, lower lane boundary, <LB>, and lateral vehicle distance, Y.

      The results are similar to these plots, which show the results for the runs. The results indicate that the vehicle lateral position does come close to the lane boundaries.

    • To assess the yaw stability for the road surfaces, plot the lateral acceleration, ay, lateral vehicle distance, Y, yaw angle, psi, and yaw rate, r.

      The results are similar to these plots. The results indicate that the vehicle has a yaw rate of about .72 rad/s when the friction scaling coefficient is equal to 1.

  8. To explore the results further, use these commands to extract the lateral acceleration, steering angle, and vehicle trajectory from the simout object.

    • Extract the lateral acceleration and steering angle. Plot the data.

      % Plot results from simout object: lateral acceleration vs steering angle
      figure
      for idx = 1:numExperiments
          % Extract Data
          log = simout(idx).get('logsout');
          sa=log.get('Steering-wheel angle').Values;
          ay=log.get('Lateral acceleration').Values;
          
          legend_labels{idx} = ['lambdamu = ', num2str(lambdamu(idx))];
          
          % Plot steering angle vs. lateral acceleration
          plot(sa.Data,ay.Data)
          hold on
      end
      % Add labels to the plots
      legend(legend_labels, 'Location', 'best');
      title('Lateral Acceleration')
      xlabel('Steering Angle [deg]')
      ylabel('Acceleration [m/s^2]')
      grid on

      The results are similar to this plot. They indicate that the greatest lateral acceleration occurs when the friction scaling coefficient is 1.

    • Extract the vehicle path. Plot the data.

      figure
      for idx = 1:numExperiments
          % Extract Data
          log = simout(idx).get('logsout');
          VehFdbk = log.get('VehFdbk');
          x = VehFdbk.Values.Body.X;
          y = VehFdbk.Values.Body.Y;
          legend_labels{idx} = ['lambdamu = ', num2str(lambdamu(idx))];
         
          % Plot vehicle location
          plot(y.Data,x.Data)
          hold on 
      end
      % Add labels to the plots
      legend(legend_labels, 'Location', 'best');
      title('Vehicle Path')
      xlabel('Y Position [m]')
      ylabel('X Position [m]')
      grid on

      The results are similar to this plot. They indicate that the greatest lateral vehicle position occurs when the friction scaling coefficient is 0.9.

See Also

|

References

[1] ISO 3888-2: 2011. Passenger cars — Test track for a severe lane-change manoeuvre.

Related Examples

More About