Chapter 3: Relating Physics and Mathematics to Robotics

In November 1981, the space shuttle Columbia carried into orbit a slender jointed arm about fifteen metres long. It was called Canadarm, and on the ground it weighed a little over 400 kilograms. In orbit it could take hold of a satellite weighing several tonnes, lift it clear of the payload bay and set it down again gently enough not to damage a solar panel. Fig. 3.0-1 shows the arm at work above the Earth.

Photograph

Fig. 3.0-1 – the Canadarm (Shuttle Remote Manipulator System) extended from a space shuttle payload bay in orbit, with the full length of the arm and at least two of its joints clearly visible against the Earth or the blackness of space; the shuttle bay must be in frame so the scale of the arm is obvious. Sourcing note: NASA mission photography is the natural source and is generally free to use with credit; a close crop showing only the gripper, or an artist’s rendering, would be unusable here because the point of the image is the length of the arm relative to what it is holding.

Yet if that same arm had been bolted to the floor of a school workshop and switched on, it would have sagged and buckled under its own weight. It was never built to hold itself up on Earth. Engineers tested it on air-bearing floors and hung it from counterweights, because gravity was the one load it could not carry.

Nothing about the arm itself changed between the workshop and orbit. What changed was the physics acting on it — the force its joints had to overcome, the turning effect each motor had to produce, and the distance from each joint to the load it carried. And behind all of it sat the mathematics that told the arm’s controller where its gripper actually was, using nothing but a set of measured joint angles.

NoteCuriosity Corner

Q1. How can a robot arm move a satellite of several tonnes in orbit, and still be unable to lift itself on Earth? Q2. Why does a motor at a robot’s shoulder have to work harder when the arm is stretched out than when it is folded in, even though the load is the same? Q3. If a robot only measures the angle at each of its joints, how does it work out where the tip of its gripper is? Q4. A mobile robot has to reach a speed of 1 m/s in 2 seconds. How far will it have travelled by the time it gets there? Q5. Why does a robot keep measuring while it moves, instead of simply carrying out the instructions it was given?

Each of these questions is answered somewhere in this chapter, at the point where the physics or the mathematics behind it has been explained.

3.1 The Physical and Mathematical Basis of Robot Behaviour

You have probably watched a lift stop exactly level with the floor, or an automatic gate slide open and then hold itself still. Machines that move on their own are ordinary enough. A robot belongs to the same family, but it is asked to do something harder. It must move a chosen part of itself to a chosen place, at a chosen speed, while carrying a chosen load — and then do it again tomorrow, to the same place.

Every one of those choices is a physical quantity with a number and a unit attached to it. A place is a distance in metres from somewhere. A speed is metres per second. A load is a mass in kilograms, which presses down with a force in newtons. Once you accept that, robotics stops being a matter of clever gadgets and becomes a matter of physics and mathematics applied to a machine.

Consider an arm of the kind shown in Fig. 3.1-1. Two rigid rods are joined end to end, each joined at a pivot that a motor can turn. The rigid rods are called links — a link is a rigid part of a robot that does not bend or change length while the robot works. The pivots are called joints — a joint is the connection between two links that allows one to move relative to the other. At the far end sits the gripper.

Diagram

Fig. 3.1-1 – a two-link robot arm mounted on a bench; the fixed base at the left, link 1 running from the base to a middle pivot, link 2 running from that pivot to a gripper holding a small block; each pivot marked with a circle and labelled “joint 1” and “joint 2”, each with a curved arrow showing the direction it can turn; the links labelled “link 1” and “link 2” with their lengths marked; a downward arrow at the gripper labelled “weight of the load”; a dashed straight line drawn from the base to the gripper and labelled “position of the end-effector”

The gripper is the part that actually does the job the robot was bought for, and it has a name of its own.

NoteDefinition

(The end-effector is the device fitted at the free end of a robot arm — a gripper, a welding tool, a suction cup, a camera mount — that acts directly on the workpiece or the environment. Its position and orientation are always stated with respect to a chosen reference point on the robot, usually its fixed base.)

What physics contributes

Physics answers the question what will happen. If the shoulder motor turns joint 1 at a steady rate, where will the gripper be one second from now? If a 2 kg block is held at the end of a link half a metre long, how hard must the shoulder motor pull to stop the arm sagging? If the robot is moving at 1 m/s and must stop within 20 cm, how quickly must it slow down, and will the block slide out of the gripper while it does?

None of these can be settled by looking at the machine. They are settled by the study of motion, of force and turning effect, and of how a system corrects itself while it runs. That is why this chapter begins with those three ideas.

Physics is also what warns you in advance. Building an arm and only then discovering that the shoulder motor stalls the moment a load is added is an expensive way to learn arithmetic. The whole point of predicting behaviour on paper is that a machine which cannot work is identified before any metal is cut.

What mathematics contributes

Mathematics answers a different question: how do we write it down. Saying that the gripper is “up and to the right” is useless to a controller. The controller needs a position expressed as numbers, measured from a stated starting point, along stated directions.

A quantity such as position, velocity or force has both a size and a direction, and the mathematical object that carries both is the vector. That is why vectors appear in this chapter — they are the natural way to record where something is and which way a force pushes.

Matrices then solve a second problem. A robot arm is a chain: the tool is fixed to the last link, that link is fixed to the previous joint, and so on back to the base. Each joint contributes a turn, and sometimes a shift. Matrices let each of those small movements be written in the same standard form and multiplied together, so that a chain of five joints collapses into a single calculation giving the position of the tool. Without that, every new arm design would need its own tangle of trigonometry worked out by hand.

From description to method

Physics and mathematics together give a description of the machine. A working robot needs one more step: the description has to become a method — a definite sequence of steps that the controller carries out, in order, thousands of times a second. Measure the distance to the wall. Compare it with the distance you wanted. Decide which way to correct. Send the correction to the motor. Measure again.

That sequence is what turns a set of equations into behaviour, and section 3.4 takes it up in detail.

Numbers, not adjectives

There is a habit worth building early. In engineering, a quantity is not described by an adjective but by a number, a unit, and the condition under which it holds. A motor is not “strong”; it produces a stated turning effect, in newton metres, at a stated supply voltage. A robot is not “fast”; it moves its tool at a stated speed, in metres per second, carrying a stated load.

Throughout this chapter, quantities are written in SI units: length in metres (m), mass in kilograms (kg), time in seconds (s), force in newtons (N), turning effect in newton metres (N·m) and angle in degrees (°) or radians (rad). Where a smaller unit is convenient, the conversion is stated the first time it is used — 1 m = 100 cm = 1000 mm, and 1 s = 1000 ms.

Q. A supplier says a motor is “powerful enough for a robot arm”. Why can that statement not be used as it stands?

A. Because it names no quantity and no condition. Whether a motor is adequate depends on the mass being lifted, how far that mass sits from the joint, and how quickly the joint must accelerate. Two arms carrying identical loads can need motors of very different sizes if their links differ in length. Until those numbers are worked out, “powerful enough” cannot be checked, and an unchecked claim is not a specification.

The rest of this chapter builds the tools that let you replace such adjectives with numbers: the equations of motion, the relations for force and turning effect, the idea of measuring and correcting, and the vector and matrix language in which positions and directions are recorded.

3.2 Principles of Motion in Robotics

A robot earns its name by moving. Everything else it carries — sensors, processors, batteries — exists so that something can be moved to the right place at the right moment. Before any of that can be designed, motion itself has to be described precisely.

Motion is the change in position of a body with time. In a robot, the bodies that move are its wheels, its links, its joints and the tool at the end of its arm. Each of them moves in a way that can be measured and predicted.

3.2.1 Motion, Kinematics and the Robot’s Moving Parts

When an engineer studies the motion of a robot, there are two quite different things that can be asked. The first is purely geometrical: given that this joint has turned through 30°, where is the tool now? The second brings in causes: what force was needed to turn that joint, and what did it cost in current from the battery?

The first study, which describes motion on its own terms without asking what caused it, is called kinematics.

NoteDefinition

(Kinematics is the study of the motion of a body — its position, velocity and acceleration — described with respect to a stated reference point, without considering the forces that produce that motion.)

Leaving out the forces is not laziness. It is a deliberate simplification that makes an otherwise impossible problem manageable. The path an arm follows through the air depends on the geometry of its links and the angles of its joints, and that geometry does not change whether the arm is loaded or empty. Once the geometry is settled, forces can be brought back in.

Kinematic analysis lets an engineer do three things that a working robot depends on. It gives the trajectory of the end-effector — the path in space that the tool follows from where it starts to where it must arrive, together with the timing along that path. It gives the joint angles needed to place the tool at a chosen point. And it gives the velocity and acceleration of every part of the machine at every instant along the way.

That last point is easy to underrate. A tool that arrives at the right place but arrives too fast will overshoot, jerk the load or shake the whole frame. Knowing how a robot moves between two points matters as much as knowing the two points.

The three kinds of motion in a machine

Look at any robot and its parts are moving in one of three ways. Something slides along a straight line. Something turns about an axis. Or the two happen together, which is what most useful machines actually do. The next three subsections take them in turn.

3.2.2 Linear Motion

Pull a drawer out of a table. Every point on the drawer moves the same distance in the same direction, along one straight line. That is the simplest motion a machine part can have.

NoteDefinition

(Linear motion is motion in which a body moves along a straight line, so that every point of the body undergoes the same displacement in the same direction. In a robot it is measured as a distance along a stated axis, usually in metres or millimetres.)

In robotics this motion is produced by a linear actuator — a device whose output moves in and out along a straight line rather than turning. It may be a rod driven out of a cylinder, a nut running along a threaded screw, or a carriage pulled along a rail by a toothed belt. The belt-and-rail arrangement is the one a student is most likely to meet, because it is what carries the print head of a 3D printer, as Fig. 3.2-1 shows.

Photograph

Fig. 3.2-1 – the print head of a desktop 3D printer mounted on its horizontal rail, with the toothed belt and at least one smooth guide rod clearly visible, and enough of the frame in shot to show that the head can only travel along that one straight line. Sourcing note: a workshop or maker-space photograph of an ordinary open-frame printer is ideal; a glossy product shot of a closed printer would be unusable because the belt and rail must be visible.

Straight-line motion of this kind is the whole basis of several familiar machines:

  • computer numerical control (CNC) machines and 3D printers, where a cutting or printing head is driven along each axis in turn;
  • Cartesian robots, whose three axes are three straight rails at right angles to one another;
  • lift and elevator mechanisms, where a platform is raised and lowered along a fixed vertical guide.

The advantage of a straight axis is that its arithmetic is simple. If a rail is 300 mm long and the carriage is 120 mm from one end, its position is 120 mm, and that is the end of the matter — no angles, no trigonometry. The disadvantage is reach: a straight axis can only serve points on its own line, so a machine built entirely from linear axes needs one axis for every direction it must cover.

3.2.3 Rotational Motion

Now open a door instead of a drawer. The door does not travel anywhere as a whole; it turns about the line of its hinges. Points near the hinge barely move, while the outer edge sweeps a wide arc.

NoteDefinition

(Rotational motion is motion in which a body turns about a fixed axis, so that every point of the body moves in a circle centred on that axis. It is measured as an angle turned through, in degrees or radians, about a stated axis.)

Rotation is the natural output of a motor, and it is by far the commonest motion inside a robot. It appears at the shoulder, elbow and wrist joints of an arm, where each joint turns one link relative to the one before it; at the wheels of a mobile robot; and at the rotors of a drone.

