2007年4月25日 星期三

第六次作業


P6.1



總桿數N=11+1(地面)+2*1(滑塊)=14

總結數J=6*(3-1)+3*1[連地結]+2*1[滑塊] =17

總連結度Σf=16*1+1*2[滑槽]=18



可動度M=3*(N-J-1)+Σf

=3*(14-17-1)+18

=6



>>[df] = gruebler(14,[16 0 1]);

df = 6



分析:

左邊的滑動結B可同時在桿軸2上移動且可對桿4轉動,視為連結度2的複式結。

而槽梢結H的部分,其運動結在滑槽中可同時做移動和旋轉,所以是連結度為2的複式結。

最後,右上角之滑塊E因為與地面接觸,視為一滑塊結,連結度為2,表示可同時作軸的旋轉及滑塊的移動,又因其與地面接觸,故總結數加1。





P6.2



由題目知:球結=3,筒結=2,旋轉結=1

總桿數N=7

總結數J=3+2+1=6

總連結度Σf=3*3+2*1+1*2=13



可動度M=3*(N-J-1)+Σf

=3*(7-6-1)+13

=13



>>[df] = gruebler(6,[2 0 0 3 1])

df = 13


分析:

由於球結的存在,旋轉方位產生共線之緣故,造成部分連桿會有自轉運動,因此減少一個自由度。

而本題中,球結與球結之間的聯結桿可以自轉,故具有一惰性自由度,所以可動度減為12。





function [df]=gruebler(nlink,jointype)

%

% [df]=gruebler(nlink,jointype)

% nlink:no. of total links

% jointype:row matrix for number of joints for each type,

% the order of elements is:

% 1 R-joint 2 slider 3 compound joint(sliding & rolling)

% 4 ball 5 cylinder 6 planar 7 cylinder rolling

% 8 cam 9 helix 10 ball & 11 point contact

% Example: df=gruebler(4,[4])

% Author:D.S.Fon Bime,NTU. Date:Jan. 30, 2007


code=[1 1 2 3 2 3 1 2 1 3 5];

n=length(jointype);

dim=3;if n>3, dim=6;end

;ff=0;njoint=0;

for i=1:n,

njoint=njoint+jointype(i);

ff=ff+jointype(i)*code(i);

end;

df=dim*(nlink-njoint-1)+ff;





P6.3



在一四連桿組中,若依其桿長可設定標示如下

.g最長桿之長度

.s最短桿之長度

.p,q中間長度桿之長度



(1) 葛拉索第一類型(葛拉索型機構)

當最短桿與最長桿之和小於其他兩桿之和

則至少有一桿可為旋轉桿

  s+g < p+q

(2) 葛拉索第二類型(非葛拉索型機構)

當最短桿與最長桿之和大於其他兩桿之和

則所有三個活動連桿必屬搖桿或稱參搖桿機構

  s+g  > p+q
(3) 葛拉索型之特殊狀況(或稱第三型)

  即最短桿與最長桿之和等於其他兩桿之和

s+g  = p+q





1.第一組:7+4 = 6+5(第三型)

>>ans = grashof(1,[4 5 6 7])

ans = Neutral Linkage



2.第二組:8+3.6 > 5.1+4.1(非葛拉索型)

>>ans = grashof(1,[3.6 4.1 5.1 8])

ans = Non-Grashof Linkage



3.第三組:6.6+3.1 < 5.4+4.7(葛拉索型)

>>ans = grashof(1,[3.1 4.7 5.4 6.6])

ans = Double-Crank Linkage



(葛拉索型)

.若鄰近最短桿之桿為基桿時,則此四連桿屬曲柄搖桿型。

.若最短桿為基桿時,則基桿兩端之連桿為雙曲柄型。此時輸入桿若為等轉速,

輸出雖然與輸入同方向,但其速率將會因角位移而產生變化。

.若與最短桿相對應之桿為基桿時,可以得到雙搖桿機構。



