This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 25th, 2013  |  syntax: MatLab  |  size: 1.44 KB  |  views: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function dv = dof3(t,v)
  2. dv = zeros(4,1);
  3. m   =3.085; % mass, tonnes
  4. m_f =0.060; % mass of front wheel, tonnes
  5. m_r =0.060; % mass of rear wheel, tonnes
  6. I_xxb=1.190; % sprung mass roll inertia, tm^2
  7. I_zzb=7.050; % sprung mass yaw inertia, tm^2
  8. l=3.650; % a+b wheelbase, m
  9. b=1.520; % b CoG distance from rear axle, m
  10. a=l-b; % a
  11. Cf=140; % Front cornering stiffness, kN/rad
  12. Cr=190; % Rear cornering stiffness, kN/rad
  13. U=16.66; % Forward speed,m/s
  14. I_zzr=0.0012; % yaw inertia of rear wheel, tm^2
  15. I_zzf=0.0012; % yaw inertia of front wheel, tm^2
  16. mb = m-2*0.160 ; % sprung body mass,
  17. h_cf= 0.760  ; % Height of roll centre, m
  18. h_cr= 0.760  ; % Height of roll centre, m
  19. h_a=  0.260   ; % height of reference roll axis, m
  20. K_phi=10000  ; % Torsional stiffness coefficient, kNm/rad
  21. C_phi=0.250  ; % Torsional damping coefficient,
  22. h=0.5 ;
  23. D_phi=0.5*C_phi*0.1*0.1 ;
  24. I_xx = I_xxb + mb*(h)^2;
  25. I_zz = I_zzb + I_zzf + I_zzr + m_f*a^2 + m_r*b^2;
  26. df = h_cf-h_a;
  27. dr = h_cr-h_a;
  28. g=9.8;
  29. ass=0.3*9.81; % Steady state acceleration, m/s^2
  30. delf=(l^2*Cf*Cr+m*U^2*(b*Cr-a*Cf))*ass/(l*Cf*Cr*U^2); % Steer angle front, rad
  31.  
  32. Mass = [m a*m_f-b*m_r mb*h 0; a*m_f-b*m_r I_zz 0 0;mb*h  0 I_xx 0; 0 0 0 1];
  33. M1   =-[(Cf+Cr)/U (a*Cf-b*Cr)/U+m*U 0 0;(a*Cf-b*Cr)/U ((a^2)*Cf+(b^2)*Cr)/U+(a*m_f-b*m_r)*U 0 0;(df*Cf+dr*Cr)/U (a*df*Cf-b*dr*Cr)/U+mb*h*U D_phi K_phi-mb*g*h;0 0 -1 0];
  34. M2   = [Cf*delf;a*Cf*delf;df*Cf*delf;0];
  35.  
  36. dv = inv(Mass)*M1*v+inv(Mass)*M2 ;  % equation
  37.  
  38. end
clone this paste RAW Paste Data