牛头刨床运动仿真matlab程序

合集下载

机械毕业设计1157牛头刨床六杆机构运动分析程序设计

机械毕业设计1157牛头刨床六杆机构运动分析程序设计

摘要在工程技术领域,经常会遇到一些需要反复操作,重复性很高的工作,如果能有一个供反复操作且操作简单的专用工具,图形用户界面就是最好的选择。

如在本设计中对于牛头刨床平面六杆机构来说,为了保证结构参数与运动参数不同的牛头刨床的运动特性,即刨刀在切削过程中接近于等速运动从而保证加工质量和延长刀具寿命,以及刀具的急回性能从而提高生产率,这样的问题如果能够通过设计一个模型平台,之后只需改变参量就可以解决预期的问题,这将大大的提高设计效率。

本设计中正是通过建立牛头刨床六杆机构的数学模型,然后用MA TLAB程序设计出一个友好的人机交互的图形界面,并将数学模型参数化,使用户只需改变牛头刨床的参数就可以方便的实现运动分析和运动仿真,用户可以形象直观地观察到牛头刨床的运动轨迹、速度变化及加速度变化规律。

关键词:牛头刨床六杆机构MA TLAB 运动仿真程序开发AbstractIn the engineering area, often repeatedly encountered some operational needs, repetitive highly, and if the operation can be repeated for a simple operation and dedicated tool graphical user interface is the best choice. As in the planer graphic design for six pole bodies, and campaigns to ensure the structural parameters of different parameters planer movement characteristics, planning tool in the process of cutting close to equal campaign to ensure processing quality and extended life cutlery and cutlery rush back to the performance enhancing productivity, If such issues can be adopted to design a model platform parameter can be changed only after the expected settlement, which will greatly enhance the efficiency of the design. It is through the establishment of this design planer six pole bodies mathematical model, and then use MATLAB to devise procedures of a friendly aircraft in the world graphics interface, and mathematical models of the parameters, so that users only need to change the parameters planer can facilitate the realization of movement analysis and sports simulation, Users can visual image observed in planer movement trajectories, speed changes and acceleration changes.Keywords:Planer 6 pole bodies MATLAB Campaign simulation Procedure development.目录1 绪论 (4)2牛头刨床六杆机构运动分析程序设计2.1 MA TLAB介绍 (5)2.2 MA TLAB的特点 (6)2.3 用MA TLAB处理工程问题优缺点 (7)3牛头刨床运动分析的模型3.1 基本概念与原理 (9)3.2 牛头刨床六杆机构的数学模型 (9)4 图形用户界面GUI4.1界面设计的原则 (13)4.2 功能要求 (16)4.3界面结构设计 (17)4.4 程序框图的设计 (19)5运动仿真程序界面设计与编程实现5.1 句柄图形体系 (21)5.1.1 图形对象、对象句柄和句柄图形树结构 (22)5.1.2 对象属性 (23)5.1.3 对象句柄的获取方法 (23)5.1.4 对象句柄的获取和设置 (25)5.2 主界面参数含义 (27)5.3 界面制作步骤 (27)6总结 (49)7致谢 (50)8参考书目 (51)9附录程序源代码 (52)1 绪论1.1本课题的意义机构运动分析是不考虑引起机构运动的外力的影响,而仅从几何角度出发,根据已知的原动件的运动规律(通常假设为匀速运动),确定机构其它构件上各点的位移、速度、加速度,或构件的角位移、角速度、角加速度等运动参数。

机械原理牛头刨床matlab源程序

机械原理牛头刨床matlab源程序

