汽车转向梯形优化设计
cl(i)=acos((cos(lamta(d,fil(i)))-sin(a*pi/180)*sin(a1(i)))/(cos(a*pi/180)*cos(a1(i))))*180/pi; cr(i)=acos((cos(lamta(d,fir(i)))-sin(a*pi/180)*sin(a2(i)))/(cos(a*pi/180)*cos(a2(i))))*180/pi; betae(i)=acot(cot(cl(i)*pi/180)-(K/L));
Aa(i)=K*cos(b*pi/180)-y(1)*cos(2*(b*pi/180))*cos(y(2)+fil(i)); Ba(i)=y(1)*sin(y(2)+fil(i));
Ca(i)=K*cos(b*pi/180)*cos(y(2)+fil(i))-2*K*cos(b*pi/180)*cos(y(2))+2*y(1)*(cos(b*pi/180)^2)*(cos(y(2))^2)-y(1);
fira(i)=abs(fiir(Aa(i),Ba(i),Ca(i),y(2))); a2a(i)=alfa2(fi,d,fira(i),Mid_w);
% cl(i)=acos((cos(lamta(d,fil(i)))-sin(a*pi/180)*sin(a1(i)))/(cos(a*pi/180)*cos(a1(i))))*180/pi; cr1(i)=acos((cos(lamta(d,fira(i)))-sin(a*pi/180)*sin(a2a(i)))/(cos(a*pi/180)*cos(a2a(i))))*180/pi; end
plot(cl,betae*180/pi,'r',cl,cr,'b',cl,cr1,'--g'); % plot(cl,cr1,'--b');
axis([0,40,0,45]);
xlabel('外转向轮输入角(单位:度)'); ylabel('内转向轮输出角(单位:度)');
title('右轮初始值实际转角-理想转角-优化值实际转角随左输入角的变化曲线'); text( 2,38,'红线代表理想转角的变化曲线','FontSize',8,'backgroundcolor',[1 0.4 0.4]); text( 2,36,'蓝线代表实际转角的变化曲线','FontSize',8,'backgroundcolor',[0.4 0.4 1]); text( 2,34,'绿线代表优化后转角的变化曲线','FontSize',8,'backgroundcolor',[0.6 1 0.8]); hold on End
%子函数,定义个变量的意义 function lt=lamta(d,fil)
lt=acos((cos(d))^2+(sin(d))^2*cos(fil)); end
function a1=alfa(fi,d,fil,w)
a1=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fil-w)); end
function a2=alfa2(fi,d,fir,w)
a2=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fir+w)); end
function d=Di(fi,a,dt)
d=acos(-cos(fi)*sin(a*pi/180)-sin(fi)*cos(a*pi/180)*cos(dt)); end
function w=Ww(a,dt,d)
w=asin(cos(a*pi/180)*sin(a*pi/180)/sin(d)); end
function dt=delta(r,fi)
dt=asin(sin(r*pi/180)/sin(fi));
汽车转向梯形优化设计
end
function fi=fii(r,b)
fi=acos(cos(r*pi/180)*cos(b*pi/180)); end
function fir=fiir(A,B,C,fi0)
fir=fi0-2*atan((B+(sqrt(A^2+B^2-C^2)))/(A-C)); end 附录二
在同一文件下编辑theatar.m 进行绘图编辑 function c=theatar()
%主函数
global options L b r a K thetamax cl cr fi0 %定义全局变量
K=1638; %input('输入主销中心线间距(mm)'); %给予几个变量赋值 L=3308; %input('输入轴距(mm)');
thetamax=40; %input('输入外转向轮最大转角(度)'); x(1)=175; %input('臂长(mm)'); x(2)=74.5; %input('底角(度)'); b=8; %input('内倾角(度)'); r=2; %input('后倾角(度)'); a=1; %input('外倾角(度)');
thetamax=thetamax*pi/180; %单位转换 lb(1)=0.11*K; %设置上下限 lb(2)=1.2217; ?ot(K/(1.2*L)); ub(1)=0.13*K; ub(2)=pi/2;
fil=linspace(0,thetamax,61); lb=[lb(1),lb(2)]; ub=[ub(1),ub(2)]; x0=[x(1),x(2)];
% A=[0.251 0.372]; % b=[0.143];
[y,fval]=fmincon('fuun',x0,[],[],[],[],lb,ub,[]); Y=y;
%[y,resnorm]=lsqnonlin('fuun',x0,lb,ub,options) ?tae(i) y = fmincon(fuun,x0,[],[],[],[],lb,ub) for i=1:61 %设置60个区域 fil=linspace(0,thetamax,61);
% betae(i)=acot(cot(fil(i))-(K/L));
fi=fii(r*pi/180,b*pi/180);%以下将各公式单位转换,并代入公式 dt=delta(r*pi/180,fii(r*pi/180,b*pi/180));%=dt
d=Di(fii(r*pi/180,b*pi/180),a*pi/180,delta(r*pi/180,fii(r*pi/180,b*pi/180)));%=d
Mid_w=Ww(a*pi/180,delta(r*pi/180,fii(r*pi/180,b*pi/180)),Di(fii(r*pi/180,b*pi/180),a*pi/180,delta(r*pi/180,fii(r*pi/180,b*pi/180))));%=w a1(i)=alfa(fi,d,fil(i),Mid_w);
A(i)=K*cos(b*pi/180)-x(1)*cos(2*(b*pi/180))*cos(x(2)*pi/180+fil(i));
汽车转向梯形优化设计
B(i)=x(1)*sin(x(2)*pi/180+fil(i));
C(i)=K*cos(b*pi/180)*cos(x(2)*pi/180+fil(i))-2*K*cos(b*pi/180)*cos(x(2)*pi/180)+2*x(1)*(cos(b*pi/180)^2)*(cos(x(2)*pi/180)^2)-x(1); fir(i)=abs(fiir(A(i),B(i),C(i),x(2)*pi/180)); a2(i)=alfa2(fi,d,fir(i),Mid_w);
cl(i)=acos((cos(lamta(d,fil(i)))-sin(a*pi/180)*sin(a1(i)))/(cos(a*pi/180)*cos(a1(i))))*180/pi; cr(i)=acos((cos(lamta(d,fir(i)))-sin(a*pi/180)*sin(a2(i)))/(cos(a*pi/180)*cos(a2(i))))*180/pi; betae(i)=acot(cot(cl(i)*pi/180)-(K/L));
Aa(i)=K*cos(b*pi/180)-y(1)*cos(2*(b*pi/180))*cos(y(2)+fil(i)); Ba(i)=y(1)*sin(y(2)+fil(i));
Ca(i)=K*cos(b*pi/180)*cos(y(2)+fil(i))-2*K*cos(b*pi/180)*cos(y(2))+2*y(1)*(cos(b*pi/180)^2)*(cos(y(2))^2)-y(1);
fira(i)=abs(fiir(Aa(i),Ba(i),Ca(i),y(2))); a2a(i)=alfa2(fi,d,fira(i),Mid_w);
%cl(i)=acos((cos(lamta(d,fil(i)))-sin(a*pi/180)*sin(a1(i)))/(cos(a*pi/180)*cos(a1(i))))*180/pi; cr1(i)=acos((cos(lamta(d,fira(i)))-sin(a*pi/180)*sin(a2a(i)))/(cos(a*pi/180)*cos(a2a(i))))*180/pi; end
%绘制图像
plot(cl,betae*180/pi,'r',cl,cr,'b',cl,cr1,'--g'); % plot(cl,cr1,'--b'); %定义各轴意义
axis([0,40,0,45]);
xlabel('外转向轮输入角(单位:度)'); ylabel('内转向轮输出角(单位:度)');
title('右轮初始值实际转角-理想转角-优化值实际转角随左输入角的变化曲线'); %定义各曲线意义
text( 2,38,'红线代表理想转角的变化曲线','FontSize',8,'backgroundcolor',[1 0.4 0.4]); text( 2,36,'蓝线代表实际转角的变化曲线','FontSize',8,'backgroundcolor',[0.4 0.4 1]); text( 2,34,'绿线代表优化后转角的变化曲线','FontSize',8,'backgroundcolor',[0.6 1 0.8]); hold on End
%进行子函数定义 function lt=lamta(d,fil)
lt=acos((cos(d))^2+(sin(d))^2*cos(fil)); end
function a1=alfa(fi,d,fil,w)
a1=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fil-w)); end
function a2=alfa2(fi,d,fir,w)
a2=asin(-cos(fi)*cos(d)-sin(fi)*sin(d)*cos(fir+w)); end
function d=Di(fi,a,dt)
d=acos(-cos(fi)*sin(a*pi/180)-sin(fi)*cos(a*pi/180)*cos(dt)); end
汽车转向梯形优化设计
function w=Ww(a,dt,d)
w=asin(cos(a*pi/180)*sin(a*pi/180)/sin(d)); end
function dt=delta(r,fi)
dt=asin(sin(r*pi/180)/sin(fi)); end
function fi=fii(r,b)
fi=acos(cos(r*pi/180)*cos(b*pi/180)); end
function fir=fiir(A,B,C,fi0)
fir=fi0-2*atan((B+(sqrt(A^2+B^2-C^2)))/(A-C)); end
程序运行结果
??ii(?oi)??i(?oi)?f(x)???(?oi)?,??100%考虑到多数使用工况下转角θo小于20°
?i(?oi)?oi?1??且10°以内的小转角使用得更加频繁,因此取:
?omax?1.5???(?o)??1.0?0.5??0???o?10?10???o?20?20???o??omax
五、转动传动机构强度计算
1、转向拉杆