Because rotation is measured as an angle while the world outside is measured in metres, the two have to be connected. The link between them is the radius. A point at a distance \(r\) from the axis, turning at an angular velocity \(\omega\), moves along its circular path at a speed

\[v = \omega r\]

where \(v\) is the linear speed in m/s, \(\omega\) is the angular velocity in radians per second (rad/s) and \(r\) is the radius in metres. Fig. 3.2-2 shows the quantities on a driven wheel.

Diagram

Fig. 3.2-2 – a robot wheel seen from the side, drawn as a circle with its axle at the centre; the radius marked r from the axle to the rim; a curved arrow around the axle labelled with the angular velocity omega; a straight arrow drawn tangentially at the point where the wheel touches the ground, pointing forward and labelled with the linear speed v; the ground drawn as a horizontal line below the wheel

The radian needs a word of explanation, because motors are almost never rated in radians. One complete turn is \(2\pi\) radians, which is the same as 360°. A motor speed given in revolutions per minute (rpm) is converted to rad/s by

\[\omega = \frac{2\pi N}{60}\]

where \(N\) is the speed in rpm. The factor 60 turns minutes into seconds and the factor \(2\pi\) turns revolutions into radians.

linear speed of a robot from its wheel speed

Given: a mobile robot fitted with wheels of diameter 65 mm; each wheel is driven at 120 rpm.

Find: the forward speed of the robot in m/s.

Method: the rim of a rolling wheel moves at the same speed as the robot body, so \(v = \omega r\). The wheel speed must first be converted from rpm to rad/s, and the diameter converted to a radius in metres.

\[r = \frac{65\ \text{mm}}{2} = 32.5\ \text{mm} = 0.0325\ \text{m}\]

\[\omega = \frac{2\pi N}{60} = \frac{2\pi \times 120}{60} = 12.57\ \text{rad/s}\]

\[v = \omega r = 12.57 \times 0.0325 = 0.408\ \text{m/s}\]

the robot moves forward at about 0.41 m/s.

Check: 120 rpm is 2 revolutions each second, and one revolution carries the robot forward by one circumference, \(\pi \times 0.065 = 0.204\) m. Two of those in a second gives 0.41 m/s, which agrees. A speed of about 0.4 m/s is a brisk walking pace for a small robot, which is physically sensible.

putting rpm straight into a formula that needs rad/s What students do: they write \(v = \omega r\) with \(\omega = 120\) because the motor is labelled 120 rpm. What happens: the answer comes out as \(120 \times 0.0325 = 3.9\) m/s — a small laboratory robot apparently travelling faster than a person can run. The number is roughly ten times too large, and nothing in the working looks obviously wrong. The fix: convert first. Radians per second and revolutions per minute are different units of the same quantity, and \(\omega = 2\pi N / 60\) is the bridge between them. A quick sanity check on the final speed catches this error every time.

Measure the diameter of one of your robot’s wheels with a scale, and mark the rim with a strip of tape. Run the motor at a steady setting and count how many times the tape passes a fixed point in 30 seconds. Work out the wheel speed in rpm, then predict the robot’s speed from \(v = \omega r\), and check it by timing the robot over a measured 2 m of floor. Any difference between the two figures is worth explaining.

A motor being tested on the bench should be clamped, and the robot should never be left free to drive itself off the edge of a table. Keep fingers, hair and loose sleeves away from a wheel or a gear train while it is turning, and disconnect the battery before changing any wiring — a wheel that starts unexpectedly during rewiring can trap a finger between the tyre and the chassis.

3.2.4 Combined Motion

Linear and rotational motion look like opposites, and the distinction between them is worth fixing before they are put together.

Table 3.1 – linear motion vs rotational motion | Feature | Linear motion | Rotational motion | |—|—|—| | Path of a point | A straight line | A circle about a fixed axis | | Quantity measured | Displacement, in m or mm | Angle turned, in degrees or radians | | Speed quantity | Linear velocity, in m/s | Angular velocity, in rad/s | | Usual source in a robot | Linear actuator, lead screw, belt-and-rail carriage | Electric motor, directly or through gears | | Typical use | Raising a platform, extending a tool, moving a print head | Turning a joint, driving a wheel, spinning a rotor | | Reach it provides | Only points along its own axis | All points on a circle of a fixed radius |

Very few real machines use one kind alone. Most perform both at once, and this is what gives them their usefulness.

NoteDefinition

(Combined motion is motion in which a body undergoes linear and rotational motion together, so that its position and its orientation both change during the movement.)

The clearest example is the selective compliance assembly robot arm (SCARA), used on assembly benches and shown in Fig. 3.2-3. Two of its joints rotate in a horizontal plane, swinging the tool anywhere within a wide flat area, while a third axis moves the tool straight up and down. A component is picked up, carried across the bench by rotation, and pressed down into place by linear motion.

Diagram

Fig. 3.2-3 – a SCARA robot drawn in a simple three-quarter view; a fixed base column, a first horizontal link rotating about a vertical axis at the base, a second horizontal link rotating about a vertical axis at the elbow, and a vertical shaft at the end of the second link carrying a gripper; curved arrows on both rotating joints drawn in the horizontal plane, and a straight double-headed vertical arrow on the shaft; the horizontal plane of the two rotations indicated by a faint dashed rectangle

A mobile robot shows the same idea more simply. When it drives straight, both wheels turn at the same rate and the chassis moves along a straight line. When one wheel is slowed, the chassis both advances and turns, so its position and its heading change together.

Q. A drone rises vertically while its four rotors spin. Is that linear motion, rotational motion, or both?

A. Both, but at different levels. The rotors undergo rotational motion about their own axes; the body of the drone undergoes linear motion straight up. The rotation is what produces the lift, and the linear motion is what you actually observe. This is worth noticing generally: in a robot the motion of a part and the motion of the machine as a whole are often of different kinds, and it must always be clear which one is being described.

3.2.5 Applying the Equations of Motion

Once motion is described, it can be predicted. For a body moving along a straight line with an acceleration that does not change during the movement, three standard relations connect displacement, velocity, acceleration and time.

the equations of motion for uniform acceleration Statement: for a body moving in a straight line with constant acceleration \(a\), initial velocity \(u\), final velocity \(v\), displacement \(S\) and elapsed time \(t\): \(v = u + at\); \(S = ut + \frac{1}{2}at^2\); \(v^2 = u^2 + 2aS\). In words: the first gives the speed reached after a given time; the second gives the distance covered in that time; the third connects speed and distance without mentioning time at all. Why it holds: when acceleration is constant, velocity grows in equal steps in equal times, so the average velocity over the interval is simply \((u+v)/2\). All three relations follow from that. Used for: planning how quickly a robot may speed up and slow down, working out the length of rail a linear actuator needs, and calculating the distance a mobile robot will still travel after the command to stop is given. Watch out: all three assume the acceleration is constant for the whole interval being considered. A real journey usually has three intervals — speeding up, running steadily, slowing down — and each one must be handled separately.

The units must be consistent throughout: \(u\) and \(v\) in m/s, \(a\) in metres per second squared (m/s²), \(S\) in m and \(t\) in s. An acceleration is negative when the body is slowing down, and it is worth keeping that sign rather than dropping it, because the sign is what tells you which way the correction acts.

Fig. 3.2-4 shows why a real movement is broken into intervals.

Diagram

Fig. 3.2-4 – a velocity–time graph for a mobile robot completing one movement; horizontal axis time in seconds, vertical axis velocity in m/s; the curve rises as a straight sloping line from the origin, then runs flat at a constant velocity, then falls as a straight sloping line back to zero; the three parts labelled “accelerating”, “constant velocity” and “decelerating”; the area under the whole graph shaded and labelled “total distance travelled”

The area under such a graph is the distance covered, which is a useful check on any answer: a robot that speeds up steadily from rest to a speed \(v\) covers exactly half the distance it would have covered had it travelled at \(v\) for the whole time.

Q4. A mobile robot has to reach a speed of 1 m/s in 2 seconds. How far will it have travelled by the time it gets there?

A. one metre. Starting from rest, the robot’s velocity climbs steadily from 0 to 1 m/s, so its average velocity over those two seconds is half of 1 m/s, that is 0.5 m/s. Travelling at an average of 0.5 m/s for 2 s covers \(0.5 \times 2 = 1\) m. The same figure follows from \(S = ut + \frac{1}{2}at^2\) with \(u = 0\) and \(a = 0.5\) m/s². Notice that the answer is half of what an unwary estimate would give: the robot does not travel 2 m, because it spent the whole interval slower than its final speed.

Stopping is the case where these relations matter most, because a robot that cannot stop where it intends to is a hazard rather than a machine.

stopping distance and braking time for a warehouse robot

Given: a wheeled robot carrying a crate along a warehouse aisle at \(u = 0.8\) m/s. It must come to rest, \(v = 0\), within \(S = 0.5\) m of the point where the stop command is given.

Find: the deceleration required, and the time the stop will take.

Method: the distance is known and the time is not, so the third relation, \(v^2 = u^2 + 2aS\), gives the acceleration directly. The first relation, \(v = u + at\), then gives the time.

\[0^2 = (0.8)^2 + 2a(0.5)\]

\[0 = 0.64 + a\]

\[a = -0.64\ \text{m/s}^2\]

\[t = \frac{v - u}{a} = \frac{0 - 0.8}{-0.64} = 1.25\ \text{s}\]

the robot must decelerate at 0.64 m/s², and the stop takes 1.25 s.

Check: at a steady deceleration the average speed during the stop is \(0.8/2 = 0.4\) m/s, and \(0.4 \times 1.25 = 0.5\) m, which is the distance allowed. The negative sign on \(a\) is expected, because the robot is slowing down. A deceleration of about two-thirds of a metre per second squared is gentle — well under a tenth of the acceleration due to gravity — so the crate is unlikely to slide, which is physically sensible for a load being carried unsecured.

Q. Which of the three relations should you reach for first in a problem?

A. Look at what the question does not give you. If time is neither given nor asked for, use \(v^2 = u^2 + 2aS\), which does not contain \(t\). If distance is neither given nor asked for, use \(v = u + at\), which does not contain \(S\). The second relation, \(S = ut + \frac{1}{2}at^2\), is the one to use when time is known and the distance is wanted. Choosing on this basis saves you from solving two equations where one would have done.

Planned acceleration is not a refinement; it is what separates a machine that works from one that damages itself. A robot commanded to jump straight to full speed asks its motors for a large force in an instant, jerks whatever it is carrying, and stresses its own joints and frame. The same movement, planned as a smooth rise to speed and a smooth fall back to rest, arrives at the same place in barely more time and does none of that harm.

3.3 Principles of Force and Torque in Robotics

Kinematics tells you where a robot’s parts will be. It does not tell you whether the machine can actually get them there. A joint moves only when something pushes or turns it, and the size of that push decides which motor must be bought, how thick the link must be, and how heavy an object the robot may safely pick up.

Every robotic system depends on this — a two-joint arm on a workshop bench, a wheeled robot climbing a ramp, a drone holding itself steady in a breeze. All of them work by producing forces and turning effects in the right amounts, at the right places.

3.3.1 Force and the Movement of Robot Parts

A force is a push or a pull acting on a body. Its effect is to change the body’s state of motion, and how much change it produces depends on how massive the body is.

