吳廣益,于光忠
(德州職業技術學院,山東 德州 253034)
牛頭刨床是機械制造企業常用的金屬加工機床之一,主要用于平面和溝槽加工,其主切削運動機構由擺動導桿機構和導桿滑塊機構組成,各構件運動過程中的位置、速度和加速度對刀具切削工件時的加工效率和平穩性有著非常大的影響。本文采用矢量法構建機構獨立位置方程并對其進行分析,借助MATLAB軟件計算出滑塊的線位移和各桿件的角位移,并最終得到牛頭刨床主運動機構的動畫,解決了利用力學分析和手工繪圖精度差、效率慢、不容易理解的問題。
牛頭刨床主切削運動機構的運動簡圖如圖1所示。
圖1 牛頭刨床主切削運動機構運動簡圖
該機構的輸入運動為構件1以角速度ω1作勻速轉動,輸出運動有滑塊2的平面運動、導桿3的擺動、連桿4的平面運動和桿件5的移動。為了對該機構進行運動分析,需要在圖1所示的直角坐標系中將各構件表示為桿矢,并將每個矢量向x和y軸方向做投影得出運動方程[1,2]。
首先由桿矢CA(桿長為l6)、桿矢AB(桿長為l1)和桿矢CB(桿長為s3)畫出如圖2所示的封閉矢量三角形,列出其矢量方程:
l6+l1=s3.
(1)
將式(1)向x和y軸作投影可得:
(2)
解方程得:
(3)
圖2 CABC矢量封閉圖形
(4)
將式(4)向x和y軸作投影:
(5)
解方程得:
(6)
圖3 CDEGC矢量封閉圖形
%1.輸入已知數據
clear;
l1=0.110;
l3=0.535;
l4=0.134;
l6=0.380;
l61=0.524;
omega1=1;
hd=pi/180;
du=180/pi;
%2.調用子函數ntbc4計算牛頭刨床主切削運動機構的位移(或角位移)
for n1=1:459
theta1(n1)=-2*pi+5.8119+(n1-1)*hd;
ll=[l1,l3,l4,l6,l61];
[theta]=ntbc4(theta1(n1),ll);
s3(n1)=theta(1); %s3表示滑塊2相對于導桿CD的線位移
theta3(n1)=theta(2);%theta3表示導桿3的角位移
theta4(n1)=theta(3);%theta4表示連桿4的角位移
sE(n1)=theta(4); %sE表示桿5的線位移
end
%3.牛頭刨床主切削運動機構仿真動畫
figure(1);
m=moviein(20);
j=0;
for n1=1:5:360
j=j+1;
clf;
x(1)=0;y(1)=0;
x(2)=(s3(n1)*1000-50)*cos(theta3(n1));
y(2)=(s3(n1)*1000-50)*sin(theta3(n1));
x(3)=0;y(3)=l6*1000;
x(4)=l1*1000*cos(theta1(n1));
y(4)=s3(n1)*1000*sin(theta3(n1));
x(5)=(s3(n1)*1000+50)*cos(theta3(n1));
y(5)=(s3(n1)*1000+50)*sin(theta3(n1));
x(6)=l3*1000*cos(theta3(n1));
y(6)=l3*1000*sin(theta3(n1));
x(7)=l3*1000*cos(theta3(n1))+l4*1000*cos(theta4(n1));
y(7)=l3*1000*sin(theta3(n1))+l4*1000*sin(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)*sin(theta3(n1));
x(11)=x(10)+25*cos(pi/2-theta3(n1));
y(11)=y(10)-25*sin(pi/2-theta3(n1));
x(12)=x(11)+100*cos(theta3(n1));
y(12)=y(11)+100*sin(theta3(n1));
x(13)=x(12)-50*cos(pi/2-theta3(n1));
y(13)=y(12)+50*sin(pi/2-theta3(n1));
x(14)=x(10)-25*cos(pi/2-theta3(n1));
y(14)=y(10)+25*sin(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: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(7),y(7),'o');
hold on;
grid on;
xlabel('mm');
ylabel('mm');
axis([-400 600 0 650]);
m(j)=getframe;
end;
movie(m);
function[theta]=ntbc4(theta1,ll)[4]
l1=ll(1);
l3=ll(2);
l4=ll(3);
l6=ll(4);
l61=ll(5);
%4.計算線位移和角位移
s3=sqrt((l1*cos(theta1))*(l1*cos(theta1))+(l6+l1*sin(theta1))*(l6+l1*sin(theta1)));
theta3=acos((l1*cos(theta1))/s3);
theta4=pi-asin((l61-l3*sin(theta3))/l4);
sE=l3*cos(theta3)+l4*cos(theta4);
theta(1)=s3;
theta(2)=theta3;
theta(3)=theta4;
theta(4)=sE;
end
將編寫的各部分MATLAB程序錄入到MATLAB R2016b應用程序中,編譯通過后執行文件,最終得到牛頭刨床主切削運動機構的仿真動畫,仿真動畫結束后的圖形如圖4所示。
圖4 牛頭刨床主切削運動機構圖形
本文根據牛頭刨床主切削運動機構的運動簡圖,運用矢量解析法建立運動方程,并求解出滑塊2、構件5的線位移和導桿3、連桿4的角位移,結合MATLAB編程對其進行運動仿真,形象直觀地展現出各構件的運動過程,為牛頭刨床主切削運動機構的創新設計和運動分析奠定了基礎。