11/9/06

行星齒輪組之計算

為計算不同組合之行星齒輪組(參考機動學圖10.22),利用planetary()程式可以直接解各模組之關係,其呼叫格式如下:

function [WF,WA,WL,RV]=planetary(wf,wa,wl,gearset,mode)

其中之參數:

wf, WF:第一輸入軸之角速度,ωF(rad/s)。
wl, WL:最後齒輪軸之角速度,ωL(rad/s)。
wa, WA:旋轉臂之角速度,ωA(rad/s)。
gearset:齒輪之齒數組合(由第二個齒輪算起),列矩陣。
mode: 行星齒輪組之型式代碼(1~12, 參考圖10.22)。


執行上項函式時,輸入wf, wa, wl三個參數中,可容許一個為未知,其未知參數可用[]取代,但不能用0,因為0將認為該軸靜止不動或固定。若不知各組之齒輪數目及搭配之尺寸,則可設gearset=[],程式會自動產生一個例子,可以代入執行。然後再設法修正。程式會自檢測所輸入之組合齒數是否適當,讀者可以自行檢驗。

程式內容:



function [WF,WA,WL,RV]=planetary(wf,wa,wl,gearset,mode)
%Program for section 10.6 to solve Levai's models
% Find angular velocities of sun,arm and planetary
% Variables:
% wf,WF:angular vel. for the 1st input shaft
% wl,WL:angular vel. for the last input shaft
% wa,WA:anbular vel. for the arm shaft.
% gearset:no of gear tooth in row matrix [n1 n2,..]
% mode:types of gear set (1~12, as in Fig. 9.22)
%Note:one of wf, wl & wa can be unknown and replaced by [].
% if leave gearset in [], the program will respond
% an example that matches the specific mode.
% Example:[WF,WA,WL,RV]=planetary(60,1,[],[18 30 28 20],7)
% Designed by D. S. Fon, Bime of NTU, dated March 8,2003
% Revised: March 9, 2006
% preset signs for each set
sinx=[-1 +1 -1 +1 -1 -1 +1 +1 -1 +1 -1 +1];
example={'[15 45 105]','[18 15 12 72]','[30 15 12 18 54]',...
'[30 15 20 20 105]','[80 15 12 30 137]','[40 15 20 75]'...
,'[80 20 40 60]','[100 30 50 120]','[80 15 12 18 12 107]'...
,'[60 30 15 30 15 150]','[40 20 12 20 40 52]',...
'[60 30 12 30 162]'};
WA=0;WF=0;WL=0;RV=0;
gearmin=12;
mode(mode>12)=12;
if isempty(gearset)
disp('Example: ')
example(mode)
return
end
gearset=[mode gearset];
[code,ge]=examset(mode,gearset,gearmin);
switch code
case 2
disp('The last gear size has been modified.')
ge(2:end)
case 3
disp('Error occurs in size matching')
return
end

% set up the no of gears required in the mode.
switch mode
case 1, rv=ge(4)/ge(2)*sinx(1);
case 2, rv=ge(5)/ge(2)*sinx(2);
case 3, rv=ge(4)/ge(2)*ge(6)/ge(5)*sinx(3);
case {4,5}, rv=ge(3)/ge(2)*ge(6)/ge(4)*sinx(mode);
case {6,7,8},rv= ge(3)/ge(2)*ge(5)/ge(4)*sinx(mode);
case {9,10,11},rv= ge(3)/ge(2)*ge(5)/ge(4)*ge(7)/ge(6)*sinx(mode);
otherwise
rv= ge(4)/ge(2)*ge(6)/ge(5)*sinx(mode);
end
if isempty(wa), wa=(rv*wl-wf)/(rv-1);
elseif isempty(wf), wf=rv*(wl-wa)+wa;
else wl=1/rv*(wf-wa)+wa;
end
WA=wa;WF=wf;WL=wl;RV=rv;

function [code,ge]=examset(mode,gearset,gemin)
% Check the proper gear set imported
% set up the no of gears required for a mode.
max_item_no=[4 5 6 6 6 5 5 5 7 7 7 6];
code=1;
%Forcing the minimum required teeth in a gear.
gearset(gearset<gemin)=gemin;
itemmax=max_item_no(mode);
item_no=length(gearset);
if itemmax>item_no,
gearset=[gearset ones(1,12)*12];
gearset=gearset(1:item_no);
end
ge=abs(gearset);
switch mode
case 1, gtmp=ge(2)+2*ge(3);
case 2, gtmp=ge(2)+2*ge(3)+2*ge(4);
case 3, gtmp=ge(2)+2*ge(3)+ge(4)-ge(5);
case 4, gtmp=ge(2)+ge(3)+ge(4)+2*ge(5);
case 5, gtmp=ge(2)-ge(3)+ge(4)+2*ge(5);
case 6, gtmp=ge(2)+ge(3)+ge(4);
case 7, gtmp=ge(2)+ge(3)-ge(4);
case 8, gtmp=ge(2)-ge(3)+ge(4);
case 9, gtmp=ge(2)-ge(3)+ge(4)+ge(5)+ge(6);
case 10, gtmp=ge(2)+ge(3)+ge(4)+ge(5)+ge(6);
case 11, gtmp=ge(2)+ge(3)+ge(4)+ge(5)-ge(6);
case 12, gtmp=ge(2)+2*ge(3)+ge(4)+ge(5);
end
if ge(itemmax)~=gtmp,
ge(itemmax)=gtmp;
code=2;
end
if mode==5|mode==8|mode==9,
if ge(2)<ge(3), code=3;end
end

執行例一:


使用其內部設定之範例,設定mode=3。

>> [WF,WA,WL,RV]=planetary(60,1,[],[],3)
Example:
ans =
'[30 15 12 18 54]'
WF =
0
WA =
0
WL =
0
RV =
0


再將上值代入,執行結果:

>> [WF,WA,WL,RV]=planetary(60,1,[],[30 15 12 18 54],3)
WF =
60
WA =
1
WL =
-48.1667
RV =
-1.2000


執行例二:


如圖10.14及範例10.6所述之型式如圖10.22之第一型,其中N2=15,N3=45,N4=105。若N4內齒輪固定,旋臂(連結N3齒)每轉一圈(即ωA=1),則執行下列指令並得結果如下:

>> [WF,WA,WL,RV]=planetary([],1,0,[15 45 105],1)

WF = 8
WA = 1
WL = 0
RV = -7


執行例三:


如圖10.15及範例10.8設其旋轉臂轉速ωA為1 rad/s,而N2=A20=20,N3=B60=60,N4=D40=40,N5=E120=120,N6=C140=140。由圖10.15可知,本齒輪可由圖10.22中之第一型與第六型綜合。故開始時可利用第一型先求出輸入軸A對應旋轉臂之轉速,然後依第六型求得齒輪E之轉速。即


>> [WF,WA,WL,RV]=planetary([],1,0,[20 60 140],1)
WF = 8
WA = 1
WL = 0
RV = -7


由其結果得到ω2=8 rad/s。其次依第六型求輸出軸E如下:

>> [WF,WA,FL,rv]=planetary(WF,1,[],[20 60 40 120],6)
WF = 8
WA = 1
WL = 0.22222
RV = -9
由其結果得到ωE=0.22222 rad/s。其中WF為利用上式所得的結果。

No comments:

Post a Comment