Newton’s second law of motion Statement: the acceleration produced in a body is directly proportional to the net force acting on it and inversely proportional to its mass, so that \(F = ma\), where \(F\) is the net force in newtons (N), \(m\) is the mass in kilograms (kg) and \(a\) is the acceleration in m/s². In words: to change a motion faster, push harder; to change a heavier thing at the same rate, push harder still. Why it holds: force is the rate at which momentum changes, and for a body of fixed mass the momentum \(mv\) can only change if the velocity changes, that is, if the body accelerates. Used for: sizing an actuator, deciding whether a gripper can hold a load, and predicting whether a robot can stop within a given distance. Watch out: \(F\) is the net force — the total of everything acting, including gravity and friction. A motor that produces exactly the force needed to accelerate a load, and nothing more, will not move it at all once friction is counted.

The word “net” is where most of the engineering lies. When a robot arm lifts an object, several forces act at the same moment:

  • the gravitational force pulling the object downward, which is its weight;
  • the applied force exerted by the actuator or motor through the link;
  • the reaction force from the object and from whatever surface or structure it touches;
  • friction, at every joint and bearing, always opposing the motion.

Fig. 3.3-1 shows these acting together on a single load.

Diagram

Fig. 3.3-1 – a robot gripper holding a rectangular block, drawn at the end of a horizontal link; a downward arrow from the centre of the block labelled “weight, W = mg”; an upward arrow at the gripper labelled “force applied by the actuator, F”; a pair of horizontal arrows pressing inward on the two faces of the block labelled “gripping force”; a small arrow at the joint labelled “friction opposing motion”; a note that the block is lifted only when the upward force exceeds the weight

A robot is designed so that the applied force is at least equal to the forces opposing motion. If it is exactly equal, the load is held but does not move; if it is greater, the load accelerates upward. If it is less, the arm sags however good the program is.

Weight deserves care, because it is a force and not a mass. A body of mass \(m\) has weight

\[W = mg\]

where \(g\) is the acceleration due to gravity, taken as 9.8 m/s² near the Earth’s surface. A mass of 1 kg therefore weighs 9.8 N. The mass is a property of the object; the weight depends on where the object is.

quoting a load in kilograms as though it were a force What students do: they write “the gripper must supply 2 kg of force” for a 2 kg component. What happens: the number is carried into \(\tau = F \times r\) or into a motor calculation as though it were newtons, and every result afterwards is about ten times too small. The fix: convert first. A 2 kg mass has a weight of \(2 \times 9.8 = 19.6\) N, and it is that 19.6 N which the arm must support. Keep kilograms for mass and newtons for force, and the mistake cannot arise.

force needed to raise a component

Given: a robot gripper holds a component of mass \(m = 1.2\) kg and must raise it with an upward acceleration of \(a = 0.5\) m/s². Take \(g = 9.8\) m/s² and neglect friction.

Find: the upward force the actuator must apply.

Method: two forces act vertically — the applied force \(F\) upward and the weight \(mg\) downward. Newton’s second law applies to the net force: \(F - mg = ma\).

\[F = m(g + a)\]

\[F = 1.2 \times (9.8 + 0.5)\]

\[F = 1.2 \times 10.3 = 12.36\ \text{N}\]

the actuator must apply about 12.4 N.

Check: the weight alone is \(1.2 \times 9.8 = 11.76\) N, so the extra 0.6 N is what produces the acceleration. The required force is a little larger than the weight, as it must be for the component to rise rather than merely hang, and that is physically sensible.

Notice what happens if the acceleration is set to zero in that calculation: the force falls to exactly the weight, 11.76 N. Merely holding a load still is not free — it costs a force every second the load is held.

Q1. How can a robot arm move a satellite of several tonnes in orbit, and still be unable to lift itself on Earth?

A. because mass and weight are not the same thing. In orbit, the satellite and the arm are both in free fall around the Earth, so neither presses down on the other; the arm never has to support the satellite’s weight. All it has to supply is the small force needed to accelerate that mass gently into position, and \(F = ma\) shows that a slow acceleration needs only a small force even when \(m\) is enormous. On the ground, the same arm must supply a force equal to its own weight, \(W = mg\), at every joint, simply to stop itself collapsing — and it was never built with joints strong enough for that. A large mass is not the difficulty. A large weight is.

3.3.2 Torque and the Moment Arm

Push a door at its handle and it swings easily. Push it just as hard right beside the hinge and it barely moves. The force is the same in both cases; what has changed is where it was applied.

This turning effect of a force is called torque, and it is the rotational counterpart of force. Where force produces linear acceleration, torque produces rotation about an axis.

NoteDefinition

(Torque is the turning effect produced by a force about a stated axis or pivot. Its magnitude is the product of the force and the perpendicular distance from the axis to the line of action of that force, and it is measured in newton metres (N·m).)

In vector form the torque about a point is written

\[\boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}\]

where \(\boldsymbol{r}\) is the position vector from the axis to the point where the force acts, and \(\boldsymbol{F}\) is the applied force. The order of the two matters, and it is \(\boldsymbol{r}\) that comes first — reversing them reverses the direction of the torque. The vector product itself is taken up in section 3.6.5; for the moment, only the magnitude is needed.

When the force acts at right angles to the link, that magnitude is simply

\[\tau = F \times r\]

where \(r\) is the perpendicular distance from the axis of rotation to the line of action of the force. This distance has a name of its own: the moment arm. Fig. 3.3-2 shows it in the two cases that matter.

Diagram

Fig. 3.3-2 – two side-by-side sketches of the same robot joint. Left: a link extended horizontally from the pivot, with a load hanging at its far end, a downward force arrow labelled F at the load, and the horizontal distance from the pivot to the load marked and labelled “moment arm r”. Right: the same joint with the link folded so the load hangs much closer to the pivot, the same downward force arrow F, and a much shorter distance marked and labelled “moment arm r”. A curved arrow at each pivot labelled “torque the motor must produce”, drawn noticeably larger in the left-hand sketch

If the force is not perpendicular to the link, only the perpendicular component turns the joint, and the magnitude becomes \(\tau = F r \sin\theta\), where \(\theta\) is the angle between the link and the line of the force. A force pointing straight along a link produces no turning effect at all, however large it is.

measuring the moment arm along the link instead of perpendicular to the force What students do: they take \(r\) as the length of the link, whatever angle the link happens to be at. What happens: the calculated torque is correct only when the link is horizontal and the load hangs vertically. At any other angle the answer is too large, and a motor chosen from it looks adequate on paper for positions in which it is not. The fix: \(r\) is the perpendicular distance from the axis to the line of action of the force, not the length of the metal. Draw the line of the force extended, then drop a perpendicular onto it from the pivot; that perpendicular is the moment arm. Equivalently, use \(\tau = F r \sin\theta\) and let the sine do the work.

Q2. Why does a motor at a robot’s shoulder have to work harder when the arm is stretched out than when it is folded in, even though the load is the same?

A. because the torque a joint must produce depends on distance as well as force. With the load held 0.30 m from the shoulder, a 0.5 kg component weighing 4.9 N demands a torque of \(4.9 \times 0.30 = 1.47\) N·m. Fold the arm so the same component sits 0.15 m from the shoulder and the demand halves, to 0.735 N·m. The weight has not changed by a gram; the moment arm has halved. This is why an arm carrying a heavy load is usually brought in close to its own body before it is swung around, and why a robot’s reach and its lifting capacity are always quoted together.

3.3.3 Torque Requirements and the Choice of Motors

In a robotic manipulator every joint must produce enough torque to turn the link attached to it, to support that link’s own weight, and to handle whatever load is applied at the end-effector. The load a robot is designed to carry at its end-effector is its payload.

Three things push the torque requirement up:

  • the length of the link, since a longer link means a longer moment arm;
  • the weight of the payload at the end-effector;
  • the acceleration with which the joint must move, since accelerating a load needs force over and above simply holding it.

A consequence follows immediately, and Fig. 3.3-3 makes it visible. In an industrial arm with six joints, the base joint must produce far more torque than the wrist joint, because it supports the combined weight of every link above it as well as the payload. The wrist carries only the tool. This is why such arms are built the way they are: heavy and thick at the bottom, slender at the top.

Photograph

Fig. 3.3-3 – a six-axis industrial robot arm on a factory floor, photographed from the side so that the whole arm is in frame; the massive base casting and shoulder joint must be clearly visible in the same shot as the comparatively slim wrist and its tool. Sourcing note: a factory or trade-exhibition photograph works well; a close-up of the wrist alone, or a stylised silhouette, would be unusable because the point of the image is the difference in build between the base and the wrist.

torque required at the shoulder joint of a laboratory arm

Given: a horizontal link 0.30 m long, of mass 0.2 kg, whose weight acts at its midpoint 0.15 m from the shoulder. A payload of mass 0.5 kg is held at the far end of the link, 0.30 m from the shoulder. The arm is holding this position steadily, so there is no angular acceleration. Take \(g = 9.8\) m/s².

Find: the torque the shoulder joint must produce to hold the arm horizontal.

Method: each weight produces a torque about the shoulder equal to its own value multiplied by its perpendicular distance from the joint. Both act downward and both turn the arm the same way, so the two torques add.

\[\tau_{\text{payload}} = (0.5 \times 9.8) \times 0.30 = 4.9 \times 0.30 = 1.47\ \text{N·m}\]

\[\tau_{\text{link}} = (0.2 \times 9.8) \times 0.15 = 1.96 \times 0.15 = 0.294\ \text{N·m}\]

\[\tau_{\text{total}} = 1.47 + 0.294 = 1.764\ \text{N·m}\]

the shoulder must produce about 1.76 N·m, and that is the minimum for holding the position — turning the arm would need more.

Check: the payload accounts for most of the demand, which is expected, since it is heavier than the link and sits twice as far out. A hobby servo of the size commonly supplied in school kits is typically rated at roughly 1 N·m, so this arm could not be built with one at the shoulder; a geared motor, a shorter link or a lighter payload would be needed. Noticing that before ordering parts is the entire purpose of the calculation.

Where torque decides a design

The same reasoning appears in four familiar places, and it is worth seeing that they are one idea rather than four.

Robotic arm design. The torque needed at each joint decides which motor and which gear ratio are chosen for that joint. Link length, the mass of each link and the payload all enter the calculation, and getting it wrong shows up as a joint that sags, overheats or fails.

Grippers and end-effectors. A gripper must squeeze hard enough that the object does not slip, since it is friction at the contact faces that actually holds the object up, and friction depends on how hard the faces are pressed together. But it must not squeeze so hard that a thin-walled component is crushed. The gripping force therefore has both a lower limit and an upper limit, and both have to be worked out.

Mobile robots. The torque a drive motor must supply depends on the wheel radius, the total mass of the robot and the friction available at the contact patch, as Fig. 3.3-4 shows. Too little torque and the robot cannot climb a ramp; too much applied too suddenly and the wheels spin without gripping, which wastes the effort entirely.

Diagram

Fig. 3.3-4 – a driven robot wheel on a sloping surface, seen from the side; a curved arrow at the axle labelled “drive torque from the motor”; the wheel radius marked r from axle to contact point; a forward-pointing arrow at the contact patch labelled “traction force from friction”; an arrow down the slope through the robot’s centre labelled “component of weight along the slope”; the slope angle marked at the base

Balancing robots and drones. In a two-wheeled balancing robot or a hovering drone, no position is naturally stable. The control system continuously adjusts the torque at each wheel or each rotor so that the turning effects cancel and the machine stays upright. The torques here are not set once and left; they are recalculated many times a second, which is where the ideas of section 3.4 begin.

Table 3.2 – force vs torque | Feature | Force | Torque | |—|—|—| | What it produces | Linear acceleration along the line of the force | Rotation about an axis | | Defining relation | \(F = ma\) | \(\tau = r \times F\), magnitude \(F r \sin\theta\) | | Unit | newton (N) | newton metre (N·m) | | Depends on position? | No — the same force anywhere gives the same push | Yes — the same force gives a different torque at a different distance from the axis | | Where it is specified in a robot | Gripping force, lifting force, thrust | Motor rating, joint capacity, wheel drive | | Made larger by | A larger motor or actuator | A larger force, or a longer moment arm, or gearing |

