# Optimization of link lengths for 3R serial manipulator

I am trying to formulate an optimization problem for determining link lengths of 3R manipulator shown in picture below,

Following are the constraints,

1. Robot arm should be reachable at point x = 100, y =0

2. Link 3 should sweep minimum 60 deg. angle at the end point (i.e. min Φ = 240 deg, max Φ = 300 deg)

3. $20°\leq\theta_{1}\leq160°$, $200°\leq\theta_{2}\leq340°$, $200°\leq\theta_{3}\leq340°$

Objective is to minimize $l_{1} + l_{2} + l_{3}$

How can I define 2nd constraint of minimum sweep angle mathematically?

Reference for 3R Robot kinematics: http://www.seas.upenn.edu/~meam520/notes/planarkinematics.pdf

Current Formulation:

$Minimize f(x) = l_{1} + l_{2} + l_{3}$

$Subject \:to \: \: l_{1}\cos(\theta_{1})+l_{2}\cos(\theta_{1}+\theta_{2})+l_{3}\cos(\theta_{1}+\theta_{2}+\theta_{3}) = 100$

$\: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \:l_{1}\sin(\theta_{1})+l_{2}\sin(\theta_{1}+\theta_{2})+l_{3}\sin(\theta_{1}+\theta_{2}+\theta_{3}) = 0$

$\: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: 20°\leq\theta_{1}\leq160°$

$\: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: 200°\leq\theta_{2}\leq340°$

$\: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: \: 200°\leq\theta_{3}\leq340°$

Suppose we break the chain of the original robot $R$ into two: $R_1$ with two links (the first and the second links of $R$), $R_2$ with one link. $R_1$ is based at the base of $R$ while $R_2$ is based at your grasping point. See figure.
When link 3 sweeps $60^\circ$, $R_2$ will trace an arc of a circle. Then what you want is that $R_1$ can also trace the arc traced by $R_2$.
I think it is the case that this two-link robot can trace out any smooth curve within its reachable region (the circle of radius $l_1 + l_2$ centered at the case of $R_1$). (You will need to prove (or disprove) this, but I guess it's not too difficult.) So you just need to make sure that the arc drawn by $R_2$ lies inside the reachable region of $R_1$.