Homework3Solutions

Homework3Solutions - mg 32% MW-“ ~ 1) Ma JILL Newwa...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 14
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mg 32% MW-“ ~ 1) Ma JILL Newwa {Barksm mew +0 5am " 9°" 9;. flow dogma eqméx"a\gi . / N. Z \ Z «— z ((—1 (OSGL hr} (099$ “F13 +<C1$“’\ 91 4(3 9‘" 63> _ FL, Pqundaa W WW6 4109;) :0 - '2. 7, Z :{rzw‘aét +V3CO§ 63 "r0 *{fz Smez +‘r39‘63) "f‘i §é i4: 93 [3 000564 in 1003/7 C/(Sgcmfl g’M‘é’EVS/ 53992.0 [4% VatWS' 9a 2 no", Ff“? (ISM "a: \Zflzicé 0“ WW M {317/}. \k mm W 61 a‘qorfiwm “éwmes : II 4.30;: 0,3013% M! Q : 1,3427 2‘5 7,“? ~ .1“. :‘0,aoci<6% gOMQ 9B is known, (9L, CM- 1:9 OUti‘mico/ as; 2 Q {m 6L “54%”; 64/ Q { {’2 (039;, f3 (05% up! {‘t 4. €C0$ $3 1 WP 695 ‘1. R COS(9L_%) as mm; =- r Smez + Rsrmwé) a?“ $693)) :0 '3 @494“ 1"“0593 ‘sz19§7 ‘33"h93’fiw39z ’_..,,_ {3- ‘ ‘ 35 ~§§isr §cc29fiflfflfld>93~fi9nég +tm\9&(=Ka0§99 f’ + Ram: 92 \.../" W 91 t? KW fir 0L 91W 93/ (/6 CW saw: {in P; I 1. yr? : (fl +fl‘m93 “(Sn/.69 +(csm63 figh&é Z0 WXIWW 91:0ccws gum Q3 : 92 147/: W t. «in/1 R an, m q-fiflm 25cm 92 ,7; (gut—((560392. (kX <<e_+(§3 9H€> z >Cdsga m [$8192- : @*”~> $0 Z _ 5. <‘a+m> 92 My w )n Pl zomc _ - M ‘ av" 36, ‘6’7 ' FM eg‘mm , e. W Raga/wt 5fl ' a (fl—d w 0L 5» eljm”) I: r ._ do \ (Dram! m& M MSVL \ 9/16/09 10:46 PM /Users/jeremy/Documents/Teach.../Homework3Probl.m. l of 2 %ME 3212: Mechanisms .u %Four Bar Linkage Analysis Program ‘)%Written by Jeremy Daily %Homework Set 3, Problem 1 %Purpose: Analyze a four bar linkage with similar notation to Fig 4.3a in clc; clear all; close all %input known values: rl=lO r2=4 r3=12 r4=8 %input crank values in radians theta2=[0:pi/36:2*pi]; %Initialize a guess for theta3 for Newton—Rahpson Method %Change this to negative to get cross closure theta3=pi/2; %for each value of theta2, determine theta3 using the Newton—Raphson %method. for n:i21ength(theta2) deltatheta3=l; %set the loop conditional while norm(deltatheta3)>0.000l75 %0.01 degrees f: (r2*cos(theta2(n))+r3*cos(theta3(n))—rl)“2+(... 5 r2*sin(theta2(n))+r3*sin(theta3(n)))“2—r4“2; ” dfdtheta3=2*(r2*cos(theta2(n))+r3*cos(theta3(n))—rl)... *(—r3*sin(theta3(n)))... + 2*(r2*sin(theta2(n))+r3*sin(theta3(n)))... *(r3*cos(theta3(n))); deltatheta3=—f/dfdtheta3; %update the solution until it is within tolerance theta3(n)=theta3(n)+deltatheta3; end theta3(n+1)=theta3(n); %guess the same solution as the time before %Calculate theta4 based on theta3 theta4(n)=atan2(r2*sin(theta2(n))+r3*sin(theta3(n)),... —rl+r2*cos(theta2(n))+r3*cos(theta3(n))); end %delete the last value in theta3 to make the %Vectors the vectors the same length theta3(n+1)=[17 %Determine theta3 and theta4 in closed form. See 4.3.3 in Cleghorn’s book. hl=rl/r2; h2=rl/r3; h3=rl/r4; h4=(—rlAZ—rZAZ—r3“2+r4“2) )h5=(r1“2+r2“2—r3“2+r4“2)/ a=—hl+(l+h2)*cos(theta2)+h4; b=-2*sin(theta2); /(2*r2*r3); (2*rl*r2); 9/16/09 10:46 PM /Users/jeremy/Documents/Teach.../Homework3Probl.m 2 of 2 c=h1—(1-h2)*cos(theta2)+h4; ~ d=—h1+(l—h3)*cos(theta2)+h5; e=hl—(l+h3)*cos(theta2)+h5; %Cross Link Geometry theta4_cross=2*atan2(—b+sqrt(b.“2—4*d.*e),2*d)—2*pi; theta3_cross=2*atan2(—b+sqrt(b.“2—4*a.*c),2*a)—2*pi; %Open Link Geometry theta4_open=2*atan2(—b—sqrt(b.“2—4*d.*e),(2*d))+2*pi; theta3_open=2*atan2(—b—sqrt(b.A2—4*a.*c),(2*a))+2*pi; %plot the results of the numerical and analytical analysis F=figure(l) plot(theta2*180/pi,theta3*180/pi,’.’,... theta2*180/pi,theta3_open*180/pi,’s’) legend(’Newton—Raphson’,’Analytical’,’Location’,’NorthWest’) xlabel(’Input Crank Angle, \theta_2 [deg]’) ylabel(’Coupler Angle, \theta_3 [deg]’) axis tight set(gca,’XTick’,[0:30:360]) grid on title(’Coupler angle in the open closure configuration’) %saveas(F,'HW3_Probl_Open.eps’) F=figure(2) plot(theta2*l80/pi,theta3*l80/pi,’.’,theta2*180/pi,theta3_cross*l80/pi,’s’) )legend(’Newton—Raphson’,'Analytical’,’Location’,'NorthWest') , xlabel(’Input Crank Angle, \theta_2 [deg]’) ylabel(’Coupler Angle, \theta_3 [deg]’) axis tight set(gca,'XTick’,[0:30:3601) grid on title('Coupler angle in the cross closure configuration’) %saveas(F,’HW3_Probl_Cross.eps’) Coupler Angle, 93 [deg] Coupler angle in the open closure configuration ' Newton—Raphson El Analytical 30 O 90 120 150 180 210 240 Input Crank Angle, 62 [deg] Coupler Angle, 63 [deg] Coupler angle in the cross closure configuration 120 150 180 210 240 270 Input Crank Angle, 62 [deg] 9/24/09 9:49 AM /Users/jeremy/Documents/Teachi.../Homework3Prob2.m 1 of 2 %ME 3212: Mechanisms 'xfiEccentric Cam Position Analysis %Written by Jeremy Daily %Homework Set 3, Problem 2 clc; clear all; close all %input known values: rl=lOO r2=150 e=20 R=40 %input crank values in radians theta3=[0:pi/48:2*pi]; %Initialize a guess for theta2 for Newton—Rahpson Method %Change this to negative to get an alternate configuration theta2=atan(R/(rl+e)) %for each value of theta3, determine theta2 using the N—R method. for n=1zlength(theta3) deltatheta2=l; %set the loop conditional while norm(deltatheta2)>0.00000l %0.0l degrees f= tan(theta2(n))*(rl+e*cos(theta3(n))—R*sin(theta2(n)))... —e*sin(theta3(n))—R*cos(theta2(n)); dfdtheta2=(l/cos(theta2(n))‘2)*... (rl+e*cos(theta3(n))—R*sin(theta3(n)))... + tan(theta2(n))*(—R*cos(theta2(n)))... + R*sin(theta2(n)); deltatheta2=—f/dfdtheta2; %update the solution theta2(n)=theta2(n)+deltatheta2; end r(n)=sqrt((rl+e*cos(theta3(n))—R*sin(theta2(n)))‘2+. (e*sin(theta3(n))+R*cos(theta2(n)))‘2); theta2(n+l)=theta2(n); %guess the same solution as the time before end %delete the last value in theta3 to make the %vectors the same length theta2(n+l)=; theta2max=max(theta2) theta2min=min(theta2) )theta2max=asin((R+e)/rl) theta2min=asin((R—e)/r1) 9/24/09 9:49 AM /Users/'erem /Documents/Teachi.../Homework3Prob2.m 2 of 2 =======================éL===2L============================================= %determine key points ,*xAx=r.*cos(theta2); )Ay=r. *sin(theta2) ,- Px=r2*cos(theta2); Py=r2*sin(theta2); camCenterX=rl+e*cos(theta3); camCenterY=e*sin(theta3); F=figure(l); plot(theta3*180/pi,theta2*l80/pi) axis([0 360 10 40]) set(gca,’XTick’,[0:30:360]) title(’Follower angle vs. cam angle’) xlabel('Cam angle, \theta_3 (deg)’) ylabel(’Follower angle, \theta_2 (deg)’) grid on saveas(F,’HW3_Prob2_plotl.pdf’) F=figure(3); plot(theta3*180/pi,r) axis([0 360 65 115]) set(gca,’XTick’,[0:30:3601) title(’Contact point position vs. cam angle’) xlabel(’Cam angle, \theta_3 (deg)’) ylabel(‘Contact Point, r (cm)’) ‘grid on 'saveas(F,’HW3_Prob2_plot2.pdf’) %plot the results of the numerical analysis F=figure(2); for i=l:length(theta3) plot(Px,Py,’—’, [0 Px(i) Ax(i)],[0 Py(i) Ay(i)],'—o’,... [r1 camCenterX(i) camCenterX(i)+R*cos(theta3+theta3(i))],... [0 camCenterY(i) camCenterY(i)+R*sin(theta3+theta3(i))],’——’) legend(’Coupler Curve’,’Cam Follower’,’Cam’,’Location’,’NorthWest’) xlabel(’X [cm]’) ylabel(’Y [cm]’) axis equal axis([—20 180 —60 100]) grid on title(’Coupler curve and mechanism configuration’) M(i)=getframe(F,[O O 512 384]); end movie2avi(M,’HW3Prob2.avi’) Coupler Curve —e— Cam Follower — — — Cam 0 20 Coupler curve and mechanism configuration 40 60 80 1 00 1 20 X [cm] Follower angle, 62 (deg) 40 35 00 O N 01 N O 15 1O 30 60 90 120 Follower angle vs. cam angle 150 180 210 Cam angle, 63 (deg) 240 270 Contact Point, r (cm) 115 110 105 100 95 90 85 80 75 70 65 3O 60 90 a WW 1 Contact point position vs. cam angle 120 150 180 210 240 Cam angle, 63 (deg) 270 300 330 360 9/17/09 1:08 AM MATLAB Command Window 1 of l .~)rl = 100 r2 II 150 20 4O theta2 = 0.3218 theta2max = ) 0.6435 thetaZmin theta2max = x 5 o . 6 4 3 5/ :17 ”"’ fl/EhetaZmin = / ) ‘ o . 2 0} 4/// >> ...
View Full Document

Page1 / 14

Homework3Solutions - mg 32% MW-“ ~ 1) Ma JILL Newwa...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online