Project P2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Department of Mechanical Engineering

MECH 417: Kinematics Design of Machinery


Term Project: Bus luggage door

1st term 2021/2022

Part 2. Door linkage position analysis

Section 51

Submitted to

Course Instructor: Dr. Farag K. Omar

Task Max. Group Related Related


Required Task
No. grade grade CLO PLO
2.A Linkage geometry 2 2 2
2.B Derivation of the loop equation 4 2 2
2.C Matlab results 4 2 2
Constraint violation -50%

Total 10

Total out of 7.5


A. Preparation
1. Joints notations.
G
F

O2

C1
O1

O3
B1

A1

E D
Figure 1

2. Joint coordinates.
Joint notation Joint coordinates (mm)
A1 2.934,6.977
B1 2.827,37.637
O1 65.871,66.288
O2 44.720,93.590
O3 94.336,45.758
C1 47.168,71.567
D 6.059,0.960
E 0.059,0.937
F 5.650,104.959
G -0.381,112.936
Distance notation Distance (mm)
L1 (O1→ O2) 34.536
L2 (B1→O2) 69.898
L3 (A1→B1) 30.660
L4 (A1→O1) 86.480
L5 (C1→O2) 22.158
L6 (O3→ O2) 68.918
L7 (O3→C1) [Actuator] Min= 53.767 , Max= 84.767

3. Sketch includes all mechanism vectors (joints and door corner points).

Figure 2
B. Loop equations
1. Write the vector loop equation(s).

R5
R1

R2 R6

R7

R4

R3

Figure 3

Loop 1:
𝑅5 − 𝑅6 + 𝑅7 = 0
𝐿5 𝑒 𝑗𝜃5 − 𝐿6 𝑒 𝑗𝜃6 + 𝐿7 𝑒 𝑗𝜃7 = 0
Loop 2:
𝑅3 + 𝑅2 − 𝑅1 − 𝑅4 = 0
𝐿3 𝑒 𝑗𝜃3 + 𝐿2 𝑒 𝑗𝜃2 − 𝐿1 𝑒 𝑗𝜃1 − 𝐿4 𝑒 𝑗𝜃4 = 0
2. Specify the known and unknown variables.

• Loop 1:
- Known variables:
L5 (C1→O2) 22.158 mm
L6 (O3→ O2) 68.918 mm
L7 (O3→C1) [Actuator] Min= 53.767 mm , Max= 84.767 mm
𝜃6 136.05°
- Unknowns variables are: 𝜃5 and 𝜃7

• Loop 2:
- Known variables:

L1 (O1→ O2) 34.536 mm


L2 (B1→O2) 69.898 mm
L3 (A1→B1) 30.660 mm
L4 (A1→O1) 86.480 mm
𝜃1 127.77°
𝜃2 𝜃5 − 44.45°
- Unknown variables are: 𝜃3 and 𝜃4

3. Develop the solution steps.


To get 𝜃2 , we will break the drawing into knowns angles

Figure 4
δ is constant: 𝛿 = 44.45°
Since 𝜃2 = 90 − 𝛼 and 𝛼 = 𝛿 − 𝜃5 + 90
Therefore,
𝜃2 = 𝜃5 − 𝛿 = 𝜃5 − 44.45
Substituting known variables in the vector loop equations:
- Loop 1:
𝐿5 𝑒 𝑗𝜃5 − 𝐿6 𝑒 𝑗𝜃6 + 𝐿7 𝑒 𝑗𝜃7 = 0
Let
𝐿5 𝑒 𝑗𝜃5 + 𝐿7 𝑒 𝑗𝜃7 = 𝐿5 𝑆 + 𝐿7 𝑇
And because L5, L7, L6 and 𝜃6 are known
𝐿6 𝑒 𝑗𝜃6 = 𝑍
Therefore
𝐿7 𝑇 = 𝑍 − 𝐿5 𝑆 …(1)
Equation 1 conjugate is
𝐿7 𝑇̅ = 𝑍̅ − 𝐿5 𝑆̅ …(2)
Multiplying equation 1 and 2 by each other
𝐿7 2 = 𝑍𝑍̅ − 𝑍𝐿5 𝑆̅ − 𝑍̅𝐿5 𝑆 + 𝐿5 2
Multiplying the equation by S
𝑍̅𝐿5 𝑆 2 + (𝐿7 2 − 𝐿5 2 − 𝑍𝑍̅)𝑆 + 𝑍𝐿5 = 0
The roots of S are
2
(−𝐿7 2 + 𝐿5 2 + 𝑍𝑍̅) ± √(𝐿7 2 − 𝐿5 2 − 𝑍𝑍̅) − 4𝐿5 2
𝑆=
2𝑍̅𝐿5
The root will have a real and imaginary number, so
𝑖𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦
𝜃5 = tan−1 ( )
𝑟𝑒𝑎𝑙
Not to forget
𝑍 − 𝐿5 𝑆
𝑇=
𝐿7
Therefore
𝑖𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦
𝜃7 = tan−1 ( )
𝑟𝑒𝑎𝑙

