In the previous lesson, we have seen Quebec polynomial trajectory, namely trajectory that's parameterized
by polynomial with degrees three.
We have also noted that while this trajectory provides smoothness in velocity, it doesn't provide smoothness
in acceleration, and this sudden changes in acceleration can cause stress on the body of the robot
manipulator.
So we need trajectory with smooth acceleration profile.
We are given these boundary conditions, including acceleration.
As you can see, we have six boundary conditions in total, which makes us in total, which makes us
said the degree of polynomial at least five.
Surely we can choose higher for smoother trajectory, but let's choose the minimum possible, namely
five.
So we have fifth for the trajectory.
Let's plug boundary conditions and get this system of equations and write them in matrix form to determine
the unknown coefficient vector a bi inversion of Matrix M.
Here are the coefficients that have been calculated.
Notice that the number of coefficients to determine increased as the degree of polynomial increase.
Let's jump into the MATLAB and see the code.
OK, now let's try to find.
Let's try to plot the order trajectory.
As you can see, if you have specified the boundary conditions again and now calculating coefficients
for the polynomial.
This is good for calculating coefficients.
As you can see, we first extracted the boundary conditions.
OK, then the rate and the P vectors OK, which is binary conditions vector in matrics.
We know that from the slides and a non-conscious are coefficients are calculated by inverting and matrix
two and multiplying it with P vector.
OK, and then we are just, uh, creating our time and time span.
OK.
And this is the position.
The velocity, an acceleration points.
OK.
At each time sample, then we are just again Viacom concreting for the given range, the trajectory
and before the initial time position will be, it will be equal to initial position.
Our velocity and next version will be zero.
The same is for the after the final time.
After the final time position will be equal to Q final q final thought velocity and acceleration will
be zero.
OK.
Then we are just plotting OK.
This is very similar to the, uh, cubic polynomials called.
So let's just arrange it and see what's happening.
OK?
As you can see now, we have a much more smoother trajectory.
You can even see the smoothness here.
If you remember at cubic polynomial, the velocity would instantly change and come like that.
So these were like a 90 degrees angle.
But in this case, as you can see, these are much more smoother because in fifth degree, polynomial
velocity and acceleration is also smoother.
As you can see, they they didn't change it in an instant way.
OK.
However, for the acceleration, you can see that as you can see at this point, acceleration changes
instantly.
Like it, like instantly, OK?
Um, however, if you have a continuous acceleration, continuous velocity.
OK.
And if you compare also, you will see that the velocity limit is higher for the velocity is higher
than the cubic polynomial because for the given time range, because in cubic, probably it could be
a trajectory.
And and fine, excuse me if you or the trajectory is executed for one second.
OK.
So in order to finish in one second, but which would be the smoother way.
So there's a discontinuous discontinuities.
So velocity cannot change in an instant way.
So it should be faster than the cubic trajectory.
OK, so that's why the velocity is high and it's the general rule.
If you increase to the same degree polynomial, then the velocity will be higher than a velocity of
fifths or cubic pulling.
It could be trajectory here.
I just want to compare the results of cubic polynomial and fifth order polynomial.
You can clearly see that in cubic polynomial, maximum velocity is thirty, while in fifth order polynomial,
it's 37.
What does this mean?
This means that as the degree of polynomial increases name, the trajectory becomes smoother maximal
velocity.
So variation increases for a given time, because in cubic trajectory, velocity and acceleration can
change faster compared to fifths or the trajectory, because it's or the trajectory smoother.
So it needs higher velocity and acceleration to finish the trajectory in a given time.
Let's summarize some important models, as we have said before, as the degree of polynomial increases,
smoothness of the trajectory increases, while increasing degree of polynomial is desired because it
generates smoother trajectory.
Don't forget that the number of unknown convictions to be calculated also increases additional and other
smoothness increases.
We have seen that the required velocity and acceleration to execute the trajectory also increases,
which requires more capable actuator or driver that can output required velocities and accelerations.