七.Matlab编程及绘图clear all;clc;%初始条件theta1=linspace(-25.72,334.28,100);%单位度theta1=theta1*pi/180;%转换为弧度制W1=80*pi/30;%角速度单位rad/sH=0.6;%行程单位mL1=0.1605;%O2A的长度单位mL3=0.6914;%O3B的长度单位mL4=0.2074;%BF的长度单位mL6=0.370;%O2O3的长度单位mL6u=0.6572;%O3D的长度单位mZ=pi/180;%角度与弧度之间的转换dT=(theta1(3)-theta1(2))/W1;%时间间隔for j=1:100t(j)=dT*(j-1);%时间因素end%求解S3、Theta3、Theta4和SE四个变量S3=((L6)^2+(L1)^2-2*L6*L1*cos(theta1+pi/2)).^0.5;%求出O3A的值for i=1:100%求解角度theta3、Theta4和SE的长度theta3(i)=acos(L1*cos(theta1(i))/S3(i));theta4(i)=asin((L6u-L3*sin(theta3(i)))/L4);SE(i)=L3*cos(theta3(i))+L4*cos(theta4(i));end%求解完成%求解完成%求解VS3、W3、W4和VE四个变量for i=1:100J= inv([cos(theta3(i)),-S3(i)*sin(theta3(i)),0,0;sin(theta3(i)),S3(i)*cos(theta3(i)),0,0;0,-L3*sin(theta3(i)),-L4*sin(theta4(i)),-1;0,L3*cos(theta3(i)),L4*cos(theta4(i)),0]);K=J*W1*[-L1*sin(theta1(i));L1*cos(theta1(i));0;0];VS3(i)=K(1);W3(i)=K(2);W4(i)=K(3);VE(i)=K(4);end%求解完成%求解aS3、a3、a4、aE四个变量for i=1:100J= inv([cos(theta3(i)),-S3(i)*sin(theta3(i)),0,0;sin(theta3(i)),S3(i)*cos(theta3(i)),0,0;0,-L3*sin(theta3(i)),-L4*sin(theta4(i)),-1;0,L3*cos(theta3(i)),L4*cos(theta4(i)),0]);P=W1*W1*[-L1*cos(theta1(i));-L1*sin(theta1(i));0;0];M=[-W3(i)*sin(theta3(i)),-VS3(i)*sin(theta3(i))-S3(i)*W3(i)*cos(theta3(i)),0,0;W3(i)*cos(theta3(i)),VS3(i)*cos(theta3(i))-S3(i)*W3(i)*sin(theta3(i)),0,0;0,-L3*W3(i)*cos(theta3(i)),-L4*W4(i)*cos(theta4(i)),0;0,-L3*W3(i)*sin(theta3(i)),-L4*W4(i)*sin(theta4(i)),0];N=[VS3(i);W3(i);W4(i);VE(i)];K=J*(-M*N+P);aS3(i)=K(1);a3(i)=K(2);a4(i)=K(3);aE(i)=K(4);end%求解完成%动态静力分析%初始条件M4=22;M5=3;M6=52;Js4=0.9;Js5=0.015;Fc=1400;Ls4=0.5*L3;Ls5=0.5*L4;%给切削阻力赋值for i=1:100if((abs(SE(1)-SE(i))>0.05*H&&abs(SE(1)-SE(i))<0.95*H)&&(theta1(i)<pi))Fc(i)=1400;elseFc(i)=0;endend%赋值完成%求解平衡力矩J4=Js4+M4*(0.5*L3)*(0.5*L3);%导杆对点O3的转动惯量for i=1:100Ekk(i)=(M6*VE(i)*VE(i)+Js5*W4(i)*W4(i)+M5*VE(i)*VE(i)+J4*W3(i)*W3(i))/2;%计算总动能enddEkk(1)=Ekk(1)-Ekk(100);%动能的改变量for i=2:100dEkk(i)=Ekk(i)-Ekk(i-1);%动能的改变量endfor i=1:100MM(i)=(dEkk(i)+Fc(i)*abs(VE(i)))/W1;%求平衡力矩end%画图%画运动图figure(1);plot(t,theta3,'r');hold on;plotyy(t,theta4,t,SE);grid on;xlabel('时间t/s');ylabel('theta3、theta4(rad)');title('角度Theta3、theta4和位移SE');axis([ 0 , 0.75,-0.2,2]);figure(2);plot(t,W3,'r');hold on;grid on;plotyy(t,W4,t,VE);xlabel('时间t/s');ylabel('W3、W4(rad/s)');title('角度速度W3、W4和速度VE');axis([0 , 0.75,-5,3]);figure(3);plot(t,a3,'r');hold on;plotyy(t,a4,t,aE);grid on;xlabel('时间t/s');ylabel('a3、a4(rad/s/s)');title('角度加速度a3、a4和加速度aE');axis([0 , 0.75,-80,80]);%运动图画完%画反力图figure(4);plotyy(theta1,Fc,theta1,SE);xlabel('Theta1(时间t)');ylabel('Fc');axis([theta1(1) ,theta1(100),-50,1400]); title('切削阻力Fc与位移SE');grid on;figure(5);plotyy(theta1,MM,theta1,Fc);xlabel('Theta1(时间t)');ylabel('力矩');axis([theta1(1) ,theta1(100),-50,300]); title('平衡力矩');grid on;figure(6);plotyy(theta1,Ekk,theta1,SE);xlabel('Theta1(时间t)');ylabel('Fc');title('导杆、连杆和刨头的总动能');grid on; theta1(1)theta1(100)。

基于MATLAB的牛头刨床传动机构仿真

基于MATLAB的牛头刨床传动机构仿真

·
86
·
技术协作信息
技术探讨与推广
(作者单位: 沈阳理工大学)
·
87
·
基于 MATLAB 的牛头刨床传动 机构仿真
一、 系统仿真模型选取 lCF=280mm, 牛头刨床传动机构的示意图如图 1 所示。
◎ 于长春
本 文 选 取 机 械 原 理 教材 中 的 牛 头 刨 床 传 动 机 构 来 进 行 Simulink 仿 真 。 已 知 lAB=75mm, lCD=300mm, lDE=100mm, lAC=150据牛头刨床传动机构的闭环矢量方程推导出各构件的位移、 速度 、 加速度的表达 式, 并将 其转化为适用于 MATLAB 仿真的矩阵数学模型, 以该矩阵的数学模型编制相应的 M 函数仿真模块, 最后建立仿真模型, 并对 仿真 结果的相容性误差加以分析。 借助于 MATLAB 软件可以方便地实现机构性能分析和动态仿真, 从而提高设计及分 析效率。 Abstract: according to the shaper transmission vector loop equations deriveddisplacement, velocity, acceleration of each component, and turn it into a matrix model for MATLAB simulation, the matrix of the mathematical model of the corresponding M function simulation module, simulation model is established and theerror of simulation, compatibility the results of the analysis. With the help of MATLAB software can achieve a performance analysis and dynamic simulation and conveniently, so as to improve the efficiency of design and analysis.

