《凸轮机构matlab程序》由会员分享,可在线阅读,更多相关《凸轮机构matlab程序(7页珍藏版)》请在金锄头文库上搜索。
1、凸轮轮廓程序: e=20;s0=77.46;a1=0:pi/36:pi/3;s1=50*3*a1/pi-sin(6*a1)/(2*pi);x1=(s0+s1).*sin(a1)+e*cos(a1);y1=(s0+s1).*cos(a1)-e*sin(a1);k1=150/pi*1-cos(6*a1); i1=(k1-e).*sin(a1)+(s0+s1).*cos(a1).*(k1-e).*(k1-e)+(s0+s1).*(s0+s1).(-1/2); j1=-(k1-e).*cos(a1)+(s0+s1).*sin(a1).*(k1-e).*(k1-e)+(s0+s1).*(s0+s1).(
2、-1/2); x10=x1-10*j1; y10=y1-10*i1;a2=pi/3:pi/36:pi;s2=50;x2=(s0+s2).*sin(a2)+e*cos(a2);y2=(s0+s2).*cos(a2)-e*sin(a2);k2=0; i2=(k2-e).*sin(a2)+(s0+s2).*cos(a2).*(k2-e).*(k2-e)+(s0+s2).*(s0+s2).(-1/2);j2=-(k2-e).*cos(a2)+(s0+s2).*sin(a2).*(k2-e).*(k2-e)+(s0+s2).*(s0+s2).(-1/2);x20=x2-10*j2;y20=y2-10*i
3、2; a3=pi:pi/36:4*pi/3; s3=50*1-3*(a3-pi)/pi+sin(6*(a3-pi)/(2*pi); x3=(s0+s3).*sin(a3)+e*cos(a3); y3=(s0+s3).*cos(a3)-e*sin(a3); k3=50*-3/pi+3/pi*cos(6*(a3-pi); i3=(k3-e).*sin(a3)+(s0+s3).*cos(a3).*(k3-e).*(k3-e)+(s0+s3).*(s0+s3).(-1/2); j3=-(k3-e).*cos(a3)+(s0+s3).*sin(a3).*(k3-e).*(k3-e)+(s0+s3).*(
4、s0+s3).(-1/2); x30=x3-10*j3; y30=y3-10*i3; a4=4*pi/3:pi/36:2*pi; s4=0; x4=(s0+s4).*sin(a4)+e*cos(a4); y4=(s0+s4).*cos(a4)-e*sin(a4); k4=0; i4=(k4-e).*sin(a4)+(s0+s4).*cos(a4).*(k4-e).*(k4-e)+(s0+s4).*(s0+s4).(-1/2); j4=-(k4-e).*cos(a4)+(s0+s4).*sin(a4).*(k4-e).*(k4-e)+(s0+s4).*(s0+s4).(-1/2); x40=x4
5、-10*j4; y40=y4-10*i4; plot(x10,y10,-g*,x20,y20,-r*,x30,y30,-b*,x40,y40,-k*) plot(x10,y10,-g*,x20,y20,-r*,x30,y30,-b*,x40,y40,-k*,x1,y1,-g*,x2,y2,-r*,x3,y3,-b*,x4,y4,-k*) 凸轮压力角: x=0:0.01:pi/3; t=5.76*sin(6*x)+6*x.*sin(6*x)+(2-2*pi/15)*cos(6*x)-2+2*pi/15; xx = Columns 1 through 6 0 0.0100 0.0200 0.030
6、0 0.0400 0.0500 Columns 7 through 12 0.0600 0.0700 0.0800 0.0900 0.1000 0.1100 Columns 13 through 18 0.1200 0.1300 0.1400 0.1500 0.1600 0.1700 Columns 19 through 24 0.1800 0.1900 0.2000 0.2100 0.2200 0.2300 Columns 25 through 30 0.2400 0.2500 0.2600 0.2700 0.2800 0.2900 Columns 31 through 36 0.3000
7、0.3100 0.3200 0.3300 0.3400 0.3500 Columns 37 through 42 0.3600 0.3700 0.3800 0.3900 0.4000 0.4100 Columns 43 through 48 0.4200 0.4300 0.4400 0.4500 0.4600 0.4700 Columns 49 through 54 0.4800 0.4900 0.5000 0.5100 0.5200 0.5300 Columns 55 through 60 0.5400 0.5500 0.5600 0.5700 0.5800 0.5900 Columns 6
8、1 through 66 0.6000 0.6100 0.6200 0.6300 0.6400 0.6500 Columns 67 through 72 0.6600 0.6700 0.6800 0.6900 0.7000 0.7100 Columns 73 through 78 0.7200 0.7300 0.7400 0.7500 0.7600 0.7700 Columns 79 through 84 0.7800 0.7900 0.8000 0.8100 0.8200 0.8300 Columns 85 through 90 0.8400 0.8500 0.8600 0.8700 0.8
9、800 0.8900 Columns 91 through 96 0.9000 0.9100 0.9200 0.9300 0.9400 0.9500 Columns 97 through 102 0.9600 0.9700 0.9800 0.9900 1.0000 1.0100 Columns 103 through 105 1.0200 1.0300 1.0400 tt = Columns 1 through 6 0.0000 0.3461 0.6925 1.0379 1.3809 1.7202 Columns 7 through 12 2.0546 2.3825 2.7028 3.0141
10、 3.3150 3.6042 Columns 13 through 18 3.8804 4.1424 4.3889 4.6187 4.8307 5.0237 Columns 19 through 24 5.1967 5.3487 5.4788 5.5861 5.6698 5.7292 Columns 25 through 30 5.7636 5.7725 5.7555 5.7122 5.6422 5.5455 Columns 31 through 36 5.4219 5.2715 5.0944 4.8908 4.6610 4.4055 Columns 37 through 42 4.1248
11、3.8196 3.4906 3.1387 2.7647 2.3699 Columns 43 through 48 1.9552 1.5219 1.0714 0.6051 0.1243 -0.3692 Columns 49 through 54 -0.8740 -1.3882 -1.9102 -2.4381 -2.9701 -3.5044 Columns 55 through 60 -4.0388 -4.5716 -5.1008 -5.6243 -6.1401 -6.6464 Columns 61 through 66 -7.1410 -7.6221 -8.0877 -8.5359 -8.964
12、8 -9.3727 Columns 67 through 72 -9.7578 -10.1184 -10.4528 -10.7596 -11.0372 -11.2843 Columns 73 through 78 -11.4996 -11.6820 -11.8304 -11.9439 -12.0215 -12.0627 Columns 79 through 84 -12.0668 -12.0335 -11.9623 -11.8531 -11.7059 -11.5207 Columns 85 through 90 -11.2979 -11.0378 -10.7410 -10.4081 -10.0399 -9.6374 Columns 91 through 96 -9.2016 -8.7339 -8.2356 -7.7081 -7.1530 -6.5722 Columns 97 through 102 -5.9674 -5.3405 -4.6937 -4.0291 -3.3489 -2.6554 Columns 103 through 105 -1.9511 -1.2383 -0.5195 x=0.46:0.001:0.47; t=5.76*sin(6*x)+6*x.*sin(6*x)+(2-2*p