clear all

3
clear all; clc; global m Izz L a b f rho Ap CLgamma Fy_disturbance Cfjail u Cf Fz tO tf input; global Bl CI Dl El B3 C3 B5 C5; % Constants g = 9.81; % m/sA2 Acceleration due to gravity rho= 1.225; % kg/mA3 Density of air % Aircraft Independent Parameters m = 748.43; %kg Gross vehicle mass Izz= 1760; % kg-mA2 Yaw inertia f=i; % Fraction of weight on front axle L = 4.7752; % m Wheelbase u = 100; % km/hr Vehicle forward speed Ap = 0.6929; %mA2 Area of vertical tail Cl_gamma = 0.1; % (0. 1) 1/deg Coefficient of lift on tail % Disturbance Inputs Fy_disturbance = 0; % N Aerodynamic side force % linear Tire Model Parameters Cf = -44 1.63; % N/deg front cornering stiffness (one tire) Cf_tail = 0; % N/deg tail wheel cornering stiffness (one tire) % Non-Linear Tire Model Parameters % Normalized Lateral Force Magic Formula Parameters Bl =0.7947; CI =0.1901 Dl =6.1197 El = 1.0637 B3 = 0.2117; C3 = -2.2918e-5; % Friction Coefficient Parameters B5 = 0.7221; C5 = -8.81055e-5; % Unit Conversions u = u* 1000/3600; % m/s Vehicle forward speed Cf = Cf* 1 80/pi*2; % N/rad Front tire cornering stiffness (two tires) Cf_tail = Cf_tail* 1 80/pi; % N/rad Tail wheel cornering stiffness (one tire)

Upload: mspavan-rao

Post on 17-Dec-2015

215 views

Category:

Documents


0 download

DESCRIPTION

st

TRANSCRIPT

clear all;clc;global m Izz L a b f rho Ap CLgamma Fy_disturbance Cfjail u Cf Fz tO tf input;global Bl CI Dl El B3 C3 B5 C5; % Constantsg = 9.81; % m/sA2 Acceleration due to gravityrho= 1.225; % kg/mA3 Density of air

% Aircraft Independent Parametersm = 748.43; %kg Gross vehicle massIzz= 1760; % kg-mA2 Yaw inertiaf=i; % Fraction of weight on front axleL = 4.7752; % m Wheelbaseu = 100; % km/hr Vehicle forward speedAp = 0.6929; %mA2 Area of vertical tailCl_gamma = 0.1; % (0. 1) 1/deg Coefficient of lift on tail

% Disturbance InputsFy_disturbance = 0; % N Aerodynamic side force

% linear Tire Model ParametersCf = -44 1.63; % N/deg front cornering stiffness (one tire)Cf_tail = 0; % N/deg tail wheel cornering stiffness (one tire)% Non-Linear Tire Model Parameters% Normalized Lateral Force Magic Formula ParametersBl =0.7947;CI =0.1901Dl =6.1197El = 1.0637B3 = 0.2117;C3 = -2.2918e-5;% Friction Coefficient ParametersB5 = 0.7221;C5 = -8.81055e-5;% Unit Conversions

u = u* 1000/3600; % m/s Vehicle forward speed

Cf = Cf* 1 80/pi*2; % N/rad Front tire cornering stiffness (two tires)Cf_tail = Cf_tail* 1 80/pi; % N/rad Tail wheel cornering stiffness (one tire)CLgamma = Cl_gamma* 1 80/pi; % 1/rad Coefficient of lift on tail

%depend parametersa=(l-f)*L; %m Distance from front tire to CGb = f*L; %m Distance from rear tire to CGV = u; %m/s Vehicle speedFz = m*g*f/2; %N Front tire normal load (one tin

[t,x] = ODE23('DOF2LDE', t0, tf, [0.1 0 0 0]', tol);v = x(:,l);r = x(:,2);y = x(:,3);theta = x(:,4)*l 80/pi;%Vehicle sideslip angle%Front tires slip angle%tail incidence angle% Vehicle, tire, & tail Anglesbeta = (v/u); % radalpha = ((v+a*r)/u); % radgamma = ((v-b*r)/u); % rad% External Forces and MomentsFy_fronttire = Cf*alpha; % N Front tires lateral forceFy_tail = ((l/2)*rho*uA2*Ap*Cl_gamma)*gamma; % N Vertical tail forceFy_tailwheel = Cf_tail*gamma;% State Derivativesvdot = (-Fy_fronttire+Fy_disturbance-Fy_tail-Fy_tailwheel)/m-u*r;rdot = (-a*Fy_fronttire-b*Fy_disturbance+b*(Fy_tail+Fy_tailwheel))/Izz;% Lateral Accelerationay = vdot + u*r;% Do Plotssubplot(2,l,l)plot(t,y)gridtitle('Linear Lateral Displacement (y)')xlabel('Time (s)')ylabel('Displacement (m)')figuresubplot(2,l,2)plot(t,theta)gridtitle('Linear Angular Displacement (Theta)')xlabel('Time (s)')ylabel('Displacement (deg)')figureplot(t,v)gridtitle('Linear Lateral Speed (v)')xlabel('Time (s)')ylabel('Speed (m/s)')figureplot(t,r*l 80/pi)gridtitle('Linear Yaw Speed (r)')xlabel(Time (s)')ylabel('Speed (deg/s)')figureplot(t,beta*l 80/pi)gridtitle('Linear Vehicle Sideslip Angle (beta)')xlabel('Time (s)')ylabel('Slip Angle (deg)')figureplot(t,alpha*l 80/pi)gridtitle('Linear Front Tire Slip Angle (alpha)')xlabel('Time (s)')ylabel('Slip Angle (deg)')figureplot(t,ay/g)gridtitle('Linear Lateral Acceleration')xlabel('Time (s)')ylabel('Acceleration (g)')