Commit fc628bd0 authored by Markus Koschi's avatar Markus Koschi

added Release 2017a

parent 26c5d60a
function x0 = init_KS(initState, p)
% init_KS - generates the initial state vector for the kinematic
% single-track model
%
% Syntax:
% x0 = init_KS(initState, p)
%
% Inputs:
% initState - core initial states
% p - parameter vector
%
% Outputs:
% x0 - initial state vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 11-January-2017
% Last update: ---
% Last revision:---
%------------- BEGIN CODE --------------
%states
%x1 = s_x x-position in a global coordinate system
%x2 = s_y y-position in a global coordinate system
%x3 = δ steering angle of front wheels
%x4 = u velocity in x-direction
%x5 = Ψ yaw angle
%u1 = v_delta steering angle velocity of front wheels
%u2 = ax longitudinal acceleration
%obtain initial states from vector
sx0 = initState(1);
sy0 = initState(2);
vel0 = initState(3);
Psi0 = initState(4);
dotPsi0 = initState(5);
beta0 = initState(6);
%create equivalent bicycle parameters
g = 9.81; %[m/s^2]
mu = p.tire.p_dy1;
C_Sf = -p.tire.p_ky1/p.tire.p_dy1;
C_Sr = -p.tire.p_ky1/p.tire.p_dy1;
lf = p.a;
lr = p.b;
%initial steering angle from steady state of slip angle
delta0 = vel0*(lf + lr)/(C_Sf*g*lr*mu)*dotPsi0 ...
+ 1/(C_Sf*lr)*((C_Sr*lf + C_Sf*lr)*beta0 - (C_Sr - C_Sf)*lr*lf*dotPsi0/vel0);
%sprung mass states
x0(1) = sx0; % s_x x-position in a global coordinate system
x0(2) = sy0; % s_y y-position in a global coordinate system
x0(3) = delta0; % steering angle of front wheels
x0(4) = vel0; % velocity
x0(5) = Psi0; % Ψ yaw angle
%------------- END OF CODE --------------
\ No newline at end of file
function x0 = init_MB(initState, p)
% init_MB - generates the initial state vector for the multi-body model
%
% Syntax:
% x0 = init_MB(initState, p)
%
% Inputs:
% initState - core initial states
% p - parameter vector
%
% Outputs:
% x0 - initial state vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 11-January-2017
% Last update: ---
% Last revision:---
%------------- BEGIN CODE --------------
%states
%x1 = s_x x-position in a global coordinate system
%x2 = s_y y-position in a global coordinate system
%x3 = δ steering angle of front wheels
%x4 = u velocity in x-direction
%x5 = Ψ yaw angle
%x6 = Ψ yaw rate
%x7 = ΦS roll angle
%x8 = ΦS roll rate
%x9 = ΘS pitch angle
%x10 = ΘS pitch rate
%x11 = v velocity in y-direction
%x12 = zS z-position
%x13 = w velocity in z-direction
%x14 = ΦUF roll angle front
%x15 = ΦUF roll rate front
%x16 = vUF velocity in y-direction front
%x17 = zUF z-position front
%x18 = wUF velocity in z-direction front
%x19 = ΦUR roll angle rear
%x20 = ΦUR roll rate rear
%x21 = vUR velocity in y-direction rear
%x22 = zUR z-position rear
%x23 = wUR velocity in z-direction rear
%x24 = ωLF left front wheel angular speed
%x25 = ωRF right front wheel angular speed
%x26 = ωLR left rear wheel angular speed
%x27 = ωRR right rear wheel angular speed
%x28 = delta_y_f
%x29 = delta_y_r
%u1 = v_delta steering angle velocity of front wheels
%u2 = acceleration
%obtain initial states from vector
sx0 = initState(1);
sy0 = initState(2);
vel0 = initState(3);
Psi0 = initState(4);
dotPsi0 = initState(5);
beta0 = initState(6);
%create equivalent bicycle parameters
g = 9.81; %[m/s^2]
mu = p.tire.p_dy1;
C_Sf = -p.tire.p_ky1/p.tire.p_dy1;
C_Sr = -p.tire.p_ky1/p.tire.p_dy1;
lf = p.a;
lr = p.b;
%initial steering angle from steady state of slip angle
delta0 = vel0*(lf + lr)/(C_Sf*g*lr*mu)*dotPsi0 ...
+ 1/(C_Sf*lr)*((C_Sr*lf + C_Sf*lr)*beta0 - (C_Sr - C_Sf)*lr*lf*dotPsi0/vel0);
%auxiliary initial states
F0_z_f = p.m_s*g*p.b/((p.a + p.b)) + p.m_uf*g;
F0_z_r = p.m_s*g*p.a/((p.a + p.b)) + p.m_ur*g;
%sprung mass states
x0(1) = sx0; % s_x x-position in a global coordinate system
x0(2) = sy0; % s_y y-position in a global coordinate system
x0(3) = delta0; % steering angle of front wheels
x0(4) = cos(beta0)*vel0; % u velocity in x-direction
x0(5) = Psi0; % Ψ yaw angle
x0(6) = dotPsi0; % Ψ yaw rate
x0(7) = 0; % ΦS roll angle
x0(8) = 0; % ΦS roll rate
x0(9) = 0; % ΘS pitch angle
x0(10) = 0; % ΘS pitch rate
x0(11) = sin(beta0)*vel0; % v velocity in y-direction
x0(12) = 0; % zS z-position (zero height corresponds to steady state solution)
x0(13) = 0; % w velocity in z-direction
%unsprung mass states (front)
x0(14) = 0; % ΦUF roll angle front
x0(15) = 0; % ΦUF roll rate front
x0(16) = sin(beta0)*vel0 + p.a*dotPsi0; % vUF velocity in y-direction front
x0(17) = (F0_z_f)/(2*p.K_zt); % zUF z-position front
x0(18) = 0; % wUF velocity in z-direction front
%unsprung mass states (rear)
x0(19) = 0; % ΦUR roll angle rear
x0(20) = 0; % ΦUR roll rate rear
x0(21) = sin(beta0)*vel0 - p.b*dotPsi0; % vUR velocity in y-direction rear
x0(22) = (F0_z_r)/(2*p.K_zt); % zUR z-position rear
x0(23) = 0; % wUR velocity in z-direction rear
%wheel states
x0(24) = x0(4)/(p.R_w); % ωLF left front wheel angular speed
x0(25) = x0(4)/(p.R_w); % ωRF right front wheel angular speed
x0(26) = x0(4)/(p.R_w); % ωLR left rear wheel angular speed
x0(27) = x0(4)/(p.R_w); % ωRR right rear wheel angular speed
x0(28) = 0; % delta_y_f
x0(29) = 0; % delta_y_r
%------------- END OF CODE --------------
\ No newline at end of file
function x0 = init_ST(initState, p)
% init_MB - generates the initial state vector for the single-track model
%
% Syntax:
% x0 = init_ST(initState, p)
%
% Inputs:
% initState - core initial states
% p - parameter vector
%
% Outputs:
% x0 - initial state vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 11-January-2017
% Last update: ---
% Last revision:---
%------------- BEGIN CODE --------------
%states
%x1 = s_x x-position in a global coordinate system
%x2 = s_y y-position in a global coordinate system
%x3 = δ steering angle of front wheels
%x4 = u velocity in x-direction
%x5 = Ψ yaw angle
%x6 = Ψ yaw rate
%x7 = β slip angle at vehicle center
%u1 = v_delta steering angle velocity of front wheels
%u2 = ax longitudinal acceleration
%obtain initial states from vector
sx0 = initState(1);
sy0 = initState(2);
vel0 = initState(3);
Psi0 = initState(4);
dotPsi0 = initState(5);
beta0 = initState(6);
%create equivalent bicycle parameters
g = 9.81; %[m/s^2]
mu = p.tire.p_dy1;
C_Sf = -p.tire.p_ky1/p.tire.p_dy1;
C_Sr = -p.tire.p_ky1/p.tire.p_dy1;
lf = p.a;
lr = p.b;
%initial steering angle from steady state of slip angle
delta0 = vel0*(lf + lr)/(C_Sf*g*lr*mu)*dotPsi0 ...
+ 1/(C_Sf*lr)*((C_Sr*lf + C_Sf*lr)*beta0 - (C_Sr - C_Sf)*lr*lf*dotPsi0/vel0);
%sprung mass states
x0(1) = sx0; % s_x x-position in a global coordinate system
x0(2) = sy0; % s_y y-position in a global coordinate system
x0(3) = delta0; % steering angle of front wheels
x0(4) = vel0; % velocity
x0(5) = Psi0; % Ψ yaw angle
x0(6) = dotPsi0; % Ψ yaw rate
x0(7) = beta0; % β slip angle at vehicle center
%------------- END OF CODE --------------
\ No newline at end of file
function p = parameters_vehicle1()
% parameters_vehicle1 - parameter set of the multi-body vehicle dynamics
% based on the DOT (department of transportation) vehicle dynamics;
% values are taken from a Ford Escort
%
% Syntax:
% p = parameters_vehicle1()
%
% Inputs:
% ---
%
% Outputs:
% p - parameter vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 15-January-2017
% Last update: 05-July-2017
% Last revision:---
%------------- BEGIN CODE --------------
%vehicle body dimensions
p.l = 4.298; %vehicle length [m]
p.w = 1.674; %vehicle width [m]
%masses
p.m = lb_sec2_ft_IN_kg(84); %vehicle mass [kg]; MASS
p.m_s = lb_sec2_ft_IN_kg(75); %sprung mass [kg]; SMASS
p.m_uf = lb_sec2_ft_IN_kg(4.5); %unsprung mass front [kg]; UMASSF
p.m_ur = lb_sec2_ft_IN_kg(4.5); %unsprung mass rear [kg]; UMASSR
%axes distances
p.a = ft_IN_m(2.9); %distance from spring mass center of gravity to front axle [m]; LENA
p.b = ft_IN_m(4.95); %distance from spring mass center of gravity to rear axle [m]; LENB
%moments of inertia of sprung mass
p.I_Phi_s = lb_ft_sec2_IN_kg_m2(180); %moment of inertia for sprung mass in roll [kg m^2]; IXS
p.I_y_s = lb_ft_sec2_IN_kg_m2(990); %moment of inertia for sprung mass in pitch [kg m^2]; IYS
p.I_z = lb_ft_sec2_IN_kg_m2(1135); %moment of inertia for sprung mass in yaw [kg m^2]; IZZ
p.I_xz_s = lb_ft_sec2_IN_kg_m2(0); %moment of inertia cross product [kg m^2]; IXZ
%suspension parameters
p.K_sf = lbs_ft_IN_N_m(1500); %suspension spring rate (front) [N/m]; KSF
p.K_sdf = lb_sec_ft_IN_N_s_m(100); %suspension damping rate (front) [N s/m]; KSDF
p.K_sr = lbs_ft_IN_N_m(1500); %suspension spring rate (rear) [N/m]; KSR
p.K_sdr = lb_sec_ft_IN_N_s_m(100); %suspension damping rate (rear) [N s/m]; KSDR
%geometric parameters
p.T_f = ft_IN_m(4.56); %track width front [m]; TRWF
p.T_r = ft_IN_m(4.67); %track width rear [m]; TRWB
p.K_ras = lbs_ft_IN_N_m(12000); %lateral spring rate at compliant compliant pin joint between M_s and M_u [N/m]; KRAS
p.K_tsf = ft_lb_rad_IN_N_m_rad(-9500); %auxiliary torsion roll stiffness per axle (normally negative) (front) [N m/rad]; KTSF
p.K_tsr = ft_lb_rad_IN_N_m_rad(0); %auxiliary torsion roll stiffness per axle (normally negative) (rear) [N m/rad]; KTSR
p.K_rad = lb_sec_ft_IN_N_s_m(700); % damping rate at compliant compliant pin joint between M_s and M_u [N s/m]; KRADP
p.K_zt = lbs_ft_IN_N_m(13000); % vertical spring rate of tire [N/m]; TSPRINGR
p.h_cg = ft_IN_m(1.83); %center of gravity height of total mass [m]; HCG (mainly required for conversion to other vehicle models)
p.h_raf = ft_IN_m(0); %height of roll axis above ground (front) [m]; HRAF
p.h_rar = ft_IN_m(0); %height of roll axis above ground (rear) [m]; HRAR
p.h_s = ft_IN_m(1.95); %M_s center of gravity above ground [m]; HS
p.I_uf = lb_ft_sec2_IN_kg_m2(24); %moment of inertia for unsprung mass about x-axis (front) [kg m^2]; IXUF
p.I_ur = lb_ft_sec2_IN_kg_m2(24); %moment of inertia for unsprung mass about x-axis (rear) [kg m^2]; IXUR
p.I_y_w = 1.7; %wheel inertia, from internet forum for 235/65 R 17 [kg m^2]
p.K_lt = ft_lb_IN_m_N(0.00015); %lateral compliance rate of tire, wheel, and suspension, per tire [m/N]; KLT
p.R_w = 0.344; %effective wheel/tire radius; chosen as tire rolling radius RR; taken from ADAMS documentation [m]
%split of brake and engine torque
p.T_sb = 0.76;
p.T_se = 1;
%suspension parameters
p.D_f = rad_ft_IN_rad_m(-0.19); %[rad/m]; DF
p.D_r = rad_ft_IN_rad_m(-0.064); %[rad/m]; DR
p.E_f = 0; %[needs conversion if nonzero]; EF
p.E_r = 0; %[needs conversion if nonzero]; ER
%tire parameters from ADAMS handbook
%longitudinal coefficients
p.tire.p_cx1 = 1.6411; %Shape factor Cfx for longitudinal force
p.tire.p_dx1 = 1.1739; %Longitudinal friction Mux at Fznom
p.tire.p_dx3 = 0; %Variation of friction Mux with camber
p.tire.p_ex1 = 0.46403; %Longitudinal curvature Efx at Fznom
p.tire.p_kx1 = 22.303; %Longitudinal slip stiffness Kfx/Fz at Fznom
p.tire.p_hx1 = 0.0012297; %Horizontal shift Shx at Fznom
p.tire.p_vx1 = -8.8098e-006; %Vertical shift Svx/Fz at Fznom
p.tire.r_bx1 = 13.276; %Slope factor for combined slip Fx reduction
p.tire.r_bx2 = -13.778; %Variation of slope Fx reduction with kappa
p.tire.r_cx1 = 1.2568; %Shape factor for combined slip Fx reduction
p.tire.r_ex1 = 0.65225; %Curvature factor of combined Fx
p.tire.r_hx1 = 0.0050722; %Shift factor for combined slip Fx reduction
%lateral coefficients
p.tire.p_cy1 = 1.3507; %Shape factor Cfy for lateral forces
p.tire.p_dy1 = 1.0489; %Lateral friction Muy
p.tire.p_dy3 = -2.8821; %Variation of friction Muy with squared camber
p.tire.p_ey1 = -0.0074722; %Lateral curvature Efy at Fznom
p.tire.p_ky1 = -21.92; %Maximum value of stiffness Kfy/Fznom
p.tire.p_hy1 = 0.0026747; %Horizontal shift Shy at Fznom
p.tire.p_hy3 = 0.031415; %Variation of shift Shy with camber
p.tire.p_vy1 = 0.037318; %Vertical shift in Svy/Fz at Fznom
p.tire.p_vy3 = -0.32931; %Variation of shift Svy/Fz with camber
p.tire.r_by1 = 7.1433; %Slope factor for combined Fy reduction
p.tire.r_by2 = 9.1916; %Variation of slope Fy reduction with alpha
p.tire.r_by3 = -0.027856; %Shift term for alpha in slope Fy reduction
p.tire.r_cy1 = 1.0719; %Shape factor for combined Fy reduction
p.tire.r_ey1 = -0.27572; %Curvature factor of combined Fy
p.tire.r_hy1 = 5.7448e-006; %Shift factor for combined Fy reduction
p.tire.r_vy1 = -0.027825; %Kappa induced side force Svyk/Muy*Fz at Fznom
p.tire.r_vy3 = -0.27568; %Variation of Svyk/Muy*Fz with camber
p.tire.r_vy4 = 12.12; %Variation of Svyk/Muy*Fz with alpha
p.tire.r_vy5 = 1.9; %Variation of Svyk/Muy*Fz with kappa
p.tire.r_vy6 = -10.704; %Variation of Svyk/Muy*Fz with atan(kappa)
%------------- END OF CODE --------------
function p = parameters_vehicle2()
% parameters_vehicle2 - parameter set of the multi-body vehicle dynamics
% based on the DOT (department of transportation) vehicle dynamics;
% values are taken from a BMW 320i
%
% Syntax:
% p = parameters_vehicle2()
%
% Inputs:
% ---
%
% Outputs:
% p - parameter vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 15-January-2017
% Last update: 05-July-2017
% Last revision:---
%------------- BEGIN CODE --------------
%vehicle body dimensions
p.l = 4.508; %vehicle length [m] (with US bumpers)
p.w = 1.610; %vehicle width [m]
%masses
p.m = lb_sec2_ft_IN_kg(74.91452); %vehicle mass [kg]; MASS
p.m_s = lb_sec2_ft_IN_kg(66.17221); %sprung mass [kg]; SMASS
p.m_uf = lb_sec2_ft_IN_kg(4.371153); %unsprung mass front [kg]; UMASSF
p.m_ur = lb_sec2_ft_IN_kg(4.371153); %unsprung mass rear [kg]; UMASSR
%axes distances
p.a = ft_IN_m(3.793293); %distance from spring mass center of gravity to front axle [m]; LENA
p.b = ft_IN_m(4.667707); %distance from spring mass center of gravity to rear axle [m]; LENB
%moments of inertia of sprung mass
p.I_Phi_s = lb_ft_sec2_IN_kg_m2(152.871); %moment of inertia for sprung mass in roll [kg m^2]; IXS
p.I_y_s = lb_ft_sec2_IN_kg_m2(1154.888); %moment of inertia for sprung mass in pitch [kg m^2]; IYS
p.I_z = lb_ft_sec2_IN_kg_m2(1321.416); %moment of inertia for sprung mass in yaw [kg m^2]; IZZ
p.I_xz_s = lb_ft_sec2_IN_kg_m2(0); %moment of inertia cross product [kg m^2]; IXZ
%suspension parameters
p.K_sf = lbs_ft_IN_N_m(1675); %suspension spring rate (front) [N/m]; KSF
p.K_sdf = lb_sec_ft_IN_N_s_m(122.3966); %suspension damping rate (front) [N s/m]; KSDF
p.K_sr = lbs_ft_IN_N_m(1345); %suspension spring rate (rear) [N/m]; KSR
p.K_sdr = lb_sec_ft_IN_N_s_m(112.9981); %suspension damping rate (rear) [N s/m]; KSDR
%geometric parameters
p.T_f = ft_IN_m(4.55); %track width front [m]; TRWF
p.T_r = ft_IN_m(4.475); %track width rear [m]; TRWB
p.K_ras = lbs_ft_IN_N_m(12000); %lateral spring rate at compliant compliant pin joint between M_s and M_u [N/m]; KRAS
p.K_tsf = ft_lb_rad_IN_N_m_rad(-5100.155); %auxiliary torsion roll stiffness per axle (normally negative) (front) [N m/rad]; KTSF
p.K_tsr = ft_lb_rad_IN_N_m_rad(-1949.82); %auxiliary torsion roll stiffness per axle (normally negative) (rear) [N m/rad]; KTSR
p.K_rad = lb_sec_ft_IN_N_s_m(700); % damping rate at compliant compliant pin joint between M_s and M_u [N s/m]; KRADP
p.K_zt = lbs_ft_IN_N_m(10842.89); % vertical spring rate of tire [N/m]; TSPRINGR
p.h_cg = ft_IN_m(1.886053); %center of gravity height of total mass [m]; HCG (mainly required for conversion to other vehicle models)
p.h_raf = ft_IN_m(0); %height of roll axis above ground (front) [m]; HRAF
p.h_rar = ft_IN_m(0); %height of roll axis above ground (rear) [m]; HRAR
p.h_s = ft_IN_m(2.01355); %M_s center of gravity above ground [m]; HS
p.I_uf = lb_ft_sec2_IN_kg_m2(22.62345); %moment of inertia for unsprung mass about x-axis (front) [kg m^2]; IXUF
p.I_ur = lb_ft_sec2_IN_kg_m2(21.88377); %moment of inertia for unsprung mass about x-axis (rear) [kg m^2]; IXUR
p.I_y_w = 1.7; %wheel inertia, from internet forum for 235/65 R 17 [kg m^2]
p.K_lt = ft_lb_IN_m_N(2.397884e-4); %lateral compliance rate of tire, wheel, and suspension, per tire [m/N]; KLT
p.R_w = 0.344; %effective wheel/tire radius; chosen as tire rolling radius RR; taken from ADAMS documentation [m]
%split of brake and engine torque
p.T_sb = 0.66;
p.T_se = 0;
%suspension parameters
p.D_f = rad_ft_IN_rad_m(-0.12); %[rad/m]; DF
p.D_r = rad_ft_IN_rad_m(-0.276); %[rad/m]; DR
p.E_f = 0; %[needs conversion if nonzero]; EF
p.E_r = 0; %[needs conversion if nonzero]; ER
%tire parameters from ADAMS handbook
%longitudinal coefficients
p.tire.p_cx1 = 1.6411; %Shape factor Cfx for longitudinal force
p.tire.p_dx1 = 1.1739; %Longitudinal friction Mux at Fznom
p.tire.p_dx3 = 0; %Variation of friction Mux with camber
p.tire.p_ex1 = 0.46403; %Longitudinal curvature Efx at Fznom
p.tire.p_kx1 = 22.303; %Longitudinal slip stiffness Kfx/Fz at Fznom
p.tire.p_hx1 = 0.0012297; %Horizontal shift Shx at Fznom
p.tire.p_vx1 = -8.8098e-006; %Vertical shift Svx/Fz at Fznom
p.tire.r_bx1 = 13.276; %Slope factor for combined slip Fx reduction
p.tire.r_bx2 = -13.778; %Variation of slope Fx reduction with kappa
p.tire.r_cx1 = 1.2568; %Shape factor for combined slip Fx reduction
p.tire.r_ex1 = 0.65225; %Curvature factor of combined Fx
p.tire.r_hx1 = 0.0050722; %Shift factor for combined slip Fx reduction
%lateral coefficients
p.tire.p_cy1 = 1.3507; %Shape factor Cfy for lateral forces
p.tire.p_dy1 = 1.0489; %Lateral friction Muy
p.tire.p_dy3 = -2.8821; %Variation of friction Muy with squared camber
p.tire.p_ey1 = -0.0074722; %Lateral curvature Efy at Fznom
p.tire.p_ky1 = -21.92; %Maximum value of stiffness Kfy/Fznom
p.tire.p_hy1 = 0.0026747; %Horizontal shift Shy at Fznom
p.tire.p_hy3 = 0.031415; %Variation of shift Shy with camber
p.tire.p_vy1 = 0.037318; %Vertical shift in Svy/Fz at Fznom
p.tire.p_vy3 = -0.32931; %Variation of shift Svy/Fz with camber
p.tire.r_by1 = 7.1433; %Slope factor for combined Fy reduction
p.tire.r_by2 = 9.1916; %Variation of slope Fy reduction with alpha
p.tire.r_by3 = -0.027856; %Shift term for alpha in slope Fy reduction
p.tire.r_cy1 = 1.0719; %Shape factor for combined Fy reduction
p.tire.r_ey1 = -0.27572; %Curvature factor of combined Fy
p.tire.r_hy1 = 5.7448e-006; %Shift factor for combined Fy reduction
p.tire.r_vy1 = -0.027825; %Kappa induced side force Svyk/Muy*Fz at Fznom
p.tire.r_vy3 = -0.27568; %Variation of Svyk/Muy*Fz with camber
p.tire.r_vy4 = 12.12; %Variation of Svyk/Muy*Fz with alpha
p.tire.r_vy5 = 1.9; %Variation of Svyk/Muy*Fz with kappa
p.tire.r_vy6 = -10.704; %Variation of Svyk/Muy*Fz with atan(kappa)
%------------- END OF CODE --------------
function p = parameters_vehicle3()
% parameters_vehicle3 - parameter set of the multi-body vehicle dynamics
% based on the DOT (department of transportation) vehicle dynamics;
% values are taken from a VW Vanagon
%
% Syntax:
% p = parameters_vehicle3()
%
% Inputs:
% ---
%
% Outputs:
% p - parameter vector
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 15-January-2017
% Last update: 05-July-2017
% Last revision:---
%------------- BEGIN CODE --------------
%vehicle body dimensions
p.l = 4.569; %vehicle length [m]
p.w = 1.844; %vehicle width [m]
%masses
p.m = lb_sec2_ft_IN_kg(101.3367); %vehicle mass [kg]; MASS
p.m_s = lb_sec2_ft_IN_kg(90.21635); %sprung mass [kg]; SMASS
p.m_uf = lb_sec2_ft_IN_kg(5.56015); %unsprung mass front [kg]; UMASSF
p.m_ur = lb_sec2_ft_IN_kg(5.56015); %unsprung mass rear [kg]; UMASSR
%axes distances
p.a = ft_IN_m(3.775563); %distance from spring mass center of gravity to front axle [m]; LENA
p.b = ft_IN_m(4.334437); %distance from spring mass center of gravity to rear axle [m]; LENB
%moments of inertia of sprung mass
p.I_Phi_s = lb_ft_sec2_IN_kg_m2(353.9445); %moment of inertia for sprung mass in roll [kg m^2]; IXS
p.I_y_s = lb_ft_sec2_IN_kg_m2(1625.825); %moment of inertia for sprung mass in pitch [kg m^2]; IYS
p.I_z = lb_ft_sec2_IN_kg_m2(1824.078); %moment of inertia for sprung mass in yaw [kg m^2]; IZZ
p.I_xz_s = lb_ft_sec2_IN_kg_m2(0); %moment of inertia cross product [kg m^2]; IXZ
%suspension parameters
p.K_sf = lbs_ft_IN_N_m(2300); %suspension spring rate (front) [N/m]; KSF
p.K_sdf = lb_sec_ft_IN_N_s_m(164.8335); %suspension damping rate (front) [N s/m]; KSDF
p.K_sr = lbs_ft_IN_N_m(2680); %suspension spring rate (rear) [N/m]; KSR
p.K_sdr = lb_sec_ft_IN_N_s_m(189.7866); %suspension damping rate (rear) [N s/m]; KSDR
%geometric parameters
p.T_f = ft_IN_m(5.165); %track width front [m]; TRWF
p.T_r = ft_IN_m(5.065); %track width rear [m]; TRWB
p.K_ras = lbs_ft_IN_N_m(12000); %lateral spring rate at compliant compliant pin joint between M_s and M_u [N/m]; KRAS
p.K_tsf = ft_lb_rad_IN_N_m_rad(-25038.92); %auxiliary torsion roll stiffness per axle (normally negative) (front) [N m/rad]; KTSF
p.K_tsr = ft_lb_rad_IN_N_m_rad(-5702.369); %auxiliary torsion roll stiffness per axle (normally negative) (rear) [N m/rad]; KTSR
p.K_rad = lb_sec_ft_IN_N_s_m(700); % damping rate at compliant compliant pin joint between M_s and M_u [N s/m]; KRADP
p.K_zt = lbs_ft_IN_N_m(14565.6); % vertical spring rate of tire [N/m]; TSPRINGR
p.h_cg = ft_IN_m(2.453467); %center of gravity height of total mass [m]; HCG (mainly required for conversion to other vehicle models)
p.h_raf = ft_IN_m(0); %height of roll axis above ground (front) [m]; HRAF
p.h_rar = ft_IN_m(0); %height of roll axis above ground (rear) [m]; HRAR
p.h_s = ft_IN_m(2.639405); %M_s center of gravity above ground [m]; HS
p.I_uf = lb_ft_sec2_IN_kg_m2(37.08234); %moment of inertia for unsprung mass about x-axis (front) [kg m^2]; IXUF
p.I_ur = lb_ft_sec2_IN_kg_m2(35.66033); %moment of inertia for unsprung mass about x-axis (rear) [kg m^2]; IXUR
p.I_y_w = 1.7; %wheel inertia, from internet forum for 235/65 R 17 [kg m^2]
p.K_lt = ft_lb_IN_m_N(1.7850283e-04); %lateral compliance rate of tire, wheel, and suspension, per tire [m/N]; KLT
p.R_w = 0.344; %effective wheel/tire radius; chosen as tire rolling radius RR; taken from ADAMS documentation [m]
%split of brake and engine torque
p.T_sb = 0.64;
p.T_se = 0;
%suspension parameters
p.D_f = rad_ft_IN_rad_m(-0.1); %[rad/m]; DF; modified from orig. paper due to stability issues when damping is ignored
p.D_r = rad_ft_IN_rad_m(-0.1); %[rad/m]; DR; modified from orig. paper due to stability issues when damping is ignored
p.E_f = 0; %[needs conversion if nonzero]; EF
p.E_r = 0; %[needs conversion if nonzero]; ER
%tire parameters from ADAMS handbook
%longitudinal coefficients
p.tire.p_cx1 = 1.6411; %Shape factor Cfx for longitudinal force
p.tire.p_dx1 = 1.1739; %Longitudinal friction Mux at Fznom
p.tire.p_dx3 = 0; %Variation of friction Mux with camber
p.tire.p_ex1 = 0.46403; %Longitudinal curvature Efx at Fznom
p.tire.p_kx1 = 22.303; %Longitudinal slip stiffness Kfx/Fz at Fznom
p.tire.p_hx1 = 0.0012297; %Horizontal shift Shx at Fznom
p.tire.p_vx1 = -8.8098e-006; %Vertical shift Svx/Fz at Fznom
p.tire.r_bx1 = 13.276; %Slope factor for combined slip Fx reduction
p.tire.r_bx2 = -13.778; %Variation of slope Fx reduction with kappa
p.tire.r_cx1 = 1.2568; %Shape factor for combined slip Fx reduction
p.tire.r_ex1 = 0.65225; %Curvature factor of combined Fx
p.tire.r_hx1 = 0.0050722; %Shift factor for combined slip Fx reduction
%lateral coefficients
p.tire.p_cy1 = 1.3507; %Shape factor Cfy for lateral forces
p.tire.p_dy1 = 1.0489; %Lateral friction Muy
p.tire.p_dy3 = -2.8821; %Variation of friction Muy with squared camber
p.tire.p_ey1 = -0.0074722; %Lateral curvature Efy at Fznom
p.tire.p_ky1 = -21.92; %Maximum value of stiffness Kfy/Fznom
p.tire.p_hy1 = 0.0026747; %Horizontal shift Shy at Fznom
p.tire.p_hy3 = 0.031415; %Variation of shift Shy with camber
p.tire.p_vy1 = 0.037318; %Vertical shift in Svy/Fz at Fznom
p.tire.p_vy3 = -0.32931; %Variation of shift Svy/Fz with camber
p.tire.r_by1 = 7.1433; %Slope factor for combined Fy reduction
p.tire.r_by2 = 9.1916; %Variation of slope Fy reduction with alpha
p.tire.r_by3 = -0.027856; %Shift term for alpha in slope Fy reduction
p.tire.r_cy1 = 1.0719; %Shape factor for combined Fy reduction
p.tire.r_ey1 = -0.27572; %Curvature factor of combined Fy
p.tire.r_hy1 = 5.7448e-006; %Shift factor for combined Fy reduction
p.tire.r_vy1 = -0.027825; %Kappa induced side force Svyk/Muy*Fz at Fznom
p.tire.r_vy3 = -0.27568; %Variation of Svyk/Muy*Fz with camber
p.tire.r_vy4 = 12.12; %Variation of Svyk/Muy*Fz with alpha
p.tire.r_vy5 = 1.9; %Variation of Svyk/Muy*Fz with kappa
p.tire.r_vy6 = -10.704; %Variation of Svyk/Muy*Fz with atan(kappa)
%------------- END OF CODE --------------
To execute a test function, which produces the plots of the vehicle models documentation, run 'testVehicle.m'.
Initialization of models------------------------------------------
kinematic single-track model: init_KS.m
single-track model: init_ST.m
multi-body model: init_MB.m
------------------------------------------------------------------
Parameter sets----------------------------------------------------
Ford Escort: parameters_vehicle1.m
BMW 320i: parameters_vehicle2.m
VW Vanagon: parameters_vehicle3.m
------------------------------------------------------------------
Vehicle models----------------------------------------------------
kinematic single-track model: vehicleDynamics_KS.m
single-track model: vehicleDynamics_ST.m
multi-body model: vehicleDynamics_MB.m
------------------------------------------------------------------
function testVehicle()
% testVehicle - tests vehicle dynamics
%
% Syntax:
% testVehicle()
%
% Inputs:
% ---
%
% Outputs:
% ---
%
% Example:
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: ---
% Author: Matthias Althoff
% Written: 11-January-2017
% Last update: ---
% Last revision:---
%------------- BEGIN CODE --------------
%load parameters
p = parameters_vehicle2;
g = 9.81; %[m/s^2]