hello there my name is nick and i am currently studying mechanical engineering in the uk, firstly thank you for taking time to read this and secondly i'll jump right in.

I am aiming to write a MATLAB programme that will model the action of an upright piano mechanism. This involves doing some analysis on a four bar linkage.

The set up is as follows: (note link AB is grounded i.e. theta1 = 0 at all times)

see attachment

i have succeeded in a positional and velocity analysis by using a vector loop equation to generate equations that can be solved to obtain positions and velocities of the links when given the angle theta 2. I now need to conduct an acceleration analysis that will enable me to obtain the accelerations of the links when the acceleration of the input link is known i.e. theta2 double dot

i am struggling with this and any help on how to approach the problem would be greatly appreciated.