机械原理328MATLAB平面连杆机构运动分析解三角函数超越方程.docx
《机械原理328MATLAB平面连杆机构运动分析解三角函数超越方程.docx》由会员分享,可在线阅读,更多相关《机械原理328MATLAB平面连杆机构运动分析解三角函数超越方程.docx(20页珍藏版)》请在冰豆网上搜索。
![机械原理328MATLAB平面连杆机构运动分析解三角函数超越方程.docx](https://file1.bdocx.com/fileroot1/2022-11/16/98ba81d6-5c68-43e0-b3a2-5fa20902e984/98ba81d6-5c68-43e0-b3a2-5fa20902e9841.gif)
机械原理328MATLAB平面连杆机构运动分析解三角函数超越方程
平面连杆机构运动学分析
072092
张东方
3-15
已知:
LAE=70mm,LAB=40mm,LEF=60mm,LDE=35mm,LCD=75mm,LBC=50mm,原动件以等角速度w1=10rad/s回转。
试以图解法求在θ1=50°时C点的速度VC和加速度ac.
先对机构进行位置分析:
由封闭形ABCDEA与AEFA有:
L1+L2=L6+L3+L4
L’1=L6+L’4
即L2-L3-L4=-L1+L6
-L’4+L’1=L6
(1)位置方程
L2cosθ2-L3cosθ3-L4cos(θ4+180°)=-L1cos(θ1+180°)+L6
L2sinθ2-L3sinθ3-L4sin(θ4+180°)=-L1sin(θ1+180°)
-L’4cosθ4+L’1cosθ1=L6
-L’4sinθ4+L’1sinθ1=0
Xc=L1cos(θ1+180°)+L2cosθ2
Yc=L1sin(θ1+180°)+L2sinθ2
(2)速度方程
-L2sinθ2L3sinθ3L4cos(θ4+180°)0w2
L2cosθ2-L3cosθ3-L4cos(θ4+180°)0w3
00L’4sinθ4cosθ1w4
00-L’4cosθ4sinθ1L’1
L1sin(θ1+180°)
=-L1cos(θ1+180°)
L’1sinθ1
-L’1cosθ1
Vcx=-L1w1sin(θ1+180°)-w2L2sinθ2
Vcy=Lw2cos(θ1+180°)+w2L2cosθ2
(3)加速度方程
-L2sinθ2L3sinθ3-L4sinθ40a2
L2cosθ2-L3cosθ3L4cosθ40a3
00L’4sinθ4cosθ1a4
00-L’4cosθ4sinθ1L’’1
-w2L2cosθ2w3L3cosθ3-w4L4cosθ40
=--w2L2sinθ2-w3L3sinθ3-w4L4sinθ40
00w4L’4cosθ4-w1sinθ1
00w4L’4sinθ4-w1cosθ1
w2w1L1cosθ1
w3w1L1sinθ1
w4+w1w1L’1cosθ1+vsinθ1
L’1w1L’1sinθ1+vcosθ1
acx=w12L1cosθ1-w22L2cosθ2-a2L2sinθ2
acy=w12L1sinθ1-w22L2sinθ2+a2L2cosθ2
注意到,关于位置的四个方程组成的方程组是关于三角函数的非线性超越方程。
这里用牛顿——辛普森方法来求解。
第一步对位置方程进行求解:
用SolidWorks建模对机构中AF杆的极限位置进行分析,如图:
得出AF杆的运动范围是-57.91°~59°
根据位置方程式编制如下rrrposi.m函数:
functiony=rrrposi(x)
%
%scriptusedtoimplementNewton-Raphsonmechodfor
%solvingnonlinearpositionofRRRbargroup
%
%Inputparameters
%x
(1)=theta-1
%x
(2)=theta-2guessvalue
%x(3)=theta-3guessvalue
%x(4)=theta-4guessvalue
%x(5)=l1
%x(6)=l2
%x(7)=l3
%x(8)=l4
%x(9)=l6
%x(10)=lAguessvalue
%x(11)=lB
%
%Outputparameters
%
%y
(1)=lA
%y
(2)=theta-2
%y(3)=theta-3
%y(4)=theta-4
%
theta2=x
(2);
theta3=x(3);
theta4=x(4);
lA=x(10)
%
epsilon=1.0E-6;
%
f=[x(6)*cos(theta2)-x(7)*cos(theta3)-x(8)*cos(pi+theta4)+x(5)...
*cos(x
(1)+pi)-x(9);
x(6)*sin(theta2)-x(7)*sin(theta3)-x(8)*sin(theta4+pi)+...
x(5)*sin(x
(1)+pi);
-x(11)*cos(theta4)+lA*cos(x
(1))-x(9);
-x(11)*sin(theta4)+lA*sin(x
(1))];
%
whilenorm(f)>epsilon
J=[0-x(6)*sin(theta2)x(7)*sin(theta3)-x(8)*sin(theta4);
0x(6)*cos(theta2)-x(7)*cos(theta3)x(8)*cos(theta4);
cos(x
(1))00x(11)*sin(theta4);
sin(x
(1))00-x(11)*cos(theta4)];
dth=inv(J)*(-1.0*f);
lA=lA+dth
(1);
theta2=theta2+dth
(2);
theta3=theta3+dth(3);
theta4=theta4+dth(4);
f=[x(6)*cos(theta2)-x(7)*cos(theta3)-x(8)*cos(pi+theta4)+x(5)...
*cos(x
(1)+pi)-x(9);
x(6)*sin(theta2)-x(7)*sin(theta3)-x(8)*sin(theta4+pi)+...
x(5)*sin(x
(1)+pi);
-x(11)*cos(theta4)+lA*cos(x
(1))-x(9);
-x(11)*sin(theta4)+lA*sin(x
(1))];
norm(f);
end;
y
(1)=lA;
y
(2)=theta2;
y(3)=theta3;
y(4)=theta4;
再进行数据输入,运行程序进行运算。
这里我们根据上面分析的θ1的极限位置取θ1的范围为40°~55°并均分成15个元素:
clc
clear
x1=linspace(40*pi/180,55*pi/180,15);
x=zeros(length(x1),11);
forn=1:
15
x(n,:
)=[x1(:
n)pi/68*pi/92*pi/340507535707560];
end
p=zeros(length(x1),4);
fork=1:
15
y=rrrposi(x(k,:
));
p(k,:
)=y;
end
>>p
p=
93.31490.71632.54551.5461
91.30710.70452.56171.5902
89.23870.69292.57861.6347
87.10760.68152.59631.6796
84.91130.67032.61471.7250
82.64630.65922.63391.7709
80.30860.64822.65391.8174
77.89310.63722.67471.8646
75.39300.62632.69651.9126
72.79980.61542.71921.9616
70.10190.60432.74312.0118
67.28330.59302.76832.0635
64.32170.58122.79502.1169
61.18350.56872.82372.1728
57.81530.55512.85492.2319
输出的P、矩阵的第二列到第四列分别是θ2、θ3、θ4的值,第一列是AF杆的长度L1’。
第二步进行速度计算:
根据速度方程式编写如下rrrvel.m函数:
functiony=rrrvel(x)
%
%Inputparameters
%
%x
(1)=theta-1
%x
(2)=theta-2
%x(3)=theta-3
%x(4)=theta-4
%x(5)=dtheta-1
%x(6)=l1
%x(7)=l2
%x(8)=l3
%x(9)=l4
%x(10)=l6
%x(11)=lA
%x(12)=lB
%
%Outoutparameters
%
%y
(1)=V
%y
(2)=dtheta-2
%y(3)=dtheta-3
%y(4)=dtheta-4
%
A=[-x(7)*sin(x
(2))x(8)*sin(x(3))x(9)*sin(pi+x(4))0;
x(7)*cos(x
(2))-x(8)*cos(x(3))-x(9)*cos(x(4)+pi)0;
00x(12)*sin(x(4))cos(x
(1));
00-x(12)*cos(x(4))sin(x
(1))];
B=[x(6)*sin(x
(1)+pi);-x(6)*cos(x
(1)+pi);x(11)*sin(x
(1));-x(11)*cos(x
(1))]*x(5);
y=inv(A)*B;
根据第一步得到的数据进行数据输入,运行程序计算各速度值。
程序如下:
x2=[x1'p(:
2)p(:
3)p(:
4)10*ones(15,1)40*ones(15,1)50*ones(15,1)...
75*ones(15,1)35*ones(15,1)70*ones(15,1)p(:
1)60*ones(15,1)];
q=zeros(4,15);
form=1:
15
y2=rrrvel(x2(m,:
));
q(:
m)=y2;
end
q
q=
1.0e+003*
Columns1through8
-0.0064-0.0062-0.0061-0.0061-0.0060-0.0059-0.0059-0.0058
0.00850.00890.00920.00960.01010.01050.01090.0114
0.02350.02370.02390.02410.02440.02470.02500.0255
-1.0578-1.0897-1.1226-1.1568-1.1926-1.2302-1.2704-1.3137
Columns9through15
-0.0058-0.0059-0.0060-0.0062-0.0065-0.0069-0.0078
0.01190.01250.01310.01390.01480.01590.0175
0.02590.02650.02720.02810.02920.03060.0327
-1.3610-1.4136-1.4734-1.5431-1.6273-1.7337-1.8767
程序运行得到q矩阵,第一行到第三行分别是a2、a3、a4的值,第四行是杆AF上滑块运动的速度,即F点的速