This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Appendix F : Matlab Code % Garrett H. Baker % ME 352 % PROJECT 2 % LAB DIVISION 2 % % GET EXTREME % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ANALASIS OF GEARED FIVEBAR LINKAGE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % CODE DOES THE FOLLOWING: % 1. POSITION ANALYSIS % 2. FIRSTORDER KINEMATIC COEFFICIENTS % 3. SECONDORDER KINEMATIC COEFFICIENTS % 4. CALCULATES ANGULAR VELOCITY % 5. CALCULATES ANGULAR ACCELERATION % 6. CALCULATES POSITION OF COUPLER POINT P % 7. CALCULATES FIRSTORDER KINEMATIC COEFFICIENTS FOR COUPLER POINT % P % 8. CALCULATES SECONDORDER KINEMATIC COEFFICIENST FOR COUPLER POINT % P % 9. CALCULATES VELOCITY OF COUPLER POINT P % 10. CALCULATES ACCELERATION OF COUPLER POINT P % 11. CALCULATES TOTAL X & Y DISPLACEMENTS OF COUPLER POINT P % 12. DETERMINES MINIMUM AND MAXIMUM X AND Y DISPLACEMENTS OF % COUPLER POINT P AND THE CORRESPONDING INPUT ANGLE % 13. CALCULATES THE UNIT TANGENT VECTOR TO THE PATH OF COUPLER POINT % P % 14. CALCULATES THE UNIT NORMAL VECTOR TO THE PATH OF COUPLER POINT % P % 15. CALCULATES THE RADIUS OF CURVATURE OF THE PATH OF COUPLER % POINT P % 16. CALCULATES THE CENTER OF CURVATURE OF THE PATH OF COUPLER POINT % P. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clc clear clc % Allowing User Input for the case to be analyzed. This is because for % this project, the main part of the analysis was to analyze how the geared % five bar mechanism reacts to different values for the gear ratios. Appendix F : Matlab Code design = input( 'Enter the case number you wish to analyze: \n' ); % Assigning values for the radius of gears 2 and 3 based on the users % input. Also, the length and increments of theta_2 is determined based on % the user's input. if design == 1; ro_2 = 2; ro_3 = 4; theta_2 = (0:10:720)*(pi/180); end if design == 2; ro_2 = 3; ro_3 = 3; theta_2 = (0:5:360)*(pi/180); end if design == 3; ro_2 = 4; ro_3 = 2; theta_2 = (0:5:360)*(pi/180); end % Given Value for angular velocity of link 2 omega_2 = 10; omega_2_squared = (omega_2)^2; % Angles for links 15 & beta in degrees. The angle beta is the angle % between AP and link 4. theta1 = 0; theta2 = 0:5:360; theta3 = 30; theta4 = 69; theta5 = 137; Beta = 30; % Given values for the length of links 15 and distance AP (R7) R1 = 6; R2 = 2.5; R3 = 3.5; R4 = 6; R5 = 6; R7 = 8; % Conversion factor used throughout the program in order to convert from % degrees to radiangs. conversion = pi / 180; % converting initial values the angles from degrees to Radians. theta_1 = theta1 * conversion; theta_3_initial = theta3 * conversion; theta_4 = theta4 * conversion; theta_5 = theta5 * conversion; Appendix F : Matlab Code Beta = Beta * conversion; % Calculated values for theta_3 prime and theta_3_double prime....
View
Full
Document
This note was uploaded on 02/03/2012 for the course ME 352 taught by Professor Staff during the Fall '08 term at Purdue UniversityWest Lafayette.
 Fall '08
 Staff

Click to edit the document details