A robot arm holding a load is doing so by supplying torque at every joint. Cut the power and that torque disappears, so an unsupported arm will drop under its own weight, sometimes fast enough to injure a hand placed beneath it. Support or lower the arm before switching off, keep hands clear of the space under a loaded link, and never test a lifting operation with a heavy or fragile object when a wooden block of the same size would prove the point.

Hold a full water bottle against your chest, then slowly straighten your arm until the bottle is held out in front of you. The bottle’s weight has not changed, but your shoulder is clearly working much harder. Estimate the two moment arms by measuring from your shoulder to the bottle in each position, and work out the ratio of the two torques your shoulder had to produce.

3.4 Control, Algorithms and Problem-Solving

The two sections before this one give you a machine you can predict on paper. A real robot has to work in a room where the paper calculation is only approximately true — the floor is dusty in one patch, the battery is half discharged, the component in the gripper is 20 g heavier than the drawing said.

Control is what closes that gap. It is the arrangement by which a machine keeps checking what it has actually achieved against what it was asked to achieve, and corrects the difference while it works.

3.4.1 Measuring, Comparing and Correcting

Think of two ways of boiling a pan of water. In the first, you turn the flame to a certain setting and walk away. In the second, you stay in the kitchen and turn the flame up or down depending on what the pan is doing. The first is quicker to set up and works well as long as nothing unexpected happens. The second copes with a draught, a lid left off, or a pan fuller than usual.

Machines are controlled in exactly these two ways.

In an open loop, the controller sends a command and never finds out what happened. A robot told to run its motors forward for 2 seconds will run them for 2 seconds whether it has travelled 80 cm on smooth tiles or 60 cm on a carpet, and whether or not something is in the way.

In a closed loop, the result is measured and fed back so that the command can be adjusted.

NoteDefinition

(A closed-loop system is a control arrangement in which the actual output is measured by a sensor and compared with the desired value, and the difference between them is used to adjust the input, so that the output is driven towards the desired value while the system runs.)

The measured value returned to the comparison point is called feedback, and the difference between the desired value and the measured value is called the error. The controller’s whole job is to act on that error until it is small.

feedback control Statement: in a feedback control system, error = desired value − measured value, and the controller drives the actuator in the direction that reduces the error, repeating the cycle continuously. In words: measure what you have got, compare it with what you wanted, and push the difference towards zero. Why it holds: any disturbance that pushes the output away from the desired value necessarily makes the error non-zero, and a controller that always acts to reduce the error therefore acts against every disturbance, including ones nobody predicted. Used for: holding a robot at a set distance from a wall, keeping a joint at a commanded angle under a changing load, holding a drone level in a breeze, keeping a wheeled robot on a straight heading when one motor is slightly stronger than the other. Watch out: the loop can only correct what it can measure. An error the sensor cannot see is an error the controller will not touch, and a sensor that reads slowly or noisily limits how well the loop can ever perform.

Fig. 3.4-1 sets the arrangement out as a block diagram.

Diagram

Fig. 3.4-1 – block diagram of a closed-loop control system for a robot; blocks in order: “desired value” (arrow in from the left), “comparison point” drawn as a small circle, “controller”, “actuator (motor)”, “robot part being moved”, and “output (actual position or speed)” leaving to the right; a “sensor” block placed below, taking its input from the output line and returning an arrow to the comparison point labelled “feedback”; the arrow from the comparison point to the controller labelled “error”; each arrow labelled with what travels along it — command, drive signal, motion, measured value

Neither arrangement is simply better. An open loop is cheaper, simpler and perfectly adequate where the task is repeatable and disturbances are small; a closed loop costs a sensor and the computing to use it, and earns that cost back wherever conditions vary.

Table 3.3 – open-loop and closed-loop control | Feature | Open loop | Closed loop | |—|—|—| | Is the output measured? | No | Yes, by a sensor | | Response to a disturbance | None — the error simply remains | Corrected, because the error is detected | | Sensor required | No | Yes | | Cost and complexity | Lower | Higher | | Accuracy of the result | Depends entirely on how well the system was calibrated beforehand | Maintained during operation, within the limits of the sensor | | Typical robotic use | Driving a stepper motor a fixed number of steps; running a conveyor at a fixed setting | Holding a joint angle under load; wall-following; hovering; speed regulation |

Q. A 3D printer places its head to a fraction of a millimetre, yet many printers have no sensor watching the head at all. How can that work?

A. Because the printer’s stepper motors move in fixed, counted steps, and the machine is built rigidly enough that a commanded step is very nearly always an achieved step. That is open-loop control done well: the accuracy is engineered into the mechanism beforehand rather than corrected during the job. Its weakness shows when something goes wrong — if the head catches on the print and misses some steps, the printer has no way of knowing, and it carries on placing every later layer in the wrong position.

There is a cost to closing the loop that is easy to miss. Measuring takes time, computing takes time, and the motor takes time to respond, so a correction always arrives slightly after the situation that called for it. This delay between measuring and acting is called latency. If the latency is long compared with how fast the robot’s situation changes, the correction can arrive too late to help, and a loop that corrects too vigorously and too late will make the machine oscillate rather than settle.

Q5. Why does a robot keep measuring while it moves, instead of simply carrying out the instructions it was given?

A. because the instruction was worked out from an assumed world, and the real world differs from it in small ways nobody can list in advance — a wheel slipping on a dusty patch, a battery that has weakened since the last run, a load 20 g heavier than expected, a floor that slopes by half a degree. An open-loop robot carries out its instruction faithfully and ends up in the wrong place, without ever knowing. A robot that measures as it goes computes the error between where it is and where it should be, and corrects it while there is still time. Continuous measurement is not a refinement; it is the only way a machine can meet a target in conditions it was not told about.

Two words are often used loosely here and are worth separating. An automatic machine carries out a fixed sequence without human effort. An autonomous machine decides for itself what to do next, using what its sensors tell it. An automatic gate is not autonomous; a robot that finds its own way around an unexpected obstacle is.

3.4.2 From a Physical Problem to an Algorithm

A controller does not act on physics; it acts on instructions. Between the equations of the previous sections and a working machine there is one more step: the reasoning has to be written down as a definite sequence of operations.

NoteDefinition

(An algorithm is a finite sequence of clearly stated steps which, carried out in order on given inputs, produces the required result in a finite time.)

An algorithm is written before any program is, and it is written in ordinary language or in pseudocode — a plain-language sketch of the steps, laid out like a program but not tied to any particular programming language. Writing it first forces you to decide what the robot must sense, what it must decide, and what it must move, at a stage where changing your mind costs nothing.

A working order for a robotics problem

Almost every problem in this subject yields to the same order of attack.

  1. State the physical goal in measurable terms. Not “stop safely” but “come to rest with at least 0.20 m clear of the obstacle”.
  2. List what can be sensed, and in what units, and how accurately.
  3. List what can be actuated, and what limits it has — the maximum torque, the maximum safe deceleration.
  4. Choose the physical relation that connects the two, and check that every quantity in it is either measured or known.
  5. Write the steps in order, including what happens when a measurement is missing or absurd.
  6. Check the result for magnitude and sign before trusting it.

The fifth step is the one beginners omit and engineers never do. A sensor that has failed usually does not announce that it has failed; it returns a number, and the number is wrong.

The following algorithm puts the stopping calculation of section 3.2.5 to work.

stopping a mobile robot a set distance in front of an obstacle Input: the distance \(d\) to the object ahead, in metres, read from a distance sensor; the robot’s present speed \(u\), in m/s; the largest deceleration \(a_{\max}\) the robot can use without the load sliding, in m/s²; the clear gap \(g\) that must be left, in metres. Output: a drive command sent to the motors — continue, decelerate, or stop. Method:

1. Read the distance d to the object ahead.
2. If no valid reading is returned, treat the path as blocked and go to step 7.
3. Compute the distance available for stopping: available = d - g.
4. Compute the distance needed for stopping at the present speed:
       needed = u * u / (2 * a_max)
5. If available > needed, keep the present drive command and go to step 8.
6. Otherwise reduce the drive command so that the robot decelerates.
7. If d is less than or equal to g, set the drive command to zero and stop the motors.
8. Repeat from step 1.

Why it works: \(v^2 = u^2 + 2aS\) with a final velocity of zero gives the distance a robot needs in order to stop from speed \(u\) at deceleration \(a_{\max}\). Comparing that distance with the distance actually available is the only honest test of whether the robot may keep going, because a machine cannot stop in less space than physics allows, however good its program is. Watch out: an ultrasonic sensor that receives no echo, because the surface is soft or angled away, may return a very large value or none at all — treating a missing reading as “the way is clear” is exactly the wrong assumption, which is why step 2 treats it as blocked. Note also that the loop takes time to go round; whatever distance the robot covers during that time must be allowed for inside the gap \(g\).

Fig. 3.4-2 shows the same method as a flow diagram.

Diagram

Fig. 3.4-2 – flow: read distance d from the sensor → decision “is the reading valid?” (no branch leads to “stop the motors”) → compute available distance = d − g → compute needed stopping distance from the present speed → decision “is available greater than needed?” (yes branch leads to “keep present speed”, no branch leads to “reduce speed”) → both branches return by an arrow to the first block, closing the loop; the “stop the motors” block drawn as a terminator

Notice how little of the work is programming. The physics chose the relation, the mechanics fixed \(a_{\max}\), the sensor fixed what could be measured and how badly it might fail, and only then did the steps fall out. That order — physics, then mathematics, then method, then code — is the order this subject is built on, and the chapters that follow work through each stage of it in turn.

3.5 Matrix Operations in Robotics

So far every quantity in this chapter has been a single number with a unit — a speed, a force, a torque. Position is not like that. To say where a robot’s tool is, you need two numbers in a plane and three in space, and to say which way the tool is pointing you need more still.

Handling several numbers as one object, and combining such objects in a systematic way, is what matrices are for. A matrix is a rectangular arrangement of numbers in rows and columns, treated as a single mathematical object. In robotics it is the standard way of recording where a part is, which way it faces, and how to convert one description into another.

3.5.1 Why Robots Need Matrices

A robot arm is a chain. The tool is fixed to the last link, that link turns at a joint on the link before it, and so on back to the base bolted to the floor. When the shoulder turns by 20°, every part beyond the shoulder moves too, including the tool at the far end.

You could work out where the tool ends up with a page of trigonometry for that particular arm, in that particular position. Change the position, or add a joint, and the page has to be written again. That is exactly the kind of repeated, error-prone labour that a good mathematical notation removes.

Matrices remove it because each joint’s contribution can be written in the same standard form, and because those forms can be multiplied together. The multiplication does the bookkeeping that the trigonometry was doing by hand.

Set out plainly, matrices give a robot designer four things:

  • a clear and compact way to record the position and orientation of every link, joint and tool;
  • a systematic way to shift a description from one coordinate system to another;
  • a single standard form for rotations and for straight-line shifts, in two dimensions or three;
  • a way of combining several movements into one, through matrix multiplication.

The last of these is why matrices are worth learning rather than merely tolerating. Every simulation package, every computer-aided design tool and every industrial robot controller works this way internally, so a description written in matrix form is a description the machinery can already use.

3.5.2 Matrices and Coordinate Systems

