1
00:00:04,080 --> 00:00:10,050
We have discussed in the past that most of the real world processes or dynamics can be represented as

2
00:00:10,050 --> 00:00:11,370
differential equations.

3
00:00:11,670 --> 00:00:18,210
Now, differential equations are inherently continuous time systems because they use a derivative of

4
00:00:18,210 --> 00:00:19,690
a state with respect to time.

5
00:00:20,670 --> 00:00:24,840
This makes them very easy to represent as continuous time processes.

6
00:00:25,620 --> 00:00:32,160
So if we have a look at a continuous time invariant linear system as shown on this slide here, somehow

7
00:00:32,160 --> 00:00:35,610
we want to represent this as a discrete time system.

8
00:00:36,420 --> 00:00:41,640
This is because for engineering purposes, we don't really care about the system state and every single

9
00:00:41,640 --> 00:00:46,100
time we only really care about the state at specific times in the future.

10
00:00:46,560 --> 00:00:49,610
So we can represent this using a discrete system.

11
00:00:50,610 --> 00:00:58,500
So if we look at a discrete time, time invariant linear system as shown here, we want to somehow convert

12
00:00:58,500 --> 00:01:01,710
a continuous time system into a discrete time system.

13
00:01:01,980 --> 00:01:06,090
And we're going to again look at our time invariant and linear systems.

14
00:01:06,700 --> 00:01:12,240
So somehow we need a mapping process which can convert the A and B matrixes for the continuous time

15
00:01:12,240 --> 00:01:16,530
system into the energy matrix for the discrete time system.

16
00:01:17,340 --> 00:01:22,200
So this is what we're going to look at in this video, our continuous to screen time conversions.

17
00:01:23,390 --> 00:01:30,020
So if we take our continuous time invariant linear system as shown here, we know that the solution

18
00:01:30,020 --> 00:01:32,870
to this system is given by this equation here.

19
00:01:34,510 --> 00:01:39,910
Now, all of this equation is saying that we can work out the state of the system at some time in the

20
00:01:39,910 --> 00:01:45,160
future based on this matrix exponential equation and this integration here.

21
00:01:45,790 --> 00:01:52,720
So this part of the equation here, we can see that it only depends on our system dynamics A and the

22
00:01:52,720 --> 00:01:56,640
state at TI not so this is the free response to the system.

23
00:01:56,920 --> 00:02:00,040
So this is what happens if we have no other inputs into the system.

24
00:02:00,220 --> 00:02:02,230
This will be how the time this is.

25
00:02:02,350 --> 00:02:04,240
This is how this is me rolls of time.

26
00:02:05,440 --> 00:02:11,380
But if we have some input here, so if you have some input here, this gets added onto the system response

27
00:02:11,380 --> 00:02:17,980
so we can separate the system and dynamics, the free response with the force response or the input

28
00:02:17,980 --> 00:02:19,280
response to the system.

29
00:02:20,080 --> 00:02:25,810
So this is integral here between Time Teno and the current time that we want T or what this equation

30
00:02:25,810 --> 00:02:31,360
is doing is basically summing up the different impulse responses for all the time in between these two

31
00:02:31,360 --> 00:02:32,150
time periods.

32
00:02:33,040 --> 00:02:39,250
So if we have, for example, our input at time t not is going to have more of an effect than the input

33
00:02:39,250 --> 00:02:42,880
at time t just because it acts over a longer time period.

34
00:02:43,240 --> 00:02:47,680
So this is what this integral is doing, is just summing up all the different inputs for all the different

35
00:02:47,680 --> 00:02:51,580
impulses over the time period in between T not and T.

36
00:02:53,200 --> 00:03:00,250
So if we consider a discreet time step, so we have the current time, so let's say it is equal to take

37
00:03:00,700 --> 00:03:06,790
the previous time, step is going to be out not which is going to be a T minus one, and we'll have

38
00:03:06,790 --> 00:03:08,410
our discrete time set aside.

39
00:03:08,420 --> 00:03:14,050
So Delta T is just a difference between the time at Teekay and the time at K minus one.

40
00:03:14,380 --> 00:03:16,600
So this is just the difference between our two time points.

41
00:03:17,730 --> 00:03:24,540
So if we would take these discrete time representations for T and T not and substitute them into our

42
00:03:24,540 --> 00:03:30,330
above solution for the continuous time system here, we end up with this equation down here.

43
00:03:31,140 --> 00:03:36,300
So this is basically saying we want to evaluate the system dynamics over a very small time interval.

44
00:03:36,300 --> 00:03:41,780
Delta T, so we have Teekay minus one and we're working at the state for Altec.

45
00:03:42,270 --> 00:03:47,790
And again, it looks very similar as a continuous time solution up here, except now we're going to

