 Hello everybody, my name is Harish Pillai and I am from the Department of Electrical Engineering IIT Bombay. I am giving this set of lectures along with Professor Madhu Belur from our department and these are lectures on non-linear dynamical systems. Madhu Belur probably has already covered some bits of non-linear systems. Today I am going to start one part of this course and we will begin by reviewing some concepts that we have from linear systems. Specifically, this is the concept of Nyquist plots and Nyquist criterion for stability. So, let us just revisit this Nyquist plot and Nyquist criterion for stability which is of course, very much based on principles of complex analysis complex complex number theory. So, let us begin by explaining what the Nyquist plot is. So, suppose we are given some transfer function Gs let us say is s plus 2 upon s plus 1 into s plus 3, then the Nyquist plot is drawn in the following way. So, one looks at the complex plane and then for any imaginary value j omega, we calculate what G of j omega is and this gives us a point. So, evaluating this at some G omega naught gives us this point, we evaluate it at some other j omega 1 will give us some other point and so on. So, as a result you get a whole set of these points and then when you join all of these together then you get the Nyquist plot. So, for example, in this particular case if you evaluated omega equal to 0, you would get 2 divided by 3. So, you have some point on the real line two thirds, it starts from there and then it turns out that in this particular case you will end up with a plot which looks like this and it is parameterized. So, as omega increases you keep travelling down this way until you reach infinity because when you substitute omega equal to infinity into this expression you end up with 0. So, this is the Nyquist plot. So, this is the Nyquist plot of Gs. So, given a transfer function we can draw this Nyquist plot. Now, this Nyquist plot the importance of this Nyquist plot is in the fact that you can use this Nyquist plot to talk about the stability of not only this transfer function, but also the transfer functions that you would get when you put this transfer function in a feedback structure of this form, where you have some plant here and you have let us say negative feedback. So, when you have transfer and you know this feedback structure will have a net effective transfer function and you can talk about the stability of this feedback structure also by looking at this Nyquist plot. Now, how we can talk about this stability of this feedback structure especially when on the feedback path you have a pure gain k is what I will explain right now and in order to explain that we will first begin by looking at the expression for this feedback. So, suppose you have this transfer function G of s and we have the feedback block k and we want to now look at the effective transfer function then the effective transfer function is given by G s upon 1 plus k G s. So, this is the G closed loop. So, this is the closed loop transfer function. Now, if you look at this closed loop transfer function when we are talking about stability what we are concerned about is the poles, the poles determine stability. Now, for example, if we are looking at continuous time systems then the poles, if the poles lie in the open left half plane that means the poles have real part negative. So, if the poles lie in the open left half plane which means that the real part of the poles are all negative then we know that the transfer function is stable. Now, given G we can talk about the stability of just G without any feedback and that would be determined by the poles of G. But if we are looking at this particular closed loop transfer function then the poles of this closed loop transfer function is really the zeros of the equation 1 plus k G s equal to 0. So, all those values of s for which 1 plus k G s is equal to 0 are the zeros of this equation and the zeros of this equation are precisely the poles of the closed loop transfer function because this particular thing appears in the denominator of the closed loop transfer function. So, we can say something about the stability of the closed loop transfer function by looking at the zeros of 1 plus k G s. Now, how we can look at the zeros of 1 plus k G s and how that would help us predict the stability of the closed loop transfer function knowing something about the open loop transfer function is what this Nyquist criterion is all about. I mean this Nyquist method of determining stability is all about. So, now I would go back to some basics from complex analysis and for that let us now look at some general function of the form let us say s plus let me say s plus 1 upon s plus 2. Let us take some function like this and let us look at this particular map from the complex plane to the complex plane where if you take any point z that point z will map to a point which is f of z. Now, let us see how we would calculate f of z given this z and given this is the transfer function. Now, if you look at this transfer function, this transfer function has a 0 at minus 1 and so let me denote that by a 0 this z minus 1 and it has a pole at plus 2 which let me denote by this cross sorry pole at minus 2 which I denote by the cross here. Now, in order to evaluate this, we would essentially be evaluating f of z is z plus 1 upon z plus 2. What is z plus 1? We look at this z plus 1 in the following way. Consider this vector going from 0 to z. This vector I can think of as the vector z. Similarly, consider this vector going from 0 to minus 1. I can think of this vector as minus 1. So, now if I take the vector z and subtract minus 1 from that, I would effectively get z plus 1 which is in the numerator of f z. Now, that I could show with the help of this particular vector. So, effectively calculating this z plus 1 is like taking this vector from the 0 to the point z. In the same fashion, if I do z minus minus 2, I can evaluate z plus 2 and the z plus 2 is this vector from minus 2 to z. So, I could call this z plus 2. Now, when you evaluate this, it is essentially like evaluating these two complex numbers z plus 1 and z plus 2. Now, z plus 1 which I have denoted by this vector is really a complex number and that complex number z plus 1 can really be thought of as the magnitude and with an angle of z plus 1. Now, this magnitude is the length of the vector z plus 1. So, the length of this vector gives us this magnitude and the angle is this angle here which let me denote by alpha. Similarly, the magnitude of z plus 2, this vector gives the magnitude of z plus 2 and the angle is this angle beta. So, if we have to evaluate f z, that is the same as draw these two vectors and then whatever is the magnitude of this vector, write that in the numerator. The magnitude of this vector, write that in the denominator and then the angle, the net angle that you will have for f of z is going to be the angle of the numerator which is alpha minus the angle of the denominator which is beta. So, for a given point z, if we have to calculate f z, essentially what we do is you draw these vectors from the poles and the zeros, the poles and the zeros. In this particular case, there is only one zero and one pole, you draw vectors to that z from the poles and the zeros. Then you take the magnitude of those vectors from the zeros and put them all in the numerator. The magnitude of the vectors from the poles, put them all in the denominator and then for the angle, what you do is you take all the angles defined by the vectors coming from the zeros and put them all with a plus sign and those coming from the poles, put them all with a minus sign and you have effectively got a complex number which is f of z. So, now what we essentially saw was how to evaluate f of z for this particular transfer function z plus 1 upon z plus 2 given some particular point z. Now, what we are going to do is talk about something more general that happens. So, it is the same transfer function. So, it has a zero at minus 1 and it has a pole at minus 2. Now, we do the following. Suppose we want to evaluate this f of z, but we want to evaluate it on a contour which looks like this. So, let me call this contour C and now we want to evaluate f of z at each one of these points and draw where it goes to here. If we do this, then we might end up getting something like this which I could call f of C. Now, for each point z, of course, we evaluate f of z in the way we talked about earlier. That means, we draw this particular for this point z, we draw these particular two vectors and we look at the magnitude of this vector divided by the magnitude of this vector and then you look at these angles alpha and beta and the difference of alpha and beta will define what is the angle of the point f of z which probably may be out here. This point is z. Now, what I want all of you to observe is the following. When we go around this contour z and you look at all these vectors that would come from minus 1 to these various points in the contour, then one could easily see that there would be some point here for which this angle will be the largest and there will be some point here for which this angle is the smallest. So, the angle alpha that you get here, one could say lies between this angle and this angle for all the points z on this contour. So, let me call these angles theta 1 to be the smallest angle and theta 2 to be this largest angle. So, alpha is an angle which lies between theta 1 and theta 2. Similarly, beta is going to be an angle between, you can imagine that there will be a largest beta and there will be a smallest beta and so I can say beta is an angle which lies between the angle let us say theta 3 and theta 4. Now, as a result of this, the angle of the image is going to be constrained because these angles are constrained. So, that angle one can say the resulting angle alpha minus beta is always going to lie between some angle let me call it omega 1 and some other angle omega 2. So, this alpha minus beta is some angle which lies between omega 1 and omega 2, but what that really means is from the origin if I draw a line with angle omega 1 and I draw another line with angle omega 2 then the image of this contour will lie completely within the sector defined by omega 1 and omega 2. So, what we did earlier was we looked at some generic curve. Now, we look at some other curve. So, it is the same transfer function s plus 1 upon s plus 2 and we have the 0 at minus 1 and the pole at minus 2, but this time we are going to consider a contour which let us say looks like this. Now, when the contour looks like this, it is clear that when you look at angles from the 0, the angles could be any angle from 0 right down to 360 degrees. Whereas, when you look at the angle from the pole it gets constrained between these two angles. As a result when you look at the image of this contour on the other side, it turns out that the image would enclose the origin. Now, along the contour suppose you travel in this way that means in the clockwise direction then it would turn out that in this particular case if this is the contour C then the image contour f of C would be such that f of C would go around the origin once. And the reason for this is also clear to see because as far as the angle from the 0 is concerned that means the angle alpha, this alpha is going to vary say if you start from this point and you go around, it is going to start from 0 and it is going to go minus minus 45, minus 90, minus 180, minus 270 and so on right to minus 360. So, as you go around the contour this alpha varies from minus 1 going more negative until it reaches minus 360 degrees. On the other hand, the angle corresponding to the pole is going to start at 0 minus so it increases up to this maximum and then it decreases down to 0 then it increases or I mean depending on how you want to look at the angle it increases up to this point and then again it comes down back to 0. So, as a result alpha you go from you know minus some small value right round to minus 360, but this angle beta you only go from minus you tend up to this point the maximum minus and then you go up to this point which is the maximum plus. So, as a result when you are looking at alpha minus beta it is going to go through a whole cycle from minus 1 go right round to minus 360 which is why you have a clockwise circulation around the origin. Now, we can look at some other contour and this other contour I want to draw in this particular fashion. So, it is the same transfer function again the 0 is at minus 1, the pole is at minus 2 and this time I take a contour like this. Now, if you take a contour like this and you travel in the clockwise direction around this contour it turns out that the image of this is going to be a contour which encircles the origin, but this time travels in the anticlockwise direction. So, and the reasoning for this is also just like the reasoning that we gave earlier if you notice the angle that you will get at the 0 is going to be bounded between some maximum value and some minimum value. Whereas, the angle corresponding to the pole is going to go right round 360 degrees. So, as a result you will end up because of this angle subtended by the pole you will end up going around the origin this time in an anticlockwise direction. Now, it will not be surprising that if you consider a contour like this which includes both the 0 and the pole and you go around this contour let me call it C1. If you go around this contour then it turns out that this contour will not encircle the 0 or if it does encircle the 0 it will go around it clockwise and anticlockwise. So, the number of clockwise revolutions or the number of anticlockwise revolutions of this particular contours image is going to be 0. So, this particular property that comes from complex analysis is what we are going to use in order to predict whether a given transfer function is stable or not. So, generically, so let me talk about a generic situation. So, suppose you have a transfer function Gs and suppose it has let us say all these are poles and suppose these are zeros and now if you take a contour like that this contour and travel along this contour in the clockwise direction this contour contains within it two poles and one zero. Then when you look at the image of this contour you will end up getting an image let me call it f of C which encloses the origin and this is going in the clockwise direction. So, this will go in the anticlockwise direction and it will enclose the origin in the anticlockwise direction once. And the reason you get this one is because when you look at this contour it encloses two poles and one zero. Every time it encloses a zero the contour the image contour travels around the origin in the clockwise direction and every time it encloses a pole it travels around the origin in the anticlockwise direction. So, since this contour encloses two poles and one zero therefore it will travel around the origin once in the clockwise direction and twice in the anticlockwise direction. So, the net number of times that it goes around the origin is once in the anticlockwise direction. The typical formula that you give for this is given a contour if the number of zeros it encloses is z and the number of poles it encloses is p then the image contour will go around z minus p times. z minus p is equal to n where n is the number of times that the image fc will go around the origin in the same direction as the direction of the original contour. So, if the original contour was in the clockwise direction f of c if it is going to be in the clockwise direction then z minus p will be a positive number and if z minus p is a negative number and the original thing was going in the clockwise direction then the image will go in the anticlockwise direction. Now, how are we going to make use of all this in order to talk about the stability of the closed loop system? Well, the way we are going to make use of it in the closed loop system is the following. Let us review Gs, some transfer function which is given to us and let us look at what the Nyquist plot is. So, the Nyquist plot is you travel along this portion here and for each j omega you plot what it comes to. So, for example, if you take Gs to be again let us take the same thing s plus 1 upon s plus 2 then as you go up this j omega axis you will get the Nyquist plot and in this particular case when you evaluate at omega equal to 0 you get half and then as you go up the angles. So, here is the 0 and here is the pole and these two angles keep increasing until when you reach infinity this angle is 90 degrees this angle is also 90 degrees. So, the net angle is 0 and as far as the magnitude is concerned when you reach infinity limit omega tending to infinity of j omega plus 1 upon j omega plus 2 this turns out to be 1. So, it will start at half and it will end at 1. Now as you are going up the j omega let us say if you take some omega naught here j omega naught then you see that this angle alpha is larger than this angle beta and so alpha minus beta is going to be a positive angle and so here you will end up with some curve which looks like that. So, this is the Nyquist plot going in this direction g j omega and this g j omega is the plot as you plot the imaginary axis just the positive part of the imaginary axis. Now in the same way you can plot the negative part of the imaginary axis and you would end up getting a curve which is symmetric to this, but in the negative part essentially because all the angles the magnitudes will remain the same for j omega naught and minus j omega naught the magnitudes will remain the same, but the angles are exactly the negative. So, if the plot on the Nyquist plot for omega naught is here then for minus omega naught it will be just the negative as far as the angle is concerned, but the magnitude is going to be exactly the same. So, now let us assume that we look at this go up this thing and then you take this extremely large radius at which you travel from that plus infinity right down to minus infinity and this. So, this now we think of as a contour through which we are going in the clockwise direction. Now if you think of this as the contour through which you are going in the clockwise direction then out here what you effectively will have is some close curve like this which is the image of this contour. So, this is the contour C and this here is f of C that means you take this which corresponds to this and then this whole thing which essentially will correspond to hanging around near the point 1 because they will all be points at infinity and when you take this limit they all turn out to be 1. So, it is just standing still at this point and then this negative part is just returning along this path and you get back here when you are at the origin here. So, you have this as f of C for the contour C that you have drawn in this way. Now, obviously, this f of C does not enclose the origin and what that means is the zeros and the poles of the original transfer function either they all lie outside this portion or the number of zeros and poles that lie in this portion are precisely equal so that the clockwise and the anticlockwise things have cancelled themselves and therefore, there is no enclosing of the origin. Now, suppose you look at a more complicated transfer function like s plus 2 upon s plus 1 to s plus 3. So, you have minus 1, a 0 at minus 2 and a pole at minus 3. Now, when you take this particular contour then the Nyquist plot of this of course, as we had said earlier will start at two thirds that means we are just looking at this positive part and finally, you will end up with a curve which looks like that and so it will reach the origin when omega tends to infinity because there is one s on the top and there are two s s below. So, when you take the limit it goes to 0. So, when you go through this huge radius throughout here we will assume that the value of s is tending to infinity as a result the magnitude will continue to be 0 and then when you look at this negative part you will get the negative of this particular Nyquist plot that has been drawn and so you end up with this. Now, when you look at this figure it looks as if the origin has been enclosed in the image contour but in reality the origin is not enclosed by this curve because one has to magnify this origin to see what is happening here. You see as omega tends to infinity so this is the magnified portion here is omega and as omega tends to infinity this portion of the curve looks like this and this other portion of the curve looks like this. There is this other portion that we want to plot. Let me assume that this is some circle with radius r. So, this r is a very large number and I will evaluate this transfer function for this r and going along this curve is like looking at r e i theta where this angle theta varies from plus 90 degrees to minus 90 degrees. If I have to evaluate this for this Gs then the evaluation will give me r e i theta plus 2 but this 2 is negligible in comparison to r. So, I will just throw it away divided by for this again I will have r e i theta this one I am throwing away because it is negligible compared to this and for this again I will have r e i theta. If I think of this put them all together I will have 1 by r because there is 1 r in the numerator 2 in the denominator and I will have e to the minus i theta. Now, this 1 by r it depends on what this r value of r is when r is very large 1 by r of course is very small. So, it is somewhere near the origin but it has not yet hit 0 and I have e to the minus i theta and this theta as we said on the contour the theta is varying from plus 90 to minus 90. Therefore, minus i theta will vary from minus 90 to plus 90 and so what you will have here is a circle with the radius of the circle is 1 by r and it goes in this way. So, this portion if you magnify you will end up getting something like this and so this curve though it looks as if the origin has been enclosed really the origin has not been enclosed because if you look at the magnified picture it looks like this. So, in this particular case the origin is not enclosed and it is clear from whatever we have discussed earlier that the origin will not be enclosed essentially because within this contour none of the poles or zeros of the transfer function is present. Suppose we are now going to look at the feedback situation where you have this gain k and you want to know whether this is stable. We already said that the closed loop transfer function is going to look like gs upon 1 plus k gs and therefore the poles of, so let me call this gcl the closed loop transfer function let me call it gcl. The poles of gcl is exactly the same as the zeros of the equation 1 plus k gs and the zeros of gcl is the same as the zeros of the original transfer function gs. So, now if once again we want to use the Nyquist plot and suppose we have the Nyquist plot of g j omega let us take that particular transfer function which we had looked at earlier and so the Nyquist plot looks like that and so with its reflection it looks like that this is two-thirds and so on. Now from here what we can conclude is that in the right half plane there are no zeros or poles of the original open loop transfer function gs. Now as far as the, so suppose instead of thinking of this Nyquist plot as the Nyquist plot for gs what we can now do is you see the zeros of 1 plus k gs is the same as the number of poles of gcl. So, the number of times that this particular curve n closes the special point minus 1 will tell us the number of zeros of 1 plus k gs because of the following thing. So, let me try and explain that. So, suppose gs is given to us and suppose we know that gs contains z zeros and p poles in the right half plane. So, what that would mean is that when you look at the Nyquist plot of gs, so let me think of the Nyquist plot as something like that. Now, it will enclose the origin and suppose the Nyquist plot was going like that in the clockwise direction then it will enclose the origin z minus p times in the clockwise direction. So, if gs contains z zeros and p poles in the right half plane, I mean if the zeros and the poles of gs lie in the left half plane of course, this number and this number are both zero and so this resulting Nyquist plot does not enclose the origin. Now, if you take k times gs the only change is going to be all these points are going to get stretched out. So, if they get stretched out by some amount k, you are going to end up with a curve that looks perhaps like that. Now, if you look at 1 plus k gs, this is as if you have changed the origin and so you will no longer be thinking about, so the zeros the poles of this transfer function 1 plus k gs, so let me write it down. So, poles of 1 plus k gs is the same as poles of gs zeros on the other hand of 1 plus k gs, what about the zeros of 1 plus k gs? Well, can we deduct anything about the zeros of 1 plus k gs from this Nyquist plot? Now, one thing we can do is we look at this resulting Nyquist plot and how many times it encloses minus 1. Now, if it encloses minus 1 in some direction then what it means I mean in the clockwise direction for example, then what it means is the zeros of 1 plus k gs minus the poles of 1 plus k gs that many that means z zeros of 1 plus k gs minus p poles of 1 plus k gs are present in the right half plane. So, this 1 plus k gs gives us some idea about how many zeros I mean how many times the Nyquist plot encircles the minus 1 gives us some idea about the zeros of 1 plus k gs because we already know about the poles of gs which is the same as the poles of 1 plus k gs and it is essentially this trick that we use for the closed loop transfer function also because for the closed loop transfer function GCL, we observe the following poles of GCL equals zeros of 1 plus k gs and zeros of GCL are the same as the zeros of gs. So, now if the number of zeros of gs this number is z and the poles of GCL now when we talk about the zeros the zeros of GCL are the same as the zeros of gs and the poles of GCL are the same as the zeros of this thing. So, of course, if I put the qualifier right half plane zeros of GCL they are the same as right half plane zeros of gs and let me call that z and similarly right half poles of GCL is the same as right half poles zeros of 1 plus k gs and let me call that p. Then z minus p enclosures of the point minus 1 by the Nyquist plot of gs. So, z minus p are the number of enclosures of minus 1 by the Nyquist plot of gs where z is the right half plane zeros of GCL which is the same as the right half plane zeros of gs and p is the right half poles of GCL which is the same as the right half plane zeros of 1 plus k gs. So, now if you start off with a transfer function which is stable suppose you have gs is stable this implies that poles of gs in right half plane is 0. Now, gs is stable therefore the poles of gs in the right half plane is 0. Therefore, the number of times that the Nyquist plot of gs will encircle the origin will always be clockwise and will correspond to the number of zeros of gs in the right half plane. But the zeros of gs in the right half plane are the same as zeros of the close loop transfer function in the right half plane. So, now if instead of looking at the enclosures of the origin one looks at the enclosures of minus 1 of the transfer function and it turns out that the enclosures of minus 1 there are no enclosures whereas the enclosures of origin there is 1 then what that would mean is that there is a right half pole of GCL along with the right half 0 of GCL and therefore the number of enclosures of minus 1 is 0. And this gives us an idea about the close loop transfer function stability by looking at the Nyquist plot of the open loop transfer function. Now, I am sure most of you have gone through this Nyquist plot way of determining the transfer function for a close loop transfer function from open loop transfer function and this plays a very important role when it comes to non-linear dynamical systems because in the non-linear dynamical system this particular special point minus 1 that sort of captures the feedback as far as the linear system is concerned. And in case of a non-linear system on the feedback loop if you have a non-linear element then the uncertainty of the non-linear element gets manifested in some region around this minus 1 and so you have theorems where you know if you are okay. So, in the analysis of non-linear system you typically have a situation where you have a linear plant and you have a nonlinearity and you attach this nonlinearity to the linear plant and you want to talk about the stability of this whole system but this is a non-linear thing. So, this Gs this is linear and as this is linear you can obtain a Nyquist plot of this Gs. Now, earlier when you used for feedback when you used a nonlinearity then it was this point minus 1 and whether that minus 1 gets enclosed by the Nyquist plot of Gs determined whether the closed loop transfer function was stable. Now, when it is a nonlinearity it turns out that this nonlinearity is in some way approximated by a linearity. Suppose this nonlinearity is approximated by a linearity then it will be just this point minus 1 but when it is not approximated by a linearity but you really think of a nonlinearity you will find that there is some region around minus 1 which accounts for the nonlinearity of this element and the Nyquist plot of G of s should enclose or not enclose this in the same way as the Nyquist for the linear systems the Nyquist plot should or should not enclose minus 1. So, instead of having just one point to consider in the non-linear analysis it turns out to be a whole area around minus 1 which should be enclosed or should not be enclosed. Of course, what I am talking about now will become clear in the later lectures when we actually find out this area which talks about which captures something about this nonlinearity. So, so much for now as far as the Nyquist plot is concerned.