牛头刨床课程设计matlab程序

牛头刨床课程设计matlab程序

lo2o3=0.65;l2=0.09250;l4=1.1245;l5=0.281125;lo3d=1.11878;w2=8*pi/3;m4=16;m5=4;m6=68; g=9.8;j4=1.6;j5=0.03;k2=-38.18;for i=1:13;k2=k2+30;if k2>90&k2<270k4=pi+atan((lo2o3+l2*sin(k2*pi/180))/(l2*cos(k2*pi/180)));elsek4=atan((lo2o3+l2*sin(k2*pi/180))/(l2*cos(k2*pi/180)));endk5=asin((lo3d-l4*sin(k4))/l5);sf= l4*cos(k4)+l5*cos(k5);%得到牛头刨头的位移l3=l2*cos(k2*pi/180)/cos(k4);B1=[cos(k4),-l3*sin(k4),0,0;sin(k4),l3*cos(k4),0,0;0,-l4*sin(k4),-l5*sin(k5),-1;0,l4*cos(k4),l5*co s(k5),0;];M=inv(B1)*(w2*[-l2*sin(k2*pi/180);l2*cos(k2*pi/180);0;0;]);%求得矩阵,其中M=[v3;w4;w5;vf]B2=[-M(2)*sin(k4),-M(1)*sin(k4)-M(2)*l3*cos(k4),0,0;M(2)*cos(k4),M(1)*cos(k4)-M(2)*l3*co s(k4),0,0;0,-M(2)*l4*cos(k4),-l5*M(3)*cos(k5),0;0,-M(2)*l4*sin(k4),-l5*M(3)*sin(k5),0;];N=inv(B1)*(-B2*M+w2*[-l2*w2*cos(k2*pi/180);-l2*w2*sin(k2*pi/180);0;0;]);%求得加速度矩阵,其中N=[a3;a4;a5;af]vf=M(4);af=N(4);X(i,:)=[k2,sf,vf,af];%收集Φ2与牛头刨头位移,速度,加速度与Φ2的数据a4x=-N(2)*l4*sin(k4)/2-M(2)*M(2)*l4*cos(k4)/2;a4y=N(2)*l4*cos(k4)/2-M(2)*M(2)*l4*sin(k4)/2;a5x=2*a4x-N(3)*l5*sin(k5)/2-M(3)*M(3)*l5*cos(k5)/2;a5y=2*a4y+N(3)*l5*cos(k5)/2-M(3)*M(3)*l5*sin(k5)/2;%求出构件4,5质心的加速度,以便惯性力的计算p4x=-m4*a4x;p4y=-m4*a4y;M4=-j4*N(2);p5x=-m5*a5x;p5y=-m5*a5y;M5=-j5*N(3);p6=-m6*af;%构件4,5,6的惯性力及惯性力矩if sf>(0.03+0.50237-0.6)&sf<(0.50237-0.03)fc=14000;fc=0;end%判断fc的取值M1=[1,0,1,0,0;0,1,0,0,0;0,0,-1,0,1;0,-1,0,1,0;0,l5*sin(k5)/2,-l5*cos(k5)/2,l5*sin(k5)/2, -l5*cos(k5)/2;];N1=[m6*g;-fc-p6;m5*g-p5y;-p5x;-M5;];F1=inv(M1)*N1;%其中F1对应的量为:F1=[fn;r56x;r56y;r45x;r45y;]M2=[1,0,1,0,0;0,1,0,1,0;cos(k4),sin(k4),0,0,0;(l4/2-l3)*sin(k4),-(l4/2-l3)*cos(k4),l4*sin(k4)/2,-l4*cos(k4)/2,0;l2*sin(k2*pi/180),-l2*cos(k2*pi/180),0,0,1;];N2=[F1(4)-p4x; F1(5)-p4y+m4*g;0; F1(5)*l4*cos(k4)/2- F1(4)*l4*sin(k4)/2-M4;0;];F2=inv(M2)*N2;%其中F2对应的量为:F2=[r34x;r34y;r14x;r14y;Mb;]Y(i,:)=[k2,F2(1), F2(2), F2(3), F2(4), F1(4), F1(5), F1(2), F1(3)];%记录不同角度时反力r34x,r34y,r14x,r14y,r45x,r45y,r56x,r56y的数据Z(i,:)=[k2,F2(5),p4x,p4y,M4,p5x,p5y,M5,p6];%记录Φ2与平衡力矩的关系enddisp(X);disp(Y);disp(Z);plot(X(:,1),X(:,2),'-')grid ontitle('s6--Φ2函数')xlabel('变量Φ2(°)')ylabel('变量s6(m)')plot(X(:,1),X(:,3),'-')grid ontitle('v6--Φ2函数')xlabel('变量Φ2(°)')ylabel('变量v6(m/s)')figureplot(X(:,1),X(:,4),'-')grid ontitle('a6--Φ2函数')xlabel('变量Φ2(°)')ylabel('变量a6(m*m/s)')figureplot(Z(:,1),Z(:,2),'-')grid ontitle('Mb--Φ2函数')xlabel('变量Φ(2°)')ylabel('变量Mp(N*m)')21.8200 0.4211 -0.6064 -8.013051.8200 0.3698 -0.9980 -4.405581.8200 0.3010 -1.1660 -0.9019111.8200 0.2286 -1.1154 2.4802141.8200 0.1661 -0.8479 5.9804171.8200 0.1273 -0.3571 9.5994201.8200 0.1257 0.3339 12.1179231.8200 0.1703 1.0781 10.6189261.8200 0.2546 1.5373 2.9031291.8200 0.3495 1.3924 -7.1580321.8200 0.4180 0.7490 -12.0727351.8200 0.4411 -0.0000 -11.1982381.8200 0.4211 -0.6064 -8.01301.0e+004 *0.0022 -2.3453 0.2943 0.8812 -0.2917 -1.4577 -0.0136 -1.4545 -0.01770.0052 -2.2130 0.1751 0.7778 -0.1467 -1.4317 0.0132 -1.4300 0.00940.0082 -2.1335 0.0379 0.7263 0.0064 -1.4065 0.0295 -1.4061 0.02580.0112 -2.1010 -0.0982 0.7208 0.1370 -1.3821 0.0239 -1.3831 0.02020.0142 -2.1175 -0.2177 0.7654 0.2345 -1.3569 0.0011 -1.3593 -0.00280.0172 -2.1882 -0.3021 0.8650 0.2979 -1.3309 -0.0209 -1.3347 -0.02500.0202 -2.3215 -0.3238 1.0184 0.3193 -1.3128 -0.0215 -1.3176 -0.02570.0232 -2.5278 -0.2504 1.2128 0.2692 -1.3235 0.0031 -1.3278 -0.00080.0262 -2.7700 -0.0653 1.3932 0.1076 -1.3791 0.0282 -1.3803 0.02470.0292 -2.8882 0.1760 1.4309 -0.1408 -1.4515 0.0205 -1.4487 0.01690.0322 -2.7690 0.3396 1.2724 -0.3350 -1.4869 -0.0119 -1.4821 -0.01600.0352 -2.5408 0.3653 1.0512 -0.3763 -1.4806 -0.0279 -1.4761 -0.03220.0382 -2.3453 0.2943 0.8812 -0.2917 -1.4577 -0.0136 -1.4545 -0.01771.0e+003 *0.0218 1.0591 0.0640 -0.0053 -0.0114 0.0320 -0.0013 0.0001 0.54490.0518 1.7092 0.0351 0.0044 -0.0062 0.0176 0.0011 -0.0001 0.29960.0818 1.9584 0.0074 0.0095 -0.0013 0.0037 0.0024 -0.0001 0.06130.1118 1.8379 -0.0198 0.0080 0.0035 -0.0099 0.0020 -0.0001 -0.16870.1418 1.3691 -0.0481 0.0003 0.0085 -0.0240 0.0001 -0.0000 -0.40670.1718 0.5646 -0.0767 -0.0097 0.0137 -0.0384 -0.0024 0.0001 -0.65280.2018 -0.5201 -0.0968 -0.0127 0.0174 -0.0484 -0.0032 0.0002 -0.82400.2318 -1.6948 -0.0853 -0.0001 0.0151 -0.0426 -0.0000 0.0000 -0.72210.2618 -2.5276 -0.0229 0.0163 0.0040 -0.0115 0.0041 -0.0002-0.19740.2918 -2.4196 0.0572 0.0104 -0.0100 0.0286 0.0026 -0.0001 0.48670.3218 -1.3363 0.0964 -0.0077 -0.0172 0.0482 -0.0019 0.0001 0.82090.3518 0.0001 0.0898 -0.0129 -0.0161 0.0449 -0.0032 0.0002 0.76150.3818 1.0591 0.0640 -0.0053 -0.0114 0.0320 -0.0013 0.0001 0.5449。

基于MATLAB的牛头刨床主切削机构运动仿真

基于MATLAB的牛头刨床主切削机构运动仿真

基于MATLAB的牛头刨床主切削机构运动仿真
吴广益;于光忠
【期刊名称】《机械工程与自动化》
【年(卷),期】2022()5
【摘要】首先对牛头刨床主切削运动机构进行了位置分析,然后利用矢量解析法得出其位置方程,最后利用MATLAB软件编程对机构运动过程进行仿真,从而为牛头刨床主切削运动机构的创新设计和运动分析奠定基础。

【总页数】3页(P90-92)
【作者】吴广益;于光忠
【作者单位】德州职业技术学院
【正文语种】中文
【中图分类】TP391.9;TG552.1
【相关文献】
1.基于MATLAB/SIMULINK的牛头刨床导杆机构运动学及动力学分析
2.基于UG/MATLAB的牛头刨床传动机构运动学分析
3.基于MATLAB的牛头刨床机构运动分析
4.基于MATLAB的牛头刨床机构运动分析
5.基于MATLAB的牛头刨床传动机构仿真
因版权原因,仅展示原文概要,查看原文内容请购买。

第2-1节 牛头刨床运动仿真

第2-1节 牛头刨床运动仿真

第2讲牛头刨床运动仿真实例一、启动pro/e并设置工作目录1.点击【开始】→【所有程序】→【pro engineer】,启动pro/e软件,如图1所示。

