*** DESCRIPTION OF DATA *** This data supports the following paper: Nash, C. J., & Cole, D. J. (2017). Modelling the in fluence of sensory dynamics on linear and nonlinear driver steering control. Vehicle System Dynamics. https://doi.org/10.1080/00423114.2017.1326615 The data is hosted by the Cambridge University data repository, and is available at https://doi.org/10.17863/CAM.9161 Data is saved as .m and .mat files, opened using MATLAB. Some functions are also compiled as mex files (.mexw64) from C source code (.c). The data was created using MATLAB version 2014b. Copyright (C) 2017 Christopher Nash (chrisjamesnash@gmail.com) This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. * MAIN FUNCTIONS * - TestLinearModel.m: Runs a single demonstration simulation of the linear driver model. - TestNonlinearModel.m: Runs a single demonstration simulation of the nonlinear driver model. - ModelSims.m: Sets up and runs simulations of nonlinear driver model for one driving condition, with several controllers and state estimators. - RunAllSims.m: Runs all the simulations described in the paper, looping over the various driving conditions. - LDMCalc.m: Sets up inputs for linear driver model, sets up linear driver model and calculates linear steering angle estimate. - LDMSetup.m: Sets up the linear driver model, including plant, LQR controller and Kalman filter. - NLDMCalc.m: Initialises and runs the nonlinear driver model calculation. LDMCalc.m must be run first. * CONTROLLERS (/Controllers) * - CalcMPCRefs.m: Calculates MPC reference signal and reduced plant states from full plant state vector. - L0.m: LQR controller, linearised about zero slip angle. - LP0.m: MPC controller, linearised about the initial state of the prediction horizon. - LPF.m: MPC controller, linearised about the full predicted trajectory. - LPFstar.m: MPC controller, linearised about the full predicted trajectory, with added constraints. - FNO.m: Nonlinear MPC controller, carrying out a full nonlinear optimisation up to the prediction horizon. * STATE ESTIMATORS (/StateEstimators) * - LKF.m: Linear Kalman filter, linearised about zero slip angle. - EKF1.m: First-order extended Kalman filter, linearises the plant states at each time step. - EKF2.m: Second-order extended Kalman filter, quadratic approximation to the plant states at each time step. - UKF.m: Unscented Kalman filter, approximates nonlinear state covariance functions with unscented transform. EKF/UKF TOOLBOX FUNCTIONS (/StateEstimators/EKFUKF) This folder contains functions from the EKF/UKF toolbox (http://becs.aalto.fi/en/research/bayes/ekfukf/), distributed under the GNU General Public Licence. Functions with the suffix _cjn have been modified for the nonlinear driver model. These modifications are: - ekf_predict2_cjn.m: Modified to evaluate second order equations for nonlinear states only, to speed up computation. - ut_transform_cjn.m: Modified to evaluate transformation function for all sigma points in one calculation, to speed up computation. - ukf_predict1_cjn.m: Modified to call ut_transform_cjn.m. - ukf_update1_cjn.m: Modified to call ut_transform_cjn.m. * PLANT FUNCTIONS (/PlantFuncs) * - LDMPlant.m: Sets up the plant state-space matrices for the linear driver model. - LDMPlantR.m: Sets up the reduced plant state-space matrices for use in the MPC controllers. - NLDMPlant_A.m: Calculates the state function for the nonlinear plant. - NLDMPlant_dA_dx.m: Calculates the Jacobian of the state function for the nonlinear plant. - NLDMPlant_d2A_dx2.m: Calculates the Hessian of the state function for the nonlinear plant, for the nonlinear states only (all other values are zero). - MF_f.m: Evaluates the Magic formula to calculate lateral tyre force. - MF_df_dalpha.m: Calculates the derivative of the Magic formula. - NLV_A.c: Calculates the state function for the nonlinear vehicle. - NLV_dA_dxdelta.c: Calculates the Jacobian of the state function for the nonlinear vehicle. - NLV_d2A_dxdelta2.c: Calculates the Hessian of the state function for the nonlinear vehicle. * PLOTS (/Plots) * - PlotControllerComparison.m: Plots comparison of the total cost using each of the controllers under various conditions. - PlotSEComparison.m: Plots comparison of the total cost using each of the state estimators under various conditions. - PlotOptimalPerformance.m: Plots total cost for the optimal combination of controller and state estimator. - PlotSimulationTime.m: Plots the mean simulation time for each combination of controller and state estimator. * SIMULATION RESULTS (/SimResults) * This folder contains the results of the simulations using the nonlinear driver model. Each simulation is saved in a separate .mat file, named as: ResultsR[Radius][Tyre][Vehicle]Dists[DistsOn]Noise[NoiseOn]Ctrl[nController]SE[nStateEstimator].mat where: Radius = Minimum corner radius in m. Tyre = Linear (L), nonlinear increasing (NI) or nonlinear decreasing (ND). Vehicle = Understeering (US) or oversteering (OS). DistsOn = No added disturbances (0) or added disturbances. NoiseOn = No added driver noise (0) or added driver noise. nController = Controller number: 0 = L0, 1 = LP0, 2 = LPF, 3 = LPF*, 4 = FNO. nStateEstimator = State estimator number: 0 = LKF, 1 = EKF1, 2 = EKF2, 3 = UKF, 4 = FSF. Each data file contains the following: - alpha_f: Front tyre slip angle (rad) - alpha_r: Rear tyre slip angle (rad) - delta_hat: Control action (rad*) - delta_NLDM: Steering angle (rad) - e_NLDM: Path-following error (m) - SimulationTime: Total computation time for simulation (s) - t: Time vector (s) - TotalCost: Total value of cost function J - w_kappa: Target curvature white noise input - w_omega: omega disturbance white noise input - w_v: v disturbance white noise input - x_NLDM: Vehicle x position (m) - y_NLDM: Vehicle y position (m) - x_t: Target x position (m) - y_t: Target y position (m)