﻿1
00:00:00,450 --> 00:00:01,230
‫Welcome back.

2
00:00:02,160 --> 00:00:09,750
‫So now that you know how the NPC controller works, we have to cover one final thing in our control

3
00:00:09,750 --> 00:00:10,580
‫architecture.

4
00:00:11,190 --> 00:00:19,440
‫We have to fully understand how the feedback lionization controller computes you, one that goes directly

5
00:00:19,440 --> 00:00:28,830
‫into the plant and how it computes fire and Seeta are that go into the NPC controller as reference values.

6
00:00:29,580 --> 00:00:33,880
‫And in this section you will fully understand how it all happens.

7
00:00:34,650 --> 00:00:40,130
‫First and foremost, we have to realize that this is a position controller.

8
00:00:40,890 --> 00:00:50,550
‫Therefore, we don't need the equations that relate control moments you to you three and four with the

9
00:00:50,580 --> 00:00:52,410
‫angular accelerations.

10
00:00:53,330 --> 00:00:56,070
‫The last three equations here, we don't need them.

11
00:00:56,780 --> 00:01:00,740
‫In fact, we don't even need the first three equations.

12
00:01:01,310 --> 00:01:09,400
‫Yes, they relate Phi Theta and you won with translational accelerations.

13
00:01:10,070 --> 00:01:13,130
‫However, these equations are in the body frame.

14
00:01:13,850 --> 00:01:21,650
‫It is much easier to perform feedback penalization when your equations for position control are in the

15
00:01:21,650 --> 00:01:22,670
‫inertial frame.

16
00:01:23,360 --> 00:01:30,740
‫And so that will be our first order of business to obtain the equations of motion for position control

17
00:01:30,830 --> 00:01:32,340
‫in the inertial frame.

18
00:01:32,810 --> 00:01:36,440
‫In fact, I'm going to leave it for you as an exercise.

19
00:01:37,070 --> 00:01:45,380
‫Your task now is to obtain the equations of motion in the inertia frame, but only for the position

20
00:01:45,380 --> 00:01:46,000
‫control.

21
00:01:46,700 --> 00:01:56,870
‫In other words, you need to have this X double that equals something Y double dot equals something

22
00:01:56,870 --> 00:02:01,880
‫and then the Z double dot equals something.

23
00:02:02,630 --> 00:02:06,330
‫You have to find what they equal to in the equation form.

24
00:02:07,130 --> 00:02:11,810
‫So when you obtained you that equals something.

25
00:02:12,020 --> 00:02:17,510
‫V dot equals something and then W dot equals something.

26
00:02:18,170 --> 00:02:26,660
‫Then those where your state base equations in the body frame that related the body frame translational

27
00:02:26,660 --> 00:02:36,680
‫accelerations with the control input you one and also the angles, Fi and Seeta.

28
00:02:37,460 --> 00:02:45,110
‫And if you remember from the second section, then your starting point for deriving these equations

29
00:02:45,380 --> 00:02:47,950
‫was the Newton's second law of motion.

30
00:02:48,680 --> 00:03:00,260
‫So the net force vector equals the time derivative of the linear momentum and the linear momentum was

31
00:03:00,500 --> 00:03:06,020
‫M times the velocity vector, so mass times the velocity vector.

32
00:03:06,790 --> 00:03:16,610
‫Now since your mass was constant, then this term here became zero and your force vector, which was

33
00:03:16,610 --> 00:03:24,890
‫a net force vector composed of individual forces, it was mass times acceleration.

34
00:03:24,890 --> 00:03:26,420
‫That was your starting point.

35
00:03:27,050 --> 00:03:34,570
‫And this is a screenshot from the previous videos in the second section, since you were in the body

36
00:03:34,580 --> 00:03:42,020
‫frame, you had to take the rotation of the body frame with respect to the initial frame into account.

37
00:03:42,860 --> 00:03:51,350
‫It meant that the unit vector time derivatives ie that Jadot and K that were not zero.

38
00:03:52,100 --> 00:03:53,360
‫They equal this.

39
00:03:53,720 --> 00:03:56,000
‫You see, you have the cross product here.

