Skip to content

uwsbel/LateralRollStabilityMPC

Repository files navigation

Coupled Lateral and Longitudinal MPC for Lateral Stability and Rollover Prevention

This repository contains the code used in the following manuscript currently under review:

  • Chen, S.; Chen, H.; Pletta, A.; Negrut, D. Coupled Lateral and Longitudinal Control for Trajectory Tracking, Lateral Stability, and Rollover Prevention using Minimum-Time Predictive Control in Automated Driving, ASME Journal of Dynamic Systems, Measurement, and Control, submitted October, 2020.

Directory descriptions are as follows:

  1. src

    MPC controller, vehicle models, reference trajectory, and other functions as described in the paper.

  2. plots_5.1_verification

    Code to reproduce plots verifying model accuracy against Carsim for a step input (Section 5.1, Figure 6).

  3. plots_5.2~5.4.1_tracking

    Code to reproduce plots demonstrating controller tracking ability for reference trajectory with continuously varying curvature (Sections 5.2-5.4.1, Figures 7, 8, 10, 11).

  4. plots_5.4.2_stability

    Code to reproduce plots showing resulting stability margins and bounded outputs (Section 5.4.2, Figure 12).

Highlights

  • Ready-to-use MATLAB code
  • 8-DOF MPC Controller
  • 14-DOF Plant Model
  • Reproducible Figures

Installation

  1. Clone this repository.
git clone https://github.com/uwsbel/LateralRollStabilityMPC.git
  1. Open MATLAB and navigate to the repository to run files.
  • Note that you may have to set your MATLAB working directory to the parent directory of a file you wish to run.

Quick Start

Use the following steps to reproduce the plots generated in the paper.

Model Verification

  1. In MATLAB, navigate to the plots_5.1_verification directory.
  2. Run plot_veh_verification.m. The file will automatically load required data and produce the verification plots (Figure 6).

Figure 6 (a,b,c,d)

figure 6a figure 6b figure 6c figure 6d

Controller Tracking Performance

  1. In MATLAB, navigate to the plots_5.2~5.4.1_tracking directory.
  2. Run plot_path_tracking.m. The file will automatically load required data and produce the reference trajectory and curvature (Figure 7), minimum-time speed profile (Figure 8), trajectory tracking results (Figure 10), and control inputs for steering and driving torque (Figure 11).

Figure 7 (a,b)

figure 7a figure 7b

Figure 8

figure 8

Figure 10 (a,b,c,d)

figure 10a figure 10b figure 10c figure 10d

Figure 11 (a,b)

figure 11a figure 11b

Stability and Output Results

  1. In MATLAB, navigate to the plots_5.4.2_stability directory.
  2. Run plot_stability.m. The file will automatically load required data and produce the plots demonstrating stability and bounded output (Figure 12).

Figure 12 (a,b,c,d,e)

figure 12a figure 12b figure 12c figure 12d figure 12e

Additional Use

Use the files in the src directory to experiment with the controller directly. A short description of each file is as follows:

  • controller_8dofC14DOF_PID_6c_Ny3_soft.m is the MPC controller that uses an 8-DOF model for predictions. Model parameters are configured as described in Table 1 of the paper. Run this file to use the controller. Note that it can take up to ~30min on "modern" laptops (ex. 25min on Thinkpad T460s Intel(R) Core(TM) i5-6200U)
  • plant_14DOF_vehicle_4.m is a function that calculates the 14-DOF model as referenced in Figure 2 of the paper.
  • pathpoints_arc.xlsx is a spreadsheet of path points used for generating the reference trajectory.
  • references1.m is a function that generates the reference trajectory from a given set of path points.
  • cal_ay.m is a function that is used by references1.m to calculate longitudinal velocity along the reference trajectory using an 8-DOF model as referenced in Figure 1 of the paper.
  • Plotting functions are included to display the results (plot_veh_validation.m, plot_path_tracking.m, plot_veh_validation.m).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages