11/9/06

謝福吉(Selfridge)法

由於齒數需為整數,其最大及最小齒數為Nmax、Nmin,其關係如下:

Nmin=ceil(N2N4VRlow)≤N3N5≤fix(N2N4VRhigh)=Nmax

式中,函數CEIL()表示將取接近數值之高整數;而函數FIX()則取接近數值之低整數。

利用電腦重複測試之能力可以找出合適之齒數,使其值落於Nmax與Nmin之間。
其MATLAB程式函數two_stage_trains()如下:

function [result,counter]=two_stage_trains(rv,nmin,nmax,epx)

此程式處理兩組合齒輪組。輸入參數為:

rv:速度比。
nmin:最低齒數限。
nmax:最高齒數限。
epx:容許誤差。


輸出則為RESULT及counter。前者包括齒輪2及3之齒數,該組之轉速比;齒輪4及5之齒數,該組之轉速比;總轉速比及誤差。counter為計數實際無法達成之次數,程式中每連續試一次無法達到原設定之容許誤差時,誤差值會自動加倍,直到得到較滿意的答案為止。

程式內容

程式10.2

function [RESULT,counter]=two_stage_trains(rv,nmin,nmax,epx)
%
%prog 10.2
% Find the grear teeth for the set of coaxil gear trains
% rv: velocity ratio
% nmax,nmin:max.& min. number of teeths can be used for gears
% epx: error
% RESULT:a row matrix of eight elements, including
% N2 N3 RV1 N4 N5 RV2 RV error
% Example:
% two_stage_trains(pi,15,100,3.1416e-5)
epsx=epx;
counter=0;
[' N2 N3 RV1 N4 N5 RV2 RV 誤差']
ok=1;
while ok,
ss=1;
rv_h=rv+epx; rv_l=rv-epx;
nh3=fix(nmax^2/rv_h);
nh4=fix(nmax/sqrt(rv_h));
for pin1=nmin:nh4
nhh=min(nmax,fix(nh3/pin1));
for pin2=pin1:nhh
tm=fix(pin1*pin2*rv_h);
tn=ceil(pin1*pin2*rv_l);
if tm>=tn
nm=max(nmin,fix((tn+nmax-1)/nmax));
np=sqrt(tm);
for k=tn:tm
for gear1=nm:np
if (mod(k,gear1))==0
gear2=k/gear1;
error=(rv-k/(pin1*pin2));
if error<=epx ratio1=gear1/pin1; ratio2=gear2/pin2; ratio=ratio1*ratio2; result(ss,:)=[pin1,gear1,ratio1,pin2,gear2,ratio2,ratio,abs(error)]; ss=ss+1; end end end end end end end if ss==1 epx=epx*2; counter=counter+1; else ok=0; end end RESULT=sortrows(result,8);


執行例:


設計一同軸複式齒例,其轉速比為π,最高齒數為100齒,最低為15齒,容許誤差為e-5π。執行two_stage_trains()函式,結果如下:


>> a=two_stage_trains(pi,15,100,3.1416e-5)
ans =
N2 N3 RV1 N4 N5 RV2 RV 誤差
a =
25 51 2.04 50 77 1.54 3.1416 7.3464e-006
29 88 3.0345 85 88 1.0353 3.1416 1.0503e-005
22 62 2.8182 61 68 1.1148 3.1416 1.2922e-005
33 68 2.0606 61 93 1.5246 3.1416 1.2922e-005
43 77 1.7907 57 100 1.7544 3.1416 1.7786e-005
28 85 3.0357 86 89 1.0349 3.1416 1.8642e-005
43 85 1.9767 56 89 1.5893 3.1416 1.8642e-005
23 75 3.2609 82 79 0.96341 3.1416 2.3194e-005
41 75 1.8293 46 79 1.7174 3.1416 2.3194e-005
17 54 3.1765 91 90 0.98901 3.1416 2.8336e-005
17 60 3.5294 91 81 0.89011 3.1416 2.8336e-005
16 63 3.9375 94 75 0.79787 3.1416 2.9687e-005
32 63 1.9688 47 75 1.5957 3.1416 2.9687e-005

經過排序之結果,誤差最小之組合為:

N2:N3=25:51, N4:N5=50:77。

No comments:

Post a Comment