(非葛拉索型)

無論哪一桿作為基桿,此四連桿系均屬於雙搖桿型,因為任何桿均無法產生完整的迴轉運動。





若要將三組連桿皆改為葛拉索型,改變他們的長度以符合葛拉索機構之要求即可。





function ans=grashof(ground_no,linkage)

% Function to test the Grashof linkage

% Inputs:

% ground_no:the ground link number in the order

% linkage: row matrix for lengths of the 4 links

% in original assigned order.

% Example:ans=grashof(4,[4 4.2 2.6 2])

% Revised: March 4, 2006


ground=linkage(ground_no);

link=sort(linkage);% sorting the links

ig=find(linkage==link(1));

if link(1)+link(4)>link(3)+link(2),

ans='Non-Grashof Linkage';

elseif link(1)+link(4)==link(3)+link(2)

ans='Neutral Linkage';

elseif link(1)==ground,

ans='Double-Crank Linkage';

else

switch ig

case 1

im=3;

case 2

im=4;

case 3

im=1;

case 4

im=2;

end;

if ground==linkage(im)

ans='Double-Rocker Linkage';

else

ans='Crank-Rocker Linkage';

end;

end;

2007年4月10日 星期二

第五週作業

P5-1-1


L1=30;
L2=23;
L3=12;

r1=L1/6;
r2=L1/12;
r3=L2/10;

arm1x=[ r1 r1*cosd(240)+r1 r1*cosd(210)+r1 0 r1*cosd(150)+r1 r1*cosd(120)+r1 r1 11*r2 11*r2+r2*cosd(60) 11*r2+r2*cosd(30) L1 11*r2 L1 11*r2+r2*cosd(-30) 11*r2+r2*cosd(-60) 11*r2 r1];
arm1y=[-r1 r1*sind(240) r1*sind(210) 0 r1*sind(150) r1*sind(120) r1 r2 r2*sind(60) r2*sind(30) 0 0 0 r2*sind(-30) r2*sind(-60) -r2 -r1];
arm2x=[10*r2 11*r2+r2*cosd(150) 11*r2+r2*cosd(120) 11*r2 L1+L2-3*r2 L1+L2-3*r2+r2*cosd(60) L1+L2-3*r2+r2*cosd(30) L1+L2-2*r2 L1+L2-3*r2+r2*cosd(-30) L1+L2-3*r2+r2*cosd(-60) L1+L2-3*r2 11*r2 11*r2+r2*cosd(240) 11*r2+r2*cosd(210) 10*r2];
arm2y=[0 r2*sind(150) r2*sind(120) r2 r2 r2*sind(60) r2*sind(30) 0 r2*sind(-30) r2*sind(-60) -r2 -r2 r2*sind(240) r2*sind(210) 0 ];
palmx=[L1+L2-2*r2 L1+L2-r2 L1+L2+L3-2*r2 L1+L2-r2 L1+L2-2*r2];
palmy=[0 r3 0 -r3 0 ];

line(arm1x,arm1y);
line(arm2x,arm2y,'color','r');
line(palmx,palmy,'color','k');
axis equal;






P5-1-2


function body(L1,L2,L3,theta1,theta2,theta3);
%function body(L1,L2,L3,theta1,theta2,theta3)
%輸入:
% L1:上臂長,L2:下臂長,L3:手掌長
% theta1為上手臂之水平角度(順時針),theta2為下手臂對上手臂的角度(逆時針),theta3為手掌對下手臂之夾角