A position is meaningless until you say what it is measured from. “The gripper is 0.46 m along and 0.25 m up” only means something once along from where and up from where have been settled. A coordinate system settles it: a chosen origin, and chosen directions for the axes, against which any point can be given as a set of numbers.

Robots use several coordinate systems at once, and Fig. 3.5-1 shows why.

Diagram

Fig. 3.5-1 – a two-link robot arm shown with three coordinate systems; at the fixed base, axes labelled x0 and y0 with the origin marked O0 and the caption “base frame, fixed to the floor”; at the elbow joint, a second pair of axes labelled x1 and y1 with origin O1, drawn tilted to follow link 1, captioned “joint frame, turns with the link”; at the gripper, a third pair labelled x2 and y2 with origin O2, tilted to follow link 2, captioned “tool frame, moves with the end-effector”; a dashed arrow drawn from O0 to O2 labelled “position of the tool expressed in the base frame”

The base frame is attached to the fixed part of the robot and describes its unchanging starting point; every other description is eventually referred back to it. A joint frame is attached to a moving link and turns with it, so a point on that link keeps the same coordinates in its own frame however the arm moves. The tool frame sits at the end-effector and describes the position and orientation of the gripper or tool itself.

The convenience of this arrangement is worth spelling out. A component held in the gripper is always at the same place in the tool frame — it does not move relative to the gripper holding it. What changes as the arm moves is the relation between the tool frame and the base frame. A matrix records that relation, so converting the component’s position into the base frame becomes one multiplication rather than a fresh piece of geometry.

Converting a description from one frame to another in this way is called a transformation, and it is the operation that all of section 3.5 is building towards.

3.5.3 Rotation and Translation as Matrices

Two kinds of movement have to be described, and they correspond exactly to the two kinds of motion met in section 3.2.

When a robot arm swivels, its orientation changes but no point of it is carried bodily across the workspace: that is a rotation. When the arm extends, rises, or shifts sideways without turning, every point moves the same distance in the same direction: that is a translation.

A point at \((x, y)\) rotated through an angle \(\theta\) about the origin, as in Fig. 3.5-2, arrives at a new position given by

\[\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}\]

Diagram

Fig. 3.5-2 – a point P at coordinates (x, y) in a plane with axes x and y drawn from an origin O; a dashed circular arc centred on O carrying P round to a new position P’ at (x’, y’); the angle of rotation marked as theta between OP and OP’; the distance OP and OP’ both marked r and labelled “unchanged by rotation”; dashed perpendicular lines dropped from P and P’ to both axes to show the four coordinates

the rotation matrix in a plane Statement: a rotation through an angle \(\theta\) about the origin of a plane is represented by the matrix \(R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}\), acting on a position written as a column of coordinates. In words: multiplying a point’s coordinates by this matrix turns the point about the origin, by the stated angle, without moving it nearer or further away. Why it holds: the two columns of the matrix are simply where the unit vectors along the \(x\) and \(y\) axes end up after the rotation. Since every point is a combination of those two directions, knowing where they go fixes where everything goes. Used for: turning a joint in a planar arm, re-expressing a direction measured in one frame in terms of another frame that is rotated relative to it, and describing the heading of a mobile robot. Watch out: this matrix rotates about the origin only, and \(\theta\) must be supplied in the unit the function you are using expects — computer libraries almost always expect radians, while a servo is commanded in degrees.

A translation is simpler in appearance: to shift a point by \(a\) along \(x\) and \(b\) along \(y\), add those amounts to its coordinates. Writing it as a column,

\[\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} a \\ b \end{bmatrix}\]

where a gripper goes when the shoulder turns

Given: a single link of length 0.30 m lies along the \(x\) axis of the base frame, so its gripper is at the point \((0.30, 0)\) m. The shoulder joint then rotates the link through \(\theta = 30°\) about the base.

Find: the coordinates of the gripper after the rotation.

Method: the joint turns the link about the base, which is the origin of the base frame, so the rotation matrix \(R(\theta)\) applies directly to the gripper’s coordinates.

\[\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos 30° & -\sin 30° \\ \sin 30° & \cos 30° \end{bmatrix} \begin{bmatrix} 0.30 \\ 0 \end{bmatrix}\]

