Controlling the motion of a robot system typically requires understanding the relationship between the orientation of the end effector (usually a tooltip, controlled reference frame, or controlled coordinate system) and the orientation of the actuators or motors used to manipulate the end effector (usually a controlled reference frame or controlled coordinate system). This knowledge broadly characterizes the kinematic structure of the robot system, typically expressed using kinematic equations. Some high-performance motion controllers have the ability to process these equations and derive relative motion trajectories, ensuring real-time position control of the robot system. This article introduces the kinematic equations for two specific robot systems.
Why use kinematics? 3- DOF crane
A 3-DOF crane is a relatively simple robotic system. Users can control the lifting distance, the crane's slewing angle, and the crane's tilt angle (see Figure 1). Typically, a crane also has a fourth degree of freedom—the suspension height of the lifted object. This degree of freedom is not considered here and will not affect the generalizability of the analysis results.
Figure 1 shows a three-degree-of-freedom crane, allowing the user to control the lifting distance, slewing angle, and tilt angle, but prohibiting linear movement at the crane's working end. Source: www.rki-us.com
Typically, the boom rotation path of a crane resembles an arc, and as the boom tilt angle increases, the end-loaded object (the load at the crane's end) will move upwards along this arc. These naturally occurring trajectories are acceptable in certain environments. However, what if the user desires a path composed of many line segments, or an arbitrary shape in any three directions? For example, what if the load is a measuring device or image acquisition system? A simple example is moving the load along a square trajectory, which is useful for some systems.
Those who have studied coordinate geometry should be familiar with the controlled coordinate system of a crane—usually a spherical coordinate system. A point in space can be characterized by three parameters in a spherical coordinate system: its distance from the origin, its azimuth angle θ (0–2π) on the xy-plane relative to the x-axis, and its angle θ (0–π) with the z-axis. A diagram of a spherical coordinate system is shown in Figure 2.
Figure 2. Those who have studied coordinate geometry should be familiar with the controlled coordinate system of a crane, which is usually a spherical coordinate system.
Moving along a line segment, we want to operate in a standard 3D Cartesian coordinate system. A point in a Cartesian coordinate system is represented by (x, y, z), and intuitively, this coordinate system is more convenient for controlling line segment displacement. For example, the trajectory of a square is composed of four line segments, and line segment motion is the most basic motion pattern in the Cartesian coordinate system. The problem then becomes: how do we transform between these two coordinate systems? The answer is the equation of motion. The equation of motion connects the Cartesian coordinate system (x, y, z) with the crane spherical coordinate system (r, θ, Φ).
Before delving further, let's quickly assess why these equations are necessary. If a user wants to control a motion path in a Cartesian coordinate system, he/she needs to define a trajectory consisting of a series of (x, y, z) coordinate positions. When using a motion controller, explicitly specifying the motion trajectory is unnecessary for many types of motion. Motion control typically generates a motion profile (a series of (x, y, z) coordinate positions) to control the motion; for example, point-to-point motion means linear motion in a Cartesian coordinate system. If we know the target (x, y, z) position of the object being controlled, we can then deduce the motion equations, and the motion controller can calculate how to control the actual crane (including boom length, tilt angle, and slewing angle—(r, θ, Φ)).
Forward motion equations are primarily used for initial calibration. They can be used to measure feedback positions and convert (r, θ, Φ) results into (x, y, z) coordinates that are of greater interest to the user. This process can also be used to determine the installation position and to initialize the crane coordinates at any location to relative (x, y, z) coordinates.
This demonstrates the necessity of the equations of motion. Now, we should discuss how to solve them. We'll begin by inversely deriving the kinematic equations; we hope to obtain the crane's (r, θ, Φ) coordinates:
In fact, this equation can be solved simply by observing the spherical/Cartesian coordinate system. Using some trigonometric formulas, we can obtain the following equation:
Observing the third equation above, Φ is expressed by an equation concerning r, and r can be solved from (x, y, z) in the first equation. The forward motion equation is similar in form:
By observation, these equations can also be easily solved:
A more complex example—the 6-DOF Stewart six-legged platform
The Stewart hexagonal platform has applications in many fields, including automated inspection, robotic surgery, satellite and telescope positioning, and mechanical simulation. The hexagon comprises six independent controlled actuators (lengths), converging at one end to a fixed base and at the other end to a planar platform, allowing six degrees of freedom (α (roll), γ (pitch), γ (yaw), x, y, z). A geometric example is shown in Figure 3.
Figure 3 shows the Stewart six-axis platform's applications in numerous fields, including automated inspection, robotic surgery, satellite and telescope positioning, and mechanical simulation. Source: ACS Motion Control
For this system, the inverse kinematic equations tell us that, given (α, γ, x, y, z), we know the lengths of the actuators (l1, l2, l3, l4, l5, l6) and their attitude (P). The forward equations are used to calculate the attitude P, denoted by the actuator leg lengths I. The forward kinematic equations are a closed system of equations, unsolvable by traditional methods. However, they can be solved using Newton's iteration method, which will be discussed below.
To understand the reverse motion equations of this system, it is necessary to determine the platform type and the location of the actuator convergence point, since the leg length is the distance between points. The position of the platform actuator is represented in a base point coordinate system as follows:
The subscripts in the above equations indicate the reference coordinate system of the vectors. Here, the position of a point is actually homogeneous coordinates, expressed in the form of (x, y, z, w) or (x/w, y/w, z/w). For simplicity, we can set w to 1. R is a transformation matrix that can transform the plateau point (Ppi), i.e., the plateau coefficient, into (Bpi), i.e., the base coefficient. R is a 3×4 matrix, including a 3×3 rotation matrix and a 3×1 translation matrix.
In the equation R, "s" represents the sine function; "c" represents the cosine function. The rotation matrix in the above equation is the identity matrix, used to transform the directions of the three vectors roll, pitch, and yaw. The translation matrix is simply a vector. Since the value of (Bbi) is known, once the value of (Bpi) is known, the length of the foot can be obtained by calculating the distance between the two points.
The equation above is actually quite simple, but it has many terms due to the introduction of matrix theory. Below is the final equation for the reverse motion (for foot "i").
The forward kinematic equations of this system are relatively complex, and due to processing requirements, they are not easy to solve. A better approach than directly solving the equations is to use an iterative method. Initial estimates are substituted into the equations, updated, and repeated until the error of the estimates is less than a certain limit. The specific calculation method will not be detailed here, but this method is applicable to the following processes. This method is a generalization of Newton's iteration method mentioned earlier. Many articles discuss this method; this paper focuses on its application to the forward kinematic equations. The first step is to estimate the initial attitude K, or in other words, estimate the values of (α, , γ, x, y, z). For a motion controller, the initial estimate is usually the controlled position of (α, , γ, x, y, z). From this estimate, the kinematic equations are derived, and the length of the actuator can be calculated, called (g1, g2, g3, g4, g5, g6), or written as a vector g. The mathematical expression is as follows: g = I(k).
Then, the length calculated based on the estimate is compared with the actual length I from the feedback device to obtain the "estimation error" e, which can be written as e = g – l.
If the estimation error is less than a certain threshold, the process ends. If the estimation error is not less than the threshold, a better estimate is needed. This process repeats until the estimate is sufficiently perfect (at which point, this estimate becomes the solution to the equation!). To understand how to mathematically determine a "better estimate," consider the following simple calculus example. Suppose we have a general function y = f(x), where f is nonlinear. If we want to calculate the change in y caused by a change in x, the following equation holds:
Now, if we examine a small interval of f(x), we can approximate this interval as a linear relationship with the following equation:
The above equation, often referred to as the local approximation of the slope in basic calculus, can be written in the following form:
If we rewrite the previous expression, we can obtain an equation with the change in x as the parameter:
Now, let's apply the same idea to this equation. Consider that we have a nonlinear function g = I(k) to determine the azimuth (k) and foot length (g) based on the estimated azimuth (k) and the estimated foot length (g). From the device feedback, we also know the actual foot length (I). Our estimation error is e = gl, and the goal is to re-estimate the azimuth (k*) if the estimation error does not meet the requirements. Then, we repeat the above method:
The equation above looks familiar; it's essentially the same equation we showed in our previous simple calculus example. We can simply rewrite this equation again to obtain a new estimate of the orientation (k*):
The matrix dI(k)/dk is what we call the Jacobian matrix. Before applying the Jacobian matrix to our equation above, it must be inverted; for a sixth-order matrix, this requires a 6×6 inverse, a complex mathematical derivation. Once the new attitude estimate is calculated, this process can be repeated until the error (e = g – l) is less than a certain acceptable level.
If the equations of reverse motion are known, the following are the derivation steps of the general forward motion equations:
1. Estimate the platform's initial attitude (k). For a motion controller, this is typically the initial controlled attitude.
2. Based on the estimated value, calculate the foot length using the inverse motion equation (g=I(k)).
3. This foot length is obtained by comparing it with the current actual foot length obtained from the encoder (e = g – l). If the error is less than a certain limit, the algorithm converges the current value to k and jumps to step 6. If the error exceeds the limit, it continues to step 4.
4. Use the inverse Jacobian matrix to generate a new estimate (k*=k-inv(dI(k)/dk)*e).
5. Update the estimate using the results from step 4.
6. Restart the iteration from step 2. This algorithm is not only applicable to six-degree-of-freedom systems; it can be used to derive the forward equations of any system (systems with convergent solutions) as long as the inverse equations are known.
Summarize
A key aspect of a robust approach to controlling robotic systems is the equations of motion. These equations not only describe the system's geometry but also enable modern motion controllers with sufficient processing power and speed to perform the necessary calculations to provide smooth motion control. While these equations can often be solved directly in real-time applications, direct solutions are not feasible for some complex systems, requiring the use of algorithms. High-performance modern controllers offer specific architectures that can embed these equations within the control system, opening up possibilities for developing robotic systems across numerous fields.