Solving a circuit

MrAl

Joined Jun 17, 2014
13,704
I think this is the same as I posted in post #10.

View attachment 145008

Anyway, if this is the correct circuit to simulate the other one from the other thread, I would now like to know what is the difference in terms of equations after plugging in this different dependant element!
Hi,

That matches my result for node 1 which is all i checked.

But for the point of analysis, did you notice anything peculiar about the 8 ohm resistor as to how it affects the analysis?
 

WBahn

Joined Mar 31, 2012
32,840
I think this is the same as I posted in post #10.

View attachment 145008

Anyway, if this is the correct circuit to simulate the other one from the other thread, I would now like to know what is the difference in terms of equations after plugging in this different dependant element!
It's hard to divine what the actual solution to the circuit the simulator is claiming without complete information.

Please capture the voltages at all of the nodes and the currents in all of the branches. That let's us (and you) quickly check things like is the dependent source doing what we think it should be doing, or is it doing something else and we are just deluding ourselves.
 

WBahn

Joined Mar 31, 2012
32,840
Hi,

That matches my result for node 1 which is all i checked.
It's only correct if R in this schematic is turned the opposite way compared to what is shown in Post #15. That post has pin 1 on the right. That means that a current of +43.5 A would be flowing from right to left while the actual current is flowing from left to right. The other two currents are correct per the resistor orientations in Post #15, so I'm pretty sure the resistor is turned around.

If the node voltages were given, confirming that would be trivial.

But for the point of analysis, did you notice anything peculiar about the 8 ohm resistor as to how it affects the analysis?
If you draw a supernode you discover that the 8 Ω resistor is internal to the supernode. I suspect that is essentially what you are getting at.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,786
Can you clearly emphasize the problem you have? You do not know how to solve circuits with dependent sources or what?

As a side question. Why do you use transient analysis in LTspice (instead of .op) to solve the DC circuit ?
I thought that analysing this type of circuit with dependant current sources, would be just the same as if the circuit didn't have any. But it is not. So I would like to learn how to analyse circuits with dependant current sources or dependant voltage sources.

Just because I didn't remember to use .op... Done now!

Hi,

That matches my result for node 1 which is all i checked.

But for the point of analysis, did you notice anything peculiar about the 8 ohm resistor as to how it affects the analysis?
To be honest, no I didn't notice any peculiar effect from that resistor. But I don't know either how to do an analysis to a circuit using dependant current sources.

It's only correct if R in this schematic is turned the opposite way compared to what is shown in Post #15. That post has pin 1 on the right. That means that a current of +43.5 A would be flowing from right to left while the actual current is flowing from left to right. The other two currents are correct per the resistor orientations in Post #15, so I'm pretty sure the resistor is turned around.

If the node voltages were given, confirming that would be trivial.

If you draw a supernode you discover that the 8 Ω resistor is internal to the supernode. I suspect that is essentially what you are getting at.
Done now and all voltages and currents are now visible!

aac4.png
 

WBahn

Joined Mar 31, 2012
32,840
Done now and all voltages and currents are now visible!
Those are all correct. So now you know what the answers are and can compare them to your hand analysis.

One way to handle analyzing a circuit with dependent sources is to replace each of them with an independent source and set everything up that way (using a symbolic value, such as Vh1, for the voltage output of H1). Then, once you have that set up, replace the symbolic variable with the controlling expression. In this case that would be (9Ω)(V1/R).

Give it a try and see how far you can get.
 

MrAl

Joined Jun 17, 2014
13,704
It's only correct if R in this schematic is turned the opposite way compared to what is shown in Post #15. That post has pin 1 on the right. That means that a current of +43.5 A would be flowing from right to left while the actual current is flowing from left to right. The other two currents are correct per the resistor orientations in Post #15, so I'm pretty sure the resistor is turned around.
Now sure what you mean here. If i turn a resistor around, i get nothing changed. A resistor is non polarized.
Maybe you mean the assumed polarity of the voltage or current?
I assumed the one give was correct as we understood it to be correct as to the original circuit.

If you draw a supernode you discover that the 8 Ω resistor is internal to the supernode. I suspect that is essentially what you are getting at.
He he, i was aiming this question at the OP who is still learning the basics of circuit analysis. That's a good answer though. I was hoping to spark some thought on his/her part.
 

MrAl

Joined Jun 17, 2014
13,704
I thought that analysing this type of circuit with dependant current sources, would be just the same as if the circuit didn't have any. But it is not. So I would like to learn how to analyse circuits with dependant current sources or dependant voltage sources.

Just because I didn't remember to use .op... Done now!



