back to basics KCL

Ian0

Joined Aug 7, 2020
13,132
You have an unpolarised capacitor. It could be charged either positive or negative.
Logically, current will flow from the charged capacitor into the resistor.
So, if you analyse the current at the junction of the capacitor and the resistor, current from the capacitor will be flowing towards the analysis node and current in the resistor will be flowing away, so they will have opposite polarities in order that the net current at the node is zero.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
You have an unpolarised capacitor. It could be charged either positive or negative.
Logically, current will flow from the charged capacitor into the resistor.
So, if you analyse the current at the junction of the capacitor and the resistor, current from the capacitor will be flowing towards the analysis node and current in the resistor will be flowing away, so they will have opposite polarities in order that the net current at the node is zero.

Hi there

Thanks for the comment.
Can you check out the picture of what i just posted. I think that should help clarify my confusion.
I am trying to match the answer in a book and cant.

In the first picture called state 1
I defined all current leaving the node and its positive.
So i wrote KCL and it matched the book.

In the second picture called state 2

I make the same definition in my head
I defined all current leaving the node and its positive.

But now my answer is opposite of the book.
I dont know why
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
You have an unpolarised capacitor. It could be charged either positive or negative.
Logically, current will flow from the charged capacitor into the resistor.
So, if you analyse the current at the junction of the capacitor and the resistor, current from the capacitor will be flowing towards the analysis node and current in the resistor will be flowing away, so they will have opposite polarities in order that the net current at the node is zero.
Yes! but you just made my point. You had to make an assumption about which way the current is flowing. You are not able to just arbitrarily say that everything is flowing into the node or everything is flowing out of the node.
 

Ian0

Joined Aug 7, 2020
13,132
Current will be flowing from the voltage source and through the inductor.
Some of it will charge the capacitor, some of it will flow through the resistor.
With "away from the node" being positive, the current into the capacitor will now be positive. The current in the resistor will still be positive (not much has changed, the capacitor is still charged in the same direction)
The current I from the inductor will be negative as it is flowing towards the node. It will be the sum of the current that is charging the capacitor and the current going through the resistor.
 

Ian0

Joined Aug 7, 2020
13,132
You had to make an assumption about which way the current is flowing.
Only because I assumed that the voltage on the capacitor was positive.
It could have been negative, in which case the current through the resistor would be negative and the current in the capacitor would be positive.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Current will be flowing from the voltage source and through the inductor.
Some of it will charge the capacitor, some of it will flow through the resistor.
With "away from the node" being positive, the current into the capacitor will now be positive. The current in the resistor will still be positive (not much has changed, the capacitor is still charged in the same direction)
The current I from the inductor will be negative as it is flowing towards the node. It will be the sum of the current that is charging the capacitor and the current going through the resistor.
See but the whole point of this thread was... you have intuition on how the circuit works and its lets you make assumptions on the current flow so the KCL works out.

If you have zero intuition about an arbitrary circuit you cant expect to write KCL correctly.

Only because I assumed that the voltage on the capacitor was positive.
It could have been negative, in which case the current through the resistor would be negative and the current in the capacitor would be positive.
right, but that is my point. You had to have some intuition.
And if you are trying to match a proof of an equation in some book, you have to make the same assumptions the book is other wise you get the wrong answer and its not just a sign error.

If you want to see where my utter confusion is coming from , check out this post that i still have no answer to.
https://forum.allaboutcircuits.com/threads/dc-dc-converter-transformer-model-analysis.200522/page-2
 

k1ng 1337

Joined Sep 11, 2020
1,038
I know what your saying and that is what i have been told practically since birth.

However, in the proof i am trying to solve it does not work. If you do not pick the same polarity as the book you will get the wrong answer. Its not a matter of arbitrary or consistent. There is a right and a wrong when trying to complete a proof to match some answer in a book.
Is this for school? If so, then I sympathize because sometimes this is arbitrarily true. But if you can show that you are able to obtain the correct answer by a different method, you may get credit.

And to answer your question:

"How do you write a KCL equation if you have literally no knowledge of the current flow direction."

The fact is you don't know. You have to pick somewhere to make a measurement from and all else follows suit. The equations you derive only work because a constant of proportionality (resistance) is well known.

I also have to say, I find it hard to follow what your are asking. I'd like to see the actual textbook question and your complete attempt.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Here is my point

As you said, lets define current going away from the node as positve.
Lets take your assumption that current is flowing from the cap to the resistor.

ok then in this case the book answer is wrong.

0 = -IC + Vc/R
or IC = Vc/R

Where the book clearly says IC = -Vc/R

1714340423320.png
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Is this for school? If so, then I sympathize because sometimes this is arbitrarily true. But if you can show that you are able to obtain the correct answer by a different method, you may get credit.

And to answer your question:

"How do you write a KCL equation if you have literally no knowledge of the current flow direction."

The fact is you don't know. You have to pick somewhere to make a measurement from and all else follows suit. The equations you derive only work because a constant of proportionality (resistance) is well known.

I also have to say, I find it hard to follow what your are asking. I'd like to see the actual textbook question and your complete attempt.
Hi there