\[x' = 0.30 \cos 30° = 0.30 \times 0.8660 = 0.2598\ \text{m}\]

\[y' = 0.30 \sin 30° = 0.30 \times 0.5000 = 0.1500\ \text{m}\]

the gripper moves to \((0.260, 0.150)\) m, correct to three decimal places.

Check: the distance from the base is \(\sqrt{0.2598^2 + 0.150^2} = 0.300\) m, exactly the link length, as it must be — a rotation cannot lengthen a rigid link. The gripper has also risen, which is what a 30° lift of the shoulder should do.

3.5.4 Transformation Matrices

Real joints do both things at once. The elbow of an arm is not at the base of the robot, so moving from the base frame to the elbow frame involves a shift as well as a turn. Handling the turn as a multiplication and the shift as an addition means two different operations, which is awkward as soon as several joints are chained together.

The standard solution is to write both as a single multiplication. An extra row and column are added, and the point’s coordinates are written with a 1 appended:

\[\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta & a \\ \sin\theta & \cos\theta & b \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}\]

Coordinates written with that extra 1 are called homogeneous coordinates, and the square matrix in the middle is a transformation matrix.

NoteDefinition

(A transformation matrix is a matrix which, when multiplied by the coordinates of a point expressed in one coordinate system, gives the coordinates of that same point expressed in another coordinate system. It combines a rotation and a translation into a single operation.)

Look at how the matrix is built. The top-left block is exactly the rotation matrix of section 3.5.3; the right-hand column, \(a\) and \(b\), holds the translation; the bottom row is fixed at \(0, 0, 1\) and exists only to make the multiplication work out. Nothing new has been invented — two familiar operations have been packed into one object.

Q. Why add a row and column that contain nothing but zeros and a one?

A. Because a plain 2×2 matrix multiplication can only produce a result proportional to the input, and so can never add a fixed shift. Appending the 1 to the coordinates gives the multiplication something constant to work on, and the translation values in the last column are simply multiplied by that 1 and added in. It is a piece of bookkeeping rather than new mathematics, but it earns its keep: once the shift is inside the matrix, chains of joints can be handled by multiplication alone.

locating a component in the base frame

Given: a robot’s tool frame has its origin at the point \((0.20, 0.10)\) m in the base frame, and its axes are rotated by 30° relative to the base frame’s axes. A component gripped by the tool sits at \((0.30, 0)\) m in the tool frame.

Find: the position of the component in the base frame.

Method: build the transformation matrix from the base frame to the tool frame using \(\theta = 30°\), \(a = 0.20\) m and \(b = 0.10\) m, then multiply it by the component’s homogeneous coordinates in the tool frame.

\[T = \begin{bmatrix} 0.8660 & -0.5000 & 0.20 \\ 0.5000 & 0.8660 & 0.10 \\ 0 & 0 & 1 \end{bmatrix}, \qquad P_{\text{tool}} = \begin{bmatrix} 0.30 \\ 0 \\ 1 \end{bmatrix}\]

\[x = (0.8660 \times 0.30) + (-0.5000 \times 0) + (0.20 \times 1) = 0.2598 + 0.20 = 0.4598\ \text{m}\]

\[y = (0.5000 \times 0.30) + (0.8660 \times 0) + (0.10 \times 1) = 0.1500 + 0.10 = 0.2500\ \text{m}\]

the component is at \((0.460, 0.250)\) m in the base frame.

Check: the rotation part has produced exactly the values found in the previous worked example, and the translation has then added the offset of the tool frame’s origin. The component ends up about 0.52 m from the base, which is longer than the 0.30 m tool-frame distance — reasonable, since the tool frame itself starts some way out from the base.

Diagram

Fig. 3.5-3 – two coordinate frames drawn in the same plane; the base frame with origin O0 and axes x0, y0 drawn horizontally and vertically; the tool frame with origin O2 placed at (0.20, 0.10) in the base frame, its axes x2, y2 drawn tilted by 30 degrees, with the tilt angle marked; a point P marked further along the x2 axis, its distance from O2 marked 0.30 m; dashed lines from P to the base-frame axes showing its base-frame coordinates (0.460, 0.250); a dashed arrow from O0 to O2 labelled “translation part of the transformation”

multiplying transformations in the wrong order What students do: they rotate the point first and then apply the shift, or apply the shift first and then rotate, without checking which the situation calls for. What happens: the two give different answers. Shifting the point of the worked example first and then rotating gives about \((0.383, 0.337)\) m instead of \((0.460, 0.250)\) m — a difference of over 12 cm, which for a robot placing a component in a slot is the difference between working and jamming. The fix: matrix multiplication is not commutative, so \(AB\) and \(BA\) are generally different matrices, and the order must follow the physical arrangement. Read the chain outwards from the fixed base: base to shoulder, shoulder to elbow, elbow to tool, and multiply the matrices in that same order.

Q3. If a robot only measures the angle at each of its joints, how does it work out where the tip of its gripper is?

A. by turning each measured angle into a transformation matrix and multiplying them together. Each joint has a known link length and a measured angle, which is all that is needed to write the matrix carrying you from that joint’s frame to the next one along. Multiply those matrices in order from the base outwards, and the product is a single transformation from the base frame to the tool frame. Feed the gripper’s own coordinates, which are fixed in the tool frame, through that product and you have its position in the base frame — computed from nothing but joint angles and fixed link lengths. This is what a robot controller does thousands of times a second, and it is the calculation that the study of robot kinematics is built on.

Everything in this section has been done in a plane, with two coordinates and one angle, because that is where the ideas are clearest. The same forms extend to three dimensions, where a rotation is described by a 3×3 matrix, a translation by three offsets, and the two combine into a 4×4 transformation matrix. The pattern is identical; only the bookkeeping grows.

3.6 Vectors and Vector Spaces

Matrices told us how to convert a position from one frame to another. This section deals with the quantities being converted, and with the arithmetic that lets a robot combine directions, forces and displacements.

In robotics, vectors are the mathematical foundation for describing positions, orientations, motions and forces. They are what allow a machine to work out a direction of travel, add up the forces acting on a gripper, and calculate the turning effect of a force applied at a point on a link.

3.6.1 Vector Quantities in a Robotic System

Some quantities are completely described by a number and a unit. A battery holds 2200 mAh; a link has a mass of 0.2 kg; a task takes 3 s. Such a quantity is a scalar.

Other quantities are useless until you also say which way. “Move 0.5 m” leaves a robot no better informed than before. A quantity that carries both a size and a direction is a vector.

NoteDefinition

(A vector is a quantity that possesses both magnitude and direction, and which combines with other vectors according to the rules of vector addition. Its magnitude is expressed in the unit of the quantity concerned, and its direction is stated with respect to a chosen reference frame.)

Four kinds of vector appear constantly in robotics, and it is worth naming them:

  • position vectors, which describe the location of a point relative to a reference frame;
  • displacement vectors, which describe a movement from one position to another;
  • velocity and acceleration vectors, which describe how motion changes with time;
  • force and torque vectors, which describe the push and the turning effect applied to a robot’s components.

Every one of these was used earlier in the chapter without the word being insisted upon. The weight of a payload acted downward; the deceleration of a warehouse robot acted backward along its path; the tool moved from one point to another. Each carried a direction as well as a size.

The collection of all vectors that obey the standard rules of vector addition and of multiplication by a scalar forms what is called a vector space.

NoteDefinition

(A vector space is the complete set of vectors of a given kind, together with the operations of addition and multiplication by a scalar, such that adding any two vectors of the set, or multiplying any one of them by a scalar, always produces another vector belonging to the same set.)

The idea sounds abstract, and its practical content is simple: within one frame, vectors can be added, subtracted and scaled freely, and the result is always another vector describing the same kind of thing in the same frame. That is the guarantee which makes it safe to add three forces acting on a gripper and treat the answer as a single force.

A note on notation before going further. In printed work a vector is often shown in bold type, as \(\boldsymbol{P}\), or with an arrow above it, as \(\vec{P}\). The two mean the same thing, and bold letters do not carry arrows as well. A plain italic letter, such as \(P\), means the magnitude only.

Q. A robot is instructed to “move 0.5 m”. What is missing, and what would go wrong?

A. The direction. The instruction gives a magnitude alone, so it describes a distance rather than a displacement. A robot acting on it would have to pick a direction of its own, and two robots given the same instruction could end up a metre apart. A usable instruction states a displacement vector — for example, 0.5 m along the positive x-axis of the base frame — or gives the destination as a position vector in a named frame.

3.6.2 Position Vectors and Their Magnitude

A point becomes a vector the moment it is expressed with respect to an origin. If a point \(P\) has coordinates \((x, y, z)\) in a frame whose origin is \(O(0, 0, 0)\), its position vector is written

\[\boldsymbol{P} = x\hat{i} + y\hat{j} + z\hat{k}\]

where \(\hat{i}\), \(\hat{j}\) and \(\hat{k}\) are unit vectors pointing along the x, y and z axes of that frame. Fig. 3.6-1 shows the arrangement.

Diagram

Fig. 3.6-1 – a set of three-dimensional axes labelled x, y and z meeting at an origin marked O; short arrows drawn along each axis from the origin labelled i-hat, j-hat and k-hat; a point P marked in the space above and to the right of the origin, joined to O by a bold arrow labelled P; dashed lines dropped from P parallel to each axis to show its three components, the segments labelled x, y and z; a note that each component is measured in metres

The same vector is written in matrix form as a column:

\[P = \begin{bmatrix} x \\ y \\ z \end{bmatrix}\]

which is exactly the form the transformation matrices of section 3.5 expect. The two notations describe the same object; the vector form is easier to read, and the matrix form is easier to compute with.

The magnitude of a position vector is the straight-line distance from the origin to the point:

\[|\boldsymbol{P}| = \sqrt{x^2 + y^2 + z^2}\]

distance of a tool point from the robot’s base

Given: the tip of a robot’s gripper is at \((0.24, 0.18, 0.10)\) m in the base frame.

Find: the position vector of the tip, and its distance from the base origin.

Method: the coordinates are the components of the position vector, and the distance from the origin is the magnitude of that vector.

\[\boldsymbol{P} = 0.24\hat{i} + 0.18\hat{j} + 0.10\hat{k}\ \text{m}\]

\[|\boldsymbol{P}| = \sqrt{0.24^2 + 0.18^2 + 0.10^2}\]

\[|\boldsymbol{P}| = \sqrt{0.0576 + 0.0324 + 0.0100} = \sqrt{0.1000}\]

\[|\boldsymbol{P}| = 0.316\ \text{m}\]

the tip is 0.316 m from the base origin.

Check: the magnitude must be larger than the biggest single component, 0.24 m, and smaller than their sum, 0.52 m, and 0.316 m lies between the two. For an arm whose links total about 0.35 m, a reach of a little over 0.3 m is sensible; a result larger than the arm could physically extend would mean an arithmetical slip.

A position vector of three components can locate any point whatever, once a coordinate system has been established. But it means nothing on its own: the same three numbers describe different places in the base frame and in the tool frame. A position vector is always quoted together with the frame it is measured in.

3.6.3 Unit Vectors and Direction

Often a robot needs a direction without a distance — which way to move, which way a force points, which way a sensor is aimed. That is what a unit vector provides.

NoteDefinition

(A unit vector is a vector of magnitude exactly one, used to indicate direction alone. It is obtained by dividing a vector by its own magnitude, and it carries no unit of measurement.)

For a vector \(\boldsymbol{P}\) with components \((x, y, z)\), the corresponding unit vector is

\[\hat{P} = \frac{\boldsymbol{P}}{|\boldsymbol{P}|} = \frac{x\hat{i} + y\hat{j} + z\hat{k}}{\sqrt{x^2 + y^2 + z^2}}\]

Note carefully that the divisor is the magnitude — a single number — and not the vector itself. Dividing one vector by another is not a defined operation.

Where a robot must travel from one point to another, the direction of travel comes from the displacement vector between them. If the robot starts at \(A\) and must reach \(B\), the displacement is \(\boldsymbol{D} = B - A\), obtained by subtracting the coordinates of the starting point from those of the destination, as Fig. 3.6-2 shows.

Diagram

Fig. 3.6-2 – a set of x, y and z axes with origin O; two points marked A and B in the space, each joined to the origin by a thin arrow labelled with its position vector; a bold arrow drawn from A to B labelled “displacement D = B − A”; a short arrow of unit length drawn from A along the same line as D and labelled “unit vector D-hat, direction of travel”; a note that D carries the unit metre while D-hat carries none

direction in which an end-effector must move

Given: an end-effector is at \(A(0.10, 0.20, 0.05)\) m and must be taken to \(B(0.40, 0.60, 0.05)\) m, both measured in the base frame.

Find: the displacement vector, the distance to be travelled, and the unit vector giving the direction of motion.

Method: subtract the starting coordinates from the destination coordinates to get the displacement; its magnitude is the distance; dividing the displacement by that magnitude gives the unit vector.

\[\boldsymbol{D} = B - A = (0.40 - 0.10)\hat{i} + (0.60 - 0.20)\hat{j} + (0.05 - 0.05)\hat{k}\]

\[\boldsymbol{D} = 0.30\hat{i} + 0.40\hat{j} + 0\hat{k}\ \text{m}\]

\[|\boldsymbol{D}| = \sqrt{0.30^2 + 0.40^2 + 0^2} = \sqrt{0.09 + 0.16} = \sqrt{0.25} = 0.50\ \text{m}\]

\[\hat{D} = \frac{1}{0.50}\begin{bmatrix} 0.30 \\ 0.40 \\ 0 \end{bmatrix} = \begin{bmatrix} 0.6 \\ 0.8 \\ 0 \end{bmatrix}\]

the tool must travel 0.50 m in the direction \(0.6\hat{i} + 0.8\hat{j}\).

Check: a unit vector must have magnitude 1, and \(\sqrt{0.6^2 + 0.8^2} = \sqrt{0.36 + 0.64} = 1\). The zero third component is expected, since both points are at the same height, so the movement is horizontal.

The usefulness of that last result is worth spelling out. Once the direction is known as a unit vector, a movement of any length along it is obtained by multiplying: moving 0.20 m along \(\hat{D}\) means moving \(0.20 \times (0.6, 0.8, 0) = (0.12, 0.16, 0)\) m. Direction and distance have been separated, and each can be planned on its own.

3.6.4 Vector Operations

Four operations do almost all the work in robotics.

Addition and subtraction

Vectors are added or subtracted component by component, and the result — called the resultant — is the single vector that has the same effect as the originals together:

\[\boldsymbol{R} = \boldsymbol{A} + \boldsymbol{B}\]

If two forces \(\boldsymbol{F_1} = 3\hat{i} + 4\hat{j}\) N and \(\boldsymbol{F_2} = -\hat{i} + 2\hat{j}\) N act on a gripper, their resultant is \(\boldsymbol{R} = 2\hat{i} + 6\hat{j}\) N, whose magnitude is \(\sqrt{4 + 36} = 6.32\) N. Fig. 3.6-3 shows why this is not the same as adding the two sizes.

Diagram

Fig. 3.6-3 – two force vectors drawn from a common point on a robot gripper, one longer and pointing up and to the right, one shorter and pointing up and to the left, labelled F1 and F2; the second vector redrawn starting from the tip of the first, with a dashed outline; the resultant drawn as a bold arrow from the common starting point to the tip of the redrawn second vector, labelled R; the magnitudes of all three marked, showing that the magnitude of R is less than the sum of the other two magnitudes

adding the magnitudes of vectors instead of the vectors What students do: they see forces of 5 N and 3 N acting on the same part and write 8 N. What happens: the answer is correct only in the one case where both forces point exactly the same way. Pulling in opposite directions the resultant is 2 N; at right angles it is \(\sqrt{25 + 9} = 5.83\) N. A gripper designed on the assumption of the largest possible value is over-specified, and one designed on the wrong direction may fail. The fix: resolve each force into components, add the components separately, then take the magnitude of the result. Magnitudes may only be added directly when the directions are identical.

Multiplication by a scalar

Multiplying a vector by a scalar changes its magnitude without altering its direction. Doubling a velocity vector gives a movement twice as fast along the same line; multiplying by a negative scalar reverses the direction.

The dot product

The dot product (scalar product) of two vectors produces a scalar, and represents the projection of one vector on to the other:

\[\boldsymbol{A} \cdot \boldsymbol{B} = |\boldsymbol{A}||\boldsymbol{B}|\cos\theta\]

where \(\theta\) is the angle between them. In components, \(\boldsymbol{A} \cdot \boldsymbol{B} = A_xB_x + A_yB_y + A_zB_z\). Rearranged, it is the standard way of finding the angle between two directions — between a link and a force, between a sensor’s line of sight and the surface it is pointed at, or between a robot’s heading and the direction it should be travelling.

angle between a link and an applied force

Given: a force \(\boldsymbol{F} = 3\hat{j} + 4\hat{k}\) N is applied at a point on a robot link whose position vector from the joint is \(\boldsymbol{r} = 0.2\hat{i} + 0.1\hat{j} + 0.2\hat{k}\) m.

Find: the angle between the link direction and the line of the force.

Method: use \(\cos\theta = (\boldsymbol{r} \cdot \boldsymbol{F}) / (|\boldsymbol{r}||\boldsymbol{F}|)\), computing the dot product from components and the two magnitudes separately.

\[\boldsymbol{r} \cdot \boldsymbol{F} = (0.2 \times 0) + (0.1 \times 3) + (0.2 \times 4) = 0 + 0.3 + 0.8 = 1.1\]

\[|\boldsymbol{r}| = \sqrt{0.04 + 0.01 + 0.04} = \sqrt{0.09} = 0.30\ \text{m}\]

\[|\boldsymbol{F}| = \sqrt{0 + 9 + 16} = \sqrt{25} = 5.0\ \text{N}\]

\[\cos\theta = \frac{1.1}{0.30 \times 5.0} = \frac{1.1}{1.5} = 0.733\]

\[\theta = \cos^{-1}(0.733) = 42.8°\]

the force acts at about 42.8° to the link.

Check: the dot product came out positive, so the angle must be less than 90°, and 42.8° is. Since the force is neither along the link nor square to it, only part of it will turn the joint — which is the point of finding the angle at all.

The cross product

The cross product (vector product) of two vectors produces a new vector, perpendicular to the plane containing both:

\[\boldsymbol{A} \times \boldsymbol{B} = |\boldsymbol{A}||\boldsymbol{B}|\sin\theta\ \hat{n}\]

where \(\hat{n}\) is the unit vector perpendicular to both \(\boldsymbol{A}\) and \(\boldsymbol{B}\). In robotics this is essential in torque and moment calculations, and in finding an axis of rotation.

the vector (cross) product Statement: for \(\boldsymbol{A} = A_x\hat{i} + A_y\hat{j} + A_z\hat{k}\) and \(\boldsymbol{B} = B_x\hat{i} + B_y\hat{j} + B_z\hat{k}\), the cross product is evaluated as the determinant \(\boldsymbol{A} \times \boldsymbol{B} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \end{vmatrix}\) giving \((A_yB_z - A_zB_y)\hat{i} - (A_xB_z - A_zB_x)\hat{j} + (A_xB_y - A_yB_x)\hat{k}\). In words: the result points along the axis about which the first vector would turn towards the second, and its length measures how far from parallel the two vectors are. Why it holds: only the component of one vector perpendicular to the other contributes, which is why the magnitude carries \(\sin\theta\) rather than \(\cos\theta\). Used for: finding the torque produced by a force applied at a point, and finding the axis about which a link is rotating. Watch out: the order matters. \(\boldsymbol{A} \times \boldsymbol{B}\) and \(\boldsymbol{B} \times \boldsymbol{A}\) have the same magnitude but opposite directions, so writing the two vectors the wrong way round reverses the sense of the answer. Two parallel vectors have a cross product of zero, since \(\sin 0° = 0\).

Table 3.5 – dot product and cross product | Feature | Dot product | Cross product | |—|—|—| | Result | A scalar | A vector | | Magnitude | \(\|A\|\|B\|\cos\theta\) | \(\|A\|\|B\|\sin\theta\) | | Direction of result | None | Perpendicular to both vectors | | Value when the vectors are parallel | Maximum | Zero | | Value when the vectors are perpendicular | Zero | Maximum | | Does order matter? | No | Yes — reversing the order reverses the result | | Used in robotics for | Finding the angle between two directions, projecting one direction on to another | Torque about a joint, axis of rotation |

3.6.5 Vectors in Force and Torque Calculations

The two threads of this chapter now meet. Section 3.3 gave torque as the turning effect of a force, with magnitude \(F r \sin\theta\). Section 3.6.4 gave the cross product, whose magnitude is exactly \(|\boldsymbol{r}||\boldsymbol{F}|\sin\theta\). They are the same statement, and the vector form

\[\boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}\]

