1
00:00:00,090 --> 00:00:05,700
In the previous lesson, we have seen Quebec polynomial trajectory, namely trajectory that's parameterized

2
00:00:05,700 --> 00:00:07,440
by polynomial with degrees three.

3
00:00:08,040 --> 00:00:14,100
We have also noted that while this trajectory provides smoothness in velocity, it doesn't provide smoothness

4
00:00:14,100 --> 00:00:20,310
in acceleration, and this sudden changes in acceleration can cause stress on the body of the robot

5
00:00:20,310 --> 00:00:21,000
manipulator.

6
00:00:21,570 --> 00:00:24,900
So we need trajectory with smooth acceleration profile.

7
00:00:25,350 --> 00:00:29,160
We are given these boundary conditions, including acceleration.

8
00:00:29,580 --> 00:00:36,180
As you can see, we have six boundary conditions in total, which makes us in total, which makes us

9
00:00:36,600 --> 00:00:39,450
said the degree of polynomial at least five.

10
00:00:40,050 --> 00:00:45,570
Surely we can choose higher for smoother trajectory, but let's choose the minimum possible, namely

11
00:00:45,570 --> 00:00:45,930
five.

12
00:00:46,470 --> 00:00:48,720
So we have fifth for the trajectory.

13
00:00:49,200 --> 00:00:55,530
Let's plug boundary conditions and get this system of equations and write them in matrix form to determine

14
00:00:55,530 --> 00:01:00,840
the unknown coefficient vector a bi inversion of Matrix M.

15
00:01:01,950 --> 00:01:04,620
Here are the coefficients that have been calculated.

16
00:01:04,890 --> 00:01:11,070
Notice that the number of coefficients to determine increased as the degree of polynomial increase.

17
00:01:11,880 --> 00:01:14,490
Let's jump into the MATLAB and see the code.

18
00:01:14,520 --> 00:01:17,430
OK, now let's try to find.

19
00:01:18,310 --> 00:01:21,600
Let's try to plot the order trajectory.

20
00:01:22,200 --> 00:01:27,900
As you can see, if you have specified the boundary conditions again and now calculating coefficients

21
00:01:27,900 --> 00:01:28,920
for the polynomial.

22
00:01:29,310 --> 00:01:32,010
This is good for calculating coefficients.

23
00:01:32,010 --> 00:01:35,090
As you can see, we first extracted the boundary conditions.

24
00:01:35,100 --> 00:01:42,610
OK, then the rate and the P vectors OK, which is binary conditions vector in matrics.

25
00:01:42,630 --> 00:01:49,350
We know that from the slides and a non-conscious are coefficients are calculated by inverting and matrix

26
00:01:49,350 --> 00:01:52,080
two and multiplying it with P vector.

27
00:01:52,290 --> 00:01:59,830
OK, and then we are just, uh, creating our time and time span.

28
00:01:59,910 --> 00:02:00,420
OK.

29
00:02:01,470 --> 00:02:03,360
And this is the position.

30
00:02:04,110 --> 00:02:06,100
The velocity, an acceleration points.

31
00:02:06,120 --> 00:02:06,630
OK.

32
00:02:07,340 --> 00:02:16,470
At each time sample, then we are just again Viacom concreting for the given range, the trajectory

33
00:02:16,830 --> 00:02:22,680
and before the initial time position will be, it will be equal to initial position.

34
00:02:22,920 --> 00:02:25,230
Our velocity and next version will be zero.

35
00:02:25,440 --> 00:02:29,250
The same is for the after the final time.

36
00:02:29,730 --> 00:02:36,450
After the final time position will be equal to Q final q final thought velocity and acceleration will

37
00:02:36,450 --> 00:02:38,160
be zero.

38
00:02:38,610 --> 00:02:39,080
OK.

39
00:02:39,150 --> 00:02:40,890
Then we are just plotting OK.

40
00:02:40,940 --> 00:02:44,090
This is very similar to the, uh, cubic polynomials called.

41
00:02:44,430 --> 00:02:47,430
So let's just arrange it and see what's happening.

42
00:02:49,410 --> 00:02:49,840
OK?

43
00:02:49,860 --> 00:02:55,620
As you can see now, we have a much more smoother trajectory.