图1 启动pro/e2.设置工作目录:选择【文件】→【设置工作目录】,选择桌面《运动仿真牛头刨床》文件夹为工作目录,点击该图框右下方的【确定】键,如图2、图3所示。

图2 设置工作目录图3 选择工作目录二、设置运动仿真文件1.点击【文件】→【新建】命令,选择类型为【组件】,子类型选择【设计】,将名称改为【niutoubaochuang】,将【使用缺省模板】前的对勾去掉,,如图4所示。

单击【确定】后弹出【新文件选项】对话框,【模板】选mmns asm design,单击【确定】完成任务的新建,如图5所示。

图4 新建文件图5 选择模板三、零件的装配1.预览整个机构效果图单击工作窗口右边工具栏中的【装配】命令,在【打开】命令中单击【niutoubaoch.asm】项。

单击【预览】可在框图中查看整个凸轮机构组装好后的效果图,如图6所示,后面的组装皆可按此标准来进行。

图6 机构效果图2. 安装基座(1)单击工作窗口右边的【装配】命令,在【打开】命令中选择ground.prt文件,即机座(也可以现【预览】确认一下),点击【打开】如图7所示。

图7 选择基座文件(2)导入机座后单击图8中所示【自动】命令右边小三角形,将机座设置为【缺省】模式,再点击面板右端的对勾,完成机座的放置,如图8所示。

图8 设置基座3. 安装圆盘(1)点击【装配】选中并打开打开第二个文件yuanpan.prt,即圆盘机构然后预览并单击【打开】,如图9所示,点击工具栏旁的【用户定义】下拉菜单,选择【销钉】连接类型,如图10所示。

图9 选择圆盘文件图10 设置约束类型(2)先进行轴对齐,即选择机座机架上矮圆柱的中心线A-2,再选择圆盘上圆孔的中心线A-1,完成轴对齐,如图11所示。

图11 轴对齐(3)再面匹配,光标移到圆盘上选中表面,然后选择矮圆柱的表面,点击工具栏上的对勾完成凸轮的装配,如图12所示。

机械原理大作业--牛头刨床仿真分析(matlab)全自动版本

牛头刨床机构运动分析一、设计小组人员构成二、设计任务1、机构结构分析2、机构运动分析建立数学模型,解析法进行运动分析;程序编写;上机调试程序;位移、速度和加速度运动曲线图与分析;三、设计参数四、设计分工五、 设计内容如右图,建立直角坐标系,并标出各杆矢量及方位角。

利用两个封闭图形ABCA 及CDEGC ,由此可得:l 6⃑⃑⃑ +l 3⃑⃑⃑ =s 3⃑⃑⃑ , l 3⃑⃑⃑ +l 4⃑⃑⃑ =l 6′⃑⃑⃑ +S E ⃑⃑⃑⃑投影方程式为:s 3 cos θ3=l 1 cos θ1 s 3sin θ3=l 6+l 1sin θ1 l 3cos θ3+l 4cos θ4−s E =0l 3sin θ3+l 4sin θ4=l 6′有以上各式即可求得s 3 、θ3 、θ4 四个运动那个变量,二滑块2的方位角θ2=θ3。

然后,分别将上式对时间去一次、二次导数,并写成矩阵形式,即得以下速度和加速度方程式:[cos θ3−s 3sin θ3sin θ3s 3cos θ30 00 00 −l 3sin θ30l 3cos θ3−l 4sin θ4−1l 4cos θ40] [s 3ω3ω4v E ]=ω1[−l 1sin θ1l 1cos θ100][cos θ3−s 3sin θ3sin θ3s 3cos θ30 00 00 −l 3sin θ30l 3cos θ3−l 4sin θ4−1l 4cos θ40] [s 3α3α4αE ] =- [−ω3sin θ3 −s 3sin θ3−s 3ω3sin θ3ω3cos θ3 s 3cos θ3−s 3ω3sin θ30 00 00 −l 3ω3cos θ30 −l 3ω3sin θ3−l 4ω4cos θ4 0−l 4ω4sin θ4 0] [s 3ω3ω4v E ]+ ω1[−l 1ω1cos θ1−l 1ω1sin θ100]而ω2=ω3 、α2=α3 。

