0% found this document useful (0 votes)
64 views

Ch.02 Position Analysis

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Ch.02 Position Analysis

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

12/17/2019

Mechanisms and Robots Analysis with MATLAB® 1 Position Analysis Mechanisms and Robots Analysis with MATLAB® 2 Position Analysis

§1.Absolute Cartesian Method


- The position analysis of a kinematic chain requires the
determination of
• the joint positions
• the position of the centers of gravity, and
• the angles of the links with the horizontal axis

02. Position Analysis

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

1 2

Mechanisms and Robots Analysis with MATLAB® 3 Position Analysis Mechanisms and Robots Analysis with MATLAB® 4 Position Analysis

§1.Absolute Cartesian Method §2.Slider-Crank (R-RRT) Mechanism


- Using the reference frame 𝑥𝑂𝑦 - Ex. 𝑙𝐴𝐵 = 0.5𝑚
1 2 3 1

𝑦
2
(𝑥𝐴 − 𝑥𝐵 )2 +(𝑦𝐴 − 𝑦𝐵 )2 = 𝐴𝐵 2 = 𝑙𝐴𝐵 (2.1) 𝑦 𝐵 Give 𝑙𝐵𝐶 = 1𝑚 𝑦 𝐵
𝑙2
𝐵
𝑦𝐵 − 𝑦𝐴 𝜔1 𝜑1 = 600 𝜔1 𝐶 𝑖−1
𝜔 𝑚 = 𝑡𝑎𝑛𝜑 = (2.2) 𝜑1 𝐶
Find 𝑥𝐶 ? 𝐴
𝜑1 𝐶
𝑥
𝐴 𝜑 𝑥𝐵 − 𝑥𝐴 𝐴 𝑥
𝐶2 𝐶1

𝑂 𝑥 𝑦 = 𝑚𝑥 + 𝑛 (2.3) Solution 1
𝑙𝐶 𝐶 𝑙𝐶 𝐶 2
𝑖−1
1
𝑖−1

𝜑1 = 𝜔1 𝑡
(𝑥𝐴 ,𝑦𝐴 ) : the coordinates of the joint 𝐴 position of 𝐵
(𝑥𝐵 ,𝑦𝐵 ) : the coordinates of the joint 𝐵 𝑥𝐵 = 𝑙1 cos𝜑1 , 𝑦𝐵 = 𝑙1 sin𝜑1
𝑙𝐴𝐵 : the length of the link 𝐴𝐵 position of 𝐶
𝜑 : the angle of the link 𝐴𝐵 with the horizontal axis 𝑂𝑥 𝑦𝐶 = 0
𝑚 : the slope of the link 𝐴𝐵 (𝑥𝐶 − 𝑥𝐵 )2 +(𝑦𝐶 − 𝑦𝐵 )2 = 𝑙22
𝑛 : the intercept → solving and choosing 𝐶 𝑖 = 𝐶: • known the previous step 𝐶 𝑖−1
• if 𝑙𝐶1 𝐶 𝑖−1 < 𝑙𝐶2 𝐶 𝑖−1 then 𝐶 = 𝐶1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

3 4

Mechanisms and Robots Analysis with MATLAB® 5 Position Analysis Mechanisms and Robots Analysis with MATLAB® 6 Position Analysis

§2.Slider-Crank (R-RRT) Mechanism §2.Slider-Crank (R-RRT) Mechanism


- Ex. 𝑙𝐴𝐵 = 0.5𝑚 Matlab code
1 2 3 1 2 3
𝑦 𝐵 Give 𝑙𝐵𝐶 = 1𝑚 𝑦 𝐵
𝑙2 syms xCsol
𝜔1 𝜑1 = 600 𝜔1
AB=0.5; BC=1.0; phi1=60*pi/180;
𝐶 𝜑1 𝐶 𝐶 𝑖−1 xA=0; yA=0;
𝐴
𝜑1
𝑥 Find 𝑥𝐶 ? 𝐴 𝑥 xB=L1*cos(phi1); yB=L1*sin(phi1);
𝐶2 𝐶1
yC=0;
equ=(xCsol-xB)^2+(yC-yB)^2==BC^2;
𝑙𝐶2 𝐶 𝑖−1 𝑙𝐶1 𝐶 𝑖−1
(𝑥𝐶 − 𝑥𝐵 )2 +(𝑦𝐶 − 𝑦𝐵 )2 = 𝑙22 xCsol=solve(equ,xCsol);
xC1=xCsol(1); xC2=xCsol(2);
solving the above equation using matlab % Select the correct position for C for the given input angle
equ=(xCsol-xB)^2+(yC-yB)^2==L2^2; %define equation xC10=AB+BC;
xCsol=solve(equ,xCsol); %solve equation if abs(xC1-xC10)<abs(xC2-xC10) xC=xC1;
xC1=xCsol(1) %assign variable 1 else xC=xC2;
xC2=xCsol(2); %assign variable 2 end;
plot([xA,xB],[yA,yB],'r-o',[xB,xC],[yB,yC],'b-o');
axis equal

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

