OK.
I hope that you have already have a clear idea about robust control.
We have seen how simple and effective was its technique to make systems stable and robust asymptotically
stable.
However, until now, we did not consider estimations in the parameters or external disturbances, which
are the key problems that we want to solve with the robust control.
Let's now try to include these effects also and see what kind of problems we have to handle.
Firstly, as I have said already, we have to consider some practical cases because, as you know,
practical cases are always different from ideal conditions.
We have to consider Consi the uncertainties in the system, then we have to consider external disturbances
that can exist and effect the system.
And finally, but important when considering the keys, when the sliding surface we have chosen is not
intrinsic to the system, but it is impulse to the system by us.
Robust control technique has been developed to solve these issues, and it can handle all of the above
problems easily.
But we have some constraints that we have to obey in order to get effective robustness against disturbances
and also uncertainty in parameters and also the problems when we will undergo during imposing sliding
surface.
First, the value of the disturbance has to be bounded.
Yes, we may not know exact valley of the disturbance, but we have to know the upper bound for it because
robust control reject disturbances by applying much higher input than the value of disturbance.
Otherwise, the symbols would be greater than the input and input control will not be effective against
disturbance.
So we have to know the upper bound of the disturbance value to design input control.
Additionally, the rate of change of the disturbance has to be bounded.
Also, we will see why this is important in the next lesson.
But keep this condition also in mind.
So we have said we have to consider some practical cases that we have mentioned above.
These considerations will require a robust controller to apply additional input control even when the
trajectories of system states are over this sliding surface.
Because disturbances and inherent sliding surface will cause the trajectories to deviate from sliding
surface and additional control input has to be applied to keep to keep them over sliding surface.
Then these considerations will also cause a significant problem.
That is one of the biggest, biggest drawbacks of the robust control, and this problem is chartering.
We will see this problem and how to decrease its effect, as we have done in previous lesson.
The best way to understand these concepts is to take an example.
Here was the example dynamic system that we will analyze here.
Safety is nothing but external disturbance and duty is nothing.
But the control input system is second order dynamic system and its asymptotically stable as long as
a and B coefficients are greater than zero.
So you can ask this question here, OK?
But our system is older than some thought goes stable.
What do you want from it?
Yes, it's asymptotically stable, but we have to concede there are two cases here.
Firstly, it cannot be stable.
It mine might not be OK.
It may not be stable when there is disturbances and uncertainties in the parameters, as we have seen
during the introduction to the robust controller.
Secondly, we may want different kind of convergence dynamics.
Yes, we may want it.
What if we want faster convergence to the origin or slower convergence?
We can make it possible by imposing new sliding surface that represent desired dynamics, and we will
derive start to drive state trajectories to this surface.
OK, let's convert the system into state space form so we can draw its face, blood and on the low stability
properties.
Before doing that, I want to note one thing here is the system diagram with input you and disturbance
see and plant of GSI, which is our system.
Here we can see some disturbance and input term you to get new input term of you, dash.
We will use this as an input to our system.
So let's get the system in state based form.
First, we will define X one and X two as y and derivative of Y, then the right y double dot into y
double.
In terms of X one and X two states after that, we can write equation in states based form where we
can obtain A and B mattresses.
And here is the output equation from which we can determine see matrix.
OK.
We converted the system equation into stable, excuse me, into state space form.
Now we can drill phase of the system and analyze it.
Let's switch to MATLAB in order to realize that, OK, after we have got a matrix, let's say we converted
our system to state space form.
Let's analyze the first portrait of our system.
We will take our input you and also disturbance as zero.
So that's why View X not equals the X plus b you.
But as we don't have you or our you, that equals to zero because we say that in this case, we will
choose you as zero and disturbance as zero.
So this will have on the X slot equals a X.
So let's see what's happening here.
As we have said, we will choose our A, B or F issuance as a positive definite and OK.
I mean it indefinite in order our system to be asymptotically stable.
OK.
So you will you can ask, what's what about this C?
C?
Don't worry about that.
We will see in a minute.
This is for sliding surface.
OK.
The conversion for sliding surface.
So I will also draw here this sliding surface that we will choose in the next minutes.
OK.
So this is for sliding surface.
OK.
Let me call that, uh, core efficient of, uh, sliding surface.
OK.
So this is our a matrix.
OK?
I cannot to explain this too much because in previous listen, we have seen about the phase plots.
So our a matrix.
OK.
This is the time span and we will simulate our system.
And you can ask all of these angles.
I will do initial conditions as a let me show you in this, as you can see the initial conditions as
in round the weight of the inner circle.
So that's why I need angles in order to draw the initial points.
So choose the initial points as a circle, OK, with radius of two from the center, I mean, zero zero
point OK.
And here, as you can see, if we get our initial conditions by there, this is nothing important here.
We just x by coordinates for the initial conditions.
OK, in a circle.
CMOs t to and our customers T to in order to get X and Y angles.
Mm hmm.
OK.
After we have got our initial conditions, OK, this is our initial conditions that we weren't OK with
x y coordinates.
If you want, we can see it in this way.
Let's run it and here we will stop.
And let's see what's our initial conditions.
OK?
As you can see, this is x y x y x y for each of the initial conditions.
OK, so let's quit it, and let's continue.
So here we are creating new figure and we will, as in the previous case, we vote for each case, for
each initial condition, the system trajectory, OK, stay trajectory.
So we start from one and until two, the four looping over each of the initial conditions.
We again use all the F45 to simulate our system dynamic system.
We give it the time span, initial conditions, OK, and then we then extract, extolled and extend
out.
In this case, it will be shortly y o y de out, OK.
Um, and so X1 and X2 states OK.
And we will plot them with black color, and then we will put those initial conditions OK.
And here what I am doing.
I'm calculating the eigenvalues.
And after that, um, what I am doing is just to throw this eigenvalues here, as I have said previously,
and also the imposed the sliding surface.
OK.
And here are the derivative function to calculate the UM in order to calculate which will be which will
be used inside or the effort, you know, with our system.
So our extrude equals the eight times x.
Okay, perfect.
Not before doing anything else.
Let's analyze our system.
We have said that if we choose a and B positive definite OK, we will have us in particular stable system.
Let's see if we have.
OK.
This is our aim ethics and let.
See our eigenvalues.
OK, let me just do this is like a this eigenvalues equals to egg is OK.
Eight.
OK.
As you can see, this is our eigenvalues.
As you can see, we have two eigenvalues with negative real part.
So our system should be asymptotically stable one that there will not be any oscillations.
I'm OK because there will not be any.
They don't because I mean, these are not complex.
OK, let's see.
Let's on the West, I can, as you can see, if one eigenvalues absolute value is higher than another
about another eigenvalues, absolute volume.
As you can see in the dynamic equations solution, these eigenvalues will be over the exponential OK.
So these eigenvalues absolute value determines how fast the system will converge.
As you can see, we have to eigenvalue, so we will have to eigenvectors OK, corresponding to this
eigenvectors.
OK, this one and this one, I mean, this is the coordinates for like a vector or this like vector
belongs to the first eigenvalue and this eigenvectors belongs to the second eigen value added over this
eigenvalue, the convergence will be faster.
Why?
Because I mean, over this eigenvectors, the converges in the direction of this ikem vector will become
a Commodus will be high at Y because of the M.
Absolute value of the eigenvalue in this case is higher.
Corresponding ogunmola is higher, so exponential or minus five will cause minus five times t ok.
E over minus five t is the convergence will be faster than E or minus zero point three T.
OK.
So over the first eigenvectors, this convergence will be slow.
Over the second eigenvectors, the convergence will be higher.
OK, let's now see what will happen.
What's our diagram?
As you can see, this is our phase plot.
This red line is imposed sliding surface.
OK, as you can see, this is not
intrinsic to the system because as you can see, it is this sliding service is different from the eigenvectors.
You can see it.
Red eigenvectors, OK?
And the interesting sic.
Let's look at this, OK?
The interesting thing is here, as you can see, the convergence is very high in this eigenvectors because
this Feigen vector, OK, as you can see, this eigenvectors corresponds to the eigenvalue with higher
absolute value.
OK.
So that's why, as you can see, the convergence or it is very hard boiled, the second one is lower,
OK, it comes the convergence or the second one or this one is slower.
And finally, over this eigenvectors, it converges to the zero.
Well, OK, you can see the same in this way.
The direction over this eigenvectors, which has higher absolute valley, which corresponds to the higher
ups.
Well, the eigenvalue and the convergence rate is higher or higher in this India.
For this eigenvectors, which corresponds to the lower absolute valley eigenvalue, the convergence
rate is slower.
So as you can see, our system anyway is asymptotically stable because it converges to the zero.
OK.
So let's now try to change the values and let's see something different.
OK, let's now give eight and give them to the excuse me, fifteen, OK.
Fifteen to the be core efficient.
And now let's first.
Unless as we as this positive definite our system A and B questions are positive.
Definite, I mean, they are higher than zero.
Um, the system should be asymptotically stable.
And let's check that.
And as you can see, if we do this and let's check again, like a menu of a as you can see, we have
eigenvalue of minus three and minus five with negative real parts, so our system will be asymptotically
stable.
OK.
And let's check what will be the face of our system.
OK?
Here is an interesting phase plot we have.
Okay, let's make them bit like, you know my -- because I'm there, but maybe we don't need it's
enough today.
OK?
As you can see, this is our import sliding service and this.
Are a different eigen vectors, OK?
As you can see again over.
That's OK, we have cleaned it, but as our one of our eigenvalues is higher than the another in terms
of absolute value, the convergence reigned over.
Erm, the one which has higher absolute value will be higher than the other one.
OK.
But anyway, our system is asymptotically stable and it converges to the centre.
Let's check what will happen if we give negative values so our system has to be unstable.
OK, let's check first eigenvalues.
OK, let's check first eigenvalues and let's see what we will get.
OK?
As you can see, our eigenvalues has positive neutral parts.
OK, so well, what does it mean?
It means that our system will be asymptotic.
Excuse me, unstable.
Let's look at the first plot.
It's interesting for me.
OK, now, as you can see, our trajectories explode to the infinity.
As you can see, they are starting from this initial conditions and all of them are exploding.
Can you see it?
They are exploding to the infinity.
They are not converging to the zero because our system is not asymptotically stable but unstable.
OK.
And you will see that even when there when we apply the robust control or even our system is unstable,
a robust controller will help will make the system asymptotically stable, as we have seen previously.
OK.
Hmm.
OK.
Let's continue with our presentation.
As we have said, in order to implement robust control of successfully to conditions of A and B have
to be met.
We can formally these two conditions like that we are dealt a zero and delta are the bones up her bones.
As always, our goal is to make the system dynamics to be asymptotically stable.
Let's choose the sliding surface, which is given like that.
C has to be greater than zero because otherwise sliding surface will be unstable dynamics.
Let's see how we can write sliding surface equation in this way.
If we solve this simple or the E or differential equation, we will get y as this.
From this formula, you can clearly see why converges only when C is positive.
So a sliding surface B have imposed provide us asymptotic stability and form the formula.
You can see that we can control convergence rate by controlling the value of C parameter.
Here are important things to note about sliding surface we have chosen from the Formula one point zero.
You can see that sliding surface doesn't include anything related to the system parameters that can
be uncertain.
It only includes Parameter C, which is controlled by us so we can control desired dynamics by changing
parameter C and get faster or slower convergence rates.
And the uncertainty will not affect the sliding surface dynamics as it doesn't include.
These parameters and disturbance will not affect if we have obeyed conditions A and B, so we achieved
robustness in control.
However, sliding surface here is not intrinsic to the system dynamics because we have imposed its source.
The trajectories will try to leave sliding surface and we have to apply continuously control input in
order to keep them in the sliding surface.
OK, now the important question after choosing sliding surface is how to design an input control that
will drive state trajectories to the sliding surface and keep them over a sliding surface.
Let's plot aerodynamics here in the plot.
It is written Accent X thought, but please replace them with E and E Dot, where E is nothing but the
difference between Y desired OK, which we will see.
For example, if y desire to be something, for example, to read, you will see in my simulation much
more clearly.
Y desired and y and e dot is difference between y of desired and wider.
So we want aerodynamics to convert zero.
Not why?
OK, we want E to converge zero, not y to converge zero because we want y to converge to y desired
and in order to y to converge to y desired e should converge to.
Zero, because he is nothing but why me, why decide minus why?
OK, let's assume that trajectory is in positive, but so we have to apply input to get it back to the
sliding surface.
The scene is when the trajectories in negative part of the negative region and the input to drive it
to the sliding surface again.
The control input of you is given in this Formula one point one.
Will this input wheel drives the trajectory into the sliding surface successfully?
Here, ASG end function is signaling function, which returns one if it is positive, minus one if it's
negative and zero if it is zero.
You can see why this input is effective by just finding solution to our example dynamic system, which
we have seen.
OK, how to find this solution?
I'm sorry you can do it.
Even with MATLAB, it's very easy.
If you cannot, please notify me and please write me and I will write it.
For you, OK?
Even the best ways I will attach the solution for it into the paper.
And I will attach to this video.
So you will you will see that, OK, you will see that if input is positive, it will increase whi,
which will make it to reach wide.
Yes, because firstly, we will start with Y, which is less than zero.
Oh, OK.
And so the aerodynamic or error trajectory will be in the positive side.
So we need to increase VI, so we will choose you as positive.
So it will increase y so y will reach to the Y d, so it will also error trajectory will decrease to
zero.
And when you is negative, it will decrease y, which will make it again closer to divide when it is
higher than Y, then, as you can see from Equation 1.1.
Control input is like switching action, namely it jumps from K to minus K and opposite, depending
on which region is the trajectory and based on condition A. We will choose the value of K, which has
to be higher than bill to zero new upper bound of disturbance.
Be careful about that.
We will see what will happen if we not obey this condition.
Let's jump to the MATLAB and analyze the controller.
OK.
Let's continue with the MATLAB and try to see how we will simulate our controller robust controller
that we have developed.
OK.
So here I have written what I will do.
I have to show to you.
So it's not related to this is our code.
We have done in the previous lesson how to do the controller.
And as you know, we have done the general controller part in the Symfonisk and we have used this month
of script and MATLAB script for the plotting, the output potatoes and we will do the same here.
So let's see how we developed the controller.
As you can see, this is our state space.
This power plant dynamics system, which was described by example both plus a extort plus uh yes.
Extort, excuse me, my double dose plus avoiders plus b y equals the you dash, which was the sum of
society.
I mean, it was beside the disturbance, plus you, our input controller.
So let's write each of these.
We have seen how we will.
What was our.
That is our so repeat this source.
See, yeah, we want to see both X1 and X2 states of the output and D will be nothing but zeros and
initial condition as an initial condition.
Um, we have put, uh, zero zero.
OK.
So we will always start with y zero and y equals the zero.
OK.
Because our initial condition zero zero.
So then we get the outputs.
I mean, X1 and X2 here, the output states, OK.
And what we will try to find here is we will try to control, okay, this is the interesting part.
We will know, eg try to control the error dynamics again, not directly the system dynamics itself.
I mean, y double dose plus, uh, a white dot plus um b b y x.
Yeah, be y.
But we will get here the error of the system and we will use this error in order to calculate our,
uh, to calculate our um sliding surface OC in and calculation of our sliding surface.
OK, and after that, if you will give this as an input to our system, OK, as we have done in the
previous case.
So a sliding surface we VE imposed.
So what we have done, we have defined our sliding surface as what sliding surface us vi plus c y equals
the zero.
Yes.
And we have said that if C is positive definite, then our system will be our sliding surface will be
asymptotically stable.
Okay, perfect.
But in this case, what we want to make the
asymptotically stable our error because, for example, we will give that OK, I want our y desire to
be, for example, to.
So now hope we will know that we have reached why desired by doing by by dropping this plot of not why,
but our error, OK?
And yet we will become and plot our way also.
Yes, but we will generally throw our error phase plots or we will see that what happens with our y
minus y desired OK and with y not minus y desired.
OK.
So if we reach our desired point or not?
OK, if error reaches zero zero.
OK.
If error reaches zero zero, what does it mean?
Because we want error dynamics to be asymptotically stable, OK, because we don't want y to be asymptotically
stable.
Because if because y desired, for example, will be two and not equal to zero, then at the same trajectory,
uh, for example, y has to converge to two and not zero.
OK.
But would we want to be zero E's aerodynamics?
Because if E and it becomes zero, then our Y will reach a wide and Vidot will reach y desired thought
OK design.
We will get desired position and desired velocity or something else where what y means it depends on
the situation.
OK.
I hope that I may.
I could make it clear for you.
So here we will conclude our error how people calculate our error.
We have avoided at the output of our system, OK, because x one was y and X two was y dot OK.
After that, we are just subtracting y the subsets abstracting away from Y and avoid the I mean, this
is y desired dot of y dot desired minus y d on in order to calculate E and e dot again.
And we will miss now.
We will combine them so by a vector come Canongate under the will give us an output, our error output,
which we will throw in the phase plot.
OK.
So and then what we will do is we will give this one in order to calculate our sliding surface.
What was our sliding surface?
Our sliding surface was y dot plus my equals to zero bust.
But in this case, instead of why we will have error because we want aerodynamics to go to zero.
Yes, because we want e note plus c e equals the zero.
OK, be careful about that.
We want aerodynamics to go zero b we don't want y to go zero.
B we want y to go to y desired.
I'm sorry that repeating this, but I want you to be careful and I want you to understand it.
OK.
I hope I can explain to you it clearly.
OK, then what we are doing instead of why we have E here.
So why c will be e times C and we will summit instead of why don't we will have e dot Aviva's sum here
together and we will get here in e dot plus c e equals to zero.
OK.
And this will be and what we have said about our control algorithm vs say that our controller control
algorithm will be you will be input will be equals minus key times.
Signal function, yeah.
And assign function of X as a sliding surface opposite to the sliding surface direction.
OK, so we get here, as you can see sine function, OK, and we multiply by K.
As we have said previously, we multiply by and this is our input and this is our sliding surface here,
OK?
We draw our sliding surface here and we draw our input also here.
OK.
You just give it as an input to our system.
Here we also have disturbance term.
OK.
This is a step disturbance.
OK.
So for example, we will define here at which time, for example, if our simulation is two seconds,
we will say that OK.
At one second, OK?
So a zero at one second, please apply with this amplitude.
I'm sorry with this amplitude step function with sampling time of SW is that this is the sampling time
of our disturbance.
OK?
Uh, don't worry about this one.
OK.
And this is just in order to get, um, beautiful.
How can I say beautiful step function?
OK with our how higher a lower sample time, OK?
Our sampling frequency will be higher, and so we will sample our step function in a better way.
OK.
And this is no advantage.
Let's then just go to that.
Go to our simulation plotting here.
And let's start by making this one.
First of all, we will define our eight as eight as 15.
OK, so these are positive, definite.
So our function, I mean, our core efficiencies are positive.
And so our system will be asymptotically stable, OK?
And C equals the 10.
We don't we do it in our sliding surface to be asymptotically stable.
So our error will converge.
Aerodynamics will be asymptotically stable.
Our key is one step and look at here we have white desire equals the two.
Again, we want our why variable to go to why desired of two.
OK.
And we want our why don't desire to go?
Excuse me?
Why not to go to y to decide which is zero?
So this is no problem because our initial conditions were zero zero.
So my desire that will not change and the vivo added no disturbance.
So let's make it zero.
We don't want any disturbance, OK?
And this is our some control of sampling time.
We will talk about it.
And let's simulate our function.
But before simulating, let's well, let me talk about one thing here, and we put our desire to avoid
S2, so we have to
give some additional game.
OK, so our one part of our key will be to use the in order to achieve this y desired.
OK.
Why?
Because of this one, let's say this is our dynamic system.
OK, not.
Let's say this.
This was our dynamic system.
Let's get its transfer function, how we can do that.
We will first dollar plus transform.
Then our transfer function was G equals the y-yes over us, where y is our output, you is our input
and we can get our GS equals two from this equation.
By manipulating, we will get these equals the one or s squared plus s plus b and the hope we can find
our the C game of our system by its transfer function.
B by just putting instead of s, we put this zero and we get what's our um?
And it transfer function again is one or b again so we can write what we can write our output, what
we want our output to be or we want our output to be two.
Yes, divided by let me just what's our gain was run over B, which we can write one over our gain.
In this case, our B is 15.
Yeah.
OK, let's just plug these numbers like that one.
Our B is, let's put it in a symbolic way and we will change.
So one of the B, which our game equals two to not two.
This will be why desire?
OK, which one we want to give y desires over our input?
OK.
Like this?
So from here, you can see that in order to achieve what we want to achieve is instead we want to achieve
here.
Two.
Yes.
Why we want our Y desires to be two.
So what we will the right one overall.
What's our B?
It's 15 equals the why this was our why design is to divide it by u.
So from here, we will see that our u equals the surface.
So just serve two of our inputs.
OK, which is our input in this case is 150.
OK, 150.
The certainty of this 150 will be used in order to get up in order to get the video of two.
OK.
So in order to make the error to convert to zero, if our input would be less than this, for example,
twenty five, then we would not have enough input in order to make y desired in order to achieve our
desired.
OK, be careful about that.
But as we have 150 and as we have no disturbance, OK, because disturbance also can.
Also, we'll take something about, uh, from the K, our input.
OK, as we are, disturbance is zero.
We will just use our input to achieve desired vida.
OK, so let's simulate our system and let's see the drawings, OK?
You know, as you can see, our system is this is error time and this is e dot and this is E!
OK, so.
Is here today, as you can see, both of our error and error thoughts.
So velocita error and I mean my velocity error, I mean, why not?
OK.
And there why both reaches to the desired value?
So because our E is zero, this means that we have achieved aerodynamic.
Excuse me, e d of E of zero.
OK.
And we have achieved e d of zero.
As you can see, we are starting from here as you can see our error.
And what was our Y design?
Our y desired was to OK, what was our initial point?
That was why it was zero?
Well, what's our initial error?
It is two.
And let's see.
Yes, it's to our E is two.
And as our initial velocity was zero and the Y desired dot is zero zero one zero view, this will give
us e dot of zero.
So we are starting from zero two or two zero and we are converging and they're converging to this zero
zero.
I mean, asymptotically stable.
Our aerodynamics is asymptotically stable to the origin.
This is our sliding surface.
As you can see, it starts from, uh, twenty.
OK, why start from today?
Because what was our um, what was our sliding surface equation?
It was white dot plus c y OK.
Initially white, it was zero over.
C is 10.
And what was our initial y point?
It was two.
Yes, two times 10.
It's 20 and then it reaches to the zero hour sliding surface.
Why?
Because we want our sliding surface to have zero value.
OK, so that's why we have reached to the zero.
That's perfect.
Oh, OK.
Excuse me, I have closed.
Oh my gosh, not this one.
I have closed the one important figure.
I don't.
When I do the OK, I don't want it to be closed.
Yeah, we can close this one.
OK, the important thing is our input.
Let me take a make a bit bigger.
OK.
You can see here, and let's put them here, and let's compare what's happening here.
As you can see, we are first applying 150 constant input here and the 150 because our trajectories
is on there, as you can see positive side of the sliding.
So these are sliding sims on our trajectories one 50.
So our input doesn't need to change.
OK, it comes columns.
Collins comes close to this sliding surface.
OK, so that's why it's constant.
OK, 150 is our input OK?
What happens?
Then what happens?
Then it switches to that.
You know what happens?
It directly switches to that.
Where it switches, OK, then OK, it's in here is sampling.
Time is high, so it's not.
Excuse me, it's something flick was this high something time is low.
So as you can see, then maybe I can make it clear for you.
I me this one, as we have said before, as there is something frequency is finite, that there will
be chattering filament, OK, and so input will make the as we have reached a sliding surface, the
input will make the trajectory to leave a bit a little bit.
We cannot see it a little bit the sliding surface.
So that's what input will directly change.
Its input will change its switch to the negative 150, OK, and it will start to oscillate as we have
seen input will input.
Not only input will make switching OK act.
It is less accessible as you can see it switching action.
Yes, because this is yeah, as the frequency sampling frequency is very high.
So you see it in a solid way, but it is not solid.
It's very little little little squares, OK, like square squares, signals, OK, because it switches
from 150 to minus 150, 160 to minus 150.
There is chattering cinnamon because our inputs excuse me, our sampling time sampling frequency is
not infinite but finite.
OK, you can see the chattering here more clearly, and we will see the show this um, in a minute much
more clearly, we will talk about it anyway.
We have seen this one also.
Oh, OK, we I think we have talked about this and there, as you can see, we are going to the region
where the front OK, here, if you reach the sliding surface at this second, OK, and then we are starting
to just switch.
So let's continue.
OK, what is that?
Oh.
This is what we value, as you can see, our way values starts from zero and it reaches where we desired
off to.
If you want wide desired wealth to OK, this is our error error converges to zero.
Uh, okay.
So now let's let's take this example.
What will happen if we put a disturbance of minus 40, for example, we put a disturbance of minus 40?
Yeah.
What will happen if you put a disturbance of minus 40?
Let's just run this and it will.
The disturbance will be applied one second at one second, OK.
So overall simulation is to second and at one second.
At first, second, the disturbance will be applied and our gain is still 150mm.
Let's see what will happen.
Um, as you can see, we have achieved perfect result.
OK.
Why?
Because the robust control of it is enough, OK?
We have forty four disturbance and we use also 30 of the input for the for the what for.
In order to achieve the desired of two.
So just 70, our input has to be so our key has to be greater than 70.
In order to achieve what we want and as it is greater than 70, we can achieve what we want.
So as you can see, disturbance doesn't affect, didn't affect the stability of our system and our error
converges to zero without any problem.
And let, OK, let's continue.
Then let me just show the this is the way it reaches to, as we have said, no problem with this one.
OK.
This is our as you can see our error of the excuse me, our disturbance.
At one second, we apply the minus 40 of disturbance, OK, and this is error which reaches to zero.
OK.
To zero.
And um, this is just our sliding service.
As you can see, we are reaching here.
The sliding surface of zero is not a problem.
OK.
So, um, let me show you let me just make it in 40 and let's see what will happen.
And this should not be anything changing.
OK?
As you can see, there is nothing.
Nothing changed.
Again, um, everything works as expected, and this is our again input.
Until here we are trying to reach the sliding surface.
And then you switch switches happen.
And as you can see, the switching action increases when disturbance is applied.
OK, and we need more switching in order in order to get rid of the disturbance, OK?
The switching happens more OK because it deviates the trajectory more so.
That's why we have this action lit under.
Let's see what will happen if we make our game less than 70, for example.
Let's make it fifty.
OK, let's check it now.
What will happen?
So our input is not enough.
It's less than 70.
OK, so let's see what's happening.
And as you can see, our trajectory not reaches their origin, but it deviates from it.
OK?
Our aerodynamics deviates from that.
It's not asymptotically stable.
OK?
It hurts and becomes unstable because error.
Excuse me.
Because again, key can is not enough to get rid of the disturbance.
OK.
This is our why.
As you can see, it reaches two, but again, it deviates from it because um, and the gain is not enough
to get rid of the disturbance.
OK?
OK.
As you can see here, why is reaching to at almost one second?
And the applied disturbance at one second, and as you can see it, deviates from it.
So that's why the input is like that, OK?
It because it deviates to the as I have closed it here.
Oh my gosh, I'm stupid the way I did closed.
But anyway, you have seen that the trajectory was deviating toward where to the positive side.
So it applies that game in order to get rid of it, in order to make it back to go back to where to
the sliding surface of.
But it's as you can see, the trajectory continues to deviate because the input is not enough.
Okay.
So always remember our gains should be enough, so it shouldn't be higher than the absolute value of
our total disturbances.
OK, let's do it now.
Our system unstable again by putting minus eight here and making it again one shift.
OK?
And let's make the disturbance a zero.
OK, we have band disturbance zero.
Let's check what will happen.
Our system, as we have seen this previously in previous video, we have seen that this will be as a
equals.
The minus eight equals the minus eight.
Our system will be unstable.
And let's see if robust control is enough to make our system stable.
Yes, as you can see, our system became stable, OK?
As you can see in the.
Input make it a game converts to this zero zero, so our aerodynamics is asymptotically stable, OK,
and this is our sliding surface and this is our input, as you can see this our input again, it switches
very fast in order to make the
drive, the trajectory or to the sliding surface, OK?
As you can see, our error converges to its thrust from took because our way deep first these two and
it converges to zero as time passes.
OK.
So as you can see and hear, even in the system is unstable.
Our aerodynamics became stable.
We make our aerodynamics asymptotically stable using using robust control techniques.
Perfect virtual sliding surface and designed control input.
But we have to analyse this controller in two cases.
Why?
Because our control input is like switching action.
Let's go deeper and you will understand what I mean.
First, we will analyse system in continuous the mean which is ideal, namely control action.
You, in other words, switching action computes in an inside night frequency.
In other words, as the system and the system is continuous, sampling frequency is infinite and we
can detect the deviation from sliding surface instantly and input will change based on that instantly.
And so deviation will be corrected instantly.
So we will have zero oscillation at output variable y because it's always over a sliding surface.
But we control the robot with controllers, aren't we?
And they have finite something frequency as they are discrete time systems.
Now we have a problem.
France, a sampling frequency is finite, switching action commutes in a finite frequency, so trajectory
deviation from sliding surface is detected late and the corresponding action is taken late.
And this latency depends on the sampling time of the controller.
So we will have non-zero amplitude oscillations at the art variable.
Why this is called chattering phenomenon, and we will analyze it more deeply in a minute.
The amplitude of these oscillations is proportional to the gain K in the control, input and sampling
period T, as depicted in Eq. one point two.
This is because as gain K is, a higher trajectory will be directed to the sliding surface faster with
higher energy and it will reach pass sliding surface more.
If you add to it also slow sampling time, then the situation will be worse because the deviation from
sliding surface will be detected late, so oscillation amplitudes will be higher.
Think it in this way instead of trajectory, you put yourself in the plot.
If you are in positive region, your friend will push you towards the negative region and your friend
has something to add in each sample time.
It will check in which region you are and will take appropriate action.
If he pushes you with high power, then you will reach faster.
The sliding surface But as sampling time of your friend is finite, he will not be aware that you have
reached and passed the sliding surface in the next sampling.
He will check and see, Oh, you will have reached and lift the sliding surface and he will switch and
push you toward the opposite side.
If you gently push you instead of high power, then you will leave less the sliding surface during the
given sampling time.
So less sampling time and lower m k are better.
Excuse me, by less sampling time?
Yeah, I mean, unless something triggers a high frequency.
So, uh, the latency is low.
But why we don't always choose lower.
This is because of condition.
A K has to be higher than the disturbance upper bound.
If disturbance is high, then the K will be high also.
And in order to have less sampling time, you have to invest more money and get more powerful controller,
which will also surely consume more power.
Let's try to understand charging better by visualization.
Here is the plot and initial condition.
We start to drive state trajectories toward sliding surface until they reach it.
However, because of finite sampling time again, by finite, I mean greater than zero.
OK, sampling time control.
Will still apply, control, input and so tragic that trajectory will leave the sliding surface sampling
time reaches and controller checks in this region is a trajectory and sees that it is in negative region,
so it switches and pushes the trajectory to the other side.
But again, due to the finite sampling time, it continues to apply input even after the trajectory
reaches the sliding surface, then the same thing happened as before, and it continues like that until
it reaches to the origin.
You can see the chattering in the plot instead of smoothly going to the origin.
Now, let's see what happens if we increase sampling time again.
Input drive trajectory again, input drives trajectory to the sliding surface, but because of finite
sampling time, controller continues to apply.
Input and trajectory leaves sliding surface as in this case, sampling time is higher.
Deviation also becomes more.
After sampling, time reaches control of chips and sees the trajectory is in negative region, so applies
opposite input and again, because of finite sampling time.
Trajectory reaches the sliding surface and leaves it and the process continues like that.
I didn't throw fully, but you understand what will happen.
It will converge to this until Odigem.
If we summarize as key becomes larger, oscillation amplitude at the output also increases and sampling
time T increases.
Oscillation amplitude also increases at the output, so we want controller with high sampling frequency
chattering, indeed not avoidable problem and causes some problems like stream on the structure of the
robot because switching action could change in the direction of control inputs, but structure has to
be able to cope with that instant changes.
Additionally, this fast switching action will create noise because of changing actuators, so we have
to find some methods to handle this problem.
I mean, charging problem and we will see them on the next lesson.
Now let's jump into the MATLAB and observe chattering in practice.
OK, now let's continue with our chattering Fenimore and Feinerman and see what's happening if we can
say, yeah, what will happen if we change the our systems?
Something time or time?
How we can change in most of the sampling time, let's we will come here, we will go to model settings
and here you can make it the configuration solver and solver selection a fixed step.
You will make it not, uh, variables that are fixed up and you will hear will put your sampling time
OK, and it will define your sampling frequency because sampling frequency is nothing but one or sampling
period.
OK, and here is our controller sampling time.
OK.
Why I did this sampling time for input block because it has to be always less than the sampling time
of the FSD.
OK, so sampling time of the controller.
So let's see if it's at this sampling under.
Let's see what will happen with our chattering.
We have um, we don't have disturbance now is zero disturbance and our system is stable.
As you can see, this is, um, these are not interesting and this is our input as you can see how it
switches very, very fast.
As it seems, input seems to us as solid block, OK, because the sampling is very a sampling frequency
is very high, so our input commutes very high and you can see our output.
Why there is no chattering here.
Surely there is chattering, but it seems very smooth to us, OK?
And also, you can see it from here.
As you can see, it is very smooth.
There is like no chattering, but indeed there is chattering.
If we indeed let me again make it, maybe when I zoom, we can see the chattering.
But let me try.
Maybe we can see.
Yes, as you can see, there is chatting, but it's very, very small.
OK.
Let's now check what will happen if we decrease our sampling time and let's decrease.
Let's not stick with this one and make it run.
And let's see.
OK?
As you can see, it clearly can see.
Chattering, OK, as you can see, as our sampling time increases, OK, we increase before I say,
let's decrease, but I'm sorry this was a false word.
OK.
We are increasing the sampling time, OK, we increase the sampling time and as you can see, if we
can see clearly, the chattering Fentiman.
OK, here is that with OK, we even don't need to zoom.
We can see the chattering and also we can see the charging and output.
Let's see the output.
OK, OK, we can see the uh, oscillations at the output, OK?
And I want to show you also the input.
I forgot it, but let me show you the input.
As you can see here, the input is not as solid as before, OK, because it commutes now with less frequency.
OK, let's not check what will happen if we make it, uh, zero point zero one.
Let me increase the sampling time.
OK.
And let's check what will happen.
OK.
And we can clearly see here the chattering.
OK?
We can clearly see that chattering.
OK.
And you can see the input with your bare eyes.
OK.
And there you can see the oscillations at the output, OK?
As you can see, these are very high oscillations in the output.
OK?
You can see that oscillations at the output.
OK.
So as you can see how chattering affects to the UM, to our problem.
OK, so Sam.
So as a whole, sampling time affects our um chattering from.
I don't know if I am.
Let me just I didn't
try it, but let's check if we increase going to high.
What will happen if we get chattering phenomenon there, Sean?
Let's check.
OK.
And as you can see as you go, let's let's try it.
Let's try in this way.
OK.
This is in this way, OK?
Let's see what will happen if we decrease will be.
Will it be the same?
But you know, we will typically make with 150, and let's check.
OK, surely, surely you can see the difference, OK, in the previous case, as you can see the chattering
phone numbers much clearer.
OK, we could see with our bare eyes the chattering.
So as you can see the increase, the even, let's increase like that and see and we can see the OK as
you can see the chattering clearly, as you can see, it affects gain.
And also the sampling time affects to our to the chattering and it creates oscillations at the output.