机械原理大作业牛头刨床 matlab编程

l4*sind(x(2))+x(1)*sind(x(3))-l1*sind(theta1)-h1;
l4*cosd(x(2))+l3*cosd(x(3))-x(4);
l4*sind(x(2))+l3*sind(x(3))-h];
主程序:
theta1=0:360;
s3=0:360;
theta3=0:360;
-omega3(i)*cosd(theta3(i)) l4*omega4(i)*sind(theta4(i)) -v3(i)*cosd(theta3(i))+s3(i)*omega3(i)*sind(theta3(i)) 0;
0 l4*omega4(i)*cosd(theta4(i)) l3*omega3(i)*cosd(theta3(i)) 0;
xlabel('{\theta}_1(^{ o })');
ylabel('s_c (mm)');
figure(5)
plot(theta1,vc,'k');
gridon;
xlabel('{\theta}_1(^{ o })');
ylabel('v_c (m/s)');
figure(6)
plot(theta1,ac,'k');
gridon;
xlabel('{\theta}_1(^{ o })');
ylabel('{\alpha}_3 {\alpha}_4 (r a d / s^2)');
legend('{\alpha}_3','{\alpha}_4');

adams 牛头刨床仿真

2013年1月10日牛头刨床刨刀Adams 运动仿真操作步骤:1>运行adams/view ,选择create a new model ,确认gravity为earth nomal(-global Y),units为MMKS.2>设置working grid…,根据仿真模型尺寸,设置参数如图所示3> 在住工具箱中选择定义点工具,在窗口中根据牛头刨床尺寸建立标记点,分别为point1、point2、point3,其中point1与point2之间的距离为275mm(设置网格大小为25mm,point1与point2之间11个网格),point1与point3之间的距离为125mm(point1与point3之间的网格数目为5个)4> 在主工具箱中选择几何建模工具,设置参数NEW PART,设置length为125mm,width为25mm,depth为10mm,鼠标分别点击point1、point2建立曲柄L1,设置length为600mm,width为25mm,depth为10mm,鼠标分别点击point2、point3,建立和摇杆L2。

5> 按照上述同样的步骤,根据刨刀位置建立point4(point4与point1之间的距离为300mm),和box1(作为刨刀固定架架)。

6> 建立point5(point5为box1的中点位置)、point6(point6为L3的终点位置)、和L37> 利用工具,为point 1、point2、point3、point5、point6 添加转动副约束,其中point 1、point2选择location;point3、point5、point6选择2 body-loc。

8> 在point 3 处利用和工具添加运动滑块9> 利用工具在刨刀架和ground、L2和滑块之间建立移动副,利用在L1和滑块之间建立转动副10> 利用工具,在point1处,将L1添加为源动件,speed设置为360。

(完整word版)牛头刨床运动仿真matlab程序

附录牛头刨床主运动机构MATLAB程序由主程序six_bar_main 和子函数six_bar两部分组成。

1。

主程序six_bar_main文件%1.输入已知数据clear;l1=0.125;l3=0。

600;l4=0。

150;l6=0.275;l61=0.575;omega1=1;alpha1=0;hd=pi/180;du=180/pi;%2。

调用子函数six_bar计算牛头刨床机构位移,角速度,角加速度for n1=1:459;theta1(n1)=—2*pi+5。