44
00:02:55,950 --> 00:02:58,830
You can even see the smoothness here.

45
00:02:59,730 --> 00:03:05,910
If you remember at cubic polynomial, the velocity would instantly change and come like that.

46
00:03:06,150 --> 00:03:09,420
So these were like a 90 degrees angle.

47
00:03:09,630 --> 00:03:15,480
But in this case, as you can see, these are much more smoother because in fifth degree, polynomial

48
00:03:15,480 --> 00:03:18,150
velocity and acceleration is also smoother.

49
00:03:18,150 --> 00:03:23,170
As you can see, they they didn't change it in an instant way.

50
00:03:23,190 --> 00:03:23,760
OK.

51
00:03:24,930 --> 00:03:30,300
However, for the acceleration, you can see that as you can see at this point, acceleration changes

52
00:03:30,300 --> 00:03:30,900
instantly.

53
00:03:30,900 --> 00:03:32,970
Like it, like instantly, OK?

54
00:03:33,840 --> 00:03:39,480
Um, however, if you have a continuous acceleration, continuous velocity.

55
00:03:39,660 --> 00:03:40,130
OK.

56
00:03:41,040 --> 00:03:49,800
And if you compare also, you will see that the velocity limit is higher for the velocity is higher

57
00:03:49,800 --> 00:03:55,770
than the cubic polynomial because for the given time range, because in cubic, probably it could be

58
00:03:55,770 --> 00:03:56,430
a trajectory.

59
00:03:56,700 --> 00:04:04,740
And and fine, excuse me if you or the trajectory is executed for one second.

60
00:04:04,800 --> 00:04:05,360
OK.

61
00:04:05,950 --> 00:04:13,770
So in order to finish in one second, but which would be the smoother way.

62
00:04:14,040 --> 00:04:16,740
So there's a discontinuous discontinuities.

63
00:04:16,740 --> 00:04:18,990
So velocity cannot change in an instant way.

64
00:04:19,260 --> 00:04:23,130
So it should be faster than the cubic trajectory.

65
00:04:23,130 --> 00:04:26,970
OK, so that's why the velocity is high and it's the general rule.

66
00:04:26,970 --> 00:04:34,080
If you increase to the same degree polynomial, then the velocity will be higher than a velocity of

67
00:04:34,080 --> 00:04:35,410
fifths or cubic pulling.

68
00:04:35,700 --> 00:04:37,410
It could be trajectory here.

69
00:04:37,440 --> 00:04:42,120
I just want to compare the results of cubic polynomial and fifth order polynomial.

70
00:04:42,600 --> 00:04:49,680
You can clearly see that in cubic polynomial, maximum velocity is thirty, while in fifth order polynomial,

71
00:04:49,720 --> 00:04:50,790
it's 37.

72
00:04:51,180 --> 00:04:52,260
What does this mean?

73
00:04:52,650 --> 00:04:58,980
This means that as the degree of polynomial increases name, the trajectory becomes smoother maximal

74
00:04:58,980 --> 00:04:59,430
velocity.

75
00:04:59,810 --> 00:05:06,020
So variation increases for a given time, because in cubic trajectory, velocity and acceleration can

76
00:05:06,020 --> 00:05:12,050
change faster compared to fifths or the trajectory, because it's or the trajectory smoother.

77
00:05:12,410 --> 00:05:17,630
So it needs higher velocity and acceleration to finish the trajectory in a given time.

78
00:05:19,100 --> 00:05:25,400
Let's summarize some important models, as we have said before, as the degree of polynomial increases,

79
00:05:25,400 --> 00:05:31,760
smoothness of the trajectory increases, while increasing degree of polynomial is desired because it

80
00:05:31,760 --> 00:05:33,320
generates smoother trajectory.

81
00:05:33,560 --> 00:05:39,890
Don't forget that the number of unknown convictions to be calculated also increases additional and other

82
00:05:39,980 --> 00:05:41,300
smoothness increases.

83
00:05:41,300 --> 00:05:46,790
We have seen that the required velocity and acceleration to execute the trajectory also increases,

84
00:05:47,210 --> 00:05:54,550
which requires more capable actuator or driver that can output required velocities and accelerations.
