• /  8
  • 下載費用: 19.90積分  

齒輪范成程序MATLAB代碼.doc

'齒輪范成程序MATLAB代碼.doc'
?本人經過一個月的努力,寫出了以下齒輪展成程序,是matlab格式的。只要按照附圖的標注定義出滾刀刀齒的形狀,指定程序模擬的精度,就可以模擬出滾刀滾切齒輪的圖形.下圖為程序中定義刀具的尺寸示意圖以下為源程序%shape of hob%input areacls;alpha=deg2rad(21); %壓力角alphaf=deg2rad(31); %齒頂倒角壓力角W0=1.85; %節圓半齒寬H=6; %全齒高ha0=3; %齒頂高hf0=1.44; %齒根倒角起點高度H1=0.064; %觸角厚度hc=1.3; %觸角高度ht=0.65; %觸角凸部的高度rc=0.6; %齒頂圓角半徑R=30; %工件分度圓半徑P=7.54; %刀具齒距N=2; %刀齒數amount=10; %每段線上取點的個數step=100; %計算步數range=[-pi*0.15,pi*0.15];%計算范圍%location of key-point yr=ha0-rc; %齒頂圓角圓心xr=W0+(H1-rc)/cos(alpha)-yr*tan(alpha);point=zeros(6,2);point(1,2)=ha0;point(1,1)=xr;point(2,2)=ha0-rc*(1-sin(alpha));point(2,1)=xr+rc*cos(alpha);point(3,2)=ha0-ht;point(3,1)=(W0+H1/cos(alpha))-(ha0-ht)./cot(alpha);point(4,2)=ha0-hc;point(4,1)=W0-point(4,2)*tan(alpha);point(5,2)=-hf0;point(5,1)=W0-tan(alpha)*point(5,2);point(6,2)=ha0-H;point(6,1)=point(5,1)-tan(alphaf)*(point(6,2)-point(5,2));%-------------直線部分-------------theta=linspace(range(1),range(2),step);w11=linspace(point(4,1),point(5,1),amount)';h11=linspace(point(4,2),point(5,2),amount)';w12=repmat(w11,1,step);h12=repmat(h11,1,step);theta2=repmat(theta,amount,1);x12=(h12-R).*sin(theta2)+(R.*theta2-w12).*cos(theta2);y12=(R.*theta2-w12).*sin(theta2)+(R-h12).*cos(theta2);theta13=(w11-h11/tan(alpha))/R;x13=sin(theta13).*(h11-R)+cos(theta13).*(R.*theta13-w11);y13=sin(theta13).*(R*theta13-w11)+cos(theta13).*(R-h11);%-----------圓角部分--------gama=linspace(pi/2,alpha,amount);w21=(xr+rc.*cos(gama))';h21=(yr+rc.*sin(gama))';w22=repmat(w21,1,step);h22=repmat(h21,1,step);x22=(h22-R).*sin(theta2)+(R.*theta2-w22).*cos(theta2);y22=(R.*theta2-w22).*sin(theta2)+(R-h22).*cos(theta2);theta23=((xr-yr.*cot(gama))/R)';x23=sin(theta23).*(h21-R)+cos(theta23).*(R.*theta23-w21);y23=sin(theta23).*(R*theta23-w21)+cos(theta23).*(R-h21);rmin=R;for i=1:(length(x23)-2)[XX,YY,RR]=threepointcircle(x23(i),y23(i),x23(i+1),y23(i+1),x23(i+2),y23(i+2));if RR<rmin rmin=RR;endend%---------凸角部分------------------w31=linspace(point(2,1),point(3,1),amount)';h31=linspace(point(2,2),point(3,2),amount)';w32=repmat(w31,1,step);h32=repmat(h31,1,step);theta2=repmat(theta,amount,1);x32=(h32-R).*sin(theta2)+(R.*theta2-w32).*cos(theta2);y32=(R.*theta2-w32).*sin(theta2)+(R-h32).*cos(theta2);theta33=(w31-h31/tan(alpha))/R;x33=sin(theta33).*(h31-R)+cos(theta33).*(R.*theta33-w31);y33=sin(theta33).*(R*theta33-w31)+cos(theta33).*(R-h31);%-------連接部分---------------alpha2=atan(point(4,1)-point(3,1))/(point(3,2)-point(4,2));w41=linspace(point(3,1),point(4,1),amount)';h41=linspace(point(3,2),point(4,2),amount)';w42=repmat(w41,1,step);h42=repmat(h41,1,step);theta2=repmat(theta,amount,1);x42=(h42-R).*sin(theta2)+(R.*theta2-w42).*cos(theta2);y42=(R.*theta2-w42).*sin(theta2)+(R-h42).*cos(theta2);theta43=(w41-h41/tan(alpha2))/R;x43=sin(theta43).*(h41-R)+cos(theta43).*(R.*theta43-w41);y43=sin(theta43).*(R*theta43-w41)+cos(theta43).*(R-h41);%-------倒角部分---------------alpha3=atan(point(6,1)-point(5,1))/(point(5,2)-point(6,2));w51=linspace(point(5,1),point(6,1),amount)';h51=linspace(point(5,2),point(6,2),amount)';w52=repmat(w51,1,step);h52=repmat(h51,1,step);theta2=repmat(theta,amount,1);x52=(h52-R).*sin(theta2)+(R.*theta2-w52).*cos(theta2);y52=(R.*theta2-w52).*sin(theta2)+(R-h52).*cos(theta2);theta53=(w51-h51/tan(alpha3))/R;x53=sin(theta53).*(h51-R)+cos(theta53).*(R.*theta53-w51);y53=sin(theta53).*(R*theta53-w51)+cos(theta53).*(R-h51);%----------全刀齒-----------w6=[w21;w31;w41;w11;w51];h6=[h21;h31;h41;h11;h51];w6=flipud(w6);h6=flipud(h6);w6=[w6;-flipud(w6)];h6=[h6;flipud(h6)];w62=w6;h62=h6;for i=2:N w62=[w6+(i-1)*P;w62]; h62=[h6;h62];endtheta6=repmat(theta,5*amount*2*N,1);w62=repmat(w62,1,step);h62=repmat(h62,1,step);x62=(h62-R).*sin(theta6)+(R.*theta6-w62).*cos(theta6);y62=(R.*theta6-w62).*sin(theta6)+(R-h62).*cos(theta6);%---------------------figure;plot(x12,y12);hold on;grid on;axis equal;plot(x22,y22);plot(x32,y32);plot(x42,y42);plot(x52,y52);figure;plot(x12',y12');hold on;grid on;axis equal;plot(x22',y22');plot(x32',y32');plot(x42',y42');plot(x52',y52');figure;plot(x13,y13);hold on;grid on;axis equal;plot(x23,y23,'o');plot(x33,y33,'*');plot(x43,y43,'.');plot(x53,y53,'+');figureplot(x12',y12');hold on;grid on;axis equal;plot(x22',y22');plot(x32',y32');plot(x42',y42');plot(x52',y52');plot(x13,y13,'*');plot(x23,y23,'*');plot(x33,y33,'*');plot(x43,y43,'*');plot(x53,y53,'*');figureplot(w62,h62);hold on;grid on;axis equal;figureplot(x62,y62);hold on;grid on;axis equal;以下為角度轉化為弧度的子程序function rad=deg2rad(deg)rad=deg./180.*pi;以下為計算最小圓弧半徑的子程序function [x,y,r]=threepointcircle(x1,y1,x2,y2,x3,y3)k12=(x2-x1)/(y1-y2);k23=(x3-x2)/(y2-y3);x=((y2+y3-y1-y2)/2+k12*(x1+x2)/2-k23*(x2+x3)/2)/(k12-k23);y=k12*(x-(x1+x2)/2)+(y1+y2)/2;r=((x-x1)^2+(y-y1)^2)^0.5;以下為程序運行輸出的圖形1, 一個刀刃的展成過程2, 一個刀刃上各個點的運動軌跡3,刀刃上各段切削刃分別所展成的齒形段4,兩圖合二為一5,刀齒的形狀6,多個刀齒展成的情形7,將6圖放大觀察,也許是漸開線起始點的位置吧以上就是程序代碼及輸出的結果歡迎批評指正分享經驗,交流心得,共同進步有意交流的+Q 并說明來意 李某人2013/6/30于重慶璧山
關 鍵 詞:
matlab 代碼 程序 齒輪
 天天文庫所有資源均是用戶自行上傳分享,僅供網友學習交流,未經上傳用戶書面授權,請勿作他用。
關于本文
本文標題:齒輪范成程序MATLAB代碼.doc
鏈接地址: http://www.094347.live/p-55539506.html
關于我們 - 網站聲明 - 網站地圖 - 資源地圖 - 友情鏈接 - 網站客服點擊這里,給天天文庫發消息,QQ:1290478887 - 聯系我們

本站為“文檔C2C交易模式”,即用戶上傳的文檔直接賣給(下載)用戶,本站只是中間服務平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有【成交的100%(原創)】。本站是網絡服務平臺方,若您的權利被侵害,侵權客服QQ:1290478887 歡迎舉報。

[email protected] 2017-2027 http://www.094347.live 網站版權所有

粵ICP備19057495號 

收起
展開
有没有苹果软件赚钱的 甘肃11选5推荐号码购买 516棋牌游戏中心 澳洲快乐8开奖官网 内蒙11选五前3和值走势图 四川金7乐跨度走势图 浙江6+1开奖结果查询果 时时彩软件分享 甘肃快三推荐豹子 下载北京pk拾赛车官网 浙江6 1走势图