To be honest, no I didn't notice any peculiar effect from that resistor. But I don't know either how to do an analysis to a circuit using dependant current sources.



Done now and all voltages and currents are now visible!

View attachment 145016
Hi again,

The thing with the 8 ohm resistor is it is driven only by voltage sources so the current though that resistor (alone) plays no part in the rest of the circuit. The only thing it changes is the current through it itself, and therefore can be left out of the analysis until the very end and only then if you want to know the current through it or some total circuit power. That's with nodal analysis anyway.

For a simpler example, imagine a circuit where we have an 8 ohm resistor driven directly by a single 8v constant voltage source, but is part of a larger circuit. The current through the resistor is 1 amp, but that does not affect the rest of the circuit because the source and resistor form a sort of isolated system...isolated for current but not for voltage as obviously the voltage affects the rest of the circuit in most cases.
So you can make that 8 ohm resistor any value you like (other than a short circuit) and you will not change any of the node voltages.

The reason by i mentioned solving the circuit with constant voltage sources is two fold.
1. You get some immediate results that tell you if you are doing everything right with this particular topology. If you cant get that right, you'll never get the dependent source circuit right so it's good to start there when doing this stuff by hand.
2. Once you do get the right result and have verified it, you can then replace the constant sources with the controlling equations such as "i" in this circuit, which came up to 9*i i think for this one, and since 'i' was v3/3 you can replace it with 9*v3/3 which simplifies to 3*v3.

I think you will be very happy following that outline.
 

WBahn

Joined Mar 31, 2012
32,840
Now sure what you mean here. If i turn a resistor around, i get nothing changed. A resistor is non polarized.
It very much IS polarized in nearly every simulator.

As stated previously, when you ask a simulator what current is in a resistor it will give you a number that can be either positive or negative. What does that mean? It only has meaning if you know what the reference direction is for that current -- and you can't just assume that it's the direction that you would like it to be in.

The reference direction for a two-terminal device in nearly every simulator is that a positive current is the current INTO pin 1. If you turn the resistor around, you have flipped the reference direction.

Here's the first diagram were the pin 1 labels were turned on. I've annotated the reference directions used by the simulator.

If the pin 1 labels weren't turned on, you would have no idea what direction that 5.4375 A was flowing for i(r). You'd have to essentially analyze the circuit to figure out which direction was correct for each of the three currents -- and you'd discover that the ones I've annotated are the only possible ones.


refdir.png

Notice the reference direction for V3. It is, like all two-terminal devices, positive INTO pin 1, which is the + terminal. That matches the reference direction for the control current in the original schematic. This is why the gain of -9 V/A on the dependent source is incorrect.

So now we "know" that if i(r) is positive that it is flowing right to left and that the voltage on Node 3 is positive.

Or do we?

Here's the sim result after changing the gain of the dependent source from -9 V/A to +9 V/A.

refdir2.png

Notice that i(r) is still positive, so since we "know" that it is flowing from right to left, that must mean that the voltage at node 1 (relabeled from node 3) is positive.

But if we do the analysis by hand based on these results, we discover that the reference directions I've indicated are the correct ones. Notice that the reference direction for i(r) is flipped.

That's because this is not the exact same schematic as the earlier one and R has been flipped.

Now look at the final simulation

refdir3.png

Notice that NOW, we see that I(R) is negative. The resistor R has been flipped back around so that the reference direction is the going right to left again. The pin NAME of pin 1 is "A", which is what is being displayed here).

Maybe you mean the assumed polarity of the voltage or current?
I assumed the one give was correct as we understood it to be correct as to the original circuit.
Making assumptions like that is not a very good practice.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,786
Ok, so this was just to make the circuit currents to flow all to match the signs of each ones LTSpice values

@MrAl;
thanks about the 8ohm resistor.
So I think I'll try to solve as you told me to do but I'm not sure I understood.
What you meant was to replace that dependant voltage source by a constant voltage source first? This would be the first change in the circuit? If so, what would be it's value?


@WBahn;
I always try to think about currents flowing from higher potentials to lower potentials! So considering last image posted by @WBahn of the final simulation, I always considered 'I4' flowing from node 3 to node 2, 'I3' flowing from node 3 to GND, 'I(V2) from node 2 to GND, 'I1' from node 2 to node 1, obviously and I(R) from node 1 to GND and I2 from node 1 to node 3. The problem is that I didn't placed resistors according this method!
 

MrAl

Joined Jun 17, 2014
13,704
Ok, so this was just to make the circuit currents to flow all to match the signs of each ones LTSpice values