40
00:03:56,720 --> 00:04:06,590
‫And so in the end you're Newton oilor equations for describing the relationship between net forces and

41
00:04:06,590 --> 00:04:12,610
‫translational accelerations in the body frame which are here.

42
00:04:13,460 --> 00:04:14,740
‫They looked like this.

43
00:04:15,620 --> 00:04:18,490
‫So that was your equation of motion.

44
00:04:18,860 --> 00:04:22,220
‫And from there you went into the state based form.

45
00:04:23,030 --> 00:04:31,910
‫The cross product here comes from the fact that we were working in the body frame and not in the fixed

46
00:04:31,910 --> 00:04:32,450
‫frame.

47
00:04:32,930 --> 00:04:41,890
‫And then you went from the equations of motion form to the equation form like this.

48
00:04:42,230 --> 00:04:46,820
‫That was your procedure here and this is your space form here.

49
00:04:47,780 --> 00:04:55,190
‫And remember, you had to rewrite your net force vector in terms of individual forces.

50
00:04:55,610 --> 00:05:04,040
‫And we had this gravity force moment vector, then the gyroscopic force moment vector and then the input

51
00:05:04,430 --> 00:05:07,070
‫force moment vector here.

52
00:05:07,070 --> 00:05:13,490
‫They also included the three dimensions for the moments, but now we only need the dimensions for the

53
00:05:13,490 --> 00:05:13,940
‫forces.

54
00:05:13,950 --> 00:05:18,130
‫So the first three elements in these vectors here.

55
00:05:19,040 --> 00:05:22,190
‫So that's the stuff from Section two and three.

56
00:05:22,670 --> 00:05:32,810
‫And now in order to find X double that Y double dot and Z double dot and what they equal to you start

57
00:05:32,810 --> 00:05:37,460
‫from the same starting point, the Newton's second law of Motion.

58
00:05:37,880 --> 00:05:40,970
‫You followed the same derivation procedure.

59
00:05:41,840 --> 00:05:48,650
‫However, now you have to remember that you will be working in the inertia frame, not in the body frame.

60
00:05:49,220 --> 00:05:52,460
‫Your position vector is Gunma.

61
00:05:52,960 --> 00:06:04,660
‫In the inertia frame, which is X, Y and Z meters, then that's your rotation matrix here in case you

62
00:06:04,660 --> 00:06:06,260
‫need it after all.

63
00:06:06,280 --> 00:06:11,830
‫Now you're working in the inertia frame, so maybe you don't need it, but maybe you do.

64
00:06:12,050 --> 00:06:15,060
‫I will let you decide that yourself.

65
00:06:15,910 --> 00:06:18,610
‫I'm going to give you the final answer now.

66
00:06:18,970 --> 00:06:25,540
‫However, your job is to get from the Newton's second law to that answer.

67
00:06:26,440 --> 00:06:28,400
‫So that's your final answer.

68
00:06:28,780 --> 00:06:31,120
‫This is what you need to get in the end.

69
00:06:31,660 --> 00:06:33,160
‫That is your end result.

70
00:06:34,060 --> 00:06:37,690
‫So you have to get from here.

71
00:06:38,800 --> 00:06:46,480
‫To hear using this derivation procedure that we had in Section two, but now remember, you are in the

72
00:06:46,480 --> 00:06:48,670
‫initial frame, not in the body frame.

73
00:06:49,150 --> 00:06:51,670
‫So make your decisions accordingly.

74
00:06:52,330 --> 00:06:59,860
‫Take your position vector here in the inertia frame and apply the second Newton's law to it.

75
00:07:00,640 --> 00:07:04,200
‫Think of the different forces that the drone experiences.

76
00:07:04,660 --> 00:07:12,250
‫We covered them in Section three and then remember that now again, you are in the initial frame.

77
00:07:12,250 --> 00:07:13,030
‫Don't forget that.

78
00:07:13,180 --> 00:07:14,560
‫Not in the body frame.

79
00:07:15,160 --> 00:07:20,080
‫So try out this exercise and I will show it to you in the next video.

80
00:07:20,380 --> 00:07:21,310
‫Thank you very much.

