资源简介
通过汽车双移线实验进行车辆横纵向稳定性控制,代码可用
代码片段和文件信息
% clear all;clc;
%整车参数
T = 0.99; %预瞄时间s0.85 0.78 0.76 0.8088 0.95
V = 120; v = V/3.6; vx = V/3.6; %车速m/s
T2 = 0.02;%5/v; 0.085 0.03(120 0.8)
m = 1715;%整车质量
Iz = 2697;%转动惯量
L = 2.54;%轴距
lf = 1.07; lr = 1.47;%后来到质心的距离
cf = 2*89733; cr = 2*114100;%后轮侧偏刚度
G = 20;%方向盘传动比
k0 = (lf^2*cf+lr^2*cr)/(v*Iz)+(cf+cr)/(m*v); k1 = (lr*cr-lf*cf)/Iz+cf*cr*L^2/(Iz*m*v^2);
l0 = lf*cf/Iz; l1 = L*cf*cr/(m*v*Iz); h0 = cf/(m*v); h1 = cf*(lr*L*cr-lf*m*v^2)/(Iz*m*v^2);
Th = 0.1;%延迟时间s
Td = 0.2;%纯延时0.16
nrsw = 20;%传动比
wc = 1;%人的频率
Gay = vx*l1/k1;%y2/Q稳态增益,即侧向加速度与前轮转角
T1 = k0/k1;
Ty1 = (h1+l0)/l1;%Ty1 = lr/vx;
Tc = Td+Th+T1-Ty1;
%Tc = 0.4068;%熟练驾驶员
P1 = wc*(k0/l1+k1*(Th/l1-l0/l1^2));I1 = wc*(k1/l1);D1 = wc*((1/l1+k1*(l0^2/l1^3-l0*Th/l1^2)+k0*(Th/l1-l0/l1^2)));
g0 = l0+h0; g1 = l1+h1;
P2 = wc*(k1/l1); D2 = wc*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2);D21 = -wc*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k1))/l1^2);
% P2 = wc*(k1/l1); D2 = wc*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2+k1*Td/l1);D21 = -wc*(((h1+l0)/l1^2-Td/l1)*(k0+Th*k1)+k1*((h0/l1-(h1+l0)^2/l1^2)/l1-Td^2/(2*l1)+(Td*(h1+l0))/l1^2)-(Th*k0+1)/l1);
% P2 = wc*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2); I2 = wc*(k1/l1); D2 = -wc*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k1))/l1^2);
P3 = wc/vx*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2); I3 = wc/vx*(k1/l1); D3 = -wc/vx*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k1))/l1^2);
%D3 = wc/vx*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2); P3 = wc/vx*(k1/l1); I3 =0;
P4 = wc/vx*(k1/l1); D4 = wc/vx*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2);
A = [ -(cf+cr)/(vx*m) ((-lf*cf+lr*cr)/(vx*m)-vx) 0 0; (-lf*cf+lr*cr)/(vx*Iz) -(lf^2*cf+lr^2*cr)/(vx*Iz) 0 0; 1 0 0 vx; 0 1 0 0 ];
B = [ cf/(m*nrsw); lf*cf/(Iz*nrsw); 0; 0]; C = [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1; 0 0 0 0]; D = [0;0;0;0;1]; E = [ 0; 0; 0; 0 ];
kr = 3/1.2;ku = 0.02*G;ky = 3/1.5;%kr = 3/0.06;ku = 0.06/3 0.0233;ky =3/5;
KG=0;%1.2;
KGe = 1;%1.8(30);%0.8;1.2
% clear all;clc;
% syms s Th k0 k1 l0 l1 h0 h1 Td;
% y1=(Th*s^3+(Th*k0+1)*s^2+(Th*k1+k0)*s+k1)/(l0*s+l1);
% y2=(Th*s^3+(Th*k0+1)*s^2+(Th*k1+k0)*s+k1)/(h0*s^2+(h1+l0)*s+l1);
% taylor(y130)
% taylor1 = s^2*((Th*k0+1)/l1+(k1*l0^2)/l1^3-(l0*(k0+Th*k1))/l1^2)+ s*((k0+Th*k1)/l1-(k1*l0)/l1^2)+ k1/l1;
% taylor(y230)
% taylor2 = s*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2)+ k1/l1- s^2*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k1))/l1^2);
% P+I/s+D*s = wc/vx*taylor2/s;
% P = wc/vx*((k0+Th*k1)/l1-(k1*(h1+l0))/l1^2);
% I = wc/vx*(k1/l1);
% D = -wc/vx*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k1))/l1^2);
% r=(Th*s^3+(Th*k0+1)*s^2+(Th*k1+k0)*s+k1)*(1+Td*s/2)/((h0*s^2+(h1+l0)*s+l1)*(1-Td*s/2));方向角逆模
% taylor(r30) = k1/l1- s^2*(((h1+l0)/l1^2-Td/l1)*(k0+Th*k1)+k1*((h0/l1-(h1+l0)^2/l1^2)/l1-Td^2/(2*l1)+(Td*(h1+l0))/l1^2)-(Th*k0+1)/l1)- s*(k1*((h1+l0)/l1^2-Td/l1)-(k0+Th*k1)/l1);
% 侧向速度和前轮转角的传递函数
% P = wc/vx*(k1/l1);
% D2 = -wc/vx*((k1*(h0/l1-(h1+l0)^2/l1^2))/l1-(Th*k0+1)/l1+((h1+l0)*(k0+Th*k
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1146 2013-06-27 17:08 1\Double_lane.m
文件 3478 2013-08-27 11:52 1\cexiang_model_parameters.asv
文件 3478 2013-08-27 11:54 1\cexiang_model_parameters.m
文件 1591 2013-07-10 22:41 1\ouhe.fis
文件 897 2013-08-24 11:22 1\ouhe.mat
文件 241664 2013-08-24 22:31 1\ouhe_2_sfun.mexw32
目录 0 2015-04-21 14:58 1\
- 上一篇:基于模糊控制的人工势场算法
- 下一篇:人工智能与专家系统 外文文献译文和原文
评论
共有 条评论