arm1x=[ r1 r1*cosd(240)+r1 r1*cosd(210)+r1 0 r1*cosd(150)+r1 r1*cosd(120)+r1 r1 11*r2 11*r2+r2*cosd(60) 11*r2+r2*cosd(30) L1 11*r2 L1 11*r2+r2*cosd(-30) 11*r2+r2*cosd(-60) 11*r2 r1];
arm1y=[-r1 r1*sind(240) r1*sind(210) 0 r1*sind(150) r1*sind(120) r1 r2 r2*sind(60) r2*sind(30) 0 0 0 r2*sind(-30) r2*sind(-60) -r2 -r1];
arm2x=[10*r2 11*r2+r2*cosd(150) 11*r2+r2*cosd(120) 11*r2 L1+L2-3*r2 L1+L2-3*r2+r2*cosd(60) L1+L2-3*r2+r2*cosd(30) L1+L2-2*r2 L1+L2-3*r2+r2*cosd(-30) L1+L2-3*r2+r2*cosd(-60) L1+L2-3*r2 11*r2 11*r2+r2*cosd(240) 11*r2+r2*cosd(210) 10*r2];
arm2y=[0 r2*sind(150) r2*sind(120) r2 r2 r2*sind(60) r2*sind(30) 0 r2*sind(-30) r2*sind(-60) -r2 -r2 r2*sind(240) r2*sind(210) 0 ];
palmx=[L1+L2-2*r2 L1+L2-r2 L1+L2+L3-2*r2 L1+L2-r2 L1+L2-2*r2];
palmy=[0 r3 0 -r3 0 ];

line(arm1x,arm1y);
line(arm2x,arm2y,'color','r');
line(palmx,palmy,'color','k');
axis equal

clf

x1=(arm1x-r1)*cosd(-theta1)-arm1y*sind(-theta1);
y1=(arm1x-r1)*sind(-theta1)+arm1y*cosd(-theta1);
%將上臂連桿以座標原點順時針旋轉
theta2=180+theta1-theta2;
x2=x1(12)+(arm2x-11*r2)*cosd(-theta2)-arm2y*sind(-theta2);
y2=y1(12)+(arm2x-11*r2)*sind(-theta2)+arm2y*cosd(-theta2);
%將上、下臂以手肘為旋轉點,下臂逆時針旋轉
theta3=180+theta2-theta3;
x3=x2(8)+(palmx-L1-L2+2*r2)*cosd(-theta3)-palmy*sind(-theta3);
y3=y2(8)+(palmx-L1-L2+2*r2)*sind(-theta3)+palmy*cosd(-theta3);
%手掌以手腕為旋轉點,逆時針旋轉
line(x2,y2,'color','r');
line(x3,y3,'color','k');
axis equal;
axis([-30 30 -30 30]);


P5-1-3

body(30,23,12,90,-45,-30);







P5-1-4

L1=30;
L2=23;
L3=12;

r1=L1/6;
r2=L1/12;
r3=L2/10;

arm1x=[ r1 r1*cosd(240)+r1 r1*cosd(210)+r1 0 r1*cosd(150)+r1 r1*cosd(120)+r1 r1 11*r2 11*r2+r2*cosd(60) 11*r2+r2*cosd(30) L1 11*r2 L1 11*r2+r2*cosd(-30) 11*r2+r2*cosd(-60) 11*r2 r1];
arm1y=[-r1 r1*sind(240) r1*sind(210) 0 r1*sind(150) r1*sind(120) r1 r2 r2*sind(60) r2*sind(30) 0 0 0 r2*sind(-30) r2*sind(-60) -r2 -r1];
arm2x=[10*r2 11*r2+r2*cosd(150) 11*r2+r2*cosd(120) 11*r2 L1+L2-3*r2 L1+L2-3*r2+r2*cosd(60) L1+L2-3*r2+r2*cosd(30) L1+L2-2*r2 L1+L2-3*r2+r2*cosd(-30) L1+L2-3*r2+r2*cosd(-60) L1+L2-3*r2 11*r2 11*r2+r2*cosd(240) 11*r2+r2*cosd(210) 10*r2];
arm2y=[0 r2*sind(150) r2*sind(120) r2 r2 r2*sind(60) r2*sind(30) 0 r2*sind(-30) r2*sind(-60) -r2 -r2 r2*sind(240) r2*sind(210) 0 ];
palmx=[L1+L2-2*r2 L1+L2-r2 L1+L2+L3-2*r2 L1+L2-r2 L1+L2-2*r2];
palmy=[0 r3 0 -r3 0 ];

