Matlab Analysis

Matlab was used to run a position, velocity, and acceleration analysis on the the head linkage, and a position analysis on the arm linkages. a single code was used to run the analysis for all of the linkages, because the motion of the arm linkages are dependent on the motion of the head linkage. Also, only one arm was analyzed, because the motion of each arm mirrors the other so knowledge of one arm's motion gives knowledge of the other arm's. 

These are all of the known quantities starting out. both those controlled by the geometry of the mechanism, and those controlled by the user through the input shaft. all lengths are in inches and angles are in degrees. A constant 30 RPM input speed was used because testing showed a half turn per socond was about the standard turning speed of a user. 

The Head Linkage was analyzed first because the arm linkages need knowledge of motion of the head linkage's slider to analyze. All of the calculated values were also converted into the Global X and Y coordinate system. Two functions were used to analyze the motion of the head, one to analyze the angular motion, and one to analyze the linear motion. 

The angular function takes the link lengths and the input values and calculates the angle, angular velocity, and angular acceleration of the body link in the linkage. 

The linear function takes the known values, and those calculated from the angular function, and calculated the linear velocity and acceleration of point 'B', which is the point of connection between the body and neck linkage. these values are indicative of the velocity and acceleration that entire link. 

The analysis of the arm linkage takes the position of the neck linkage as an input, and calculates the angle each arm link makes with horizontal, using knowledge of the geometry of the arm link's connection points. it then calculates how far out of the body the arm link is, by using knowledge of the distance of the neck link from the side of the body, the angle of the arm link, and the total length of the arm link. 


Finally, all of the desired values are plotted against the angle of the cam shaft