Welcome back to Linear Circuits. This is Doctor Ferri. This lesson is on mesh analysis. The objective is to introduce mesh analysis in order to solve circuit problems. Mesh analysis is one of my go to methods for solving circuited problems. I can look at a circuit is fairly complicated, I've got multiple sources in there and lots of resistors and I want to come up with a systematic way of solving it. Maybe I'm solving for a particular voltage or a particular current. The mesh analysis relies on the prior concept of the Kirchhoff's voltage law, which is a sum of the voltages around any loop is zero. And in fact the mesh analysis is a systematic application of the Kirchhoff's voltage law. There are three basic steps in applying mesh analysis. First to define mesh currents, one for each non-inclusive loop. By non-inclusive, I mean a loop doesn't include any other loops. So I've got three non-inclusive loops here. And then define these mesh currents to be I1, I2, and I3. And I give it a direction of the current flow around that loop. And then I do a KVL for around each of these loops. And then I solve for the mesh currents. In this particular case, the only unknowns in my equation should be these mesh currents. So even if I have another variable floating around in there, I ignore that variable for the time being, I try to write my equations only in terms of those mesh currents. Now, let's take a look at coming up with the equations for this particular circuit. Now in coming up with the equations for this example, we're going to need to use the KVL. And in using the KVL we're going to need to be able to do find the voltage across a resistor like this. Well, that means that we really want to know what the current is through this resistor. Now I'm going to put something off to the side here. Suppose we have a resistor like this and the voltage is equal to IR, Ohm's law. But suppose our current is shown in terms of these branch currents, so we've got one branch current going this way and then another branch current going this way. The combination i is equal to I1 which is going in the same direction as i minus I2 which is going in the opposite direction. So then this voltage across that resistor is R(I1-I2). Like that. So, we use that in being able to do the KVL around these loops. So, let me start with the I1 loop, Applying the KVL around that. Let me start at this point here and I'll do it in this direction And I've got a -V1 + R1 times this mesh current, + R2 times the current going in this direction. With that current going in this direction, will be equal to the I1 which is in the same direction, minus I3 which is in the opposite direction. All right let's see, I've got three terms here and I've got three terms around the loop so I'm done with that loop, is equal to 0. Now, I2 loop. We do not do a KVL around the I2 loop because I already know what this current is. The whole purpose of the doing a KVL is to find the mesh current, well I know the mesh current. I2 is equal to I sub s, because it's going in the same direction, so i sub s. So then I just go on to the I3 loop. And let me go ahead and start, say right at V2. So I've got V2 going around here. In this case I'm going to be looking at the voltage from here to here and that means the current is going to be going in this direction. If the current is going in this direction, then I'm going to be looking at I3 which is in the same direction minus I1 in the opposite direction. That's the total voltage drop across that resistor from this direction. And similarly, up here, if I'm going in this direction right here, I want this voltage drop from here to here. And I'm going to be looking at that branch current there. So I've got R3 times I3 in the same direction minus I2 which is in the opposite direction. And then coming right here I've got one more term and the Ohm's law on that term is R0 times I3 is equal to 0. And let's see I've got one, two, three, four elements across here and I've got four terms in my [INAUDIBLE] and that's it. So right know I've got really two equations and two unknowns, because I2 is known, I assume my source is known so I2 is known, wherever I see an I2 I substitute in isoface and then I just end up with just two equations and two unknowns, and I can solve that for I sub 3, and I sub 4. And once I solve for I sub 3 I can go back and solve for V0. So let's look at this example right here. I want to first to find my two mesh currents, I1 and I2. And then, I want to do a KVL around, say, the I1 loop. So, I start with -15 + 10, going around in this direction, I would have 10 times I1 plus this resistor, let me give it 5 ohms, so if this is 5 ohms, then I would want to solve for 5(I1-I2)=0. If I simplify that a little bit I would find that I've got 3I1- I2 = 3. Then I do the I2 loop same sort of thing, I'm going to start out with over here, 5V + 5 ohms (I2- I1). Going up here plus 4 times I2 = 0. And if I solve these, and I've got two equations and two unknowns, I solve them I will get an I1 = 1A, I2 = 0A. Which is kind of interesting. It means that there's zero current going through here and all the current goes in that direction. Now suppose the original question had been, solve for this current right here. Well, if I'm going to use mesh analysis, I first solve for I1 and I2, those are my unknowns. After I solve for I1 and I2 then I go back and I solve for whatever voltages or currents I need to solve for. So everything has to be written in terms of my mesh currents and those are my unknowns. We're going to set up a quiz here for this particular circuit. How many unknown mesh currents do you need to solve this? Okay, in this case the answer is one, because we've got three mesh loops here, but two of these are known, we are assuming that the sources are known. So this is the only mesh current that you're going to need to solve for. Here's another quiz I want you to do. I want you to solve for the equations that result from using mesh analysis of this circuit. Now here I've used a dependent source up here. Don't let that scare you. It's a current source. Pretend that we know this value when setting this up. In other words don't do a KVL around this loop. All right, the solution is, I do start with a KVL around this other loop. I get -3 + R2 times, everything's gotta be in terms of mesh currents. So I've got I2- I1 + R4 I2 = 0. Okay, and I need one more equation, because I've got two unknowns. What my equation is that I've got I1 = -2i1. Because it's in the opposite direction. And I1 is the net current through this, which is equal to, let me put the -2. I1 is equal to I2, which is in the same direction, minus I1, which is in the opposite direction. So now, I've got two equations, I1 = -2 (I2-I1). So it's one equation in terms of my mesh currents. And then this is the other equation in terms of again my mesh currents. The key concepts we've covered in this lesson, first of all is that mesh analysis is a systematic application of the KVL. The number of mesh currents is equal to the number of equations meet it. The variables are mesh current. So, make sure that whenever you write your equations you ignore any other variables. The only variables should be those mesh currents. Avoid common mistakes that students make. One is the polarity and the current directions very easy to get mixed up on those. Do not do a KVL for a loop with a current source. You don't need to. The current source already defines what that mesh current is. And also, while you're writing the equations, and you're trying to solve for those mesh currents, ignore any other variables than those mesh currents. Solve for those afterwards once you know what your mesh currents are. All right, thank you.