The diagram shows a robot with a telescoping arm.

Note the two basic variables:

θ= angular inclination of the arm (rads)

R = length of the arm (meters)

Each of these variables can be controlled separately.

In any practical situation, the manipulator (the component at the end of the arm) has to move in a prescribed way. Suppose that the angle θ can be increased or decreased, in response to commands from a computer. While this is happening, the arm can also be extended or retracted. We want to obtain a mathematical description of how R should be adjusted, in relation to θ, so that the manipulator will trace out a particular path.

(Note that the control of an actual robot is a much more complicated affair. For example, movements have to be graduated, because of inertia, and in order to prevent excessive strain on mechanical linkages. Robots are programmed to move according to complex dynamical equations that take into account velocity, acceleration, and mass distributions.)

In the above diagram, the points A, B, and C lie in one vertical plane. Suppose that the manipulator of the robot has to make the following repetitive movements: from point A to point B to point C, then back to A via the shortest (diagonal) route. Find the formulas (in terms of R and θ) that will be needed in programming these movements.

The familiar Cartesian, or x-y coordinate system is not the only way of describing the location of points in space. Some physical problems become easier when formulated in terms of a coordinate system that matches the inherent geometry of the problem. Our problem is essentially rotational, and the polar coordinate system is particularly suited to such a configuration.

In the diagrams above we see the point P described in two different ways: first in terms of the usual displacements x and y, and again in terms of the two rotational variables R and θ.

Suppose that x = y = 1.

Then the point can be given in rectangular (Cartesian) form:

(x,y) = (1,1)

Or it can be given in polar form:

Applying right-angle trigonometry, we can obtain these conversion formulas:

x = R cos( θ) and y = R sin(θ)

In either system, it is possible to express a relation between the two variables.

In the Cartesian system, we write functions in the form y(x), where y depends on x:

for example, y(x) = 3x + 10

In the polar system, we write functions in the form R(θ), where R depends on θ:

for example, R(θ) = 3θ + 10

In both systems we obtain points in the same way: we assign progressive values to the independent variable ( x or θ) and use the equation to determine the corresponding value of the dependent variable (y or R). Thus we obtain a set of points which can be plotted. The two functions shown above look the same, but they describe quite different curves. In the Cartesian system we get a straight line, in the polar system we get a spiral.

The manipulator of the robot is supposed to trace out three connected line segments: AB, BC, CA in succession. The first is a vertical line, the second a horizontal line, and the third a general line with some slope and intercept. We will write each line in Cartesian form and convert to polar form.

Segment AB has equation x = 3.5, so R cos(θ) = 3.5, and

R(θ) = 3.5 / cos(θ)

Segment BC has equation y = 2, so R sin(θ) = 2, and

R(θ) = 2 / sin(θ)

Segment CA has equation y = m x + b, where m = slope and b = intercept.

This becomes, in polar form, R sin(θ) = m R cos(θ) + b.

Solving for R we obtain R = b / ( sin(θ) - m cos(θ)).

Now, segment CA passes through the points (1,2) and (3.5,1). From this we find that slope m = - 0.4 and intercept b = 2.4 Substituting these values, we obtain the polar equation for segment CA:

R(θ) = 2.4 / (sin(θ) + 0.4 cos(θ))

Now we can imagine a program using the above formulas as follows: it allows angle θ to increase in small steps (at a predetermined rate), and for each θ it computes the appropriate value of R. These values of θ and R are passed on to two motors, which will continuously set the robot arm to the appropriate inclination and length, thus tracing out the desired movement.

But we still lack something. Each of our formulas is valid for only a certain range of the angle θ. We need to specify the value of θ at the start and the end of each segment, where we change from one formula to the next.

Let θ1, θ2, θ3 be the values of θ which correspond to points A, B, and C.

Then, doing right-angle trigonometry, we find:

We now have the information that is needed by the controlling program:

For θ increasing from 0.278 to 0.519, R = 3.5 / cos(θ)

For θ increasing from 0.519 to 1.107, R = 2 / cos(θ)

For θ decreasing from 1.107 to 0.278, R = 2.4 / ( sin(θ) + 0.4 cos(θ))