line(arm1x,arm1y);
line(arm2x,arm2y,'color','r');
line(palmx,palmy,'color','k');
axis equal;

clf

theta1=linspace(-90,-75,10);
theta2=linspace(-45,-35,10);
theta3=linspace(-30,-10,10);

for n=1:10;
x1=(arm1x-r1)*cosd(-theta1(n))-arm1y*sind(-theta1(n));
y1=(arm1x-r1)*sind(-theta1(n))+arm1y*cosd(-theta1(n));
theta2(n)=180+theta1(n)-theta2(n);
x2=x1(12)+(arm2x-11*r2)*cosd(-theta2(n))-arm2y*sind(-theta2(n));
y2=y1(12)+(arm2x-11*r2)*sind(-theta2(n))+arm2y*cosd(-theta2(n));
theta3(n)=180+theta2(n)-theta3(n);
x3=x2(8)+(palmx-L1-L2+2*r2)*cosd(-theta3(n))-palmy*sind(-theta3(n));
y3=y2(8)+(palmx-L1-L2+2*r2)*sind(-theta3(n))+palmy*cosd(-theta3(n));
line(x1,y1);
line(x2,y2,'color','r');
line(x3,y3,'color','k');
axis equal;
axis([-30 30 -30 30]);
pause(1);
clf;
end;

手臂連桿的轉動





P5-2-1

手指分為三節
將手腕視為一桿,一端為定點,
加上手指的連結點,總桿數是4
所以自由度為3;




P5-2-2

function palm(P);
%function palm(P)
%輸入手掌長度P來觀察手指的旋轉運動
%L1 L2 L3分別為指尖、第二指節、第三指節
%R1 R2 R3分別為其半徑

axis equal;
P=17;
L1=P*2/17;
L2=P*2.5/17;
L3=P*5/17;
R1=L1*0.5/2;
R2=L2*0.6/2.5;
R3=L3*0.8/5;

%右手手指順時針旋轉的極限
fbx=[0.05*cosd(270:-5:-90),R3*cosd(270) R3*cosd(225) R3*cosd(180) R2*cosd(180) R2*cosd(135) R2*cosd(90) R2*cosd(45) R2*cosd(0) R3*cosd(0) R3*cosd(-45) R3*cosd(-90)];
fby=[0.05*sind(270:-5:-90),R3*sind(270) R3*sind(225) R3*sind(180) L3-R2+R2*sind(180) L3-R2+R2*sind(135) L3-R2+R2*sind(90) L3-R2+R2*sind(45) L3-R2+R2*sind(0) R3*sind(0) R3*sind(-45) R3*sind(-90)];
fmx=[0.05*cosd(270:-5:-90) R2*cosd(270) R2*cosd(225) R2*cosd(180) R1*cosd(180) R1*cosd(135) R1*cosd(90) R1*cosd(45) R1*cosd(0) R2*cosd(0) R2*cosd(-45) R2*cosd(-90)];
fmy=[0.05*sind(270:-5:-90) R2*sind(270) R2*sind(225) R2*sind(180) L2-R1+R1*sind(180) L2-R1+R1*sind(135) L2-R1+R1*sind(90) L2-R1+R1*sind(45) L2-R1+R1*sind(0) R2*sind(0) R2*sind(-45) R2*sind(-90)];
ftx=[0.05*cosd(270:-5:-90) R1*cosd(270) R1*cosd(225) R1*cosd(180) R1*cosd(180) R1*cosd(180) R1*cosd(135) R1*cosd(90) R1*cosd(45) R1*cosd(0) R1*cosd(0) R1*cosd(-45) R1*cosd(-90)];
fty=[0.05*sind(270:-5:-90) R1*sind(270) R1*sind(225) R1*sind(180) L1+R1*sind(180) L1+R1*sind(180) L1+R1*sind(135) L1+R1*sind(90) L1+R1*sind(45) L1+R1*sind(0) R1*sind(0) R1*sind(-45) R1*sind(-90)];