46
00:03:47,790 --> 00:03:52,800
instead of using our T minus tonight, we're just going to use our ability and we're going to use that

47
00:03:52,800 --> 00:03:54,370
K minus one and Otik.

48
00:03:54,870 --> 00:03:58,020
So again, we have a free response to the system.

49
00:03:58,050 --> 00:04:03,360
So what happens if we have no inputs and we just evolve the state of time and then we have the force

50
00:04:03,360 --> 00:04:03,800
response?

51
00:04:03,840 --> 00:04:06,810
And what happens if we adding a forcing input to the system?

52
00:04:08,470 --> 00:04:14,950
So if we consider our equation from the last slide here, which is just the propagation of our current

53
00:04:14,950 --> 00:04:22,180
state to our future state or from state, Teekay minus one to take, we can look at this equation here

54
00:04:22,180 --> 00:04:27,790
and evaluate it with respect to this discrete system matrix matrix equation here.

55
00:04:29,430 --> 00:04:34,740
So it is fairly easy to see this is a factor here, multiply by this matrix so we can easily create

56
00:04:34,740 --> 00:04:39,030
this matrix, this matrix expansion into our F system matrix.

57
00:04:39,870 --> 00:04:41,490
Looking at this side of the equation here.

58
00:04:41,520 --> 00:04:42,510
We can do the same thing.

59
00:04:42,510 --> 00:04:49,620
So if we group all of this together, multiply it by our control input, you we can see that this is

60
00:04:49,620 --> 00:04:51,690
basically this matrix here.

61
00:04:54,390 --> 00:05:02,430
So we can break it out into this here, Alef Matrix is our Matrix exponential of a Delta T g matrix.

62
00:05:02,430 --> 00:05:08,400
A forcing response is just going to be our free response multiplied by the integral from zero to Delta

63
00:05:08,400 --> 00:05:11,010
T of this part of the equation here.

64
00:05:12,530 --> 00:05:18,520
Now, this part of the equation here can be simplified, so if our continuous time, Matrix A. is convertible,

65
00:05:18,530 --> 00:05:25,640
so if Inverse A exists, then we can simplify this part down into this equation here so we don't have

66
00:05:25,640 --> 00:05:26,680
to do the integral.

67
00:05:26,870 --> 00:05:31,580
We can just assume that if a convertible, then this is the response.

68
00:05:33,350 --> 00:05:38,900
So these equations are how we convert a continuous time system into a discrete time system, we can

69
00:05:38,900 --> 00:05:45,410
use the and B matrix and then using a specified timestep, we can convert the system into a discrete

70
00:05:45,410 --> 00:05:48,280
time system, working out alef energy matrix.

71
00:05:48,890 --> 00:05:55,100
And if A is invariable, then we can use this identity here to help simplify the equation so we don't

72
00:05:55,100 --> 00:05:56,210
have to do the integration.

73
00:05:57,810 --> 00:06:02,730
So now you might be wondering about this matrix exponential and how do we actually calculate this matrix

74
00:06:02,730 --> 00:06:03,420
exponential?

75
00:06:04,810 --> 00:06:11,590
So this matrix exponential can be written as an infinite sum, and if we expand this out, you can see

76
00:06:11,590 --> 00:06:16,390
that each of the eight is just going to be at the power of zero eight to power.

77
00:06:16,390 --> 00:06:22,970
One plus eight is the power or two over two factorial and so on and so forth all the way up to infinity.

78
00:06:24,820 --> 00:06:26,350
So this is a useful energy.

79
00:06:26,440 --> 00:06:30,700
It allows us to make an approximation of what this infinite sum is going to be.

80
00:06:31,120 --> 00:06:36,550
So depending on the matrix dynamics of A, we might be able to make a few approximations.

81
00:06:36,820 --> 00:06:42,220
So if the matrix dynamics is appropriate, we can make a first order approximation.

82
00:06:42,940 --> 00:06:49,870
So basically we can use a first order approximation in some cases so the exponential amte can be approximated

83
00:06:50,100 --> 00:06:53,380
by the identity matrix plus eight times T..

84
00:06:54,010 --> 00:06:55,830
So this is a first order approximation.

85
00:06:55,840 --> 00:06:58,340
It just looks at these first two terms here.

86
00:06:58,360 --> 00:07:01,270
So a T to the power of zero is just identity.

87
00:07:01,540 --> 00:07:05,460
And then we just have a taste of how one is just able to it.

88
00:07:05,920 --> 00:07:07,750
So this is where it comes out here.

89
00:07:08,470 --> 00:07:13,390
Now, if the dynamics of A are such that this is a very bad approximation, well, then we'll have to

90
00:07:13,390 --> 00:07:16,360
use a different approximation method to calculate this matrix.

91
00:07:16,360 --> 00:07:17,050
Exponential.