@MrAl;
thanks about the 8ohm resistor.
So I think I'll try to solve as you told me to do but I'm not sure I understood.
What you meant was to replace that dependant voltage source by a constant voltage source first? This would be the first change in the circuit? If so, what would be it's value?
Hi again,

The thing about the 8 ohm resistor, put another way, is that when we write the nodal equations the currents in individual nodes has to be summed, but because that is driven by a voltage source (which is the sum of two voltage sources in this circuit) we dont have to sum anything at that node.
Maybe that helps a little.

You can replace the dependent source with any unused variable, but it's probably best to use a variable that you recognize as a voltage source, such as "E" or "E1" or something like that. You then write the equations like that to start, ignoring the fact that E1=3*v3 or whatever it is. Since you know how to write equations with constant voltage sources, this should go smoothly.
The important point though is that you dont want to replace it with a known voltage like 12v or 1.2v or 9.3v or whatever, because up to this point in the analysis it is still considered, and is, an unknown voltage. So we just retain the symbol "E1" throughout the equation writing until all of the equations are written.

The next step, if you choose to do this, is to replace the E1 with some known by unusual voltage level, such as 1.23 or something like that. You then solve the circuit with that known voltage source, then check your results by calculating currents into nodes or however you want to do it. If it all works out, then your equations are probably right so far.
This step is not mandatory and you do have to throw the results out after you are done, but it checks your basic analysis to make sure you got it right for the given topology.

The next step comes after all equations have been written. That's to replace the E1 with whatever defined that such as 3*v3. The equations are then all in the node voltages such as v1, v2, v3, etc., and can be solved as usual.

The final step would be to make sure you dont encounter some latch up condition, where the solution looks valid but actually can not be changed with a change of input voltage. This is especially important in amplifier circuits with feedback, which includes circuits with dependent sources. The output or outputs must be able to change at some point with some change of input(s).
The way to check for this varies a little though because some circuits are made to latch for given input conditions, but should not remain latched for every allowable input condition and sometimes the input condition includes the power supply too where it wont "unlatch" until the power is turned off.
This step can be left out until after you've done a number of non latching circuits i guess where you start to get a feel for this kind of condition. THere are theories that go into this kind of thing like "controllability" and "observability" but those are probably better left out for now.
 

WBahn

Joined Mar 31, 2012
32,840
@WBahn;
I always try to think about currents flowing from higher potentials to lower potentials! So considering last image posted by @WBahn of the final simulation, I always considered 'I4' flowing from node 3 to node 2, 'I3' flowing from node 3 to GND, 'I(V2) from node 2 to GND, 'I1' from node 2 to node 1, obviously and I(R) from node 1 to GND and I2 from node 1 to node 3. The problem is that I didn't placed resistors according this method!
The orientation of resistors and other seemingly non-polarized components in a simulation schematic is pretty important if you want to be able to interpret detailed simulation results. That the makers of the symbol library didn't provide a simple visual means of doing so is unfortunate. That's why I mod my libraries to put a visual indicator on those basic symbols -- and it really helps when it comes time to delve into the sim results and cuts down on a lot of easy-to-make errors.

Now, we've beat the sim results to death and we have reached a point where we have confidence that they are correct and that we agree with them (or at least you have confirmation from a few members that agree that they are correct).

So let's move on to you doing your best to set up the equations needed to solve the circuit. This is a pretty good circuit to tackle several different ways, so I'd recommend you do that.

Try each of the following (but pick one, solve it using that method, then move on to another):

1) Nodal Analysis
2) Mesh Analysis
3) Superposition
 

MrAl

Joined Jun 17, 2014
13,704
The orientation of resistors and other seemingly non-polarized components in a simulation schematic is pretty important if you want to be able to interpret detailed simulation results. That the makers of the symbol library didn't provide a simple visual means of doing so is unfortunate. That's why I mod my libraries to put a visual indicator on those basic symbols -- and it really helps when it comes time to delve into the sim results and cuts down on a lot of easy-to-make errors.

Now, we've beat the sim results to death and we have reached a point where we have confidence that they are correct and that we agree with them (or at least you have confirmation from a few members that agree that they are correct).

So let's move on to you doing your best to set up the equations needed to solve the circuit. This is a pretty good circuit to tackle several different ways, so I'd recommend you do that.

Try each of the following (but pick one, solve it using that method, then move on to another):

1) Nodal Analysis
2) Mesh Analysis
3) Superposition

Hi,

Yes from the viewpoint of a simulator the resistors may have an assumed polarity. Reversing will swap a minus voltage to a plus voltage and vice versa. I guess that is what you meant earlier.
 

anhnha

