 This is lecture eight in the previous lecture we looked at nodal analysis how to do nodal analysis when you have a circuit with current sources and resistors that was the easiest case and we extended that to when we have voltage sources in that case if you are doing hand analysis you can use a super node if you are trying to set up the equations for a computer you can set the current through the voltage source as an extra variable and go ahead with the analysis now when you have control sources when you have a current controlled sorry voltage control current source then all it does is to add some terms to the matrix the conductance matrix so that it becomes asymmetrical okay and other cases can also be handled in the same way okay when you have a voltage control voltage source you will have to again either define a super node if you are doing hand analysis that's the preferred method because it reduces the number of equations or if you are setting up the equations for analysis by computer then you define the current through the voltage source as an auxiliary variable and also write down the equation for the control source okay so in all the cases on the right hand side you have the source vector which consists of independent current sources and independent voltage sources and on the left hand side you will have a matrix times the variable vector the variable vector will be the node voltages with respect to the reference node plus any auxiliary variable you may have used if you have voltage sources there will be the current through the voltage sources okay now before we go on with today's lecture is there any questions on previous lecture or any aspect of nodal analysis I would like to take them up okay so looks like things were pretty clear so what we will look at today is an alternative to nodal analysis that also is sometimes used and that is known as mesh analysis okay now the nodal analysis uses KCL at n minus 1 nodes of the circuit the circuit has n nodes and you have to write KCL at n minus 1 nodes and variables are the n minus 1 node voltages and any auxiliary variables and these auxiliary variables are current through voltage sources okay and the equations come from n minus 1 KCL equations plus equations for voltage sources the mesh analysis is the counterpart of this now instead of starting with KVL first I will tell you about something called the loop analysis it uses KVL b minus n plus 1 loops okay and use it uses currents as variables now this loop analysis the way it is done is you first identify a tree then you add each link that is branches that are not in a tree to form a new loop okay we took an example of this in one of the earlier lectures to figure out how many independent KVL equations are there you have to first identify a tree and then you add links to the tree to form new loops and around each loop you write a KVL equation okay now this can be done and this is a systematic way of doing it what we will look at is a subclass of this which is known as mesh analysis okay so this loop analysis itself is quite general okay now the mesh analysis is a sub case of this loop analysis and it's applicable to planar circuits that is circuits that can be drawn on a plane okay so all the circuits that we have considered so far they can be drawn on a plane what I mean by this is without any branch crossing other branches okay now I'll give you an example if you have a circuit like this this is a planar circuit no branches crossing any other branch now to this if I add a branch like this now this branch is crossing that branch okay now we have to be a little careful it's not how you draw the circuit but how it can be drawn okay because if I redraw this if I redraw this even with the red branch it can be drawn in a draw on a plane without any branch crossing any other branch okay in this case I was chosen to draw it in the middle but if I draw it outside then it won't be crossing anything else okay so this is also a planar circuit on the other hand if I have something like this let's say I have something like that and then I also have something going from this node to that node now if I have any branch between here and there it has to cross some branch okay I can draw it inside here when in which case it is crossing this branch alternatively I could draw the same thing from outside in which case it will be crossing this branch okay so this circuit is definitely not planar so the method of analysis that I will discuss today mesh analysis is not applicable to this circuit but it is applicable to any planar circuit now I have to emphasize here that the general loop analysis which is based on writing KVL in terms of the link currents is applicable to every circuit okay you first have to identify a tree and then go on that is similar to identifying a reference node for nodal analysis okay but this mesh analysis is simpler and it gives a structure that's very similar to nodal analysis and that is what we are going to discuss okay so once you have a planar circuit so let me again take a circuit of this sort and I initially consider a circuit with only resistors and voltage sources this is a planar circuit no branch is crossing any other branch and when you have a planar circuit you can always identify regions like this okay loops like this which are separate from each other okay so imagine that you are looking at the map of India obviously you will be able to identify states on the map and each of the states will be separate from the other state okay and everything will be on the plane now each of those regions each of the states if you will is called a mesh so I call it mesh number one mesh number two and mesh number three okay so mesh number three is this loop mesh number one is that loop mesh number two is that loop okay let me call it be one v2 r1 r2 r3 r4 okay now in each mesh we identify a mesh current okay let me call this i1 for mesh number one and i2 for mesh number two and i3 for mesh number three what I mean by this is that this is also a loop okay so if I take it like this this is also a loop but inside this there is another loop so that is something that we do not consider a mesh okay so for a planar circuit the definition is unambiguous each mesh is a loop that doesn't enclose any other loops okay and with each mesh we can identify a current each mesh has a mess mesh current okay and by convention we'll take all of them to be clockwise you can take all of them to be counterclockwise and you will get the same results but our convention is to take all of them in the clockwise direction okay and now the current in each branch can be written in terms of mesh currents so the current in each branch is the algebraic sum that is some in while taking into account the sign of the current algebraic sum of mesh currents basically and which matches do we take the mesh the meshes that the branches part of okay so what I mean is if you take this one this branch is part of mesh number one and mesh number three so the current in this branch would be i1 flowing from left to right minus i3 because i3 is flowing from right to left okay if you take this branch that is part only of mesh three so the current in this will be i3 similarly if you take this branch it's branch it's a part of only mesh 2 so its current will be i2 whereas this will be the current in this will be i1 minus i2 and so on okay so is there any questions regarding the definitions of the mesh and the mesh currents and branch currents in terms of mesh currents any questions I defined the planar circuits meshes and mesh currents and branch currents in terms of mesh currents any questions about any of these okay there is a question from obey the asking how to find currents in each mesh now it's not something that we find yet so far we have not solved for anything it's a variable that you identify okay i1 i2 i3 this is like assigning node voltages with respect to the reference node we assign node voltages v1 v2 etc all the way to be n minus 1 and then solve for them similarly here we identify mesh currents i1 i2 i3 etc for the number of meshes and then we solve for the mesh currents okay so we have to find out yet what they are okay so now the branch currents must be pretty clear also okay just so that it's very clear I will write that current here is i1 minus i3 current here is i1 minus i2 current here is i2 minus i3 and current in this direction would be i3 alone okay here it is i2 and here it is i1 okay now once we define the mesh currents and find the branch currents in terms of mesh currents we can write kvl around each mesh okay if I write kvl around mesh number one and let me call this v1 and this is v2 if I write kvl around mesh number one what do I have the voltage drop across r1 plus voltage drop across r3 equals v1 okay and the voltage drop across r1 is r1 times the current in r1 which is i1 i3 plus r3 times the current in r3 which is i1 minus i2 and that's all that's all the resistors we have and we have an independent voltage source and just like we put independent sources on the right side in nodal analysis we do the same in mesh analysis and if you look at the direction of this i1 minus i3 times r1 is the voltage drop in this direction i1 minus i2 times r3 is the voltage drop in that direction so the sum of this plus this equals v1 okay because v1 is also in the same direction okay so now for the second mesh what we do is the same the voltage drop across r2 in this direction is r2 times i2 minus i3 now we always go clockwise around each mesh and we also take the voltage drops in the same direction okay so for this particular branch the one in the middle we also take a voltage drop with this to be positive and that to be negative okay maybe I will erase some of these things so while writing the equation for the second mesh we take the drops in that direction okay while writing the equation for the first mesh we take in this direction for the second one in that direction okay and for the third one again we would do it in the clockwise direction voltage drops in the clockwise direction like that like that and like that okay so this is just convention even if you write it the other way around you will get the right answers but if you follow this convention you will be able to you will be able to if you follow this convention the equations will come out in a systematic manner okay now one of the participants has raised hands but I think unfortunately today's audio setup is such that I cannot hear your questions so whatever questions you have please type it in the chat window so here the voltage drop across r2 plus voltage drop across r3 which is if you look at it it's the current in this direction times r3 okay which is and it is equal to minus v2 because if you look at it this voltage drop is here to there that is from here to there and that if you look at v2 it will be minus v2 okay if you look at the appropriate direction or alternatively you can think of this voltage plus that voltage plus v2 summing to zero so that means that when you shift v2 to the right hand side you will end up getting minus v2 okay now finally for the third loop the voltage drop across this plus the voltage drop there plus the voltage drop there equals zero because there are no independent voltage sources in the loop okay so r4 times i3 that is the only current flowing through r4 and voltage drop in this direction I have to take the current in that direction which is i3 minus i2 plus r1 times i3 minus i1 and this will be equal to zero okay and this is the equation for mesh number one kvl equation around mesh number one mesh number two and mesh number three okay so I hope this is clear the procedure for writing the kvl equations around the mesh so what you do is you identify mesh currents then you represent each branch current as a sum of two mesh currents when I say sum it's the sum width direction so it will come out to be the difference between two mesh currents okay and then you write out the kvl equations in terms of the mesh currents okay now when you have resistors you will have current times the resistance value and the current is written in terms of the mesh currents okay so we will always have terms like i1 minus i3 that is the difference between two currents times the resistance that will be on the left hand side and on the right hand side you will have any independent voltage sources in the circuit okay now there was a question from Rajesh asking what is the difference between a mesh and a loop like I said mesh is also a loop but it doesn't contain any other loops inside okay for instance in this particular circuit this is a loop and this is also a loop but the second one is not a mesh because that loop contains a smaller loop inside okay hopefully that is clear whereas this is a mesh so every mesh is a loop but every loop is not a mesh okay and regarding the direction of mesh currents like I said by convention you always take each mesh current to be in the clockwise direction okay now that gives you a nice structure because so let's say you have two meshes I'm not showing the elements I'm just showing the branches in an abstract way so you take a current like this i1 and take a current like this that is i2 now every branch current will be equal to either one mesh current or the difference between two mesh currents so this branch is common to the two meshes and in the left side mesh the current is going downwards and in the right side mesh it will be going upwards if you choose all your mesh currents to be in the clockwise direction this will always happen okay so every branch current can be written either as a mesh current a single mesh current or as a difference between two mesh currents okay and this is analogous to if you assign node voltages every branch voltage will be either equal to some node voltage okay if the branch is between that node and the reference node or it will be the difference between two node voltages okay is this fine these are the equations in terms of the mesh currents and I will again rearrange them and group the variables together so I'll have i1 r1 plus r3 minus i2 times r3 minus i3 times r1 to be equal to b1 that is the equation for mesh number one and the equation for mesh number two that is minus i1 times r3 plus i2 times r2 plus r3 minus i3 times r2 that will be minus b2 and similarly for 3 we will have minus i1 times r1 minus i2 times r2 plus i3 times r1 plus r2 plus r4 equals 0 okay so these are the mesh equations now let me copy over the mesh equations also as with nodal analysis I will write this in a matrix form as some matrix multiplying the vector of variables which is the vector of mesh currents equal to the source the vector of independent sources which is v1 minus v2 and 0 and here you will have r1 plus r3 so this is what is multiplying i1 and the next would be minus r3 and minus r1 so this is for mesh number one the second equation is for mesh number two and you will write minus r3 r2 plus r3 and minus r2 and finally for mesh number three minus r1 minus r2 and r1 plus r2 plus r4 okay so any questions on this because I had already done nodal analysis earlier I went a little quickly through this but if some part is confusing please ask me now all I did was I first identified mesh currents that is currents in each mesh in clockwise direction then I express every branch current as in terms of mesh currents and they will come out to be either the mesh current itself for branches along the periphery of the circuit and for branches which are common to two meshes it will be the difference between two mesh currents then I wrote kvl in terms of these mesh currents and finally I grouped the coefficients for each variable i1 i2 i3 and then wrote the whole equation as matrix times the vector of unknowns equals the vector of independent sources or matrix of independent sources okay any questions so far now you can see the you can see that this structure is analogous to what we had with nodal analysis when we had only resistors and current sources okay first of all what are each diagonal elements what are the diagonal elements what are the elements on the diagonal of this matrix please try to answer this so in the diagonal in the first one I see r1 plus r3 second one I see r2 plus r3 and the third one r1 plus r2 plus r4 what are these okay I think many of you were able to easily answer this one it's the sum of resistances in each mesh okay now similarly so the diagonal elements sum of resistances in each mesh okay and the off diagonal elements you see that this element in the matrix notation this would be called a12 and that is the resistance that is common to mesh one and mesh two okay so this is mesh number one mesh number two and mesh number three and this is common to mesh one and mesh two okay so the off diagonal elements are resistances that are common to measures okay now you can see the analogy with nodal analysis very easily so first of all I will compare nodal analysis of a circuit having current sources resistors versus mesh analysis of a circuit with voltage sources and resistors now in case of nodal analysis the variables are node voltages with respect to reference node and in case of mesh analysis the variables would be mesh currents in clockwise direction now all branch voltages will be either some node voltage or difference of two node voltages a branch can be connected between some node and the reference node or between some two nodes okay if it's connected between some node and reference node then the branch voltage equals the node voltage if it's connected between two nodes then the branch voltage is the difference of two node voltages and in case of mesh analysis each branch current is either a mesh current okay now for branches on the periphery on the boundary of the circuit this will be the case okay because those branches will be part of only one mesh and the branch current equals the mesh current or it will be the difference of two mesh currents okay so for branches in the middle again by taking the analogy of the map that will be the borders between two states the current in those branches will be the difference between current in the left branch and the current in the right branch okay so the current in one will be in one direction the current in the other one will be in the opposite direction and this happens because we choose all mesh currents in the clockwise direction okay and finally if you write out the KCL equations and group the variables and so on and write it in this neat matrix form you will get conductance matrix times the vector of node voltages so this is the vector of unknown unknowns okay so this V with a bar underside denotes a vector and vector is nothing but a matrix but it has only one column okay equals the source vector and in case of mesh analysis you will have the resistance matrix which consists of resistances only times the vector of unknown currents that is the mesh currents equals the source vector which consists of voltage sources in each mesh and as a source vector obviously I mean independent sources okay and continuing the comparison the conductance matrix G has first of all it is symmetrical it has diagonal elements which are some of conductances and off diagonal elements which are and when I say off diagonal if it is the element ij in the matrix conductance between node i and node j okay and in fact it is the negative of that okay similarly the resistance matrix is symmetrical and the diagonal elements will be some of when I say some of conductances in the nodal analysis at that node and here it will be some of resistances in that mesh okay and off diagonal elements the element ij would be the resistance common to node mesh j okay in fact it is the negative of that okay so by the way all these are true when you have only resistors and current sources and nodal analysis and resistors and voltage sources in mesh analysis okay so this is just to point out the duality between nodal and mesh analysis you start off with KCL and nodal analysis KVL and mesh analysis and in a particular case when you have a circuit with only current sources and resistors for nodal analysis and only voltage sources and resistors for mesh analysis you get a neat structure for the equations which consists of a symmetric matrix times a vector of unknowns equals the vector of independent sources in the circuit okay and also the matrix elements can be written down by inspection in case of nodal analysis by looking at conductances at each node or conductances between different nodes and in case of mesh analysis the total resistance in each mesh or conductances common to the resistances common to each sorry the total resistance in each mesh or the resistances common to two meshes okay any questions so far now there are some questions about including current source in mesh analysis I will discuss that shortly okay so now I think the simple case is pretty clear we'll just take a numerical example just to get some practice or rather we'll resolve the example for later let's have a mesh analysis including a current source okay this is the circuit I had earlier and let's say instead of this register R3 I have a current source I1 okay let's say this is the case now as usual for mesh analysis we have to write KVL now what is the complication here I would like to have answers from the participants I want to write I want to go ahead with mesh analysis for this circuit and I initially took circuit with only resistors and voltage sources now I have added a current source what is the problem what is the complication with going ahead with mesh analysis for this circuit I hope the question is clear now we have already done this we have addressed the similar question while doing nodal analysis which includes voltage sources okay nodal analysis we write KCL equations and KCL says sum of currents at every node equals zero now when you have voltage sources when you have resistors the current is related to the voltage across the resistor and you have voltage sources the current is not related like that any current can flow through the voltage source that's why we were not able to write the KCL properly because we don't know the current through the voltage source now similarly my question is if you have mesh analysis and you have current sources what exactly is the complication again a couple of people have raised their hands but today the audio setup is such that I will not be able to hear your questions so all your questions have to be through the chat window okay okay so the problem is the following so while writing KVL for this mesh we have to say that the voltage across R1 plus the voltage across the current source equals the voltage across the voltage source but a current source can have any voltage across it okay for the resistor the voltage across the resistor is the current through the resistor times the resistance value so we can express the voltage source voltage across the resistor in terms of the current through the resistor whereas a current source by definition can support any voltage across itself so we cannot express the voltage across the current source as something related to the current value. So the problem is unknown voltage across the current source. So if you recall when you had nodal analysis and voltages you had the complication because of the unknown current through the voltage source okay. So this is the issue. Now how do we work around this? What did we do in case of nodal analysis? When we had nodal analysis with voltage sources what was the thing that we did? How did we get around the problem? My question is when we had nodal analysis with voltage sources what did we do? We do not know the current through it so what did we do? So what we did was to define an auxiliary variable for the current through the voltage source. Now that gave us an extra variable and also an extra equation because of the voltage source and we were able to write down the equations and also for hand analysis we were able to combine two of those equations effectively giving us a super node okay. So here the procedure we follow is exactly the same. What we do not know is the voltage across this current source let me call that Vx okay. So if I write the KVL equation for mesh number 1 okay I will have the voltage drop across R1 which is R1 times I1 minus I3 okay because this is common to mesh number 1 and mesh number 3. This is mesh number 3 and here I have mesh number 2 okay. This is the voltage drop across R1 plus Vx equals V1. This is for mesh number 1 and for mesh number 2 we will have R2 times I2 minus I3 minus Vx equals minus V2 okay. Once Vx is defined with this polarity when you go around the second mesh you will have minus Vx okay. So if you look at the drops going clockwise you will have the current in R2 times R2 minus V2 minus Vx equals 0 and V2 is moved to the right hand side sorry plus V2 minus Vx equals 0 and V2 is moved to the right hand side okay. So now what we have is an extra variable. Now to solve for the extra variable we need an extra equation by the way the equation for mesh number 3 remains exactly as it was before because mesh number 3 is not modified in any way by adding this current source okay. So where do we get the extra equation from? My question is by defining the voltage across the current source to be Vx we have got an extra variable in our set of equations. To solve for the extra variable we also need an extra equation. So where is the extra equation? So let me call this like I did before this current I will call I1 and this current I will call I2 okay and let me just change this to I0 just so that I don't have two I1s in the circuit and as Rp answered this I1 minus I2 which is this branch current is known that is defined by the current source and that will be equal to I0 okay. Now we did exactly this when we had nodal analysis when a voltage source was connected between node 3 and node 4 let us say V3 minus V4 equals the voltage source value so that gives us the extra equation okay. So the extra equation is nothing but the definition of the current source. So if I put all of these things together what I will get and I will write it directly in the matrix form I will have mesh currents and the voltage across the current source as the variables okay. Then for the second mesh we will have and for the third mesh we will have and the last one will be just the definition of sorry here I would also add plus Vx and in the second one minus Vx okay so that is what we had I wrote the last entry is incorrectly I have plus Vx here and minus Vx over there and also finally I will have I1 minus I2 equals I0 so that means 1 minus 1 that gives me I1 minus I2 and that is equal to I0 okay. So in my variable vector I have this extra stuff and my independent source vector consists of voltage sources and the current source okay. And this matrix which I will continue to call the resistance matrix has the resistances as well as some dimensionless quantities okay. So the setup is still in terms of resistance times the variable vector equals the source vector variable current vector equals the source vector. But this variable vector also consists of this auxiliary variable which is the voltage across the current source and similarly the right hand side vector consists of independent sources which consists of voltage sources as well as current sources okay. Now while doing hand analysis this increased number of equations is not a good thing you would like to reduce the number of equations okay. So then the answer is very clear again we followed all these steps while doing nodal analysis with voltage sources so I will go through it a little quickly. If I sum these two okay KVL around mesh number 1 and KVL around mesh number 2 what happens is this Vx cancels out and this is not a coincidence this will always happen because Vx is defined to be across some branch so on in one of the meshes which contains that branch it will appear as plus Vx and in the other mesh it will appear as minus Vx okay. So it will always cancel out and if I add these two equations what I will get I will have the equation as let us say this is I1 I2 I3 I will have the voltage row because R1 which is R1 I1 minus I3 plus I had that plus Vx equals V1 but that Vx cancels with minus Vx and here I have R2 times I2 minus I3 minus Vx which cancels out okay equals V1 minus V2 and if you observe originally I had the equation KVL equation around this loop or this mesh and the KVL equation around this mesh. So if I add the two essentially what I have is a single KVL equation around this bigger mesh which includes the current source okay this is nothing but KVL equation around the this bigger mesh which is called a super mesh okay in analogy to super node. So if a branch that is common to two meshes is a current source what you do is you avoid that branch and you write the equation around super mesh which encloses that current source okay and you do that the current the voltage across the current source will not be in the picture and you will get this KVL equation in terms of all the voltage norms. So for instance this is the voltage row by cross R1 this is the voltage row by cross R2 and on the right hand side you have the total voltage in the super mesh okay okay is this clear any questions this is exactly analogous to what we do with nodal analysis and voltage sources. There we define a super node which comes out because of defining an auxiliary variable and cancelling out by adding two equations here we define the voltage across current sources the auxiliary variable add up the equations for the two meshes that auxiliary variable cancels out and you will be left with a single KVL equation around the super mesh okay okay. Now there is a question about non-ideal current sources and we have not discussed non-ideal current sources but maybe we can quickly do that. See as far as the analysis is concerned a non-ideal current source will be the same as an ideal current source in parallel with some resistance okay so for instance in this case you would have an extra resistance. Now if you have that then in case of mesh analysis you will have an extra mesh and you have to write that okay so when I write a current source like this with this symbol it by definition means an ideal current source okay if you have to depict a non-ideal current source what you have to do is to have an ideal current source in parallel with a resistor. Obviously now you have increased the number of components in the circuit in case of nodal analysis the number of nodes remains exactly the same but you have an extra element and in case of mesh analysis if you have a resistance across the current source you will have an extra mesh and you have to solve for it that's all okay so whatever we said so far we'll apply to this the only thing is if you know that the current source is non-ideal you have to model it with two components an ideal current source and a resistor okay so I hope that answers the question. So now when you write the equation around the super mesh you will have one less equation because for two measures you wrote a single equation and but you do still have three variables i1, i2 and i3 okay so you lost one equation because you defined the combination of two measures as a super mesh and wrote a single equation for these two measures together but you will get an extra equation which is the same as before which is the definition of the current source okay so I hope this is clear so now we can again compare nodal analysis and mesh analysis but when you have an extra when you have a voltage source in nodal analysis okay so when you have nodal analysis with voltage source first of all if the voltage source is between a certain node I'll call it node k and reference node you already know that node voltage okay so you don't have to write an equation for that and you can write the equation for the rest of the nodes okay similarly if there is a current source along the periphery then the mesh current is known okay so again you can remove this variable from the equations and use only the remaining mesh currents okay now these are for hand analysis usually for computer analysis what you do is you don't have different things that you do for different cases you would like to have a uniform algorithm that covers all the cases so in that case what you do is that you always when you have a voltage source in nodal analysis you define the current through the voltage source as an auxiliary variable and then go ahead with it you don't worry about whether the voltage source is between some node and the reference node or between two nodes etc but while doing hand analysis you reduce the number of equations your job only becomes easier so that's why you do this okay and if you have voltage source between two nodes you define a super node which is the combination of the two nodes and if you have a current source common to two meshes when it's on the periphery it belongs only to one mesh when it belongs to two meshes then you define a super mesh which is a combination of meshes okay so again the analogy between nodal analysis with voltage source and mesh analysis with current source is very clear okay so you should be able to choose either one now both methods will work for any circuit for now let's assume that all our circuits are planar circuits mesh analysis we know is applicable only to planar circuits now my question is let's say you have a planar circuit which one will you choose will you choose nodal analysis or mesh analysis I would like opinions of the participants open the poll you can register your votes for either mesh analysis or node analysis now this is a actually I think they can now see the results okay so most of you have chosen mesh analysis and I'm a little surprised I would like to hear from you those of you who chose mesh analysis why you would choose mesh analysis or node analysis what is the reason for choosing mesh analysis out of 11 people who answered nine people have chosen mesh analysis what's the reason now of course we are talking only about planar circuits because the mesh analysis the way we defined it is not even applicable to non-planar circuits okay now let's see what would be the basis of choice now for node analysis first of all like I said when we do nodal or mesh analysis we first write for node analysis KCL equations and get the node voltages and in case of mesh analysis we get the mesh currents after that we still have some work to do but that's rather trivial okay in case of node analysis to find branch voltages you have to take difference between node voltages that you have calculated and in case of mesh analysis to find branch currents you are to find differences between mesh currents that you have calculated these things are quite easy and I'm assuming it can be done quite easily okay so the moment you solve the nodal analysis equations we call the circuit to be solved although we know that a little bit more work is required okay similarly when you do mesh analysis you solve for mesh currents and after that there is a little bit of more work but that's relatively easy so it is solved so the choices between choices based on the number of equations you have to solve okay for node analysis you have n minus one equation so let's take a circuit with n nodes and b branches okay so n minus one KCL equations for nodal analysis and for mesh analysis it is b minus n plus one KVL equations okay so this is what we need to solve now which of these is likely to be more is the n minus one likely to be more or b minus n plus one likely to be more okay so which of these will have more equations the node analysis has n minus one equations for a circuit with n nodes and b branches mesh analysis has b minus n plus one equations so which is likely to be more obviously if you have to solve you will choose the one with smaller number of equations again many of you have said nodal now it depends on the number of branches okay so it very much depends on b right and also it depends on the circuit because for instance I could have a circuit like this now these are these dots are nodes and the rest are branches you can see that there is a single loop but so many different nodes okay alternatively I could also have things like this okay I have only two nodes but so many loops okay now these are weird cases obviously in this case in the right hand side when you have only two nodes you would use nodal analysis and in this case you would use mesh analysis there is a single loop but what happens in a general case is that this b now when you have n minus one when you have n nodes right it's possible that every node is connected to every other node through some branch okay now this is not very likely but it is very much possible now if every node is connected to every other node through a branch how many branches will we have please try and answer this that is I have an n node circuit now how many branches are there depend very much on the circuit but obviously the maximum is that every node is connected to every other node that's possible right so in that case how many branches in total will we have so I got one answer which had the factorial n and now that is not correct okay so you please think about it now we will stop here and we will continue with this in the next lecture but in the meanwhile you please think about this if every node is connected to every other node in the circuit how many branches will be having total okay so what we have done today is to discuss mesh analysis which is an analysis based on KVL for planar circuit and we also made an analogy with nodal analysis okay so it should be quite easy to understand we also looked at the exceptional case which is mesh analysis with current sources which is analogous to nodal analysis with voltage sources okay so hopefully you understood it all then if you have not understood it then please raise your questions in the beginning of the next class and we will discuss them there is actually a good point here that event is greater than four or five doesn't the circuit become non-planar it is through it could become non-planar so let's not worry about node versus mesh analysis we can talk about node versus loop analysis loop analysis can be done even for non-planar circuits I didn't discuss that because mesh analysis gives you a neat structure and that's what is usually in most textbooks so that's why I didn't discuss that but even a non-planar circuit can be analyzed with loop analysis and the number of equations you will have to write will be is still b minus n plus 1 okay so please think about this if every node is connected to every other node how many branches in total and also please think about everything we have discussed with nodal and mesh analysis if there are any difficulties we'll start with that in the next lecture thank you I'll see you on Thursday