No. not for school. Im just a glutton for self punishment.
I am simply trying to prove that what a power electronics book has stated is true.

The D is the Tonn period of a converter and D' is the Toff period of a converter.
The average can be found by taking the integral.

So i am trying to write the KCL for the capacitor current for both the on and off state of a boost and buck converter.
I have the answer im just trying to understand how the hell the book got there.

The one i posted below is the boost converter but the one i am really trying to solve is the buck.
https://forum.allaboutcircuits.com/threads/dc-dc-converter-transformer-model-analysis.200522/page-2

Sorry i didnt mean to double post this. I just know the issue is in the KCL equation thats what i was asking the stupid KCL question but it has morphed into this now

1714340870687.png


1714340545454.png

1714340598827.png
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
32,878
Neither the book, nor your answer, has any meaning unless the definition of all of the terms in it are completely specified, which includes polarity, either explicitly or implicitly.

You can push the book aside and solve the problem on your own using a completely different set of variables and, for each, a polarity chosen by flipping a coin.

When you are done, you can sit down and match up the variables in the two solutions and show that they are equivalent (assuming both solutions contain no errors).

You seem to be trying to redefine the same variable to mean something different in your solution and then wondering why those two variables don't work out to the same thing. It's because you have two different variables that just happen to have the same name -- but the name of a variable means nothing, it is how it is defined that matters. So don't use the same name in both circuits unless the corresponding definitions are the same. But you are free to simply use a completely different set of variables in your analysis and then map them back to the book's definitions later.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Neither the book, nor your answer, has any meaning unless the definition of all of the terms in it are completely specified, which includes polarity, either explicitly or implicitly.

You can push the book aside and solve the problem on your own using a completely different set of variables and, for each, a polarity chosen by flipping a coin.

When you are done, you can sit down and match up the variables in the two solutions and show that they are equivalent (assuming both solutions contain no errors).

You seem to be trying to redefine the same variable to mean something different in your solution and then wondering why those two variables don't work out to the same thing. It's because you have two different variables that just happen to have the same name -- but the name of a variable means nothing, it is how it is defined that matters. So don't use the same name in both circuits unless the corresponding definitions are the same. But you are free to simply use a completely different set of variables in your analysis and then map them back to the book's definitions later.
Which variable you saying i am using to mean something different
I am free to do whatever i want lol
This isnt homework. Im to old for that. I am just a stubborn guy who wants to understand why the books the answer is what it is.

What i really need to see Tonn and Toff KCL equations for in terms of a capacitor of a buck converter.
That is what is going to get me to the proof.

What i do is the the answer is equal to zero. I understand that. But there are terms that are set equal to zero.
The premise of this question that no one seems to be able to answer is actually in my other post.

https://forum.allaboutcircuits.com/threads/dc-dc-converter-transformer-model-analysis.200522/page-2

No one seems to be able to answer it in the other post so i was trying to make sure my KCL was correct.
 

WBahn

Joined Mar 31, 2012
32,878
Which variable you saying i am using to mean something different
I am free to do whatever i want lol
This isnt homework. Im to old for that. I am just a stubborn guy who wants to understand why the books the answer is what it is.

What i really need to see Tonn and Toff KCL equations for in terms of a capacitor of a buck converter.
That is what is going to get me to the proof.

What i do is the the answer is equal to zero. I understand that. But there are terms that are set equal to zero.
The premise of this question that no one seems to be able to answer is actually in my other post.

https://forum.allaboutcircuits.com/threads/dc-dc-converter-transformer-model-analysis.200522/page-2

No one seems to be able to answer it in the other post so i was trying to make sure my KCL was correct.
Let's look at your second page above.

This is how YOU defined your parameters:

1714346724988.png

Your parameter names I've renamed to include an apostrophe.

But this is how the book defined these parameters:

1714347639639.png

Because you being sloppy with the polarities of the definitions, you don't realize that you are using the same variable name, namely 'I', as the book but that you have defined it differently.

Your analysis SHOULD yield

Ic' = -I' - Vc'/R

THIS is what you need to compare to the book's answer of

Ic = I - Vc/R

Because both solutions use distinctly named variables, it is easy to see that any comparison of the two must make the variables from one to the other.

A casual glance at the two reveals that

I' = -I
Ic' = Ic
Ir' = Ir
Vc' = Vc

Make these substitutions into your result and you get the book's result, showing that they are the same.

You are completely free to use whatever new variables you want and to define them how you want. What you are NOT free to do is to redefine the meaning of a variable and then somehow expect it to have the same meaning.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Let's look at your second page above.

This is how YOU defined your parameters:

View attachment 321095

Your parameter names I've renamed to include an apostrophe.

But this is how the book defined these parameters:

View attachment 321097

Because you being sloppy with the polarities of the definitions, you don't realize that you are using the same variable name, namely 'I', as the book but that you have defined it differently.

Your analysis SHOULD yield

Ic' = -I' - Vc'/R

THIS is what you need to compare to the book's answer of

Ic = I - Vc/R

Because both solutions use distinctly named variables, it is easy to see that any comparison of the two must make the variables from one to the other.

