﻿1
00:00:00,530 --> 00:00:12,170
‫So you have four slopes now, you have slope one slope to slope three and slope four, and now since

2
00:00:12,170 --> 00:00:20,030
‫you have all those four slopes, the only thing that you need to do is to compute the weighted average

3
00:00:20,060 --> 00:00:20,840
‫slope.

4
00:00:22,220 --> 00:00:34,130
‫The weighted average slope, for example, P, dot, sub K and then W a meaning weighted average.

5
00:00:35,160 --> 00:00:37,020
‫Equals one sixth.

6
00:00:38,080 --> 00:00:43,510
‫Times and then in the parentheses, you have the first slope plus.

7
00:00:44,850 --> 00:00:47,730
‫Two times the second slope plus.

8
00:00:49,000 --> 00:00:57,100
‫Two times the third slope and plus your fourth slope, so that's how it looks.

9
00:00:57,550 --> 00:00:58,570
‫That's the formula.

10
00:00:58,600 --> 00:01:02,250
‫That's how you compute the weighted average slope.

11
00:01:03,310 --> 00:01:10,450
‫And of course, the same formula applies to all the states, so you will have 12 equations like this.

12
00:01:11,560 --> 00:01:14,200
‫For each state that you see here.

13
00:01:15,180 --> 00:01:25,320
‫And so once you have your weighted average slope, then you just compute your new state like this piece

14
00:01:25,320 --> 00:01:36,750
‫of cake plus one equals piece of cake plus and now it's the weighted average slope here times.

15
00:01:37,320 --> 00:01:39,150
‫And then Tietz.

16
00:01:40,450 --> 00:01:50,530
‫So this thing here, it's this this entire thing that you have here, that's your weighted average slope.

17
00:01:51,590 --> 00:02:00,410
‫And not that this is still your original present state value and now this state value that you compute

18
00:02:00,410 --> 00:02:06,830
‫using the weighted average slope, that's the state that will leave the plant.

19
00:02:07,840 --> 00:02:15,880
‫That's the state that will go into the controller and into other places, just like I showed you in

20
00:02:15,880 --> 00:02:18,130
‫the schematics, some videos ago.

21
00:02:19,340 --> 00:02:28,070
‫And again, since you have 12 states, you will have 12 equations like this, all right, and that's

22
00:02:28,070 --> 00:02:36,080
‫the fourth order wrong Akutan method, it is more advanced and it needs more work to implement it compared

23
00:02:36,080 --> 00:02:40,180
‫to oilor, but it will give you more precise results.

24
00:02:40,910 --> 00:02:47,900
‫And just to note, the code that I wrote for Randy Kutta follows exactly the same logic as explained

25
00:02:47,900 --> 00:02:48,410
‫here.

26
00:02:49,340 --> 00:02:56,400
‫And let's summarize this entire process like this, you have your present state expec.

27
00:02:57,770 --> 00:03:00,200
‫You compute your first time derivative.

28
00:03:01,430 --> 00:03:11,360
‫You use the first time derivative to compute the states at T plus twice over to using the first time

29
00:03:11,360 --> 00:03:12,110
‫derivative.

30
00:03:13,510 --> 00:03:19,630
‫Then you use these new state values to get your second time derivatives.

31
00:03:20,920 --> 00:03:29,920
‫You use your second time derivatives to compute another new states at time T plus two over to.

32
00:03:31,240 --> 00:03:39,050
‫You apply those new states to compute your third time derivatives, so I'm just going to continue this

33
00:03:39,050 --> 00:03:41,650
‫schematics right over here.

34
00:03:41,660 --> 00:03:42,110
‫All right.

35
00:03:43,390 --> 00:03:54,100
‫And so you use your third slope's your third time derivatives to compute new state values, but at time

36
00:03:54,100 --> 00:04:02,380
‫T plus test now and then you're going to use those state values to compute your fourth slope.

37
00:04:03,430 --> 00:04:11,560
‫And so to compute your weighted average slope, we're going to add all the other slopes like this.

38
00:04:12,750 --> 00:04:17,100
‫The first slope which had a weight, one over six.

39
00:04:18,390 --> 00:04:19,860
‫The second slope.

40
00:04:20,940 --> 00:04:30,660
‫Then had to wait to over six, the third slope, then had to wait to over six as well, and the fourth

41
00:04:30,660 --> 00:04:40,140
‫slope then had to wait one over six, and then you get your weighted average slope.

42
00:04:41,260 --> 00:04:50,860
‫And this weighted average slope will go into this equation then and then you compute your new state.

43
00:04:51,340 --> 00:04:53,350
‫That leaves your plant.

44
00:04:54,500 --> 00:04:55,430
‫So that's it.

45
00:04:55,460 --> 00:05:03,290
‫That's your fourth order, wrong Akutan method, and in the next video, we're going to start dealing

46
00:05:03,320 --> 00:05:07,870
‫with the propeller's because we still have one box to cover.

47
00:05:08,360 --> 00:05:17,670
‫We need to figure out how we can convert the control inputs into rotor angular velocities.

48
00:05:18,290 --> 00:05:20,140
‫So see you in the next video.

49
00:05:20,180 --> 00:05:21,140
‫Thank you very much.

