 So, in the last lecture, what we looked at were describing functions for various kinds of non-linearities, the non-linearities that we did look at one of the most saturation and the other one was something with a delay and saturation. Now, and we noticed that when we plotted minus 1 by the describing function minus 1 by phi, then we always got real values and that is because there I mean there is no complex part that is coming in the describing function and this is essentially because the primary harmonic of the non-linear output function for I mean suppose you have this non-linearity and you give it a sinusoidal input function, then the output function is also of course periodic and when you look at the primary harmonic of the output, then this primary harmonic is in phase with the input signal and that is why we find that the describing function has only a gain and the angle is always 0. Now, the describing function will not be only a gain, but there would also be a phase difference that means the angle argument of the describing function will not be 0. The moment you have a non-linearity where the fundamental of the output is phase shifted from that of the input. So, we will look at some example for such a situation. So, let us first look at the following kind of non-linearity. So, this is what one calls an ideal relay. So, of course, the ideal relay just switches on and off, but this is ideal relay with hysteresis. Now, this is the first kind of non-linearity that we are going to look at which has a time varying, which is not a time invariant response. So, let me draw what the response is like. So, if this psi is the input and this is the output of the non-linearity, the way we would draw it is something like that. So, let me put some arrows and then I would explain what I mean by these arrows. Now, what this means is the following. So, let me also put some values. So, this value here is m, this is minus m and let me call this value h by 2, this is minus h by 2. Now, what this means is, suppose you have the input and it is increasing. Now, as the input is increasing, once it crosses, once the input magnitude becomes larger than h by 2, then it jumps up to plus m. Then suppose the input comes down, the value of the input comes down. Now, as the value of the input comes down, when it reaches h by 2, it still remains plus m and as it goes down further to 0 also, it still remains plus m until it goes to minus h by 2 and when it reaches minus h by 2, it flips down to minus m and then if it goes further negative, of course, it stays at minus m. But again, if it starts going positive, it remains at minus m until you reach h by 2 and it is only at h by 2 that it will jump up to plus m. So, what the value of the output is, is actually not just dependent on the instantaneous value of the input, but is also dependent on a bit of the past. So, for example, if this was the input, somewhere here was the input, then the output could have been here, here or it could have been 0 depending upon the history. So, this is a more complicated non-linear system than the ones that we saw earlier. So, now let me try and get the describing function for this. So, let us assume that we give an input to this system and let us say, the input is the sinusoid. So, the input let us assume is A sin t. Now, so this of course, is a maximum is the peak that is A and this is minus A and you have to reach h by 2. So, let us assume this is h by 2. So, it is at this point here that you reach h by 2. So, now the output is going to be at this point, it goes positive and if we assume this is minus h by 2. So, it is at this point that it goes negative. So, the output signal is going to look like that. So, what I am trying to say is that the input of course, is the sinusoid whose peak is A. Now, when the input hits h by 2 out here, that is when it goes positive. So, it goes into plus m, this value here is plus m, this value here is minus m. So, it is when the input hits h by 2 that the output goes positive and then when the input hits minus h by 2, that is when it comes down negative. So, what we have as an output is really a square wave, the only thing is that the square wave is sort of shifted from the sinusoid. So, if you now look at the primary harmonic of the square wave, the primary harmonic of the square wave is going to look something like that. So, if you look at this primary harmonic, so this is the y primary, this y primary, this primary harmonic of the output is phase shifted from the input signal. So, let us find out what would be the value of this primary harmonic. Now, you see what we have is a square wave of magnitude m. So, from the calculations that we have done earlier, we know that the primary harmonic, the magnitude of the primary harmonic is going to be 4m by pi. The only difference is that this primary harmonic is not in phase but is shifted and this angle here is theta. So, there is a lag of theta. So, we can say the primary harmonic is going to be 4m by pi with an angle of minus theta and what is the value of this theta? Well, from here we know that the input signal is a sin t and at theta, a sin theta would be equal to h by 2 and so sin theta is equal to h by 2a or in other words theta is sin inverse h by 2a. So, the blue curve that you have here that is the primary harmonic of the output and the primary harmonic of the output, it will this is what captures the primary harmonic of the output or in other words the primary harmonic of the output if I call it yp, if the input is a sin t then the output I can think of as 4m by pi sin of t minus theta where theta is given by sin inverse h by 2a. Now, suppose we go back to so here we have the describing function. So, we have the describing function and now we go back to the design situation where we want to find out whether a closed loop system involving the linear plant and this nonlinearity whether it gives rise to a limit cycle or not. Now, so let us see what we have. So, here you have a linear plant and you have this particular nonlinearity which is an ideal relay with hysteresis and we are looking at this situation where you have this loop and let us make some assumption about this Gs. Let us say this Gs is a simple enough linear plant. So, Gs is given by let us say k upon s into s plus 1, a second order plant. So, of course, this is stable. So, by the Nyquist criterion we know that because this Gs is stable whatever you have that particular point should not lie inside the area covered by the area described by the Nyquist plot of Gfs. The nonlinearity we found out that the describing function. So, the describing function of that nonlinearity is given by, so we saw that it is 4m by pi with an angle of minus theta. This is the primary harmonic and divided by a. This gives me the describing function because the way we define the describing function is the output, the primary of the output divided by the input. That is how we get the describing function. So, it is 4m by pi a with an angle of minus theta where theta is sin inverse h by 2a where h and a is the amplitude of the input signal and h of course is the h by 2 is the point where the upward shift or the downward shift occurs as far as the ideal delay with hysteresis is concerned. Now, if you recall what we have to do now is in this particular situation, we have to look at the Nyquist plot of this. Now, the Nyquist plot of this is going to look something like that and then we also have to plot minus 1 upon pi a and then the plot of this and the plot of this wherever they intersect they give us the values which will specify what kind of limit cycle exists in this particular system. So, let us see what this minus 1 upon pi a what this looks like. So, in order to see what this looks like we will plot several things. So, first of all let us look at this pi of a which is 4m by pi a with an angle minus theta. I just want to rewrite this what I will do is this 4m by pi a I rewrite it in the following way 4m by pi a and I multiply it by h by 2 and 2 by h. Now, if I do this then h by 2a is sin theta. So, this pi by a I can rewrite as 8 times m upon pi h sin theta at an angle minus theta. So, notice what I have done is I have converted a, a is of course the amplitude of the input signal. I have got rid of the a and somehow express this portion purely in terms of characteristics that come from the nonlinearity because m is the magnitude to which it goes. So, if you look at the characteristics of the nonlinearity here m is specified and h by 2 is specified and so what I am doing is I have written this portion in terms of that and then I have sin theta with an angle minus theta. So, now let me plot phi of a which is this as the angle theta changes. Now, you see when a of course the one other thing that I forgot to mention is that this is only valid when a is the amplitude is greater than equal to h by 2. If a is less than h by 2 then phi of a is to be assumed to be 0. Now, when a is equal to h by 2 then the angle theta is sin inverse of 1 which means it is pi by 2. So, if I now try to plot this what am I going to get for the plot? When a becomes h by 2 then I get this magnitude and the angle is pi by 2. So, sin of pi by 2 is 1 and so I get this magnitude but with minus pi by 2. So, let us say here and then as I vary as I make a larger what I am going to get is I am going to end up with a semicircle like this. So, let me just show why we should get a semicircle like this. Let me draw line from here and here then from Pythagoras you know this is a semicircle. So, we know that this angle must be 90 degrees. This angle here is theta therefore this angle here must be theta and now if this magnitude here is 8 m by pi h is the magnitude from there to there. So, that is like the the hypotenuse has this value. The hypotenuse times sin theta where theta is this angle will give me this. So, if this point is O and this point is P the magnitude of OP magnitude of OP is 8 m by pi h and the angle of this vector OP is this is the angle theta in the negative direction. So, the angle of OP is minus theta and so this semicircle that I have traced here that is the locus of the points as a increases from h by 2 and goes off to infinity. So, when a becomes infinity it becomes 0 when a is h by 2 it is here and as a increases you go along the semicircle and reach 0. So, this is the plot for phi of a. So, if this is the plot for phi of a then what would be the plot for 1 by phi of a well 1 by phi of a. So, phi of a as we said was 8 m by pi h sin theta with an angle minus theta. So, 1 upon phi of a is going to be pi h by 8 m 1 by sin theta and let me just open this up this minus theta so it will be plus theta plus theta I can write down as cos theta plus j sin theta and therefore I get pi h by 8 m tan theta is the real part plus pi h by 8 m j is the imaginary part and so if you plot this what you are going to end up getting is this straight line here where the imaginary part this is constant which is pi h by 8 m and this is the point that you would get this is the point that you would get when a is equal to h by 2 and as a increases it goes off and so a equal to infinity it goes off. So, this is the plot of 1 upon phi by a phi a therefore the plot of minus 1 by phi a is going to be out here which is exactly the negative of this. So, this is the value for a at h by 2 so this is so now if you if we go back to the problem that we were looking at. So, in the problem that we were looking at we had this plant G of s and you had this nonlinearity which was the ideal relay with hysteresis and if you take the plant to be k upon s into s plus 1 and the nonlinearity to be this ideal relay with hysteresis then if you plot the Nyquist plot that you get for the plant is something like that G j omega and the describing function that you get is like that with this corresponding to a equal to h by 2. So, this minus 1 by phi a a equal to infinity is right and so this here this point here is the point which gives us the value about the limit cycle that can exist in this particular system. So, suppose we wanted to calculate this limit cycle well one we could make some simplification. So, for example, let us assume that m for the nonlinearity the ideal relay with hysteresis this m is equal to pi and let us assume that h is equal to 1 in this case phi of a then becomes 8 m is pi. So, pi cancels with pi. So, you just have 8 sin theta with an angle minus theta. So, from the calculations that we had this portion here as we had calculated earlier this turns out to be pi h by 8 m and substituting all this you get 1 by 8. So, what that means is as far as the calculations are concerned the imaginary part of G j omega should be equal to 1 by 8 that will give us this point on the Nyquist plot. So, now given this plant if we have to calculate the imaginary part of that the imaginary part would turn out to be J k minus the imaginary part should turn out to be minus 1 by 8. So, here you will get J k upon omega into 1 plus omega squared. So, now if you assume that this gain k is also equal to 1 then you know you are sort of simplifying this. So, you get 1 upon omega into 1 plus omega squared should be equal to 1 by 8. So, you can solve for this omega into 1 plus omega squared should be equal to 8. So, an omega which would give this well omega would roughly be something like 1.8. So, that is 3.6 4.6. So, that should be it. So, omega 1.8 roughly omega 1.8. So, the frequency of this limit cycle that you could have here will have omega value to be 1.8 radians per second. And then of course, once you know that omega is 1.8 then from what we had calculated earlier the real part of G j omega this was equal to tan theta. So, the tan theta on this tan theta is equal to 1 upon 1 by 8 because the tan theta that you would get would be this angle here which corresponds to the angle subtended by this because this already is obtaining an angle of 90. So, you would get this and from this of course, one can find out what is the amplitude for the oscillation. So, I hope this example. So, what we did was we looked at an example where we have a case where the primary harmonic of the output is not in phase with the primary harmonic of the input. The input of course, is a sinusoid. So, the primary harmonic of the output is not in phase with the primary harmonic of the input and as a result what happens is that the describing function now has complex value. So, unlike the earlier cases where the describing function always had real values that means, the phase difference was always 0. So, that is not happening in this particular case. So, just to round up everything about describing functions we will also look at some more general kind of describing functions and how to play around with describing functions of nonlinearities which look more complicated, but which can be broken up into simpler nonlinearities and therefore, one can arrive at the describing function very quickly. So, let us look at another kind of system which one comes across quite often and that is the system where you have an ideal relay with a dead zone. So, the ideal relay with dead zone is something that we have seen before. So, you have d here and minus d here. So, this is of course, the input as the output and we are assuming that the output is m this is minus m. So, we have already seen this system, but and we saw that the describing function for this phi of A, it turned out that the describing function for this was something like 4 m by pi A. So, there was a delay here and there was a sign of some angle alpha. So, it turned out that the describing function looks something like this and where this alpha of course, depended upon the D and the A. Now, other kinds of systems that one can look at, well, you could have an amplifier with dead zone. Now, what do we mean by an amplifier with dead zone? Well, amplifier ideally what does the amplifier do? It amplifies. So, you have a line like this with slope k. So, if the input is there, the output is k times the input. Now, amplifier with dead zone means this is what you have. So, psi and because it is dead zone, I will again denote it by D. So, I have slope k gain starting from D and then from minus D, I have again slope k going downwards. So, this is what an amplifier with dead zone looks like. I mean the input output characteristics of an amplifier with dead zone. Now, suppose we were to find the describing function for this. So, maybe we will quickly try and find the describing function for an amplifier with dead zone. So, an amplifier with dead zone, well, these are the characteristics that you have. So, you have D and minus D and the slope is k. So, this is the input, this is the output for the nonlinearity. Now, suppose you want to find the primary of the output. So, let me first write down what the input is. Let us assume that the input is A sin T is the input and let us see what the output is. So, one way to see that is we could plot the input in this way and then you see up to D nothing happens and up to minus D nothing happens and then from there onwards what happens is this difference gets multiplied by k. So, it dies out at this point here and then at this point whatever is the difference dies out here. I hope it is clear what I am trying to say. So, this particular curve here, this is the input A sin T and what the output is going to look like is as the input is between 0 and D there is no output. The output is 0 and then at this point you have the output. So, y t is 0 when the input is between 0 and D and then once it reaches D then you get a magnification. So, the output is 0. So, if I write angles starting from here and I write the angles this way then this angle here let me call it let me call it theta then 0 less than less than equal to T less than equal to theta you get 0. Then from theta onwards up to pi minus theta. So, from theta less than equal to T less than equal to pi minus theta the output turns out to be well it turns out to be A sin theta turns out to be A sin theta A sin T sorry minus D. So, what we are really saying is this portion here which is A sin theta minus D that is going to get multiplied by K. So, that is going to get amplified. So, A sin T minus D is the difference between A sin T and the D. I put a capital D here what it should have been is a small D. So, K A sin T minus D for this interval and then y t will again be 0 from pi minus theta less than equal to T less than equal to pi plus theta and then after that I will have K A sin T plus D from pi plus theta less than equal to T less than equal to 2 pi minus theta and so on. So, that is the kind of output that I would get for this amplifier with ideal with dead zone. So, if I have to now evaluate the primary. So, y primary then I need to only take I need to be only bothered about an integral that means I could say 4 by pi and I take the integral from 0 to pi by 2 of y t which is the output times sin T D T. But this I could simplify as 4 by pi integral from theta to pi by 2 of y t sin T D T D T and what is this theta? This theta is a sin inverse of D by A because A sin theta will become D at theta. So, one could go ahead and evaluate it and if one evaluates this it turns out to be K by pi minus 2 theta minus sin 2 theta. It turns out to be this. Now, what does this really look like? This curve really looked like well one could again look at a plot. So, that was y primary. So, if one wrote down phi of A. So, phi of A is going to be K by pi A pi minus 2 theta minus sin 2 theta. Now, where theta is given as sin inverse D by A. So, as A increases. So, when A is equal to D theta is pi by 2 and then as A tends to infinity theta tends to 0. So, from pi by 2 it decreases to 0. Now, what one could do is one could one could plot what this function looks like. This gain K let me get rid of this gain K. So, I could take phi A by K and plot that against A by D. So, A by D. D by A is what we are interested in A by D is reciprocal. So, it will when A by D is 1 from 1 onwards higher values of A by D you have some result. Then it turns out that in this particular case there is a maximum of 1.0 and from here you will end up getting a curve which looks like that. It sort of attains a maximum of 1 as A tends to infinity. Now, if this is the situation then what that means is when you want to plot minus 1 upon phi A, this minus 1 upon phi A. When A is equal to D theta is pi by 2 and so here 2 theta will be pi. So, pi minus pi this is 0 and then theta is pi by 2. So, 2 theta is pi. So, sin of pi is 0. So, this whole expression turns out to be 0. So, phi of A is 0 when A is equal to D and A tends to infinity. So, phi of A divided by K. So, phi of A turns out to be 0 when A is equal to D. That means this value is 1 and then as A tends to infinity this rises up to 1. But what that means is if you are going to plot minus 1 upon phi by A, this turns out to be at A equal to D it turns out to be infinity and then it will come down up to some point here which is given by minus 1 by K. So, this is the plot for minus 1 upon phi A. And so if you have a Nyquist plot which does not pass through this portion then you have no hope of there being any limit cycle. So, for example, if the Nyquist plot passes this way of course then there is a possibility of this limit cycle. But then you can also explore that this limit cycle well whether it is going to be stable or not what happens at this limit cycle if there is a small perturbation and it is smaller then if it is smaller it is on this side. But if it is this side it is stable the net system is stable. So, it becomes smaller so it goes off and if it is on this side it is unstable. So, it increases but once the amplitude A increases then this also increases. So, you come up here. So, what it means is this particular amplifier with an ideal dead zone. So, if you are looking at G of S with a nonlinearity which is an amplifier with an ideal amplifier with an ideal dead zone then the limit cycle that you would have here is an unstable limit cycle. Now, we looked at amplifier with ideal dead zone but now you can do all kinds of permutations and combinations. So, one could look at an amplifier with ideal saturation. So, an amplifier with ideal saturation well the input output characteristics of this. So, it is an amplifier so it will have a gain k. So, this is a slope k this is the input thus the output and then after it reaches a certain value it saturates. So, you have that. So, this is the input output characteristics of an amplifier with ideal saturation. Now, if you have an amplifier with ideal saturation well one could think of this nonlinearity as well one could think of this as slope k. So, this is a linear gain gain of k with input output plus you have another guy here. So, let us say this was at point S that the saturation happened minus S. So, you have another guy with at S and at minus S you have slope minus k. Now, if you take this linear part and this of course is what we just discussed sometime back which is this is an amplifier with a dead zone. So, if you have this amplifier with a dead zone and you add it to this linear gain then the resulting then thing that you end up with is an amplifier with ideal saturation. Now, for the linear gain of course phi of a so what is the describing function for the amplifier with ideal saturation well it is the sum of the describing function for the linear part and this nonlinear part. Now, for the linear part well it is going to be just gain k and for the nonlinear part I mean for the part which is the amplifier with the dead zone we just obtain some formula sometime back which is this formula the only difference here is that the slope k is now a negative slope. So, you have k and minus k by pi a pi minus theta 2 theta minus sin 2 theta. So, you see the describing function for the amplifier with ideal saturation can easily be obtained from the earlier result that we had about the describing function for the amplifier with dead zone. You combine that along with the linear gain and you get the thing for this. Now, if you are to plot this what is going to happen is because of this k the things are going to reverse and so earlier when we plotted earlier when we plotted sorry let me take a new sheet. So, in the earlier case when we plotted for an amplifier with dead zone and we plotted minus 1 upon phi of a what we obtained was something like that which came up to minus 1 by k. So, this was the case where a was equal to d or s whatever d and this is when a is equal to infinity. Now, in this particular case where you are looking at amplifier with ideal saturation observe that you already have a k minus this quantity. So, the earlier quantity the earlier quantity it has been subtracted from this k and so what is going to happen in this particular case is so if you are going to look at amplifier. So, if you are going to look at amplifier with ideal saturation then you are going to get a sort of reverse picture where it starts from here and goes that way and what that effectively leads to is that in the earlier case you had unstable limit cycle whereas the amplifier with ideal saturation you will have stable limit cycle for this you will have unstable limit cycle. Now, of course, one can look at more variations. So, one could also look at amplifier with ideal saturation and dead time. So, saturation and dead time and so the characteristics will look something like that. So, this is the point from which saturation starts this is the point from which this is the point from which saturation starts this is where the dead zone ends and so on. Now, this again can be thought of as a combination of the earlier described stuff. So, as you see this is a very powerful weapon this describing function and you could use it to analyze all kinds of nonlinearities and you know if for each particular nonlinearity you look at the output and you look at the primary component of the output you find out what the describing function is and then you use the describing function or the map or the plot of minus 1 upon the describing function along with the Nyquist plot of the linear plant and from that you can make predictions about whether the system has limit cycles and how many limit cycles there are and so on. As we saw in an earlier example, there was a case where there were two limit cycles, but one of them was stable and the other one was unstable. So, all these kinds of thing I mean you have now machinery with you which will let you do all these predictions about the nonlinearity once you find the describing function of the nonlinearity. So, I mean I hope that has conveyed to you the power of this particular technique using describing functions. So, we will stop here for now.