hello and welcome back to control system lectures let's cover the highly requested topic of the Nyquist stability criterion at least the first part this is a topic that I can honestly say I didn't really get as an undergraduate student but it turns out that I was just being lazy because the criterion is actually pretty easy to understand with just a small amount of concentrated effort so let me explain it to you the way I understand it and maybe with this video and some other textbooks and other videos on YouTube you'll be able to create your
own understanding of the criterion as well but first things first let's talk about what we're trying to accomplish by using the Nyquist stability criterion here is a typical open-loop block diagram of plant G of s and control process H of s you generally have both of these transfer functions for your system since you know the plant that you're trying to control and you get to pick the control process to control it the open-loop transfer function then just becomes G of s times H of s but to save time in this video I'm going to drop
the of s's and just write G times H when we close the loop this physically adjusts the transfer function for the entire system and you can reduce the block diagram into a closed-loop transfer function G divided by 1 plus G of H so you can determine if your open-loop system is stable by finding the poles of G times H the poles or values of s that caused you to divide by zero in the transfer function and so that the result blows up to infinity if there's a pole in the right half plane then the open-loop
transfer function is unstable for the closed-loop system we're still looking for poles however you can see from the transfer function that in order to divide by 0 1 plus gh would have to equal 0 therefore we can check stability of the closed-loop system by looking at the location of the zeros in 1 plus gh this might get a little confusing because I might accidentally say we need to check for closed-loop stability by looking at the location of the zeros but what I really mean is that just the locations of the zeros of 1 plus gh
so just keep that in mind as we move forward so all we're really trying to do is find where the zeros are of 1 plus gh or take the open-loop transfer function and 1/2 it and then find the location of the zeros why is this so difficult well for one thing if your open loop system is high order let's say 50 poles or something then finding the roots of that large 50th order equation can be difficult by hand of course now we have computers so that isn't a big deal but even so all you would
have is stability information and no other int useful information like stability margins so let me show you something real quick in MATLAB I'll just generate a random transfer function called sis I'll plot the locations of the poles and zeros for this open-loop system and then right next to it I'm going to plot the poles and zeros of 1 plus the open-loop system so here you can see how the zeroes in the right graph are not obviously related to the poles in the open-loop system in the left graphed that's because when we add one to the
open-loop system it can really move the poles and zeros around however let's generate the Nyquist plot for G times H and 1 plus G times H hey this kind of looks like Mickey Mouse randomly anyway isn't this much simpler looking all we're doing is adding 1 and just shifting it over so adding 1 to the open-loop for function and trying to find the pole-zero locations is hard graphically but adding one to a Nyquist plot is really easy to do now the only thing we need to know is how to determine stability and stability margins from
this graph of squiggly lines and once we know that then we're golden luckily it's pretty straightforward once you know what to look for but before I tell you that I first want to show you how this plot is generated and in doing so I think reading it and determining stability will become obvious to start we need to discuss cochise argument principle let's say that we have this arbitrary transfer function s plus 2 over s plus 1 and I'll put the S plane on the left here and mark the locations of the poles and zeros for
our transfer function there's a pole at minus 1 and a 0 at minus 2 now if we take just a single point in the S plane let's say s equals minus 1 plus J and plug it into our transfer function which is s plus 2 over s plus 1 you'll get a new complex number out 1 minus J and let me plot this new complex number on a new plane that I'm just going to give an arbitrary letter W the W plane this process of plugging in one complex number in the S plane and getting
a new complex number in the W plane is called mapping so the transfer function Maps a point from the S plane to a different point in the W plane and if we add a second s point near the first we're going to get a second point somewhere else on the W plane and if we plugged in more and more points on the S plane as to form a continuous line then this will form a continuous line in the W plane and if you draw a continuous line that connects back to itself we call this a
contour and it'll generate some sort of continuous squiggly line over in the W plane that also connects back up with itself we're going to call this line in the W plane a plot except that squiggly line isn't just random gibberish it actually contains the phase and magnitude information from each of the system's poles and zeros let me explain it in the following way using just a small amount of math but really concentrate on the idea rather than the math if you find it confusing I'll simplify our transfer function just a bit for this example down
to a single zero at s equals -2 and I'll map the point s equals minus 1 plus J over to the W plane using our transfer function s plus 2 over 1 and we find it to be 1 plus J now here's the really interesting part the phasor of the point in the W plane is exactly the same as the phasor between the 0 and the point we chose in the S plane and this concept extends to multiple poles and zeros as well and what's nice is that you can figure out the mapping between the
S plane and the W plane graphically I'll show you how in this set of three poles and two zeros step one is to pick the point in the S plane that you want to map over to the W plane step two is to draw the phasors from each of the poles and zeros to that point step three is to determine the magnitude or the length of the phaser by multiplying all of the 0 phaser magnitudes and dividing out all of the pole phaser magnitudes this resulting magnitude sets the length of the phaser in the W
plane step four is to determine the phase by adding the phase of all of the zeros and subtracting the phase of all of the poles so in our case we had add the two blue angles subtract all of the orange ones which just by eyeballing it looks like the phase would be just greater than 90 degrees and so it would be here in the W plane so you might be wondering why I'm telling you all this we aren't going to be doing this mapping graphically in general since it's usually easier just to plug in the
point and solve the equation however understanding what is happening in a graphical sense is going to help us interpret the plot later on let me show you what I mean using MATLAB again I wrote a small program in MATLAB to give you a visualization of what I just drew for you here we have a transfer function with two poles and one zero you see the exact function in the title I've chosen a value of s right in the middle at s equals -2 and on the right is the mapping of that point into the W
plane you can see very quickly that if we add the phase of the 0 which is 180 degrees and subtract the phases from the poles which is positive and negative of the same angle so they cancel each other out that the phase should be 180 degrees on the point on the right and it is now let me move this point to a new spot in the S plane now the phase from the zero is plus 90 degrees and the phase from the pole is maybe around 60 degrees or so and therefore 90 minus 60 is
about 30 degrees and that's again what we see of the point in the W plane now if I sort of trace out a contour with this point but make sure not to include any pole or zero then the addition and subtraction of the phases will never go around 360 degrees and you can see this very clearly on the W plot that the phase just sort of hovers between 150 degrees and 210 degrees however if I do in surplus 0 then as we go along the contour in a clockwise direction will be adding 360 degrees of
phase as we move around the 0 this causes the point in the W plane to rotate 360 degrees in a clockwise direction like our contour and if I circle a pole then we're subtracting 360 degrees of phase as we move around the pole causing a counterclockwise rotation in the W plane now I've written a second demo that might make this a little bit easier to see here I have a single pole that I am circle and the resulting plot circles the origin one time in the counterclockwise direction since we're subtracting 360 degrees of phase now
I'll add a second pole and rerun it and as you can see there's going to be two rotations around the origin one for each pole finally I'm going to add two zeros as well and now the resulting plot doesn't circle the origin at all and that's because we're adding two times 360 degrees of phase from the two zeros at the same time subtracting two times 360 degrees of phase from the two poles sure the plot on the right which is the Green Line is still gonna have a bunch of circles and squiggles in it but
it never encircles the origin which is really important to note and that is really all you need to know for Co Xi's argument principle that you can tell the relative difference between the number of poles and zeros inside of a contour by how many times the plot circles the origin and in which direction so let's see if I gave you this arbitrary contour and then told you that the mapping in the W plane looked like this what could you tell me about what's inside well let's see it circles the origin once in the clockwise direction
so there must be one zero inside the contour right wrong well sort of wrong remember all this tells us is that there is one more zero than poles inside the contour so if there are no poles then there is one zero but what if there's three poles then there must be four zeros now let's take a new contour and if I said that the mapping looked like this where it encircled the origin twice in the counterclockwise direction well then you would say that there are two more poles than zeros and if we knew that there
were only two poles to begin with then we could confidently say that there were no zeros in this contour in order to figure out how this information helps us let's get back to our problem we're trying to figure out if there are any zeros in the right half plane for one plus GH because if there are that means that the closed-loop system is unstable and now we know how to use Co Xi's argument principle to determine if there are any zeros inside of a contour so at this point it should be obvious that if we
want to see if there's any zeros in the right half plane then we need a contour that encloses the entire right half plane and we do that by saying that the contour runs the entire length of the J Omega axis up to positive J infinity and then it sweeps around and infinity to enclose the entire right half plane and then goes back up the negative J Omega line back to zero now if there are any zeros in the right half-plane we're gonna know about him this is called the Nyquist contour all those other contours we
drew didn't have a name so maybe I'll call one like the Douglas contour or something but when you map the Nyquist contour into the W plane you get what's called the Nyquist plot it's all those squiggly graphs I plotted in MATLAB earlier and again you get those plots by plugging in every single value along the J Omega axis and then all the points along infinity in the right half plane this is easier to do than you might imagine but I want to cover that in the next video for now we'll rely on the computing power
of MATLAB to generate those plots for us so now if we take 1 plus gh and use this function to map the Nyquist contour in the S plane into a Nyquist plot in the W plane we can instantly see how many times the origin is circled and in which direction from there we can determine how many more poles or zeros lie within the contour to do this mapping though we need to find the plot for gh and then shift the entire plot to the right by 1 but this is kind of difficult because there's lots
of curves and circles so instead of shifting the plot to the right by 1 we shift the origin to the left by 1 and this is why we're concerned with how many times minus one is circled instead of how many times the origin is circled so the steps are that we take the open-loop transfer function gh we make a Nyquist plot by plugging in each point on the Nyquist contour and count the number of times minus one is encircled and in which direction from that we can determine how many more poles or zeros are inside
of the Nyquist contour which again is the entire right half plane but to know for sure whether there's a zero in the right half plane we first need to know how many poles are in the right half plane luckily we usually know exactly how many poles are in the right half plane of 1 plus gh because it's the exact same number of poles in the right half plane as the open-loop system gh and since we usually have a good understanding of our open loop plant then we already have that information and this drives the famous
equation that the number of zeros in the right half plane Z is equal to the number of clockwise encirclements of minus one plus the number of open-loop right half plane poles or another way of saying this is that in order to guarantee there are no zeros in the right half plane then you better have exactly one counterclockwise encirclement for every open-loop pole in the right half plane any less than that and you know you have at least one right half plane zero messing things up so one very important bit of information you should be taking
away from this is that if someone gives you a Nyquist plot and asked you to tell them how many zeros are in the right half plane of one plus gh you can't unless you know little information about the open-loop system GH namely how many unstable poles there are now one thing that sets Nyquist plots apart from bode plots in terms of determining closed-loop stability is that with Nyquist you have the ability to analyze a system with an unstable open loop plant if you try to determine closed-loop stability of an unstable open loop plant with bode
you're gonna be out of luck because you'll possibly come away with the wrong answer and not know it there are also other examples of other types of systems that will confuse you in bode plot form but will always work perfectly in Nyquist form bode plots are nice because they're easy to sketch by hand however if you have access to a computer you won't go wrong if you always use Nyquist plots to determine stability and stability margins and then just use bode plots for frequency response analysis so this is all I wanted to cover in part
1 of the Nyquist stability criterion in the next video I'm going to explain what to do when your open loop plant has a pole or two on the J Omega axis and also how to determine phase and gain margins directly from the Nyquist plot plus I'll give you a few examples now if you have any questions or comments please leave them below and I'll try to answer them if I can subscribe so you don't miss any future videos and as always thanks for watching