 We will come and just see what we are looking for, where is the topic of current sources and sinks and we have said that in a CMOS analog IC, a current source or sink acts like a basic building block and there are three major requirements come from them. One of them is that the output impedance should be very, very high, as high as possible. So we must guarantee that all devices are in saturation and also finally the mirror should satisfy another limit which is essentially because the good source should be minimum, minimum that is drop across current source should be as small as possible. So based on these requirements we already looked into a simple current mirror and we also looked into the variation in parameters particularly we looked into beta, VT and lambda. Generally lambda parameter variations are very small so they need not be taken every time but for the completeness we did take that and based on that we realized that if I want to reduce the percentage error between the mirror sources, source and the output source, output current then I must somehow manage variations as small as possible but there are two times one positive and negative, so try to compensate them, is that point clear what I said? So here is that word what I am saying the expression which we had derived or there is something that may be I made mistake but you can check it yourself again. I have a feeling that I think instead of 2 below the denominator in my expression it is in 2 numerator. So this 2 should have something like that some error is do not look at this expression look of course there is a power to the power 4 leaving all higher order terms this is what typically you will get and I said you that these are the two terms which are essentially governed by delta VT by VT and there is a term which is delta V dash by V dash so if I want to make this as small as possible these two terms must be very close to this term is that clear? So if that happens probably you will so you can adjust your lengths widths, you can also adjust VGS, you can adjust VT if possible and then you can minimize the effect of variations so there is in case you need a very strong source with no variations one possibility that we can play with the parameters so that that can be minimized. Of course 4 percent error is normally acceptable in most cases but in case it is lower than that you require and you must somehow try to see where we can minimize that delta F is a function any of them VT or alpha or beta or whatever it is okay if any of the variation is 5 percent then we find typically this is 4 percent error appears is that okay you can see this is getting subtracted so it will be less than major error which is coming okay so this is what we did last time so today we start with as I say one of the features of good current source or mirror it should have high impedance and it should have low viewing okay these are the two major features I want to attain and for this I will start looking into alternative to simple mirrors and here is the first alternative we already know very well that if you use a cascode what do you improve the output resistance so the one of the feature of a current source was you need a output resistance higher so use a cascode part there so automatically R may actually go high or out should go high we are also looking for minimization of this so we see that how much we mean we get women means at the output what is women you are actually going to get somewhere here and we will figure it out how much is the actually minimum drop across the source which is allowed so for example I have said a typical for a 5 micron process which is given in by a baker's book I say VTN of 0.83 volt over voltage of 0.37 volt that gives VGS of 1.2 volt okay please remember VAS VGS minus VT if VTS 0.83 and if this is 0.37 VGS has to be 1.2 volt now we want to figure out what is the minimum drop across the current source for this data some numbers since we are going to calculate I thought I should put the numbers this is taken from bias Baker Lee's book data so please check the numbers if there is something mischief I made hopefully not so I am trying to now use a cascode mirror in which I have two stages you can see from here M3 M4 forms a pseudo mirrors and M1 M2 also form a mirror kind of structure and one is sitting over the other but if you look at M2 and M4 and if this potential for AC is 0 this acts like a cascode to that series gate connected to the driver is that clear so we are starting to see that because of M4 sitting over M2 at this point the output resistance should be GM times gain plus into RO okay so that little more but that is the typical value so if I can get that value then I have improved my current source requirement RO should be however that is possibility exist now we can see from here the way it is done this is a current source which will actually put it through some P channel device later which is called the bias current which is our reference current since this between D3 and S3 VDS 3 you know since I am connecting something like this the gate of this VDS and this VDS is same since I am connecting something like this this VDS and this VDS are also same is that okay however please remember some fun part in that this VDS has something to do with drop from here the source is not now at ground potential for this source is at drop videos across this so VDS may be same but the source is not at ground this has to be understood so the gate voltage is not exactly at the ground for the upper ones sorry this potential and it is plus something is adding up but net value of VDS has to be same if the currents are to be same okay so this idea that what will these 2 do and what will these 2 do can be figured out from a example given to you this is still a good current source there is nothing much you can do analysis but what is interesting to me is the these G's are only written to prove a very which is gate for one and drain for once for example the source of M3 is drain of M1 source of M4 is drain of M2 and we are interested in this voltage at the end why we are interested in D4 because that is the real minimum so we want to know what is that minimum okay in most cases the source body is grounded and not connected to source they are generally grounded but there are technologies in which it is connected as well okay so different than BSBs effects could be taken care in case this is not connected directly but through ground if it is a ground that means there is a potential there and some VT will move okay so that part will be there but right now I am not considering BSB effect but they can always be brought in to the expressions may I give an example when I brought that actually is that okay so let us see first thing I am worried about is the V minimum part because our out by intuition I know because I have put a cascode I am going to get it higher but I want to know what I may calculate that as well but first let us see what is the V minimum let us say for the values given by this bias book VGS is 1.2 let us say there are 2 batteries 1 is biasing this and 1 is biasing this we could say there that VGG 1 which is same as VGG 2 this is coming from the mirror side please remember this value is coming from the actual reference side so it is equally saying there is a bias to M2 please remember VGS 2 is same as VGS 1 okay so I am just writing directly there so VGG 1 is VGG 2 which is 1.2 because VGS has been given to me 1.2 volt similarly VGG 3 is equal to VGG 4 from the other side please remember all that I am doing this and this this and this okay so this is equally saying the supplier coming here so which is 1.2 here plus 1.2 here for that VGS so it is 2.4 there so for M4 to be in saturation what is the condition M4 will be always in saturation the VDS 4 of M4 should be larger than VGS minus VT for M4 is that correct that is the condition which it should satisfy if M4 to remain in saturation now we also know VD 2 which is equal to the VDS 4 that is the source of M4 is same as VD 2 if M2 is to saturate the VDS 2 or VD 2 of this should be larger than VGS minus VT of this 2 transistors should remain in saturation so that the output resistance will act like a cascode structure and you will have mirror transmission as any way otherwise because this will be same as the other side current. So these are the two conditions and if we keep VDS 2 and that is the condition we want to force what is the minimum VDS 2 I should have okay if this VDS 2 is same as VGS 2 so VGS 2 minus VT will be always smaller than VDS 2 so transistor will always remain in saturation if this voltage is same as this as the minimum value of VD 2 which allow transistor to saturate is this equal to this if they are equal then transistor M2 will always remain in saturation is that VGS minus VT will be always smaller than VDS this value is going to vary with the difference of currents which I will pass through that this is a function of someone yesterday was asking so I am proving it yeah that may vary but up to which I will allow it to vary the maximum value which I should allow is VGS minus VT should be smaller than VDS will only occur when VGS is same as VT is that correct so if that means I am calculating what is the minimum I am not saying at POV I am calculating what is the minimum possible available to me so if M2 remains saturation with VDS 2 equal to VGS 2 so VDS 2 is VGG 1 equal to VG 2 is 1.2 so if I keep it 1.2 volt I am guaranteeing M2 will always remain in saturation I am actually interested to know what is this value just a minute because I want to see that upper value also should saturate the upper one so I am trying to see both together how much I will saturate okay is that okay for M4 to be saturation VD 4 minus VD 2 should be greater than VGG 4 minus VD 2 minus VT that is VGS which is VG 4 minus VD 2 is VGS minus VT and this is VD 4 minus VD 2 is VDS for this this condition gives me it should be 2.4 minus 0.83 substitute the values so around 1.57 so it is 2 VOV plus VT now this value has now come that unless I have a VOV which is equal to 2 VOV VT I cannot ensure you know both individually VOV is sufficient but together in series I must attain this value so that the output of what which I am now calculating both transistor remain in saturation so that the minimum I am now getting is 2 VOV plus VT where it will definitely gather otherwise you should have to further increase if you want 100 percent guarantee on it but what is the since VOV is 0.37 as you said so 0.37 into 0.74 plus 0.83 so it is roughly 1.57 volt which is required at the output is that correct as the minimum we mean so that means not really doing fantastic job because till 1.57 volt it is not acting like a good current source that is the limit of this but what is the advantage I got it this I have achieved it okay I have figured out that okay what is the value I would prefer it should be independent of VOV in such why should I feel it should be independent of VOV because if it is only VT dependent then I am controlling it okay so I like to have a current source which is only strongly dependent on video nothing we nothing else no W by the if I get that value I am happy so I am trying to reach towards that but if I use cascode I have a larger VD4 requirements I am coming to keep M2M4 in saturation now this is an issue which has to be tackled because what is a good current source in some cases may be there you have sufficient voltage margin so you can still go ahead and work with it okay but in other cases this may not be acceptable you will actually prefer point some 0.8 or 0.7 volt as the we mean for you now this calculations are all this to do how much minimum really I can achieve for you okay is that okay now I can do without going into details but as we have already done it we can do for RO calculation by putting GMVF4 this RO4 parallel GMVGS2 both are in as you said you are in saturation so these are equivalent circuit I apply VX source pass ROX current why VGS2 is 0 I said because the source is coming from reference and that I must actually create it to 0 no current in the reference all sources current sources be open and voltage sources be shorted so the other side of circuit is not necessary because there I am forcing VGS2 to go to 0 now if I do this you can see GMVGS2 also will go away so if I calculate this value GMVGS4 multiplied by parallel combination this so RO will come which we did earlier is GM4 RO2 RO4 which is essentially gain times the RO if ROs are equal then you can say GM RO square is that correct what is the output resistance of a cascode GM RO square so we will achieve higher output resistance by simply cascoding at what cost I did this I had to have 1.57 women for this current source to operate as a good current source is that clear so the conditions which I thought we can achieve by just cascoding was not sufficient is that point clear Pratik Parik I have improved RO but I also saw it has improved increase the women which I as I said my first characteristics ideally I want women to be close to 0 or very sharp rise very small women then it is a good current source and trying to reach that so why are we looking into this to reach there will one by one go step ahead so I say okay first we went for simple then we say okay let us cascode so I brought out out higher I now want to keep this output say similar because I do not want to reduce my RO if possible I may want to increase further but I want to now reduce women so what should I do so that I can reduce women's okay now what we do is we can reduce the women by very funny circuit is done this is called magic battery solution this solution is named as magic battery solution okay the best part is similar except that please do not worry too much circuit is same as what it was except that between the gates of M3 and M4 I have applied a small battery of PT okay and that is why it was called of course there are number of variations on this I am giving with the simplest of them there are four such circuit which can do similar things okay one of them maybe we will see so what is now happening is we have this 2 VoV by VT which you are getting minus VoV VT because this additional VT we are supplying now which will get subtracted so now we are getting VoV as your women so you are reduced from 2 VoV plus VT to only VoV okay which is what you said smaller so I putting a battery to compensate I will be able to reduce my women but no cost at output because I cascode stage is not changed by me is that correct now maybe you look into the book there are variety of of course this name is not given by Baker but this is an interesting name I read somewhere is called magic battery solutions okay how to create this VT is what the solutions are different way you can create VTs and then you can see that you can compensate for please remember this is opposite sign that is why it is deducting actually this technique of readjusting the V minimum by adjusting additional batteries you can have multiple there are multiple systems so maybe you look into book this is just to give an idea how women can further be reduced normally batteries are not put like this so some other method will use to put the minimum VT there equivalent source equivalent reference so I need a voltage difference there so now we must look for what is different because I need that somewhere here to get it okay but as far as theory is concerned if I can put some value there I can minimize this value is that okay this if you change the VGS okay corresponding with this voltage plus this voltage this to be a minus this if you subtract then the videos will be this to this will be this try yourself substitute the values okay for every node okay the method I suggest you every node you calculate voltages and find voltage here and find voltage there videos of M2 but that additional that will be same videos because that that I cannot minimize because that will decide by my current which I will push but at least here it was Vov plus Vt that Vt I actually cancelled your point is very sorry I think you are also right this value which I have reduced here it was Vov plus Vt that I have actually reduced by 1 Vt by putting a battery is that correct so overall 1 Vt reduction I have done this is just you can see 1 Vt only I am reducing out of it that VGS I resubstracted 1 Vt I can read this value to some further reductions but the problem is I reduce this too much this transistor may not remain in saturation so how much Vt to adjust and how much battery to adjust is forced by me M2 to remain in saturation so this is what I thought that this is good enough and that is the minimum I should start with okay so at least 1 Vt V minimum I have gone down okay is that okay sorry I should not have said this is not here this is what you have said is correct this is at VDS to is the value which I got okay okay we are very good the another thing which is wearing me on any current source and current mirrors is something which is you know in real life no parameter remains constant is that we are seeing variability issue so how do you monitor variability what is the method of finding variability so one method is called sensitivity analysis is that clear what is sensitivity here is a definition of sensitivity I want to find variation of Y with reference to variation in X is that okay I want to find sensitivity of Y with reference to variation in X so it is defined as limit of X to 0 delta Y by Y upon delta X by X this is the definition of sensitivity of Y okay if this is my sensitivity for more details please read boys and because book if I have missed something you actually look for other circuits there because I do not want to spend all of my time in only current sources I have limited time so I only showed you the method what they are trying and that is what we are looking for so let us look for the sensitivity of current source with respect to which parameter is the first parameter I should look into the power supply because power supply is never a constant quantity it is externally connected from the pad and that can vary because of variety of reasons particularly in OCam we actually look for that variation in what term we call there power supply rejection ratio there is a variation VDD what happens okay here there is no PSR but PSRR but we just want to know what is it let us say for a simple mirror I calculate my sensitivity okay this IDS 1 is equal to IDS 2 W by L are equal then I 0 is IDS 2 which is equal to IDS 1 okay but how much is IDS 1 we have calculated VD minus VSS minus VGS this remember where drop across this plus VSS is essential in net VDD is that correct IR plus VGS plus VSS is VDD okay so I can evaluate IDS 1 from that VDD minus VSS of course this is minus of minus so it will add minus VGS upon R now we want to find the sensitivity of I 0 because that is my output with reference to variation in power supply voltage so I define it is limit of VDD tends to 0 with small value delta I 0 by 0 delta VDD sorry sorry sorry sorry sorry sorry I made a mistake everywhere please check it you are very good okay so this if I rewrite this this is equal to VDD by I 0 partial derivative of I 0 to VDD so it is this is my SI 0 VDD is VDD by I 0 delta I 0 by VDD but if I see delta I 0 by VDD from this term which is delta IDS 1 by delta VDD if I differentiate this equation of IDS 1 I get 1 upon R is that correct so if I get 1 upon R because these are constants so I leave them delta I 0 by I 0 if you look at it I substituted some values but okay first let us look at this this is VDD 0 by I 0 R and the value which I last time used value is the R is 380 K for a 5 fold supply 5 fold means 2.5 VDD and 2 minus 2.5 VSS is net 5 is that clear 2.5 VDD and minus 2.5 VSS so some total is but here only VDD I am looking VSS I am still keeping constant okay so 2.5 upon 10 to power minus 5 into 380 I 0 is let us say 10 micro am current assumption is I 0 in our case example is 10 micro am current that is what we solve the problem so this is what it is so this gives me a sensitivity of 0.66 if I want to know the change in current of I 0 then 0.66 0.2 0.2 0.5 which means if VDD has change of 0.1 volt plus minus 0.1 volt this is the kind of percentage variations you can get in I 0 is that clear so this is the sensitivity what I 0 will change if VDD changes is that correct this is essentially why we are looking this because we constantly say I want constant current source okay now this constant word is how much constant okay so what should be the idea here whether the sensitivity should be larger or smaller as small as possible because I do not want current to change with change in VDD or very small change in I 0 with reference to large change in VDD that happens I say I have closer to my constant CF current okay at least from the power supply side okay if that influences directly I change 1% I get 1% 10% then I have a worry so at least it should not be it is less than 1 anyway so at least you have improved a bit by this kind of sourcing you did okay so this is one parameter which is the other parameter we should worry about in variations one is power supply value what else when the circuit is working somewhere what is it changes because current is flowing temperature so the next worry is temperature variation okay is that okay should be the first is power supply voltage variation the other is temperature variation and temperature variation is many times much stronger in fact okay because device is normally operate from where to where in many operations as much as minus 25 to 150 or 125 okay or minus 40 to some 105 degrees this is milk standard milk standards so device may even in ambience may vary in its own temperatures or device during working I square loss will keep hitting the device any unless you dissipated properly so the temperature variation is a crucial fact for us to figure out whether I 0 will change at different temperature what do we expect should not change that is what I ideally will like the temperature variation sensitivities expressed as temperature coefficient is different defined as temperature coefficient okay sometimes they write like this or maybe I will write like this okay TC is capital F is subscript so TCF temperature coefficient of I 0 is defined as 1 upon I 0 delta I 0 by delta T okay this is how temperature coefficient of I 0 will be defined we already have written sensitivity of I 0 to temperature if we can find out so it will be okay I same mistake again limit of delta returns to 0 delta I 0 by 0 delta T by T I T by I 0 delta I 0 by T so you can see from here there is a relationship between sensitivity and TCF is that clear this part 1 upon I 0 delta I 0 by DT is nothing but TCF of I 0 please look at it TCF of I 0 is 1 upon I 0 DI 0 by DT in differentiation this I get 1 upon I 0 DI by 0 multiplied to T so T times the temperature coefficient okay if I put F of I 0 is sensitivity so if you have been given sensitivity and temperature of operation and actually specifying temperature coefficients is that clear is that clear or vice versa so then same thing data is given in some cases in S form some cases in TCF form but both are anyway interrelated okay let us calculate TCF what is I 0 I just we wrote it will be is it okay so far so good I 0 is I DS 1 which is VDD minus VJ minus VSS by R for the simple mirror I differentiate so it is delta I DS 1 by delta T and I differentiate this term with reference to temperature now which are the terms which are functions of temperature we assume VDD and VSS do not change with temperature okay this is also not very valid statement every time but assume it right now but mostly I can assume that but which is the strongest function of this temperature the resistance which has a direct change in resistance occurs with the temperature but VG also changes because VGS has something to do with VTs okay which we have VOV plus VT so obviously I must look for VGS variation with temperature and I must look for resistance variation with temperature so I differentiate this 2 terms so 1 upon R DVGS by DT plus 1 upon R DVGS DR by DT if I do this then I get R to the 1 upon minus 1 oh minus 2 hojaya okay you are right differentiate Kana okay so I substitute this 1 upon I 0 TCI 0 and if I whatever just verify properly 1 upon DV by DT minus this DR okay so I now substitute VGS is that correct what is VGS VGS is equal to VT under R to beta I okay sorry I by beta if I do that then I can actually look for this expression similarly this just check you know maybe I say in adding I might have done some issue but just check it well so basically what is TC or TCF if you keep calculating the same name now everywhere if you substitute for those values are simple mirror 380k and 1.2 volt VGS VT or 0.83 volts we can substitute those value and we figure a type this is 0.17 percent per degree centigrade okay so typical but normally all TC's are expressed in what numbers not in number they always express in part per million okay 1 in 10 to power 6 that is the unit they normally use so if you convert this into part per million it is 1700 part per million per degree centigrade is the temperature coefficient of or 0 by the way 1700 is not a large value compared to other value which may be 3000 or sometime 2400 so this value is not largest among the values which I will use in my analysis resistance in fact you calculate is typically around 3000 for the actual resistance and make in chip okay so it is largest variation come from resistance for that this comes from VT variations okay so we will see how much variation temperature depending each has how much PPM they have okay but this is to get an idea typically the source currents are 1000 to 1500 to 2000 PPM per degree centigrade rise is always seen with the temperature so now you think of it if I increase it by some amount of temperature the current will correspondingly change proportionately and are you really accepting that much change if that is acceptable to you for your device circuit further no problems if you do not want that then think of it to adjust these values what should I do you can see if I can somehow these two terms equal plus and minus I can bring down that value okay that means I will design it something put to design this if I change my W belt or VGS or anything or VT then what will I change whether that M2 M4 will remain in saturation I am not guaranteed so I must first go and verify every time there okay because my R0 guarantee I must ensure that R0 is higher so by doing this I must see that my other factors are not terribly disturbed okay and that is where the design starts at how much TCF you can have to adjust what best R0 you can get at what the minimum you can get design whichever is possible that is the source for you is that correct but in simple mirror R0 is not very high so anyway going to do cost code of that with battery magic battery there so that further reductions in women I can attain and also I have higher R0 but with that I am not done this with that I must calculate now TCF Y0 and figure out whether it is lower or higher than 1700 for the simple mirror if that is much higher how much tolerance you have very very far yourself if that happens fine otherwise go back redesign everything is that issue clear to you parameters I am worried about the saturation of M2 M4 to get my R out higher I want the minimum so I will use some other circuit part of minimum and being all that with that W bias I use I figure out my TCF is too high and I have to reach in everything okay that is where the design starts given this value how much tolerance I have okay because designers do anything at the end of chain it should follow you so what it will give you will have to model it back and say oh I did not take care of TCF therefore these values are gone out okay so this such a situation you must take in designs okay just for the heck of it I just give some values for you to value to see whether this typically a resistance which is used in diffusion N plus region of source drain whatever we use in a mass transistor if I make a resistor out of N plus region how do I make a resistance of N plus region anyone maybe I show you quickly this is my N plus area okay this is my junction depth in P okay this is the source drain length what we call LS or LD whatever it is and if you see it another dimension which is W okay this is my W so the area is W into LS thickness is XJ so and if the resistivity of this sigma is Q mu N plus so I know rho which is 1 upon Q mu N and N plus mu N is known N plus is known or is rho that is rho L a by a T of course rho T by a so I can calculate the length of the source region told you source as a source in the transistor as use another say for example the resistors are made something like this this is your transistor for example just another N plus region is created here okay and the resistor is built in that that is how ICs are made whichever component you want you should put another region for that what is the problem with such putting there what is the criteria I should have this is N plus this is N plus this is N plus but this is P isolate and how do isolate the two areas this either put an oxide down here which is STI or this N plane transistor should have a gain of less than 1 okay is that clear or put even higher doping here okay so that the gain goes down okay it is called gardening okay so put either gardening or put isolating oxides below trench it down and separate the two areas okay that is the basic requirement to make any other component so every component in a circuit has to be isolated from the others by either of these techniques okay and that cost hell of money okay yes this is a resistance now a bar of semiconductor high length width and thickness so well by a so I just only length and width is given by W which is given to us so I had a longer L N region of this decides my resistance typically even this is not done because N plus is not a constant quantity so it is actually given by R is equal to RS L by a sorry L by W RS is called the sheet resistance of the N plus region which is typically maybe 10 ohm per square or 15 ohm per square or sometimes even 1 ohm per square in some areas so RS is known to me from technology that was generally used as the standard widths and the lengths are generally adjusted to get your sheet of proportion to that here I need R you want okay is that okay this is how all resistances are made okay which is the higher resistance if I want what should I use which area I should use N plus is a very low resistance because N plus is a higher dope region so conductive is higher so what should I which area I should use so actually I have another this separation and this P region I another P created in the P which is the dope sheet resistance of my choice and then make a contact here to make a higher resistances is that clear I have P region created in the P well itself okay and make two contacts separated by length L to give my sheet resistance into L by W values why I said P P will have a higher resistivity and therefore higher sheet resistance how can you reduce I increase or decrease sheet resistance other than the this what is sheet resistance I defined anyone row by T thickness I can adjust even thickness but normally I cannot directly implant something here and separately implant if I already being implant I open a window and implant right there okay but the higher resistance I will have to implant anyway okay so for a low resistance the source area the daily area whatever N plus I am doping same I will use it for low resistance values I will only adjust lengths for them and width of course standards so I will get my resistance of that but if I want higher I can even deposit anyway I am going to have a poly here so I can have a poly layer okay of course it has to be also protected by oxide and I can make a contact to poly because poly has a very high resistance related to everyone else okay is that clear another mask please remember what is the variant technology everything I do individually I will require every other area to be masked to do process there achemath $1 million okay. So now do you really wish to do that because how much money how much money how much money have when I do everything is not the same capacity in this technology I am always not my suces sitting there okay but other capacity methods also and also a a transistor and grounded both side this is a good capacitor if I cannot get to the source I will make a diode out of it okay I showed you only diode connections so I did not make any additional device in the ICs I only convert my MOS technology areas into variety of component what I cannot do then resistor I did capacitor I did diode I did inductance inductance which is nothing I can do about all that I can do a print a spiral on the top of this okay and that is very difficult game you know I will show you some it takes so much of area make a small inductance nano 0.1 nano in the river still requires some 20 turns or 18 turns okay and that area if you see a RF circuit 90% of RF circuit area is because of the inductances okay in analog chip except for VCO where we will actually go to inductance we will never use inductance anywhere okay even in filters which we will do is possibly I will replace L by something okay okay by using switch capacitor I will use LC as combination and everywhere I will replace us by C okay so I will never use inductances as far as possible in analog okay I will only use capacitors I will use resistors also out of the same and I will must understand nothing more or nothing less okay that is how the integration is possible so please do not think that I any even if I show you this essentially what I am going to do is the following a pre-device properly biased it acts like a resistor okay so I am not actually going to use any time a resistance anywhere is that clear to you so please take it that in real life on a chip only most transistors are preferred everywhere convert as much as you can okay you score ground curve score ground curve score fuller scope but that all that I will give you okay so this has to be understood that in IC technology the reason is size W by L I want to see smaller any other way I go it will be larger so I will it will not be as good so what is the problem the sheet resistance I am sorry the TCF of this and TCF of this is different in sign okay and that is the problem starts okay then should we not really put a resistor to compensate so that is what band gap reference people do they actually put a resistance to compensate okay they do not put mass device or any other device to compensate they actually use a resistor because it has the opposite sign of TCF so you want to subtract so please remember different components have different way of looking at it in a given circuit this is some additional examples I gave you okay so for the given n plus region coming back to where I was TCF R is 1 upon R dr by dt which typically for n plus region is 2000 part per million per degree centigrade TCF for threshold I think this value you must be aware of those who are done secondary course it is changing threshold voltage with temperature is typically 2.4 millivolt per degree centigrade with a minus sign that is decreases impact so for typical 0.83 value of this TCF becomes roughly minus 3000 ppm per degree centigrade typical as I say please remember in TCF 1 upon VT is the value coming so for this value will be function of VT itself which VT you are using is that okay what is TCF of VT 1 upon VT delta VT by delta T so 1 upon VT has the value which you have to at different VT this will be large so smaller VT what will happen TCF will be even larger is that clear minus larger but this is around 0.8 volt VT this 3000 to 3500 is typically a ppm per degree centigrade is TCF for a MOSFET how much is this in the bipolar Raj that delta VB by delta T there we calculate how much base emitter voltage changes with temperature 23 millivolt 2.3 millivolt per degree centigrade similar numbers not exactly same number okay that is the way similar thing that there for a MOSFET beta dash is mu C ox so if I see mobility variation in this it can be written as beta dash 0 T by T 0 to the power minus 3 by 2 this is temperature dependence of mobility this gives 1 upon beta dash delta is roughly equal to minus 1.5 by T where T here is in Kelvin's so typically TCF for beta dash for the values which are used could be around 5000 part per million very large TCF for these device beta dash so we are seeing yesterday you are saying that beta dash is a very strong temperature dependence please remember this is for the bias baker's books data based on that calculations have been done for different values you will have to figure out actual values there so do not say sir you have not said that this is a typical values expression remains same data you substitute of course 5000 will not become 25000 any date may become 5000 500 4500 but it may not be 5000 for all cases we handle okay okay now we are seeing sensitivity due to power supply and sensitivity due to this so now when I am designing a current source all these areas are in my mind how much current I want how minimum voltage I want how much I want and how much is the sensitivity or both for VDD and V temperature I have based on that only my design will be a good current source is that clear okay here is another current source which slightly improve some of them not necessarily all of them we know the variation occurs how do you get rid of variations in normal circuits where is not I mean you are right word compensation but what do we really do feedback negative feedback stabilizes everything okay so one technique of improving this is to actually use negative feedback that is what the negative feedbacks do okay so based on negative feedback and a simple current mirror probably we can improve some of the sensitivity issues and two such most popular current mirrors which are available one is called Wilson mirror the other is called regulated regulated cascode both uses negative feedback in their circuits just now I said it and now here that circuit this R has been replaced by a P channel device now the question which you should ask what is this V bias okay this value you know that M1 must remain in saturation so that resistance is constant so how do you fix V bias so you need voltage reference which is in constant and actually used to connect there okay I repeat what I say I need a constant voltage source which I can connect here so I will also see after the current source I will also try to see what is voltage references available and how to constant I will see their sensitivity with temperature is specific and value with the power supply variations so if they are constant I can connect them here that value will push a fixed amount of resistance half of this and you will flow a current of my choice through M1 and therefore M2 is that okay so V bias as of now I say it is constant okay how do I get that constant is also in game okay so we will see of course there are another way of doing it instead of actually doing it you can use a feedback also to keep V bias constant so reduce some tricks there also and then it doesn't work itself so we will see that okay here is Wilson did over the cascode area he did not change anything on the simple reference side okay however he has a cascode on the output side because are you do not want to reduce okay I kept this series like this but what I did is the output of the first this stage or the M2 drain I connected to the gate of M4 now let us see how it feedbacks please I have asked have you drawn this figure rest you do not write think only first year just draw the circuit and let us discuss first okay so start looking I right now assume because of my fixed bias this current which need not be called IDS1 may be called reference which are booked sometimes it is constant is that your IDS1 is a constant current generated because V bias is fixed by me okay and no variations are taken care of all of it as if this current is constant is that clear now let us say for some reason I 0 increases okay if you say this current increases what will happen that means this voltage drop will increase which means this current will increase if this current increases what will increase this current will increase because the mirror part of that if this current increases and this is constant this voltage must go down okay because you are pushing on the top and now you are asking it to increase so this voltage must go down if this voltage goes on VGS4 goes down so I 0 reduces okay if it goes too low the opposite will occur this will push till both side match so this is what essentially negative feedback does is that clear and says negative feedback allows you to stabilize which is the standard way of stabilizing anything you can use a partially cascaded mirror using Wilson current mirrors or Wilson connections and say that it will be much better than normal cascode sources is that clear to you you did not get it IDS1 is constant but by force you are trying to change IDS2 is coming from mirror from M3 side it is going to be just changed get connected okay what we are saying is how can it happen no it will not that is why feedback is how feedback will push that same current is what I am telling is that point clear to you your idea is in a circuit 2 currents cannot flow that is exactly I am also saying is that clear to you because 2 currents cannot flow but now I am forcing this to increase which means this voltage must go down because IR drop will go down so that this VGS falls so this current will reduce them is that correct because we say IDS1 has to be IDS2 is that clear so how a feedback will force that issue that IDS1 only current can flow down even if there is a variation in I0 is what I said and therefore I0 will become constant independent of anything this is called Wilson's feedback system these are simple statements nothing very great current mirror has I0 much stable than the simple mirrors output impedance is further improved because of the cascode connections okay I already said for those who I made a statement the V bias is normally taken for the stable band gap reference okay which we will look into okay can you think why they are also it is a constant must be there also should be feedback because either way it cannot create a constant value so a band gap reference must have some comparisons it must find errors and feed it back so that it reaches to a constant value okay so we will see that later is that okay everyone this is VGS2 this is VGS3 okay now we see this is VGS4 this is VDS4 this is okay what we said as far as the P channel device is concerned it is only now acting like a current source with a resistance of R01 and that is a constant current source because you say the bias is fixed so we do in AC we do not consider that that is a fixed source okay but this R01 will appear for that because there is the output resistance of that P channel device okay so as far as I am concerned for the first transistor only R01 from Dane to source is available so I plotted it here okay for the D2 for this VGS2 by the what I am calculating I am calculating I am giving a Vx here and finding Rx by Ix to get R out I am not doing anything I already shown you here I am trying to find R out from substituting or putting a Vx source and finding Rx there on the terms of D2 it is R02 shunted by GM2 VGS2 but this D2 is gate of M4 is that clear please check it D2 or D1 is G4 physically connect Kana so this D1 D1 D2 G4 are same connections D1 D2 G4 are same connections is that okay this terminal this terminal and this terminal are same so this is that line okay three of them D1 D2 G4 now you see there is a Vg here coming here which is same as a voltage minus the source voltage of M4 is the Vgs4 is that correct so the S of this transistor M4 and the voltage here subtraction is Vgs4 so this is my gate this is my source the gap voltage drop between gate and source for 4 is Vgs4 sign please check it this has to be plus because this is an internal device so this is plus and this is minus for S4 is that okay is that okay so this Vgs4 why I have done this circuit is this you should also see that the way I see a circuit I can make an equivalent right there and then I will say okay just substitute whatever you are looking for making an equivalent my suggestion to you is this method is always correct okay because you are only following and from there whatever you are seeing you are substituting there the S2 and S3 are same which are grounded S2 S3 source of M2 M3 are connected and grounded S2 S3 are connected and grounded okay now I have to see drain of 4 this so this is my where I am actually going to push the Vx Ix currents Vx4 and Ix this which is my I0 which I am looking for for this transistor what is the current source GN4 Vgs4 shunted by RO4 just wait for this if I say and just now someone was asking if the source is a bulk is grounded between source and this there is a voltage now VSB is that correct however the way VSB I can see VSB4 is nothing but the science I am putting plus minus for a source which is essentially equal to Vgs2 and Vgs3 Vgs1 where Vgs2 Vgs3 because they are connected with this is same as this potential so I say VSB4 is nothing but Vgs2 or Vgs3 is that correct so this voltage so this is my S3 this is my S4 this is Vgs2 which is equal to VSB4 and since please remember this is VSB opposite polarity current pushes up GNB4 VSB4 okay now this is the equivalent for this for M3 is GN term will appear there because this is a diode connection so only RO3 parallel GN3 I kept it RO3 you can even neglect RO3 because GN3 will always larger than 1 upon RO therefore that but right now I kept it I always say I let it because I do not know what currents you are going to use so I want to retain them in case they are compatible make it parallel okay now this is very big circuit looking but there is nothing big part in that the first thing I calculate is VSB4 VSB4 is Vgs2 same put same node Vgs3 now look at the current which is passing through this this drop is VSB4 is that correct drop across RO3 parallel GN3 and what is the current flowing some total of these three whatever current in this is essentially the net current so current coming out is also IX a current I say so all this IX current flow through RO3 parallel one upon GN3 is that current that is your VSB4 so I get previous before is Vgs2 equal to Vgs3 is IX times RO3 parallel this now I want to calculate Vgs4 how much is Vgs4 if I know this voltage and if I know this voltage is that point clear how do I calculate Vgs4 this voltage minus this voltage is that correct that is my Vgs4 so I write how much is this voltage GN2 Vgs2 parallel combination of RO1 RO2 is that correct so this is my voltage here is that so be clear the voltage drop across parallel combination of RO1 RO2 is nothing but the voltage across this that is Vgs4 how much is VS4 the Vgs2 just now you wrote that okay please remember this voltage is this voltage so you subtract this is that clear so you get Vgs4 is minus GN2 Vgs this minus Vgs2 is your VSB4 okay but what is Vgs4 now why I am interested in Vgs4 because I want to find draw the cross because of this so I want this current source is that okay everyone please write down this circuit is as I say you can simplify circuit by parts and can directly write many things please do not write because this gives you a actual features what is happening there is that correct not only for this circuit or any circuit if you are more than one transistor on the top please put three layers of them okay and actually match the nodes correctly okay that will never make any mistake in evaluations at then okay so this is I am not saying this is the method but this is much simpler method of doing things I am saying this from my experience but you can do much better you can simplify circuits much equivalent of what is the other method for each stage find equivalent them in source and turn in and register replace they are keep doing that that also is a equally good method but in doing that essentially you are partly doing the same thing which I am doing I am doing all together that is it is that correct so my method is no different from the other methods given in the books it is same I am only trying to see visualize what this circuit is doing so I actually show you what is the equivalent of that from there please do not think it this is their technique or something okay before we quit let us finish this today VSB 4 is the between the source because please remember there is a drop here which is the source voltage for D4 M4 since substrate is grounded there is a VSB 4 is that correct but I know this VSB 4 is same I have because this is the same terminal source here must be same as this and this VSB 4 this is plus and this is ground is that sign correct source is that higher potential than the ground okay so that is the way that is why I said the way I had run I am only keeping signs accordingly what we have and that is why actually I change this sign also upwards okay okay is that now clear to all okay so VGS 4 is therefore equal to minus I take sign 1 plus gm to R1 parallel into VGS just combine nothing nothing very serious but VGS 2 is VS before I just wrote so I replace VGS 2 by VSB 4 but VSB 4 I already calculate as I X parallel multiplied by RO 3 parallel 1 upon gm 3 so I substitute that here so I get VGS 4 is equal to minus 1 plus gm 2 RO 1 parallel RO 2 into I X RO 3 parallel 1 upon gm 3 is that okay so one equation I figured out in which VGS 4 is related to this okay if you look at the circuit once again please write down this we will come back to circuit again only up to equation 1 you check and then I will draw the circuit okay is that okay everyone wrote down this equation okay see the circuit this I X is divided into 3 currents is that correct gm VGS 4 minus gm d VSB 4 plus VX divided by VX minus VGS 2 or VSB 4 by R 0 this voltage minus this voltage divided by R 4 this current source and opposite current source this is the net current which is I X is that okay 3 parts each is this I X is some total of these 3 okay because you can see below I X is coming so all 3 must be summed up proper signs okay so someday gm 4 VGS 4 minus gm d VS4 plus VX minus VGS 2 is that correct VGS 2 divided by RO 4 is the second equation then I use this 2 equation and evaluated VX by wherever this VS VGS 4 is there I substitute all of it here collected the terms for I X collected terms for VX and then divided VX by IX okay so just check this is RO so this is I do not know which one but just check some RO must appear there okay now yeah it is gm RO okay gain so yeah okay so check it all that I say I what I did in the paper I actually substituted VGS 4 here VSB 4 in terms of IX again and then I collected VX and IX terms and divided this is what I did so this is what I got last expression check Kirlin okay please check it sorry for my mistake I should do that may or may be tomorrow I will actually show the correct expression which I got in normal cases gm 3 will be same as gm 4 because I will keep m 3 and 4 identical thresholds are same RO 3 parallel 1 upon gm 3 I will replace it by 1 upon gm 3 because I know RO is a larger okay and gm 3 is equal to gm 4 so I will say RO 3 parallel 1 upon gm 3 is 1 upon gm 3 all 1 upon gm 4 and I called on gm itself per se okay I can use that I will also say RO 1 is equal to RO 2 equal to RO 4 all this mayors are same so all RO the rate if I do all this at the end of the day and let us say gm 2 and gm 4 are only one these are this can be adjusted we say roughly our out will come RO plus gm 2 RO square okay all roughly gm 2 RO square okay both cascode so nothing great all that I did after all these huge calculations I arrived at saying that it is gm RO square okay no great this but just to say that the circuit is larger things do not change very much all that you have to keep evaluating expression wise longer expressions so do not get fear of that so obviously we knew it is a cascode and therefore it has to boost RO now minimum is the next thing we want to know okay ma'am you just write this final expression which is of relevance to you you can do whatever you leave all out is RO plus gm 2 RO square by cascode the output impedance has boosted gain times RO okay gm RO is again so times RO that is the boosting of that further boosting how can we do you can use cascode with a gain okay so you can further boost RO in case you need further RO higher some other penalty of power and area you may give okay what is the minimum really for okay at the end I what I wrote is otherwise also to sigh I did not bother to see up I say it should be RO plus gm RO square okay equivalently if you see this figure this voltage is this voltage plus Vgs I repeat this is Vgs you have come here plus Vgs is that correct I repeat again this voltage is same as you reach here this plus Vgs of this is the Vd4 is that okay so Vgs 3 plus Vd4 is the output voltage V0 so Vgs 3 plus Vd4 sat the transistor must remain in saturation so we say it is what is the age of saturation minimum KLA Vgs minus Vt so you substitute Vgs4 minus Vt4 I can rewrite now Vgs how do I write Vgs in what terms Vt plus under root 2i by beta plus have you written down this okay so we write your minimum is under root 2i0 by beta 3 plus Vt3 plus 2i0 by V8 Vt cancel kardya minute okay if beta are also equal which you can then a 2 or agabar 2 into 2i0 beta dot W by L plus Vt so now view minimum is proportional to 2i0 under root of 2i0 so larger the current source you are getting by definition or by theory your view minimum increase is that clear this is not you cannot do much okay essentially I am saying even if slopes view minimum whatever you are getting if this is your this if you want higher currents you will have to sorry here you will have to do only this there is no other way of pushing higher currents if you push higher currents drops will also increase essentially what I am saying ohm's law is there is nothing I can do only thing is it is not linear like ohm's law it is under root of i0 which is it proportional okay because of the square law term I am getting okay so I can evaluate my view mean how do I minimize this I cannot change i0 because that is what I am looking for all that I adjust is W by L's okay but if I adjust W by L what will happen the more current and reference current may not be same so I will have to figure out what reference I should keep so that this W by L I get the i0 of my choice okay that you can always think is that clear because the ratio may not be same then then it will transfer in the ratio so initial current must be boosted to come to this value if W by L is change on the other side okay period out what should be reference current okay that is how you will be able to define specifically this okay we will come next time what is we call BT reference current source.