5 6

1
12/17/2019

Mechanisms and Robots Analysis with MATLAB® 7 Position Analysis Mechanisms and Robots Analysis with MATLAB® 8 Position Analysis

§2.Slider-Crank (R-RRT) Mechanism §2.Slider-Crank (R-RRT) Mechanism


Make a function (t2011) Trajectory plotting (t2012)
function [xB,yB,xC,yC]=t2011(xA,yA,AB,BC,phi1,xC_old) xA=0; yA=0;
syms xCsol AB=0.5; BC=1.0;
phi1=phi1*pi/180; xC_old=AB+BC;
xB=AB*cos(phi1); yB=AB*sin(phi1); yC=0; phi=0:11.25:360;
equ=(xCsol-xB)^2+(yC-yB)^2==BC^2; n=length(phi);
xCsol=solve(equ,xCsol); for i=1:n
xC1=xCsol(1); xC2=xCsol(2); [xB(i),yB(i),xC(i),yC(i)]=t2011(xA,yA,AB,BC,phi(i),xC_old);
% Select the correct position for C for the given input angle xC_old=xC_old;
xC10=xC_old; end
if abs(xC1-xC10)<abs(xC2-xC10) xC=xC1; for i=1:n
else xC=xC2; plot([xA,xB(i)],[yA,yB(i)],'r-o',[xB(i),xC(i)], ...
end; xC=eval(xC); [yB(i),yC(i)],'b-o');
axis equal
hold on
Matlab command end
[xB,yB,xC,yC]=t2011(0,0,0.5,1.0,60,1.5)
plot([0,xB],[0,yB],'r-o',[xB,xC],[yB,yC],'b-o')
axis equal

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

7 8

Mechanisms and Robots Analysis with MATLAB® 9 Position Analysis Mechanisms and Robots Analysis with MATLAB® 10 Position Analysis

§2.Slider-Crank (R-RRT) Mechanism §2.Slider-Crank (R-RRT) Mechanism


- Ex. 𝑙𝐴𝐵 = 0.5𝑚 Matlab code
1 2 3 1 2 3
𝑦 𝐵 Give 𝑙𝐵𝐶 = 1𝑚 𝑦 𝐵 AB=0.5; BC=1.0; phi1=60*pi/180;
𝜔1 𝜑1 = 600 xA=0; yA=0;
𝐶 𝜔1 𝜑1 𝐶 xB=AB*cos(phi1); yB=BC*sin(phi1);
𝐴
𝜑1
𝑥 Find 𝑥𝐶 ? 𝐴 𝑥 yC=0;
xC=xB+BC*cos(asin(AB*sin(phi1))/BC);
Solution 2 plot([xA,xB],[yA,yB],'r-o',[xB,xC],[yB,yC],'b-o');
axis equal
𝜑1 = 𝜔1 𝑡
Make a function (t2013)
position of 𝐵 function [xB,yB,xC,yC]=t2013(xA,yA,AB,BC,phi1)
𝑥𝐵 = 𝑙1 cos𝜑1 , 𝑦𝐵 = 𝑙1 sin𝜑1 phi1=phi1*pi/180;
xB=AB*cos(phi1); yB=AB*sin(phi1);
position of 𝐶 yC=0;
𝑦𝐶 = 0 xC=xB+AC*cos(asin(AB*sin(phi1))/BC);
𝑙1 sin𝜑1 Matlab command
𝑥𝐶 = 𝑥𝐵 + 𝑙2 cos arcsin [xB,yB,xC,yC]=t2013(0,0,0.5,1.0,60);
𝑙2 plot([0,xB],[0,yB],'r-o',[xB,xC],[yB,yC],'b-o');
axis equal

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

