The complete course on modelling a serial manipulator robot (Master level), explained step by step: orientation, homogeneous matrices, DHm, direct and inverse geometric models, Jacobian, motion laws, dynamics and control. Read the “Maths and motion” course first if you are a beginner.
The logic of the module in one sentence
A serial robot is a chain of solids linked by motorised joints. To model this robot is to know how to go from the values of the motorsq = (q1, …, qn) (joint space) to the position and orientation of the toolX (operational space), and conversely:
MGD
MGI
Kinematic model
Motion laws
X = f(q)
q = f−1(X)
X˙ = J(q) q˙
q(t), q˙(t)
The whole course consists in building these relations step by step.
1–2
3
4
5–6
7
8
9
10
Orientation
Homogeneous matrices
DHm parameters
MGD / MGI
Spaces and aspects
Jacobian (speeds)
Motion laws
Dynamics and control
Basic vocabulary
Serial robot (open kinematic chain): the bodies C0 (base), C1, …, Cn (end effector) follow each other; each joint Lj links Cj−1 to Cj. Examples: SCARA, 6R (Kuka, ABB, Fanuc, Stäubli, UR).
Parallel robot (closed chain): the end effector is linked to the base by several chains (e.g. the Delta robot).
Motorised joints: in serial robotics we practically only use the pivot (revolute, 1 DOF, variable = angle θ) and the slider (prismatic, 1 DOF, variable = length r). The other joints (sliding pivot, ball joint, plane contact, helical) are used to describe the mechanics.
Degrees of freedom (DOF): number of independent joint variables n. A free object in space has 6 DOF (3 of position + 3 of orientation).
Redundant robot: n greater than the number of DOF needed by the task (e.g. Kuka LWR with 7 DOF).
1
Locating an object: position and rotation matrix
10 min
You will learn
what “locating” an object means, and the rotation matrix with its properties.
1.1 What “locating” means
Locating an object in space is giving two pieces of information relative to a reference frame R0 attached to the environment:
the position of a particular point of the object (centre of gravity, corner, tool centre…): 3 coordinates (x, y, z) in R0;
the orientation of the object: 3 angles which characterise in a unique way the orientation of the frame R1 linked to the object relative to R0.
Result: 6 parameters (6 DOF) for a free solid.
1.2 The rotation matrix
Let R1 = (O, x1, y1, z1) be turned relative to R0 = (O, x0, y0, z0). The columns of the rotation matrix 0R1 are the vectors of R1 expressed in R0 (direction cosines):
Mnemonic: the row and the column of the rotation axis contain a 1 and zeros; the “−sin” is above the diagonal for x and z, but below it for y (circular order x → y → z → x: for y, we turn from z towards x).
Solved exercise (Master course): rotation of a point
R1 is obtained by Rot(z, 45°) and 1p = (−2, 1, 0)T. Compute 0p.
Solution.0p = Rot(z, 45°) 1p with cos 45° = sin 45° = √2/2:
Check: the norm is conserved, √(4.5 + 0.5) = √5 = ‖1p‖. ✓
Key terms
reference frame
rotation matrix
direction cosines
orthogonal matrix
Check yourself
What is the inverse of a rotation matrix?
Its transpose: R−1 = RT.
What does the left exponent in 0R1 mean?
The frame in which the coordinates are expressed (R0).
2
Describing the orientation with 3 angles: Euler and Cardan
15 min
You will learn
the two conventions of 3 angles, how to compute the matrix, and how to get the angles back.
A rotation matrix contains 9 numbers but only 3 are independent. We therefore describe the orientation with 3 angles, by chaining 3 elementary rotations. Two conventions are on the programme.
2.1 Euler angles (ZXZ convention): rotations around moving axes
We start from the frame A and perform successively:
a rotation of angle φ (precession) around z: x becomes u;
a rotation of angle θ (nutation) around the new axis x (= u): z becomes z′;
a rotation of angle ψ (proper rotation) around the new axis z′: we obtain the frame B.
The rotation axes move with the frame: we multiply on the right, in the order of the rotations.
This time we turn around the fixed axes of space (a rotation does not modify the direction of the next one). It is the convention of free vehicles in space: drones, boats, mobile robots. Vocabulary from navigation:
x forward, z vertical towards the sky, y to the left (right-handed frame);
rollγ around x, pitchβ around y, yawα around z.
The first rotation (around x) is done on the object; the following ones are “added” on the left:
Rotations around the axes of the moving frame (Euler): we multiply on the right (R = R1R2R3, in chronological order).
Rotations around the axes of the fixed frame (Cardan): we multiply on the left (R = R3R2R1).
Useful remark: Rot(z, α) Rot(y, β) Rot(x, γ) can be read either as x then y then z around the fixed axes, or as z then y′ then x″ around the moving axes: it is the same matrix.
The matrix product is not commutative: changing the order changes the final orientation.
2.3 Inverse problem: finding the angles from the matrix
We know ARB = (rij) and look for the Cardan angles (α, β, γ). We identify term by term.
Method: extraction of the Cardan angles
r31 = −sin β and r11² + r21² = cos² β, so cos β = ±√(r11² + r21²).
Singular case cos β = 0: if β = +π/2, only the difference γ − α is defined: γ − α = atan2(r12, r22); one possible solution: α = 0, γ = atan2(r12, r22). If β = −π/2, only the sum γ + α is defined: γ + α = atan2(−r12, r22); one possible solution: α = 0, γ = atan2(−r12, r22).
Why atan2(y, x) and not arctan(y/x)? Because atan2 uses the signs of y and of x to give the angle in the right quadrant (]−π, π]), whereas arctan only returns an angle between −π/2 and π/2.
Classic pitfall
In the singular case (gimbal lock), two rotation axes are aligned: we lose one degree of freedom of the representation and there are infinitely many solutions. Never divide by cos β = 0!
Key terms
Euler angles
Cardan / roll–pitch–yaw
gimbal lock
atan2
Check yourself
Euler (moving axes) or Cardan (fixed axes): on which side do you multiply the new rotation?
Euler: on the right. Cardan: on the left.
When is the extraction of the Cardan angles singular?
When cos β = 0, that is β = ±π/2 (gimbal lock).
3
Homogeneous transformation matrices
12 min
You will learn
a single 4×4 tool for rotation and translation, composition and inverse.
3.1 The idea: one tool for the rotation and the translation
In robotics, a frame Rj is both turned and moved relative to Ri. We group both pieces of information in a 4 × 4 matrix:
The global transformation of a 6-axis robot is therefore 0T6 = 0T11T22T33T44T55T6: it allows to express in the base frame R0 any point or vector known in the frame of the end effector R6.
Solved exercise 1 of course C2: homogeneous coordinates and components
Homogeneous coordinates in R0 of O0: 0O0 = (0, 0, 0, 1)T.
Homogeneous components in R0 of z0: 0z0 = (0, 0, 1, 0)T.
In R1, 1O1 = (0, 0, 0, 1)T. Then 0O1 = 0T1 (0, 0, 0, 1)T = 4th column of 0T1: only the position vector (Px, Py, Pz) is needed.
In R1, 1z1 = (0, 0, 1, 0)T. Then 0z1 = 0T1 (0, 0, 1, 0)T = 3rd column of 0T1: the vector a.
The TCP is at d = +20 cm from the flange along z6: 6TCP = (0, 0, 0.2, 1)T (in m), hence 0TCP = 0T66TCP = (Px + 0.2 ax, Py + 0.2 ay, Pz + 0.2 az, 1)T. We only need the 3rd and 4th columns of 0T6.
Solved exercise (Master course): chain of frames
We know UTA, ATB, UTC and CTD and we look for BTD (how to see object D from B).
Solution. We write a “path” from B to D through the known frames, by inverting the arrows that we go through backwards:
BTD = BTAATUUTCCTD = (ATB)−1 (UTA)−1UTCCTD
Rule: the adjacent indices must “touch each other” (BTAATU …).
Key terms
homogeneous matrix
homogeneous coordinates
composition
inverse transformation
Check yourself
In a 4×4 homogeneous matrix, what does the last row always contain?
(0 0 0 1).
What is the 4th component of a point? Of a vector?
1 for a point (the translation applies), 0 for a vector (it does not).
4
Placing the frames: the modified Denavit–Hartenberg convention (DHm)
25 min
You will learn
the rules to place the frames, the 4 parameters, the transition matrix and full examples (SCARA, Kuka, ABB, UR3).
4.1 Why a convention?
There are infinitely many ways of placing a frame on each body. The DHm method (Khalil–Kleinfinger) imposes rules which allow describing a chain of n bodies with a minimal number of parameters: each passage Rj−1 → Rj only requires 4 parameters (instead of 6).
Notation: the body Cj carries the frame Rj; the joint Lj links Cj−1 to Cj; C0 is the base.
4.2 The rules to place the frames
Method: placing the frame Rj on the body Cj
Axis zj: carried by the axis of the joint Lj (rotation axis of a pivot, direction of translation of a slider).
Axis xj: carried by the common perpendicular to zj and zj+1. If the axes are concurrent, xj is normal to the plane they form.
Origin Oj: at the intersection of zj and xj.
Axis yj: completes so that (xj, yj, zj) is a right-handed orthonormal frame.
Advised order: place first all the z, then all the x, then the y and the origins.
The common perpendicular between two lines:
two arbitrary (non-coplanar) lines: it is unique;
two concurrent lines: it is unique (normal to the plane, through the intersection point);
two parallel lines: infinitely many solutions (parallel to each other, of variable height) ⇒ we choose the one that cancels a maximum of parameters;
two coincident lines: double infinity of solutions (free height and orientation).
Conventions for the ends: we choose R0 coincident with R1 when q1 = 0 (often z0 vertical, O0 at the base); for the last frame Rn, we choose xn coincident with xn−1 when qn = 0, or on a symmetry axis of the end effector.
4.3 The 4 parameters to go from Rj−1 to Rj
Param.
Definition
αj
angle between zj−1 and zj, measured aroundxj−1
dj
distance between zj−1 and zj, measured alongxj−1
θj
angle between xj−1 and xj, measured aroundzj
rj
distance between xj−1 and xj, measured alongzj
σj
type of joint: σj = 0 pivot, σj = 1 slider
(In the Master 2016 course, dj is written aj: it is the same parameter.)
Remember
αj and dj are always constant (dimensional parameters of the robot).
Pivot joint (σj = 0): the joint variable is qj = θj; rj is constant.
Slider joint (σj = 1): the joint variable is qj = rj; θj is constant.
In short: qj = σ̄jθj + σjrj with σ̄j = 1 − σj.
For a robot with n DOF: 5n parameters, arranged in the Denavit–Hartenberg table.
αj = −π/2: the 2nd row becomes (0 0 1 rj) and the 3rd (−sθj −cθj 0 0).
αj = +π/2: the 2nd row becomes (0 0 −1 −rj) and the 3rd (sθj cθj 0 0).
4.5 A complete example: the SCARA robot (4 DOF, RRPR)
The SCARA has 4 moving bodies + the base, so 5 frames R0 … R4. Joints: pivot q1, pivot q2, slider q3 (vertical), pivot q4 (rotation of the tool). The four z axes are vertical and parallel.
j
σj
αj
dj
θj
rj
1
0
0
0
q1
r1
2
0
0
d2
q2
0
3
1
0
d3
0
q3
4
0
0
0
q4
−r4
4 joint variables (q1, q2, q3, q4) and 4 non-zero dimensional parameters (r1, d2, d3, r4). The sign −r4 comes from O4 being lower than O3; q3 is counted along z3.
Calculation trick: we multiply starting from the end, 2T4 = 2T33T4, then 1T4 = 1T22T4, then 0T4 = 0T11T4. We write c12 = cos(q1+q2), c124 = cos(q1+q2+q4), etc. Result:
Interpretation: the tool turns by an angle q1 + q2 + q4 around the vertical, and its position is given by the 4th column.
4.6 6R robots: examples of tables
Kuka KR 160 R1570 (axis 2 shifted by 250 mm from axis 1; wrist with 3 concurrent axes):
j
σj
αj
dj
θj
rj
1
0
0
0
q1
r1
2
0
−π/2
d2
q2
0
3
0
0
d3
q3
0
4
0
−π/2
0
q4
r4
5
0
π/2
0
q5
0
6
0
−π/2
0
q6
0
r1: height of the shoulder; d2: offset axis 1 / axis 2; d3: length of the arm; r4: length of the forearm.
ABB IRB 140 / IRB 120 (no offset between axes 1 and 2: d2 = 0 and O0 = O1 = O2) – table of the Master course:
j
αj
dj
θj
rj
1
0
0
θ1
0
2
−π/2
0
θ2
0
3
0
d3
θ3
0
4
π/2
0
θ4
r4
5
−π/2
0
θ5
0
6
π/2
0
θ6
0
Classic pitfall
The signs of αj and of the lengths depend on the direction chosen for each zj (which must correspond to the positive rotation direction of the manufacturer: Fanuc and Kuka do not make the same choice) and on the “zero” position of the robot (all the qi = 0). Two different tables can be both correct: you must always check on the diagram that for q = 0 the obtained configuration is the one of the real robot.
Solved exercise 4 of course C2: DHm table of a UR robot (e.g. UR3)
The UR have 6R of which axes 2, 3, 4 are parallel (horizontal); there are lateral offsets between the arms. Dimensions of the UR3 (in mm): base 152, arm 244, forearm 213, offsets 112, 85 and 82.
Approach: (1) z1 vertical; z2, z3, z4 horizontal and parallel; z5 perpendicular to z4; z6 perpendicular to z5. (2) The x follow the common perpendiculars: along the arms for x2, x3. (3) The offsets along the z become rj.
A possible table (robot arm stretched horizontally for q = 0):
j
σj
αj
dj
θj
rj
1
0
0
0
q1
r1 = 152
2
0
π/2
0
q2
0
3
0
0
d3 = 244
q3
0
4
0
0
d4 = 213
q4
r4 = 112
5
0
π/2
0
q5
r5 = 85
6
0
−π/2
0
q6
r6 = 82
The signs of d3, d4 and of the α may change according to the orientation chosen for the x and z (see the pitfall above). What does not change: 3 non-zero α, 2 lengths d (the two arms) and 4 offsets r.
how to compute the pose of the tool from the joint variables.
5.1 Definition
The MGD gives the situation of the end effector (position + orientation) as a function of the joint variables:
X = f(q) ⟺ 0Tn(q) = 0T1(q1) 1T2(q2) … n−1Tn(qn)
The position of the end effector is read in the 4th column: 0On = 0Tn (0, 0, 0, 1)T.
The orientation is read in the 3×3 block (then, if needed, we extract Euler or Cardan angles, step 2).
For a tool offset nE in Rn: 0E = 0TnnE, or 0TE = 0TnnTE.
The MGD always has a unique solution: to a configuration q corresponds one single situation of the tool.
5.2 MGD of the SCARA
With the notations of course C1 (a1: length of arm 1, a2: arm 2, h: height), we have a1 = d2, a2 = d3, h = r1 − r4 in DHm:
XE = a1 cos q1 + a2 cos(q1+q2) YE = a1 sin q1 + a2 sin(q1+q2) ZE = h + q3 θE = q1 + q2 + q4
It is exactly the 4th column and the rotation angle of 0T4 found by DHm: the geometric method “by hand” and the DHm method give the same result. For a 6R robot, only the DHm method remains practicable.
Key terms
MGD
situation
tool offset
Check yourself
Where do you read the position of the end effector in 0Tn?
how to find the joint variables for a wanted pose, and how many solutions to expect.
6.1 Statement of the problem
The MGI gives the joint variables allowing to reach a wanted situation of the tool:
q = f−1(X) that is: solve 0Tn(q) = U0 = sxnxaxPxsynyayPysznzazPz0001
It is the model used permanently by the control cabinet: the programmer gives points in space (in X), the motors need set-points in q.
Remember: number of solutions of the MGI
No solution: the asked point is outside the workspace.
A finite number of solutions: each solution is an aspect (or posture) of the robot. SCARA: 2 (elbow right / elbow left). 6R robot of UR3 type: up to 8 solutions (shoulder left/right × elbow up/down × wrist flipped or not), sometimes only 4.
Infinitely many solutions: redundant robot (e.g. Kuka LWR with 7 DOF, whose elbow can turn without moving the tool) or singular configuration.
6.2 MGI of the SCARA, step by step
We know (XE, YE, ZE, θE) and look for (θ1, θ2, d3, θ4).
Step a – find θ2. We square and add the first two equations of the MGD:
The choice δ = ±1 is the choice of the aspect (elbow right or left). If the quantity in the arccos leaves [−1, 1], the point is unreachable.
Step b – find θ1. The polar angle of E is atan2(YE, XE); we must subtract the angle between arm 1 and the line OE, which is atan2(a2 sin θ2, a1 + a2 cos θ2):
θ1 = atan2(YE, XE) − atan2(a2 sin θ2, a1 + a2 cos θ2)
Step c – the translation and the orientation:
d3 = ZE − hθ4 = θE − θ1 − θ2
Worked example
a1 = a2 = 0.3 m, we aim at XE = 0.3, YE = 0.3. Then cos θ2 = (0.18 − 0.18)/0.18 = 0 so θ2 = ±90°. With δ = +1: θ1 = 45° − atan2(0.3; 0.3) = 45° − 45° = 0°. Check: XE = 0.3 + 0.3 cos 90° = 0.3, YE = 0 + 0.3 sin 90° = 0.3 ✓. With δ = −1: θ1 = 45° + 45° = 90°, θ2 = −90°: the other aspect.
6.3 General method: Paul's method (Khalil–Dombre)
For a 6-DOF robot, we cannot “see” the geometry: we use a systematic method.
Paul's method
Write the equation U0 = 0T11T2 ⋯ 5T6.
Pre-multiply successively by the inverses: 1T0U0 = 1T2 ⋯ 5T6, then 2T11T0U0 = 2T3 ⋯ 5T6, etc.
At each step, look in the matrix equality for an element depending on one single unknown (on the left, only one variable appears).
Solve with standard equations:
X sin θ + Y cos θ = Z (type 2): solution with atan2, two possible solutions;
X sin θ = Y and X cos θ = Z: θ = atan2(Y/X, Z/X);
Xr = Y (slider): r = Y/X.
Spherical-wrist robots (axes 4, 5, 6 concurrent, the case of most industrial 6R): the problem decouples. The first 3 axes fix the position of the centre of the wrist (θ1, θ2, θ3: position problem), the last 3 fix the orientation (θ4, θ5, θ6: orientation problem, identical to the extraction of Euler angles of step 2).
Key terms
MGI
aspect / posture
Paul method
decoupling
Check yourself
How many MGI solutions can a UR3-type 6R robot have, at most?
8.
In the SCARA MGI, what does the sign δ = ±1 choose?
two ways of representing the same configuration, and how to draw a workspace.
7.1 Two ways of representing the same configuration
Joint space: space of the variables (q1, …, qn), of dimension n (4 for a SCARA, 6 for a 6R). A configuration of the robot is a point Q.
Operational space: space of the situation of the tool (position x, y, z + orientation). The same configuration is a point E.
Q and E represent the same configuration. During a movement, Q describes a joint trajectory and E an operational trajectory (the one programmed by the roboticist): they correspond to the same task.
For a serial robot: to one Q corresponds one singleE (MGD), but to one E may correspond severalQi, Qj … (MGI, aspects).
7.2 Exercise of course C1: 2-DOF SCARA
Solved exercise: images of trajectories (arms of the same length a)
Joint trajectory: Oa(0, 0) → Aa(0, π/2) → Ba(π/4, π/2) → Ca(π/4, 0) → Oa. (1) Image in the operational space of the segment OaBa of the joint space. (2) Origin in the joint space of the segment BoOo of the operational space.
Solution 1. On OaBa: q1 = (π/4)t, q2 = (π/2)t = 2q1, t ∈ [0, 1]. The MGD gives OE = a(cos q1 + cos 3q1, sin q1 + sin 3q1) = 2a cos q1 (cos 2q1, sin 2q1). In polar coordinates, with φ = 2q1: ρ = 2a cos(φ/2): a curve (part of a cardioid) which goes from Oo = (2a, 0) to Bo = (0, a√2) – a straight line in the joint space does not give a straight line in the operational space.
Solution 2. On the segment BoOo: x = 2as, y = a√2(1 − s). The MGI (equal arms, elbow q2 ≥ 0) gives q2 = arccos((x² + y² − 2a²)/(2a²)) and q1 = atan2(y, x) − q2/2. The result is a curve from Ba to Oa in the plane (q1, q2): a straight operational line imposes a non-rectilinear joint trajectory.
7.3 Joint limits and workspace
Each variable is bounded: qimin ≤ qi ≤ qimax. If the limits are fixed, the accessible joint space is a block (rectangular parallelepiped). Its image by the MGD is the workspace (space reachable by the tool centre). The more pivots the robot has, the more complex its borders are (crescent or mushroom shapes). We generally only represent the position, without orientation constraint.
Method: drawing the workspace of a SCARA (e.g. Omron Cobra)
Draw the image (by the MGD) of each of the 4 borders of the joint rectangle: arcs of circle centred on axis 1 (θ2 fixed) or on the end of arm 1 (θ1 fixed).
Careful with the aspects: the borders of the operational space are not only the images of the joint borders. The line θ2 = 0 (stretched arm) separates the two aspects and its image (circle of radius a1 + a2) is also a border.
Superimpose all the borders to obtain the workspace.
Example of a SCARA (a1 = 325 mm, a2 = 275 mm): each colour corresponds to an aspect; in the overlapping zone, the same point is reachable with two postures.
7.4 The different forms of movement
Mode
Behaviour
Relation between the spaces
Linear (operational space)
Straight line at constant speed along each side; stop (zero speed) at each vertex.
The operational space imposes the joint space (MGI at each instant).
Joint (point to point)
Does not follow the sides; optimal trajectory for the motors.
The joint space induces the operational space (unpredictable trajectory of the tool).
Linear at constant speed
Straight lines but a deviation is tolerated at the vertices: no stop (e.g. glue deposit without burr).
Imposed along the sides, induced at the vertices.
Key terms
joint space
operational space
workspace
joint stops
Check yourself
A straight line in the joint space: is it a straight line for the tool?
No. In general the tool follows a curve.
Which line separates the two aspects of a SCARA?
θ2 = 0 (stretched arm); its image is the circle of radius a1 + a2.
8
The kinematic model: the Jacobian matrix
12 min
You will learn
how joint speeds give tool speeds, why singularities exist and how to invert the model.
(Complement from Khalil–Dombre, essential to understand singularities and the link speeds/forces.)
8.1 The direct kinematic model
It links the operational speeds to the joint speeds:
X˙ = J(q) q˙, Jij = ∂fi(q)∂qj (matrix m × n)
For a small robot, J is obtained by differentiating the MGD. For a robot with more than 3 DOF, we use the kinematic Jacobian: the column k is
jk = σkak + σ̄k (ak ∧ Lk,n)σ̄kak
where ak is the unit vector of zk and Lk,n = OkOn: a pivot creates a speed ak ∧ Lk,n and a rotation ak; a slider creates a translation ak.
Worked example
Jacobian of the planar SCARA (2 DOF). By differentiating XE, YE:
J = −a1s1 − a2s12−a2s12a1c1 + a2c12a2c12, det J = a1a2 sin θ2
det J = 0 for θ2 = 0 (stretched arm) or θ2 = π (folded arm): these are the singularities, exactly the border between the two aspects seen in step 7.
8.2 Singularities
When the rank of J drops, the robot locally loses the possibility of moving in some directions. For a square J: singularity if det J = 0; redundant robot: det(JJT) = 0. Example Stäubli RX-90: det(3J6) = −C3D3RL4S5(S23RL4 − C2D3), hence 3 singularities: C3 = 0 (stretched arm), S23RL4 − C2D3 = 0 (wrist on axis 1, shoulder), S5 = 0 (axes 4 and 6 aligned, wrist).
8.3 The inverse kinematic model
Regular case (J square and invertible): q˙ = J−1(q) X˙.
Redundant robot: pseudo-inverse q˙ = J+X˙ with J+ = JT(JJT)−1 (solution of minimal norm).
Near a singularity, J−1 explodes (enormous joint speeds): we use damped least squaresq˙ = JT(JJT + λ²I)−1X˙.
Link with statics: the motor torques needed to exert a force F on the environment are Γ = JT(q) F.
Key terms
Jacobian matrix
singularity
pseudo-inverse
damped least squares
Check yourself
What is the determinant of the Jacobian of the planar 2-axis arm when the arm is stretched?
det J = a1a2 sin θ2 = 0: it is a singularity.
Which formula links the motor torques to a force exerted by the tool?
Γ = JT(q) F.
9
Motion generation: the speed laws
25 min
You will learn
how to choose and compute the time law of a movement: bang-bang, trapezoid, jerk-limited, sin², polynomial, multi-axis.
9.1 The principle
Knowing the start and the arrival is not enough: we must decide how the position evolves in time. For a joint movement from qi to qf:
The function r(t) defines the motion law. It is chosen according to the limits of the motor: maximum speed Vmax (given by the gearmotor) and maximum acceleration a (given by the torque, therefore by the motor current).
9.2 Bang-bang law
Zero speed at the start and at the end. First half at constant acceleration, second half at constant deceleration. The maximum speed is reached at mid-course, the mean speed is Vmax/2. The position is made of two parabolas tangent to the horizontal at the start and at the end.
Continuous in position and in speed, discontinuous in acceleration.
9.3 Speed trapezoid law (the most used)
Three phases: (1) constant acceleration a up to Vmax; (2) constant speed Vmax; (3) constant deceleration down to the stop. Adapted to large displacements (Vmean ≃ Vmax). It saturates both speed and acceleration: it is the minimum-time law.
Test: the plateau exists if X > 2X1, that is X > Vmax²/a.
If yes (trapezoid):T1 = T3 = Vmax/a, T2 = X/Vmax − Vmax/a, Ttot = X/Vmax + Vmax/a.
If not (degraded trapezoid = triangle = bang-bang):Vmax is never reached. T1 = T3 = √(X/a), T2 = 0, V* = √(Xa), Ttot = 2√(X/a).
Check: the displacement is the area under the speed curve, X = aT1² + aT1T2 (if T1 = T3).
Solved exercise of course C3: SEPRO Cartesian robot, trapezoid law
Case
X (m)
Vmax (m/s)
a (m/s²)
Vmax²/a
T1 (s)
T2 (s)
T3 (s)
Ttot (s)
a)
1
0.5
1
0.25 < X
0.5
1.5
0.5
2.5
b)
1
1
1
1 = X
1
0
1
2
c)
1
1.5
1
2.25 > X
1
0
1
2
d)
1
1
2
0.5 < X
0.5
0.5
0.5
1.5
e)
0.1
0.5
0.5
0.5 > X
0.447
0
0.447
0.894
Details. a) Trapezoid: T1 = 0.5/1 = 0.5 s; T2 = 1/0.5 − 0.5 = 1.5 s. Check: X = 1·0.25 + 1·0.5·1.5 = 1 m ✓. b) Limit case: Vmax is reached exactly at mid-course, T2 = 0 (triangle). c) Bang-bang: T1 = √(1/1) = 1 s; V* = √(1·1) = 1 m/s: we never reach 1.5 m/s, increasing Vmax is useless here. d) Trapezoid: T1 = 0.5 s; T2 = 1/1 − 0.5 = 0.5 s. Check: 2·0.25 + 1·0.5 = 1 m ✓. e) Bang-bang: T1 = √(0.1/0.5) = 0.447 s; V* = √0.05 = 0.224 m/s.
9.4 Acceleration trapezoid law (limited jerk)
Seven phases: increasing, constant, decreasing acceleration; constant speed; then the three symmetrical phases. The acceleration is continuous: we limit the sudden variations of current in the motor, which increases its life (used on cobots, e.g. Fanuc CR-15iA).
9.5 Sine-squared speed law
Phase 1: V(t) = Vmax sin²(ωt) up to sin²(ωt) = 1; phase 2 at constant speed; phase 3 symmetrical. The acceleration (Vmaxω sin 2ωt) is continuous (“sine–ramp–sine” profile).
at identical maximum acceleration Amax: trapezoid V = TAmax; sin² V = (2/π)TAmax ≈ 0.64 TAmax, that is 36 % less;
but the smoothness of the sin² (no current discontinuity) allows to tolerate accelerations up to 100 % larger; the speed reached is then at least equal to the one of the trapezoid, and the motor is better protected.
For a point-to-point joint displacement, we want all the axes to start and stop at the same time.
Method
Compute the displacement Δqi of each axis.
The axis with the largest displacement receives the maximum speed Vmax.
Each other axis receives Vi = VmaxΔqi/Δqmax (same trapezoid shape, same durations T1, T2, T3).
Example of the course: Δq = (+50°, +20°, −30°), Vmax = 100 ⇒ V = (100, 40, −60). The axes are synchronised, but the trajectory of the tool is not a straight line.
Solved exercise of course C3: UR3 between A and B
A = (400, 0, −30), B = (400, 200, −30). Values read on the pendant:
θ1
θ2
θ3
Point A
−20.68°
−64.42°
89.98°
Point B
14.76°
−50.74°
67.34°
Δθ
+35.44°
+13.68°
−22.64°
Maximum allowed speed: 50°/s. Each third of the time: acceleration, constant speed, deceleration (T1 = T2 = T3 = T).
Axis 1 (largest displacement): V1 = 50°/s. Area of the trapezoid: Δθ1 = ½V1T + V1T + ½V1T = 2V1T ⇒ T = 35.44/(2 × 50) = 0.354 s; total duration 3T = 1.06 s; acceleration V1/T ≈ 141°/s².
Remark: the asked displacement is a straight line (only y varies), but in joint mode with homothetic trapezoids the tool does not follow it exactly; for a real straight line we need a linear movement (MGI at each instant).
9.8 Joint or operational?
Generation in the joint space
Generation in the operational space
+ few computations (no online MGI)
+ geometry of the trajectory under control (line, circle)
+ no problem with singularities
– MGI at every point of the trajectory
+ motor limits directly exploited
– possible failure near a singularity or if the aspect changes
– unpredictable trajectory of the tool
– “average” speed limits, under-use of the robot
⇒ fast movements in free space
⇒ welding, gluing, cutting
Key terms
bang-bang
speed trapezoid
jerk
homothetic trapezoids
minimum time
Check yourself
When does the trapezoid degrade into a triangle?
When X ≤ Vmax²/a: the robot does not have the time to reach Vmax.
X = 0.1 m, Vmax = 0.5 m/s, a = 0.5 m/s²: what is the total time?
A(q): inertia matrix (n × n, symmetric positive definite);
C(q, q˙)q˙: centrifugal and Coriolis effects;
Q(q): gravity;
Fv, Fs: viscous and dry friction; JTFe: force exerted on the environment.
Two computation methods: Lagrange (from the kinetic energy E and the potential energy U: Γi = d/dt(∂L/∂q˙i) − ∂L/∂qi, L = E − U) and Newton–Euler (recursive, numerically more efficient).
10.2 Control
Joint PID (classic control, axis by axis): Γ = Kp(qd − q) + Kd(q˙d − q˙) + Ki∫(qd − q) dt. Simple, used in industry, but the performance varies with the configuration.
Non-linear decoupling control (computed torque): Γ = Â(q) w + Ĥ(q, q˙) with w = q¨d + Kd(q˙d − q˙) + Kp(qd − q). We compensate the dynamics of the robot, which then behaves like n decoupled double integrators.
Key terms
inertia matrix
Coriolis
PID
computed torque
Check yourself
What are the three kinds of terms in the dynamic model besides friction?
Inertia (Aq¨), centrifugal/Coriolis (Cq˙) and gravity (Q).
11
Revision sheet: the essentials on one page
5 min
You will learn
all the key formulas of the course in one place.
Topic
Key formula
Rotation
columns of 0R1 = axes of R1 in R0; R−1 = RT; det R = 1
Euler ZXZ (moving axes, on the right)
Rot(z, φ) Rot(x, θ) Rot(z, ψ)
Cardan / RPY (fixed axes, on the left)
Rot(z, α) Rot(y, β) Rot(x, γ); β = atan2(−r31, ±√(r11² + r21²)); singular if cos β = 0
zj on the axis of Lj; xj on the common perpendicular of zj, zj+1. αj: zj−1 → zj around xj−1; dj: along xj−1; θj: xj−1 → xj around zj; rj: along zj. Pivot: q = θ; slider: q = r. j−1Tj = Rot(x, α) Trans(x, d) Rot(z, θ) Trans(z, r)
MGD SCARA
X = a1c1 + a2c12, Y = a1s1 + a2s12, Z = h + q3, θE = q1 + q2 + q4