So let's talk a little bit about what, say,
one specific controller might be doing.
OK?
So here's about the simplest control experiment
that I can describe to you that I
think we can understand at the level we're talking about it.
This is a pendulum, and this is the [? clamp. ?]
We're hanging this thing down.
And if we build this pendulum-- and we kind of have one here,
but it won't quite do what I want,
so it's going to-- but if we swing it,
it's just going to keep doing that.
And of course, my hand is moving.
Now, that's a free oscillatory motion.
So if you just let this thing go,
what would you expect the motion of this thing to be?
It's just going to oscillate back and forth like that.
Everyone agree?
You've seen a pendulum do this, right?
You've seen the clock.
[? We said ?] they're fairly low damping things.
Now, unless you're building a clock,
it's very unlikely that that's what
you want the pendulum to do.
You might want the pendulum to actually stop.
And say, OK, maybe I don't like the frequency of the pendulum.
Maybe I don't like the fact that it's
taking a long time to stop.
In fact, this may never stop.
So what I could do is design a control system right down here.
So we'll have a controller down here.
Which, if I could spell, would be something like that.
And then it comes around, and it generates a signal,
and it basically goes into a force device that's acting
right on this thing here.
So it goes in there.
So we apply a force, and we measure this displacement here.
So this-- call it delta x, how far apart this thing is
this way.
So I measure delta x.
It goes into my controller, and it comes back around.
So that delta x is essentially the error.
It's how deviated the pendulum is from vertical.
So maybe I should call this-- why don't we just call this e.
So if I were to go off and design a controller,
I can make I can make this thing PID.
So I can make this thing PID.
It's a little bit easier for now if we just talk about PD.
We'll just get rid of the I. It's a little bit
hard to see what that's doing this time around.
So you go off and design a PD controller,
and then make that thing behave well.
So one way to think about what that controller is going to do
is, in fact, if you had another pendulum that you built over
here-- there's the vertical, there's
the pendulum like that-- in fact,
the proportional feedback is doing feedback based on how
different this is from 0.
So what physical device are you aware of
that provides a feedback and force that's
proportional to a displacement?
Spring.
So in fact, the way to think about this
is-- this is the way we build it in class,
but actually, what it's doing is building
a spring that looks like that.
Again, here's ground, and there's a spring,
and that would be the stiffness ks.
So what is this device going to do?
Well, as this thing swings back and forth,
as this thing deviates from zero,
it's going to compress the spring
and generate a force that's going
to be in the exact opposite direction to what it did.
So if it swings over here, you get a force that way,
and it pushes it back.
If it swings over here, you get a force this way,
and it pulls it back that way.
And this thing here is exactly the same
as the proportional feedback down there.
They're the same things.
Now, how are we going to get the damping part of the PD
controller?
What is the physical device that you
can think of that generates a force that's
proportional to the rate of change of the displacement?
[INAUDIBLE] viscosity.
Yeah.
It's like a look dashpot or some kind of thing.
It's basically something that had the viscosity.
So it looks like a damper.
And I think the symbol for that is
something that looks a lot like a capacitor, basically.
So it's something like that.
And it will also be hooked up to there.
And that would have something that looks a lot like kd.
And so what happens is, as you're
moving in that direction, it generates a force
that opposes that motion, which is exactly
the same thing that this damper down here is going to do.
So if you wanted, and you wanted build a control system,
you can actually physically build
a spring in a dashpot system, show up with it,
hook it up to your pendulum, and then the thing
is actually going to oscillate.
And eventually, it'll slow down and stop.
That's a very limited way of building a control system where
you don't want to be constantly carrying a spring
and a dashpot around.
What you can do instead is, you do what this is doing.
You say, look, I'm going to measure this thing,
jam it into my PD controller, generate a forced feedback back
here, and then I'm done.
So here, I needed a sensor and an actuator,
and I implement the equivalent of the mass spring dashpot down
here.
It's in electronics.
It's inside the computer.
Whereas here, this is physically something
you could build that would actually be connected to it.
And so what's going to happen, in fact,
is that if you just had the spring like that,
you end up changing the frequency of this oscillation.
And if you add the damper like this,
then you actually change it so that it actually
decays down to zero.
So if we're lucky-- and this is the lucky part,
I will see how this goes-- Mark will be able to show us
this thing operating.
So Mark, you get set up.
Do you want the thing?
And I'll talk and wave, and when you're ready, just let me know.
So this is the pendulum.
You've seen it do that.
It has a propeller on it.
This is actually on autopilot.
This is why Marc is involved.
It's the autopilot he uses for his research that he built,
and he decided-- he claimed last Thursday
that he could do this in a day.
It took just slightly less than a day.
So he put it on here and just hooked it up to the thing,
and now we have it built.
So we can now use this as a controller.
So the control board is here.
I don't know if you can see it, but it's sitting there.
It's connected wirelessly to his laptop.
So he's going to be changing some gains.
You'll see in a second.
It'll be a PID controller.
And what we'll hopefully be able to show you is, if you just
did feed-forward control, what that would consist of
is turning the propeller on to a certain setting,
and it would just sit here, and you'd basically
want the thing to hover.
You can do that open loop, like I described at the beginning,
by understanding how much force you
need to apply to the propeller to simply get the thing
to lift up.
This is quite heavy.
You can see.
And it takes quite a bit of effort to lift it up.
So if you do that on open loop, you're just basically telling
this thing how fast to spin, and it
will lift up a certain amount, generating a certain amount
of force, and offset the weight issue, and then just sit here
and hover.
But it's not particularly robust.
You want to go?
Yeah.
All right.
Here, you take over.
Did you want to show the [? GUI ?] or--
Yeah.
OK.
So this plot here, you can actually
see where the thing is.
So this is just measuring the pitch angle.
And what we'll do is we'll zero all our gains-- so our PI an D,
like John was talking about-- and we'll start out
with a low throttle setting.
And we'll fire this thing up.
And as we go-- if we go higher, we can do what Jon was saying.
So if we knew exactly what we wanted-- so maybe 0.7--
so if you go too high, that's what happens.
So that's--
So that was open loop control, right?
Which is--
That's open loop control not working, right.
So if knew what the exact number was,
you could get the thing to hover,
and it would look like it's performing very well.
But if you guessed wrong, then you put the wrong number in,
and it actually goes and whacks your hand.
Now, the right number is close to 0.45ish.
Right?
So how do we know exactly what it was?
And that's trial and error, typically.
You can go off and do a lot of modeling,
but then you go into the lab, and it's like, OK, well,
oftentimes when you go into the lab,
you don't even know what sign to use.
So it's not particularly robust to disturbances.
But if you-- so--
So this is just proportional now, right?
This is just-- right.
So you can see some problems in just doing
proportional control, right?
So we're close.
But not quite.
So in average, we're close, but there's some steady-state error
and some--
[INAUDIBLE]
Yeah.
So some steady-state error here, and we get some oscillation.
So if we just increase our D gain a little bit,
we can get rid of those oscillations.
So you can whack it with your hammer,
like John was talking about.
And then the last term, if you increase
the integral term a little bit, that
will drive your steady-state error to zero.
And the rate at which all these things happen
depends on what you're gain settings are.
And then you can do stuff like actually
follow various commands.
And your response is a function of what those gains are set at.
Right.
And so what we'll be spending a lot of time on in class
is predicting what that response should look like.
And so that's your mental model of what you want.
I want a certain step response.
I wanted to go at a certain speed,
and basically get-- if I say step [? up ?] it,
you go at a certain rate.
And then the question is, how do you then
figure out what the gain setting should
be in your PID controller to get that kind of response.
And if you want an error-- you see the steady-state error
there is about maybe 1% or 2%.
If you wanted it a lot smaller than that, then
how much of integral gain do you need
to get that to be even smaller?
And so here, we're showing you a demonstration
of what the gains do.
The whole class is about inverting
that, which is, how do you design
the gains to get what you want?
So there's two parts to it that you have to put together,
and that's what we'll try to do in the class.
So sorry it took so long to get done.
We're probably done our bit.
If there's any last questions, please let us know.
OK?
Thank you.
[APPLAUSE]