- Loop 2:
𝐿3 𝑒 𝑗𝜃3 + 𝐿2 𝑒 𝑗(𝜃5−44.45) − 𝐿1 𝑒 𝑗𝜃1 − 𝐿4 𝑒 𝑗𝜃4 = 0
Let
𝐿3 𝑒 𝑗𝜃3 − 𝐿4 𝑒 𝑗𝜃4 = 𝐿3 𝐴 − 𝐿4 𝐵
And because L1, L2, L3, L4 and 𝜃1 and 𝜃2 = 𝜃5 − 44.45 are known
𝐿2 𝑒 𝑗(𝜃5−44.45) − 𝐿1 𝑒 𝑗𝜃1 = 𝐶
Therefore
𝐿3 𝐴 = 𝐶 + 𝐿4 𝐵 …(3)
Equation 3 conjugate is
𝐿3 𝐴̅ = 𝐶̅ + 𝐿4 𝐵̅ …(4)
Multiplying equation 3 and 4 by each other
𝐿3 2 = 𝐶𝐶̅ + 𝐶𝐿4 𝐵̅ + 𝐶̅ 𝐿4 𝐵 + 𝐿4 2
Multiplying the equation by B
𝐶̅ 𝐿4 𝐵 2 + (𝐿4 2 + 𝐶𝐶̅ − 𝐿3 2 )𝐵 + 𝐶𝐿4 = 0
The roots of B are
2
(𝐿3 2 − 𝐿4 2 − 𝐶𝐶̅ ) ± √(𝐿4 2 + 𝐶𝐶̅ − 𝐿3 2 ) − 4𝐿4 2
𝐵=
2𝐶̅ 𝐿4
The root will have a real and imaginary number, so
𝑖𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦
𝜃4 = tan−1 ( )
𝑟𝑒𝑎𝑙
Not to forget
𝐶 + 𝐿4 𝐵
𝐴=
𝐿3
𝑖𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦
𝜃3 = tan−1 ( )
𝑟𝑒𝑎𝑙

At the end, we will know 𝜃3 , 𝜃4 , 𝜃5 , and 𝜃7 . The values will be calculated by


MATLAB code in the following steps.

4. Linear actuator speed.


𝐿7,𝑚𝑎𝑥 − 𝐿7,𝑚𝑖𝑛
𝐿7̇ =
𝑡
At 10 seconds, the actuator speed is calculated as follow
0.084767 − 0.053767
𝐿7̇ = = 0.0031 𝑚/𝑠 = 3.1 𝑚𝑚/𝑠
10

5. MATLAB script to solve the loop equations. (script in the appendix)


6. Solve for all unknown variables (within MATLAB script).
When the door is closed(t=0), the initial solution of angles are:
𝜃3 = −89.13°
𝜃4 = −137.56°
𝜃5 = 96.34°
𝜃7 = 151.31°

The other angles through time can be seen by the MATLAB code solution.
C. Results
1. Door trace and corner paths.

Figure 5: MATLAB bus door trace with corner paths

Figure 6: Linkage door path


2. Comments on the results
MATLAB results are consistent with the Linkage software. Although the door upper edge
touch the higher ceiling of the bus, this could be an error from the code that can be
corrected by checking it again carefully. Furthermore, the final door location in Linkage
corresponds to that of MATLAB with a little shift up of the door. In Linkage, the door
will tilt while moving to the final position, while in MATLAB path, it shows the door
moving straight up the whole time.

D. Appendix
%=========================================================================
% MECH 417 Course project. Section 51, Fall 2021
% bus luggage door linkage part 2
% by Fatima Alnuaimi-201803103
% Date 4/11/2021
%=========================================================================

