 So, in the last lecture what we discussed was about describing functions and we saw the calculation of describing functions for two types of nonlinearity and what we will now do is we will look at how one can utilize this describing function to actually try and find out whether a given nonlinearity, I mean a linear plant with a nonlinearity, if in that given system there is a limit cycle and how one can utilize this describing function to find out if there is a limit cycle and to find out what the frequency of this limit cycle is and what the magnitude of this limit cycle is and so on. So, let me just recall what we did in the last lecture. So, suppose you had a nonlinearity which was a sine function. So, it gave a gain of minus plus m and minus m depending on whether the input was positive or negative and we found out that the describing function for this was 4m by pi a. We also considered another kind of a nonlinearity which was a relay. So, this one could think of as an ideal relay and we could think of another nonlinearity which is relay with dead time and its characteristics was given by there was a gain of plus m and there was a gain of minus m provided of course the input was larger than small d here. So, this gain is m and minus m and we calculated that in this case also of course it is independent of the frequency of the input signal, the output. So, the way we are calculating the describing function is that we are computing what is the primary harmonic and then the gain that we calculate by the output gain by input gain and the angle also in the same way. So, in this case of course the angle was 0 and in this case this turns out to be 4m by pi a times cos alpha with angle 0 degrees where this alpha is given to be sin inverse of d by a and this thing is only valid for a greater than equal to d and phi of a is equal to 0 if a is less than d. So, this was the describing function for the relay with dead time. So, describing function for the ideal relay is a very simple expression whereas, for the relay with dead time there are two different cases. So, now what we are going to do is look at the original system that we wanted to analyze and the original system that we wanted to analyze had a linear plant and a nonlinearity in a feedback connection. So, and this nonlinearity let us assume as this is the describing function for this particular nonlinearity. So, now if you go around the loop that means you start with any signal here then out here you can think of it as being gs times e. If e is the signal here then out here it goes through the linear plant you get gs times e then you go through n and when you go through n you end up with pi a. So, I will just suppress the omega because right now whatever we have looked at the describing function is independent of omega. So, pi a gs times e that is a signal here and so once you go through this negative part. So, what you have is this plus e should be equal to 0. I hope what I am saying is clear this signal here is pi a gs e and so now if you think of this input here as being the 0 input then what we are saying is 0 minus pi a gs e is equal to this error signal this signal e and so I can rewrite that as this times e equal to 0. So, if I pull the e out I get 1 plus pi a gs e equal to 0. If this was not a nonlinearity but for example if it was a gain just a gain k then this equation essentially would have been 1 plus k gs and of course we know that this is the characteristic equation for this closed loop system. So, what we have written down here is very similar to the closed loop system equation. The characteristic equation of the closed loop system would have been this. This we can think of as a characteristic equation of the closed loop system when you are thinking of a linear system with a nonlinearity. Now what we are going to do is we are going to use ideas similar to the ideas used for linear systems. So, in case of a linear system we can make use of this characteristic equation of the closed loop system and we can say something about whether the resulting system, the closed loop system is stable or not by looking at the Nyquist plot of the linear part. So, how do we do that? Well, we look at, so this is the characteristic equation. So, you look at the point minus 1 by k what I am really doing is I pull out the k and so I have 1 by k plus gs. So, you look at the Nyquist plot. Let us say this is the Nyquist plot of gs and then we can say that the resulting closed loop system is stable or unstable depending upon whether the Nyquist plot encircles minus 1 by k or not. So, for example and this is precisely the Nyquist plot criterion that we discussed several times before. So, for example, suppose you had started out with a g of s which was stable that means the open loop transfer function was stable. Then in that case for the closed loop transfer function to continue to be stable that means for the closed loop thing to be stable what we should have is this being the characteristic equations and you are looking at the closed loop with a gain k then the g of j omega should not encircle minus 1 by k in which case it is stable. On the other hand if it encircles minus 1 by k it is unstable. So, now what we will do with the non-linear system is something very similar to this. But before I go into that let me just look at the closed loop system for the stable I mean for the linear case and make some observations. So, suppose you have a plant g s and let us make the standing assumption that g s is stable. If it is not stable if g s has some right half poles and so on then whatever interpretation we are doing using the Nyquist plot you should change it accordingly depending upon you know how much what is the instability of g s. But suppose we make the assumption g s is stable and we look at this feedback system with a gain k then the characteristic equation is 1 plus k g s. So, now suppose we look at the Nyquist plot and let us say the Nyquist plot looks like that because g s is stable then this Nyquist plot criterion will tell you that this Nyquist plot. So, let me also draw the reflection. So, this is the Nyquist plot. So, we see that the thing that we are interested in is this quantity minus 1 by k. So, if this minus 1 by k is here that means k is such that you get minus 1 by k here then the resulting closed loop system is stable. What does it mean to say that this closed loop system is stable? What it means is suppose your gain is such that minus 1 by k is like this at this point then you have this closed loop system and suppose by some means let us say we manage to introduce some noise here at this point. Then this noise the linear plant acts on this noise and you get some output here. So, let me just write it as g times e and this g times e then gets multiplied by this k. So, you get k g e and it comes here and there is a feedback by which it gets in here. So, it goes around the cycle and what is really happening is when it goes around the cycle its magnitude I mean its magnitude gets attenuated and so what one can expect is that going around this loop going around the loop the magnitude of this error gets attenuated until it becomes 0 and so when we say that in this linear system this if the k gain is such that minus 1 by k is not enclosed by this Nyquist plot what we are really saying is that small error signals or error signals cannot exist here because when it goes around the loop it sort of gets attenuated. On the other hand if this k was a gain such that minus 1 by k was here. Now if it is here then you can see that it gets encircled twice because gs is stable therefore the closed loop transfer function is not stable. If the closed loop transfer function is not stable what it means is some signal if the state is non-zero then it might trigger the unstable parts of the transfer function in which case the signal can blow up and the signal blowing up is equivalent to saying that when you go around this loop there is a signal which is not getting attenuated but in fact it is getting magnified. So if you assume gs is stable then outside no encirclements would mean that inside this loop signals get attenuated. On the other hand if there is encirclements then the closed loop system is unstable because what it translates to is that there are right half poles for the closed loop transfer function because we have assumed that the open loop transfer function is stable but what that means is if you have some signal in this closed loop situation those signals can blow up. So if minus 1 by k is in here it can blow up if it is out there it just gets attenuated it dies out. Now let us take gs and let us take this nonlinearity n and look at this feedback situation. So we just saw what happens if you take a linear gain but instead if you take a nonlinearity so for the nonlinearity we can represent the nonlinearity and especially if we are analyzing sinusoidal signals we can assign the describing function of the nonlinearity rather than the nonlinearity for any specific sinusoidal signal if you want to study what happens to a sinusoidal signal in there. And so just like the characteristic equation that we wrote down for the linear plant earlier we had written down that the characteristic equation for this nonlinear system would be this equal to 0. So in the linear case it is 1 plus kg if s equal to 0 in the nonlinear system is that gain k that constant gain k is substituted by this describing function. And therefore now given the linear plant of course one can draw the Nyquist plot of that planter gj omega and maybe this is how the reflection looks and we make the earlier assumption that gs is stable. So look at the characteristic equation of this nonlinear system. So what we are saying is gs. So just like here we were looking at minus 1 by k here we could look at minus 1 by phi of a. So now if you are going to analyze for some signal let us say a sin omega t so we are interested in analyzing what happens if you use this signal a sin omega t then we can look at corresponding to that a what this value here of the describing function is. And we can look at gs and see if this point which represents minus 1 by phi if this point is n circle by the Nyquist plot of gj omega or not. Now if this point so now let us assume for this given a we calculate this phi of a and so you will get some value here and so minus 1 by k is some point let us say here. Then if you think of this phi of a just purely like a gain here then from the earlier discussion what we had we can conclude that with such a signal a sin omega t here what is going to happen is in this closed loop this is going to get attenuated and therefore the system is finally going to settle down with all the signals becoming 0. On the other hand if this minus 1 upon phi by a is some point in here or some point in here then of course there are n circle means of gj omega if it is a point here there is one n circle meant of gj omega if it is a point here there are two circles n circle means of gj omega but in both those cases the resulting system is going to be unstable. So if you take a signal a sin omega t where a is such that this thing that you calculate turns out to be inside this portion of the Nyquist plot then the resulting signal is not going to dry out but it is going to grow exponentially. So what we could do is give this linear plant one can draw its Nyquist plot and given the describing function of the nonlinearity one could plot minus 1 upon phi by a as you vary a. So plot as a is varied. Now once you have got this plot then all those points where minus 1 by phi a is outside the Nyquist plot of the linear part will lead to the closed loop system being stable and if it is inside then it will lead to the closed loop system being unstable but if minus 1 by phi a this plot intersects this at some point so in the boundary then it is neither stable nor I mean it is neither stable that means it does not die out neither is it unstable in the sense that it does not blow up. So what one can expect when it is there is that it sort of sustains the sinusoidal motion and therefore what you can expect to get is a limit cycle in this closed loop nonlinear system. The best way to of course see this is by using some example. So let us take an example let us assume that the linear plant g of s is given by let us say 1 upon and let us say the nonlinearity n is the nonlinearity whose characteristics are like that. This nonlinearity we already found the describing function for this we see that phi of a is given by 4 m by and we are now interested in this particular arrangement where you have the linear system and you have the nonlinearity n and this thing is fed back in this following way. And we want to find out whether this given system has a limit cycle and if it has a limit cycle at what frequency what amplitude the limit cycle exists. So for this let us first plot. So this is a complex plane and we are having gs 1 upon s into s plus 1. So if you plot this you are going to end up with only going to approach from here. So let me not take 1 upon s plus 1 but 1 upon s into s plus 1 squared. So if you look at the Nyquist plot of this one would expect this to be something like that. So we have drawn the Nyquist plot of g j omega I mean at s equal to 0 it is infinity with an angle of minus 90. So it is somewhere here somewhere down here and then it comes and as s tends to infinity this thing goes to 0 but with an angle minus 270 degrees. So this is the kind of plot that you would get. Now let us look at the nonlinear part. The nonlinear the describing function is given by 4m by pi a and therefore what we are going to plot is minus 1 by pi a which is minus pi a upon 4m. So what does this plot look like? Well let me use blue pen for this. So when a is 0 it is here and as a increases you have it going that way. So this portion of the of the plot form minus 1 by pi a corresponds to a equal to 0 and somewhere up there a very large. Because of minus sign that is why this side otherwise it would have been this side because of the minus sign we are plotting it in this way. So now what one can see is that for small values of a so if you draw out the full thing for the Nyquist plot if you draw out the full thing for the Nyquist plot you are going to end up getting something like that right round. So now you can straight away notice that small values of a it is as if this point is enclosed by first of all the plant gs the open loop plant gs is stable. So now for small values of a you are inside therefore it is unstable. What does it mean to say this is unstable? What it means is in that close loop the signals are going to blow up. On the other hand if you have a large a then the amplitude gets attenuated which means in the close loop so when I say close loop I mean this particular situation. So if you had a A here and you had small amplitude thing here then it gets blown up. On the other hand if you had a large amplitude thing here corresponding to some point here then from the earlier discussion about gain what would happen is it gets attenuated that means it gets brought down. But if you have a A which corresponds to this point here then it is precisely on the Nyquist plot and if it is on the Nyquist plot what you are going to get is sustained oscillations. How do you get the sustained oscillations? Well first of all we can let us use this transfer function to find out what is this point that you cross here. You see that for the Nyquist plot you should have an angle equal to so the angle must be equal to minus pi. But you can get this angle of minus pi for this transfer function at when you evaluate at j omega equal to 1 because at j omega equal to 1 s plus 1 both these s plus 1 will contribute minus 45 each and this s will contribute minus 90 degrees this minus 45 each and so the total is going to be minus 180 degrees. So at omega equal to 1 that is when this transfer function I mean the Nyquist plot will hit the negative real axis. And of course g of j1 modulus I mean the magnitude at that point is going to be 1 upon 1 plus 1 the square root of that but then squared half. So this point here is minus half and so minus half is equal to minus pi a by 4 m and therefore equating this we can say a is equal to 2 m by pi. So now what we are saying is the following. In this closed loop system suppose you had a signal here whose amplitude was 2 m by pi sin omega sin t because we are saying taking j omega for the linear part it was at omega equal to 1 that it cross the imaginary axis. So the value of a is 2 m by pi. So we are now looking at an input to the nonlinearity which has this particular magnitude 2 m by pi sin t. Now if you have this input to the nonlinearity the output to the nonlinearity of course is a periodic signal need not be a sinusoid but its primary component has the value 4 m by pi sin t. So the primary component of the signal here has the value 4 m by pi sin t this we can see straight away from the describing function that we have written down here. Now if you assume therefore that the signal here is minus 4 m by pi sin t when it passes through this transfer function there is a gain of half which is the gain that you will have for this transfer function at the frequency 1. And therefore with this gain what you will end up with is this 4 m by pi sin t will now get to be 2 m by pi sin t and so there would be a sustained oscillation of a signal here. And this sustained oscillation of a signal is the sign that we have discovered a limit cycle in the nonlinear system. Now for the limit cycle the time period of the limit cycle can be said time period of the limit cycle is going to be pi because this sinusoid has a period pi. And since you can talk about the time period therefore you can also talk about the frequency and the frequency is the frequency that we have read off from the Nyquist plot of the linear plant that means the frequency is omega equal to 1. So the frequency omega equal to 1 and the amplitude is the amplitude that you can read off by from this equation and so the amplitude is 2 m by pi. So with this amplitude and this frequency you can expect a limit cycle to go around in this closed loop system. Further you can claim that this limit cycle is a stable limit cycle. Now how can you make this claim that it is a stable limit cycle? So the way the limit cycle is operating is that the frequency is fixed and the amplitude is fixed by looking at the intersection of the Nyquist plot of the linear part and the describing function of the nonlinear part and it is out here. Let us make some small changes. So let us assume that this amplitude of the signal here by some disturbance increases. Now if the amplitude increases what that means is on this amplitude thing as far as the describing function is concerned it has moved away from the existing point. Now if it moves away from the existing point this side then from the earlier discussion we know that the system is such that this system is stable in the sense that the signals will die out it will attenuate. So what does it mean to say that the system is attenuating that means the amplitude which had increased is going to come down. But the amplitude coming down means that along the plot of the describing function had you gone up there you will come back. So if the amplitude had increased it will start decreasing. On the other hand if the amplitude had decreased gone down below 2 m by pi you would have been inside and if you are inside you know that the resulting system is supposedly unstable which means you will be pushed back and so along the if you look along the line of the describing function if you go that side you get pushed back in here if you go this side you get pushed back in there which essentially means that in the phase plane if you are looking at the phase plane you have this limit cycle if you get to an amplitude larger that means you get pushed out then you are somewhere here and you get pushed back so you get back to the limit cycle. If on the other hand from the limit cycle you get pushed inwards that means you get into a point here then again you get you know because it is the resulting system is unstable the signal grows and the signal grows and you get right back to where you had started from and therefore in this particular case the limit cycle that you have got here is a stable limit cycle. We can now analyze the nonlinear system that you get by taking the same linear plant as before so let us take the same linear plant which is 1 upon s into s plus 1 squared but this time the nonlinearity that we consider is the other nonlinearity which is the relay with dead time so it has characteristics like this this is d this is minus d so when it is larger than d then you get plus m minus m so this is relay with dead time so this is relay with dead time so so now again the Nyquist plot of this is exactly the same as before so the reflection is going to go like that so it is exactly the same as before the only difference that you are going to get is from the characteristic from the describing function. Now the describing function we saw was 4 m by pi a cos alpha for a greater than equal to d and it was equal to 0 for a less than d so for a less than d and of course we have to plot minus 1 by pi a so what is the plot of minus 1 by pi a look like so minus 1 by pi a is minus pi a by 4 m cos alpha and let me write down cos alpha in terms of d and m so that this is some unknown quantity so let me get rid of that so it will be pi a by 4 m square root of a squared minus d squared and this is a square now when a is 0 or when a is less than d of course this formula is not applicable but it is this formula which is applicable so minus 1 by pi a is going to be at minus infinity then once a becomes larger than d so when a has just become larger than d then if you look the denominator is going to be a very small number as a result this whole thing this whole thing is going to be a very large number so minus so it is somewhere near this thing and then as a increases this minus 1 by pi a decreases yeah of course they are all real values so I am not drawing along the axis because I want it to be clear what this is and this will keep decreasing until a certain point and then when a becomes even larger than that certain point then what you are going to get is it keeps increasing because if you think of a close to infinity I mean a being very large number then this thing is square root of a squared minus d squared this can be approximated as being a and so you have pi a squared upon 4 m a so 1 a goes so you have the other a so you again go back to minus infinity so this is the case where a is equal to d and it is increasing it comes up to some maximum value and then it starts decreasing until this is a equal to infinity so a as a is increasing first it comes down this way and then it goes back this way of course all these numbers are just real numbers along this negative real axis but I have drawn it this way just for the sake of clarity okay. Now what is this value where this is going to be a minima where I mean the magnitude is going to be a minima well that you can calculate by just doing a bit of I mean because you are varying a all you have to do is you take the derivative of this function and find out when this function either pi a attains a maxima or 1 upon pi a attains a minima okay so we could just look here and try to find out what is the value of a where this pi a attains a maxima and it turns out that that would be the case when this alpha is 45 degrees and you get alpha to be 45 degrees if a is equal to root 2 times d. So when a is equal to root 2 times d then what you have here cos of alpha is 1 by root 2 so this whole thing pi of a can be calculated to be 4 m 1 by root 2 upon pi and that is again root 2 d so root 2 root 2 so you get 2 m by pi d observe that this quantity here only depends on values that come from the nonlinearity the m and the d. So this is the case where a is equal to root 2 d of course one should actually do the calculus and find out that this is the value for which phi of a gets minimized but trust me on that that is the value for which it gets minimized and so therefore you have this situation. Now as a result now in this particular in this particular case where you have this g of s the linear plant which is given by this transfer function with this particular nonlinearity in the feedback loop when you plot the Nyquist plot of the linear part and when you plot the describing function of the nonlinear part this is what you get and now something interesting happens. You see if you have this situation if there is to be a limit cycle then this Nyquist plot should intersect this thing but that is only possible if you see out here we had already calculated that the gain margin if not gain margin but you know the crossover frequency omega is 1 and g of j omega we know is a half which is what we calculated sometime back the g of j 1 is half magnitude is half. So if minus 1 by phi a which is this quantity if this quantity here for a equal to root 2d phi of a turns out to be this which means minus 1 by phi a minus 1 by phi a the minimum value for minus 1 by phi a or rather the modulus the minimum modulus value for minus 1 by phi a or the maximum value for minus 1 by phi a this is going to be minus pi d by 2m and if this minus pi d by 2m turns out to be so it depends on dm correct and if this turns out to be less than minus half then it is exactly the situation that I have drawn and if it is this situation then the closed loop system is such that for all values of a the system is stable so what what you are going to get is the any signal gets attenuated and so therefore there is no limit cycle. The only hope of a limit cycle is if this is not less than minus half but is greater than minus half. Now if it is greater than minus half then this is the kind of thing you can expect which means there are two values of a so let me call this a1 and let me call this a2 there are two values of a for which the describing function and the Nyquist plot intersect of course where the Nyquist plot intersects that point is already decided because there is only one point that cuts the negative real axis as far as the Nyquist plot is concerned. So for a there will be two plots two points one would be a1 one would be a2 both of which go through this point minus half and now if you analyze these two points if you take this point if you take the first point a1 what is going to happen corresponding to this point a1 so a is d here as a is increasing so you first hit a1 then you hit a2 and then a increases off to infinity. So we can say d is less than a1 is less than a2 less than infinity that is the relation between a1 and a2 the two magnitudes that you have for which the evaluation of this function minus 1 upon 5a turns out to be exactly minus half. Now for this point a1 let us see what happens if you have a signal in here with a1 and it gets perturbed so that the signal magnitude becomes smaller that is equivalent to being out here. But being out here essentially means that the system will attenuate the signal but if the system attenuates the signal what it means is a becomes even smaller so it goes further out so you move off that way. On the other hand from a1 if there is a perturbation which increases the magnitude then you come inside and when you come inside then you know that the resulting closed loop thing is unstable that means the magnitude grows so magnitude grows means you go from here and you go right round to a2 so this a1 corresponding to a1 you get a limit cycle but that limit cycle is an unstable limit cycle so a1 corresponds to an unstable limit cycle. On the other hand a2 corresponds to a stable limit cycle and one can argue in the same way because if a2 suddenly the magnitude decreases so you are inside but once you are inside then the resulting closed loop system is unstable which means the signals get magnified and so it gets back to a2. On the other hand if it increases more than a2 so you come out here but then the system is stable so it attenuates so you go back. So there will be two limit cycles when you use a relay with dead time and this plant and this linear plant then provided this I mean the condition that minus 1 by phi a minus pi by d minus pi by d by 2m less than minus half if this condition is true then there are no limit cycles. On the other hand if minus pi by d by 2m is greater than minus half then there are two limit cycles and one of the limit cycles corresponding to the smaller magnitude is an unstable limit cycle and the one corresponding to a larger magnitude is a stable limit cycle. And therefore now using describing function and the Nyquist plot one can say a lot of things about the closed loop system with the nonlinearity and the linear part by looking at the describing function of the nonlinearity and the Nyquist plot of the linear function and doing an analysis similar to this. So I guess I am out of time for this particular lecture so let me stop here now.