9 10

Mechanisms and Robots Analysis with MATLAB® 11 Position Analysis Mechanisms and Robots Analysis with MATLAB® 12 Position Analysis

§2.Slider-Crank (R-RRT) Mechanism §3.Four-Bar (R-RRR) Mechanism


Trajectory plotting (t2014) 𝑙𝐴𝐵 = 150, 𝑙𝐵𝐶 = 350, 𝑙𝐶𝐷 = 300
xA=0; yA=0; Give 𝑙𝐶𝐸 = 150, 𝑥𝐷 = 300, 𝑦𝐷 = 300
AB=0.5; BC=1.0;
phi=0:11.25:360; 𝜑1 = 450
n=length(phi);
for i=1:n
Find 𝑥𝐵 ,𝑦𝐵 ,𝑥𝐶 ,𝑦𝑐 ,𝑥𝐸 ,𝑦𝐸
𝐸 𝑦
[xB(i),yB(i),xC(i),yC(i)]=t2013(xA,yA,AB,BC,phi(i)); 𝜑1 = 𝜔1 𝑡 𝐶 𝐶
1
end 3

for i=1:n position of 𝐵 𝐶 𝑖−1


𝑙3

plot([xA,xB(i)],[yA,yB(i)],'r-o',[xB(i),xC(i)],[yB(i),yC(i)],'b-o'); 𝑥𝐵 = 𝑙1 cos𝜑1 , 𝑦𝐵 = 𝑙1 sin𝜑1 2


𝐷
axis equal
hold on position of 𝐶 1 𝑙2
End (𝑥𝐶 − 𝑥𝐵 )2 +(𝑦𝐶 − 𝑦𝐵 )2 = 𝐵𝐶 2 𝐵

Note: Compare the calculating time (𝑥𝐶 − 𝑥𝐷 )2 +(𝑦𝐶 − 𝑦𝐷 )2 = 𝐶𝐷 2 𝜔1 𝜑1


𝐶2 𝑥
𝐴

between two solutions → solving and choosing 𝐶 𝑖 = 𝐶


• known the previous step 𝐶 𝑖−1
• if 𝑙𝐶1 𝐶 𝑖−1 < 𝑙𝐶2 𝐶 𝑖−1 then 𝐶 = 𝐶1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

11 12

2
12/17/2019

Mechanisms and Robots Analysis with MATLAB® 13 Position Analysis Mechanisms and Robots Analysis with MATLAB® 14 Position Analysis

§3.Four-Bar (R-RRR) Mechanism §3.Four-Bar (R-RRR) Mechanism


𝑙𝐴𝐵 = 150, 𝑙𝐵𝐶 = 350, 𝑙𝐶𝐷 = 300 Matlab code
Give 𝑙𝐶𝐸 = 150, 𝑥𝐷 = 300, 𝑦𝐷 = 300 syms xCsol yCsol
AB=0.15; BC=0.35; CD=0.30; CE=0.15;
𝜑1 = 450 phi1=45*pi/180;
xA=0; yA=0;
Find 𝑥𝐵 ,𝑦𝐵 ,𝑥𝐶 ,𝑦𝑐 ,𝑥𝐸 ,𝑦𝐸 𝐸

3
𝑦
𝐶
xD=0.30; yD=0.30;
2
𝐷

omega1=10;
𝐵
𝜑1
𝐴 𝜔1 𝑥

(𝑥𝐶 − 𝑥𝐵 ) +(𝑦𝐶 − 𝑦𝐵 ) = 𝐵𝐶 2
2 2
xB=AB*cos(phi1); yB=AB*sin(phi1);
(𝑥𝐶 − 𝑥𝐷 )2 +(𝑦𝐶 − 𝑦𝐷 )2 = 𝐶𝐷 2 eqnC1=(xCsol-xB)^2+(yCsol-yB)^2==BC^2;
eqnC2=(xCsol-xD)^2+(yCsol-yD)^2==CD^2;
solC=solve(eqnC1,eqnC2,xCsol,yCsol);
solving the above equation using matlab xCpositions=eval(solC.xCsol); xC1=xCpositions(1); xC2=xCpositions(2);
eqnC1=(xCsol-xB)^2+(yCsol-yB)^2==BC^2; %define equation 1 yCpositions=eval(solC.yCsol); yC1=yCpositions(1); yC2=yCpositions(2);
eqnC2=(xCsol-xD)^2+(yCsol-yD)^2==CD^2; %define equation 2 % Choose the solution point C1
solC=solve(eqnC1,eqnC2,xCsol,yCsol); %solve equation if xC1<xD xC=xC1; yC=yC1; else xC=xC2; yC=yC2; end
xCpositions=eval(solC.xCsol); %assign variable x
xC1=xCpositions(1); xC2=xCpositions(2); plot([xA,xB],[yA,yB],'r-o',[xB,xC],[yB,yC],'b-o',[xC,xD],[yC,yD], 'g-o')
yCpositions=eval(solC.yCsol); %assign variable y axis equal
yC1=yCpositions(1); yC2=yCpositions(2);
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

