Maker Pro
Maker Pro

How to setup KVL equations with element laws?

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
6.002x is great! I understand the concept and things are actually starting to make sense!!! Too bad I can't keep up with the math :eek:

I've read over 70 pages of the text, watched a few hours worth of videos and some independent research and have concluded that I am fairly thick :rolleyes::D

I understand KCL somewhat, n-1 independent nodes, all current sums to zero, fabulous.

KVL, though, should be the same with respect to potential, however, setting up the elemental laws prior to analyzing the circuit has me confused. Take a simple voltage divider circuit:

upload_2014-8-29_22-36-6.png


How the devil did they come up with that nonsense?!

First equation is ohm's law expanded - ok, fine no problems here
Second Eq. is substitution of first equation for "I"

but, shouldn't it look a bit different? V1 = R1*I
substitute I with first eq.

V1=R1*(V/R1+R2)
carry through multiplication:
V1=R1*V/R1+R2
cancel out the like numerator/denominator
V1=V/R2

and I know that is not a voltage divider so it leaves me a bit confused.

Any and all advice will be gladly appreciated!
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
.... How the devil did they come up with that nonsense?!
They arrived at the correct answer by performing algebraic substitutions correctly!

Advice: One's future in electronics is directly related to one's ability to correctly perform mathematical operations.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
They arrived at the correct answer by performing algebraic substitutions correctly!

Advice: One's future in electronics is directly related to one's ability to correctly perform mathematical operations.

Indeed, but that doesn't help me figure out what went wrong or where.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Indeed, but that doesn't help me figure out what went wrong or where.

OK, you need to consider what you know.

you know that

[1] V = IR​

Let's assume that V is the input voltage, R is the total resistance, and I is the current which subsequently flows.

You know that

[2] R = R1 + R2​

So
[3] V = I(R1 + R2)​

Rearranging that gives you

[4] I = V/(R1 + R2)​

Let's call the current through the resistors I1 and I2, and the voltages across them V1 and V2.

Substituting into Ohms Law, we get:

[5] V1 = I1.R1
and​
[6] V2 = I2.R2​

Now we know that the total current is the same as the current in each resistor, so

[7] I = I1 = I2.​

Substituting I for I1 and I2 in [5] and [6] we get:

[8] I = V1/R1
and​
[9] I = V2/R2​

Substituting the definition of I from [9] into [3] we get

[10] V = (V2/R2)(R1 + R2)​

Dividing each side by (R1 + R2)

[11] V/(R1 + R2) = V2/R2​

Multiplying each side by R2

[12] (V * R2)/(R1 + R2) = V2​

And rearranging it we can get

[13] V2 = (R2/(R1 + R2)) * V

An alternative way is that we have two equations defining I, [4], and [9]. Equating these we get:

[14] V2/R2 = V/(R1 + R2)​

Multiplying each side by R2 gives you

[15] V2 = (V * R2)/(R1 + R2)​

Which is what we had above in [12]. The same rearranging again gives the formula you want (i.e. [13]).

Do you have to do this ever again? No. This has shown you how the formula for a voltage divider is obtained. Now you can just remember it and use it.

But if you forgot it, or if there is something slightly different, you now have the skill to re-derive it.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Actually one thing I skipped over was the actual KVL part.

There is a loop, and there is a voltage source (V) to the left.

You know that voltages around a loop add up to zero, so, assuming that the voltages are as labeled by the + and -, let's traverse the loop from the node at the bottom going clockwise.

When you use KVL, you assign a voltage across each leg. This can get confusing because we sometimes assign a sign which turns out to be wrong. But it is required to make the math work. One thing we can do is assign a + and - end to each leg. It doesn't matter if we're wrong, we just need to be consistent in our treatment. If the voltage turns out to be negative, this just means that we labelled them backwards. We use those signs to decide whether to add or subtract the voltage as we traverse the loop. This is important when we may traverse the same leg in different directions for different loops. A simple rule is if you hit the - first you subtract, otherwise you add.

First we enter the voltage source from the - end, so let's call that -V, then we hit V1 from the + end, so call it +V1, then we hit V2 form the + end, so we'll call that +V2, and then we have closed the loop.

So add all of these to get zero:

[16] -V + V1 + V2 = 0​

Rearranging that gives us

[17] V = V1 + V2.​

From Ohms law:

[18] V1 = I1.R1
[19] V2 = I2.R2​

and these are [5] and [6] above.

That's really obvious and intuitive, and it's easy to skip that step (as I did above). However, if you do, you'll regret it later when you do more complex things.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Thank you Steve for taking the time to write that all down!! It is greatly appreciated. The associated variables concept, I understood once I put it in perspective that the positive and negative they were assigning was arbitrary - I imagined that I was probing the circuit with a dmm and if the leads were reversed when checking a potential then you would get a negative value.

I still don't understand how they know what elemental laws to apply and when - i.e. - how would one know what equations to setup and what they would have to derive in a circuit analysis?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I still don't understand how they know what elemental laws to apply and when - i.e. - how would one know what equations to setup and what they would have to derive in a circuit analysis?

In general you have some end point you want to get to. This might be to describe one voltage in terms of another, or to describe a relationship between two voltages (that will come later).

So you typically try to derive some sort of equation (or set of equations) that consists of your unknown and other knowns. When you create a system of equations you can have as many unknowns as you have equations. then you use normal maths to solve the equations or to rearrange the equations into a useful form.

Ohms law is a given -- it allows you to relate voltage and current together, and your tools currently include KVL, and KCL (presumably). These tools are where you derive your basic equations. Later you'll find a whole lot of shortcuts which can give you an answer more quickly.

Both KVL and KCL can be used to derive formulas for resistors in series and parallel. You probably already know the shortcuts for these. In this case you've derived a shortcut for a voltage divider. Now you can use this shortcut rather than going back to KVL to figure it out.

I think the next step for you is some of the easier ways of deriving the KVL equations by assuming a particular (again arbitrary) node is a reference (essentially a ground reference). Later you'll find that there is some magic which allows you to replace voltage sources with current sources. this makes it easier to solve certain classes of problems. And you'll also find that there are ways that you can solve a problem piece by piece and then simply add up the results to get an answer.

All of this stuff is just a way of getting the equations written down. The later methods can be so powerful that you can sometimes almost solve the problems by inspection!
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
Voltage-Loop.png
If you can identify the loops in a circuit, then you can write the loop equations. KVL applies to loops.

If you can identify the nodes in a circuit, then you can write the node equations. KCL applies to nodes.

So taking the example from above and explicitly showing what was implied for the voltage source, there is a clear loop identified by the red arrow. Applying KVL to this loop gives the loop equation: V1+V2-V=0

There is one current flowing in the loop (more complicated circuits might have more than one defined current flowing in a loop). Some of the voltages in the loop can be expressed in terms of the loop current. V1=I∙R1, V2=I∙R2

Substituting into the loop equation: I∙R1+I∙R2-V=0 or V=I∙(R1+R2) or I=V/(R1+R2)

Substituting for I into the loop voltages: V1=I∙R1=V∙R1/(R1+R2) .....Is this starting to look familiar?
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
It is getting clearer and I was able to get several examples correct today, but I am somewhat stumped with this one.. mainly because I don't know how to treat a system with two sources like this.

images_circuits_four.gif



So I started - label branch variables, assemble element laws (resistors v=ir, v source = v, current source = i), KCL/KVL.

upload_2014-8-31_23-48-53.png

KCL
Node A: i1+i2-i3=0
Node B: i3-i5-i4=0

To me, the next step is to get values for completing KCL - I first attempted to use ohm's law knowing that there was 2v? potential across R1 with 4 ohms yielding 0.5A for i1. I then assumed 3A coming in from i2 and that would make i3 = 3.5A. Continuing I concluded i4 = 0.5A and i5 = 3A.

The steps seemed familiar from other examples, but the results are pure rubbish. I know this because things were not adding up, so I tried a spice simulator and surprisingly there is a 5.77v potential across R1....

Can someone point me in the correct direction? Thank you!
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
There is no reason to introduce i4 and i5. i4 is the same current as i1 and i5 is the same current as i2. How did you decide there is a 2V potential across R1?

Let's start with your KCL node equation for A. It's OK although it violates my personal conventions but I'll try to work with it. The first thing to realize is that some of the currents can be expressed in terms of the node voltages and the resistance between nodes. However, in order to determine a node voltage there must be a reference point for the voltage. So pick node-B as the reference ground. Current i1 is flowing into node-A so the assumption is that node-A potential is less than 2V; i1=(2-Va)/R1. Current i2 is flowing into node-A so the current is positive 3; i2=3. Current i3 is flowing out of node-A so the assumption is that node-A potential is higher than ground; i3=Va/R2.

Substituting those currents into the node equation i1+i2-i3=0 or (2-Va)/R1+3-Va/R2=0 or (2-Va)/4+3-Va/5=0 or 3½=Va(1/4+1/5).

Note there is no need to write a node equation for the ground node although KCL does apply to that node too.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Laplace, the method of picking a ground node may not yet have been covered in the course. I think a pure KVL/KCL solution is probably best at this point unless chopnhack tells us this technique has been covered.

Oh for Norton and/or Thevenin and/or superposition.

Chopnhack, when you learn each of those, come back and look at this problem again.

Without using the method Laplace does (which may be in the very next lecture -- as I recall it is the next method) you'll need to stick to pure KVL and KCL -- this essentially gives you the same result as Laplace, just with more steps. Laplace's method is one of the techniques I mentioned earlier that can allow you to almost solve problems by inspection.

from KVL we get -V + Vr1 + Vr2 = 0 (or V = Vr1 + Vr2)
from KCL we get I + Ir1 - Ir2 = 0 (or I = Ir2 - Ir1)

For KCL I used the convention that current flows in the direction of the marked + to - on the components and currents flowing in to a node are positive while currents flowing out are negative.

We can convert to currents or voltages -- let's do both (just for fun).

V = Vr1 + Vr2 ≡ V = Ir1.R1 + Ir2.R2
I = Ir2 - Ir1 ≡ I = Vr2/R2 - Vr1/R1​

In both cases we can then rearrange the formula so we can either equate them or substitute one into the other (both methods are equivalent, and you can take your pick).

Let's start with

V = Ir1.R1 + Ir2.R2​

We can modify that to be

Ir2 = (V - Ir1.R1)/R2​

From the KCL equation

I = Ir2 - Ir1​

we can get

Ir2 = I + Ir1​

Now we have two things that must be the same

I + Ir1 = (V - Ir1.R1)/R2​

That you can simply solve to get a value for Ir1.

Once you have Ir1, you can use the KCL equation to determine Ir2. Then you can use ohms law to determine the voltage across each resistor.

Alternatively, after obtaining Ir1, you can use ohms law to determine Vr1, then the KVL equation to get Vr2, and then ohms law to get Ir2.

Either way you do it, you should check it in 3 ways:

1) these are resistors, so the sign of V and I should be the same (i.e they consume power, they do not produce it)
2) the KVL equation should work
3) the KCL equation should work

If all three of these hold then you can pretty much guarantee you've go it right.

Given the format for the questions you have, I think that knowing you have the right answer *before* you hit submit is a good thing :)
 
Last edited:

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Thanks to both of you gents!

I + Ir1 = (V - Ir1.R1)/R2


Steve, Brilliant!

:)

substituting values leads to:

3A+Ir1 = (2-Ir1(4Ω))/5Ω
15+5Ir1 = 2-4Ir1
13+5Ir1=-4Ir1
13=-9Ir1
Ir1 = -1.444A

thus Ir2 = +1.5556A
Vr1 = -5.777
Vr2 = 7.78

I find this example really interesting despite it being a simple schematic. I have never seen a current source and a voltage source independent of each other and find it rather interesting how both values play into the derived figures. i.e. - the V source contributes as does the I source to the net potential across the resistor. I don't think though that there are real life versions of this, my intuition says that current source would overdrive the voltage source, does that make sense?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I don't think though that there are real life versions of this, my intuition says that current source would overdrive the voltage source, does that make sense?

In this case, which way is the current flowing in the voltage source? The voltage across and current through R1 should be a hint.

There are no perfect voltage or current sources in real life., However a practical voltage or current source may act sufficiently perfect over a range of operating conditions to be modelled this way. Or, you might place a resistance in series with the perfect voltage source, and perhaps a resistor in parallel with a perfect current source to give it something like the properties of a practical device. If you do this, they are just additional resistors in your calculation.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
In this case, which way is the current flowing in the voltage source? The voltage across and current through R1 should be a hint.

There are no perfect voltage or current sources in real life., However a practical voltage or current source may act sufficiently perfect over a range of operating conditions to be modelled this way. Or, you might place a resistance in series with the perfect voltage source, and perhaps a resistor in parallel with a perfect current source to give it something like the properties of a practical device. If you do this, they are just additional resistors in your calculation.

Being there is a negative value associated with both the potential and current - I believe the current is flowing from the current source across R1 and through the positive terminal of the Vsource.

I am afraid... this week begins: :confused::eek:

 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Being there is a negative value associated with both the potential and current - I believe the current is flowing from the current source across R1 and through the positive terminal of the Vsource.

That's correct. voltage sources can be current sinks! Also note that there are situations where the voltage across a current source can be either way around. Both equate to the sources either providing power or consuming it (essentially being "charged" by the external circuit)


As I recall the first of those starts with some math to prove that this particular simplification works. You can follow along if you can, but I don't think you need to be able to actually repeat it. The point is that you can get away with doing several simpler problems and just adding up the results to get the answer.

The latter is a break into a whole different thing that will be separate until it comes together with equations for mosfets later down the track. It is a very useful introduction to digital electronics that will cover stuff you may not have been aware of, even if you've been using digital electronics.

All good fun.

Let us know how you get on with it.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I have to warn you that when it gets into differential equations the course difficulty steps up a couple of notches. Take the time now to learn something about differential equations if you can. The ones in this course are simple enough, and have a pretty formulaic method for solutions (before it progresses to the point where you don't actually need them). But you really need to at least understand some of what they say (even if you have lots of trouble with the questions) so the next (simplified) methods make any sense at all.

I originally stopped doing (pure) Math at uni when it got to differential equations. I realised that I wasn't understanding, just doing, so I stopped that stream of electives. The fact that I had done some was a great benefit. But I wish I hadn't stopped doing the pure math all those years ago. If you don't have any background in calculus you'll need to fight this part of the course really hard. With some calculus and no differential equations you should be able to follow it with effort. Getting a basic understanding before you get into that part of the course will lift a weight off you.

I think they provide a link to an introduction to differential equations. I found those lectures to be very dry and harder to follow than just reading books.

I introduced someone to Khan Academy when they wanted to brush up on some math (geometry I think). I noticed they do free differential equation courses. The course I looked at before giving the aforementioned advice seemed structured in a way that makes it pretty easy to follow and learn. They're another option to look at. If you go this route, let me know what you think because I've not reviewed those particular courses.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I have to warn you that when it gets into differential equations the course difficulty steps up a couple of notches. Take the time now to learn something about differential equations if you can. The ones in this course are simple enough, and have a pretty formulaic method for solutions (before it progresses to the point where you don't actually need them). But you really need to at least understand some of what they say (even if you have lots of trouble with the questions) so the next (simplified) methods make any sense at all.

I originally stopped doing (pure) Math at uni when it got to differential equations. I realised that I wasn't understanding, just doing, so I stopped that stream of electives. The fact that I had done some was a great benefit. But I wish I hadn't stopped doing the pure math all those years ago. If you don't have any background in calculus you'll need to fight this part of the course really hard. With some calculus and no differential equations you should be able to follow it with effort. Getting a basic understanding before you get into that part of the course will lift a weight off you.

I think they provide a link to an introduction to differential equations. I found those lectures to be very dry and harder to follow than just reading books.

I introduced someone to Khan Academy when they wanted to brush up on some math (geometry I think). I noticed they do free differential equation courses. The course I looked at before giving the aforementioned advice seemed structured in a way that makes it pretty easy to follow and learn. They're another option to look at. If you go this route, let me know what you think because I've not reviewed those particular courses.

I was afraid of that... I have some history with calculus, I understand the theory of it, but I am not able to put it into practice. The summation notation and function of notation give me pause... I have used Khan Academy before and found it to be a wonderful resource. There is a link to DE from the course website to K.A. - I was afraid that I would have to make time to learn it! I put in about 15 hours this week and feel woefully behind still... At least I can approach a schematic with more understanding of what is going on - and that was the entire reason for doing this :) So as long as I don't wash out, I am sure I will learn loads more. I will let you know about K.A. after I catch up - still trying to finish last weeks reading.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
That didn't take long!

page 130:
That is, if f (x) is the response to some excitation x, then the system is linear if
and only if f (ax1+ bx2 ) = af (x1 ) + bf (x2 ). (3.17)
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
In the network shown you are given that V=2.0V and that the resistors have the resistances R1=4.0Ω, R2=4.0Ω, R3=2.0Ω, and R4=2.0Ω.


images_circuits_ladder.gif



Element Laws:

Vo=2v
Vr1=4i1
Vr2=4i2
Vr3=2i3
Vr4=2i4

KVL:

Vo=Vr1+Vr2

KCL:

i1-i2-i3=0

I dont know if I got lucky or if my intuition is improving or if this was simply an easy question: I resolved the R1R2 network to 2Ω and then added up R3 and R4 to get 6Ω equivalent resistance. From there it was simple to get Itotal. Itotal=2v/6Ω = 0.3333A. The 0.3333A goes through R1 (1.32V) and then splits between R2 and R3. Here I guessed that since I had 4Ω in each path, the current must divide evenly and thus current of R2,R3 and R4 is 0.166A each.

I got the correct answer, I just wanted to be sure the reasoning was sound.

Thanks in advance!
 
Top