says more than the scalar one, because it gives the axis about which the turning happens as well as how strong it is. Fig. 3.6-4 shows the geometry.

Diagram

Fig. 3.6-4 – a robot joint drawn at the origin with a link extending outward; the position vector r drawn as a bold arrow from the joint to the point where a force is applied; the force F drawn as a bold arrow at that point, at an oblique angle to the link, with the angle between r and F marked as theta; a third bold arrow drawn perpendicular to the plane containing r and F, starting at the joint and labelled “torque, r × F”; a small inset showing a right hand with the fingers curling from r towards F and the thumb pointing along the torque arrow, labelled “right-hand rule”

torque vector produced by a force on a link

Given: the same link and force as before — a force \(\boldsymbol{F} = 3\hat{j} + 4\hat{k}\) N applied at a point whose position vector from the joint is \(\boldsymbol{r} = 0.2\hat{i} + 0.1\hat{j} + 0.2\hat{k}\) m.

Find: the torque vector about the joint, and its magnitude.

Method: evaluate \(\boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}\) as a determinant, taking \(\boldsymbol{r}\) as the first row of components so that the order is correct.

\[\boldsymbol{\tau} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 0.2 & 0.1 & 0.2 \\ 0 & 3 & 4 \end{vmatrix}\]

\[\hat{i}\ \text{term} = (0.1 \times 4) - (0.2 \times 3) = 0.4 - 0.6 = -0.2\]

\[\hat{j}\ \text{term} = -[(0.2 \times 4) - (0.2 \times 0)] = -(0.8 - 0) = -0.8\]

\[\hat{k}\ \text{term} = (0.2 \times 3) - (0.1 \times 0) = 0.6 - 0 = 0.6\]

\[\boldsymbol{\tau} = -0.2\hat{i} - 0.8\hat{j} + 0.6\hat{k}\ \text{N·m}\]

\[|\boldsymbol{\tau}| = \sqrt{0.04 + 0.64 + 0.36} = \sqrt{1.04} = 1.02\ \text{N·m}\]

the torque about the joint is \((-0.2, -0.8, 0.6)\) N·m, of magnitude 1.02 N·m.

Check: the scalar form must agree. From the previous worked example, \(\theta = 42.8°\), so \(|\boldsymbol{r}||\boldsymbol{F}|\sin\theta = 0.30 \times 5.0 \times \sin 42.8° = 1.5 \times 0.680 = 1.02\) N·m, which matches. A torque of about 1 N·m from a 5 N force acting some 0.3 m from the joint is the right order of magnitude.

Two habits are worth carrying away from that calculation. The first is that \(\boldsymbol{r}\) is always written first: \(\boldsymbol{r} \times \boldsymbol{F}\), never \(\boldsymbol{F} \times \boldsymbol{r}\), since the two differ in sign and the sign is what tells a designer which way the joint will be driven. The second is the middle term’s minus sign, which belongs to the determinant expansion and is not optional; dropping it is the commonest way of arriving at a torque that points in an impossible direction.

The same vector arithmetic settles the forces as well. When several forces act on one part — the weight of the payload, the pull of the actuator, the reaction where the tool touches the workpiece — they are added as vectors to give a single resultant, and the design question of section 3.3 becomes precise: is that resultant, and the torque it produces at each joint, within what the motors and the structure can supply?

That is the whole argument of the chapter in one sentence. Motion says where the machine will go; force and torque say whether it can; control says how it corrects itself on the way; and matrices and vectors are the language in which all three are written down.

3.7 Summary

Why physics and mathematics are needed
  1. A robot must move a chosen part of itself to a chosen place, at a chosen speed, carrying a chosen load. Every one of those choices is a physical quantity with a number, a unit and a condition attached to it.
  2. Physics answers the question of what will happen: where a part will be, how hard a joint must push, whether the machine can stop in time. Mathematics answers the question of how it is written down, so that a controller can compute with it.
  3. A link is a rigid part of a robot; a joint connects two links and allows one to move relative to the other; the end-effector is the tool at the free end of an arm, and its position is always stated with respect to a chosen reference point, usually the fixed base.
  4. In engineering a quantity is never described by an adjective. A motor is not “strong”; it produces a stated torque in newton metres at a stated supply voltage.
Motion
  1. Motion is the change of position of a body with time. Kinematics studies that motion — position, velocity and acceleration with respect to a stated reference — without considering the forces that cause it.
  2. Kinematic analysis gives the trajectory of the end-effector, the joint angles needed to reach a point, and the velocity and acceleration of each part along the way.
  3. The three kinds of motion in robotics are linear motion, rotational motion and combined motion.
  4. Linear motion is motion along a straight line, produced by linear actuators, sliding rails or belt-driven carriages, and seen in CNC machines and 3D printers, Cartesian robots and elevator mechanisms.
  5. Rotational motion is turning about a fixed axis, produced by motors and gear systems, and seen at the shoulder, elbow and wrist joints of arms, at the wheels of mobile robots and at drone rotors.
  6. Combined motion is linear and rotational motion together, so that position and orientation both change; a SCARA robot rotates in a horizontal plane while moving vertically on a linear axis.
  7. A point at radius \(r\) turning at angular velocity \(\omega\) moves at linear speed \(v = \omega r\). A motor speed in rpm becomes an angular velocity in rad/s through \(\omega = 2\pi N / 60\).
  8. For constant acceleration in a straight line, \(v = u + at\), \(S = ut + \frac{1}{2}at^2\) and \(v^2 = u^2 + 2aS\). All three assume the acceleration does not change over the interval, so a journey with speeding up, cruising and slowing down is treated as three separate intervals.
  9. Planned acceleration and deceleration are not refinements. A robot commanded straight to full speed jerks its load and stresses its own frame, and one that cannot stop within a known distance is a hazard.
Force and torque
  1. Force is a push or a pull, and by Newton’s second law the net force on a body is \(F = ma\). The word “net” matters: gravity and friction are part of the total.
  2. Weight is a force, \(W = mg\), with \(g\) taken as 9.8 m/s² near the Earth’s surface. Mass is measured in kilograms and force in newtons, and the two must never be interchanged.
  3. When an arm lifts an object, the gravitational force on the object, the applied force from the actuator, the reaction force from the object and its surroundings, and friction all act at once. The applied force must at least equal the forces opposing motion.
  4. Torque is the turning effect of a force about an axis, measured in newton metres. In vector form \(\boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}\), and when the force acts at right angles to the link its magnitude is \(\tau = F \times r\), where \(r\) is the moment arm — the perpendicular distance from the axis to the line of action of the force.
  5. The torque a joint must produce rises with the length of the link, with the weight of the payload at the end-effector, and with the acceleration demanded of the joint. This is why the base joint of a multi-joint arm needs far more torque than the wrist: it supports every link above it as well as the payload.
  6. Torque decides real design choices — the motor and gearing at each joint, the gripping force that holds a component without crushing it, the drive torque a wheel needs on a ramp, and the continuous adjustment that keeps a balancing robot or a drone stable.
Control, algorithms and problem-solving
  1. In open-loop operation a command is issued and the result is never measured, so slip, a drained battery or a heavier load produce errors the robot never discovers.
  2. A closed-loop system measures the actual output, compares it with the desired value or setpoint, and uses the difference — the error — to correct the input while the system runs. Information fed back in this way is called feedback.
  3. Feedback can only correct what it can measure, and a correction that is too aggressive makes the machine oscillate about the setpoint instead of settling on it.
  4. An algorithm is a finite, ordered sequence of unambiguous steps that solves a stated problem. A robotics algorithm is built by settling, in order, what must be achieved as a quantity, what can be measured, what must be decided, what must be actuated, and when to stop or what to do when a reading is invalid.
  5. The physics decides whether the numbers in an algorithm are achievable. When a method and the mechanics disagree, it is usually the method asking the machine to do something it physically cannot.
Matrices
  1. A matrix is a rectangular array of numbers in rows and columns. Multiplying a matrix by a column matrix representing a point returns another point, which is what makes matrices the natural tool for movement.
  2. Matrices represent the position and orientation of links and joints, shift a description from one coordinate system to another, perform rotations and translations in two or three dimensions, and combine several movements into one through matrix multiplication.
  3. Every part of a robot has its own coordinate system: the base frame is the fixed starting point, the joint frames describe each segment relative to the one before it, and the tool frame describes the position and orientation of the end-effector.
  4. Rotation changes orientation and is applied by multiplying by a rotation matrix; in a plane, a point turned anticlockwise through \(\theta\) goes to \(\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix}\). Translation changes position only and is a shift added along each axis.
  5. A transformation matrix combines a rotation and a translation into one operation, so that a whole chain of joints reduces to a single matrix product. In a plane it is \(3 \times 3\) and acts on a point written with an appended 1; in space it is \(4 \times 4\).
  6. Matrix multiplication is not commutative, and this reflects a physical fact: turning and then advancing leaves a robot somewhere different from advancing and then turning. The order is fixed by the situation, never by convenience.
  7. Transformation matrices are used to move the end-effector to a location, to align a tool with a workpiece, and to plan and simulate paths before a machine is switched on.
