资源描述
机械原理作业 使用矩阵法对图所示机构进行运动分析,写出C点的位置,速度及加速度方程。由封闭形ABCDEA与AEFA得L6+L4+L3 =L1+L2L1=L6+L4(1)位置分析机构的封闭矢量方程式写成在两坐标上的投影体现式:由以上方程求出2 3 4 L1运用非线性超越方程组牛顿辛普森求解措施原理:设:f1(2 3 4 L1)= L2cos2-L3cos3+L4cos4 -L1cos1-L6=0 f2(2 3 4 L1)= L2sin2-L3sin3+L4sin4-L11=0f3(2 3 4 L1)= -L44+L1cos1-L6=0f3(2 3 4 L1)= -L4sin4+L1sin1=0J = -x(6)*sin(theta2) x(7)*sin(theta3) -x(8)*sin(theta4) 0; x(6)*cos(theta2) -x(7)*cos(theta3) x(8)*cos(theta4) 0; 0 0 x(10)*sin(theta4) cos(x(1); 0 0 -x(10)*cos(theta4) sin(x(1)(2)速度分析对位置方程组求导:-L2*w2*sin2+L3*w3*sin3-L4*w4*sin4+L1*w1sin1=0L2*w2*cos2-L3*w3*cos3+L4*w4*cos4-L1*w1cos1=0L4*w4*sin4+L1*cos1-L1*w1*sin1=0-L4*w4*cos4+L1*sin1+L1*w1*cos1=0可得w2、w3、w4、L1。上式体现为矩阵形式:-L2*sin2 L3*sin3 -L4*sin4 0 w2 -L1*sin1L2*cos2 -L3*cos3 L4*cos4 0 w3 L1*cos10 0 L4*sin4 cos1 w4 L1*sin10 0 -L4*cos4 sin1 L1 -L1*cos1(3) 加速度分析 将速度方程求导,可得加速度关系式-L2*w2*cos2 L3*w3*cos3 -L4*w4*cos4 0 w2-L2*w2*sin2 L3*w3*sin3 -L4*w4*sin4 0 w30 0 L4*w4*cos4 -w1*sin1 w40 0 -L4*w4*sin4 w1*cos1 L1-L2*sin2 L3*sin3 -L4*sin4 0 2 + L2*cos2 -L3*cos3 L4*cos4 0 3 0 0 L4*sin4 cos1 4 0 0 -L4*cos4 sin1 L1-L1*w1*cos1w1 -L1*w1*sin1 L1*sin1+ L1*w1* cos1-L1*cos1+ L1*w1* sin1用MATLAB编程运营(1) 对位置方程进行求解在此机构中,由于FE杆是定值60mm、AE为定值70mm,当DE杆垂直于BF杆时,1达到最大值,即sin1(max)=EF/AE=60/70,可得1(max)=58.99*pi/180。编制程序如下:function y=rrrposi(x)% Script used to implement Newton-Raphon mechod for% solving nonlinear position of RRR bar group% Input parameters% x(1)=theta-1% x(2)=theta-2 guess value% x(3)=theta-3 guess value % x(4)=theta-4 guess value % x(5)=r1% x(6)=r2 % x(7)=r3% x(8)=r4% x(9)=r5% x(10)=r6% x(11)=r7 guess value% Output paramenters% y(1)=theta-2% y(2)=theta-3% y(3)=theta-4% y(4)=r7% theta2=x(2); theta3=x(3); theta4=x(4); r8=x(11)%epsilon=1.0E-6;% f=-x(5)*cos(x(1)+x(6)*cos(theta2)-x(7)*cos(theta3)+x(8)*cos(theta4)-x(9); -x(5)*sin(x(1)+x(6)*sin(theta2)-x(7)*sin(theta3)+x(8)*sin(theta4); -x(9)-x(10)*cos(theta4)+r8*cos(x(1); -x(10)*sin(theta4)+r8*sin(x(1);% while norm(f)epsilon J=-x(6)*sin(theta2) x(7)*sin(theta3) -x(8)*sin(theta4) 0; x(6)*cos(theta2) -x(7)*cos(theta3) x(8)*cos(theta4) 0; 0 0 x(10)*sin(theta4) cos(x(1); 0 0 -x(10)*cos(theta4) sin(x(1); dth=inv(J)*(-1.0*f); theta2=theta2+dth(1); theta3=theta3+dth(2); theta4=theta4+dth(3); r8=r8+dth(4);% f=-x(5)*cos(x(1)+x(6)*cos(theta2)-x(7)*cos(theta3)+x(8)*cos(theta4)-x(9); -x(5)*sin(x(1)+x(6)*sin(theta2)-x(7)*sin(theta3)+x(8)*sin(theta4); -x(9)-x(10)*cos(theta4)+r8*cos(x(1); -x(10)*sin(theta4)+r8*sin(x(1); norm(f); end; y(1)=theta2; y(2)=theta3; y(3)=theta4; y(4)=r8; x1=linspace(43*pi/180,58*pi/180,15);x=zeros(length(x1),11);for n=1:15x(n,: )=x1( : ,n ) 30*pi/180 160*pi/180 120*pi/180 40 50 75 35 70 60 66;end;p=zeros(length(x1),4);for k=1:15y=rrrposi0(x(k,:);p(k,:)=y;end;pr8 = 66p = 0.6838 2.5927 1.6706 87.5390 0.6725 2.6109 1.7159 85.3559 0.6614 2.6300 1.7617 83.1049 0.6504 2.6498 1.8080 80.7822 0.6394 2.6705 1.8551 78.3827 0.6285 2.6920 1.9030 75.9002 0.6176 2.7146 1.9518 73.3264 0.6066 2.7382 2.0017 70.6505 0.5953 2.7631 2.0530 67.8576 0.5836 2.7895 2.1061 64.9269 0.5713 2.8178 2.1614 61.8275 0.5579 2.8484 2.2197 58.5110 0.5427 2.8824 2.2826 54.8943 0.5241 2.9220 2.3526 50.8105 0.4976 2.9727 2.4373 45.8116成果依次表达为:2 *pi/180、3*pi/180 、4*pi/180、 L1的值。(2) 速度方程求解:编程如下:function y=rrrvel(x)% Input parameters% % x(1)=theta-1% x(2)=theta-2% x(3)=theta-3% x(4)=theta-4% x(5)=dtheta-1% x(6)=r1 % x(7)=r2% x(8)=r3% x(9)=r4% x(10)=r5% x(11)=r6% Output parameters% y(1)=dtheta-2% y(2)=dtheta-3% y(3)=dtheta-4% y(4)=dr1%A=-x(8)*sin(x(2) x(9)*sin(x(3) -x(10)*sin(x(4) 0; x(8)*cos(x(2) -x(9)*cos(x(3) x(10)*cos(x(9) 0; 0 0 x(11)*sin(x(4) cos(x(1); 0 0 -x(11)*cos(x(4) sin(x(1);B=-x(7)*sin(x(1);x(7)*cos(x(1);x(6)*sin(x(1);-x(6)*cos(x(1)*x(5);y=inv(A)*B;输入数据 x2=x1 p(:,1) p(:,2) p(:,3) 10*ones(15,1) p(:,4) 40*ones(15,1) 50*ones(15,1) 75*ones(15,1) 35*ones(15,1) 60*ones(15,1);q=zeros(4,15);for m=1:15y2=rrrvel(x2(m,:);q(:,m)=y2;end;qq = 1.0e+003 *Columns 1 through 9 -0.0156 -0.0158 -0.0161 -0.0164 -0.0166 -0.0170 -0.0173 -0.0177 -0.0182 0.0019 0.0019 0.0019 0.0018 0.0018 0.0018 0.0017 0.0016 0.0015 0.0241 0.0243 0.0246 0.0250 0.0254 0.0258 0.0264 0.0270 0.0279 -1.1499 -1.1853 -1.2225 -1.2621 -1.3047 -1.3511 -1.4025 -1.4607 -1.5282 Columns 10 through 15 -0.0188 -0.0196 -0.0208 -0.0227 -0.0261 -0.0352 0.0013 0.0012 0.0010 0.0008 0.0007 0.0009 0.0289 0.0303 0.0322 0.0352 0.0403 0.0526 -1.6090 -1.7101 -1.8440 -2.0378 -2.3631 -3.1197成果纵向依次为:w2、w3、w4、L1(v)的值。(3) 加速度的分析编程如下function y=rrra(x)% input parameters% x(1)=th1% x(2)=th2% x(3)=th3% x(4)=th4% x(5)=dth1% x(6)=dth2% x(7)=dth3% x(8)=dth4% x(9)=r1% x(10)=r2% x(11)=r3% x(12)=r4% x(13)=r5% x(14)=r6% x(15)=r7% y(1)=ddth2% y(2)=ddth3% y(3)=ddth4% y(4)=dr1%A=-x(11)*sin(x(2) x(12)*sin(x(3) -x(13)*sin(x(4) 0; x(11)*cos(x(2) -x(12)*cos(x(3) x(13)*cos(x(4) 0; 0 0 x(14)*sin(x(4) cos(x(1); 0 0 -x(14)*cos(x(4) sin(x(1);B=-x(11)*x(6)*cos(x(2) x(12)*x(7)*cos(x(3) -x(13)*x(8)*cos(x(4) 0; -x(11)*x(6)*sin(x(2) x(12)*x(7)*sin(x(3) -x(13)*x(8)*sin(x(4) 0; 0 0 x(14)*x(8)*cos(x(4) -x(5)*sin(x(1); 0 0 x(14)*x(8)*sin(x(4) x(5)*cos(x(1);C=x(6);x(7);x(8);x(9);D=-x(9)*x(5)*cos(x(1);-x(9)*x(5)*sin(x(1);x(9)*sin(x(1)+x(9)*x(5)*cos(x(1);-x(9)*cos(x(1)+x(9)*x(5)*sin(x(1);y=inv(A)*D*x(5)-inv(A)*B*C;输入数据 x3=x1 p(:,1) p(:,2) p(:,3) 10*ones(15,1) q(1,:) q(2,:) q(3,:) q(4,:) 40*ones(15,1) 50*ones(15,1) 75*ones(15,1) 35*ones(15,1) p(:,4) 60*ones(15,1);f=zeros(4,15);for m=1:15y3=rrra(x3(m,:);f(:,m)=y3;end;ff = 1.0e+005 * Columns 1 through 12 -0.0068 -0.0071 -0.0074 -0.0078 -0.0083 -0.0089 -0.0095 -0.0104 -0.0115 -0.0129 -0.0149 -0.0180 0.0209 0.0217 0.0225 0.0234 0.0244 0.0255 0.0268 0.0284 0.0303 0.0327 0.0359 0.0408 0.0033 0.0035 0.0037 0.0039 0.0042 0.0046 0.0051 0.0056 0.0064 0.0075 0.0091 0.0119 -1.6862 -1.7217 -1.7602 -1.8025 -1.8498 -1.9039 -1.9672 -2.0434 -2.1384 -2.2625 -2.4343 -2.6931 Columns 13 through 15 -0.0233 -0.0351 -0.0817 0.0489 0.0662 0.1309 0.0174 0.0312 0.0943 -3.1360 -4.0878 -7.5791成果为:a2 、a3、a4、L1的加速度。位置,速度,加速度数据总表:1234L1w2W3W4v(L1)234a(L1)radmmrad/srad/srad/smm/srad/s2mm/s20.750490.683782.59271.670687.539-0.01560.00190.0241-1.1499-0.00680.02090.0033-1.68620.769190.67252.61091.715985.356-0.01580.00190.0243-1.1853-0.00710.02170.0035-1.72170.787890.661382.631.761783.105-0.01610.00190.0246-1.2225-0.00740.02250.0037-1.76020.806590.650362.64981.80880.782-0.01640.00180.025-1.2621-0.00780.02340.0039-1.80250.825290.639432.67051.855178.383-0.01660.00180.0254-1.3047-0.00830.02440.0042-1.84980.843990.628532.6921.90375.9-0.0170.00180.0258-1.3511-0.00890.02550.0046-1.90390.862690.61762.71461.951873.326-0.01730.00170.0264-1.4025-0.00950.02680.0051-1.96720.881390.606562.73822.001770.651-0.01770.00160.027-1.4607-0.01040.02840.0056-2.04340.900090.595292.76312.05367.858-0.01820.00150.0279-1.5282-0.01150.03030.0064-2.13840.918790.583622.78952.106164.927-0.01880.00130.0289-1.609-0.01290.03270.0075-2.26250.937490.57132.81782.161461.827-0.01960.00120.0303-1.71010.01490.03590.0091-2.43430.956190.557912.84842.219758.511-0.02080.0010.0322-1.844-0.0180.04080.0119-2.69310.974890.542712.88242.282654.894-0.02770.00080.0352-2.0378-0.02330.04890.0174-3.3160.993590.524112.9222.352650.811-0.02610.00070.04030.0526-0.03510.06620.0312-4.08781.01230.497622.97272.437345.812-0.03520.00090.0526-3.1197-0.08170.13090.0943-7.5791输出图像如下: plot(x1,p (1,:),-,x1,p(2,:),:,x1,p(3,:),*)即2、3、4有关1的函数图。 plot(x1,p(4,:)即L1有关1的函数图。 plot(x1,q(1,:),-,x1,q(2,:),:,x1,q(3,:),*)即w2、w3、w4有关1的函数图。 plot(x1,f(4,:)即杆L1 的速度有关1的函数图。 plot(x1,f(1,:),p,x1,f(2,:),x1,f(3,:),*)即2、3、4有关1的函数图。 plot(x1,f(4,:)即杆L1 的加速度有关1的函数图。
展开阅读全文