Baixe o app para aproveitar ainda mais
Prévia do material em texto
Quiz de mecanismos Análisis de posición (Matlab) Presentado por: Fernando Miguel Solar Doria Presentado a: Ing. Arnold Rafael Martínez Guarín Ingeniería Mecánica Universidad de Córdoba Montería – Córdoba Colombia 3/06/2022 Código de Matlab %QUIZ DE MECANISMOS % Este código resuelve la posición de un M4B close all clear clc a = 1.8; % [in] b = 2.69; % [in] c = 1.36; % [in] d = 3.86; % [in] e = 1.22; % [in] f = 1.35; % [in] % theta6 = 88; theta6_inicial = acosd((a^2+d^2-b^2-c^2)/(2*a*d)+(b*c)/(a*d)); theta6_final = acosd((a^2+d^2-b^2-c^2)/(2*a*d)-(b*c)/(a*d)); %theta 1 = grado de inclinacion de O6O4 theta1 = 33; %° K1 = d/a; K2 = d/c; K3 = (a^2-b^2+c^2+d^2)/(2*a*c); K4 = d/b; K5 = (c^2-d^2-a^2-b^2)/(2*a*b); cont = 1; for theta6 = theta6_inicial:theta6_final THETA6(cont) = theta6; A = cosd(theta6-theta1)-K1-K2*cosd(theta6-theta1)+K3; B = -2*sind(theta6-theta1); C = K1-(K2+1)*cosd(theta6-theta1)+K3; D = cosd(theta6-theta1)-K1+K4*cosd(theta6-theta1)+K5; E = -2*sind(theta6-theta1); F = K1+(K4-1)*cosd(theta6-theta1)+K5; theta4 = 2*atand((-B-sqrt(B^2-4*A*C))/(2*A)); theta5 = 2*atand((-E-sqrt(E^2-4*D*F))/(2*D)); theta_a = theta4+theta1-(56.5); theta_b = asind((e*sind(theta_a))/f); theta_c = 180 - theta_a - theta_b; g = (e*sind(theta_c))/(sind(theta_b)); THETA2(cont) = 56.5-theta_c; % Configuración Abierta Z1 = d*(cosd(theta1)+1i*sind(theta1)); Z2 = a*(cosd(theta6)+1i*sind(theta6)); Z3 = b*(cosd(theta5+theta1)+1i*sind(theta5+theta1)); Z4 = c*(cosd(theta4+theta1)+1i*sind(theta4+theta1)); Z5 = g*(cosd(theta4)+1i*sind(theta4)); Z6 = f*(cosd(56.5-theta_c))+1i*sind(56.5-theta_c); Z7 = e*(cosd(56.5)+1i*sind(56.5)); Z8 = 2.5*(cosd(theta4+theta1)+1i*sind(theta4+theta1)); tray_1(cont)=Z2; tray_2(cont)=Z2+Z3; tray_3(cont)=Z2+Z3-Z4-Z7+Z6; cont = cont+1; Tierra = [0 Z1]; Z_ab = [0 Z2 Z2+Z3 Z2+Z3-Z4 Z2+Z3-Z4-Z8]; figure(1) plot(Z_ab,'ob-','LineWidth',1.2) hold on tierra2 = [Z2+Z3-Z4 Z2+Z3-Z4-Z7]; plot(tierra2,'b','LineWidth',1.2,'Marker','^') hold on Z_g = [Z2+Z3-Z4-Z7 Z2+Z3-Z4-Z7+Z6]; hold on plot(tray_1,'r*') hold on plot(tray_2,'r*') hold on plot(tray_3,'r*') plot(Z_g,'Color','b','LineWidth',1.2,'Marker','^') line(real(Tierra),imag(Tierra),'Color','k','LineWidth',1.2,'Marker','^') xlim([-0.5 5.5]) ylim([-1 5]) pause(0.1) hold off end figure(2) plot(THETA6,THETA2) title('\Theta_6 Vs \Theta_2') xlabel('\Theta_6') ylabel('\Theta_2') Síntesis analítica
Compartilhar