Joined Apr 19, 2012
904
Hi,

Yes from the viewpoint of a simulator the resistors may have an assumed polarity. Reversing will swap a minus voltage to a plus voltage and vice versa. I guess that is what you meant earlier.
I think this is what WBahn meant to say. This picture is from PSIM.
The current direction flowing through each component is calculate as assumed polarity (from side with dot to the other side).

upload_2018-2-5_5-51-2.png
 

WBahn

Joined Mar 31, 2012
32,840
I think this is what WBahn meant to say. This picture is from PSIM.
The current direction flowing through each component is calculate as assumed polarity (from side with dot to the other side).
That's certainly the idea. I don't know that I would use a dot, as that has other common meanings -- particularly when associated with an inductor. I usually just put a tiny perpendicular tick mark on the pin at the end of the symbol graphic, making it small enough so that it is usually overlooked unless you are specifically trying to identify pin 1.
 

anhnha

Joined Apr 19, 2012
904
That's certainly the idea. I don't know that I would use a dot, as that has other common meanings -- particularly when associated with an inductor. I usually just put a tiny perpendicular tick mark on the pin at the end of the symbol graphic, making it small enough so that it is usually overlooked unless you are specifically trying to identify pin 1.
This is how PSIM addresses the problem with inductor. They created other coupled inductors.

upload_2018-2-5_7-44-13.png
 

MrAl

Joined Jun 17, 2014
13,704
I think this is what WBahn meant to say. This picture is from PSIM.
The current direction flowing through each component is calculate as assumed polarity (from side with dot to the other side).

View attachment 145192
Hi,

Yes, thanks, that is what i was seeing too. So we are all on the same page now :)

The polarity only has meaning to the simulation plot, not to the general operation of the circuit. If you reverse the 'polarity' the plot becomes the negative of what it was before any change. So a voltage of +5v would be plotted as -5v, and a voltage that was originally +5v will plot as -5v after the change. When we are dealing with just a resistor nothing else changes. When we deal with inductors and capacitors, then the initial conditions setting, if any, also has a large effect not only on the plot but also on the total behavior of the circuit itself, and of course coupled inductors will also cause other changes obviously.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,786
I'll try to solve this during the day of today. Not sure If I'm going to have enough time because I'm at work! I'll try!
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,786
I'll use last image from post #28 to write some equations.

So, I think I already did this but I'll do it again.

3 nodes numbered from 1 to 3

