so this video we're going to be talking about the other major search analysis technique we use which is called mesh analysis which again this really isn't anything new this is just using KVL to analyze circuits so what we do is we use loops and in fact some textbooks don't call it mesh analysis they call it loop analysis mesh is the in my opinion the more standard name that is accepted in electrical engineering but some people do use loops or they'll say the mesh loop method because we're really looking at loops here using KVL to analyze our circuits now this is typically used to find currents now again that doesn't mean it's the only way you would use mesh analysis is to find currents sometimes you would use it to find a voltage but typically we use it to find currents so let's look at a simple example here just to get our feet wet on mesh analysis here so we're going to look at this problem right here so here with this here what we're asked to find here is this voltage here V out so the voltage drop across the 8 ohm resistor now when we do this here I'm gonna erase that for now just so I don't get my circuit too clogged up but basically finding the voltage across the 8 ohm resistor and even though we don't necessarily use nodes I always like to still kind of remind ourselves that you know we let the ground here be 0 volts here is the bottom what we're gonna let it be now when we do the loops here there's there's more than one loop you can draw you can draw lots of different loops typically though what I I do is I draw the obvious loops and what I mean is I say okay well we've got a loop right here and so I call that loop 1 and we have a loop here which I'll consider loop 2 and then I got a loop here which I'll consider loop 3 and I draw I typically draw them all clockwise unless it's obvious that I should draw it counterclockwise and an obvious way to draw counterclockwise was would be for instance I'll just show this here and change it if I had a current source going up like that honestly I'd want to draw a loop 3 in the other direction because then I'd know that the current for 3 is actually just equal that current supply but since it's not a current supply it's just a voltage I tend to draw all of mine counterclockwise now when we do this again we're writing a KVL loop here so what we want to do here is we want to first off anytime you hit the resistors with these arrows they're always going to be considered in the positive direction so what I mean by that is we'd have the voltage across the 2 ohm resistor plus the voltage across the 8 ohm resistor and then we're coming in to the negative side of that 40 ohm resistor that 40 ohm power supply so I'd be minus 40 equals zero and this would be for loop 1 and for loop 2 we would have the voltage across the 8 ohm resistor plus the voltage across the 6 ohm resistor plus another voltage across another 6 ohm resistor and that would be equal to zero because there's no power supplies in this so this would be loop 2 and then loop 3 we'd have the voltage across the 6th ohm resistor plus the voltage across the 4 ohm resistor plus 20 volts is equal to 0 and it's plus 20 because I'm hitting the positive side of that power supply so this would be loop 3 now the problem we have right now is we have too many unknowns well just like we did with KVL I'm not KVL nodal analysis we're gonna use Ohm's law to rewrite these voltages so we're actually going to use Ohm's law to rewrite voltages as currents so let's examine this first equation here and I'm going to just I'm not going to rewrite the equation but we have the voltage across the 2 ohm resistor well we know that voltage Ohm's law is equal to current times resistance so well what's the current going through here well that's where these loops I've labeled them 1 2 & 3 but these loops actually represent currents that's the current in loop 1 this is the current in loop 2 this is the current in loop 3 so these are representing currents then well the current and I 1 here I'm hitting this 2 ohm resistor here and I can see this branch there's no other loops hitting this branch other than I 1 so the current through the 2 ohm resistor is just simply I want so my voltage would be I 1 times 2 and I now I know we would typically write it as 2 i1 but I'm just doing it I times R now the 8 ohm resistor we have to be a little bit more careful because what's the current going through this 8 ohm resistor well I've got two currents touching this branch here now it's always going to be whatever loop you're in is always going to be positive so it's going to be plus and I one but then I have to determine is this negative or positive so is it - I - or is it plus I 2 because I've got I 1 and I 2 touching the 8 ohm resistor so both of that those currents are going through that it's actually a net of just a simple current but we're looking at these as loops here but then if I see here well I 1 is going down I 2 is going up so that means they're going against each other and if they're going against each other it's subtraction so it'd be I 1 minus I 2 times 8 ohms now I'm gonna take a pause well actually let me finish writing the equation continuing on with this loop here we get minus 40 equals zero so now I have a new loop equation now before I simplify this or modify this any I want to emphasize here that if I had for instance drawn the loop counterclockwise if I drawn it counterclockwise like this then I too would also be going down and I would have I 1 plus I 2 because they're both going down but I drew it clockwise and one is going down and the other is coming up so that's why it's a negative or a subtraction there so let's simplify this equation a little bit and I'll just simplify it here it's pretty easy to do so we'd have 2 plus 8 so I'd have 10 I 1 and then I have minus I 2 times 8 so I have minus 8 I 2 and then move the 40 over to the other side is equal to 40 all right so we've got my first equation it's got two unknowns in it alright so let's move on to the next loop so the next loop would be I 2 and I'll go ahead and do this one in blue so we're gonna go down and move it here now you can start anywhere in the loop we have it as the a dome now remember whatever loop you're in is always the positive direction so I'm end loop 2 so I 2 is positive so I'm looking at the 8 ohm resistor again right now so it's positive I to now I 2 is going up I 1 is going down so they're in the opposite direction so it'd be i2 minus i1 because whatever loop you're in is the positive direction and then I still have to multiply it by the resistance times 8 and then I have this 6 ohm up here but if I look this current going through this 6 ohm only i2 is touching that resistor so it'd be plus i2 times 6 and then we've got this other 6 ohm resistor but that 6 ohm resistor has both I 2 and I 3 touching it and again I 2 is always in the positive direction and then this is going down but then I 3 would be going up so this would be minus I 3 because they're in the opposite direction times 6 and this is all equal to 0 then if you simplify that equation you wind up with minus 8 I 1 plus 20 I too should have 8 plus 6 plus 6 and then minus 6i 3 equals 0 now I did that simplification without you know multiplying anything out and showing it but at this point we should be able to do those simplifications without me showing you all the steps and now we have finally we have to work on I'll switch back to black we have to work on this equation and rewriting it with currents here so we start at the six home and again I'm in loop 3 now so I 3 is automatically the positive one and then I 2 is in the opposite direction should be minus I 2 times 6 plus well the 4 ohm only has I 2 touching it so it's for I 2 and then I'm hitting the positive side of the voltage source so it's plus 20 and that's equal to 0 which again if I simplify that I would wind up with negative I'm sorry this should not be I 2 this should be I 3 because it's in the third loop there negative 6 I 2 plus 10 I 3 is equal to negative 20 and so if we want to make sure that we have this nice and clean my system of equations I have 10 I 1 - 8i - plus 0y3 equals 40 minus 8i 1 plus 20i 2 minus 6i 3 is equal to 0 and then 0 I 1 minus 6i 2 plus 10 I 3 equals negative 20 now why depth technically it's still possible to solve the system of equations by hand I would definitely go to my calculator to solve it and if you use your calculator to solve this you wind up with getting I 1 is equal to 5 point 6 amps i 2 is equal to 2 amps and I 3 is equal to negative zero point 8 amps now let's go back up and see exactly what we were asked to find here I found all these currents but again what am I asked to find in this case I was supposed to find the voltage across the 8 ohm resistor and it was labeled this way that was what I was supposed to find that output voltage so that output voltage is the voltage across the 8 ohm resistor well we've got two mesh loops here or two loop currents touching that resistor but now we have to figure out is it I 1 minus I 2 or I 2 minus I 1 and it's purely based off of the positive sign I 1 is hitting the positive sign so I'd have plus I 1 I 2 is hitting the negative side so minus I 2 this is equal to the current through the 8 ohm resistor so the current through the 8 ohm resistor is equal to 5 point 6 amps minus 2 amps which would be 3 point 6 amps and so then the voltage on the output is 3.6 amps times that 8 ohm resistor which if we do that use my calculator again here to make sure I don't make a silly algebraic mistake we get twenty eight point eight volts as the voltage across that resistor V out so this was showing loop analysis here so we can see it's just instead of doing a nodes we're literally doing loops now once we get used to this and I'm going to do it in the next example not in this video but the next example we're going to typically not write these equations so well typically typically not write well typically go straight to these equations but remembering that what we're doing is we're summing voltages up in a loop because we're using KVL but what we're doing is we're using Ohm's law to write those voltages as a current times of resistance but we are still absolutely summing voltages up and so that's how we that that's mesh analysis and honestly this was a great problem was a system of three equations three unknowns I said we'll look at another one in the next video