Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,440 --> 00:00:02,300
Now let's talk a little bit about control.
2
00:00:03,560 --> 00:00:06,080
Again, I'm gonna focus on
the vertical direction.
3
00:00:07,590 --> 00:00:10,550
So let's think about controlling height.
4
00:00:10,550 --> 00:00:14,326
What you would like to do is to drive
the robot to a desired vertical position
5
00:00:14,326 --> 00:00:17,361
either up or down.
6
00:00:19,510 --> 00:00:22,620
Let's use x to measure
the vertical displacement.
7
00:00:25,330 --> 00:00:28,940
Clearly, the acceleration is given by
the second derivative of position.
8
00:00:30,600 --> 00:00:34,899
If you look on the left hand side,
you'll see the sum of the forces.
9
00:00:35,960 --> 00:00:40,420
Let's call u the sum of
the forces divided by the mass.
10
00:00:41,740 --> 00:00:48,778
So you have now a very simple second order
differential equation with an input u and
11
00:00:48,778 --> 00:00:54,293
a variable x, such that u is equal
to the second derivative of x.
12
00:00:54,293 --> 00:01:00,476
Our goal to control this vehicle
is to determine the function u,
13
00:01:00,476 --> 00:01:05,640
such that the vehicle goes
to the desired position x.
14
00:01:08,160 --> 00:01:09,610
So here is the control problem.
15
00:01:10,760 --> 00:01:13,980
The system we have is
a very simple system.
16
00:01:13,980 --> 00:01:15,920
It's a second order linear system.
17
00:01:17,200 --> 00:01:22,980
You're trying to figure out what u of t,
what function of t that is u,
18
00:01:22,980 --> 00:01:27,260
drives x to a desired position x desired.
19
00:01:27,260 --> 00:01:29,840
If you have a desired trajectory,
20
00:01:29,840 --> 00:01:35,270
in other words x desired is a function of
time, you want to synthesize the control
21
00:01:35,270 --> 00:01:39,900
input u of t that allows the vehicle
to follow the desired trajectory.
22
00:01:42,000 --> 00:01:44,030
In order to do that let's define an error.
23
00:01:45,140 --> 00:01:48,470
The error function is essentially the
difference between the desired trajectory
24
00:01:48,470 --> 00:01:49,580
and the actual trajectory.
25
00:01:51,840 --> 00:01:54,330
So the larger the error, obviously,
26
00:01:54,330 --> 00:01:58,870
the further the deviation from the actual
trajectory, from the desire trajectory.
27
00:02:00,320 --> 00:02:03,920
What you'd like to do is to take
this error and decrease it to zero.
28
00:02:05,180 --> 00:02:08,340
More specifically we want this
error to go exponentially to zero.
29
00:02:10,250 --> 00:02:13,600
In other words, we wanna find u of t,
30
00:02:13,600 --> 00:02:17,970
such that the error function satisfies
the second order differential equation.
31
00:02:19,360 --> 00:02:21,620
Why this differential equation?
32
00:02:21,620 --> 00:02:25,510
Well, in this differential equation,
there are two unknowns, Kp and Kv.
33
00:02:26,550 --> 00:02:29,520
If I select appropriate values of Kp and
34
00:02:29,520 --> 00:02:34,920
Kv, more specifically, if I ensure
that these values are positive,
35
00:02:34,920 --> 00:02:37,900
I can guarantee that this error
will go exponentially to zero.
36
00:02:40,640 --> 00:02:44,530
The control input that achieves that
is given by this very simple equation.
37
00:02:45,780 --> 00:02:49,200
Again, the only reason I'm
pulling out this control equation
38
00:02:49,200 --> 00:02:52,270
is because I want the error
to go exponentially to zero.
39
00:02:52,270 --> 00:02:55,050
And that'll ensure that
x tends to x desired.
40
00:02:57,500 --> 00:03:04,540
There are two variables in this equation,
one is K sub p, and the other is K sub v.
41
00:03:04,540 --> 00:03:09,370
You'll see that K sub p
multiplies the error, and
42
00:03:09,370 --> 00:03:13,360
adds the error times Kp
to the control function.
43
00:03:15,000 --> 00:03:18,400
K sub v multiplies
the derivative of the error, and
44
00:03:18,400 --> 00:03:21,140
adds that to the control function.
45
00:03:21,140 --> 00:03:25,820
So one is called the proportional gain,
the other is called the derivative gain.
46
00:03:25,820 --> 00:03:30,480
And in addition, you need some knowledge
of how you want the trajectory to vary.
47
00:03:30,480 --> 00:03:35,920
So you're feeding forward the second
derivative of the desired trajectory.
48
00:03:35,920 --> 00:03:38,690
This is often called the feedforward term.
49
00:03:38,690 --> 00:03:41,390
And this completes your control law or
50
00:03:41,390 --> 00:03:45,520
the control equation at then you
can use to drive your motors.
51
00:03:47,540 --> 00:03:51,300
Here's a typical response of what
the error might look like if you use such
52
00:03:51,300 --> 00:03:52,400
an approach to control.
53
00:03:53,960 --> 00:03:58,780
The error starts out being non zero, but
quickly settles down to the zero value.
54
00:03:59,960 --> 00:04:04,180
The error might undershoot, go from
a positive value to a negative value, but
55
00:04:04,180 --> 00:04:06,210
eventually you're guaranteed
that it'll go to zero.
56
00:04:07,460 --> 00:04:13,240
To summarize,
we've derived a very simple control law.
57
00:04:13,240 --> 00:04:16,820
It's called the proportional
plus derivative control law,
58
00:04:16,820 --> 00:04:18,870
which has a very simple form.
59
00:04:18,870 --> 00:04:23,761
It has three terms, a feedforward term, a
proportional term, and a derivative term.
60
00:04:23,761 --> 00:04:26,620
Each of these terms has a significance.
61
00:04:27,710 --> 00:04:33,180
The proportional term acts like
a spring or a capacitance.
62
00:04:33,180 --> 00:04:35,909
The higher the proportional term is,
63
00:04:35,909 --> 00:04:41,035
the more springy the system becomes and
more likely it is to overshoot.
64
00:04:41,035 --> 00:04:48,910
The higher the derivative term,
the more dense it becomes.
65
00:04:48,910 --> 00:04:53,150
So this is like a viscous dashpot or
a resistance in an electrical system.
66
00:04:56,110 --> 00:05:01,260
By increasing the derivative gain,
the system essentially gets damped,
67
00:05:01,260 --> 00:05:05,300
and you can make it overdamped so that
it never overshoots the desired value.
68
00:05:06,760 --> 00:05:10,150
In exceptional cases,
you might consider using
69
00:05:10,150 --> 00:05:13,710
a more sophisticated version of
the proportional plus derivative control.
70
00:05:14,710 --> 00:05:20,440
Here you have an extra term, which is
proportional to the integral of the error.
71
00:05:21,600 --> 00:05:25,370
You often do this when you
don't know the model exactly.
72
00:05:25,370 --> 00:05:28,990
So, for instance,
you might not know the mass, or
73
00:05:28,990 --> 00:05:32,290
there might be some wind resistance
that you need to overcome, and
74
00:05:32,290 --> 00:05:35,730
you don't know a priori how
much this wind resistance is.
75
00:05:35,730 --> 00:05:40,010
The last term essentially
allows you to compensate for
76
00:05:40,010 --> 00:05:45,230
unknown effects caused by
either unknown quantities, or
77
00:05:45,230 --> 00:05:49,245
unknown wind conditions, or disturbances.
78
00:05:50,465 --> 00:05:54,535
The downside of adding this additional
term is that your differential equation
79
00:05:54,535 --> 00:05:57,435
now becomes a third-order
differential equation.
80
00:05:57,435 --> 00:06:01,555
The reason for that is you've suddenly
added an integral in the mix and
81
00:06:01,555 --> 00:06:05,205
if you want to eliminate the integral you
have to differentiate the whole equation
82
00:06:05,205 --> 00:06:08,256
one more time introducing
a third derivative.
83
00:06:10,170 --> 00:06:13,370
However, the benefit of this is
that this integral term will
84
00:06:13,370 --> 00:06:15,710
make the error go to zero eventually.
85
00:06:18,220 --> 00:06:23,040
So here are three examples
of the system based
86
00:06:23,040 --> 00:06:27,440
on what values you pick for the
proportional gain and the derivative gain.
87
00:06:29,630 --> 00:06:31,350
If both the gains are positive,
88
00:06:31,350 --> 00:06:34,280
you're guaranteed stability,
as you see on the left side.
89
00:06:36,150 --> 00:06:41,680
If K sub v is equal to 0,
then you're guaranteed marginal stability.
90
00:06:41,680 --> 00:06:44,080
While the system will not drift,
91
00:06:44,080 --> 00:06:46,669
you'll find it'll oscillate
about the desired value.
92
00:06:48,590 --> 00:06:49,610
Of course, if one or
93
00:06:49,610 --> 00:06:53,770
the other gain is negative, then you
essentially get an unstable system.
94
00:06:55,850 --> 00:07:00,026
You can similarly explore the effect of
the integral gain which we haven't done in
95
00:07:00,026 --> 00:07:00,822
this picture.
96
00:07:00,822 --> 00:07:04,944
I now want to deal with a complete
simulation of the quadrotor.
97
00:07:06,860 --> 00:07:11,230
Because we'll now require
three independent direction
98
00:07:11,230 --> 00:07:14,940
we're gonna now introduce x,
y, and z coordinates.
99
00:07:14,940 --> 00:07:16,860
And this time the z coordinate points up.
100
00:07:19,240 --> 00:07:22,366
So here's a simulation of
the quadrotor and again,
101
00:07:22,366 --> 00:07:26,495
we're using a proportional derivative
control to control height.
102
00:07:26,495 --> 00:07:31,260
For the moment,
we're ignoring the other variables.
103
00:07:31,260 --> 00:07:35,930
We're adding terms to make sure that the
lateral displacement is zero, the roll and
104
00:07:35,930 --> 00:07:38,850
pitch stays zero, and the yaw stays zero.
105
00:07:40,350 --> 00:07:43,230
But we don't have to worry about that for
the present moment.
106
00:07:44,310 --> 00:07:47,460
We're only construing the proportional
derivative control of height.
107
00:07:49,820 --> 00:07:54,285
And you can see that the error
starts out being non-zero and
108
00:07:54,285 --> 00:07:56,702
then eventually settles down.
109
00:07:56,702 --> 00:08:01,627
There is an overshoot, the red curve
overshoots the desired blue curve, but
110
00:08:01,627 --> 00:08:06,353
eventually settles back down so
that the red and the blue curve coincide.
111
00:08:08,931 --> 00:08:12,550
And here's an experiment that
demonstrates the same idea.
112
00:08:13,570 --> 00:08:15,870
The robot is asked to hover and
113
00:08:15,870 --> 00:08:20,590
in this case someone displaces the robot
from the nominal hover position.
114
00:08:22,260 --> 00:08:24,830
And the robot fights to
overcome the disturbance.
115
00:08:25,900 --> 00:08:30,620
Using a combination of proportional and
derivative gains, the robot is able to
116
00:08:30,620 --> 00:08:35,370
compensate for that disturbance and then
settle back down into the hover position.
117
00:08:37,340 --> 00:08:43,920
If you increase the value of Kp as I said
earlier, the system gets more springy.
118
00:08:43,920 --> 00:08:48,170
So you can see that
the system now overshoots.
119
00:08:48,170 --> 00:08:53,400
The red curve overshoots the blue step and
then settles down eventually.
120
00:08:54,770 --> 00:08:58,910
Again, in this video you'll
see the same phenomenon.
121
00:08:58,910 --> 00:09:03,480
The robot is hovering, but
when it's displaced, when it recovers from
122
00:09:03,480 --> 00:09:08,850
the displaced position it overshoots and
comes back to the original position.
123
00:09:08,850 --> 00:09:12,189
And this happens because the proportional
gain has been increased.
124
00:09:15,511 --> 00:09:20,144
If you turn down this proportional gain,
you lose the overshoot but
125
00:09:20,144 --> 00:09:22,750
instead you get a very soft response.
126
00:09:25,050 --> 00:09:25,690
And then, of course,
127
00:09:25,690 --> 00:09:29,110
if you turn up the derivative gain,
the system becomes overdamped.
128
00:09:30,910 --> 00:09:33,380
So the overshoot disappears but
129
00:09:33,380 --> 00:09:37,780
the system takes also a longer time in
order to get to the desired position.
130
00:09:40,160 --> 00:09:43,310
And once again,
this video illustrates this.
131
00:09:43,310 --> 00:09:44,510
The vehicle is displaced.
132
00:09:45,550 --> 00:09:48,489
And it takes a longer time to get
back to the original position.
133
00:09:53,026 --> 00:09:56,980
In order to get a feel for
these different terms in the controller.
134
00:09:58,050 --> 00:09:59,620
Here's a simple exercise.
135
00:10:00,680 --> 00:10:04,300
You have a simulator of
the system that you just saw.
136
00:10:06,320 --> 00:10:11,150
Try to play around with the two gains,
K sub p and K sub v.
137
00:10:11,150 --> 00:10:18,900
To achieve a simple goal, which is to get
a desired response in which the rise time,
138
00:10:18,900 --> 00:10:24,770
in other words the time taken to get to
the desired position, is reasonably short.
139
00:10:24,770 --> 00:10:28,400
And the overshoot is kept
below some modest value.12794
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.