1. Introduction
In recent decades, robot applications have been extensively studied [
1] and numerous improvements have been developed [
2]. These advances are becoming more robust today since they mainly focus on work with repetitive tasks to increase productivity, such as industrial applications [
3,
4] and applications in the medical area [
5]. Therefore, robot arms (manipulators) must be precise to be used by these applications and many others [
6]. Usually, these robots can work in dangerous environments, in places where humans cannot access to perform dangerous tasks [
7]; at the same time, these robot arms must navigate obstacles because the environment of a robotic arm is often very complicated.
For these reasons, the robotic arm’s motion must be precise and fulfill some specific characteristics that are defined depending on the environment and the application. In addition, it is necessary to thoroughly study trajectories and kinematics (direct and inverse) to verify that the robotic arm does not show any complications while performing a motion [
8]. For example, the most famous methods to calculate the trajectory of a robotic arm [
9,
10] are cubic polynomials [
11], trapezoidal trajectory [
12], and the Euler angles [
10], amongst others. In addition, many studies, methods, algorithms, and designs (electronic and mechanical) help to obtain a better performance in a robotic arm motion [
13,
14,
15,
16,
17,
18]. Nevertheless, some of these methods are complicated to implement. Others are feasible in exhibiting an unnatural motion, infinite jerk (third time derivative of position), or require other resources, such as an optimal timing solution or specific PID (proportion-al-integral-derivative) control to generate the optimal trajectory.
For example, the LSPB method (Linear Segment with Parabolic Blends) has improved the trajectory’s performance [
19]. However, it requires more calculations. This is because the LSPB divides the trajectory into segments and may only sometimes produce the most optimal solution in terms of the executed time [
20]. Additionally, using this method can result in undesirable acceleration profiles, limiting the flexibility of the resulting motion [
21]. Concerning n-order polynomials, they also have some disadvantages. According to some authors [
11,
22,
23,
24], higher-order polynomials are more complex and may require more computation to evaluate, which can be a drawback in real-time control systems. In addition, it presents a local minima or maxima, which can lead to unexpected or undesired behavior if the trajectory is not carefully designed. Finally, this method may not be as flexible as other types of trajectories, such as splines, in accurately following the desired path. In summary, high-order polynomials must be carefully designed using other techniques to optimize this method.
In another example, the authors in [
25] present trajectories with a total time of 11 s using a radial basis function (RBF) neural network. This method is reliable and an excellent option for performing motion planning. However, the trajectories present many big–long oscillations through time, which means a greater energy consumption and unsafe motion planning to avoid collisions [
26]. The 3–5–3 interpolation polynomial method presented in [
27] has the same problem mentioned previously in [
25].
Other works [
28,
29,
30,
31] use numerical methods with homotopy continuation to generate optimal trajectories in manipulators. The authors mentioned that this approach is a favorable option for generating trajectories because these are versatile and fulfill the characteristics of the mechanical system. Other related works that use homotopic functions for optimal trajectory planning focus mainly on mobile robots [
32], humanoid robots [
33], dynamics, and control problems [
34].
In previous work, a novel algorithm introduced in [
35,
36] was presented as a trajectory planning approach with more characteristics which had not been mentioned before and others which had been overlooked. This algorithm generated homotopic trajectories that always start in the specified start position and end at the final point, generating enough iterations to make trajectories that become closer and closer to the desired via point each time. The algorithm generates the ideal trajectory (the trajectory that passes through the specified via point) with infinite iterations and prelaminar parameters that determine the shape of the trajectory desired. However, a finite quantity of iterations obtains an excellent approximation and can be as accurate as desired.
Furthermore, the method proposed in this work makes it possible to obtain a better trajectory performance by changing the shape of the velocity, acceleration, and jerk profiles. In this sense, it has coined this algorithm with the name the iterative optimal solution trajectory via the -homotopy former (IOSTV -HF). In addition, with this algorithm, some of the disadvantages presented before are lost. For example, generating many options for obtaining different trajectory shapes with the same initial, via, and final point makes it possible to obtain the best suitable trajectory for specific applications. Furthermore, the IOSTV-HF method is flexible because it always achieves a trajectory that passes through these three points in a defined time, and many options can be generated. Additionally, oscillations can be reduced or removed by applying the same process and changing the initial parameters to generate many different shapes of trajectories. In summary, this method presents versatility as the main characteristic. Many unique advantages introduced through this work have been given to help obtain better reliable, smooth, and long-life robotic systems.
The remainder of this paper is organized as follows:
Section 2 introduces the preliminary properties that were taken to construct the trajectory function and define it.
Section 3 describes the algorithm and the algorithm’s proof and shows examples to generate a trajectory that converges to the via point.
Section 4 presents the results by generating trajectories with the same initial via point and final position and the obtained trajectory with its velocity, acceleration, and jerk.
Section 5 details a critical discussion of the results obtained with the proposed algorithm (IOSTV
-HF) compared to the sixth-order polynomial method. Finally,
Section 6 summarizes the conclusions of the work and presents indications for further work.
3. Algorithm Description
The trajectory function obtained by applying the method (IOSTV
-HF) is denoted as
, where
represents the number of iterations. While these iterations increase, the trajectory becomes closer and closer to the via point, forming a homotopy with a family of functions with different parameters
and
calculated in every iteration until a solution for these two parameters fits to generate the desired via point trajectory. This happens because
and
converge when
tends to infinity (
) by calculating the sequence
for every iteration, making
pass through the specified via point in the desired via point time (
). Then, the function is defined as
and with the following conditions (
is defined in (9)), each condition is provided with an example:
For when
, the next conditions are followed:
where:
fixed constant greater to .
velocity, acceleration, and Jerk modifier parameter (it is fixed).
via point time.
via point.
feedback iterative sequence
and
converge if the feedback iterative sequence
is defined as follows:
For every and when , is any real number that fulfills any of the conditions presented before in (7) and (8).
is called the iterative feedback sequence and is used to calculate
and
as follows:
Now, with everything mentioned before, the algorithm to obtain a trajectory with an initial point, a via point at , and a final point at is introduced:
Proposition 1. Let,,,, definingas in (9) for everyand taking anythat achieves any of the conditions presented before in (7) and (8), there existandfor whentends to infinity, such that,, and.
Proof. The constraints and for every are easily fulfill by the definition:
Now, let any
be
and
, then
and
, the trajectory functions (11) at the iteration
is the following:
Using the new feedback sequence in the second iteration
to calculate
and
.
Now, taking any value of
such that
and
, then
and
, it obtains the following trajectory function (14) at
:
Using
in (15) to calculate
and
using formula (10), then, the following trajectory function (16) at
is
Then, for the 4th iteration (
), the following sequence (17) is obtained:
With and by using formula (10).
Additionally, for the 5th iteration, then:
With and by using formula (10).
Repeating this process
times, it has:
Using formula (10),
and
and (20) is obtained representing the trajectory in in the
-iteration:
Additionally, for the
time, it has:
Then, using formula (10),
and
and the trajectory function (23) is obtained:
Then, because
and
are always finite for every
and
, and the way
and the subsequent
and
have been defined, this mean that when
tends to infinity (
) then
, this limit is finite too, making:
Therefore, for when . An analog proof can be constructed for the other conditions. □
Examples
Now, considering a trajectory with
,
and
with the next parameters
with a final
and
,
,
, and a final
at the iteration number 40 and
. The following trajectories are presented in
Figure 2.
As noted in
Figure 1, the trajectory avoids oscillation with a soft start and reaches the final position with a sharp end (non-zero velocity). Nevertheless, the trajectory can be softer at the end position, changing the parameters
and
, and produce switching between the abovementioned conditions. For example, by considering the parameters presented before but changing
and
. The obtained results are shown in
Figure 3.
As can be seen in
Figure 3, the last trajectory passes through the three desired positions presented in
Figure 2 but with a different shape. This is because different parameters have been chosen, and a velocity too close to zero at
has been obtained by repeating the process that this algorithm defines, making the trajectory have an S-shape as a result.
Now, taking a much more difficult trajectory to perform, the algorithm can be run for a longer time, and sometimes this is much more difficult to guess the complexity of the trajectory. In other words, it is much more challenging to know exactly where an oscillation is and is not occurring. For example,
Figure 4 presents a trajectory with this behavior, considering the following values:
,
, and
. Taking
with a final
and
,
,
and
in the iteration 7067th.
This trajectory can be modified by changing some preliminary parameters such as
,
, and
. However, these are difficult to guess. Currently, there is not an existing analytic formula or definition to obtain these parameters for a particular trajectory shape, so these parameters are changed manually to achieve complex trajectories. For example,
Figure 5 shows the trajectories that were obtained while changing some of the parameters mentioned before.
Finally, obtaining a trajectory with the same constraints with no oscillations is possible. For example,
Figure 6 shows the trajectories obtained with the following values
,
,
, and
with a final
and
and a
at the iteration number 58th.
In
Figure 6, it can be observed that the trajectory avoids any oscillation. This is possible because the parameters mentioned before have been changed. The trajectory made between the initial point (
) and the via point (
) has a different velocity, acceleration, and jerk trajectory than the trajectory made between the via point (
) and the final point
. In other words, it has
continuity for the cases presented before. Hence, avoiding any oscillation for any via point time
and final time
is possible. This is another advantage gained by taking IOSTV
-HF, therefore versatile and complex trajectories can be obtained by applying this method, and this is not always possible with the other current methods.
Additionally, note that in
Figure 4,
Figure 5 and
Figure 6, the trajectory ends with a sharp end position. This is because the velocity has a short period (which is
) to be well distributed through that period of time. Nevertheless, the trajectory always presents finite velocity, acceleration, and jerks, and the trajectory at the end position can be softer over a more significant period.
4. Results: Velocity, Acceleration, and Jerk Function
The velocity, acceleration, and jerk functions have been presented in [
36]. This work requires a retaking of the topic of these functions because it is crucial for a long-life robotic system to exist. As shown in the previous examples, the trajectories presented obtain no continuous velocity, acceleration, and jerk at the via point time (
). Nevertheless, every value is bounded, and the gap between the velocity, acceleration, and jerk in
can be reduced as much as desired, making a safe motion in the joint-space. Moreover, the IOSTV
-HF is not the first method that presents no-continuous velocity, acceleration, or jerk. Some methods mentioned before in the introduction and many others often used currently present no-continuous velocity, acceleration, or jerk. For example, [
37] used trapezoidal velocity profiles to generate trajectories and presents a no-continuous jerk profile, which is bounded and ready for implementation.
Additionally, Refs. [
38,
39] present not-zero velocity at the final point, but this method is a perfect tool for obstacle avoidance, as they wanted to show using IOSTV
-HF.
In [
36], the via point trajectory taken from [
9] has been used to compare it with the IOSTV
-HF method by presenting a trajectory shape with a continuous velocity and another with a continuous acceleration. In [
9], the trajectory compared was not optimal, and a significant gap in the velocity was presented. In this work, the via point trajectory taken from [
9] is retaken to obtain a better trajectory than the one that was presented in [
36] and compared with the result from [
35]. The values are
,
at
s, and
at
s, and the sixth order polynomial from [
9] is:
Plotting this trajectory in MATLAB, it is shown that the trajectory obtains 185.4 degrees as a maximum value, and the trajectory reaches degrees.
As shown in
Figure 7, the trajectory presents a maximum value at
s. The method proposed in this work tried to reduce this oscillation, so this one would not be greater than 181 degrees. The algorithm IOSTV
-HF was run several times until it obtained some solutions that fulfilled the requirements. First, it tested the trajectory result by finding values on the parameters to obtain a continuous velocity, for example, by using the parameters
,
,
,
,
, and
in the iteration number 12; the following profiles are obtained and are shown in
Figure 8.
Regarding the acceleration and jerk, it can be observed that they were discontinuous in
. However, these do not present discontinuities at the start and end, like the method presented in [
9]. Therefore, the discontinuities have been reduced to one by using IOSTV
-HF, and these are also kept finite. Additionally, the differences between the acceleration at
approaches to the left-approximation and the right-approximation to
are insignificant, about 219.824 degrees/s
2 of difference, and obtaining 180.4 degrees as a leading position in the trajectory.
Then,
Figure 9 shows a trajectory with a continuous acceleration but a discontinuous velocity and jerk using the following values
, and
and
,
and
in the iteration number 28.
With the above parameters, the trajectory obtains an even smaller jerk than the one that was found while using the sixth-order polynomial function from [
9]. The acceleration function using OISTV
-HF starts at 0 degrees/s
3 and ends too close at 0 degrees/s
3, which means that the trajectory shown presents a finite jerk. The maximum value in the jerk function using OISTV
-HF was 1394 degrees/s
3, and the lowest value was −1177 degrees/s
3 while using the sixth-order polynomial function, the maximum value jerk was 1693 degrees/s
3, and the lowest value was −1294 degrees/ s
3. Additionally, the trajectory using IOSTV
-HF or the sixth-order polynomial function from [
9] presents a finite jerk; this one is not continuous, though, but this characteristic, according to [
9], obeys the rule of thumb for a mechanical design/motion.
5. Discussion
This paper presents the idea of obtaining a trajectory to achieve the best performance or a motion in the joint-space that fulfills some preliminary conditions that a user can state. This idea is reached by using the method presented and named after this work as OISTV -HF. Some of these many essential conditions have been tested that make a safe trajectory while controlling a robotic arm. First, the method OISTV -HF avoids and reduces any undesired oscillation through the trajectory. The trajectory retains a finite velocity, acceleration, and jerk that obeys the rule of thumb for a mechanical design/motion; the algorithm OISTV -HF works by iteration. This method creates a trajectory that is as accurate as wanted, generating many trajectories. In contrast, the number of iterations increases until a trajectory passes through the initial position at , then at the via point time , and finally reaches the final position at at the end time.
Nevertheless, we have found some disadvantages while using this method. First, a desirable trajectory can be obtained, but some drawbacks must be made; for example, a trajectory can obtain a no-continuous velocity and more significant spikes in the acceleration or jerk. At this time, there is not an existing method to obtain the best parameters that can allow us to generate a trajectory that fulfills all the desirable conditions. Therefore, we had to run this algorithm many times to obtain these parameters and obtain the desired trajectory, which means much time is spent on tests. Moreover, the algorithm can run for an extended period, and the time the convergence occurs can vary depending on the parameters. For example, in these results, the longest-running time was about 17.5 s, and the shortest-running time was about 0.052 s (the running time was obtained using a function of MATLAB called the tic toc function). So, a method to generate trajectories with a faster running time and find the best parameters to generate a trajectory that fulfills all the desired conditions must be developed in future works.
6. Conclusions
According to the results obtained in this work, it can be hypothesized that only one or several sets of parameters can work to obtain the desired trajectory. In addition, one or several sets of parameters can make a trajectory with a continuous velocity, acceleration, and jerk.
The method converges to a via point at any via point time . The method proposed has been tested, and according to the results and all characteristics introduced in this work, the IOSTV -HF method presents some advantages, such as avoiding unwanted oscillations. In addition, several options are generated to choose the best trajectory or, in its case, the one that meets the desired conditions. It can reduce the complexity of trajectories by setting new parameters and generating infinity options of generating a trajectory that fulfills basic constraints. Furthermore, the method generates trajectories with a finite jerk and continuous acceleration that avoids infinite jerks. All the derivatives while using the IOSTV -HF start at 0, which is a uniqueness of this method and is advantageous for reliable, smooth, and long-life robotic systems.
Although this method has to be improved, at this time, it is a confident tool for generating safe and reliable trajectories; meanwhile, a new algorithm has to be designed to obtain a trajectory that converges to the via point by iterations in a faster way. Additionally, in future works, finding a solution to obtain a set of suitable parameters that makes a continuous velocity, acceleration, and jerk without presenting undesirables oscillations could make a complete method to generate safe trajectories in the joint-space.