13 14

Mechanisms and Robots Analysis with MATLAB® 15 Position Analysis Mechanisms and Robots Analysis with MATLAB® 16 Position Analysis

§3.Four-Bar (R-RRR) Mechanism §3.Four-Bar (R-RRR) Mechanism


position of 𝐸 Make a function (t2022)
Solution 1 function [xB,yB,xC,yC,xE,yE]=t2022(xA,yA,xD,yD,AB,BC,CD,CE,phi1)
syms xCsol yCsol xEsol yEsol
2
(𝑥𝐸 − 𝑥𝐶 )2 +(𝑦𝐸 − 𝑦𝐶 )2 = 𝑙𝐶𝐸 phi1=phi1*pi/180;
𝑦𝐷 − 𝑦𝐶 𝑦𝐸 − 𝑦𝐶 xB=AB*cos(phi1); yB=AB*sin(phi1);
= eqnC1=(xCsol-xB)^2+(yCsol-yB)^2==BC^2;
𝑥𝐷 − 𝑥𝐶 𝑥𝐸 − 𝑥𝐶 eqnC2=(xCsol-xD)^2+(yCsol-yD)^2==CD^2;
solC=solve(eqnC1,eqnC2,xCsol,yCsol);
xCpositions=eval(solC.xCsol); xC1=xCpositions(1); xC2=xCpositions(2);
Matlab code (t2021) yCpositions=eval(solC.yCsol); yC1=yCpositions(1); yC2=yCpositions(2);
eqnE1=(xEsol-xC)^2+(yEsol-yC)^2==CE^2; % Choose the solution point C1
eqnE2=(yD-yC)/(xD-xC)==(yEsol-yC)/(xEsol-xC); if xC1<xD xC=xC1; yC=yC1; else xC=xC2; yC=yC2; end
solE=solve(eqnE1,eqnE2,xEsol,yEsol); eqnE1=(xEsol-xC)^2+(yEsol-yC)^2==CE^2;
xEpositions=eval(solE.xEsol); xE1=xEpositions(1); xE2=xEpositions(2); eqnE2=(yD-yC)/(xD-xC)==(yEsol-yC)/(xEsol-xC);
yEpositions=eval(solE.yEsol); yE1=yEpositions(1); yE2=yEpositions(2); solE=solve(eqnE1,eqnE2,xEsol,yEsol);
if xE1<xC xE=xE1; yE=yE1; else xE=xE2; yE=yE2; end xEpositions=eval(solE.xEsol);
plot([xA,xB],[yA,yB],'r-o',[xB,xC],[yB,yC],'b-o',[xC,xE],[yC,yE],'b- yEpositions=eval(solE.yEsol);
o',[xD,xC],[yD,yC],'b-o'); xE1=xEpositions(1); xE2=xEpositions(2);
axis equal yE1=yEpositions(1); yE2=yEpositions(2);
if xE1<xC xE=xE1; yE=yE1; else xE=xE2; yE=yE2; end
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

15 16

Mechanisms and Robots Analysis with MATLAB® 17 Position Analysis

§3.Four-Bar (R-RRR) Mechanism

Matlab command
AB=0.15; BC=0.35; CD=0.30; CE=0.15;
phi1=45;
xA=0; yA=0;
xD=0.30; yD=0.30;
[xB,yB,xC,yC,xE,yE]=t2022(xA,yA,xD,yD,AB,BC,CD,CE,phi1);
plot([xA,xB],[yA,yB],'r-o',[xB,xC],[yB,yC],'b-o',[xC,xD],[yC,yD],'g-o',
[xC,xE],[yC,yE],'g-o')
axis equal

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

17

You might also like