Group - E Group Members Burdukov, Ilya Igorevich Lewczyk, Tomasz Sithambaram, Sasitharan Penmatcha, Bharath Steszewski, Andrew Joseph MAE412
Introduction Objective of this project is to design and optimize a four bar mechanism for a vehicle to climb over obstacle of a given height. Use different approaches to find 1. Shortest Link 2. Reducing Peak Torque. 3. Reducing The Fluctuation of the torque.
Matlab code for solving the 12 equations P1 = x1 +i*y1; P1 = x1 +i*y1; P2 = x2 +i*y2; P2 = x2 +i*y2; P3 = x3 +i*y3; P3 = x3 +i*y3; delta2 = P2-P1; delta2 = P2-P1; delta3 = P3-P1; delta3 = P3-P1; alpha2 = Alpha2*cv; alpha2 = Alpha2*cv; alpha3 = Alpha3*cv; alpha3 = Alpha3*cv; Xp = [Mx Nx]; Xp = [Mx Nx]; Yp = [My Ny]; Yp = [My Ny]; for n = 1:2 for n = 1:2 R1 = (x1-Xp(n)) + i*(y1-Yp(n)); R1 = (x1-Xp(n)) + i*(y1-Yp(n)); R2 = (x2-Xp(n)) + i*(y2-Yp(n)); R2 = (x2-Xp(n)) + i*(y2-Yp(n)); R3 = (x3-Xp(n)) + i*(y3-Yp(n)); R3 = (x3-Xp(n)) + i*(y3-Yp(n)); R1mag = abs(R1); R1mag = abs(R1); R2mag = abs(R2); R2mag = abs(R2); R3mag = abs(R3); R3mag = abs(R3); zeta1 = atan2(imag(R1),real(R1)); zeta1 = atan2(imag(R1),real(R1)); zeta2 = atan2(imag(R2),real(R2)); zeta2 = atan2(imag(R2),real(R2)); zeta3 = atan2(imag(R3),real(R3)); zeta3 = atan2(imag(R3),real(R3)); C1 = R3mag*cos(alpha2+zeta3)- R2mag*cos(alpha3+zeta2); C1 = R3mag*cos(alpha2+zeta3)- R2mag*cos(alpha3+zeta2); C2 = R3mag*sin(alpha2+zeta3)- R2mag*sin(alpha3+zeta2); C2 = R3mag*sin(alpha2+zeta3)- R2mag*sin(alpha3+zeta2); C3 = R1mag*cos(alpha3+zeta1)- R3mag*cos(zeta3); C3 = R1mag*cos(alpha3+zeta1)- R3mag*cos(zeta3); C4 =- R1mag*sin(alpha3+zeta1)+R3mag*sin(zeta3); C4 =- R1mag*sin(alpha3+zeta1)+R3mag*sin(zeta3); C5 = R1mag*cos(alpha2+zeta1)- R2mag*cos(zeta2); C5 = R1mag*cos(alpha2+zeta1)- R2mag*cos(zeta2); C6 =- R1mag*sin(alpha2+zeta1)+R2mag*sin(zeta2); C6 =- R1mag*sin(alpha2+zeta1)+R2mag*sin(zeta2); A1 = -C3^2 - C4^2; A1 = -C3^2 - C4^2; A2 = C3*C6 - C4*C5; A2 = C3*C6 - C4*C5; A3 = -C4*C6 - C3*C5; A3 = -C4*C6 - C3*C5; A4 = C2*C3 + C1*C4; A4 = C2*C3 + C1*C4; A5 = C4*C5 - C3*C6; A5 = C4*C5 - C3*C6; A6 = C1*C3 - C2*C4; A6 = C1*C3 - C2*C4; K1 = A2*A4 + A3*A6; K1 = A2*A4 + A3*A6; K2 = A3*A4 + A5*A6; K2 = A3*A4 + A5*A6; K3 = (A1^2-A2^2-A3^2-A4^2-A6^2)/2; K3 = (A1^2-A2^2-A3^2-A4^2-A6^2)/2;
if n == 1 if n == 1 beta3_1 = 2*atan2(K2 + sqrt(K1^2+K2^2-K3^2),K1+K3); beta3_1 = 2*atan2(K2 + sqrt(K1^2+K2^2-K3^2),K1+K3); beta3_2 = 2*atan2(K2 - sqrt(K1^2+K2^2-K3^2),K1+K3); beta3_2 = 2*atan2(K2 - sqrt(K1^2+K2^2-K3^2),K1+K3); beta2_1 = atan2(-(A3*sin(beta3_1)+A2*cos(beta3_1)+A4),... beta2_1 = atan2(-(A3*sin(beta3_1)+A2*cos(beta3_1)+A4),... -(A5*sin(beta3_1)+A3*cos(beta3_1)+A6)); -(A5*sin(beta3_1)+A3*cos(beta3_1)+A6)); beta2_2 = atan2(-(A3*sin(beta3_2)+A2*cos(beta3_2)+A4),... beta2_2 = atan2(-(A3*sin(beta3_2)+A2*cos(beta3_2)+A4),... -(A5*sin(beta3_2)+A3*cos(beta3_2)+A6)); -(A5*sin(beta3_2)+A3*cos(beta3_2)+A6)); if (abs(beta2_1-alpha2) < 10^(-6) && abs(beta3_1-alpha3) < 10^(-6)) if (abs(beta2_1-alpha2) < 10^(-6) && abs(beta3_1-alpha3) < 10^(-6)) beta2 = beta2_2; beta2 = beta2_2; beta3 = beta3_2; beta3 = beta3_2; else else beta2 = beta2_1; beta2 = beta2_1; beta3 = beta3_1; beta3 = beta3_1; end end else else sigma3_1 = 2*atan2(K2 + sqrt(K1^2+K2^2-K3^2),K1+K3); sigma3_1 = 2*atan2(K2 + sqrt(K1^2+K2^2-K3^2),K1+K3); sigma3_2 = 2*atan2(K2 - sqrt(K1^2+K2^2-K3^2),K1+K3); sigma3_2 = 2*atan2(K2 - sqrt(K1^2+K2^2-K3^2),K1+K3); sigma2_1 = atan2(-(A3*sin(sigma3_1)+A2*cos(sigma3_1)+A4),... sigma2_1 = atan2(-(A3*sin(sigma3_1)+A2*cos(sigma3_1)+A4),... -(A5*sin(sigma3_1)+A3*cos(sigma3_1)+A6)); -(A5*sin(sigma3_1)+A3*cos(sigma3_1)+A6)); sigma2_2 = atan2(-(A3*sin(sigma3_2)+A2*cos(sigma3_2)+A4),... sigma2_2 = atan2(-(A3*sin(sigma3_2)+A2*cos(sigma3_2)+A4),... -(A5*sin(sigma3_2)+A3*cos(sigma3_2)+A6)); -(A5*sin(sigma3_2)+A3*cos(sigma3_2)+A6)); if (abs(sigma2_1-alpha2) < 10^(-6) && abs(sigma3_1-alpha3) < 10^(-6)) if (abs(sigma2_1-alpha2) < 10^(-6) && abs(sigma3_1-alpha3) < 10^(-6)) sigma2 = sigma2_2; sigma2 = sigma2_2; sigma3 = sigma3_2; sigma3 = sigma3_2; else else sigma2 = sigma2_1; sigma2 = sigma2_1; sigma3 = sigma3_1; sigma3 = sigma3_1; end end end end
Matlab Code For Synthesis Amat = [(exp(i*beta2) -1), (exp(i*alpha2) -1);(exp(i*beta3) -1), (exp(i*alpha3) -1)]; Amat = [(exp(i*beta2) -1), (exp(i*alpha2) -1);(exp(i*beta3) -1), (exp(i*alpha3) -1)]; Bvec = [delta2;delta3]; Bvec = [delta2;delta3]; X_L = inv(Amat)*Bvec; X_L = inv(Amat)*Bvec; W1 = X_L(1,1); Z1 = X_L(2,1); A = P1-Z1-W1; W1 = X_L(1,1); Z1 = X_L(2,1); A = P1-Z1-W1; Amat = [(exp(i*sigma2) -1), (exp(i*alpha2) -1);(exp(i*sigma3) - 1), (exp(i*alpha3) -1)]; Amat = [(exp(i*sigma2) -1), (exp(i*alpha2) -1);(exp(i*sigma3) - 1), (exp(i*alpha3) -1)]; Bvec = [delta2;delta3]; Bvec = [delta2;delta3]; X_R = inv(Amat)*Bvec; X_R = inv(Amat)*Bvec; U1 = X_R(1,1); S1 = X_R(2,1); A_p = P1-S1-U1; U1 = X_R(1,1); S1 = X_R(2,1); A_p = P1-S1-U1;
Compact Design How did we find the shortest linklengths? Solving the vector equations Confining the four bar path to go through three points We obtained 12 equations and 18 unknowns We were left with 6 free choices Results: Sum of Four-links = m
Animation for the lowest link lengths
Lowest peak Torque How did we find the lowest torque? Using Energy Method The main equation used for torque was Results: Lowest Peak Torque = Nm
Mat lab Code For lowest Peak Torque r1 = abs(A_p-A); r2 = abs(W1); r1 = abs(A_p-A); r2 = abs(W1); r3 = abs(A_p+U1-A-W1); r4 = abs(U1); r3 = abs(A_p+U1-A-W1); r4 = abs(U1); Links =[r1,r2,r3,r4]; Links =[r1,r2,r3,r4]; suml = sum(Links) suml = sum(Links) if (max(Links)+min(Links) <= suml/2) && (suml < 89) if (max(Links)+min(Links) <= suml/2) && (suml < 89) cond = 1 % Grashof cond = 1 % Grashof Mlink(c1,c2) = suml; Mlink(c1,c2) = suml; else cond = 0 % Non Grashof else cond = 0 % Non Grashof Mlink(c1,c2) = 9; Mlink(c1,c2) = 9; end end if cond == 1; if cond == 1; y = 1; y = 1; for th2 =0:.1:(2*pi) for th2 =0:.1:(2*pi) %th2 =atan2(imag(W1),real(W1)); %th2 =atan2(imag(W1),real(W1)); th3 =atan2(imag(A_p+U1-A- W1),real(A_p+U1-A-W1)); th3 =atan2(imag(A_p+U1-A- W1),real(A_p+U1-A-W1)); th4 =atan2(imag(U1),real(U1)); th4 =atan2(imag(U1),real(U1)); V = inv([r3*sin(th3), -r4*sin(th4); - r3*cos(th3), r4*cos(th4)]) * [- r2*sin(th2)*(1); r2*cos(th2)*(1)]; V = inv([r3*sin(th3), -r4*sin(th4); - r3*cos(th3), r4*cos(th4)]) * [- r2*sin(th2)*(1); r2*cos(th2)*(1)]; th2dot = 1; th2dot = 1; th3dot = V(1,1); th3dot = V(1,1); th4dot = V(2,1); th4dot = V(2,1); Acc = inv([r3*sin(th3), -r4*sin(th4); - r3*cos(th3), r4*cos(th4)]) * [r4*cos(th4)*(th4dot)^2, -r2*cos(th2), - r3*cos(th3)*(th3dot)^2; r4*sin(th4)*(th4dot)^2, -r2*sin(th2), - r3*sin(th3)*(th3dot)^2]; Acc = inv([r3*sin(th3), -r4*sin(th4); - r3*cos(th3), r4*cos(th4)]) * [r4*cos(th4)*(th4dot)^2, -r2*cos(th2), - r3*cos(th3)*(th3dot)^2; r4*sin(th4)*(th4dot)^2, -r2*sin(th2), - r3*sin(th3)*(th3dot)^2]; th3ddot = Acc(1,1); th3ddot = Acc(1,1); th4ddot = Acc(2,1); th4ddot = Acc(2,1); m2 = ( ) * (.0001) * r2; m2 = ( ) * (.0001) * r2; m3 = ( ) * (.0001) * r3; m3 = ( ) * (.0001) * r3; m4 = ( ) * (.0001) * r4; m4 = ( ) * (.0001) * r4; I3 = (1/12) * (.0001)*(r3)^3; I3 = (1/12) * (.0001)*(r3)^3; I4 = (1/12) * (.0001)*(r4)^3; I4 = (1/12) * (.0001)*(r4)^3; VxR2 =.5*r2*sin(th2)*th2dot; VxR2 =.5*r2*sin(th2)*th2dot; VxR3 = -r2*sin(th2)*th2dot -.5*r3*sin(th3)*th3dot; VxR3 = -r2*sin(th2)*th2dot -.5*r3*sin(th3)*th3dot; VxR4 = -.5*r4*sin(th4)*th4dot; VxR4 = -.5*r4*sin(th4)*th4dot; VyR2 =.5*r2*cos(th2)*th2dot; VyR2 =.5*r2*cos(th2)*th2dot; VyR3 = r2*cos(th2)*th2dot +.5*r3*cos(th3)*th3dot; VyR3 = r2*cos(th2)*th2dot +.5*r3*cos(th3)*th3dot; VyR4 =.5*r4*cos(th4)*th4dot; VyR4 =.5*r4*cos(th4)*th4dot; AxR2 = -.5*r2*cos(th2)*(th2dot)^2; AxR2 = -.5*r2*cos(th2)*(th2dot)^2; AxR3 = -(r2*cos(th2)*(th2dot)^2) - (.5*r3*cos(th3)*(th3dot)^2 +.5*r3*sin(th3)*(th3ddot)); AxR3 = -(r2*cos(th2)*(th2dot)^2) - (.5*r3*cos(th3)*(th3dot)^2 +.5*r3*sin(th3)*(th3ddot));
AxR4 = -(.5*r4*cos(th4)*th4dot^2 +.5*r4*sin(th4)*th4ddot); AxR4 = -(.5*r4*cos(th4)*th4dot^2 +.5*r4*sin(th4)*th4ddot); AyR2 = -.5*r2*sin(th2)*(th2dot)^2; AyR2 = -.5*r2*sin(th2)*(th2dot)^2; AyR3 = -r2*sin(th2)*(th2dot)^2 -.5*r3*sin(th3)*(th3dot)^2 +.5*r3*cos(th3)*(th3ddot); AyR3 = -r2*sin(th2)*(th2dot)^2 -.5*r3*sin(th3)*(th3dot)^2 +.5*r3*cos(th3)*(th3ddot); AyR4 = -.5*r4*sin(th4)*th4dot^2 +.5*r4*cos(th4)*th4ddot; AyR4 = -.5*r4*sin(th4)*th4dot^2 +.5*r4*cos(th4)*th4ddot; Torque2 = abs((m2*AxR2*VxR2 + m2*VyR2*(AyR2+9.81) + m3*AxR3*VxR3 + m3*VyR3*(AyR3+9.81) + I3*th3ddot*th3dot + m4*AxR4*VxR4 + m4*VyR4*(AyR4+9.81) + I4*th4ddot*th4dot)); Torque2 = abs((m2*AxR2*VxR2 + m2*VyR2*(AyR2+9.81) + m3*AxR3*VxR3 + m3*VyR3*(AyR3+9.81) + I3*th3ddot*th3dot + m4*AxR4*VxR4 + m4*VyR4*(AyR4+9.81) + I4*th4ddot*th4dot)); a(y) = Torque2; a(y) = Torque2; y = y+1; y = y+1; end end a a max(a) max(a) end end
Animation For The Lowest Peak Torque
Lowest Torque Fluctuation How did we get the lowest Torque Fluctuation? Results: Lowest torque fluctuation =
Matlab Code For The Lowest Torque Fluctuation
Animation For The Lowest Torque Fluctuation
Solid Edge For Compact Design
Solid Edge For Lowest Torque
Solid Edge For Lowest Torque Fluctuation
Questions?
The End