由題目可知
function dyad_draw(rho,theta,td,tdd)其中:
各桿之對應長度rho=[a, a+5, a-5]cm,a=(你的學號末一碼)+10;
各桿之對應起始角度theta=[0, 0, 0]度;
各桿之對應角速度為td=[0.2, 0.5, 0 .3]rad/s;
各桿之對應角加速度為tdd=[0, 0.1, 0.2]rad/s^2;
P7.1
a=6(學號)+10=16
各桿之對應長度rho=[16,21,11]cm
>> dyad_draw([16 21 11],[0 0 0],[0.2 0.5 0.3],[0 0.1 0.2])
%利用dyad_draw函式畫出三桿連成端桿的型式
ans =
3.2000 10.5000 3.3000
藍線為各桿之速度,紅色線為加速度,綠色為三桿合速度
P7.2
考慮t=[1 2 3 4 5]之端桿運動狀態:
axis equal;
dyad_draw([16,21,11],[0,0,0],[0.2,0.5,0.3],[0,0.1,0.2]);
pause(2);%顯示最初靜止狀態的圖示2秒
clf;
for t=1:5%t為時間的參數
axis equal;
dyad_draw([16,21,11],[0.2,0.5+t*0.1,0.3+t*0.2],[0.2,0.5+t*0.1,0.3+t*0.2],[0,0.1,0.2]);
pause(1);%畫出考慮時間t之後的運動情形
clf;
%利用消除前一個圖做成動畫
end;
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;
手臂連桿的轉動
訂閱:
文章 (Atom)