line(fbx,fby);
fmyY=fmy+L3-R2;
line(fmx,fmyY,'color','r');
ftyY=fty+L3+L2-R1-R2;
line(ftx,ftyY,'color','k');

%右手手指逆時針旋轉的極限
fb=line(fbx,fby);
rotate(fb,[0 0 1],90,[0 0 0]);
fmx=fmx+(L3-R2)*cosd(180);
fmy=fmy+(L3-R2)*sind(180);
fm=line(fmx,fmy,'color','r');
rotate(fm,[0 0 1],210,[(L3-R2)*cosd(180) 0 0]);
ftx=ftx+(L3-R2)*cosd(180)+(L2-R1)*cosd(-60);
fty=fty+(L3-R2)*sind(180)+(L2-R1)*sind(-60);
ft=line(ftx,fty,'color','k');
rotate(ft,[0 0 1],-100,[(L3-R2)*cosd(180)+(L2-R1)*cosd(-60) (L3-R2)*sind(180)+(L2-R1)*sind(-60) 0]);






P5-2-3

將球丟離開手中速度為V
因為手指相對於手掌,其實只有做張開的動作
也就是,以連接手指各關節為圓心做伸展運動
假設此時為等速的展開
可視為只有法線加速度去改變方向
所以切線方向速度固定為V

2007年3月28日 星期三

第四週作業

P4.1

triangle=[0 0;8 0;0 8*sqrt(3);-8 0;0 0];
%畫三角形
line(triangle(:,1),triangle(:,2));
h=line(triangle(:,1),triangle(:,2));
for i=1:1:360
rotate(h,[0 0 1],1,[-8 0 0]);
%以[-8 0 0]為圓心旋轉三角形的動畫
pause(0.001);
axis([-40 40 -40 40]);
axis equal;
axis pause;
end;
for i=1:1:360
rotate(h,[0 0 1],1,[0 8*sqrt(3) 0]);
%以[0 8*sqrt(3) 0]為圓心旋轉三角形的動畫
pause(0.001);
axis([-40 40 -40 40]);
axis equal;
axis pause;
end;
for i=1:1:360
rotate(h,[0 0 1],1,[8 0 0]);
%以[8 0 0]為圓心旋轉三角形的動畫
pause(0.001);
axis([-40 40 -40 40]);
axis equal;
axis pause;
end;

P4.2


linkshape([0 0],[10 0],4);
%呼叫linkshape函式
%將連桿一端固定,另一端旋轉畫圓,每次旋轉30度

n=0:30:360;
x=10*cosd(n);
y=10*sind(n);
%由座標點(15,0)來觀察連桿轉動情形
for m=1:13;
linkshape([x(m) y(m)],[0 0],4);
line([x(m) 15],[y(m) 0],'color','r');
end;
axis equal;




P4.3

%利用linkshape函式畫一個四連桿
%讓其中一桿為固定邊,另為三桿逆時針旋轉,每次轉30度

linkshape([0 0],[10 0],2);
linkshape([0 0],[3 4],3);
linkshape([3 4],[13 4],1.5);
linkshape([13 4],[10 0],2);
n=0:30:360;
bx=5*cosd(n);
by=5*sind(n);
cx=5*cosd(n)+10;
cy=by;
%形成連桿的連續轉動圖形
for m=1:13;
linkshape([0 0],[bx(m) by(m)],3);
linkshape([bx(m) by(m)],[cx(m) cy(m)],1.5);
linkshape([cx(m) cy(m)],[10 0],2);
line([0 bx(m)],[0 by(m)],'color','r');
line([bx(m) cx(m)],[by(m) cy(m)],'color','k');
line([cx(m) 10],[cy(m) 0],'color','y');
end;
axis equal;

