Our analysis was split into two parts, the kinematics of the four-bar and the dynamics introduced by the spring.
Kinematics
We began analyzing our four-bar mechanism with a simple vector loop. We then went ahead and took the first derivative and second derivative for the velocity and acceleration analysis of the mechanism. The following images will show the sequence of steps done to derive our functions to plug in later on in Matlab.