Understanding and Sketching the Root Locus

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome to another video today I'd like to continue our discussion on root locus to briefly recap what we talked about last time we looked at how root locus was really just a fancy term to say where do the poles of a system go as you vary some parameter in the system right and this parameter could be anything but what we decided here is that we're going to focus on a very specific architecture where you have a single input single output plant which is augmented by a single proportional feedback controller of magnitude K and what we were interested in doing now is trying to understand where do the roots of this overall system go as we vary this single parameter K from 0 to positive infinity what I'd like to do today is look at trying to understand how the root locus is given change by hand so we're gonna sketch the real locus manually so that we obtain an understanding of how the root locus behaves as this is going to serve us well in the future when we want to think about designing controllers or compensators using the root locus technique so to do this we're gonna be taking a look at developing five primary rules for sketching a root locus as well as looking at five additional supplemental rules for a total of ten easy to follow rules for sketching a root locus by hand so if all of this sounds like more fun than a roomful of bubble wrap let's go ahead and get started okay so this was the architecture we were looking at where you had a reference input here an output on this side the difference in which created an error that add this controller K created a signal U which went into the plant which they had created the output so this was the system we were interested and again what we learn from our block diagram algebra discussion was that you could reduce this entire feedback system into a single block maybe let's call it T of s right with a reference input and just Y as the output and we saw that this closed-loop transfer function right T of s was just given by K G over 1 plus K G of s right for our single input single output system right okay so what we want to understand now is if you think about this long enough we really want to know where the roots of the closed-loop system are right I want to understand how the entire system behaves as I vary K from 0 and infinity so we see that that's just described by the denominator right here right this is the characteristic equation of the closed-loop system so why don't we call this maybe Delta of s here is 1 plus K times G of s right this is the characteristic equation for the entire system right or the closed-loop system so again I just want to call it into into attention here the difference between obviously the closed-loop system and the open-loop system G ok all right so maybe what we should do here is let's look at an example right now of trying to understand where the roots of the closed-loop system go or sketching the root locus for this closed-loop system here and we're gonna see here that through the whole discussion that now about root locus the easiest way to get a feel for r4 for how these behaviour is like Nike says right it's just just do it right just do a whole bunch of these root locus --is and hopefully you'll start to gain some familiarity so I want to start off with something pretty simple to kind of set the stage of why we might want to understand how to sketch ease my hand so let's look at an example system maybe let's call this let's call it g1 because like I said we're gonna be looking at a whole bunch of different open loop plant so again keep in mind here what we're talking about here is this is the open loop plant G here right so this is really the transfer function y of s over U of s here right it's the open loop transfer function and let's say we got something like this 1 over s plus 2 okay so you can go ahead and calculate the closed-loop transfer function like we did over there and we're going to end up with T of s is going to be something like I think if you do the algebra here you're gonna get K over s squared plus 2 s plus K and obviously the closed loop characteristic equation or what we call Delta of s is just the numerator sorry the denominator of this of s squared plus 2 s plus K so we see that obviously that parameter K has weaseled its way into the characteristic equation here so you can imagine that as you solve k or sorry as you change k and then resolve this this characteristic equation you'll get a whole bunch of different solutions for roots of this characteristic equation of the closed-loop system so what I propose here right now is let's just do something really simple let's just go ahead and brute-force calculate the root locus and what I mean by that is let's go over to Mathematica here in a second and make ourselves a little table here of basically we're gonna pick some values of K like I don't know how about 0 1/2 what else do I use 1 2 & 4 here and then at each one of these K values let's just go ahead and manually solve the characteristic equation here for the two poles here okay so tell you what let's run over to Mathematica here and and do that real quick all right so the first thing we're gonna want to do here is go ahead and define the open-loop transfer function alright I think we call that G 1 of s and that was 1 over SS plus 2 okay and then what we can do is define the closed-loop transfer function right using the architecture we decided upon here we said that was um G 1 of s times K all over 1 plus gk right and let's put this together so it looks a little bit nicer ok and then what we can also do is let's go ahead and extract the closed loop characteristic equation which we called Delta and we said that that was just the denominator of the closed-loop transfer function right ok so here we are so now what we want to do here is let's go ahead and use brute force to solve Delta of s is equal to zero for various K values right so all we're gonna do here is just say solve Delta of s is equal to zero and let's start with K of zero solve that thing for s right and here we go so here's one location on the root locus so when K is equal to zero here is one valid solution here let's also go ahead and maybe let's print this to a number so instead of were you instead of using radicals and all that when we get further along this will print to just a pure numeric number which will be a little bit more helpful for our purposes so let's increase this so let's look at K of 1/2 let's look at K of 1 let's can't look at K of 2 and let's look at K of 4 and here you go so you see here are five different solutions for five different values of K on the root locus so we see that as K starts at zero you start with these poles but as we start increasing K the poles of the closed-loop system start to move around and looking at numbers is never very intuitive to me I like to look at things graphically so maybe what we should do is we should plot all of these different solutions here on the real imaginary axis so if we were to do this let's start off with a k equals 0 term here are the poles here denote as red X's and then as we increase K to 1/2 here's the poles here as the blue X's we keep going up to K equals 1 and they actually seem to meet together there at the coordinate minus 1 0 and then as we keep pushing K up it looks like those poles leave the real axis and they start traveling up vertically so we see the pattern is the poles start at the red X's they come together at some meeting point and then they seem to split off and head vertical now while this is a viable technique for finding the root locus um it doesn't answer the question of why did this occur and what's gonna happen next right we don't have any physical intuition or understanding or ability to predict like do we think maybe if we keep increasing K maybe the root locus is going to go over to the right half plane maybe we just don't know maybe the root locus might even turn around and come back and reattach itself to the real axis so unless we have a better understanding of how the root locus behaves it's impossible to make these predictions here so I just wanted to illustrate this numerical technique just to show that you know what this is a viable option to find root locus but it doesn't yield the understanding that we're looking for so with that being said let's jump back to the road to the whiteboard and start establishing some of these rules so we can start sketching these things by hand without the need and reliance on numerical techniques okay so let's go ahead and start trying to develop some rules that will help us gain this physical understanding and intuition of how a root locus behaves so just to remember here's our closed loop characteristic equation of the entire system let's do one thing here let's go ahead and break apart our open-loop transfer function so what I mean here is let's go ahead and write the open-loop transfer function if you remember it's just a numerator polynomial let's call it a of s over a denominator polynomial B of s something like this so again here a of s it's just a polynomial in s right and if you remember the roots of the numerator polynomial basically gives us all of the zeros of the transfer function right and then B of s is also just a polynomial in s but it's solutions or its roots give us the poles of the system here okay so if I take this and substitute this into our expression of the characteristic equation or I'm sorry excuse me is substituted in our expression of the closed-loop system let's go ahead and do that so let's go ahead and sub into our t of s expression all right so okay T of s is K G of s we said is a numerator polynomial over a denominator polynomial all over one plus K times that same numerator polynomial over denominator polynomial okay now you do a little bit of algebra and I'll skip the boring steps here but if you do this you can basically write this thing to look like K times a of s all over B of s plus K a of s okay so now we see here's an alternative formulation of this characteristic equation the entire system this guy right so what we see now here is I could also write my characteristic equation of the closed-loop system here as basically B of s plus K a of s right and again this is the characteristic equation for the entire or the closed-loop system right ok and naturally what I want to do is look at this is equal to 0 here right so the roots of this will tell me where the poles of the closed-loop system are so maybe I actually know what we maybe should have done here is is let's add a little descriptor here this is not just zeros and poles maybe we should say is this is zeros of open-loop system right of just G by itself right and then similarly this is poles of just the open-loop system right that might be a little bit more clear so let's go ahead and box this up because what we're going to basically be doing here is looking at this equation and this is going to yield a lot of the intuition here ok so with that being said let's go ahead and erase the I'll pause the video erase the board and let's start talking about our first rule okay so rule number one and I hesitate to almost call this a full-fledged rule it's almost kind of a duh yeah this makes sense here but basically the number of poles is unchanged what that basically means here is if you have an open-loop system right this is your open-loop system right maybe let's call it open-loop right and this thing has n poles right and if you remember the way you've got that here is by looking at the V of s right which was again our characteristic equation of the open-loop system here right is the denominator of the G of s polynomial right so this is the order of B of s is basically the number of poles that you have in the system here ok now what with this rule basically states is that when you go ahead and augment it with this type of a control system here or this type of a block diagram the one we're interested in like this this thing will still have n poles okay so adding this control feedback doesn't add any extra poles to the system here okay so let's see how we can prove that to ourselves to make sure that that this is actually the case here right so again the reason that we're gonna get be able to see this here is again go back to our break down here where we said G of s was a numerator polynomial over a denominator polynomial alright and we saw that basically the order of a of s right this is the number of zeros right and similarly we said the order of B of S is let's call that number n here and this is the number of poles okay now let's go ahead and make the assumption here well actually you know what you technically don't have to well I guess I guess we do to make this reasonable here but let's go ahead and assume the system is proper meaning n is greater than or equal to M so you have more holes than you have zeros or the same number here right so basically the order of the denominator is greater or equal to the order of the numerator here right okay so if that's true here let's go ahead and look at what is the closed loop characteristic equation of this thing here right by the time you oughta meant it with this kind of interesting architecture how many poles are there well remember we said that okay that is given by the characteristic equation Delta of S which we had just said is basically B of s plus K a of s all right so if you look at this expression long enough you see that this is basically a polynomial in s of one order well we said that sorry did I switch this here no no and I think I got that right right it's of order M here right because there's M zero so this is polynomial in s and macey we should say order M right this K in front of it is not going to the order of this polynomial ray is just going to multiply all the coefficients by K right this guy over here this is also a polynomial in s and this thing is of order n right so if you look at this long enough right you see it's basically a polynomial of order n plus a polynomial of order M the only thing that's going to happen is you're gonna get another polynomial whose order is either the maximum of N or M right and since we assume that the system is proper we said that n is greater than or equal to M we see that this whole thing we can say has something like an S to the n as the highest power right so in other words what we see is the closed loop characteristic equation of this entire system still has n poles in it here right so we see that you haven't changed the number of poles here right this here is the number of and again I keep dropping off the maybe what we should have added in here was open loop here right is another descriptor here right because M is the number of open loop pull zeros and as a number of open loop poles and that doesn't change when you close the loop with this structure here right so basically we have the exact same number of poles before and after adding this control system onto it right so if you want a quick example here feel free to run this example yourself if you really want to convince yourself here well let's choose a sum like a g2 of s right some other open loop transfer function that looks like a 2 s squared plus 3 s plus 4 all over 5 s cubed plus 2 s squared plus 3 ok so again the top numerator is my a of s the bottom denominator polynomial what I call B of s so we said that for the entire system right which was basically the closed loop system we said the characteristic equation for that was where was it didn't we just have it written down here oh right yeah right here right this is B of s plus K times a of s right so just plug in your B and your a you know run over to Mathematica do the algebra and I'll spare you the boring manipulations of algebra and what you'd basically get here is this is going to be 5 s cubed plus 2 plus 2 K s squared plus 3 K s plus 4 K plus 3 okay so again we see that the open loop system had three poles here right you can see from the denominator here that there's three poles and two zeros okay well the closed-loop system is still a third order polynomial so this is still gonna yield three poles so again rule number one just states that if you start out with n poles after you closed the loop with this type of an architecture you will still have n poles here okay so again it's it's almost one of these things that yeah sure that makes perfectly good sense I don't know why we needed to spend you know five ten minutes talking about it but it will help when we come here and look at our dryer our root locus it basically says that none of these poles are gonna disappear and no poles are going to magically reappear here okay so we got to keep that in mind the number of poles is unchanged here under this type of an architecture here okay so let's pause the the video our race support will move on to rule number two okay moving on to Rule two and rule 2 states that closed-loop poles start at open-loop poles and go to open-loop zeroes and maybe we're gonna put a little asterisk up there here so wow that's actually kind of a long title for a rule here but let's go and see what this actually means here so to see this again let's go ahead and consider the closed loop characteristic equation of the entire system right so it was this okay and again to refresh your memory right the architecture that went along with this here's a you're gonna see us drawing this a couple of times tonight here so hopefully you're gonna get very comfortable with this was that okay so let's go ahead and examine this here so we can make the immediate observation here that note what happens if K equals zero here right if K equals zero let's plug this in here so if K equals zero the closed loop characteristic equation here for the overall system just becomes B of s is equal to zero right and if you remember B of s this was the characteristic equation of the open-loop system right so it's solution yielded the poles of the open-loop system so what we see here is that when K is equal to zero the poles of the closed-loop system are equal to the poles of the open-loop system so that's what we're talking about with the first part of this rule here so it actually makes physically good sense if you think about this here right if K is equal to zero it's like this controller is not even working at all right it does nothing here right so the only dynamics that are that are still remaining in this system here are the dynamics introduced by the oh the original system here so we see that at K equals zero that's basically like saying the controller is not doing anything it's an open-loop system here so it behaves like an open-loop system so great we see that when K is equal to zero the poles are at the open-loop locations this basically tells us that since our root locus were interested in understanding where the roots go as K goes from zero to infinity we see that the root locus it starts when K equals zero at the system's open-loop poles here right ok great let's go ahead and examine the other extreme here so what about when K good tends towards positive infinity here right well again look at our expression for the characteristic equation here it's B of s plus K times a of s is equal to 0 right so as K starts getting bigger and bigger and bigger right this term starts to dominate right because this is you know this is it's gonna start swapping out I don't care what B of s is whatever order it is right this is going to start swapping the solution so we basically get that you're a closed loop characteristic equation at large gang effectively looks like K times a of s is equal to 0 here right and now in this case k is huge so I can divide it through here so we basically get here that the characteristic equation is effectively something like this ok so again if you remember what was a of s a of s was basically the the numerator polynomial of the open-loop system right and if you remember right solving its characters or sorry solving this polynomial equal to 0 yielded the open-loop zeros so what we see over here is again Delta of s this is the poles of the closed-loop system at large K are approximately equal to the zeros of the open-loop system here all right let's go through an example on this you're just to convince ourselves that this is true here ok so let's go ahead and pick a example system here where's our where's my example oh here okay let's pick some transfer function some open-loop transfer function g3 here in this case so I'm going to use an example of here I don't know s plus 1 plus 2i and then s plus 1 minus 2i as a numerator here and the denominator of s plus 2 and s minus 3 here right ok again this is going to be a on the top here this is a of s and the denominator is what we were calling B of s here right so let's make a couple of observations of the open-loop system in other words let's look at the open-loop poles and zeros right so we can immediately see that what there are zeros at s is equal to 1 minus 1 minus 2i and s is equal to minus 1 plus 2i right that's the roots of the numerator and then we have poles at s is equal to minus 2 and s is equal to positive 3 right these are the open-loop poles here right so again I guess if you really want to be explicit right again these are open-loop zeros and open-loop poles right so now what we want to go ahead and do is let's go ahead and formulate Delta of s here right so the closed-loop system its characteristic equation here again at the risk of being overly repetitive let's just write down the characteristic equation here again so it's B of S which is going to be s plus 2 s minus 3 plus K times the quantity s plus 1 plus 2i s plus 1 minus 2i right so here's my closed loop characteristic equation I want to solve this thing equal to 0 so again let's run over to Mathematica here and solve this thing for a whole bunch of varying different case starting low going too high and see do the poles or do the roots of the closed loop characteristic equation they should start here and then they should eventually move to this location as K gets larger okay so let's pause the camera run over to Mathematica and and make sure that's the case all right here we are in Mathematica and for ease of reference I've just transcribed some of the stuff we had on the whiteboard here to the notebook so you can see that we've got ourselves the open-loop system with the open-loop zeros and open-loop poles as we discussed and the closed loop characteristic equation for the system was given by this so let's go ahead and make a function for this and actual let's make it a function of both s and hey here because we're gonna want to be varying k here in a second here to see how the solutions to this changes okay so let's just go ahead and type in the characteristic equation and now all we want to do here is solve this for various K values so let's just go ahead and start with K of 0 here let's solve this thing equal to 0 for s whoops like that there we go and here we go and we see yes this makes perfectly good sense we see that at the at K equals 0 the poles of the closed-loop system are actually the poles of the open-loop system so that makes perfectly good sense let's just go ahead and start increasing this here so let's go ahead and say how about I don't know K of K m1 okay and we get something different and you know what before we get too far down this road let's print all these to a number just so we don't have to deal with all these radicals and square roots and all this kind of stuff okay so here we go we see the poles are moving and as we keep increasing K let's start going up by orders of magnitude how about how about let's go with 10 and then maybe how about a hundred and a thousand here so we're increasing K by orders of magnitude here okay and you see what's going on shucks looks like it's not all on the same page here tell you what let me let me let me let me copy and paste this here cop whoops sorry not cut I want to copy and let's paste this down below just so we can see so again we see that when K is low the system's closed-loop poles start at the open-loop poles but when K is high the system's closed-loop poles start to approach the open-loop zeros so that's actually pretty interesting um you know what we should do though is let's refine this further because if you think about this in combination with our previous rule so let's just write down if you recall rule one right this stated that the number of poles does not change so you might be wondering what's going to happen here if there were a different number of poles and zeros right so for example let's go ahead and augment our example here like what if there were more poles than zero zero okay so for example what I want to say is let's this thing with an open-loop pole of how about s at minus five so I'll put an s plus five here right so now what we need to do is let's oh let's let's redo our list here of we're gonna have to update all of this right so let's copy all this come down here pasted below so the open-loop zeros stay the same right we still only have two open-loop zeros but now there's actually three open-loop poles sorry minus five there we go right so let's change the characteristic equation this should now be s plus five right so this is a little bit interesting here so let's go ahead and redo our analysis let's redefine our characteristic equation I'm sorry let me delete some of this okay so now with the added pole this is s plus five and we can do this again so let's shift enter that and then I'm gonna shift enter this to solve again and now again this all didn't fit in one page so I apologize let me copy all of this stuff and then paste it down below so we can compare the results and we see here again when K is zero right when K is small again we have the exact same result we had before right the closed-loop poles start at the open-loop pole locations here right but now this is fascinating as K gets bigger and bigger and bigger here right rule number one stated that these poles just don't disappear here right there's always gonna have to be three poles but there's only two zeroes for them to go to so what ends up happening is if you look at this here is two of those poles will end up going towards two of those open-loop zeros here so these two closed-loop poles that I've highlighted here in blue are going toward the open-loop zeroes here and that third pole here right well it can't just disappear so what it's doing here is it actually appears like it's shooting off to infinity here this is sometimes referred to as a zero at infinity here and one way I heard this really well explained um if you guys haven't found Brian Douglass's channel Brian Douglas is kind of the king of YouTube controlled videos I'll link to his in the his videos in the description of this video but he kind of said that you know poles and zeros they're sort of like these happy friends they always want to find one another here in the root locus so these open-loop poles either need to go to an open-loop zero or they need to go to one of these open uh these all these zeros at infinity are what these ones are called all right so this is fascinating why don't we go ahead and run over to the white board and write down a consents form of rule number two all right so combining all of this analysis we can basically write down rule two which we said is uh that has this nice long title but we basically see now that the way we can concisely write this down is we can say that the root locus starts right this means start means K equals zero here right so it starts at open-loop poles all right let me erase some of this to get ourselves a little bit more real estate and now that's where the root locus starts and we just saw here that the root locus ends basically this is when K is infinity right it ends at one of two locations so it either ends at a it ends at open-loop zeroes so we saw that the same number of poles that there are zeroes each each open-loop zero will attract one of these open-loop poles so in other words M poles go here so again remember M was the order of the numerator or the number of open-loop zeroes there weren't here right so M of those open-loop poles will go to these open-loop zeroes the other option here is that they either end at zeros at infinity right so you have the remaining n minus M the polls go here so again box this up here's our concise way to understand rule number two so again to cut to to conceptualize this or to summarize the root locus starts at the open-loop poles and then as you increase K as K gets larger and larger and larger some of those open-loop poles are going to get attracted to these open-loop zeros the remaining poles that don't have this nice happy buddy friend as as Bryan Douglas puts it will go to these zeros that infinity far away here so before we leave this here maybe let's just make a quick small note here and I want you to file this in the back of your head because we're gonna come back to this and they'll be helpful when we're designing compensators and controllers based on this if you think about the ramifications of rule number two here you can think that zeros oh absolutely these open-loop zeros they sort of act like magnets for the root locus because you can clearly see right here as you start increasing the gain here these zeros will start attracting or the root locus will start going towards these open-loop zeros here so when we start designing things like PID controllers using the root locus technique you're going to be able to leverage this fact here by if you place the zeroes appropriately you can use it to sort of attract or suck in the poles to to those locations here so again I just wanted to throw that in here so you can think of I like to think of zeros in the in the root locus as sort of like magnets here for my root locus okay all right so let's go ahead and pause the video I'll erase the board and we'll get on to rule number three all right so like a bus coming down a mountain with no brakes let's keep rolling on to rule three and this is again a bit of a mouthful here but it's very powerful here so this basically states here that valid regions on real axis are to the left of odd-numbered poles slash zeros this is when you start numbering from right to left and again yikes that is a large title here but very descriptive I feel so let's take a look at what this actually means here and how we're gonna derive this here so - before we jump into this just recall here let's talk a little bit about a complex number here so if you have Z as being a complex number right if you remember the way we understood this here is you could think of this as like an alpha plus a beta J here right so there's a graphical representation here that this imaginary number Z here might have some alpha real part and some beta J imaginary part but the other way you can think of this right is we could have thought about an imaginary number Z as being a vector in this plane here right with an X component and a Y component we showed here earlier one of our earlier discussions here that you could use Euler's formula to also represent this vector Z here or this complex number Z here so let's just say that you can use Euler's formula to write Z here as basically the magnitude of that complex of this vector right times an angle here or you could write this here as e to the I theta here right where theta was the angle associated with this complex number here right so this here was theta right and here was the magnitude of the of the of the complex number right so this was or this formulation and it was an alternative representation to this sort of Cartesian representation of a complex number right okay so using this here let's go ahead and examine what's the quotient and the product of a of two imaginary numbers here so for example here let's look at here a quotient of two complex numbers and let's call these two complex numbers U and V okay so in other words I want to examine what is a u over V here right okay so again we can use u we can use Euler's formula to write U as magnitude of u times e to the I let's call it theta u right there's some angle associate with u divided by V which is now magnitude V e to the I theta V right which you can actually write this here if you remember our rules of exponents here right this is magnitude u over magnitude V right let's let's main put this in parentheses right as a big giant magnitude here right times e to the I and then this would be theta u minus theta V here right okay and in a similar fashion we can examine the product of two complex numbers again let's use U and V as our descriptor so I want to look at u times V so again that's magnitude you eat to the I theta u times V which is magnitude V e to the I theta V which again let's just group the magnitudes as magnitude u times magnitude V times e to the I theta u plus theta V right so what we end up seeing here is that this angle here right this is the angle of the quotient here right so this is basically well I guess how should we write this here so it's not complicated here right but this is effectively angle of quotient right and here's angle of product right and I guess you can see the same thing here here here's the magnitude of the quotient and right and this is the magnitude of the product alright so in other words here right what we can write down here is that the angle of u over V here right this entire thing we should be very explicit here right maybe we should put this in parentheses right if all I care about is the angle of the quotient here we see that all right that is just the difference of the two angles of those two numbers right this is angle of U minus angle of V right and similarly the angle of U times V right if I want to know what is the angle associated with the product of two complex numbers we see it's just the addition of the two individual angles right so this is angle of U plus angle of V right these are going to be the key results that we are going to use here in the future but you know just in the in the interest of completeness here right I guess you could also say here if we're if we're breaking down these two complex number just as a nice side bar if you want the magnitude of U over V alright again we see here that it's just the individual magnitudes here right so this is magnitude of U over magnitude of V right and then the product here the magnitude of the product of two complex numbers it's just magnitude view times magnitude of V here right so again these two other results that deal with the magnitude are not as important here as the angle for our discussion of root locus so let's see let's see why that is the case okay so let's go ahead and I'll erase this because this is not as important here let's keep up our result of the angle so we can apply that here in a second let's go ahead now and go back to our open-loop transfer function or you know what actually it this is applicable for any transfer function so consider here a general open-loop transfer function so again we were using G of s to denote the open-loop transfer function here and again what this could look like here it's it's just a polynomial numerator over polynomial denominator here so it's a bunch of zeros and a bunch of poles here right so let's just make this like S Plus z1 S Plus z2 yada yada yada all the way S Plus Z M right and then you could have down here you get a S Plus P 1 s plus P 2 yada yada yada all the way S Plus P n alright and you might also have an arbitrary gain to this year let's use the gain alpha here right I don't want to use K because we're reserving K for our parameter we're varying in our root locus so again alpha here is just a constant gain okay okay so alright again this numerator here we said we also call this a of s right and then the denominator whoops I should have missed a parenthesis their denominator was called B of s right okay so we know here that let me see here we showed earlier right that the closed loop characteristic equation right under the feedback or the structure that we talked about all right like this right the closed loop characteristic equation of this system here was given by tell you what let's come over here we're gonna need a little bit of space here to write this out so let's clean off this part of the whiteboard and write down the closed loop characteristic equation which what was we call the Delta here right we said that this is that Delta of S right is B of s plus K a of s right okay so substituting in here the here's our a on the numerator and the B of s down here let's just substitute this in so B of s here is just our S Plus P 1 plus P 2 all the way down to S Plus P n right plus K times the numerator which is a of s right K alpha S Plus z1 S Plus Z 2 S Plus Z M is equal to 0 right ok let's let's rewrite this here so let's see I want to get this thing to look like let me see let's let's move this over to the other sites right well tell you let's not skip any steps let's keep this explicit so we can write this as let's get the left side s + P 1 s plus P 2 s plus P n is equal to I'm going to move that to the other side I get minus K alpha s plus z1 s plus Z 2 s plus Z M right okay now um let's let's divide K to the other side and also I'll move this yep well you know again maybe let's not sigh i I always I always want to skip steps here to make this go a little bit faster but maybe in the interest of making this explicitly clear let's let's do this step by step here so what I want to do here let's divide through by minus K okay now I got alpha s plus z1 s plus z2 s plus Z M okay now let's divide this numerator which was really B of s and move it down to the other side so all I'm left with here on the other side is minus 1 over K is equal to alpha s plus z1 s plus z2 s should be an S excuse me s plus Z em all over s plus P 1 s plus P 2 s plus P n ok great so what we see here is is again this is just another way to represent our closed loop characteristic equation here right and if you look at this long enough it's it's it's a complex number right the left the right hand side s is a complex variable these poles and zeros that could be complex variables so this is basically a complex number equation right now what we want to do here is let's go ahead and just realize so first write down we realize these are complex numbers ok so now let's just consider the angle of this complex number in other words all I care about is let's look at the angle at the left-hand side it's got to equal the angle of the entire right hand side maybe let me put this in big parentheses here because I'm just doing an angle operation on the entire thing and hopefully something is going click in your head now and you kind of see why where this might be related to our boiler discussion we just had right because if you look at this long enough let's take let's think about this now the left hands the left hand side this is actually really easy to deal with right if you think about this what did we do with K so if you recall right for our root locus we are going to consider K in the range of 0 to positive infinity here right so K is the parameter you're varying it's it's a real number right it's a gain here in your in your compensator you're not going to use imaginary numbers here right that would make no sense to have an imaginary controller this is going to be a real number that varies between 0 and a hunt end and positive infinity here right so this left hand side if you think about this long enough what this looks like for any value of K in this region is you basically end up with what if you were to plot this on the real imaginary axis it's something like this all right it's only in this region right as K goes between 0 and minus infinity the term negative 1 over K looks like this so this dark dashed black line is minus 1 over K right so the angle associated for this for any any value of K you can see it's basically PI or I guess minus PI however you want to think about it it's it's it's some 2pi multiple of 180 degrees sorry I mixed degrees and radians there you get what I'm saying here right it's basically PI or negative PI plus or minus 2 pi K so this whole left side this basically boils down to let's just how about let's do - it's the same thing right plus or minus two pi K plus and I apologize for having now lowercase and uppercase K so lowercase K is just some integer here right so you can wrap around 2pi or negative 2 pi or 4 pi 6 5 it doesn't really matter here okay so the left side you can basically see as you can think about it as just 180 degrees or negative 180 degrees or some multiple of it right now the right hand side is where it gets interesting here and basically you see that this right hand side is a whole bunch of products of complex numbers and quotients of complex numbers so we're just going to use Euler's expression right up there to simplify this entire left hand side or sorry right hand side okay well let me keep up Oilers expression because we're gonna use this quite a lot here okay so um let's just let's just break out the whole the entire right hand side so we see that okay the left hand side we said was basically minus PI plus or minus 2 pi K and now the right hand side we basically get what its angle of alpha plus angle of S Plus z1 plus angle of S Plus z2 + da-da-da-da-da-da angle of S Plus Z M right and then since these are down in the denominator right are the quotients we're basically a subtract off them right so then it's minus angle of S Plus p1 minus angle of s plus p2 - yada yada yada all the way up to angle of S Plus P and n right ok so great um let's go let's look at each term let's look at alpha here right if you remember what was alpha alpha was like the be constant gained in the transfer function here let's go ahead and assume that alpha is positive here right so let's go ahead and say assume alpha is greater than zero right so again what is if alpha is greater or sorry what is the angle of a positive number a positive real number what's the exact opposite of this right it's just going in the other direction so the angle is zero here right so I think everyone would agree that this is just a big fat zero okay and then if you look at this we actually end up with out with a major result all these are you see we're just adding this is the the cumulative sum of all of the angles of these these S Plus zeros so in other words what I'm getting at here is the right-hand side I think all of these terms that I'm kind of bracketing right here right would it may be an easier way to write that would be a summation from I equals 1 to M of the angle of S Plus Z I all right and then all of these down here you see are basically another summation but it's just the angle of the poles here right but I got to stick a minus sign here right so this is minus summation I equals 1 to N of angle of S Plus P I all right and then again this equals minus PI plus or minus 2 pi K here and again here where K is in the integers here all right sometimes people write as a script ez or a natural number here but this is basically K is just an integer value right this is is an incredibly important result here for our root locus so we better just box this up here and you see that all it deals with is the angle of the pole the cumulative angle of all of these zeros cumulative angle for all of these poles and we're gonna have to take a closer look at this but I want to stress how important this is because we're going to use this for the next several rules and this is key to understanding the root locus is basically this result here which we see is nothing more than an angle formula looking at complex numbers so in fact this result is so popular and so important that we're going to have to write it a couple of times during this discussion so I actually went ahead and and I made it's so important to me that I even made a little thing here all right so that we can we can pull up every once in a while oh and I'm sorry I flip-flopped the result here but this is this is the result right this is I kind of want to get this framed and hanging above my bedside [Music] we're going to be using this quite a bit here so let's see how this can maybe apply now to our rule number three here okay so the first thing we should maybe ask ourselves now that we've got this result here is we got to ask ourselves what the heck are all these terms like what is angle of S Plus z1 angle of S Plus z2 what does it mean to have an angle of a complex variable plus a complex number here right where does this live in the real imaginary axis so to answer that question let's let's erase some space over here and think about drawing out a clean real imaginary axis and try to label some of these terms here I'll tell you okay so let's first draw ourselves I'll tell you what first let's write down let's consider a term how about s plus z zk some some zero here okay so what I'm looking for is we're trying to look at what is this thing s plus ZK angle of that that complex number right what is that okay so to understand this a little bit better let's go ahead and draw a real imaginary axis as sort of cleanly as I can okay and let's start with a simple case let's start with the case of maybe like a real ZK here okay so maybe in the back your mind if you want to think of this like as something like like what is angle of S Plus I don't know three let's assume how about maybe that that ZK is three okay so that means in the numerator you have something that looks like an S Plus 3 which implies you have one you have a zero at minus three here right so one two minus three okay so you would have this zero right here whatever one agree so this here is minus three or I guess you've also right - zk right that seems reasonable okay so again you got to remember that these are complex numbers so you could also think about them as vectors here right we showed earlier that you could either use or this formula to think about them as sort of as a magnitude and angle here or the Cartesian representation but let's ask where is this vector ZK what if I consider just this term ZK to be a vector well I think you would all agree that if this here is minus ZK wouldn't a vector if I drew it I started it right here at the zero location and I draw it to the origin like this this is the vector ZK maybe I'll put a bar on top to denote that it's it's a vector here right that seems reasonable okay no we could ask what is this s term right s you remember is just some location in the complex plane here right it's a it's it's a location I'd like to consider here so I don't know let's let's pick something I'm gonna I'm gonna use green here and I'll maybe put a little dot here or something like that here this here is like the the point s that I'm considering right so um if that's the point s remember we talked about this can be considered a vector so the vector representation of s would be from the origin out to the vector like this and I'll try to make this this a little bit thicker I know the green is a little bit hard sometimes to show up here so I think everyone agree that this green vector is s and again I'll put the little bar on top of it to denote a vector right okay so if we're talking about vectors then you can add two vectors here's the vector zk here's the vector s so if I add the two here that's here to here right this is the vector S Plus Z K right maybe I put a vector on top of it to denote that right so now now that we've got this this makes a lot of sense because if I want to know what is the angle of s plus ZK here right I just need to look at the vector and I need to look at the angle that vector makes with the horizontal so here's the angle right here right so this turn right here this is basically angle of s plus ZK right and this analysis holds food similarly if if what if what if ZK you might be asking oh yeah maybe this was only for a real access result what if it was imaginary it's it's the same picture here it's the same result just to convince yourself of that tell you what let's let's erase some of this and maybe redraw it right next to it here these are real here's our imaginary okay so now you know what if what if ZK was imaginary right so you would still have a pull out or sorry excuse me zero here this is minus ZK right so the vector is still going from the zero location to the origin this is the vector positive or ZK right and then you want to go ahead and consider yourself some s point somewhere else right you still got the vector going from the origin to that point here it should be a vector version of s right so then I can still add the two together here and you end up with this being s plus ZK right and the angle then is still just what that that angle makes from the horizontal or sorry what that vector makes from the horizontal so this is angle of s plus ZK right so if you look at this and we see that now if you want to evaluate these terms angle of s plus ZK or angle of s plus PK right and that is there's no difference if this was a zero or a pole here right the whole same process still holds right you still draw all these vectors and measure the angles so the the the procedure here to get angle of S Plus and and again I'm just going to use ZK as a representative but this could still be pk it could be whatever right it's just the angle of this funny vector here so the procedure here is step one here is plot location of the 0 right at minus ZK right you got to remember here that that that the actual location of where you plot the 0 is at negative ZK right because you're looking for the value of s that makes this terms 0 right okay so step one is you plot that that location in the S plane at negative ZK right then the next thing what you're going to do here is you would then plot the the location of a candidate s location you would like to investigate or consider or what-have-you right just pick some point in the S plane that you're interested in then step three is all you're going to do then is you're gonna draw a vector from your candidate s point to the location negative ZK here right or to the location of that zero right so next year step three is draw a vector from oh excuse me did I I might have said wait a second did I say that backwards this hold on hold on hold on hold on hold on back up back up I did this wrong here again sorry sorry everyone I drew this completely right I went too fast got two held caught up in the moment it's backwards right I got the I got the direction of the vector backwards so I screwed that sorry guys I royally screwed this up sorry it's it's the other way right if I'm doing vector addition correctly this is s yeah plus ZK yeah it's from the pole to the s location yeah because this is the vector s this is the vector Z K so this is ZK plus s yeah yep yep yep see where I got them I got the direction the arrow completely wrong which will now change the the angle all right so now this is the angle it's it's over PI right this is angle s plus ZK whoops sorry everyone uh yeah okay but sorry let's get back on track this is where I'm at I caught myself right because number three step three here is you draw the vector from the zero location of minus ZK to the candidate point you're interested in right so draw a vector from minus ZK to s right and this is the vector s plus ZK all right and maybe again it's for the bar on top of that just to denote that that's the vector that you're gonna draw okay and then lastly step forth once you've got that that vector right you can easily compute the angle of s plus ZK right by just measuring the angle from the horizontal measure oh sorry by measuring the angle from horizontal to the vector s plus ZK all right as you as we saw over there okay so it's easy it's it's it's not an Alcoholics Anonymous 12-step program it's only a four step program right so this is actually really really simple and again this is so important here that we're gonna we're going to be using this a couple of times I again made ourselves a little handy dandy little cheat sheet here that we can hopefully pull up every once in awhile and here's the force four steps right just plot the location of the zero or pole at negative ZK plot the location of the candidate s point that you're interested in investigating here and then draw a vector from minus ZK to s so you get this blue vector here and then just compute the angle by measuring the angle from horizontal right so there you go okay so we now know how to understand all of those terms in our in equation 10 here right remember we said sorry my notes I call an equation 10 I guess I never really labeled it but this is the root locus angle plot so we see all you're doing here is you're adding all these angles that are contributing from the zeros and then subtracting all of the angles that are contributed by the poles and that better equal some multiple of Pi here right in order for it to satisfy the root locus okay so the way to think about this is in order for a point to be a solution to the closed loop characteristic equation it has to satisfy this angle expression here right okay so let's get back on track now and ask ourselves how is this related to our rule number three here okay so to do that let me let me tell you what let me let me pause the camera pull all this off erase the board and get a little bit of space so we can run through an example okay so what I want to do right now is let's draw ourselves a real imaginary axis okay and now what I would like to do is look at a couple of cases here so first let's only consider s locations on the real axis okay and now if we're concerning only this let's consider two sort of sub cases here so let's think about having maybe a Z K on the real axis and let's think about having a ZK as part of a conjugate pair or a complex conjugate pair okay so let's start with this first case here okay so what does it mean by that here is okay you've just got something here right here's your minus ZK or here's the location of one of these zeros okay now um remember maybe let's go ahead and pull up our little procedure here I'll tack this up on the on the far side of the board so we can kind of remember how we can go ahead and measuring all these angles right what I want to think about now is candidate X locations that are only right we're only going to consider things on the real axis so like up right here there's s okay so we see now that what we're looking for is what is angle of S Plus Z K right is equal to something I don't know right now the way we get to get that angle is we use our little four step process here right so all I got to do now is draw a vector right from ZK to s that's this right and then they measure the angle so in this case what's the angle it's super easy it's horizontal the angle is zero right what happens if I move s2 over here doesn't change it's still zero still zero zero zero zero zero until what happens when you start considering s is on the other side of this now this is the S location right so again I I follow our little four-step process here and I draw a vector from the zero to the candidate point in question and now I look at the angle so ah-ha this is interesting the angle now flips to 180 right because now here's angle of s plus ZK right so here this is actually pretty interesting here so in case a here angle of s plus ZK it's it's only two values that can possibly take care right it's zero if s is to the right of negative Z K which is basically the zero location right and it is what it's PI otherwise or or I guess the otherwise is you can think about it is if s is to the left of minus ZK which is the zero location right so again this was the case a let's now switch and ask ourselves what about in case B here what if instead your picture was let me let me redraw this as quickly as I can here okay you had like a complex one - is e K something like that and remember we know that zeros and poles in any actually any complex convict becoming conjugate pairs right there's another one down here all right okay so now what we can do is we're gonna do the same thing we're only going to consider s locations on the real axis so again look at this here's the S that I'm interested in right so if I'm looking for the angle that's associated with this pole here we can follow our four step process here and I draw a location from here to the s location and then I measure the angle so here's the angle here's angle of s plus ZK right and you see it's it's not zero and it's not this nice PI or anything like that but what's fascinating here is if you consider now angle of s plus ZK right we said that this was the you can see right here it's it's gonna be some weird number depending on where it's located here right but if you consider the angle of s plus ZK plus the angle of maybe Z K Tildy which is its conjugate pair right so that's the one down here this is minus Z K Tildy right that's its sister pair let's look at what is the sum of these two things put together all right so let's get angle of s plus ZK Tildy well same deal I just draw a location from zk- ZK tilde to this s alright and here is this angle all right here's angle s tilde and you can see by symmetry here if s only moves its way along the real axis this stays at zero all the time because whatever angle this top zero contributes you get exactly the opposite angle from the bottom here right so this is fascinating this is a big fat zero all the time it doesn't matter where on the on on the real axis yet you move this green estan it's due to symmetry it's always zero right so that's really awesome and again all of this analysis is the same if these were poles right if these were if I had drawn just a red X instead of a red oh it'd be the exact same story here all right so we can take these two things to the bank here with us and think about using this to to to generate our rule number three okay all right so to generate rule number three here let's look at a slightly more complicated transfer function here so maybe what we'll do here is yeah let me go ahead and erase this and I'll write up the transfer function okay okay so let's look at an example here this is going to be a little bit more complex here let's call it I think G for maybe we're on to our fourth unique transfer function that we're examining here so this is going to be something like s plus 1 plus 2i s plus 1 minus 2i s plus 3 in the numerator all over a s plus 2 s minus 2 s minus 4 alright so again I guess if you want to write this in you our little S Plus z1 s plus z2 s plus z3 we see there are three open-loop zeros and there are s plus P 1 s plus P 2 s plus P 3 there are three open-loop poles here ok so what we can do here is let's plot on our let's make a real and a imaginary axis here and let's quickly just do a pull 0 map of where all these poles and zeroes are are located here so let me see 1 2 3 4 1 2 3 4 2 3 1 okay so let me see here okay let's just deal with how about the the poles first year so we got a pole here at negative 2 here so here's a pole this here is minus p1 right which is minus 2 ok then we have another pointer at positive 2 here right this is minus p2 which is actually positive 2 right and then finally got a pole here at 4 so here's minus P 3 which is the same thing as 4 all right ok now let's deal with the 0 so here's z1 here this is at minus 1 minus 2i down here okay so here is negative z1 which is the coordinate minus 1 minus 2i ok and then we got another 0 up here it's conjugate pair right this is minus z2 at minus 1 plus 2i and finally we got a 0 over here this is minus Z 3 and negative 3 right okay so there's our pole-zero map of the open-loop system here ok and now we got to ask ourselves again remember we are only considering the real axis right RIA rule number three only deals with the real axis we got to ask ourselves which locations here satisfy equation 10 in a case are e again I keep calling it equation 10 because that's what I have in the notes here but let's slap it up here here is our mega do I have enough room for this here well let's put down here right this was our important expression here right this governs which locations in your real imaginary axis in order for it to be on the root locus it has to be it has to solve as satisfy this expression here right so let's eat let's let's expand out this equation for our particular case here right so to do that let me just maybe write it tell you well let's let's write it right underneath of this here okay so this expression I need to sum from I equals 1 up to the number of 0 so that's 3 so I got angle of s plus z1 plus angle of s plus z2 plus angle of s plus z3 right okay this - I got to take all the angles associated with the poles right - angle of s plus p1 minus angle of s plus p2 minus angle of s plus p3 all right and all of that better equal some multiple of Pi right ok so that's all we have to check here ok so what we're going to first do is let's consider now certain regions here so let's call this let's let's start from maybe over here I'm gonna try to find another color that I that I haven't used already and I think unfortunately we are out of colors tell you what let's do let's use green here and I'll draw it I don't want to drive right on the on the black so on but I'm gonna well let's do it like this let's consider this region here so consider this region right so all I want to look at is s values that are in here ok so if that's the case what we need to ask ourselves is we need to evaluate all of these terms over here okay so let's just maybe to make this a little easier let's let's write it over here maybe we write a box and I apologize I'm not using the whiteboard space as ideally as I think we we would like here but what I want to do is let's ask ourselves a question what are each term or maybe it was is yeah what is what is each term in the region of interest so in other words I want to look at what is angle of S Plus z1 what is angle of S Plus z2 angle of s plus z3 angle of S Plus p1 angle of S Plus P 2 and angle of s plus p3 okay so let's just start going through it right and you remember now we can use these two rules that we just developed here right so angle of S Plus z1 where is z1 oh actually crud z1 and z2 we see that these are these pairs here right so we actually need to consider both of these two together so let's go ahead and put these two sort of together maybe we should have written this yes angle of s plus z1 plus the angle of S Plus z2 I want to look at their Condor there's some together here right so we see that along this region right it's at 0 right any complex 0 here or actually complex pole it's always 0 I don't care where you are in what region it's always 0 so this is just a big fat 0 right ok let's look at angle of s plus z3 here so the rule was if the s location you're interested is to the right of the pole it's an equal contribution to zero otherwise it's PI so this region right here is definitely to the right of 0 Z 3 so this is going to be 0 right and we do the same thing for all these other poles p1 p2 and p3 the region we're interested in are to the right of both p1 p2 and p3 so these are all 0 right so you plug that in here you get a 0 plus well actually sorry I want it again these two are sort of the mutant pair that go together here right those turn into a 0 this is a 0 minus 0 0 0 right so what do you end up with the right hand side is just a big fat 0 0 does not equal some multiple of Pi right so it fails location in this region does not satisfy the critical root locus angle equation so this region is not on the root locus it is in infeasible for poles to be located there here so this is this is a no-go right let's just put this I don't know how about how let's put this as bad let's go back yeah here I'll just do it in green here bad ok so that region is not good let's move ourselves down to this next region between these two poles okay so we're gonna do the same thing here so let's go ahead and now consider this region okay and again we're just gonna reset our analysis okay zeros and we ask ourselves the same question in this region what's changed well this is still zero right z3 we're still to the right of Z 3 so this is zero we're still to the right of P 1 this is 0 we're still to the right of P 2 so this is zero but aha look at this this is interesting we this region is actually to the left of of pole P 3 so angle of s plus P 3 according to our rule earlier it's actually pi or minus pi however you want to look at it right so this is this is like pi right or or or minus pi it really makes no difference here right I guess maybe at the rule we should have said you can make this plus or minus pi the same thing it's just a multiple 180 ok so there we go so let's just fill in this this and check right so now we said that all right this is still zero this is zero zero zero and like minus PI or plus PI something like that so we end up with this thing as basically the right hand side is minus PI or plus PI which actually is some multiple of Pi soyeah anything in that region satisfies this equation so yes this is good this region is good maybe so I'll fill this in was like kind of a green because we're basically showing that this region of the root locus satisfies it so yes these this is a valid region of the root locus let's just move on and down right so then you do you see the pattern at this point right consider this region right you move it a little further again reset our analysis all right okay so again these guys are always a big fat zero we're still to the right of Z three so that's zero we are still to the right of P 1 so this is zero and now P 2 but this yeah this region is what we're considering here right now where we are to the left of P 2 so angle of S Plus P 2 is PI and so is we're still to the left of P 3 here right the region of interest over here is is it's the left of it so this is also pi great so you get a 0 0 0 pi pi so the right hand side comes down to like minus 2 pi which actually is not a multiple of 1 pi here right there's no integer K that would make this work so does not work so this region is bad right so this is bad does not satisfy here right mmm ok so now moving our way down let's tell this region and by now I think you've seen the pattern here right again reset our analysis here and you basically ask yourselves the same question does the S locations in that region satisfy our our root locus equation so again this guy's a big fat 0 Z 3 we are still zero but now all these guys are pine right because this region here is to the left of all of these poles here right so yay we end up with the zero zero pi pi pi so we get minus three pi which yes indeed is some multiple of negative two negative pi here right so yeah this checks out so awesome we can go and fill this region in so this is now good and I'll fill this in with okay and lastly the last region we have to consider here is this to infinity here so now we're in this region so again we set all of our analysis and you do it again all right and we see okay zero and how that region is to the left of frickin everything so you get a pi pi pi and pi right so this is zero plus pi pi pi pi so you have plus 1 pi minus minus minus so i think this ends up with minus 2 pi right which is not some multiple of 1 pi so bad this region does not satisfy the root locus here so we end up with these these regions here and here which satisfy the the root locus equation here that we said was so critical so with this you basically see the pattern that this again would work for poles or zeros it doesn't matter as long as we are only considering regions of s which lie on the real axis so this is the crux of rule number three you see that basically you get these these alternating sections of repeat of a valid invalid valid invalid valid invalid right so what you do here is if you look at this and if we had just looked at only the poles that are on the real axis and you just start numbering these things starting from the right to the left maybe I'll do this in a a different color let's do it let's do it in black here so let's call this this is either pole or 0 number one it doesn't matter if it's a pole or 0 and then you come here pole 0 number 2 and then you could number these two if you want they come in pairs it's not going to matter so for example let's call it let's just do it for fun pole 0 number 3 and this is now pole 0 number 4 and then you get pole 0 number 5 and then pull 0 number 6 ok so if you look at that numbering scheme here you see that the rule is valid regions of the root locus are to the left of odd-numbered pole 0 pairs here right so to the left of 1 is is valid here and again this is only you only consider the ones on the real axis right because it doesn't really make any sense to like what the heck does it mean to the left of this site this is not a valid region so you only look at the pole zeros that are on the the real axis here and again you just look for which ones are on so this one is yeah odd to the left is good here's an even number so this is bad here's an odd number to the left is good even number bad here right so great this yields our our rule number 3 that may be let me erase this and we'll write down our rule number 3 here ok so rule 3 is basically that valid regions of the root locus on the real axis so that part is critical right we are only considering valid regions on the real axis so the valid regions are to the left of odd-numbered poles slash zeros this is when you start counting slash numbering from right to left right so great let's box this up here's rule number 3 right okay great so uh again give me a second to pause the video erase the board and we'll keep on moving on to rule number four okay so now we are on to rule 4 and this has to deal with what we're going to call the angle of asymptotes as well as the centroid of the asymptotes okay so um to set the stage for this maybe what we should do here is let's consider an example transfer function here again let's just pick another one let's call this chief about something like 2 over s plus 1 all over s plus 1 plus I s plus 1 minus I something like this ok and what I want to do now is we can start actually sketching a pretty reasonable root locus using our three rules here that we've developed so far so rule one we see that what there will be two lines slash poles alright the number of poles are change so there's two over loop poles are still going to be two closed-loop poles so rule 2 here said that ok we have two poles and one zero so one pole will go to open-loop zero right and one pole will go to zero at infinity all right and then rule three we saw was that valid regions on the real axis are to the left of odd-numbered poles / zeros so if we go ahead and sketch this thing out right let's go ahead and draw ourselves maybe a real imaginary axis and quickly look at the poles in 0 so obviously we got a 0 here as minus 1 and we got two poles at uh here and here sorry while this red pen does not look in so hot there okay so that's our our system here so let's see here we know that okay applying Rule three here that the valid regions of the root locus are to the left of odd numbers as we go along so we know that there should be a root locus branch here kind of going all the way off to infinity and we know that one of these poles has got to eventually end up here and the other one has to go to infinity so you know what it's probably gonna do something like you know both these are gonna come down maybe they'll meet here and one of them is gonna go this way the other one is gonna go the other way so it's something like this so you can see we're starting to get a reasonable behavior or understanding of how this root locus is going to behave just with these three rules now this fourth rule here is dealing with this one pole or multiple poles that are going shooting off to infinity what we want to ask here is what angle are they going to shoot off with you know I drew it like this where it's just flat and that sort of makes sense but how do we know that it doesn't shoot off at some angle like this or like this or or some other direction here right so we know that there are n minus M poles that go to zeros at infinity right so now what we got to ask ourselves is what is the angle that these things shoot off at okay so to answer that question maybe what we can do here is let's let's consider you know an arbitrary example so consider a pole-zero map and open-loop transfer function okay so again you know what we could even use something that is very very similar to what we just drew here okay so here's your real here's your imaginary axis but what I want to do is I want to zoom in a little bit our sorry excuse me zoom out a little bit so again let's let's take that picture and maybe you know you got something like this and you got something here and here something like that but now what I want to consider here is as some of these go to infinity some of these s locations are going to be very very far away from this so like let's choose like an s location way out here right and now what we I want to ask ourselves here is we remember that the way root locus works is root locus is really talking about our good old friend the angle equation here right so let's put our angle equation here all that's asking about is where are all of the angles beats from each of these poles and zeros to these candidate s locations and again maybe to help ourselves remember how to do that we can go grab our handy-dandy friend here our four-step process right so what we need to do here is I need to look at the angle each one of these terms make and when they contribute to the larger equation is basically draw a line from the pole or 0 you're interested and to the s location you're interested in and this angle this is angle of S Plus I guess if we wanted to label these maybe let's let's quickly label these let's call this p1 and down here is p2 and then here's z1 and I guess these are all negative all right this is like we talked earlier this is that located negative p1 negative P 2 and negative z1 here right so this here is angle of s plus p1 right and then similarly you draw on it you draw a line from here to here and this angle here is angle of S Plus z1 right and then lastly you draw another one here and this is angle of s plus p2 now I think you get the picture right is you can see as you go farther if if s the ones that you're the s locations that you're considering are extremely far away from all these poles like at infinity all of these angles are effectively the same thing here right so let's call all of these angles like I don't know let's call it Phi a how about all of these are approximately the same angle let's call it Phi a right so it doesn't matter where all these poles are they could be imaginary complex on the real axis whatever as long as you choose s locations that are sufficiently far away at infinity this is a completely valid assumption that all these angles look effectively like flying so if we we write this down here and we actually think about expanding our root locus angle expression here all right we can do that here and we basically end up with again let's write this down for a couple of times so that looks like angle of s plus z1 plus angle of s plus z2 + yadda-yadda-yadda plus angle of s plus z m- angle of s plus p1 plus angle of s plus p2 + no sorry excuse think these are minuses - angle of S Plus P n oh sorry I forgot the ellipses - dot dot dot minus angle of S Plus P n has got to equal some multiple of Pi all right now what we see is all of these every single one of these is basically Phi a this is Phi a this is Phi a this is Phi a this is Phi a this is Phi a and this is Phi a if we are considering s locations at infinity and far far away so what we end up with here is you end up with Phi a plus Phi a plus yada-yada plus Phi I minus Phi I minus Phi a minus that it ended up minus Phi a and you get all these pluses show up you see what there's there's M of these so this happens M times right and all of these minuses happen n times the number of poles right is again equal to minus pi plus or minus 2 pi K right so we basically end up with you could rewrite this thing as M Phi a minus n Phi a has got to equal some multiple of minus pi right or I guess if you want to solve this for Phi a you could basically obtain this expression here so Phi a is if you solve this thing you would end up with minus PI plus or minus two pi K all over M minus n here right where if you were to again simplify this here you could get this thing to look like 1 plus or minus 2 K times pi all over and minus m right so this if you think about it is an expression here for the angle of this asymptote in the sense that as s gets far away it has to always follow this angle right this comes out to be a constant number here now the thing we should ask ourselves is how many asymptotes are there okay so let's come back over here and finish this because uh maybe I should maybe I was premature in boxing that expression because we're not quite a hundred percent done here because we should ask ourselves um how many asymptotes are there right so really this is an equivalent question to asking how many zeroes at infinity are there right and we know the answer to that there are n minus M zeros and affinities so in this example here right there are two poles and one zero and one of those those lines are going to shoot off to infinity here right so basically what I'm getting at here is this indexing value of lowercase K here if you think about this long enough you got to make sure that there are only as many asymptotes as there are zeros at infinity here right so what we have to do here is we got to be a little bit careful about the indexing here so let's go ahead and consider this example right here we see here that the answer here is one of these things should be here at an angle of Pi right so Phi a we should have one of these angles and it should be at PI right because that's the angle that this thing goes off with right so if you look at this here in order to get that answer here K has got to start from zero right when K is equal to zero you basically get what Plus is here so you get one you get PI on the top minus two minus one so you get yeah yeah alright so again what I'm getting at here is again what we should write here so let's write down the expression for Phi a so Phi a was 1 plus or minus 2 K times pi all over n minus m and now we see that k it starts at 0 here right and it goes up you know you go 1 2 all the way up to you don't actually go up to n minus M here right you got to subtract off 1 you got to go from n minus M minus 1 right to take into account this the this zero-based indexing here right so you just want to make sure you don't run into the to the off by one error here when we're indexing the numbers right this is sometimes called the the starwars error right does everyone know why this is called the starwars error when you're when you're off by 1 here when you're when you're off by 1 right that's that's this problem here or your OB 1 get it OB 1 no does that make sense anyway ok now it was that I think we can box up this entire expression here so this is a valid way to compute the the angle of the asymptotes here of how they shoot off here to infinity ok the other thing that maybe we'll state without proof here is that the sense the the where all these asymptotes converge at is sometimes referred to as the centroids of the asymptotes let's just write this here it's call it Sigma a here so this is the centroid of the asymptotes and basically this is sum of all the location of the poles minus all of the location of zeros all of this divided by and minus M here ok so it's basically it's you can think of it sort of like as the center of gravity of where all of the pole and zero locations are so the other expression for this I guess if we want to be explicit shoot I'm running out of room let me let me let me move our little four-step process I think we don't need right now okay all right so this is going to be some of - pique from I or sorry from from K equals one to n minus the sum of negative zk k going from 1 to m all over N minus M okay so this here if we box the bottom one up so both of these two equations together the first one will give you the angle of the asymptotes and this second equation for Sigma a will give you where to sort of draw the the convergence point of all of these asymptotes here so this is basically example 4 here our rule number 4 how to contribute the calculate the angle of asymptotes as well as contribute calculating the center of mass of the asymptotes so tell you what let's let's go through our an example of this here and actually here look let's look idiot check ourselves first with with this one here let's make sure that we get an angle of 0 here so plugging in our angle for the our expression for the angle of asymptotes here right we see that this is going to be 1 plus or minus 2 K PI all over what is N and there's two poles minus 1 Pole and we see K goes from 0 all the way up to n minus M minus 1 so it actually just goes to 0 so we you plug in 0 for this and yeah we end up with this whole thing smashes down to PI so great that checks out let's check out maybe a more complicated expression here to see how this works a more complicated example ok so to get that more complicated example let's go ahead and erase this to get ourselves a little bit of room okay so oh do do do to do where's our example here let's do something more complicated so let's call this a g6 so this is going to be S Plus 3 all over s plus 2 as five plus 2i s plus five minus 2i s minus four and again just to be explicit here all right this is our S Plus P 1 s plus P 2 s plus P 3 or sorry sorry haha whoops no no try that again a walk it's getting a little bit late in the evening sorry Z 1 the zeros go on the top the poles go on the bottom right P 3 how many poles we got four right s plus P four right ok so in this case we obviously see that all right we have Z one here of three which is basically a zero at minus three and then you got a P 1 value of 2 which is a pole at minus 2 all right that's this guy right here you got P 2 its value is 5 plus 2i so here's your pole at minus 5 minus 2i and a p3 here of 5 minus 2i meaning you got a pole at minus 5 plus 2i or hey you got to flip this and be very careful with all these negative signs here right ok so P 4 is minus 4 here which means you got a pole at positive 4 right ok so we can quickly sketch this thing so let's let's draw ourselves a real imaginary axis here ok so let's just go ahead and plot this guy out ok so you got a 0 here at -3 let's just here here is minus z1 ok p1 here at minus 2 you got something right here here's minus p1 p2 here you got this thing at minus 5 minus 2i so here's p2 there's negative p2 I guess and then it's complex to pair up here this is minus p3 and then this guy last one is over here at positive four so here's - p4 okay so that's the open-loop poles and zeros so let's go ahead and compute our angle of asymptotes and the centroid of asymptotes okay so the first thing we got to go ahead and check is again how many asymptotes are there going to be here so there are going to be n minus M asymptotes right so there's going to be what do we got we got 4 minus 1 so there should be 3 asymptotes ok so our expression for the angle here is Phi a is going to be 1 plus or minus 2 pi K times pi all over 4 minus 1 and K is going to run from zero all the way 1 all the way up to n minus M minus 1 here so it goes up to 2 so I guess let's just do this K goes from 0 1 2 that's how this this works out so all we got to do is you make ourselves a little table here of K versus Phi a so K is going to go from 0 1 2 okay so you go here and you plug in K equals 0 to this whole big expression here and what you'll end up with here is this is going to be PI over 3 or I guess if you want this in degrees that's that's 60 degrees okay for K equals 1 you plug K equals 1 into this whole expression you end up with this is going to be PI or I guess 180 degrees and you plug K equals 2 into this expression here and you're going to end up with 5 PI over 3 or 300 degrees okay great that's all of our angle of asymptotes and now let's get ourselves the centroid of the asymptotes shoot where am i I'm running out of space here let's do it over here let's erase our little Star Wars error here and try to just basically repeat that so Sigma a here right it's just summation of all of these terms over the number of zeros so let's get this real clear here so this is going to be a negative P one all right - P 2 minus P 3 minus P 4 right that's this term minus negative Z 1 right it's not what we end up with ok great all of this all over n was four that's four poles minus one okay so now all you got to do is plug in all of these P values into here again taking into account being careful about the signs just to be maybe to be completely explicitly careful about this let's just write this out so negative what the heck was p1 p1 is this thing - negative 2 minus 5 plus 2i all right minus 5 minus 2i minus a negative 4 all right minus negative what is z1 3 they're all of that all over 3 right let me just make sure I double check I got that right now this yeah yeah okay so you crunch all these numbers here right and you end up with this here is negative 5/3 great so if we come over here to our picture I'll do this maybe in blue negative 5/3 shoot I should I shouldn't label this negative 5/3 I think is something like what is P 1 that's negative 2 so 5/3 there's a little lesson - okay so right here around here is about Sigma a so that's the centroid of all of these asymptotes here is right here this is negative 5/3 right and now we see that they shoot off at angles of 60 degrees 180 degrees and 300 so 60 degrees is something like I'm gonna maybe butcher the hand sketch here right but this is one of these asymptotes here at Phi a is equal to 60 degree then you got another one at 180 degrees like this right and you got another one here at 300 degrees right so these are the asymptotes where the root locus is going to eventually go to here right so what might this start looking like if we if we really want to sketch it so again I'll use this green hopefully it shows up a little bit least we can prime the friend the pump a little bit okay so let's start sketching this thing so to the left of all the valid regions so again here to the left of all the odd-numbered one so here is a valid region of the root locus and then this is nothing and then to the way 1/2 yeah I'm in here here's another valid region like this ok so what is this gonna probably mean here so look at these two poles these two poles are probably gonna come together they're probably gonna meet here in the middle here and then they're gonna break off and they're probably you know based on these asymptotes we know that eventually three of the poles have got to go to these locations here right so what that probably means is I bet it does something like this where this thing will approach the asymptotes here and then as you get far enough away these guys are just going to start matching the asymptotes here right and that's similarly right here where what's going on here well we know that this zero right this acts like one of these magnets here so it's gonna it's got to attract one of these two poles so I bet these two poles do something like they come down maybe together they they eventually meet here on the real axis and then one of them splits up and goes this direction and the other one shoots off to follow this asymptote at 180 degrees here right so again you can kind of see that with these four rules we're really cooking with fire now here you are cooking with gas you can actually get a pretty reasonable understanding of what's going on here okay so uh again rule number four here maybe we should weigh we should write it down just to be completely explicit is basically the angle of asymptotes so shoot I didn't arrange the board very well again but basically let's just write it down so rule 4 here is just the angle of asymptotes and the centroid of the asymptotes are basically what we just arrived here right so here and here right that's rule number four here is two ways to quickly compute where these it these asymptotes are located and what angles they shoot often okay so let's pause the the video I'll erase the board and we'll get on to rule number five okay so here we are on to rule number five and this deals with sketching the angle of departure from a complex pole okay so uh to set the stage for this let's go ahead and again to consider an example transfer function I think let's call this g7 I think we're onto our seventh example function here let's make this guy look like and as plus two in the top here and then down on the bottom and s s plus five plus 3i and an S plus five minus three I am okay there we go okay so the first thing we want to maybe do here is let's go ahead and draw ourselves a pull 0 map of this guy all right so we see that this guy has one 0 here at s is equal to minus 2 so here whether su minus 1 minus 2 minus 4 minus 5 ok and then let me just let me just get a couple of X's here okay so let's go ahead and write ourselves a 0 here all right so here's a negative z1 here right this is at minus 2 okay then we've got a pole here at the origin here so here's minus P 1 which is at 0 and then we got a pole here at minus 5 minus 3i so that's over here minus 3i so something like this so here's minus p 2 which is -5 minus 3i and then we got its complex conjugate way up here so this is minus p3 which is minus 5 plus 3i okay so that's our pole-zero map okay now what we want to go ahead and consider here when we're asking about the angle of departure here is we know from our previous rules here that these poles all these poles are going to move here and some of them are going to go to the zeros some of them are going to go to these asymptotes going towards zeros at infinity here right now with these poles here in the complex variety the question is which direction are they going to shoot off in first here so what angle are they going to depart this location from so you know are they gonna go this down are they gonna go straight over they're gonna go up here we we just don't know which direction that's what we would like to suss out right now so what I want to suggest here is let's look at all these poles and let's think about where are they gonna move as as K goes from zero to something infinitesimal something very small well I want to know what does the root locus gonna look like right at the beginning okay so this pole is pretty easy to understand here right this pole at negative p1 we know that from our from rule number oh gosh we're number one I was at 3 or 2 we know the real axis here this part to the left of the odd number is going to be the valid root locus so we know this pole is headed to the left so I'm gonna maybe draw it I don't know something like this right let's call this maybe like s1 right it's the pole location from where p1 started till where it just moved just a tiny bit okay and now similarly for s2 and s3 you know this pole it's gonna leave and move in some direction I'm gonna arbitrarily draw it I don't know maybe like this okay so here's s2 and similarly up here let's draw something very close here this is s3 ok so the question is we don't know where these s2 in this s3 though those are the ones that we're actually very interested in okay I want to know which angle do they leave the original pole locations all right so to figure this out we got to go back to our good old friend the root locus angle equation the thing that I keep referring to us as equation 10 here our good old-fashioned angle formula and let's write this thing out for this particular situation right so for this situation this looks like all right I got to sum all of the zeros we don't got it we don't have too many right so this is the angle of S Plus z1 right that's our first term that's super duper easy - angle of s plus p1 plus angle of s plus p2 sorry a - all right - angle of s plus p3 right had better equal some multiple of Pi all right ok now this has to be true for any s for any s that we would like to consider here on the the root locus it's got to satisfy this let's just choose this s3 here let's ask where does s3 have to be in this complex plane to satisfy that equation so in other words what I mean here is I want s3 let's put a subscript 3 on all of these just so we know which location where we're focusing on right ok so now what we're assuming now is s3 is really really close to p3 here right because I'm looking at which angle did it did it apart so K is like epsilon K is like 10 to the minus 16 so it's really really darn close to this so we got to look at all of these terms s what angle of s3 plus z1 so what is this term right here well again use our little handy-dandy four-step process right right that told us okay if I want to find out the angle of any of these things all right all I got to do is basically draw a vector from the zero location from z1 to the location question which is s3 here so in that case let's look at this first term angle of s3 plus z1 so I've got to find z1 this is the pole in question our sorry the 0 in question and I've got to draw a vector to the s in question which is up here this is the the angle the s the location I want to investigate so that is like this alright so this blue line is s 3 plus z1 the vector right and now the angle I'm looking for is this angle right here right so here is angle of s 3 plus z1 right okay so great this isn't too bad to get now because from geometry you can basically see here that I guess this is wasn't drawn exactly the best here but because s 3 is infinitesimally close to P 3 I think you would all agree that I could sort of draw this vertical line that should come down through here that minus 5 right so you can basically see here that this angle is a inverse tangent of this X component and this Y component here right so maybe let me explicitly write it out here because you can see you can see the triangle right that's gonna give me this angle it's looks let's let's write it out here so I'm not so I'm not skipping steps here what did I do the pen oh here it is okay so let's look at this first term here so we can basically get here that did it to the word that I put this okay here so let's do each one of these components one at a time here so let me scoot over our little handy dandy plot so we can get a little bit more room this is why this is nice that this is mobile I can move this around the whiteboard all right so now let's consider each one of these terms right so consider each term right so here angle of s3 plus z1 here right this is basically an arc tangent right an atan - or an arc tangent now you again we got to be careful of which version of the four quadrant inverse tangent you're going to use here let's assume we're going to use a version where you pass it the x-component first and then the y-component this is something like Mathematica which is exactly opposite of MATLAB so you got to be careful in MATLAB it wants you to flip this order the first argument you give it in Malibu is the Y component the second is the X if that's a software implementation issue I think you'll all see what we're trying to get it I just want to make it explicitly clear what we're doing here so okay atan2 of what is the X component of this triangle it's this distance right here right so you can see that it's one two three it's negative 3 is the value but if you want to programmatically get that right what you would see here is this is what is the it's -5 right - minus 2 right that's the X component so here's the x value that you end at and here's the x value which you start at right so the start the ending minus the start will give you the proper x dimension here or that proc proper x-link here and now the Y is where did you end here that's up at 3 minus 0 right does everyone agree here ok so if you go ahead and plug this in here you would basically get that this is what 135 degrees ok great ok so we got the first one let's go and get this next term here I need now angle of s3 plus p1 what is that ok so let's go ahead and come back over here and and redraw our picture so let me erase the blue I don't need this blue line anymore ok and the sorry I know this is gonna be a little bit this is gonna get a little ugly let me see if I can do this cleanly without screwing too much up so I kind of butchered some stuff let's let's redraw this so this is all looking halfway reasonable ok so now where is s3 plus p1 so let's use our little 4 that plan we got over here and get my blue pen and I got to go find p1 right so where's p1 p up he ones here here's p1 so I've got to draw a line from p1 to s3 so P 1 up to s3 great there we are and again you see it's just a different triangle right so this guy should should have come down to here at minus 5 right maybe we should have labeled this right this is - 1 - 2 - 3 - 4 - 5 this is 1 2 3 - 1 - 2 - 3 there we go right okay so here we go let's just go ahead and find this here's the angle that we're looking for here right that is angle of s3 + p1 right so going through it again you see you already got the triangle set up I just got to find the x component and the y component so go ahead and atan2 this thing again again give it the X and the y component so this is a tan - of what's the X component this is now - 5 - 0 right and 3 - 0 all right ok great so you run those numbers and where do they okay and this comes out to 149 0.04 degrees something like that all right approximately maybe I maybe I should say approximately great okay so now let's keep going here so I got these two terms I now need angle of s3 plus p2 okay great so let's go ahead and again erase all this ok erase all the blue here because we can go ahead and try to identify the one looking for now all right let me clean up my picture a little bit here try to redraw it as much as possible okay all right following our four-step plan we got to find p2 while p2 is down here ah lucky for us this is gonna be pretty easy here so this I draw from p2 up to s 3 which is basically right there sorry for the for the hack job you basically see it's 90 degrees here right I mean but if you want to be completely formal about it here you see that this is now a tan to the X component is is zero right it's minus five minus minus five right that's the that's the change in X and then the change in Y here is a 3 minus minus 3 here something like that this basically gets you in ninety degrees right it's straight up right cuz if they're a complex conjugate pair okay and now whoa oh shoot I didn't oh my computer decided to go to sleep hold on a second I gotta go shake the mouse here to make this thing wake up I was sitting here talking too long come on come on there we go okay now the last term that we need here is is this thing right here angle of s3 + p3 and this is the catch here right let's think about this erase all the blue okay and let's come back and think what what is this an angle of s3 plus p3 that's right here I draw a line from p3 to s3 okay and this angle now right here this is angle of s3 plus p3 if you think about this long enough this is exactly the term that we're trying to solve for right this is the angle of departure of how does Pole s3 leave pull p3 here right there infinitesimally close to each other the only thing is like what is the angle of this infinitesimal closeness here right so this is actually what we're trying to solve for here so you know what maybe we should just call this a value let's call this theta 3 this is what we're solving for here right this is the angle of departure of Pole s3 from from our pole at minus p3 right this is what we're looking for okay great so we basically this is perfect cuz this is now known known known unknown known so basically just solve for this theta3 here alright so what we end up with yours um let's just write solve for theta three okay what is angle of s three plus z1 we just figured that out right so this is 135 degrees minus s 3 plus P 1 where is that that we just figured that out here okay - 149 0.04 degrees - this one right here s 3 minus P 2 plus P 2 that's their 90-degree one right - 90 degrees minus theta 3 right the thing we're looking for has got to equal I guess now that we're all talking in degrees this is now this is 180 degrees plus or minus 360 degrees K right ok so you see all you got to do is solve for theta 3 here and then you're basically done here so in this case we end up with a theta 3 of what do we end up with seventy five point nine six degrees plus or minus 360 K right so this is awesome so actually our picture there is halfway accurate here right so we see that the angle of a departure it does kind of go up in this direction right this is about what do we say it's about 76 degrees all right that's the angle of departure here and by symmetry right you we could we could repeat the process for this with this s2 here right but we know that from symmetry this angle that it's going to depart at right here this is angle of s2 plus p2 right this is going to be approximately what negative 76 degrees right just from symmetry since their complex conjugate pairs they always have to stay complex conjugant pairs so it's gonna have the exact same angle well it's gonna have the negative angle of departure that the that it's it's conjugate has right so this is pretty awesome we can generalize this format right you saw that all this is doing here is you take our original governing root locus angle equation and you basically leave every term out set for the angle of departure from the complex pole here and you basically isolate its solution here all right you isolate its angle you will know every other term in this expression except for the angle that you're interested in right so the generalized form of this here is maybe I'll write it up here where we've got a little bit of room here Oh actually you know what now little here let's take let's take away let's take a little four-step thing carrousels a little bit more White's board space here so the general form of this here is theta let's call it J here right where J is the pole the complex pole that you're interested in here okay so this is going to it's gonna look very darn similar to this except you're gonna have to move things around right so this is going to be generalized to be do to do to do okay this is going to be positive pi plus or minus 2 pi k plus shoot and actually you know what I'm gonna run out of space let's move this up here let's uh let's let's let's scoot this over all so let's write it right here okay so here's our here's of the term here so theta J here right so again this is the thing you're solving for this is angle of s J plus PJ here so in this case PJ is the complex this is the complex pole in question right and this is where we're trying to find and this is the angle of departure here right and we saw that this is now going to be positive pi plus or minus 2 pi K right plus we're going to sum from I equals 1 to M all of the angles of s are sorry sorry sorry not s it's going to be P J plus Zi right minus sum from I equals 1 to n but I cannot equal J right this is the one that you're leaving out here angle of P J plus P i okay great let's box this up and then let's talk our way through this thing a real quick just to make sure we're all on the same page of how to how to read this right this is the generalized form of the process we just went through here right so again left hand side here theta theta J is just another fancy word for this term right angle of s J plus PJ so this is the angle of departure from pole complex Pole PJ here right and that's going to be equal to this term right it's gonna you got a positive pi plus minus 2 pi K Plus this term right here it looks a little bit different here all right this term is basically I guess in this case we only on one one term in here one there's one zero here but if you had more than one zero you would sum up over all of them and what we did here right is if you look at this s3 we made the argument that s3 is basically p3 here right it's basically the exact same pole so s3 and p3 are the same thing here right so that's why this is reflected as this is the pole in question right PJ all right this is the one that you're trying to depart from here okay and then you just sum over all the zeros and then it's the same story for summing over all of the poles here right so this summation term is these terms that I'm doing in red it's these two terms right and again same thing here right s3 is this green X right here is basically this red X of p3 here right so that's the PJ term right and the P I is all of the other poles that you're summing up over you're summing the angle from p1 to p2 but you don't do the angle from p3 here right this is the key the key thing we got to make sure you don't miss you leave one of them out right you leave out the pole that is the complex pole in question here right so again J maybe we shouldn't maybe we should have added that here oh no we did here yeah we said PJ is a complex polling question here right so you sum over every other poll here right so just I can't stress this enough right let's just say note you sum over all polls except pull in question and I guess we want to be even more explicit we could say except complex pull in question all right so that's the one caveat to to worry about here but um other than that I think this is super helpful because man we can really sketch a real good root locus at this point so for example if you wanted to go through and compute yourself if we wanted to flesh out that root locus of the example transfer function that we had here we could go back and do a couple of our previous rules here right so for example rule 4 if you can went ahead and calculated the angle of the asymptotes right you just run through our expression for Phi a here and in this case we know that there are two zeros at infinity right because there's three poles and one zero so there's two excess poles here so you would basically get two angles here you would get 90 degrees and you would get 270 degrees right so if you if you found those two these are the two angles you would get and their centroid of the asymptotes if you went ahead and calculated using the expression we did before you get here you get minus 4 right okay so let's go ahead and augment our our picture here so there's a here's the centroid here at minus 4 and there's one asymptote that goes up at positive 90 and there's one other one that goes down it 270 degrees here so we know that basically well here it looks like these two poles here this one and this one they're going to depart at an angle of 76 degrees and minus 76 degrees respectively and they're going to approach these asymptotes so you know what I bet money that this thing looks something like this and then it just starts going up until it start approximate approaching that asymptote right and similarly down here this is going to come out at negative 76 degrees and then it's just going to start approaching that asymptote right okay and then let's combine this with our previous rule right so rule number three which said valid solutions on the real axis are to the left of odd-numbered poles so that's just right here so here's the only region that we've got here so great looks look at this here I you know we've told 99% of the story here where we see that this real pole this pole on the real axis will just go to this real zero on the real axis and these two complex poles are probably just going to shoot off to infinity along these asymptotes all right so you get a lot of insight from just these five rules so these five rules that we covered like I said deal with 99% of the fidelity that you probably need when when hand sketching a root locus if you really need more fidelity maybe you should just be using a numerical tool to start with here but that being said what I think what I want to do now here is let's pause the the camera or erase the board maybe let's quickly touch on five more rules that could be helpful if if you really care about it in that much detail okay so before we move on to those the last five rules maybe let's summarize the core five rules that we just developed here so let's just do a quick summary of the rules for the root locus right so just a refresher memory right we went ahead and we first said we are going to consider an open-loop transfer function right of the form G of s looks like some numerator polynomial over denominator polynomial here right so this was the output of the system over its individual input here we'll look at those signals in just a second here but again we said that this thing looks like an alpha plus an S Plus z1 s plus z2 yada-yada-yada S Plus Z right all over an S Plus P 1 s plus P 2 all the way s plus P and here right so this thing had M zeros and n poles right whoops I guess we should have said number of poles right that's what N and M stood for right okay we made an assumption here that alpha was positive and that what we wanted to do then was we said that under a specific feedback architecture here that looked like this right so here's your open-loop system where you have you coming in and you have Y coming out we were going to look at a very specific architecture which looked like this right and what we were going to also then assume was that K was going to range from 0 to positive infinity all right that's the the ranges of case that we wanted to understand here right and if this was the scenario that we set up we said that there were then five rules of how to sketch where the closed-loop poles of the entire system went here right so what that did here was again you just look at the open-loop transfer function and you develop these rules so we said rule one number of poles is unchanged okay so in this case here the number of poles equals n right and I guess maybe we should have made the other note here that we assume alpha is great and we are then going to assume that n is greater than or equal to M so we have a proper transfer function right that's how we derive these formal five rules okay so I was rule number one here rule two we said that basically the closed-loop poles start at the open-loop poles and go to either one of two scenarios right so they are going to the end at open-loop zeroes right so M of the poles will go here right and then the other scenario here is that they could end at zeros at infinity and the remaining excess poles of n minus M poles go here all right okay great all right perfect and then what do we have a rule three so rule three was that valid regions on the real axis are to the left right of odd-numbered poles slash zeros and again you have to start numbering from right to left right okay Oh what are we else we have Rule four we had the angle of asymptotes right for these zeros at infinity we said that the angle of asymptotes we call that Phi a was given by the expression 1 plus or minus two K times pi all over N minus M here and K ran from 0 1 all the way up to n minus M minus 1 here right and then we said the centroid of the asymptotes we call that Sigma a all right was given by summation from k equals 1/2 and of - PK minus summation from whoops k is equal to 1 to M of minus ZK all over and - M okay and then rule 5 shoot I guess ran out of space let's come over here maybe hopefully we can fit this in here so rule 5 was the angle of departure from a complex pole right from one of these complex open-loop poles here right and we said that this angle of departure from pole J right so theta J here which we said this is thing we're interested in angle of SJ plus PJ right this is the angle we're interested in you could compute that from using positive PI plus or minus 2 pi K right plus sum from I equals 1 to M of angle of PJ - sorry plus Zi right so you do all the zeros and then subtract off maybe a shoot I'm gonna run it let me put it down here then you subtract from I equals 1 to n but you don't do the pole in question so I can't equal J angle of PJ plus P I right okay so here on one page here these are the five rules that we said we'll get you the majority of the behavior of the root locus here and now there's another series of five more rules that might help if you really need to flesh this out so tell you let me pause the camera I'll raise the board and we'll we'll get to those rules six through ten alright so if you really want to we can delve into a few other rules but to do this very quickly so rule 6 here is I'm just gonna say that you could also come up with an expression for the angle of arrival at complex zeros so we just looked at how to calculate the angle of departure from a pair of complex poles well you could also go ahead and find out what angle does the root locus enter those complex zeros at as K goes to infinity here but in the interest of time let's just write down that if you really want this just google it all right it's not like Nike you've just do it just google it here because the reason I'm not going to spend any time talking about this is I literally have never come up with a scenario or never encountered a situation where I needed a root locus to be so precise that I needed to know what angle did do the roots go into the complex zeros as K approaches infinity if you're pushing K to infinity to go already you've already done something wrong okay you should maybe recheck your life and think about what have you done to get to that point here so I'm just gonna say that it's possible to derive this expression we're not going to do it right now if you go look it up it's gonna look a heck of a lot like the the calculation for the angle of departure for complex poles here right but if you really wanted to you could here um here rule seven though is a little bit more helpful here and a little useful here this is the fact that the locus will break in or out on the real axis at 90 degrees so if you have a situation where we've got ourselves poles or something like this right and you know that these two are gonna come together they're gonna crash here and then they're gonna leave well they're gonna leave and they might do something like this but initially when they break out from the real axis this will be a ninety degree angle here right and similarly if you have poles that come in they might come in but they will straighten out right before they hit the real axis and enter in or break in at 90 degrees here right so rule seven is little bit helpful okay rule eight this is a little bit of another kind of duh rule then maybe I don't even need to put up here but for our root locus --is which are real here and for you for real systems you have complex roots coming in pairs right right they come in these complex conjugate pairs that are reflected over the real axis so you're never gonna have that the root locus for our systems which have real controllers and real constants and real numbers in it they will they'll always be symmetrical about the the real axis right no matter how complicated they are okay rule nine here so the root locus will not cross over itself right so it's okay for the roots to come in here and crash into each other but you're not gonna have a situation where the root locus does something like this and crosses over itself right this will not happen right if you think about it long enough what this is kind of saying here that if this were able to occur you're basically saying that there's a low value of k1 which will get you to this point and then as you keep increasing K you could find another k2 value which is bigger than k1 which gets you to that same solution of the same roots here so it's it's it's not a one-to-one mapping anymore between controller gain or a root locus parameter K and and pole locations if this were to occur and since this doesn't occur right and that's not feasible this is this is not gonna happen so you're never gonna have the root locus crossing over itself rule 10 is a little bit interesting here and let's just call this the the number of lines rule we already know from rule number one right for a proper transfer function where there are more or more poles or the same number of poles as there are we know that the number of lines or the poles are not going to change here right how however if you're in a situation where you have potentially more zeros than poles you are actually going to have more poles or more roots of the closed-loop system than you started with here so in other words this here is is a little bit it might sound like a direct contradiction of rule one but remember rules one through five where the situations that I said cover 99% of the scenarios right that where you have a proper transfer function this you might need to pull out if you have an improper transfer function but it's basically an extension of this so basically let's just say that this rule states that there are at maximum N or M lines to the root locus here right so in the case where n was greater than or equal to M right this is basically just saying rule one here right so this is what we already talked about earlier the same and covered by you know all of our rules one through five that we talked about earlier right this is where you have a proper transfer function and everything is hunky-dory right but if you had more poles or sorry excuse me more zeros then you have poles here now what's interesting here is this is now you're in this rare scenario here which really doesn't come up much but maybe we will mention here that in the previous canario right where everything was fine and dandy and there were more poles than there were zeros some of those excess poles shot off two zeros at infinity here now in this scenario you're actually going to have more zeros than poles and there's no such thing as excess poles instead there are now pull poles that are going to come in from infinity here right so again this is just something I wanted to bring up to your attention that is something to be aware of here but to expand your mind there are potential scenarios where you have more zeros than poles here and in that case in this rare scenario you will have M or the number of zeros roots or lines on your closed-loop root locus some of those poles are going to be coming in from infinity rather than shooting out to infinity here okay so with that I think this is a set of ten pretty darn comprehensive rules that should get you through sketching pretty much any root locus that fits into the box that we just talked about here okay so to close out the discussion now I think what would be useful here is let's erase the board and let's go through a more complicated involved example that should hopefully stress the majority of these rules and put them to use okay let's go ahead and look at a example that is somewhat more involved so here we are let's go look at our eighth open-loop transfer function of the discussion here so this is gonna be a s plus one plus I s plus one minus I in the numerator here and then s plus 3 plus 2i S Plus 3 minus 2i s plus 2 s plus 1 s ok here we go so here's our open-loop transfer function again just to break this sucker down here what are we got in terms of zeros here we got a zero here at s at minus 1 minus I you've got s at minus 1 plus I here so we got a complex pair of zeros here poles for the system you have a pole here at s is equal to minus 3 minus 2i at minus 3 plus 2i and you've got one here at at s is equal to minus 2 and s at minus 1 and S at 0 right so we got two zeros and five poles all right ok so first things first let's just go ahead give ourselves a good bit of room here and let's sketch out a root locus for this thing ok all right so we got our good old-fashioned real imaginary axis here let's maybe go unit something like this 1 2 3 4 5 6 here ok so negative 1 negative 2 negative 3 negative 4 negative 5 negative 6 positive 1 positive 2 all right then we got this going up to 1 2 3 4 how about 1 2 3 4 there's 1 2 3 4 and then minus 1 minus 2 minus 3 when it's 4 okay all right that's a reasonable set up so let's just do a quick pull 0 map and plot out all of these poles and zeros here so starting off with the zeros we got zeros here here that's it and then we got poles here let's do the complex puppies first so that's here 3 2 okay so it's here and then here okay and then you got to pull minus 2 minus 1 and 0 great ok so here is what our open-loop system looks like let's just start whipping through all of our rules and see what we end up with here so ok rule 1 numb pulls slash lines is unchanged right so we have N equals 5 poles here so there are still going to be 5 lines that we're gonna have to trace out here for our system here ok so let's go ahead and do now rule right this is our talking about how many zeros at infinity right so we said the closed-loop poles right what do they do they start at open-loop poles and go to all right let's see how many is zeroes we've got here so there should be two of these right there they're going to go to the two open-loop zeroes and then how many zeroes at infinity do we have right we n minus M which is five minus two so we should have three zeros at infinity so there should be three angle three asymptotes that are going to shoot off here so all right why don't we go ahead and deal with rule three here what was rule three rule three this was the valid regions of the real axis okay so we can quickly sketch that out we said that the valid regions of the real axis are to the left of odd numbered poles are zero so here we go here I'll add so yep let's just do this this is pull one two this is not three this is so yeah this wow this entire section over here is actually a valid part of the root locus so it's just going to do something like this off to infinity there we go okay there we go so rule three got us all of the root locus locations on the real axis all right rule 4 was our asymptotes all right so we said oh shoot I wonder if I'm gonna have enough of room for this tell you what here yeah you know what I think I think I think we'll make it fit here okay so Phi a right we said that this was 1 plus or minus 2 K times pi over n minus M here and K is going to go from 0 1 all the way up to n minus M minus 1 here so 2 up to 3 here because we said that there are three zeros infinity so there should be three asymptotes so you plug this in here and you're gonna get Phi a is going to be sixty degrees 180 degrees and three hundred degrees okay and then if you go ahead and compute the the centroid of all the asymptotes and actually again now we've now we ran out of room now now let's come over here and get rid of some of this shoot I wonder if I want to okay tell you what let's let's erase this I think we want some of these numbers still up here okay so here's our centroid of the asymptotes Sigma a here right it was some from K equals one to five right of minus PK - some from 1 to 2 of minus ZK all over and minus 5 minus 2 okay so all right if you start plugging this in I guess maybe just again to be explicit here let's do the do all of these here so this is going to be minus P 1 minus P 2 minus P 3 minus P 4 minus P 5 minus and then what I guess we got to do is let's put this in brackets this sum here this is minus Z 1 minus Z 2 right all over 5 minus 2 okay so now we're just going to plug in all the values for P 1 P 2 P 3 P 4 etc here so I tell you what let's do this over here so I don't cram all the space let's just do it right next to it okay all right so this would be something like minus 3 plus 2i - hold on a second yeah - 3 minus 2i ok - 2 - 1 - 0 okay that's all those first ones - and then the term we had in brackets here this is - okay what is z1 here z1 this is going to be 1 + I all right and then - 1 - I great all of that over 3 okay so again crunch all of these numbers on what you should end up with here is minus 11 thirds or minus three point six seven ish okay so great with this information we've got ourselves the centroid of the asymptotes we've got the angles here so let's just go ahead and plot those out in blue so the centroid should be somewhere around here here's Sigma a the centroid of all the asymptotes and we got angles going off at 60 degrees 180 and 300 so there's going to be some asymptotes like like this and then this and this alright so those are our three asymptotes okay all right now let's go ahead and do rule five so we can figure out the angle of departure of these complex conjugate pairs here these two right here so let me go ahead and erase this will get a little bit more space okay so rule five right rule five was our angle of departure all right okay so the angle of departure theta J here right which was angle of SJ plus P J this is the angle that I'm interested in if we consider this to be maybe PJ alright maybe let's first consider that that that top one here so this is equal to PI plus or minus two pi K right plus summation from I equals 1 to M of angle of P J plus Zi all right minus summation from I equals 1 to N but you skip the pole in question angle of PJ plus P I right ok so let's go ahead and just call this this PJ I don't let's call P one how about maybe to make our lives easier let's call this thing P one okay so this is the one that we're interested in okay so then in that case expanding this here we see for us we want J is equal to 1 right this is the the pole in question okay so all right theta 1 here right the angle of departure from pole 1 here is just going to be while expanding that guy out we're gonna get pi plus or minus 2 pi k plus let's go put the first let's do this first summation maybe in this square bracket right so this is angle of P 1 plus Z 1 plus angle of P 1 plus Z 2 right okay there's that first summation up here now let's do the minus summation so this is all now - and then let's put this in brackets angle of P 1 plus P 2 plus angle of P 1 plus P 3 oh yeah 1 2 3 right plus angle of P 1 plus P 4 plus angle of P 1 plus P 5 right because we skipped I is equal to 1 right so there's no yeah yeah there we go ok so again always see as we just got to go ahead and grab all of these these terms here so again what I think would be helpful is our little four-step process that we developed earlier let's just slap it on here well actually sorry let's slap it somewhere else cuz this is exactly what we're looking at is this root locus plot here so maybe let's slap this on here right here's a procedure to get all of these angles of these quantities right so let's just do one or two of them and again we'll get the pattern here let's identify this one here so let's first focus on this term here angle of p1 plus c1 here okay so all that means here is I got to go find myself z1 crud and I guess we didn't label these here so tell you what let's let's let's number all these just so we're all on the same page let's call this Z 1 Z 2 we already got a p1 let's call this how about p2 p3 p4 and p5 ok all right there we go we got all these labeled here so now all I got to do here is to get angle of p1 plus Z 1 I go to z1 which is here and I draw a line from z1 to the other s location in question which is actually at p1 which is over here so here we go let's just draw this there we go so here is the vector P 1 plus z1 so here's the Associated angle from the horizontal right ok so this thing is angle of P 1 plus z1 right so we go through our discussion here where we see that ok all this is is here's the triangle that's relevant all right okay so to programmatically write that down here this first term here of angle of P 1 plus z1 is going to be a tan 2 and again let's assume you give it the X component and then the Y component like Mathematica style here so this is going to be a tan 2 of what's the X component here so the X component here is let me see well I guess it is negative 2 here right negative 2 so you go 1 2 units in the negative x-direction and you go 1 unit in the positive direction in the positive y direction something like that great ok and if you you plug this in you get this is about a hundred and fifty three point four degrees all right and you repeat this process for all these terms and for the completeness here and just for the lack of for in the interest of time let me just write out the answers and I'll let you verify them yourself here right so P 1 plus Z 2 so this is the same thing except now you're going to draw a line from Z 2 up there you see that doesn't change a whole ton here right so this is 8 and 2 again of XY is going to be a tan 2 of the X component is the same right but the Y component is now positive 3 so this gets you an answer of one hundred twenty three point seven degrees okay and then angle of p1 plus p2 right is now where's p2 it is oh it's here you okay we're going to see this is basically a 90 degree angle right because it's it's coming from here up to p1 all right so this is again just to make this all nice and clean and uniform here this is going to be a 10-2 of zero and four right yeah yep okay so this gets you 90 degrees okay and then angle of p1 plus p2 it's going to be a tan 2xy it is a tan two of okay so what's the X component here P well sorry sorry there should be a p3 okay p3 so p3 is over here okay so the X component is minus 1 and the y component is 2 right so this here is going to get you one hundred and sixteen point six degrees okay and then angle of P 1 plus P four is a tan 2 of XY a tan - okay where is p4 so over here so okay so we got an X component of -2 and a Y component of positive two so this is going to get you 135 degrees exactly and finally the last term we're looking for is angle of P 1 plus P five is going to be a tan - XY and 810 - okay so the X component where as p5 it's over here so X component is now 1 2 3 so we got negative 3 and positive 2 in the Y direction and this gets you one hundred forty six point three degrees great so now you plug all this into our X expression out here and we end up with la-dee-da where I've ran out of space okay here tell you what let's get rid of this because we don't need our little four-step process we just used it a ton so voila the magical answer you get here for theta one is uh what did I get here Oh minus thirty point seven five degrees okay so let's erase some of these other extraneous blue lines so that we don't need here I apologize for the lack of colors here which is kind of probably making this a little bit busy okay because I want to leave the blue line which represents the asymptotes and I want to kind of erase the others okay all right so we know here that the angle of departure from this pole is actually negative 30 degrees here so that's kind of fascinating here so actually it actually goes down something like this so here this should be minus thirty point seven five degrees here right and then by symmetry this angle of departure here should actually be positive thirty degrees or something like this so that's interesting they're gonna kind of go off initially like this almost like toward these asymptotes here so with with all of this I think we're in a real good location to kind of sketch where these two poles are going to go so we know that this pole is going to come down at minus thirty point seven five degrees initially but then it's probably gonna even out and approach this asymptote something like this similarly here this is going to come up at thirty degrees but then it's going to wrap probably bend down and again maybe this this isn't drawn to scale exactly but this gives you a rough idea here right so here we go I'll try to and these up I know the green doesn't show up the best on the camera so I'll try to make these things a little bit fatter so we can kind of see but you can see that in in just a couple of minutes we're able to sketch out a very robust root locus so you kind of see what's going on here right we see that these two police re wait a second we're not we're not done yet here yeah what did we do with these two these two come together here right and now we could almost use what was it rule seven here that says these two when they come together again they're going to break away at 90 degrees so this is probably gonna come up and down here right and we know that they're gonna get sucked towards the open-loop zeroes here right so eventually as I push K hard enough these things are gonna probably have to go to these zeros if we really wanted to you probably could see what angle do they come into these zeros at what is the angle of arrival but I'm gonna just do some artistic sketching because you really are never going to come into a situation I think that where you need that level of fidelity here but again here we go look at this with just applying a few of these rules here we get a very good understanding of the system so you get a good physical intuition that you know for this system for example you can't use an arbitrarily high gain K if you notice these two poles p1 and p2 eventually they're gonna cross the right half plane and you could you could wind up into trouble here so this is is really powerful here right understanding how the root locus is gonna behave from a fundamental concepts perspective is very very useful in control design here as we're gonna see in the future so that being said you know we spent a lot of time developing these rules talking about how to sketch them I think the thing that was probably nagging you in the back of your head now is thinking you know you know what sure you sketched all these here but how do I know that they're actually right don't I should probably run over to some computer numerical tool that will allow me to validate this and I hope that's what you're interested in because that's exactly what I want to talk about next is how can we use MATLAB and other tools to give it a root locus or excuse me give me give it an open-loop transfer function and an arbitrary system architecture and have it compute a root locus for us so that's our next discussion here and is actually gonna be a multi-part discussion on root locus as you're gonna see because once we understand both how to sketch this as well as how to use some numerical tools we can really start thinking about designing controllers either PIDs p.i lead-lag all their different types of controllers using this type of root locus scheme here so with that being said I hope you enjoyed the video here I know it's a bit of a longer one but I hope it was worth it because this is as we've said is very very important so if you liked it please subscribe to the channel here we're gonna have a lot more discussions here on root locus let me know what you think about this this video here in the comments or if there's other topics you'd like to see in the future I'd love to hear from you so with that being said I hope to catch you at one of these future videos until then I'll talk to you later bye
Info
Channel: Christopher Lum
Views: 14,703
Rating: undefined out of 5
Keywords: Root locus, sketching root locus, drawing root locus, root locus by hand, root locus rules, angle of asymptotes, centroid of asymptotes, angle of departure, closed loop poles, control systems
Id: gA-KOk3SAb0
Channel Id: undefined
Length: 176min 39sec (10599 seconds)
Published: Tue May 07 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.