This section introduces the proposed MJTO algorithm for 3D laser cutting machines equipped with a redundant standoff axis. The approach utilizes B-spline curves [
13] to represent the joint displacement and ensure trajectory continuity and smoothness while expressing kinematic constraints [
15]. Known as minimized jerk trajectory optimization, the method formulates the optimization problem as two QP tasks. A QP model based on B-splines is developed for the two rotational axes to minimize jerk, thereby enhancing trajectory smoothness and machining precision. Similarly, the redundant standoff axis is modeled within a QP framework to further smooth the rotational axes center point path, as referred to the M path in our previous work [
28], and improve overall system performance. In addition, a collision avoidance strategy is introduced. It is based on the GFD in 3D joint space and an iterative RTO-based process. This ensures that the trajectory remains collision-free while satisfying kinematic constraints. The following subsections outline the key components of the MJTO methodology, including the mathematical representation of joint trajectories and M path using B-splines, the formulation of QP problems for rotational axes and the redundant axis, and the integration of collision avoidance mechanisms.
Firstly, this study builds on the trajectory representation framework developed in our previous work [
28]. The laser head follows the CL point trajectory
, which defines the tool path in Cartesian space, and the tool orientation
, a unit vector representing the tool’s orientation direction. Both are defined in the workpiece coordinate system (WCS), as illustrated in
Figure 2a. Here, the trajectories are parameterized using the normalized arc length parameter
u, which is generated by a standard G-code interpolator with demanding machining parameters as
where
denotes the arc length with respect to time
t and
is the total length of the tool path.
The concept of the second M point
is introduced here, as shown in
Figure 2b. This auxiliary point is used to characterize and enhance the smoothness of the primary translational axes during trajectory planning.
Figure 2c illustrates the relationship between coordinate systems with respect to the joint coordinates
defined as in
Figure 1. The forward kinematic equations, which transform joint coordinates
in MCS into WCS, are given by:
reversely, the conversion from WCS back to MCS, denoted as IKT, is formulated as
where the
function determines the angle by considering the signs of
and
.
2.1. B-Spline Representation of Joint Space and Kinematic Constraints
The proposed MJTO algorithm uses B-spline curves to represent rotational axis displacement trajectories. Their smoothness and flexibility make them suitable for modeling complex trajectories, as they ensure continuity and differentiability up to a desired order [
29]. Therefore, the displacement trajectories of the rotational axes
, for
, can be mathematically represented as
where
are the B-spline basis functions of degree
k,
is the control coefficient, and
is the number of the control coefficients.
The choice of degree of B-spline
k determines the smoothness of the trajectory. A quintic B-spline (
) is typically chosen to ensure
continuity since third-order differentiability helps to minimize abrupt changes in acceleration. The B-spline basis function
can be derived recursively using a knot vector
. A uniform method is employed for generating the knot vector, ensuring
control points along the tool path. Consequently, the collection of control coefficients
becomes the set of decision variables in (
5), to be optimized in the jerk-minimization process.
Tool path interpolation is performed in the WCS, considering Cartesian tangential dynamic parameters with
u. However, joint kinematic constraints are typically ignored during this stage, which can result in abrupt or non-smooth joint motions. Therefore, using the chain rule, the kinematic parameters of the joints, including angular velocity
, angular acceleration
, and angular jerk
, are derived incorporating tangential dynamic parameters as
The kinematic parameters can then be reformulated using (
4) as
where
and
represent the first and second deviates of feedrate with respect to time, respectively. Similarly,
,
,
denote the first, second, and third geometricalderivatives of
with respect to
u. Hence,
captures how the joint variable changes along the path from a purely geometric standpoint, whereas the feedrate
describes how fast we traverse that path in time. The geometrical derivatives of the joint displacement are given below as
However, to impose linear constraints on the geometrical derivatives in terms of the design variable
, we can reshape the geometrical derivatives in (
8)–(
10) in a general form for the
r-th derivative, following De Boor’s algorithm for B-splines [
15], as
where
,
is the interpolated node assigned on the CL point
, and the geometrical derivative of the control coefficient can be computed recursively as
where
are the control coefficients for the
r-th geometric derivative of
.
In many theoretical treatments, a constant feedrate (i.e.,
) is assumed. This simplification is also adopted here to ease the parametric forms. However, in the application of practical machining, a variable value is assigned to feedrate, which is influenced by multiple factors, such as drive limitations, variations in machining trajectories, and specific manufacturing process requirements. In the current study, we assume a constant feedrate, as in [
13,
15,
30], to highlight the core mechanisms of the minimized jerk method. Under this assumption, the kinematic parameters in (
6) can be reformulated using (
4) as
where we observe that the joint velocities, accelerations, and jerks are scaled by powers of the constant feedrate
f.
Furthermore, these can be expanded by integrating the B-spline form in (
11) for
into (
5), yielding
To guarantee that the resulting trajectories remain within the feasible ranges of robot kinematics, we impose constraints on the rotational axes, including limits on angular velocity
, acceleration
, jerk
, and the axis range
. Owing to the convex hull property of B-spline curves, the resulting curve is guaranteed to lie entirely within the convex region defined by its control points. Therefore, by transferring the constant factor into the constraint formulation, the kinematic restrictions can be linearly expressed in terms of the control coefficients
and their geometrical derivatives
as
thus ensuring the desired bounds on velocities, accelerations, and jerks are not exceeded. These linearized constraints, together with the recursive relation in (
12), provide a framework amenable to kinematic constraints using the B-spline representation. The subsequent section details how these constraints and objective functions are integrated into our proposed minimized jerk algorithm.
2.2. QP Minimized Jerk Modeling for Rotational Joint Trajectory Based on B-Spline
Achieving a smooth trajectory is crucial in high-precision 3D laser cutting applications, directly influencing the quality of the machining and the mechanical stress. Minimization of the jerk is an effective optimization objective, as it reduces abrupt motion changes, resulting in smoother tool movements [
15,
18].
Minimization of the jerk can be formulated as a QP problem subject to the kinematic constraints listed in (
15). This ensures computational efficiency and guarantees the attainment of a global optimum due to the convexity of the QP, allowing efficient computation with standard solvers.
Therefore, the objective function
for minimizing jerk on rotational axes can first be formally defined as the integral of squared jerk with respect to time over the total trajectory duration
T as
By using the relationship between time
t and the normalized arc-length parameter
u given by (
4), the integral domain can be transformed from the time domain to the parameter domain
u. Incorporating (
13) and assuming a constant feedrate
f, (
16) can be rewritten as
Defining the integral term as a scalar coefficient
, which is nonzero only when
, we have
Observing that the constant scaling factor
does not influence the optimization search direction, we can safely omit this factor. Thus, by introducing the symmetric Hessian matrix
with elements
, the objective function can be compactly expressed in standard quadratic programming form with respect to the control coefficient vector
as
The kinematic constraints outlined in (
15) play a critical role in ensuring the feasibility of the trajectory and are incorporated into the QP problem as inequality constraints. Additionally, the states of kinematic parameters at
and
, corresponding to the initial and final trajectory conditions, must be enforced as equality constraints. These constraints ensure continuity and smooth transitions while adhering to specified boundary values, such as
,
,
, and
. The complete trajectory optimization problem is then expressed as a kinematic constrained QP problem, formulated as
As discussed in (
12), linearization and recursive computation of control coefficients are crucial for optimization modeling. The linearization of kinematic constraints, detailed in Wu et al. [
15], is further simplified here for practical implementation. The geometrical derivatives of the decision variables are expressed as linear combinations of
, as follows
where
are computed using the recursive formulation in (
12), as
Consequently, the kinematic equality and inequality constraints, encompassing eight kinematic conditions, are reformulated into a concise vector representation as
The variables in constraints (
27)–(
34) are defined as follows:
- :
It is a matrix with elements at the initial and final states, representing the derivatives of the coefficient of the basis functions for equality constraints.
- :
It is a column vector representing the kinematic boundary values.
- :
It is a coefficient matrix, defined as , where is a B-spline basis function matrix with elements .
- :
It is a column vector representing position limits.
- :
It is a symmetric matrix with elements , representing velocity constraints.
- :
It is an vector representing velocity limits.
- :
It is a symmetric matrix, with elements , representing acceleration constraints.
- :
It is an vector representing acceleration limits.
- :
It is a symmetric matrix, with elements , representing jerk constraints.
- :
It is an vector representing jerk limits.
According to (
24)–(
26), the detailed expressions for the elements of the coefficient matrices are given as
The right-hand-side vectors with terms of scaled boundary kinematic parameters are detailed as follows:
Thus, the kinematic equality and inequality constraints can be summarized into a compact form for the QP problem as
where the left-side matrices and right-side columns’ vector are constructed as follows
The kinematic constraints of the spline curve have been formulated into the optimization problem in (
43). However, the entire curve must satisfy geometric constraints
, which are nonlinear, to ensure machining accuracy and prevent collisions along the tool path. The updated via points on the planning curve are transformed using the RTO-based iterative method and incorporated as equality constraints in the QP problem, as described in
Section 2.4.
2.3. QP Modeling for Redundant Joints Based on B-Spline for Optimal M Path Jerk
While the optimization problem for rotational axes has been effectively modeled using B-spline curves in
Section 2.2, ensuring smooth motion along translational axes is equally critical for precision and lifespan in 3D laser cutting machining. To achieve smooth translational trajectories, we have introduced the concept of the M path here in our previous work [
28]. The M path deviates from the direct tool path by introducing a redundant standoff axis
along the tool direction. The spatial transformation of the M point
is expressed as
where
denotes the optimized tool orientation, computed via forward kinematics (
2) based on the optimized rotational joint values
and
.
To clarify the relationship between the M path and the translational axes, it is important to note that, in the kinematic model, the rotational axes and primarily define the end-effector’s orientation, while the M point depends on the translational axes and the redundant standoff axis . In other words, is decoupled from and , since its position is derived by linear mapping from the translational joints in combination with the offset . Consequently, the B-spline trajectory of directly influences the motion of the translational axes. Ensuring the smoothness of the M path in Cartesian space consequently leads to smoother joint commands for the translational axes, as the transformation from to is linear with respect to the joint coordinate combined with . This decoupling allows for the leveraging of a minimized jerk strategy for the rotational axes, while separately optimizing and refining the M path to maintain smooth translational movement and prevent abrupt accelerations or vibrations in the three translational axes.
The redundant axis introduces an additional degree of freedom, enhancing trajectory smoothness and flexibility. This enhancement is achieved through a reinforcement learning-based exploration method. It dynamically adjusts the wrist center point position along the tool orientation. While reinforcement learning improves adaptability, the M path smoothness can be further enhanced. Specifically, quintic B-spline curves, akin to those used for rotational axes, are employed to define the M path
as
where
represents a set of
control points for the B-spline curve, organized as an
matrix to define the geometric control points in three-dimensional space, as illustrated in
Figure 3.
Similar to (
19), the integrated jerk along the entire M path is minimized through a quadratic objective function. It is expressed in terms of
as
where the Hessian matrix
is the same used in (
18), as the B-spline knot vector
is unchanged.
The geometric constraint of the optimization problem mandates that the B-spline curve
passes through the M points
at interpolated arc-length parameters
; the set of
can be defined using the B-spline in matrix form with the basis function coefficient matrix
as
where
is an
matrix, in which each row corresponds to a single M point
.
As
depends on the unknown standoff axis length
at
, the optimization problem becomes nonlinear and cannot be directly solved. Thus, by integrating (
47) into (
49) and reorganizing the terms,
can be expressed as a linear function of
as
where
is an
column vector, while
and
are expressed using the pseudo inverse of B-spline coefficient matrix
as
Then, according to (
49)–(
52), the objective function in (
48) can be expanded in quadratic form in terms of
as
where
is a positive definite symmetric matrix and
is a column vector. The detailed mathematic derivation is reported in
Appendix A.
The optimization problem in QP form has to incorporate the objective function (
53) with the inequality kinematic constraints to limit the length of the standoff axis within the stroke
as
The geometric constraints will be detailed in the next section.
2.4. GFD Construction in 3D Space and Iterative Processing of RTOs
The C-space method [
4,
5,
11] can be employed for collision-free trajectory planning, providing a robust framework for exploring all possible configurations and ensuring collision avoidance, as demonstrated in our previous work [
28]. However, building graphs that define feasible and forbidden zones for each node of the overall trajectory is computationally intensive, particularly when combined with shortest-path optimization. Furthermore, our method incorporates a secondary collision-avoidance process to refine trajectory planning while optimizing the redundant standoff axis.
To create a unique GFD that represents the forbidden areas for the three wrist joints
, we extend the rotational axes’ C-space to a three-dimensional representation. Similar research [
31] introduced cutter lift height
to construct a 3D C-space using inclination and yaw planes. However, the extended GFD in our method incorporates an additional degree of freedom provided by
, alongside the rotational axes
and
, to enhance flexibility. This design is derived from the constrained leading and tilt angles
, as illustrated in
Figure 4. The detailed process of constructing the GFD from the LCS to the WCS is described in our previous work [
28].
It is worth mentioning that the IKT in (
3) allows two configurations of the rotational axes for a single tool orientation. However, typical 3D laser head configurations, as shown in
Figure 5, result in interference patterns distinct from those of CNC machine tool spindles. Consequently, the proposed GFD is constructed based on wrist joint coordinates, similar to the DAO representation in [
7], rather than the tilt and yaw planes used in other studies [
5,
13].
The concept of C-distance, introduced in [
5], quantifies the distance between the collided tool orientation and the reference orientation using
and
angles. The shortest C-distance identifies the minimal change in tool orientation between consecutive local optimal candidates. In our method, the distance equation adopts this principle for consistency. However, since joint trajectories are directly influenced by kinematic constraints, the Euclidean distance is weighted based on the dynamic performance of each joint, as
Here,
p represents the index of the non-collided candidate
within the feasible region of the
ith GFD. The value
serves as the reference joint configuration derived via IKT based on the geometric features of RTOs at the
ith CL point among
initialized or updated RTO collections. Additionally,
,
, and
serve as the dynamic weights in this process.
The RTO-based processing strategy, initially introduced in [
3], minimizes collisions and mitigates abrupt tool orientation changes by leveraging RTOs. This strategy involves three main steps to generate a collision-free trajectory:
Initialize RTOs: Define initial RTOs to act as via points, serving as the foundation for each joint trajectory.
Trajectory Optimization: Utilize an optimization algorithm to compute smooth, feasible trajectories, leveraging the current set of RTOs as constraints.
Update RTOs: Add new RTOs when necessary and iteratively refine the optimization process until the entire trajectory is verified to be collision-free.
This iterative method systematically refines the trajectory, eliminating collisions and preserving smooth tool orientations along the entire path. The initial selection of RTOs is crucial for successful trajectory optimization. It significantly impacts both the convergence speed of the optimization algorithm and the effectiveness of collision avoidance. A well-chosen set of RTOs enables the efficient exploration of feasible domains, facilitating the identification of smooth, collision-free trajectories. Conversely, an inadequate or poorly initialized selection of RTOs can lead to suboptimal trajectory solutions, increased computational time or even failure to find a collision-free path.
The selection of initial RTOs should prioritize candidates with minimal Euclidean distance
to identify the closest safe ones between the candidate
and the
ith GFD. Additionally, the relative distance between two adjacent RTOs concerning the segment length should be considered to avoid abrupt changes in tool orientation. A greedy algorithm (i.e., Dijkastra algorithm) addresses this problem by optimizing a multi-objective function. This function, parameterized by the decision variable
, represents all the defined RTOs
and is expressed as
where
indicates the Euclidean distance between two adjacent RTOs, and
represents the tool path length between the CL points
and
. Here,
and
are the weights assigned to the two components of the objective function to be tuned.
Let
be the arc length parameter corresponding to the resolved RTO
for
. The spline form of a set of joint coordinates can be represented as follows
According to (
27), (
36) and (
43), the above set of via joint coordinates can be expressed as an equality constraint equation in the following form:
where
is the
coefficient matrix and
is the
vector including
, as follows
At least two RTOs are required, typically specified at the start and the end of the tool path. Once a collision occurs with the currently generated trajectory, the dynamic dimension of the equality constraint matrix needs to be updated by inserting new RTOs into the optimization equations during iterative processing.
The final formulation of the minimized jerk trajectory optimization for the rotational axes, incorporating the additional geometric equality constraint (
58), can be expressed as an extension of (
43):
Similarly, the geometric equality constraint for the extension value of the redundant standoff axis
must be incorporated into (
54). The design variable
must be constrained within the feasible domain to ensure collision-free conditions during the adjustment of
. Consequently, the minimized jerk optimization problem for the M path can be refined as follows:
where
is an
coefficient matrix with a single value of ‘1’ in the column corresponding to
as a
row vector
, and zeros elsewhere. The vector
is
, containing the values of
. These matrices are defined as follows:
Finally, the two optimization problems, incorporating both kinematic and geometric constraints, are summarized in (
61) and (
62). These formulations collectively aim to achieve a minimized jerk and collision-free trajectory, as outlined in the preceding sections.
2.5. Summary of the Methodology
The proposed MJTO algorithm for 3D laser cutting machines integrates smoothness optimization, collision avoidance, and redundancy exploitation.
Figure 6 illustrates the structured, iterative process of the methodology:
Initial RTO Optimization: Initial RTOs are refined to minimize orientation changes and align with reference points according to (
56), forming the basis for trajectory planning.
Rotational Joint Trajectory Generation: B-spline modeling (
5) is used to generate minimized jerk for the displacement of rotational axis trajectories according to the QP optimization (
61), ensuring smooth motion satisfying the kinematic constraints (
15) and the geometric constraints (
58) in the GFDs.
M Path Optimization: The redundant standoff axis trajectory, modeled with B-splines as (
47), is optimized via a separate QP problem in (
62) to achieve collision-free via points and smooth translational motion.
Collision Checking: The entire tool path is checked for collisions. Detected collisions are resolved by introducing additional RTOs as constraints with the shortest distance in (
55), repeating the trajectory generation.
Iterative Refinement: The process cycles through rotational axes generation, M path optimization, and collision checking until achieving a smooth, collision-free trajectory.
As shown in
Figure 6, this methodology ensures collision-free operation while balancing smoothness and precision. By integrating B-spline-based MJTO, iterative refinement, and redundancy exploitation, the framework excels in high-speed, high-precision machining.