3. Kinematic Analysis and MATLAB Logical Functions

The first step in analyzing the pick and place mechanism was breaking it up into vectors that we can model using a vector loop. With the mechanism we choose based on the YouTube video, there is not a efficient way to model the mechanism using just one vector loop so we split the mechanism into two loop. One loop would be a four bar linkage mechanism including the crank. The second loop would be a three bar double slider mechanism with one of the slider theta's obtained from the previous four bar linkage mechanism analysis. We identified that the constraints of the guider make it such that, for one of the sliders, it would have a changing length at a constant theta for 0 degrees, a constant length and changing theta for 0 to 90 degrees, and lastly a changing length and constant theta at 90 degrees and would loop back to zero. We decided it would be appropriate to model this specific complex path as a piecewise function for the rest of the analysis. After obtaining all our vector loop equations, we simply took time derivatives to get velocities and accelerations. Lastly, a simply mobility calculation using Grashoff Law confirmed that our mechanism had one degree of freedom. The following pictures illustrates the handwritten mechanism analysis:





In order to plot the piecewise function in MATLAB, we had to create logic to tell the computer which function in the piecewise function to use. We realize that the piecewise function could be solely dependent on the length of the second slider (L6) to distinguish which function to use. In every iteration of the code, all three scenarios were calculated. Then conditions were checked for if the functions yielded a radius below or over the constant radius determined beforehand. Based on this constant radius, only one function would have solutions that would make sense and a simple if statement was used to choose the correct one. The code can be seen in Appendix A. Finally, after plotting theta going from 0 to 360 degrees, we obtained the following demonstration:



All relevant angular and sliding velocities and accelerations can be seen in the following plots: