Let's come back to the phase margin again. We already plot the required characteristics of the product load for our two stage op-amp. So it should resemble the first order system that is the gain bandwidth.
So before the gain bandwidth we have only one pole. this is what is required and uh i really in a two two stage opener we have two poles and one zero and we already derived those zeros first pole second board dc gain we already derived those things so this is the dc gain adc so after that we have first port so this slope will be 20 db per So, after that we have gain this unity gain frequency actually the p 2 the second pole is should come after the gain bandwidth product. So, after this second pole we have more slope this you know minus 40 dB per decade after that we have a 0 that is z 1. So, after that again we will go to 20 dB per decade. So, this is what ideally we want and the phase plot we assume initially it is starting from zero so in the first port we have a minus 90 degree phase difference and in the p2 we'll have 180 degree minus 180. so during the plane where gain bandwidth product It will be in between 90 and 180. So if it is very close to 180, our phase margin will be very less.
So if the difference is less than 45 degree, that is not acceptable. So generally we prefer for a 60 degree phase margin. Those things we already discussed. So what in the design point of view, what we have to do to make sure that we are getting at least a phase margin of 45 degree or 60 degree.
So we have to derive that relationship. For that, before moving that we know that if we have P2 here, this is P2. So, during P2, this phase will be 180 degree.
So, if P2 is moving to this side, our phase margin will decrease. So, we have to keep P2 away from the gain bandwidth product. When the Z1 that is the 0, this 0 comes after long frequency of, after lot of frequency of gain band product.
So, generally we assume that or we can design 0, we have gm2 and cc. So, we can design 0 is greater than or equal to 10 times of. gain bandwidth so this is an assumption so we keep it as equation one and after that we have to find out what in what condition we can ensure that 60 degree phase margin so to get the angle of this we know the transfer function that we already derived this transfer function v out by v in equal to a dc is dck into 1 minus s by z this is the 0 then 1 plus s by p1 into 1 plus s by p2 this p1 p2 are the first p1 and p2 is the two poles.
So, the angle we can write the angle of this transfer function v out by v in equals 0. ADC is not giving any angles. We can give minus tan inverse omega by z minus tan inverse omega by p1 minus tan inverse omega by p2. So, this will be the angle. So, we have to make sure that by this angle we are getting.
60 at least 60 degree of phase margin to ensure that we can write this angle V out by V in equals minus tan inverse omega is the frequency by z minus tan inverse omega by p1 minus tan inverse omega by p2 in the phase plot i'm plotting it again so this is p2 this is k-in-banded this is p1 here the 0 comes and we we put the 0 equals 10 times of gain bandwidth so we can substitute these values here and we are concentrating at this point so this is the frequency axis this is the frequency so when the frequency is equal to gain bandwidth product or unit unity gain what is the phase phase what is the phase angle that that is what we are interested in so we substitute the angle also here the angle w we substitute with gain bandwidth product for the unity frequency because that is where we are interested we are we have to find out the phase at this frequency okay this is the frequency axis so angle v out by v in equals minus tan inverse frequency we replaced with gain bandwidth product divided by z is the first z it is a 0 minus tan inverse gain bandwidth product we again replacing this frequency with this because this is the frequency where we are interested this is the frequency where we can we are calculating the phase margin divided by p1 minus tan inverse again bandwidth by P2, so also P2. Now, we have all these relations, this we already designed these relations, so we can substitute those relations. So, before substituting we already assumed that The 0 is 10 times the gain bandwidth.
So, first we can do that this equals minus tan inverse gain bandwidth 0 is 10 times the gain bandwidth. So, gain bandwidth divided by 10 times gain bandwidth because 0 is 10 times gain bandwidth because of our assumption then in the tan inverse Gain bandwidth product we can, we have gain bandwidth equal to gm1 by cc. So that we can write gm1 by cc divided by p1.
p1 we have 1 by gm2 R1 R2 cc. So we can write 1 by, this is gm1, gm2 R1 R2 cc. minus tan inverse this is gain bandwidth divided by P2 so P2 is gm2 by c2 so gain bandwidth is gm1 by cc divided by P2 is gm2 by c2 so we can Write in a simple way is minus tan inverse of 1 by tan minus tan inverse. We can cancel this Cc and this Cc. There is nothing else to cancel.
So, it is gm1, gm2, r1, r2 minus tan inverse. Here also there is nothing to cancel. So, gm1 c2 divided by cc times gm2.
Actually, we are trying to find the relationship between gain bandwidth and P2. So, we will make this substitution later. So, for the time being, let it be gm gain bandwidth product by P2.
So, this is the angle Vout by Vin. So, I am writing it again. We are not doing this substitution now. We will do it later. So, angle of Vout by Vin equals at we are calculating at the gain bandwidth frequency minus tan inverse 1 by 10 minus tan inverse gm1 gm2 r1 r2 that is we are familiar with that gm1 gm2 r1 r2 is the dc gain.
So, we can substitute this as dc gain here dc minus time us gain bandwidth divided by p2 we are not substituting the value here because at this point we need a relationship between gain bandwidth and product to get the required phase margin we have the we have this equation and we out by v in equals minus 1 inverse 1 by 10 minus tan inverse dc gain minus tan inverse gain band root double by p 2. Now, we can substitute these values. Before substituting, one more point. This is the Recurred phase, we have recurred the water plot P1, this is the gain bandwidth and this is the P2, this is the frequency axis.
We started the phase from 0, so initially it will be 0, so after P1 it will go to 90, minus 90. After P1, it will be minus 180. So assume we are here, this is our required point. So at this point, what is the angle? If we started from 0, so the angle, the face margin is the difference between this 180. face margin is the difference between this 180 and this angle so that we can call it as minus 180 plus this is the pm phase margin so at this point what is the net angle that equals minus 180 plus phase margin or if you are instead of zero if we suppose we started from 180 then it is a little bit easy if we started from 180 this point will be plus 90 this point final point will be 0 so whatever this point it will equal to phase margin because see this is 0 from phase margin 0 plus phase margin is this angle but if we start from 0 then final point will be 180 then what is the angle exact angle here is minus 180 plus phase margin so what we calculated here is minus 180 plus phase margin. Okay, I think it is clear.
So, if you have any doubt, you can start with 180 and just use the phase margin. So, this 180 will not come here. But if you are starting from 180, initially you have to give a 180 here. 180 minus this terms will come. Okay, so I am using, I am just starting with 0 itself.
So, this angle will be minus 180 plus phase margin. So, you do. it should be clear to you because phase margin is different between this 180 degree how much angle higher than minus 180 so that equals minus tan inverse of 1 by 10 that we have to calculate that is tan inverse 0.1 is 5.71 minus 5.71 minus tan inverse 8 dc. So, dc gain is generally a higher value.
So, let us calculate. Suppose the dc gain is just 100, then itself it is 89.42. If the dc gain is 1000, generally it will be higher than 1000. It is 89. so the maximum value that the time inverse can go is 90 degree so we can assume that dc gain is a pretty large value and the time inverse of that is 90 degree so if the if your gain is less like 1000 it will be 89.94 if it is less than 1000 like if it is 100 100 is very low for a orca okay even it will be 89.42 so but you can assume it as a 90 for a calculation minus and inverse gain bandwidth divided by so we assume this tan inverse dc gain is 90 and now we can calculate we can take this minus 180 degree to this side so phase margin equals 180 minus 5.71 minus 90 minus tan inverse gain band 1 divided by p2 so it is 180 minus 5.71 minus 90 that equals 84.29 so phase margin equals 84.29 minus tan inverse gain bandone divided by p2. So, now we calculate what is the condition for a phase margin of 60 degree.
So, we will calculate that for 45 also. Here we calculate for 45. Here we calculate for 60 degree. If phase margin is 60 degree. you can put 60 equals 84.29 minus tan inverse gb gain bandwidth by p2 so you can take this tan inverse to this side so tan inverse gain bandwidth divided by p2 equals 84.29 minus 60 it is 24.29 24 point to 9 we are taking the tan on both side then this part will be gain bandwidth by p2 that equals tan of 24.29 so this part we will do later so you can write tan of 24 point to 9 is 0.4513.
So, gain bandwidth divided by P2 equals 0.4513. Now, we want P2. So, P2 equals, P2 we can write gain bandwidth divided by 0.4513. So, the inverse of that value is 2.2.
So, P2 is 2.2 times gain bandwidth. So, if you want a phase margin higher than 60 degree, you have to make sure that the second pole is greater than or equal to 2.2 times of gain bandwidth. So, this is the condition for having 60 degree phase margin. So, we have the equation phase margin equals 84.29 degree minus tan inverse.
gain bandwidth divided by p2 so if we just need a 45 degree phase angle 45 degree is equals 84.29 minus and inverse gain value divided by p2 so this value will come as you know 84.29 minus 45 that is 39.29 so you can take this 10 to this side so tan inverse gain bandwidth divided by p2 that equals 39.29 so taking tan on both sides gain value divided by p2 equals tan of that value is 0.81 So, for this P2 is k-in bandwidth divided by 8181. So, P2 should be for phase margin 45 degree, P2 should be greater than 1 divided by 0.818. So, it is 1.22 times of k-in bandwidth. So, if we need a phase margin of 60 degree, we should ensure that P2 is greater than equal to 2.2 times of gain bandwidth.
And if we need a phase margin of just 45 degree, we have to ensure second pole is higher than to 1.22 times of gain bandwidth. But in this, in our design, we are sticking with the 60 60 degree phase margin so to ensure that our pole should be 2.2 times of gain and now we are going to the design point of view like in the circuit point of view how it will look like so we have uh all these equations for 0 p1 p2 gain bandwidth and the dc gate is already derived so we will just substitute them and okay p2 we have gm2 by c2 so we can write gm2 by c2 should be greater than or equals this is p2 gain bandwidth is gm1 by cc so 2.2 times you gm1 by cc but in this point we should remember that cc is this compensation capacitance c2 will be c2 is the output sec capacitors of the second stage that means it will be equal to cl okay here in the circuit we put it as cl c c2 by c2 we mean the capacitors of the second stage so it will so capacitor at this node will be c l so in the design we will change to c 2 will be equal to c l in circuit point of view and we are here now so before that when we are deriving this equation we made an assumption that you know the 0 is equal to 10 times of gain bandwidth so z equals 10 times gain bandwidth this Equation for 0 also we have, equation for 0 is gm2 by cc that equals 10 times of gain bandwidth. Gain bandwidth is gm1 by cc. From this we can cancel the cc and we can write gm2 equals 10 times of gm1.
And we can substitute this value here. In that case we will get gm2 by c2. We told that c2 will be cl. By c2 we mean the capacitance of second stage.
Actually it will be the load capacitance. So we can replace c2 by cl. Cl should be greater than or equal to 2.2 times gm1.
by cc but gm2 we can replace by 10 times of gm1 we got from here by cl should be greater than or equals 2.2 times of gm1 by cc this gm1 given we can cancel and what is remaining will be 3. We can cancel this gm1. So, what is remaining is 10 by cl greater than or equal to 2.2 times by cc. So, we can rearrange it as cc should be greater than or equals 2.2 by times cl by 10. so from this we can make cc should be greater than or equals 0.22 times of cl so this is the circuit point of view this is what we have to do to make sure that the phase margin is greater than 60 degree 60 degree if we want the phase margin greater than 60 degree this is the cl and this is the cc so the cc should be greater than 0.22 times of cl So, this is the condition for phase margin 60 degree. Now, we can I think we almost derived all the equation that is needed for the circuit simulation. I think we can directly go to the circuit simulation now.