Node 1 (note: I'll call Vn3 the voltage at node 3 to distinguish from the dependent voltage source also named V3 in the circuit and Vn1 the voltage at node 1 to distinguish from source voltage 1):
I1 = IR + I2 <=> 20 = IR + I2
<=> 20 = (Vn1/R) + ((Vn3+V1-Vn1) / R2)
<=> 20 = Vn1/3 + (Vn3-5-Vn1)/4

(not sure about the sign of the orange element value)

Get rid of denominators by least common divider (lcd(1, 3 , 4) = 12) and simplify

<=> 240 = 4Vn1 + 3Vn3 - 15 - 3Vn1
<=> Vn1+3Vn3 = 255V



Node 2:
I4 = I_V2 + I1 <=> I4 = I_V2 + 20
9*(V1/R) = I_V2 + 20


Here I don't know if I can do anything else because I can't (or I don't know how to) evaluate the current flowing through V2 once we considered the elements as ideal and theoretically, this V2 wouldn't have any resistance (internal) neither it's branch in the circuit has any!

Node3:
I2 = I4 + I3
<=> ((Vn3+V1-Vn1) / 4) = 9*(Vn1/3) + Vn3/8

(not sure about the sign of the orange element value)

Get rid of denominators by lcd(3, 4, 8) = 24, and simplify
<=> 6*Vn3 - 30 - 6*Vn1 = 8*9*Vn1 + 3*Vn3
<=>3*Vn3 - 78*Vn1 = 30
<=> Vn3 - 26*Vn1 = 10V


But I still have more unknowns than equations.
So, considering Net A, the net of right top "square" of the circuit, I think I can write:

Net A
V1 + V_R3 - V_R + V_R2 = 0.

If I consider Net B, the net of the top left "square" of the circuit and Net C the net of the bottom rectangle, I could write 2 more equations. The problem is that I don't remember how to write net equations when we have current sources in them! I need a help here!


Edited;
Ok, after all this work, I know this is wrong!

I have solved last equation for node 3 for Vn1 and replaced in equation for node 1 and solved for Vn3. I got a value of 84.05V which does not match LTSpice value of voltage for this node which is -389.5V.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,704
I'll use last image from post #28 to write some equations.

So, I think I already did this but I'll do it again.

3 nodes numbered from 1 to 3

Node 1 (note: I'll call Vn3 the voltage at node 3 to distinguish from the dependent voltage source also named V3 in the circuit and Vn1 the voltage at node 1 to distinguish from source voltage 1):
I1 = IR + I2 <=> 20 = IR + I2
<=> 20 = (Vn1/R) + ((Vn3+V1-Vn1) / R2)
<=> 20 = Vn1/3 + (Vn3-5-Vn1)/4

(not sure about the sign of the orange element value)

Get rid of denominators by least common divider (lcd(1, 3 , 4) = 12) and simplify

<=> 240 = 4Vn1 + 3Vn3 - 15 - 3Vn1
<=> Vn1+3Vn3 = 255V



Node 2:
I4 = I_V2 + I1 <=> I4 = I_V2 + 20
9*(V1/R) = I_V2 + 20


Here I don't know if I can do anything else because I can't (or I don't know how to) evaluate the current flowing through V2 once we considered the elements as ideal and theoretically, this V2 wouldn't have any resistance (internal) neither it's branch in the circuit has any!

Node3:
I2 = I4 + I3
<=> ((Vn3+V1-Vn1) / 4) = 9*(Vn1/3) + Vn3/8

(not sure about the sign of the orange element value)

Get rid of denominators by lcd(3, 4, 8) = 24, and simplify
<=> 6*Vn3 - 30 - 6*Vn1 = 8*9*Vn1 + 3*Vn3
<=>3*Vn3 - 78*Vn1 = 30
<=> Vn3 - 26*Vn1 = 10V


But I still have more unknowns than equations.
So, considering Net A, the net of right top "square" of the circuit, I think I can write:

Net A
V1 + V_R3 - V_R + V_R2 = 0.

If I consider Net B, the net of the top left "square" of the circuit and Net C the net of the bottom rectangle, I could write 2 more equations. The problem is that I don't remember how to write net equations when we have current sources in them! I need a help here!


Edited;
Ok, after all this work, I know this is wrong!

I have solved last equation for node 3 for Vn1 and replaced in equation for node 1 and solved for Vn3. I got a value of 84.05V which does not match LTSpice value of voltage for this node which is -389.5V.

Hi again,

Ok check out the drawing in the attachment. I've cleaned it up a little and note that i added node #4.

We know what node 2 voltages v2 is because it is given, and what else we can do is 'assume' we already 'know' what node 3 voltage is:
v3=2+H1

so now we 'know' what v3 is, and that means we 'know' what v4 is:
v4=v3+5=2+H1+5=H1+7

So what we just did was calculated the 'assumed' voltage for v4. What that does for us is eliminate a lot of the work because we only haver one node left to solve for, and that is node 1 with voltage v1.

Writing one nodal equation, we just sum two of the currents and set that equal to the third (or sum all to zero if you like):
(v4-v1)/4+20=v1/3

and we know that v4 is H1+7 so we substitute that in:
(H1+7-v1)/4+20=v1/3

and we 'know' what H1 is because we 'know' what current 'i' is:
i=v1/3

so H1=9*i=9*v1/3=3*v1, and substituting that in:
(3*v1+7-v1)/4+20=v1/3

and this is an equation in one variable v1, and i am sure you know how to solve for that v1. Once we have v1 we can easily get the other node voltages.

So we went from a circuit with 4 'unknown' node voltages to a circuit with one 'unknown' node voltage.
This was simplified because of the three voltage sources in series, but that's a little rare really. We cant get it that simple if say we had another resistor in series with H1, and that would mean another node. node 5, and we would have to sum currents for that node too. However, we would still have the simplification of the node at the top of H1:
v5=2+H1

because we know that source of 2 volts and we assume we know the voltage of H1.

I hope that helps a little.

The more of these exercises you do the better you get at doing them. We could do several more of these if you like. One example would be to add another resistor as mentioned above and that would create a 5th node.
I could probably pull some out of a book or something too.
 

Attachments

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,786
Well, I think part of your work is just the same as mine with the difference of that node 4 you added!

I just can't check where I did go wrong... If it was at those orange parts or where!
Anyway I can try to continue your work as you left it!
As for the other suggestions you made about solving more circuits, I need to focus now on the Buck, Boost and Buck-Boost circuits for the exam I have next 19 of February! And I know that time flies and the exam time comes in a blink of an eye!

Ok, after following your work, I found V1 = 3/7 V. I'm not sure if this is correct. I need to check math again! If you know the result of V1, please confirm or not!
 
Top