A casual glance at the two reveals that

I' = -I
Ic' = Ic
Ir' = Ir
Vc' = Vc

Make these substitutions into your result and you get the book's result, showing that they are the same.

You are completely free to use whatever new variables you want and to define them how you want. What you are NOT free to do is to redefine the meaning of a variable and then somehow expect it to have the same meaning.
Thanks for taking the time to post that

so I see your point but it also aligns with my main point
The book does not tell you which way the polarities work except to offer the final
Solution as an equation.

I am able to complete the proof for this example and always was able to.

the problem with the buck converter example is again the book does not define polarity and just gives the solution.
Since the solution has been minipulated I can’t reverse engineer it to understand how they defined the polarities.

and with a buck converter the inductor current flow out of the inductor and into the capacitor node for both switch states I can not determine how that proof works

is there any possibility you would be so kind as to take a look at my other post?

that is where the real problem lies.
I would be very greatful

https://forum.allaboutcircuits.com/threads/dc-dc-converter-transformer-model-analysis.200522/page-2
 
Last edited:

k1ng 1337

Joined Sep 11, 2020
1,038
These simulations nicely show how the capacitor current averages to zero once the circuit reaches steady state.

The first simulation is plotting the current through the capacitor at 54% duty cycle. Notice how the cap sinks +385mA during the ON state and sources -385mA during the OFF state resulting in an average of 0mA.

mj2a.png

As another example, I changed the duty cycle to 75%. Now the circuit spends more time in the ON state. The subtlety here is the peak currents are now +-290mA but the average is still zero.

mj2b.png

Now take a look at the inductor and load currents. At 75% duty, the load current holds steady at +5.81A but the inductor current is fluctuating between +5.51A and +6.09A. So how is the load current stable? Clearly the capacitor is sinking the difference during the ON state and sourcing the same amount during the OFF state (KCL in action). A simple proof confirms this:

? Difference in inductor currents = 6.09A - 5.51A = 0.58A

mj2c.png

Looking back at the second simulation, the total current wave adds to ~580mA! (~290 + ~290) The result is the load sees an average of 5.81A and the capacitor an average of 0A. To complete my exercise, what is the average inductor current at steady state?
 

WBahn

Joined Mar 31, 2012
32,878
Thanks for taking the time to post that

so I see your point but it also aligns with my main point
The book does not tell you which way the polarities work except to offer the final
Solution as an equation.
Which is sloppy on the author's part.

And hopefully you can see why so many of us here are always harping about properly defining the variables that people use instead of forcing the reader to reverse engineer the definitions from the work or to make assumptions about what was meant.

The takeaway is that if you end up getting frustrated and wasting time because the author of a textbook can't be bothered to properly define their terms, then commit yourself to doing better so as to not subject the readers of your work to that same fate.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Which is sloppy on the author's part.

And hopefully you can see why so many of us here are always harping about properly defining the variables that people use instead of forcing the reader to reverse engineer the definitions from the work or to make assumptions about what was meant.

The takeaway is that if you end up getting frustrated and wasting time because the author of a textbook can't be bothered to properly define their terms, then commit yourself to doing better so as to not subject the readers of your work to that same fate.
See here is the thing though
In a buck converter the cap current changes direction mid switch state
I think that is why they don’t actually list the polarity in the book.
It actually goes both ways

1714352698556.png
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
Which is sloppy on the author's part.

And hopefully you can see why so many of us here are always harping about properly defining the variables that people use instead of forcing the reader to reverse engineer the definitions from the work or to make assumptions about what was meant.

The takeaway is that if you end up getting frustrated and wasting time because the author of a textbook can't be bothered to properly define their terms, then commit yourself to doing better so as to not subject the readers of your work to that same fate.
also to prove the point on how screwed up this is, as you said there is no consistency in the book.

In one section they define current into the node as negative and out of the node as positive as you showed in your example.

but In the same problem they show it the opposite

1714354040249.jpeg

this is what is so infuriating

they book seems to have no consistency even within the same problem!
so how could themath possibly close
 

WBahn

Joined Mar 31, 2012
32,878
It doesn't matter whether it goes both ways.

At any given instant in time, it has a value. That value can be either positive or negative. The interpretation of what that positive or negative value means is defined by the reference polarity of the current.

If you defined positive Ic to be current flowing into the capacitor from the top, then if the value of Ic happens to be negative, you know that the current is actually flowing out of the capacitor at the top. But if you neglect to define the reference polarity for Ic, then you have zero idea which direction the current is flowing regardless of what the actual value of Ic happens to be at any given instant.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
223
It doesn't matter whether it goes both ways.

At any given instant in time, it has a value. That value can be either positive or negative. The interpretation of what that positive or negative value means is defined by the reference polarity of the current.

If you defined positive Ic to be current flowing into the capacitor from the top, then if the value of Ic happens to be negative, you know that the current is actually flowing out of the capacitor at the top. But if you neglect to define the reference polarity for Ic, then you have zero idea which direction the current is flowing regardless of what the actual value of Ic happens to be at any given instant.
How does it not matter?
the book is literally defining a KCL equation in two different ways within the same problem
 
Top