2007年3月27日 星期二

第三週作業

P3.1

L1=30;
L2=34;
h=29;
n=0:5:35;
m=n+29
p=90-acosd((L1^2+m.^2-L2^2)./(2*L1*m));
x=L1*cosd(p);
y=L1*sind(p);
plot(0,m,'r-o',x,y,'b-o');
axis equal;
grid on;





P3.2

旋轉對
又稱R型對
這種對偶沒有位移,僅在定點作迴轉,故僅有一個自由度
如餐廳的旋轉桌

高對與低對運動結
高對如腳踏車輪
兩物件接觸於一點或一線,其接觸點僅限制於及小之面積,承受之壓力較大,但其摩擦力及阻力較小
低對如底片旋轉軸
指物體間之接觸狀況面或多面而言,僅能在x、y、z軸三方向作旋轉運動,無法作平移,故其自由度為3

型式閉合結或外力閉合結
外型閉合(Form-Closed)
利用運動結的形狀限制另一桿之運動範圍
最常見的為連桿組

外力閉合(Force-Closed)
藉由外力,使兩桿維持接觸狀態
最常見的為凸輸系統,例如凸輪軸接觸系統


P3.3

r=90;
k=0:1:360;
x=r*cosd(k);
y=r+r*sind(k);
for p=0:pi/6:2*pi;
m=r*p-r*sin(p);
n=r-r*cos(p);
X=x+r*p;
Y=y;
plot(X,Y,'b',m,n,'r-o');
axis equal;
hold on;
grid on;
end;

第二週作業

P2.1
由圖一可以看到手肘處關節及肌肉的連結,將手肘關節處當作固定點,上臂為固定桿,下臂上下擺動來回做舉球的動作,視為連桿。當上臂的外側肌肉開始收縮,便可以將下臂伸直,反之,當內側肌肉收縮時下臂就彎曲舉起。

P2.2
為了人類的需要,我們開始發明創造一些可以便利我們生活的物品。最簡單的例子,為了方便盛裝水,人類開始捏塑陶土,更進一步的學會製作較堅固的陶器;為了戰爭的需要,發明了槍砲火藥之類的。
由課本1-5.2之設計流程可知,因為有了需求,我們開始研究如何做出滿足我們的機器或事物,然後對其做出明確的目標陳述及性能規範。接著開始做各種分析、比較與評估,經過多次的試驗反覆測定其性能,最後大量生產製造。這些發明對我們帶來了好處,相對的,一定也帶來某些不良的影響,像是冷氣機使用的冷媒會造成臭氧層的破壞,所以必須重新評估分析,以設計出更完善的產品。
以製造汽車為例,我們必須有下列這些步驟:
1.前置準備:很久以前,人類就發現用滾動來取代滑動可以大量的省力又省時,而近代由於運動學、機械工程方面長足的進步,使得這些交通工具有著更明確的雛型。
2.機件規劃:近代工程師利用這些基礎科學的知識,先是做出了腳踏車這種簡單的代步工具,之後,進一步的使用各種化學燃料產生的動力發明了更好的交通工具。
3.製作及改良:透過無數次的試驗,設計出最符合我們需要的機械。但是儘管交通工具帶來了很多方便,卻也造成了許多問題,所以如何改良這些產品,也是工程師所追求的另一種進步。像是利用太陽能來當做新的動力能源,如何能使這種新能源普及的使用,更有待工程師們的研究了。
4.量產規劃:最後,將成品規格化的大量生產。

P2.3

程式碼
M=(6)+10;
x= [1 2 3 4 5 6 7 8 9 10];
y=x.^(1/M);
plot(x,y);
xlabel('X');
ylabel('Y');
title('B94611006hw2-3')