Position Analysis (Vector Loop Method)
Fourbar Linkage Vector Loop Equations
The derivation of the vector loop equation for a fourbar linkage mechanism involves defining the position vectors of the links and the angles between them. The fourbar linkage consists of four links connected by four joints, forming a closed loop as shown in the figure below.

Vector Loop Equation
The vector loop equation is derived by summing the position vectors around the closed loop of the fourbar linkage and setting their sum to zero:
\[\mathbf{R}_{A} + \mathbf{R}_{BA} - \mathbf{R}_{BO4} - \mathbf{R}_{O4} = 0 \nonumber\]To obtain an alternative form of the equations, often used in analysis, complex number notation can be used for the position vectors. Using complex notation, the following is obtained
\[a e^{j\theta_2} + b e^{j\theta_3} - c e^{j\theta_4} - d e^{j\theta_1} = 0 \nonumber\]where $a$, $b$, $c$ and $d$ represent the scalar length of each of the links.
Euler’s equation, $e^{j\theta} = (\cos \theta + j \sin \theta)$ may also be substituted into the equations to obtain this form
\[\begin{align*} &a\left(\cos \theta_2 + j \sin \theta_2\right) + b\left(\cos \theta_3 + j \sin \theta_3\right) - \\ & c\left(\cos \theta_4 + j \sin \theta_4\right) - d\left(\cos \theta_1+j \sin \theta_1\right) = 0 \end{align*}\]Solving the Vector Loop Equation
Start from the complex vector-loop equation
\[a e^{j\theta_2} + b e^{j\theta_3} - c e^{j\theta_4} - d e^{j\theta_1} = 0.\]Using Euler’s relation,
\[e^{j\theta} = \cos \theta + j \sin \theta,\]the loop equation becomes
\[a(\cos\theta_2 + j\sin\theta_2)+b(\cos\theta_3 + j\sin\theta_3)-c(\cos\theta_4 + j\sin\theta_4)-d(\cos\theta_1 + j\sin\theta_1)=0.\]Separating the real and imaginary parts gives
Real part:
\[a \cos \theta_2 + b \cos \theta_3 - c \cos \theta_4 - d \cos \theta_1 = 0\]Imaginary part:
\[a \sin \theta_2 + b \sin \theta_3 - c \sin \theta_4 - d \sin \theta_1 = 0.\]If the ground link is aligned with the $x$-axis, then $\theta_1 = 0$, so these reduce to
\[a \cos \theta_2 + b \cos \theta_3 - c \cos \theta_4 - d = 0\]and
\[a \sin \theta_2 + b \sin \theta_3 - c \sin \theta_4 = 0.\]The derivation below keeps the same notation used in the Week 2 lecture notes, where the grouped parameters are denoted by $A$ to $F$.
Derivation for $\theta_4$
Rearrange the two scalar equations to isolate the $\theta_3$ terms:
\[b \cos \theta_3 = d + c \cos \theta_4 - a \cos \theta_2\] \[b \sin \theta_3 = c \sin \theta_4 - a \sin \theta_2.\]Square both equations and add them:
\[b^2 \cos^2 \theta_3 + b^2 \sin^2 \theta_3 = (d + c \cos \theta_4 - a \cos \theta_2)^2 + (c \sin \theta_4 - a \sin \theta_2)^2.\]Using $\cos^2 \theta_3 + \sin^2 \theta_3 = 1$ gives
\[b^2 = (d + c \cos \theta_4 - a \cos \theta_2)^2 + (c \sin \theta_4 - a \sin \theta_2)^2.\]Expand and simplify with $\cos^2 \theta_2 + \sin^2 \theta_2 = 1$ and $\cos^2 \theta_4 + \sin^2 \theta_4 = 1$:
\[b^2 = a^2 + c^2 + d^2 - 2ad \cos \theta_2 + (2cd - 2ac \cos \theta_2)\cos \theta_4 - 2ac \sin \theta_2 \sin \theta_4.\]Move everything to one side:
\[(2cd - 2ac \cos \theta_2)\cos \theta_4 - 2ac \sin \theta_2 \sin \theta_4 + (a^2 - b^2 + c^2 + d^2 - 2ad \cos \theta_2) = 0.\]It is convenient to define
\[A = 2cd - 2ac\cos\theta_2, \qquad B = -2ac\sin\theta_2, \qquad C = a^2 - b^2 + c^2 + d^2 - 2ad\cos\theta_2.\]Then the equation becomes
\[A \cos \theta_4 + B \sin \theta_4 + C = 0.\]Now define
\[t_4 = \tan\left(\frac{\theta_4}{2}\right), \qquad \cos\theta_4 = \frac{1-t_4^2}{1+t_4^2}, \qquad \sin\theta_4 = \frac{2t_4}{1+t_4^2}.\]Substituting into the grouped equation gives
\[A\left(\frac{1-t_4^2}{1+t_4^2}\right) + B\left(\frac{2t_4}{1+t_4^2}\right) + C = 0.\]Multiply through by $1+t_4^2$:
\[A(1-t_4^2) + 2Bt_4 + C(1+t_4^2) = 0.\]Expand and collect terms:
\[(C-A)t_4^2 + 2Bt_4 + (A+C) = 0.\]This is the quadratic in $t_4$. Solving gives
\[t_4 = \frac{-2B \pm \sqrt{(2B)^2 - 4(C-A)(A+C)}}{2(C-A)}.\]Therefore,
\[\theta_{4,1}=2\tan^{-1}(t_{4,1}), \qquad \theta_{4,2}=2\tan^{-1}(t_{4,2}).\]Derivation for $\theta_3$
Now rearrange the scalar equations to isolate the $\theta_4$ terms:
\[c \cos \theta_4 = a \cos \theta_2 + b \cos \theta_3 - d\] \[c \sin \theta_4 = a \sin \theta_2 + b \sin \theta_3.\]Square both equations and add them:
\[c^2 \cos^2 \theta_4 + c^2 \sin^2 \theta_4 = (a \cos \theta_2 + b \cos \theta_3 - d)^2 + (a \sin \theta_2 + b \sin \theta_3)^2.\]Using $\cos^2 \theta_4 + \sin^2 \theta_4 = 1$ gives
\[c^2 = (a \cos \theta_2 + b \cos \theta_3 - d)^2 + (a \sin \theta_2 + b \sin \theta_3)^2.\]Expand and simplify with $\cos^2 \theta_2 + \sin^2 \theta_2 = 1$ and $\cos^2 \theta_3 + \sin^2 \theta_3 = 1$:
\[c^2 = a^2 + b^2 + d^2 - 2ad \cos \theta_2 + (2ab \cos \theta_2 - 2bd)\cos \theta_3 + 2ab \sin \theta_2 \sin \theta_3.\]Move everything to one side:
\[(2ab \cos \theta_2 - 2bd)\cos \theta_3 + 2ab \sin \theta_2 \sin \theta_3 + (a^2 + b^2 + d^2 - c^2 - 2ad \cos \theta_2) = 0.\]Define
\[D = 2ab\cos\theta_2 - 2bd, \qquad E = 2ab\sin\theta_2, \qquad F = a^2 + b^2 + d^2 - c^2 - 2ad\cos\theta_2.\]Then the equation becomes
\[D \cos \theta_3 + E \sin \theta_3 + F = 0.\]Now define
\[t_3 = \tan\left(\frac{\theta_3}{2}\right), \qquad \cos\theta_3 = \frac{1-t_3^2}{1+t_3^2}, \qquad \sin\theta_3 = \frac{2t_3}{1+t_3^2}.\]Substituting into the grouped equation gives
\[D\left(\frac{1-t_3^2}{1+t_3^2}\right) + E\left(\frac{2t_3}{1+t_3^2}\right) + F = 0.\]Multiply through by $1+t_3^2$:
\[D(1-t_3^2) + 2Et_3 + F(1+t_3^2) = 0.\]Expand and collect terms:
\[(F-D)t_3^2 + 2Et_3 + (D+F) = 0.\]This is the quadratic in $t_3$. Solving gives
\[t_3 = \frac{-2E \pm \sqrt{(2E)^2 - 4(F-D)(D+F)}}{2(F-D)}.\]Therefore,
\[\theta_{3,1}=2\tan^{-1}(t_{3,1}), \qquad \theta_{3,2}=2\tan^{-1}(t_{3,2}).\]