% Known lengths in millimeter


L5 = 22.158; L6 = 68.918; L7_0 = 53.767; %loop1
L1 = 34.536; L2 = 69.898; L3 = 30.660; L4 = 86.480; %loop2
% linear actuator velocity in mm/sec
V7=3.1 ;
% Known angles in degrees
th6 = 136.05; %loop1
th1 = 127.77; %loop2
%construction angle between loop 2 and 1
delta=44.45;

%time input of door movement 10 sec


t=0:0.1:10;

for j=1:length(t)
L7(j)=L7_0+V7*t(j);

%solving for loop 1 angles 5 and 7


Z=L6*exp(1i*deg2rad(th6));
Z_c=conj(Z);

%quadratic equation parameters of loop 1


a1=L5*Z_c;
b1(j)=(L7(j).^2)-(L5.^2)-(Z*Z_c);
c1=L5*Z;

%solution of S to get angle 5


S(j)=(-b1(j)-sqrt((b1(j).^2)-(4*a1*c1)))/(2*a1);
th5(j)=rad2deg(angle(S(j)));

%solution of T to get angle 7


T(j)=(Z-(L5*S(j)))/(L7(j));
th7(j)=rad2deg(angle(T(j)));
%end of loop 1 solution

%solving for loop 2 angles 3 and 4


th2(j)=th5(j)- delta;
C(j)=(L2*exp(1i*deg2rad(th2(j))))-(L1*exp(1i*deg2rad(th1)));
C_c(j)=conj(C(j));
%quadratic equation parameters of loop 2
a2(j)=L4*C_c(j);
b2(j)=(L4.^2)+(C(j)*C_c(j))-(L3.^2);
c2(j)=L4*C(j);
%solution of B to get angle 4
B(j)=(-b2(j)-sqrt((b2(j).^2)-(4*a2(j)*c2(j))))/(2*a2(j));
th4(j)=rad2deg(angle(B(j)));
%solution of A to get angle 3
A(j)=(C(j)+(L4*B(j)))/L3;
th3(j)=rad2deg(angle(A(j)));
end
%end of loop 2 solution
%---------------- Results ------------------------------------------
L_0_O1 = 93.45; %distance between 0,0 to O1 in millimeters
Th_0_O1 = 45.18; % angle between 0,0 to O1 in degrees
% distances of D,E,F,G from A1 (millimeters), and angles (degrees)
L_A1_D = 6.78; % Length
Th_A1_D = 62.55; % Angle

L_A1_E= 6.69;
Th_A1_E = 64;

L_A1_F = 98;
Th_A1_F = 88.41;

L_A1_G = 106.01;
Th_A1_G = 88.21;

%door edges position vectors


R_D = L_0_O1 * exp(1i*deg2rad(Th_0_O1)) + L4 * exp(1i*deg2rad(th4)) +
L_A1_D* exp(1i*deg2rad(360-Th_A1_D));
R_E = L_0_O1 * exp(1i*deg2rad(Th_0_O1)) + L4 * exp(1i*deg2rad(th4)) +
L_A1_E* exp(1i*deg2rad(180+Th_A1_E));
R_F = L_0_O1 * exp(1i*deg2rad(Th_0_O1)) + L4 * exp(1i*deg2rad(th4)) +
L_A1_G* exp(1i*deg2rad(180-Th_A1_G));
R_G = L_0_O1 * exp(1i*deg2rad(Th_0_O1)) + L4 * exp(1i*deg2rad(th4)) +
L_A1_F* exp(1i*deg2rad(Th_A1_F));

%door edges new 10 positions


R_D_new = downsample(R_D,10);
R_E_new = downsample(R_E,10);
R_F_new = downsample(R_F,10);
R_G_new = downsample(R_G,10);

%bus body
Body_x=[ 0 150 150 6 0 0 170 170 0 ];
Body_y=[ 0 0 100 100 112 200 200 -8 -8];
Body=polyshape(Body_x, Body_y);
plot(Body);
hold on

% Corner paths
plot(R_D)
plot(R_E)
plot(R_F)
plot(R_G)
hold off
% Door trace
patch([real(R_D_new); real(R_E_new); real(R_F_new);
real(R_G_new)],[imag(R_D_new); imag(R_E_new); imag(R_F_new);
imag(R_G_new)],"w");
axis ([-40 185 -15 240]);

You might also like