1 00:00:00,040 --> 00:00:02,470 The following content is provided under a Creative 2 00:00:02,470 --> 00:00:03,880 Commons license. 3 00:00:03,880 --> 00:00:06,920 Your support will help MIT OpenCourseWare continue to 4 00:00:06,920 --> 00:00:10,570 offer high-quality educational resources for free. 5 00:00:10,570 --> 00:00:13,470 To make a donation or view additional materials from 6 00:00:13,470 --> 00:00:19,290 hundreds of MIT courses, visit MIT OpenCourseWare at 7 00:00:19,290 --> 00:00:20,750 ocw.mit.edu. 8 00:00:20,750 --> 00:00:55,770 [MUSIC PLAYING] 9 00:00:55,770 --> 00:00:59,530 PROFESSOR: Last time, we began a discussion of feedback. 10 00:00:59,530 --> 00:01:02,240 And I briefly introduced a number of applications. 11 00:01:02,240 --> 00:01:05,970 For example, the use of feedback in compensating for 12 00:01:05,970 --> 00:01:08,400 non-ideal elements in a system. 13 00:01:08,400 --> 00:01:12,900 And also, as another example, the use of feedback in 14 00:01:12,900 --> 00:01:16,050 stabilizing unstable systems. 15 00:01:16,050 --> 00:01:19,680 In this final lecture, what I'd like to do is focus in 16 00:01:19,680 --> 00:01:22,980 more detail on the use of feedback to 17 00:01:22,980 --> 00:01:25,930 stabilize unstable systems. 18 00:01:25,930 --> 00:01:29,610 And the specific context in which I'd like to do that is 19 00:01:29,610 --> 00:01:32,640 in the context of the inverted pendulum. 20 00:01:32,640 --> 00:01:36,230 Now, I've referred to the inverted pendulum in several 21 00:01:36,230 --> 00:01:37,610 past lectures. 22 00:01:37,610 --> 00:01:42,130 And, basically, as everyone realizes, a pendulum is 23 00:01:42,130 --> 00:01:45,460 essentially a rod with a weight on the bottom. 24 00:01:45,460 --> 00:01:48,130 And, naturally, an inverted pendulum is just 25 00:01:48,130 --> 00:01:49,700 that, upside down. 26 00:01:49,700 --> 00:01:53,740 And so it's essentially a rod that's top-heavy. 27 00:01:53,740 --> 00:01:58,840 And the idea with the inverted pendulum is, although by 28 00:01:58,840 --> 00:02:03,270 itself it's unstable around a pivot point at the bottom, the 29 00:02:03,270 --> 00:02:07,840 idea is to apply an external input, an acceleration, 30 00:02:07,840 --> 00:02:09,509 essentially to keep it balanced. 31 00:02:09,509 --> 00:02:14,300 And we've all probably done this type of thing at some 32 00:02:14,300 --> 00:02:17,970 point in our lives, either childhood or not. 33 00:02:17,970 --> 00:02:22,930 And so that's the system that I'd like to analyze and then 34 00:02:22,930 --> 00:02:25,240 illustrate in this lecture. 35 00:02:25,240 --> 00:02:29,630 Now, the context in which we'll do that is not with my 36 00:02:29,630 --> 00:02:34,360 son's horse, but actually with an inverted pendulum which is 37 00:02:34,360 --> 00:02:35,830 mounted on a cart. 38 00:02:35,830 --> 00:02:39,220 And first I'd like to go through an analysis of it, and 39 00:02:39,220 --> 00:02:43,110 then we'll actually see how the system works. 40 00:02:43,110 --> 00:02:47,950 So basically, then, the system that we're talking about is 41 00:02:47,950 --> 00:02:51,940 going to be a system which is a movable cart. 42 00:02:51,940 --> 00:02:56,140 Mounted on the cart is a rod with a weight on the top. 43 00:02:56,140 --> 00:02:58,910 And this then becomes the inverted pendulum. 44 00:02:58,910 --> 00:03:05,140 And the cart has an external acceleration applied to it, 45 00:03:05,140 --> 00:03:09,370 which is the input that we can apply to the system. 46 00:03:09,370 --> 00:03:13,220 And then, in general, we can expect some disturbances. 47 00:03:13,220 --> 00:03:17,670 And I'm going to represent the disturbances in terms of an 48 00:03:17,670 --> 00:03:21,860 angular acceleration, which shows up around the weight at 49 00:03:21,860 --> 00:03:24,550 the top of the rod. 50 00:03:24,550 --> 00:03:28,070 So if we look at the system, then, as I've kind of 51 00:03:28,070 --> 00:03:33,840 indicated it here, basically we have two inputs. 52 00:03:33,840 --> 00:03:37,580 We have an input, which are the external disturbances, 53 00:03:37,580 --> 00:03:41,580 which we can assume that we have no control over. 54 00:03:41,580 --> 00:03:45,760 And then there is the acceleration that's apply to 55 00:03:45,760 --> 00:03:50,620 the cart externally, or in the case of balancing my son's 56 00:03:50,620 --> 00:03:53,480 horse, it's the movement of my hand. 57 00:03:53,480 --> 00:03:57,760 And then, through the system dynamics, that ends up 58 00:03:57,760 --> 00:04:02,680 influencing the angle of the rod. 59 00:04:02,680 --> 00:04:06,680 And we'll think of the angle of the rod 60 00:04:06,680 --> 00:04:08,760 as the system output. 61 00:04:08,760 --> 00:04:14,250 And basically the idea, then, is to try to keep that angle 62 00:04:14,250 --> 00:04:19,680 at 0 by applying the appropriate acceleration. 63 00:04:19,680 --> 00:04:24,360 Now, as I've mentioned several times previously, if we know 64 00:04:24,360 --> 00:04:29,000 exactly what the system dynamics are, and if we know 65 00:04:29,000 --> 00:04:31,910 exactly what the external disturbances are, then 66 00:04:31,910 --> 00:04:36,030 theoretically we can choose an acceleration for the cart 67 00:04:36,030 --> 00:04:40,430 which will exactly balance the system, or balance the rod. 68 00:04:40,430 --> 00:04:44,390 However, since the system is inherently unstable, any 69 00:04:44,390 --> 00:04:48,620 deviation from that model-- in particular, any unanticipated 70 00:04:48,620 --> 00:04:50,580 external disturbances-- 71 00:04:50,580 --> 00:04:52,250 will excite the instability. 72 00:04:52,250 --> 00:04:55,460 And what that means is that the rod will fall. 73 00:04:55,460 --> 00:05:01,710 So the idea, then, is, as we'll see, to stabilize the 74 00:05:01,710 --> 00:05:04,950 system by placing feedback around it. 75 00:05:04,950 --> 00:05:09,190 In particular through a measurement of the output 76 00:05:09,190 --> 00:05:14,500 angle, processed through some appropriate feedback dynamics, 77 00:05:14,500 --> 00:05:18,580 using that to control the acceleration of the cart. 78 00:05:18,580 --> 00:05:22,160 And if we choose the feedback dynamics correctly, then, in 79 00:05:22,160 --> 00:05:27,030 fact, we can end up with a stable system, even though the 80 00:05:27,030 --> 00:05:29,760 open-loop system is unstable. 81 00:05:29,760 --> 00:05:34,450 Well, as a first step, let's analyze the system in its 82 00:05:34,450 --> 00:05:35,880 open-loop form. 83 00:05:35,880 --> 00:05:40,090 In particular, let's analyze the system without feedback, 84 00:05:40,090 --> 00:05:44,390 demonstrate that, indeed, it is unstable, and then see how 85 00:05:44,390 --> 00:05:47,640 we can stabilize it using feedback. 86 00:05:47,640 --> 00:05:50,770 So the system, then, is-- 87 00:05:50,770 --> 00:05:55,610 as we've indicated, the variables involved are the 88 00:05:55,610 --> 00:06:00,460 measured angle, which represents the output, the 89 00:06:00,460 --> 00:06:04,680 angular acceleration due to external disturbances, and 90 00:06:04,680 --> 00:06:07,260 then there is the applied external 91 00:06:07,260 --> 00:06:09,720 acceleration on the cart. 92 00:06:09,720 --> 00:06:13,530 So these represent the variables, with L representing 93 00:06:13,530 --> 00:06:17,300 the length of the rod, and s of t I indicate here, which we 94 00:06:17,300 --> 00:06:20,430 won't really be paying attention to, as the position 95 00:06:20,430 --> 00:06:22,230 of the cart. 96 00:06:22,230 --> 00:06:28,040 And without going into the details specifically, what 97 00:06:28,040 --> 00:06:30,830 we'll do is set up the equation, or write the 98 00:06:30,830 --> 00:06:34,290 equation, in terms of balancing the acceleration. 99 00:06:34,290 --> 00:06:38,080 And if you go through that process, then the basic 100 00:06:38,080 --> 00:06:41,890 equation that you end up with is the equation that I 101 00:06:41,890 --> 00:06:43,730 indicate here. 102 00:06:43,730 --> 00:06:48,710 And this equation, then, tells us how the basic forces, or 103 00:06:48,710 --> 00:06:52,330 accelerations, are balanced, where this is the second 104 00:06:52,330 --> 00:06:55,900 derivative of the angle. 105 00:06:55,900 --> 00:06:59,590 And then we have the acceleration due to gravity, 106 00:06:59,590 --> 00:07:05,080 reflected through the angular acceleration times the sine of 107 00:07:05,080 --> 00:07:09,190 the angle, the angular acceleration due to the 108 00:07:09,190 --> 00:07:12,960 external disturbances, and finally, the angular 109 00:07:12,960 --> 00:07:16,060 acceleration due to the motion of the cart. 110 00:07:16,060 --> 00:07:19,730 Now, this equation, as it's written here, is a nonlinear 111 00:07:19,730 --> 00:07:23,830 equation in the angle theta of t. 112 00:07:23,830 --> 00:07:28,100 And what we'd like to do is linearize the equation. 113 00:07:28,100 --> 00:07:31,160 And we'll linearize the equation by making the 114 00:07:31,160 --> 00:07:35,670 assumption that the angle is very small, close to 0. 115 00:07:35,670 --> 00:07:38,200 In other words, what we'll assume is that we're able to 116 00:07:38,200 --> 00:07:40,970 keep the rod relatively vertical. 117 00:07:40,970 --> 00:07:44,180 And our analysis, because we're linearizing the 118 00:07:44,180 --> 00:07:46,850 equations, will obviously depend on that. 119 00:07:46,850 --> 00:07:51,770 So making the assumption that the angle is small, we then 120 00:07:51,770 --> 00:07:56,070 assume that the sine of the angle is approximately equal 121 00:07:56,070 --> 00:08:01,050 to the angle, and the cosine of the angle is approximately 122 00:08:01,050 --> 00:08:02,480 equal to 1. 123 00:08:02,480 --> 00:08:04,980 That will then linearize this equation. 124 00:08:04,980 --> 00:08:10,230 And the resulting equation, then, in its linearized form, 125 00:08:10,230 --> 00:08:13,380 is the one that I indicate here. 126 00:08:13,380 --> 00:08:20,000 So we have an equation of motion, which linearizes the 127 00:08:20,000 --> 00:08:22,260 balance of the accelerations. 128 00:08:22,260 --> 00:08:24,730 And what we see on the right-hand side of the 129 00:08:24,730 --> 00:08:29,970 equation is the combined inputs due to the angular 130 00:08:29,970 --> 00:08:33,659 acceleration of the rod and the acceleration of the cart. 131 00:08:33,659 --> 00:08:37,950 And on the left-hand side of the equation, we have the 132 00:08:37,950 --> 00:08:42,419 other forces due to the change in the angle. 133 00:08:42,419 --> 00:08:44,990 So this is, then, the differential equation 134 00:08:44,990 --> 00:08:49,700 associated with the open-loop system, the basic dynamics of 135 00:08:49,700 --> 00:08:50,900 the system. 136 00:08:50,900 --> 00:08:55,280 And if we apply the Laplace transform to this equation and 137 00:08:55,280 --> 00:09:00,350 solve for the system function, then the basic equation that 138 00:09:00,350 --> 00:09:03,870 we're left with expresses the Laplace transform of the 139 00:09:03,870 --> 00:09:09,080 angle, equal to the system function, the open-loop system 140 00:09:09,080 --> 00:09:13,220 function, times the Laplace transform of 141 00:09:13,220 --> 00:09:14,750 the combined inputs. 142 00:09:14,750 --> 00:09:18,190 And I remind you again that our assumption is that this is 143 00:09:18,190 --> 00:09:21,080 an input that we have no control over. 144 00:09:21,080 --> 00:09:24,180 This is the input that we can control. 145 00:09:24,180 --> 00:09:26,250 And the two together, of course, form 146 00:09:26,250 --> 00:09:27,990 the combined input. 147 00:09:27,990 --> 00:09:31,650 Now, we can, of course, solve for the poles and 0's. 148 00:09:31,650 --> 00:09:33,190 There are no 0's. 149 00:09:33,190 --> 00:09:35,310 And there are two poles, since this is a second-order 150 00:09:35,310 --> 00:09:36,760 denominator. 151 00:09:36,760 --> 00:09:40,800 And looking at the poles in the s-plane then, we see that 152 00:09:40,800 --> 00:09:44,750 we have a pair of poles, one at minus the square root of g 153 00:09:44,750 --> 00:09:49,860 over L, and one at plus the square root of g over L. 154 00:09:49,860 --> 00:09:54,390 And the important observation, then, is that while this pole 155 00:09:54,390 --> 00:09:59,100 represents a stable pole, the right half-plane pole 156 00:09:59,100 --> 00:10:01,470 represents an unstable pole. 157 00:10:01,470 --> 00:10:06,620 And so this system, in fact, is an unstable system. 158 00:10:06,620 --> 00:10:11,170 It's unstable because what we have is a pole in the right 159 00:10:11,170 --> 00:10:15,630 half-plane for the open-loop system. 160 00:10:15,630 --> 00:10:19,750 Now, before we see how to stabilize the system, let's, 161 00:10:19,750 --> 00:10:25,650 in fact, look at the mechanical setup, which we 162 00:10:25,650 --> 00:10:30,540 won't turn on for now, and just see essentially what this 163 00:10:30,540 --> 00:10:34,830 instability means and what the physical orientation of the 164 00:10:34,830 --> 00:10:36,670 equipment is. 165 00:10:36,670 --> 00:10:40,090 So what we have, which you just saw a caricature of in 166 00:10:40,090 --> 00:10:45,310 the view graph, is an inverted pendulum. 167 00:10:45,310 --> 00:10:48,270 This represents the pendulum. 168 00:10:48,270 --> 00:10:52,550 And it's mounted with the pivot point at the bottom. 169 00:10:52,550 --> 00:10:54,340 It's mounted on a cart. 170 00:10:54,340 --> 00:10:57,020 And here we have the cart. 171 00:10:57,020 --> 00:11:00,830 And this is a pivot point. 172 00:11:00,830 --> 00:11:04,100 And, as you can see, the cart can move back 173 00:11:04,100 --> 00:11:06,110 and forth on a track. 174 00:11:06,110 --> 00:11:10,860 And the external acceleration, which is applied to the cart, 175 00:11:10,860 --> 00:11:14,120 is applied through this cable. 176 00:11:14,120 --> 00:11:18,480 And that cable is controlled by a motor. 177 00:11:18,480 --> 00:11:23,300 And we have the motor at this end of the track. 178 00:11:23,300 --> 00:11:27,650 And so as the motor turns, then the cart will 179 00:11:27,650 --> 00:11:29,760 move back and forth. 180 00:11:29,760 --> 00:11:30,250 OK. 181 00:11:30,250 --> 00:11:34,350 Now, since the system is not turned on 182 00:11:34,350 --> 00:11:36,080 and there's no feedback-- 183 00:11:36,080 --> 00:11:40,480 in fact, the system, as we just saw in the transparency, 184 00:11:40,480 --> 00:11:42,710 is an unstable system. 185 00:11:42,710 --> 00:11:47,050 And what that instability means is that, for example, if 186 00:11:47,050 --> 00:11:53,190 I set the angle to 0 and then let it go, then as soon as 187 00:11:53,190 --> 00:11:55,310 there's a slight external disturbance, it 188 00:11:55,310 --> 00:11:57,090 will start to fall. 189 00:11:57,090 --> 00:12:02,370 Now, you can imagine that not only is the system unstable as 190 00:12:02,370 --> 00:12:06,530 it is, but certainly can't accommodate changes in the 191 00:12:06,530 --> 00:12:07,690 system dynamics. 192 00:12:07,690 --> 00:12:09,660 For example, if we change, let's say, the 193 00:12:09,660 --> 00:12:10,990 weight of the pendulum. 194 00:12:10,990 --> 00:12:15,960 So if we thought, for example, of changing the weight by, 195 00:12:15,960 --> 00:12:19,350 let's say, putting something like a glass with something in 196 00:12:19,350 --> 00:12:23,190 it on top, and I think about trying to balance it by 197 00:12:23,190 --> 00:12:25,760 itself, obviously that's hard. 198 00:12:25,760 --> 00:12:29,030 In fact, I would say, without turning the system on, 199 00:12:29,030 --> 00:12:31,710 guaranteed to be impossible. 200 00:12:31,710 --> 00:12:36,430 So the basic system, as we've just analyzed it, is 201 00:12:36,430 --> 00:12:38,630 inherently an unstable system. 202 00:12:38,630 --> 00:12:42,860 The instability reflecting in the fact that the pendulum, 203 00:12:42,860 --> 00:12:46,090 following its own natural forces, will tend to fall. 204 00:12:46,090 --> 00:12:50,160 And now what we want to look at is how, through the use of 205 00:12:50,160 --> 00:12:55,820 feedback, we can, in fact, stabilize the system. 206 00:12:55,820 --> 00:13:05,160 So let's first, once again, look at the open-loop system. 207 00:13:05,160 --> 00:13:09,410 And the open-loop system function that we saw was a 208 00:13:09,410 --> 00:13:14,580 system function of this form, 1 over Ls squared minus g, and 209 00:13:14,580 --> 00:13:18,930 that represents the system function associated with the 210 00:13:18,930 --> 00:13:22,390 two inputs, one being the external disturbances, the 211 00:13:22,390 --> 00:13:25,290 other being the externally applied acceleration. 212 00:13:25,290 --> 00:13:29,470 And the system function here 213 00:13:29,470 --> 00:13:31,200 represents the system dynamics. 214 00:13:31,200 --> 00:13:35,670 And the resulting output is the angle. 215 00:13:35,670 --> 00:13:40,230 Now, the feedback, the basic strategy behind the feedback, 216 00:13:40,230 --> 00:13:45,110 is to in some way use the measured angle, make a 217 00:13:45,110 --> 00:13:49,000 measurement of the angle, and use that through appropriate 218 00:13:49,000 --> 00:13:52,160 feedback dynamics to stabilize the system. 219 00:13:52,160 --> 00:13:56,920 And so with feedback applied around the system then, there 220 00:13:56,920 --> 00:14:00,770 would be some measurement of the angle through some 221 00:14:00,770 --> 00:14:03,550 appropriately chosen feedback dynamics. 222 00:14:03,550 --> 00:14:09,490 And that then would determine for us the applied external 223 00:14:09,490 --> 00:14:13,420 acceleration corresponding to what the motor does by pulling 224 00:14:13,420 --> 00:14:15,210 the cable back and forth. 225 00:14:15,210 --> 00:14:19,070 And we would like to choose G of s so that the overall 226 00:14:19,070 --> 00:14:21,270 system is stable. 227 00:14:21,270 --> 00:14:24,980 Now, as you recall from the lecture last time, with the 228 00:14:24,980 --> 00:14:28,890 feedback around the system and expressed here in terms of 229 00:14:28,890 --> 00:14:34,480 negative feedback, the overall transfer function then is the 230 00:14:34,480 --> 00:14:38,030 transfer function associated with the basic feedback loop, 231 00:14:38,030 --> 00:14:43,420 where H of s is the open-loop system and G of s corresponds 232 00:14:43,420 --> 00:14:46,160 to the feedback dynamics. 233 00:14:46,160 --> 00:14:49,070 Now, that's the basic strategy. 234 00:14:49,070 --> 00:14:52,490 We haven't decided yet how to choose the feedback dynamics. 235 00:14:52,490 --> 00:14:54,710 And that becomes the next step. 236 00:14:54,710 --> 00:14:57,500 And we want to choose the dynamics in such a way that 237 00:14:57,500 --> 00:15:01,840 the system ends up being stabilized. 238 00:15:01,840 --> 00:15:06,290 Well, I think the thing to do is just simply begin with what 239 00:15:06,290 --> 00:15:10,060 would seem to be the most obvious, which is a simple 240 00:15:10,060 --> 00:15:11,750 measurement of the angle. 241 00:15:11,750 --> 00:15:16,910 Let's take the angular measurements, feed that back, 242 00:15:16,910 --> 00:15:19,770 let's say through a potentiometer and perhaps an 243 00:15:19,770 --> 00:15:22,850 amplifier, so that there's some gain, and see if we can 244 00:15:22,850 --> 00:15:27,410 stabilize the system simply through feedback which is 245 00:15:27,410 --> 00:15:30,160 proportional to a measurement of the angle, what. 246 00:15:30,160 --> 00:15:36,710 Is typically referred to as "proportional feedback." Well, 247 00:15:36,710 --> 00:15:40,200 let's analyze the results of doing that. 248 00:15:40,200 --> 00:15:46,380 Once again we have the basic feedback equation, where the 249 00:15:46,380 --> 00:15:50,730 open-loop transfer function is what we had developed 250 00:15:50,730 --> 00:15:54,670 previously, given by the second-order expression. 251 00:15:54,670 --> 00:15:59,570 Now, using proportional feedback, we choose the 252 00:15:59,570 --> 00:16:05,145 acceleration a of t to be directly proportional through 253 00:16:05,145 --> 00:16:09,260 a gain constant or attenuation constant K1, directly 254 00:16:09,260 --> 00:16:12,690 proportional to the measured angle theta of t. 255 00:16:12,690 --> 00:16:16,970 And consequently the system function in the feedback path 256 00:16:16,970 --> 00:16:20,400 is just simply a gain or attenuate K1. 257 00:16:20,400 --> 00:16:23,270 So this, then, is the system function for 258 00:16:23,270 --> 00:16:25,270 the feedback path. 259 00:16:25,270 --> 00:16:31,720 Well, substituting this into the closed-loop expression, 260 00:16:31,720 --> 00:16:36,970 then the overall expression for the Laplace transform of 261 00:16:36,970 --> 00:16:42,750 the output angle is, as I indicate here, namely that 262 00:16:42,750 --> 00:16:48,170 theta of s is proportional through this system function. 263 00:16:48,170 --> 00:16:52,570 So the Laplace transform of the input X of t-- and let me 264 00:16:52,570 --> 00:16:56,930 remind you that X of t, the external disturbances, now 265 00:16:56,930 --> 00:17:00,040 represent the only input, since the other input 266 00:17:00,040 --> 00:17:03,300 corresponding to the applied acceleration to the cart is 267 00:17:03,300 --> 00:17:06,930 now controlled only through the feedback loop. 268 00:17:06,930 --> 00:17:09,950 So we have this system function, then, for the 269 00:17:09,950 --> 00:17:11,579 closed-loop system. 270 00:17:11,579 --> 00:17:15,990 We recognize this once again as a second-order system. 271 00:17:15,990 --> 00:17:20,960 And the poles of this second-order system are then 272 00:17:20,960 --> 00:17:25,339 given by plus and minus the square root of g minus K1, 273 00:17:25,339 --> 00:17:31,550 divided by L. So K1, the feedback constant, clearly 274 00:17:31,550 --> 00:17:34,320 influences the position of the poles. 275 00:17:34,320 --> 00:17:37,960 And let's look, in fact, at where the 276 00:17:37,960 --> 00:17:42,200 poles are in the s-plane. 277 00:17:42,200 --> 00:17:48,090 Well, first of all, with K1 equal to 0, which, of course, 278 00:17:48,090 --> 00:17:52,290 is no feedback and corresponds to the open-loop system, we 279 00:17:52,290 --> 00:17:56,480 have the poles where they were previously. 280 00:17:56,480 --> 00:18:03,510 And if we now choose K1, let's say less than 0, then what 281 00:18:03,510 --> 00:18:09,690 will happen as K1 becomes more and more negative, so that 282 00:18:09,690 --> 00:18:12,965 this term is more and more positive, is that the left 283 00:18:12,965 --> 00:18:16,425 half-plane pole will move further into the left 284 00:18:16,425 --> 00:18:20,150 half-plane, the right half-plane pole will move 285 00:18:20,150 --> 00:18:22,560 further into the right half-plane. 286 00:18:22,560 --> 00:18:28,960 So clearly with K1 negative, this pole, which represents an 287 00:18:28,960 --> 00:18:34,010 instability, becomes even more unstable. 288 00:18:34,010 --> 00:18:38,450 Well, instead of K1 negative, let's try K1 positive and see 289 00:18:38,450 --> 00:18:39,740 what happens. 290 00:18:39,740 --> 00:18:47,890 And with K1 positive, what happens in this case is that 291 00:18:47,890 --> 00:18:53,900 the left half-plane pole moves closer to the origin, the 292 00:18:53,900 --> 00:18:57,420 right half-plane pole moves closer to the origin. 293 00:18:57,420 --> 00:19:00,360 What one would hope is that they both end up in the left 294 00:19:00,360 --> 00:19:01,680 half-plane at some point. 295 00:19:01,680 --> 00:19:03,450 But, in fact, they don't. 296 00:19:03,450 --> 00:19:06,370 What happens is that eventually they both reach the 297 00:19:06,370 --> 00:19:11,010 origin, split at that point, and travel along the 298 00:19:11,010 --> 00:19:13,360 j-omega-axis. 299 00:19:13,360 --> 00:19:19,020 Now, this movement of the poles, as we vary K1 either 300 00:19:19,020 --> 00:19:22,350 positive or negative, what we see is that with the open-loop 301 00:19:22,350 --> 00:19:26,760 system, as we introduce feedback, those basic poles 302 00:19:26,760 --> 00:19:31,080 move in the s-plane, either this way, as K1 becomes more 303 00:19:31,080 --> 00:19:35,010 negative, or for this particular case, if K1 is 304 00:19:35,010 --> 00:19:37,300 positive, they move in together, split, and move 305 00:19:37,300 --> 00:19:39,330 along the j-omega-axis. 306 00:19:39,330 --> 00:19:44,740 And that locus of the poles, in fact, is referred to in 307 00:19:44,740 --> 00:19:48,540 feedback terminology as the "root locus." And as is 308 00:19:48,540 --> 00:19:52,510 discussed in much more detail in the text, there are lots of 309 00:19:52,510 --> 00:19:57,580 ways of determining the root locus for feedback systems 310 00:19:57,580 --> 00:20:00,470 without explicitly solving for the roots. 311 00:20:00,470 --> 00:20:03,700 For this particular example, in fact, we can determine the 312 00:20:03,700 --> 00:20:07,420 root locus in the most straightforward way simply by 313 00:20:07,420 --> 00:20:10,060 solving for the roots of the denominator 314 00:20:10,060 --> 00:20:11,810 of the system function. 315 00:20:11,810 --> 00:20:17,380 Now, notice that in this case, these poles, with K1 positive, 316 00:20:17,380 --> 00:20:18,760 have moved together. 317 00:20:18,760 --> 00:20:21,570 They move along the j-omega-axis. 318 00:20:21,570 --> 00:20:24,850 And before they come together, the 319 00:20:24,850 --> 00:20:27,460 system is clearly unstable. 320 00:20:27,460 --> 00:20:31,510 Even when they come together and split, the system is 321 00:20:31,510 --> 00:20:35,190 marginally stable, because, in fact, the system 322 00:20:35,190 --> 00:20:36,660 would tend to oscillate. 323 00:20:36,660 --> 00:20:39,420 And what that oscillation means is that with the 324 00:20:39,420 --> 00:20:43,020 measurement of the angles, essentially if the poles are 325 00:20:43,020 --> 00:20:48,230 operating on the j-omega-axis, what will happen is that 326 00:20:48,230 --> 00:20:50,460 things will oscillate back and forth. 327 00:20:50,460 --> 00:20:54,210 Perhaps with the cart moving back and forth trying to 328 00:20:54,210 --> 00:20:56,750 compensate, and the rod sort of moving in 329 00:20:56,750 --> 00:20:58,870 the opposite direction. 330 00:20:58,870 --> 00:21:02,770 In any case, what's happened is, with just proportional 331 00:21:02,770 --> 00:21:07,030 feedback, we apparently are unable to 332 00:21:07,030 --> 00:21:10,250 stabilize the system. 333 00:21:10,250 --> 00:21:13,140 Well, you could think that the reason, perhaps, is that we're 334 00:21:13,140 --> 00:21:14,490 not responding fast enough. 335 00:21:14,490 --> 00:21:19,310 For example, if the angle starts to change, perhaps, in 336 00:21:19,310 --> 00:21:23,540 fact, we should make the feedback proportional to the 337 00:21:23,540 --> 00:21:25,780 rate of change of angles, rather than 338 00:21:25,780 --> 00:21:27,280 to the angle itself. 339 00:21:27,280 --> 00:21:30,710 And so we could examine the possibility of using what's 340 00:21:30,710 --> 00:21:34,700 referred to as "derivative feedback." 341 00:21:34,700 --> 00:21:42,770 In derivative feedback, what we would do is to choose, for 342 00:21:42,770 --> 00:21:49,390 the feedback equation, or for the feedback system function, 343 00:21:49,390 --> 00:21:53,020 something reflecting a measurement of the derivative 344 00:21:53,020 --> 00:21:54,410 of the angle. 345 00:21:54,410 --> 00:21:58,910 And so here again, once again, we have the open-loop system 346 00:21:58,910 --> 00:22:01,490 function with derivative feedback. 347 00:22:01,490 --> 00:22:03,820 We'll attempt to-- 348 00:22:03,820 --> 00:22:06,040 or we will use this feedback. 349 00:22:06,040 --> 00:22:09,040 And acceleration, which instead of being proportional 350 00:22:09,040 --> 00:22:12,540 to the angle, as it was in the previous case, an acceleration 351 00:22:12,540 --> 00:22:16,840 which is proportional to the derivative of the angle. 352 00:22:16,840 --> 00:22:20,470 And so the basic feedback dynamics, or feedback system 353 00:22:20,470 --> 00:22:25,060 function, is then G of s is equal to K2 times s. 354 00:22:25,060 --> 00:22:28,110 The multiplication by s reflecting the fact that in 355 00:22:28,110 --> 00:22:33,130 the time domain it's measuring the derivative of the angle. 356 00:22:33,130 --> 00:22:38,670 The associated system function is then indicated here. 357 00:22:38,670 --> 00:22:42,960 And if we solve again this second-order equation for its 358 00:22:42,960 --> 00:22:47,730 roots, that tells us that the location of the poles are 359 00:22:47,730 --> 00:22:51,810 given by this equation. 360 00:22:51,810 --> 00:22:57,100 And so now what we would want to look at is how these poles 361 00:22:57,100 --> 00:23:03,950 move as we vary the derivative feedback constant K2. 362 00:23:03,950 --> 00:23:08,810 So let's look at the root locus for that case. 363 00:23:08,810 --> 00:23:17,860 And first, once again, we have the basic open-loop poles. 364 00:23:17,860 --> 00:23:20,915 And the open-loop poles consist of a pole on the left 365 00:23:20,915 --> 00:23:23,880 half-plane and a pole on the right half-plane, 366 00:23:23,880 --> 00:23:28,400 corresponding in this equation to K2 equal to 0. 367 00:23:28,400 --> 00:23:32,700 That is, no feedback in the system. 368 00:23:32,700 --> 00:23:37,840 If K2 is negative, then what you can see is that this real 369 00:23:37,840 --> 00:23:41,700 part will become more negative. 370 00:23:41,700 --> 00:23:46,220 Since K2 is squared here, this is still a positive quantity. 371 00:23:46,220 --> 00:23:51,280 And, in fact, then with K2 less than 0, the root locus 372 00:23:51,280 --> 00:23:55,050 that we get is indicated by this. 373 00:23:55,050 --> 00:23:59,990 Now, notice, then, that this right half-plane pole is 374 00:23:59,990 --> 00:24:02,020 becoming more unstable. 375 00:24:02,020 --> 00:24:04,460 And the left half-plane pole likewise is 376 00:24:04,460 --> 00:24:06,250 becoming more unstable. 377 00:24:06,250 --> 00:24:09,800 And this point, by the way, corresponds to where this pole 378 00:24:09,800 --> 00:24:13,930 ends up, or where the root locus ends up, when K2 379 00:24:13,930 --> 00:24:15,680 eventually becomes infinite. 380 00:24:15,680 --> 00:24:20,450 So clearly K2 negative is not going to stabilize the system. 381 00:24:20,450 --> 00:24:24,700 Let's try K2 positive. 382 00:24:24,700 --> 00:24:29,960 And the root locus dictated by this equation, then, is what I 383 00:24:29,960 --> 00:24:31,810 indicate here. 384 00:24:31,810 --> 00:24:35,130 The left half-plane pole moves further into the left 385 00:24:35,130 --> 00:24:35,760 half-plane. 386 00:24:35,760 --> 00:24:36,340 That's good. 387 00:24:36,340 --> 00:24:38,430 That's getting more stable. 388 00:24:38,430 --> 00:24:42,600 The right half-plane pole is moving closer to the left 389 00:24:42,600 --> 00:24:46,630 half-plane, but unfortunately never gets there. 390 00:24:46,630 --> 00:24:50,840 And, in fact, it's when K2 eventually becomes infinite 391 00:24:50,840 --> 00:24:54,600 that this pole just gets to the point where the system 392 00:24:54,600 --> 00:24:57,870 becomes marginally stable. 393 00:24:57,870 --> 00:25:02,010 So what we found is that with proportional feedback, we 394 00:25:02,010 --> 00:25:05,640 can't stabilize the system, with the derivative feedback, 395 00:25:05,640 --> 00:25:09,930 we can't stabilize the system, by themselves. 396 00:25:09,930 --> 00:25:13,890 And a logical next choice is to see if we can stabilize the 397 00:25:13,890 --> 00:25:19,790 system by both measuring the angle and at the same time 398 00:25:19,790 --> 00:25:23,440 being careful to be responsive to how fast that angle is 399 00:25:23,440 --> 00:25:27,340 changing, so that if it's changing too fast, we can move 400 00:25:27,340 --> 00:25:30,630 the cart or our hand under the inverted 401 00:25:30,630 --> 00:25:32,950 pendulum more quickly. 402 00:25:32,950 --> 00:25:37,370 Well, now then what we want to examine is the use of 403 00:25:37,370 --> 00:25:40,290 proportional plus derivative feedback. 404 00:25:40,290 --> 00:25:49,610 And in that case, we then have a choice for the acceleration, 405 00:25:49,610 --> 00:25:54,330 which is proportional with one constant to the angle and 406 00:25:54,330 --> 00:25:57,360 proportional with another constant to the 407 00:25:57,360 --> 00:25:59,350 derivative of the angle. 408 00:25:59,350 --> 00:26:04,480 And so the basic system function, then, with 409 00:26:04,480 --> 00:26:07,850 proportional plus derivative feedback, is a system function 410 00:26:07,850 --> 00:26:12,330 which is K1 plus K2 times s. 411 00:26:12,330 --> 00:26:17,280 We then have an overall closed-loop system function, 412 00:26:17,280 --> 00:26:23,870 theta of s, which is given by this equation. 413 00:26:23,870 --> 00:26:28,900 And so the roots of this equation then represent the 414 00:26:28,900 --> 00:26:32,470 poles of the closed-loop system. 415 00:26:32,470 --> 00:26:37,980 And those poles involve two parameters. 416 00:26:37,980 --> 00:26:42,120 They involve the parameter K2, which is proportional to the 417 00:26:42,120 --> 00:26:45,740 derivative of the angle, and the constant K1, which is 418 00:26:45,740 --> 00:26:47,700 proportional to the angle. 419 00:26:47,700 --> 00:26:55,160 And we'll, first of all, examine this just with K2 420 00:26:55,160 --> 00:26:59,560 positive, because what we can see is that as we vary K1, if 421 00:26:59,560 --> 00:27:05,120 K2 were negative, that would, more or less immediately, put 422 00:27:05,120 --> 00:27:07,270 poles into the right half-plane. 423 00:27:07,270 --> 00:27:11,280 And the more negative K2 got, the larger this 424 00:27:11,280 --> 00:27:12,910 term is going to get. 425 00:27:12,910 --> 00:27:15,790 So, in fact, as it will turn out, we can stabilize the 426 00:27:15,790 --> 00:27:20,350 system, provided that we choose K2 to be 427 00:27:20,350 --> 00:27:23,160 greater than 0. 428 00:27:23,160 --> 00:27:23,410 All right. 429 00:27:23,410 --> 00:27:30,960 Now, with K2 greater than 0, what happens in the location 430 00:27:30,960 --> 00:27:37,640 of the poles is that if K2 is greater than 0, and we choose 431 00:27:37,640 --> 00:27:39,330 K1 greater than 0-- 432 00:27:39,330 --> 00:27:39,780 I'm sorry. 433 00:27:39,780 --> 00:27:45,870 We choose K1 equal to 0, then in effect the influence of K2 434 00:27:45,870 --> 00:27:51,220 is to shift the poles of the open-loop system slightly. 435 00:27:51,220 --> 00:27:58,450 And so with K2 greater than 0 and K1 equal to 0, we have a 436 00:27:58,450 --> 00:28:06,250 set of poles, which are indicated here, and so this is 437 00:28:06,250 --> 00:28:08,800 just a shift, slight shift, to the left, depending on the 438 00:28:08,800 --> 00:28:13,900 value of K2, a shift to the left of the open-loop poles. 439 00:28:13,900 --> 00:28:17,190 Now, as we vary K1, and in particular we're going to 440 00:28:17,190 --> 00:28:24,700 choose K1 greater than 0, what happens is that the poles will 441 00:28:24,700 --> 00:28:31,000 begin to move together, as they did previously when we 442 00:28:31,000 --> 00:28:33,230 looked at the variation of K1. 443 00:28:33,230 --> 00:28:36,500 The poles will move together, reach a point where we have a 444 00:28:36,500 --> 00:28:41,820 second-order pole, and then those poles will split and 445 00:28:41,820 --> 00:28:43,900 move parallel to the j-omega-axis. 446 00:28:43,900 --> 00:28:48,100 So what's indicated here is the root locus. 447 00:28:48,100 --> 00:28:52,990 And what this represents, then, as long as we make K1 448 00:28:52,990 --> 00:28:56,075 large enough so that this poles moves into the left 449 00:28:56,075 --> 00:28:59,570 half-plane, is that it represents 450 00:28:59,570 --> 00:29:02,050 now a stable system. 451 00:29:02,050 --> 00:29:02,330 OK. 452 00:29:02,330 --> 00:29:05,840 So what we've seen is that proportional feedback by 453 00:29:05,840 --> 00:29:10,330 itself or derivative feedback by itself won't stabilize the 454 00:29:10,330 --> 00:29:14,820 system, whereas with the right choice of feedback constants, 455 00:29:14,820 --> 00:29:16,900 proportional plus derivative feedback will. 456 00:29:16,900 --> 00:29:20,620 And we saw that basically by examining the root locus in 457 00:29:20,620 --> 00:29:22,080 the s-plane. 458 00:29:22,080 --> 00:29:22,350 All right. 459 00:29:22,350 --> 00:29:26,200 Well, let's actually watch the system in action. 460 00:29:26,200 --> 00:29:29,820 And I described it to you previously. 461 00:29:29,820 --> 00:29:33,730 Basically, an inverted pendulum on a cart. 462 00:29:33,730 --> 00:29:36,630 And so I still have it off. 463 00:29:36,630 --> 00:29:38,870 And, of course, we have the pendulum. 464 00:29:38,870 --> 00:29:43,310 And as I indicated, it's pivoted at the base. 465 00:29:43,310 --> 00:29:50,260 And the angle is measured by a potentiometer that we have 466 00:29:50,260 --> 00:29:52,240 attached to the pivot point. 467 00:29:52,240 --> 00:29:57,040 And the measurement of the angle is fed back through this 468 00:29:57,040 --> 00:30:02,370 wire to a motor that we have at the other end of the table. 469 00:30:02,370 --> 00:30:06,350 And then that motor basically is used to provide the 470 00:30:06,350 --> 00:30:09,660 acceleration to drive the cart. 471 00:30:09,660 --> 00:30:09,950 OK. 472 00:30:09,950 --> 00:30:12,330 Well, let's turn it on. 473 00:30:12,330 --> 00:30:15,120 And when we turn it on, it'll take just 474 00:30:15,120 --> 00:30:16,370 an instant to stabilize. 475 00:30:19,030 --> 00:30:24,200 And fortunately we have the constants set right, and there 476 00:30:24,200 --> 00:30:28,710 we have now the stabilization of an unstable system. 477 00:30:28,710 --> 00:30:31,460 Remember that with the feedback off, the system is 478 00:30:31,460 --> 00:30:34,610 unstable because the pendulum will fall, whereas now it's 479 00:30:34,610 --> 00:30:35,760 stabilized. 480 00:30:35,760 --> 00:30:41,680 Now, also, as you can see, not only have we stabilized it, 481 00:30:41,680 --> 00:30:45,340 but we're able to compensate through the feedback to 482 00:30:45,340 --> 00:30:47,540 changes in the external disturbances. 483 00:30:47,540 --> 00:30:51,490 For example, by tapping it, because of the feedback and 484 00:30:51,490 --> 00:30:54,200 the measurement of the angle, it will more or less 485 00:30:54,200 --> 00:30:56,880 automatically stabilize. 486 00:30:56,880 --> 00:31:00,600 Now, in addition to being stable in the presence of 487 00:31:00,600 --> 00:31:04,940 external disturbances, it also remains stable and remains 488 00:31:04,940 --> 00:31:09,210 balanced even if we were to change the system dynamics. 489 00:31:09,210 --> 00:31:13,950 And let me just illustrate that with the glass that we've 490 00:31:13,950 --> 00:31:15,510 talked about before. 491 00:31:15,510 --> 00:31:19,340 Let's first not be too bold, and we'll take the liquid out 492 00:31:19,340 --> 00:31:20,420 of the glass. 493 00:31:20,420 --> 00:31:24,440 And presumably if it can adjust to changes in the 494 00:31:24,440 --> 00:31:28,850 system dynamics, then if I put the glass on, in fact, it will 495 00:31:28,850 --> 00:31:29,660 remain balanced. 496 00:31:29,660 --> 00:31:31,220 And indeed it does. 497 00:31:31,220 --> 00:31:33,890 And let me point out, by the way, that I don't have to be 498 00:31:33,890 --> 00:31:37,480 very careful about exactly where I position the glass. 499 00:31:37,480 --> 00:31:41,770 And furthermore, I can change the overall system even 500 00:31:41,770 --> 00:31:47,480 further by, let's say for example, pouring a liquid in. 501 00:31:47,480 --> 00:31:51,540 And now let me also comment that I've changed the physics 502 00:31:51,540 --> 00:31:52,200 of it a little bit. 503 00:31:52,200 --> 00:31:55,920 Because the liquid can slosh around a little bit, it 504 00:31:55,920 --> 00:31:58,440 becomes a little more complicated a system. 505 00:31:58,440 --> 00:32:03,650 But as you can see, it still remains balanced. 506 00:32:03,650 --> 00:32:08,270 Now, if we really don't want to be too conservative at all, 507 00:32:08,270 --> 00:32:11,022 we could wonder whether, with the feedback constants we 508 00:32:11,022 --> 00:32:14,290 have, we could, in fact, balance the 509 00:32:14,290 --> 00:32:15,450 pitcher on the top. 510 00:32:15,450 --> 00:32:21,000 And, well, I guess we may as well give that a try. 511 00:32:21,000 --> 00:32:27,270 And so now we're changing the mass at the top of the 512 00:32:27,270 --> 00:32:31,200 pendulum by a considerable amount. 513 00:32:31,200 --> 00:32:34,890 And, again, the system basically can respond to it. 514 00:32:34,890 --> 00:32:38,090 Now, this is a fairly complicated system. 515 00:32:38,090 --> 00:32:40,420 The liquid is sloshing around. 516 00:32:40,420 --> 00:32:44,210 We, in fact, as you can see, have an instability right now, 517 00:32:44,210 --> 00:32:45,770 although it's controlled. 518 00:32:45,770 --> 00:32:49,060 And that's because the physics of the dynamics has changed. 519 00:32:49,060 --> 00:32:53,130 And we can put a little bit more mass into the system, and 520 00:32:53,130 --> 00:32:55,505 maybe or maybe not that will cut down on the instability. 521 00:33:02,060 --> 00:33:02,300 OK. 522 00:33:02,300 --> 00:33:06,050 Well, in fact, what happened there is that we increased the 523 00:33:06,050 --> 00:33:09,150 mass at the top of the pendulum slightly. 524 00:33:09,150 --> 00:33:12,020 And that provided just enough damping to 525 00:33:12,020 --> 00:33:13,270 stabilize the system. 526 00:33:16,480 --> 00:33:17,030 OK. 527 00:33:17,030 --> 00:33:22,870 Well, with this lecture and this demonstration, this 528 00:33:22,870 --> 00:33:25,310 concludes this entire set of lectures. 529 00:33:25,310 --> 00:33:28,270 It concludes it especially if the pitcher happens to fall. 530 00:33:28,270 --> 00:33:34,040 But, seriously, this concludes the set of lectures as we have 531 00:33:34,040 --> 00:33:36,180 put them together. 532 00:33:36,180 --> 00:33:41,880 And let me just comment that, as a professor of mine once 533 00:33:41,880 --> 00:33:45,750 said, and which I've never forgotten, the purpose of a 534 00:33:45,750 --> 00:33:48,470 set of lectures, or of a course, or, for that matter 535 00:33:48,470 --> 00:33:53,260 anything that you study, is not really to cover a subject, 536 00:33:53,260 --> 00:33:55,760 but to uncover the subject. 537 00:33:55,760 --> 00:34:01,980 And I hope that, at least to some degree, we were able to 538 00:34:01,980 --> 00:34:05,020 uncover the topic of signals and systems through this 539 00:34:05,020 --> 00:34:07,240 series of lectures. 540 00:34:07,240 --> 00:34:12,679 There are a lot of topics that we got only a very brief 541 00:34:12,679 --> 00:34:14,010 glimpse into. 542 00:34:14,010 --> 00:34:18,290 And I hope that at least what we've been able to do is get 543 00:34:18,290 --> 00:34:21,280 you interested enough in them so that you'll pursue some of 544 00:34:21,280 --> 00:34:23,020 these on your own. 545 00:34:23,020 --> 00:34:27,699 And so I'd like to conclude by thanking you, both for your 546 00:34:27,699 --> 00:34:29,159 patience and your interest. 547 00:34:29,159 --> 00:34:33,130 And I hope that you have enough interest to pursue some 548 00:34:33,130 --> 00:34:34,469 of these topics further. 549 00:34:34,469 --> 00:34:35,200 Thank you. 550 00:34:35,200 --> 00:34:36,760 FILMING DIRECTOR: Okay. 551 00:34:36,760 --> 00:34:38,010 That's a wrap.