8199+(n1—1)*hd;ll=[l1,l3,l4,l6,l61];[theta,omega,alpha]=six_bar(theta1(n1),omega1,alpha1,ll);s3(n1)=theta(1);theta3(n1)=theta(2);theta4(n1)=theta(3);sE(n1)=theta(4);v2(n1)=omega(1);omega3(n1)=omega(2);omega4(n1)=omega(3);vE(n1)=omega(4);a2(n1)=alpha(1);alpha3(n1)=alpha(2);alpha4(n1)=alpha(3);aE(n1)=alpha(4);end%3.位移、角速度、角加速度、和牛头刨床图形输出figure(3);n1=1:459;t=(n1-1)*2*pi/360;subplot(2,2,1);%绘角位移及位移线图plot(t,theta3*du,’r-。

’);grid on;hold on;axis auto;[haxes,hline1,hline2]=plotyy(t,theta4*du,t,sE);grid on;hold on;xlabel(’时间/s')axes(haxes(1));ylabel('角位移/\circ’)axes(haxes(2));ylabel(’位移/m’)hold on;grid on;text(1。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

附录牛头刨床主运动机构MATLAB程序由主程序six」six_bar 两部分组成。

1.主程序six_bar_main文件%1.输入已知数据clear;11=0.125;13=0.600;14=0.150;16=0.275;161=0.575;omega1=1;alpha 仁0;hd=pi/180;du=180/pi;%2.调用子函数six_bar计算牛头刨床机构位移,角速度, for n1=1:459;theta1( n1)=-2*pi+5.8199+( n1-1)*hd; _main 和子函数角加速度II=[I1,I3,I4,I6,I61];[theta,omega,alpha]=six_bar(theta1( n1),omega1,alpha1,ll);s3( n1)=theta(1);theta3( n1)=theta(2);theta4( n1)=theta(3);sE( n1)=theta(4);v2( n1)=omega(1);omega3( n1)=omega(2);omega4 (n 1)=omega(3);vE( n1)=omega(4);a2( n1)=alpha(1);alpha3( n1)=alpha(2);alpha4( n1)=alpha(3);aE( n1)=alpha(4);end%3.位移、角速度、角加速度、和牛头刨床图形输出figure©);n1=1:459;t=( n1-1)*2*pi/360;subplot(2,2,1); %绘角位移及位移线图plot(t,theta3*du,'r-.');grid on;axis auto;[haxes,hli ne1,hli ne2]=plotyy(t,theta4*du,t,sE); grid on;hold on;xlabel('时间/s')axes(haxes(1));ylabel('角位移八circ')axes(haxes(2));ylabel('位移/m')hold on;grid on;text(1.15,-0.15,'\theta_3')text(3.40,0.27,'\theta_4')text(2.25,-0.15,'s_E')subplot(2,2,2); %绘角速度及速度线图plot(t,omega3,'r-.');grid on;hold on;[haxes,hli ne1,hli ne2]=plotyy(t,omega4,t,vE);grid on;hold on;xlabel('时间/s')axes(haxes(1));ylabel('角速度/rad\cdots A{-1}')axes(haxes(2));ylabel('速度/m\cdotsA{-1}')hold on;grid on;text(3.1,0.35,'\omega_3')text(2.1,0.1,'\omega_4')text(5.5,0.45,'v_E')subplot(2,2,3); %绘角加速度及加速度线图plot(t,alpha3,'r-.');grid on;hold on;axis auto;[haxes,hli ne1,hli ne2]=plotyy(t,alpha4,t,aE); grid on; hold on;xlabel('时间/s')axes(haxes(1));ylabel('角加速度/rad\cdots A{-2}')axes(haxes(2));ylabel('加速度/m\cdotsA{-2}')hold on;grid on;text(1.5,0.3,'\alpha_3')text(3.5,0.51,'\alpha_4')text(1.5,-0.11,'a_E')subplot(2,2,4); %牛头刨床机构n1=20;x(1)=0;y(i)=0;x(2)=(s3( n1)*1000-50)*cos(theta3( n1));y(2)=(s3( n1)*1000-50)*si n(theta3( n1));x(3)=0;y(3)=16*1000;x(4)=l1*1000*cos(theta1( n1));y⑷=s3( n1)*1000*si n(theta3( n1));x(5)=(s3( n1)*1000+50)*cos(theta3( n1));y(5)=(s3( n1)*1000+50)*si n(theta3( n1));x(6)=13*1000*cos(theta3( n1));y(6)=13*1000*si n(theta3( n1));x(7)=13*1000*cos(theta3( n1))+14*1000*cos(theta4( n1));y(7)=13*1000*si n(theta3( n1))+14*1000*si n(theta4( n1));x(8)=13*1000*cos(theta3( n1))+14*1000*cos(theta4( n1))-900;y(8)=161*1000;x(9)=13*1000*cos(theta3( n1))+14*1000*cos(theta4( n1))+600;y(9)=161*1000;x(10)=(s3( n1)*1000-50)*cos(theta3( n1));y(10)=(s3( n1)*1000-50)*si n(theta3( n1));x(11)=x(10)+25*cos(pi/2-theta3( n1));y(11)=y(10)-25*si n(pi/2-theta3( n1));x(12)=x(11)+100*cos(theta3( n1));y(12)=y(11)+100*si n(theta3( n1));x(13)=x(12)-50*cos(pi/2-theta3( n1));y(13)=y(12)+50*si n(pi/2-theta3( n1)); x(14)=x(10)-25*cos(pi/2-theta3( n1)); y(14)=y(10)+25*si n(pi/2-theta3( n1)); x(15)=x(10); y(15)=y(10);x(16)=0;y(16)=0;x(17)=0;y(17)=16*1000;k=1:2;plot(x(k),y(k));hold on;k=3:4;plot(x(k),y(k));hold on;k=5:9;plot(x(k),y(k));hold on;k=10:15;plot(x(k),y(k));hold on;k=16:17;plot(x(k),y(k));hold on;grid on;axis([-500 600 0 650]); title('牛头刨床运动仿真'); grid on;xlabel('mm')ylabel('mm') plot(x(1),y(1),'o'); plot(x (3),y (3) ,'o'); plot(x(4),y(4),'o'); plot(x(6),y(6),'o');plot(x ⑺,y(7),'o');hold on;grid on;xlabel('mm')ylabel('mm')axis([-400 600 0 650]);%4牛头刨床机构运动仿真figure(2)m=movie in( 20);j=0;for n仁1:5:360j=j+1;elf;x(1)=0;y(i)=0;x(2)=(s3( n1)*1000-50)*cos(theta3( n1));y(2)=(s3( n1)*1000-50)*si n(theta3( n1));x(3)=0;y(3)=l6*1000x⑷=l1*1000*cos(theta1( n1));y⑷=s3( n1)*1000*si n(theta3( n1));x(5)=(s3( n1)*1000+50)*cos(theta3( n1));y(5)=(s3( n1)*1000+50)*si n(theta3( n1));x(6)=l3*1000*cos(theta3( n1));y(6)=l3*1000*si n(theta3( n1));x(7)=l3*1000*cos(theta3( n1))+l4*1000*cos(theta4( n1));x(7)=l3*1000*cos(theta3( n1))+l4*1000*cos(theta4( n1)); y(7)=l3*1000*si n(theta3( n1))+l4*1000*si n(theta4( n1));x(8)=l3*1000*cos(theta3( n1))+l4*1000*cos(theta4( n1))-900;y(8)=l61*1000;x(9)=l3*1000*cos(theta3( n1))+l4*1000*cos(theta4( n1))+600;y(9)=l61*1000;x(10)=(s3( n1)*1000-50)*cos(theta3( n1));y(10)=(s3( n1)*1000-50)*si n(theta3( n1));x(11)=x(10)+25*cos(pi/2-theta3( n1));y(11)=y(10)-25*si n(pi/2-theta3( n1));x(12)=x(11)+100*cos(theta3( n1));y(12)=y(11)+100*si n(theta3( n1));x(13)=x(12)-50*cos(pi/2-theta3( n1)); y(13)=y(12)+50*si n(pi/2-theta3( n1)); x(14)=x(10)-25*cos(pi/2-theta3( n1)); y(14)=y(10)+25*si n(pi/2-theta3( n1)); x(15)=x(10);y(15)=y(10);x(16)=0;y(16)=0;x(17)=0;y(17)=l6*1000;k=1:2;plot(x(k),y(k));hold on;k=3:4plot(x(k),y(k));hold on;k=5:9;plot(x(k),y(k));hold on;k=10:15;plot(x(k),y(k));hold on;k=16:17;plot(x(k),y(k));hold on;grid on;axis([-500 600 0 650]);title('牛头刨床运动仿真'); grid on; xlabel('mm');ylabel('mm');plot(x(1),y(1),'o');plot(x (3),y (3) ,'o');plot(x(4),y(4),'o');plot(x(6),y(6),'o');plot(x ⑺,y(7),'o');axis equal;m(j)=getframe;endmovie(m)2.子函数six_bar文件fun ctio n[theta,omega,alpha]=six_bar(theta1,omega1,alpha1,ll)11=11(1);l3=ll(2);14=11(3);16=11(4);161=11(5);%1计算角位移和线位移s3=sqrt((l1*cos(theta1))*(l1*cos(theta1))+(l6+l1*si n(theta1))*(l6+l1*si n(t heta1)));theta3=acos((l1*cos(theta1))/s3);theta4=pi-asi n((l61-l3*si n(theta3))/l4);sE=l3*cos(theta3)+l4*cos(theta4);theta(1)=s3;theta(2)=theta3;theta(3)=theta4;theta (4)=sE;%2计算角速度和线速度A=[s in (theta3),s3*cos(theta3),0,0; -cos(theta3),s3*s in (theta3),0,0;0,l3*si n(theta3),l4*(theta4),1;0,l3*cos(theta3),l4*cos(theta4),0];%3计算角加速度和加速度A=[s in (theta3),s3*cos(theta3),0,0; % 从动件位置参数矩阵 cos(theta3),-s3*s in (theta3),0,0;0,l3*si n( theta3),l4*(theta4),1;0,l3*cos(theta3),l4*cos(theta4),0];At=[omega3*cos(theta3),(v2*cos(theta3)-s3*omega3*si n(theta3)),0,0; -omega3*si n( theta3),(-v2*si n(theta3)-s3*omega3*cos(theta3)),0,0; 0,l3*omega3*cos(theta3),l4*omega4*cos(theta4),0;0,-l3*omega3*si n(theta3),-l4*omega4*si n( theta4),0];Bt=[-l1*omega1*si n(theta1);-l1*omega1*cos(theta1);0;0];%从动件位置参数矩阵 B=[l1*cos(theta1);l1*si n(theta1);0;0]% omega=A\(omega1*B);v2=omega(1);omega3=omega(2); omega4=omega(3); vE=omega(4)原动件位置参数矩阵 %滑块2的速度 %构件3的角速度 %构件4的角速度 构件的速度alpha=A\(-At*omega+omega1*Bt); a2=alpha(1);alpha3=alpha (2);alpha4=alpha (3);aE=alpha(4);%机构从动件的加速度矩阵%a2表示滑块2的加速度%alpha3表示杆件3的角加速度%alpha4表示杆件4的角加速度%构件5的加速度。

相关文档
最新文档