Vectors
  1. A scalar has magnitude only; a vector has both magnitude and direction, and combines with other vectors by the rules of vector addition. A vector space is the complete set of such vectors together with addition and multiplication by a scalar, so that any combination stays within the set.
  2. Robotics uses position vectors for location relative to a frame, displacement vectors for movement from one position to another, velocity and acceleration vectors for how motion changes with time, and force and torque vectors for the influences applied to components.
  3. A point \((x, y, z)\) has position vector \(\boldsymbol{P} = x\hat{i} + y\hat{j} + z\hat{k}\), or the same as a column matrix, with magnitude \(|\boldsymbol{P}| = \sqrt{x^2 + y^2 + z^2}\). It means nothing until the frame it is measured in is named.
  4. A unit vector has magnitude one and carries direction alone; it is a vector divided by its own magnitude, and it separates the question of which way from the question of how far.
  5. Vectors add and subtract component by component, and the resultant of two forces is generally smaller than the sum of their magnitudes. Multiplying by a scalar changes magnitude without changing direction.
  6. The dot product \(\boldsymbol{A} \cdot \boldsymbol{B} = |\boldsymbol{A}||\boldsymbol{B}|\cos\theta\) returns a scalar and is the standard way of finding the angle between two directions. The cross product \(\boldsymbol{A} \times \boldsymbol{B} = |\boldsymbol{A}||\boldsymbol{B}|\sin\theta\ \hat{n}\) returns a vector perpendicular to both and is what torque and axis-of-rotation calculations rest on.
  7. Because \(\boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}\), the vector form of torque gives the axis of turning as well as its strength. The order is always \(\boldsymbol{r}\) first, since reversing it reverses the direction of the result.

3.8 Key Terms

  1. Algorithm — a finite, ordered sequence of unambiguous steps that solves a stated problem and produces a definite result for every valid input.
  2. Angular velocity — the rate at which a body turns about an axis, measured in radians per second (rad/s).
  3. Base frame — the fixed coordinate system attached to a robot’s base, from which the positions of all its other parts are measured.
  4. Closed-loop system — a system in which the actual output is measured, compared with the desired value, and the difference used to correct the input while the system runs.
  5. CNC — computer numerical control, the control of a machine tool’s axes by a stored program of numerical commands.
  6. Combined motion — motion in which linear and rotational motion occur together, so that both the position and the orientation of a body change.
  7. Cross product (vector product) — an operation on two vectors that produces a vector perpendicular to both, of magnitude equal to the product of their magnitudes and the sine of the angle between them.
  8. Displacement vector — a vector describing a movement from one position to another, obtained by subtracting the starting coordinates from the destination coordinates.
  9. Dot product (scalar product) — an operation on two vectors that produces a scalar equal to the product of their magnitudes and the cosine of the angle between them.
  10. End-effector — the device fitted at the free end of a robot arm, such as a gripper or a tool, which acts directly on the workpiece or the environment.
  11. Error — the difference between the setpoint and the measured value of the quantity a control system is regulating.
  12. Feedback — information about the actual output of a system, returned to the point where the input is decided so that a correction can be made.
  13. Force — a push or a pull acting on a body, measured in newtons (N), whose net value produces an acceleration given by \(F = ma\).
  14. Joint — the connection between two links of a robot that allows one to move relative to the other.
  15. Joint frame — a coordinate system attached to a joint of a robot, describing the position and orientation of that segment relative to the one before it.
  16. Kinematics — the study of the motion of a body, in terms of position, velocity and acceleration with respect to a stated reference, without considering the forces that cause it.
  17. Linear actuator — a device whose output moves in and out along a straight line, such as a lead screw, a sliding rail or a belt-driven carriage.
  18. Linear motion — motion of a body along a straight line, in which every point of the body undergoes the same displacement in the same direction.
  19. Link — a rigid part of a robot that does not bend or change length while the robot works.
  20. Matrix — a rectangular array of numbers arranged in rows and columns, described by its order, the number of rows followed by the number of columns.
  21. Moment arm — the perpendicular distance from an axis of rotation to the line of action of a force.
  22. Open loop — operation in which a command is issued and the resulting output is never measured, so that errors are not detected or corrected.
  23. Payload — the load a robot is designed to carry at its end-effector.
  24. Position vector — a vector describing the location of a point relative to the origin of a stated reference frame.
  25. Resultant — the single vector that has the same effect as two or more vectors acting together, obtained by adding them component by component.
  26. Rotational motion — motion in which a body turns about a fixed axis, so that every point of the body moves in a circle centred on that axis.
  27. rpm — revolutions per minute, a unit of rotational speed, converted to rad/s by \(\omega = 2\pi N / 60\).
  28. Scalar — a quantity that is completely described by a magnitude and its unit, with no direction attached.
  29. SCARA — selective compliance assembly robot arm, a robot whose two horizontal joints rotate in a plane while a third axis moves the tool vertically.
  30. Setpoint — the desired value of the quantity a control system is regulating.
  31. Tool frame — the coordinate system attached at the end-effector, describing the position and orientation of the tool itself.
  32. Torque — the turning effect produced by a force about a stated axis, equal in magnitude to the force multiplied by the moment arm, and measured in newton metres (N·m).
  33. Trajectory — the path in space that a robot’s end-effector follows from its starting point to its destination, together with the timing along that path.
  34. Transformation matrix — a matrix that converts the coordinates of a point from one coordinate system to another by combining a rotation and a translation into a single operation.
  35. Unit vector — a vector of magnitude exactly one, used to indicate direction alone, obtained by dividing a vector by its own magnitude.
  36. Vector — a quantity possessing both magnitude and direction, which combines with other vectors according to the rules of vector addition.
  37. Vector space — the complete set of vectors of a given kind, together with addition and multiplication by a scalar, such that any such combination produces another vector of the same set.
  38. Weight — the gravitational force acting on a body, equal to \(mg\) and measured in newtons (N), as distinct from its mass in kilograms.

3.9 Objective Questions

  1. The SI unit of torque is:
  1. newton
  2. newton metre
  3. newton per metre
  4. metre per second
  1. A drive motor turns at 60 rpm. Its angular velocity, in rad/s, is closest to:
  1. 3.14
  2. 6.28
  3. 60
  4. 360
  1. Two matrices A and B represent two movements of a robot arm. In general:
  1. AB is equal to BA
  2. AB and BA are different, and represent the movements carried out in different orders
  3. AB is the same as A + B
  4. AB is undefined unless both are rotation matrices
  1. Assertion (A): A robot working in open loop cannot detect that its wheels have slipped on a smooth floor. Reason (R): In open-loop operation the actual output of the system is never measured. Choose the correct option:
  1. Both A and R are true, and R is the correct explanation of A.
  2. Both A and R are true, but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
  1. Match each item in Column A with the correct description in Column B.
Column A Column B
a. Linear actuator i. Produces a vector perpendicular to the plane of two given vectors
b. Revolute joint ii. Gives an output that moves in and out along a straight line
c. Dot product iii. Turns one link relative to the one before it
d. Cross product iv. Gives the angle between two directions
  1. Fill in the blanks:
  1. A vector divided by its own magnitude gives a ______________.
  2. The perpendicular distance from the axis of rotation to the line of action of a force is called the ______________.
  3. The difference between the setpoint and the measured value of a controlled quantity is called the ______________.
  1. Write the full form of each of the following abbreviations: CNC, SCARA, rpm.

3.10 Check Your Concepts

  1. Define kinematics. State two things that a kinematic analysis of a robot arm allows an engineer to determine.

  2. Differentiate between a scalar and a vector, giving one example of each from a robotic system. Explain why a position vector has no meaning until the frame it is measured in has been named.

  3. In a multi-joint industrial arm, the base joint is built much more heavily than the wrist joint. Give reasons for this, referring to the quantities on which the required torque depends.

  4. Differentiate between open-loop and closed-loop operation, giving one example of each from a robot. State one disturbance that a closed-loop system would correct and an open-loop system would not.

  5. A mobile robot is fitted with wheels of diameter 70 mm, driven at 90 rpm.

  1. Calculate the forward speed of the robot in m/s.
  2. Calculate how far it travels in 4 s at this speed, assuming no slip.
  3. State one reason why the distance actually covered on a workshop floor may be less than your answer to (b).
  1. A school team must make a robot travel exactly 1.5 m along a corridor and stop. One member proposes running the motors for a fixed time worked out from the robot’s known speed. Another proposes fitting a sensor that reports how far the wheels have turned, and stopping when the measured distance reaches 1.5 m. Compare the two approaches, recommend one with reasons, and state one limitation of the approach you have recommended.

3.11 Diagram, Circuit & Output Reading

  1. A control arrangement for one joint of a robot arm is drawn as five blocks connected in a loop. Reading from the left, the blocks are labelled: setpoint, comparator, controller, motor, joint. A sixth block, labelled sensor, is connected to the joint, and an arrow runs from it back to the comparator.
  1. Name the quantity carried by the arrow from the comparator to the controller.
  2. Name the quantity carried by the arrow from the sensor back to the comparator, and state whether it is added to or subtracted from the setpoint.
  3. State what the arrangement would no longer be able to do if the sensor and its arrow were removed.
  1. A link of a robot lies along the x-axis of the base frame with its tip at the point (0.20, 0) m. The joint at the origin then rotates the link anticlockwise through 30°, so that the new position of the tip is given by:

\[\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos 30° & -\sin 30° \\ \sin 30° & \cos 30° \end{bmatrix} \begin{bmatrix} 0.20 \\ 0 \end{bmatrix}\]

  1. Work out the coordinates of the tip after the rotation, correct to three decimal places.
  2. Calculate the distance of the new position from the origin, and state what this result confirms about the link.
  1. The table below gives the rated holding torque of three servo motors available in a school laboratory. A robot arm requires a holding torque of 1.05 N·m at its shoulder joint.
Motor Rated holding torque (N·m) Mass (g)
P 0.85 55
Q 1.10 60
R 2.40 165
  1. State which motors could hold the required torque, giving your reason.
  2. Explain one disadvantage of choosing motor R rather than motor Q for this joint.
  3. Explain why a motor whose rated torque is only slightly above the calculated requirement may still prove inadequate in use.
  1. A student calculates the torque produced at a joint by two forces acting at the same point on a link, 0.25 m from the joint. Both forces act at right angles to the link, one of 6 N and one of 8 N, and the two forces are perpendicular to each other. The student writes:
Step 1  Total force = 6 + 8 = 14 N
Step 2  Torque = force x moment arm = 14 x 0.25 = 3.5 N.m
  1. Identify the single mistake in this working.
  2. Carry out the calculation correctly, showing each step.
  3. State one situation in which the student’s Step 1 would have been correct.

3.12 Case-Based Questions

  1. A school workshop is building a pick-and-place arm to move small components across a bench. The shoulder joint carries a single horizontal link 0.25 m long, of mass 0.15 kg, whose weight acts at its midpoint. A component of mass 0.4 kg is gripped at the far end of the link. The servo motor fitted at the shoulder is rated at 1.2 N·m. Take \(g = 9.8\) m/s².
  1. Calculate the total torque the shoulder must produce to hold the link horizontal with the component gripped.
  2. State, with reasons, whether the fitted servo is suitable for this arm, and comment on how much margin it leaves.
  3. The team now wishes to extend the link to 0.35 m so that the arm can reach further, keeping the same component and the same servo. Explain what happens to the torque requirement, and suggest two changes the team could make so that the arm still works.
  1. An automated trolley carries crates along a warehouse aisle at a steady 0.6 m/s. Warehouse rules require it to come to rest within 0.30 m of the point at which a stop is commanded. Its forward-facing sensor reliably detects an obstruction at a range of 0.5 m. The crates are not strapped down.
  1. Calculate the deceleration the trolley must achieve to meet the stopping requirement, and the time the stop will take.
  2. Using your answer to (a), state whether the sensor’s detection range gives the trolley enough warning to stop before reaching an obstruction, and justify your answer.
  3. The trolley is later loaded with heavier crates and run on a smoother section of floor. Explain, in terms of force and friction, why the stopping distance may now be longer, and state one change to the trolley’s operation that would restore the required stopping performance.