Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Impedance across supernode

Status
Not open for further replies.
Hi,
My error. The impedances of the points v, w.r.t. ground, in both circuits, would be infinity, under the infinite impedance voltage source convention.

Hi again,

No problem, but you would not believe what it took to get that circuit drawn out like that in text using the code tags :) I trust it will be fixed soon.

Well it just so happens that the impedance from node 'v' to ground in the second circuit is equal to R1 plus Jellyfish under the Jellyfish voltage source convention. But tell that to someone else that wants to use that circuit and they will wonder what the heck you are talking about.

So what this means is that if you want to say the impedance is infinite from 'v' to ground, then you've got to show how this 'view' can be useful. I dont see it right now but perhaps you have a good reason for saying this, so you'll have to show it because to most people the impedance of the second circuit from 'v' to ground is equal to R1 because E1 is considered a short circuit. This is also evident if we excite the left side of R1 (at 'v') with a current source. A current source does have infinite impedance so if we connect it in parallel with another impedance it does not alter the impedance. So if we have R1=1k and we use a 1ma current source connected from 'v' to ground we'll see 1ma flow through R1.

So you should try to show how your view helps us understand this circuit. Stating that the impedance is infinite at point 'v' in circuit 2 (or 1) does not seem to provide us with any useful information, while stating that the impedance is equal to R1 does. If someone comes along and wants to design an amplifier to drive point 'v' then they will have to know what to expect by way of the impedance. If they think it is infinite then they can use a lowly op amp to drive it, but if R1 was 1 ohm they'd have to design a much more hefty amplifier.

Also, what do you say a current source is then, infinite or a short circuit?
 
Hi,
My error. The impedances of the points v, w.r.t. ground, in both circuits, would be infinity, under the infinite impedance voltage source convention.

I think you have the convention backwards, ramuna.

Have a look here:

https://en.wikipedia.org/wiki/Voltage_source

Under the main heading "Ideal Voltage Sources", second paragraph, you'll find this:

"The internal resistance of an ideal voltage source is zero"

On this page:

https://en.wikipedia.org/wiki/Current_source

Under the main heading "Background", second paragraph, you will find this:

"The internal resistance of an ideal current source is infinite."
 
Thank you both for your valuable contributions. I still cannot get the wretched thing to work out correctly, and am and have been preoccupied with that. I'll come out and play again when that is done. This is a great forum...anyways, hope to be back soon.
 
Hi again,

You are welcome, and dont worry i did not forget about the main idea where you wanted to calculate the impedance, but because you asked about an impedance that happened to be across a voltage source i had to clear up what happens with voltage sources first. So you see the question has to be posed a little differently before i can know what it is you really want to calculate.

The impedance in most other parts of the circuit will also be influenced by the source and load impedances, so we have to know something about them too. Often the input impedance is taken to be zero though, and the output impedance taken to be infinite, but when transformers are involved that's not always the case as well as other times too.
 
... on plugging actual impedances into the MATLAB solution of the mesh equations, the net impedance differs from the simulation results in LTSpice.

Why don't you post values for the impedances, and the results you got from MATLAB, and from the simulation, so we can compare our results with yours.
 
Why don't you post values for the impedances, and the results you got from MATLAB, and from the simulation, so we can compare our results with yours.
A sensible and very generous suggestion, Mr Electrician ! But unfortunately its a bit more complicated. The impedance calculation is only a part of it. I am coding the calculation in a C++ program which also must correctly calculate the complex number arithmetic (multiply, add, exponentiate etc). Now I am checking all the stages in the process to discover where the problem lies...
 
Hi,

For A=a+b*i and B=c+d*i we have:
A+B=(a+c)+(b+d)*i
A*B=(a*c-b*d)+(a*d+b*c)*i
A/B=((b*d+a*c)/(c^2+d^2))+(b*c-a*d)/(c^2+d^2)
A^n=repeated multiplication of A because n will always be an integer.

Note that these solutions are all in the form of:
(Realpart)+(Imagpart)*i

That's because when dealing with constants (component values known) for every intermediate calculation you can reduce the result to a single complex number. This works for any number of components in even the most complex circuit except for when the numerical truncation starts to degrade the results.

For example, say we have R in series with C, and also in series with L, and R=10 and C=2 Farads and L=1 Henry and w=1. We first add the R and C and get:
10-i/(1*2)=10-0.5*i

then we add the L and get:
10-0.5*i+1*i=10+0.5*i

But in code this is easily handled as all complex numbers:
R=10+0*i
L=0+1*i
C=0-0.5*i

or in vector notation [real,imag] (which translates into storage units quite directly):
R=[10,0]
L=[0,1]
C=[0,-0.5]

If you wanted to put R1 and R2 in parallel for example you would do:
Rp=R1*R2/(R1+R2)

but using complex math and the vector notation you would first do:
Rx=[R1,0]*[R2,0]
then:
Ry=[R1,0]*[R2,0]
then:
Rp=Rx/Ry

and note that this last step still only required operations on two complex numbers Rx and Ry, because the calculation of Rx results in a single complex number and so does Ry.

When calculating voltages or currents this still works, and so we end up with a way to calculate phase shifts too because we end up with a single complex number which can represent impedance, voltage, or current, or even some other unit.
 
A sensible and very generous suggestion, Mr Electrician ! But unfortunately its a bit more complicated. The impedance calculation is only a part of it. I am coding the calculation in a C++ program which also must correctly calculate the complex number arithmetic (multiply, add, exponentiate etc). Now I am checking all the stages in the process to discover where the problem lies...

Your total problem may be more complicated, but in your first post you wanted help discovering why your MATLAB calculation didn't match the simulation result. The impedance calculation seemed to be the part of your problem where you needed help to begin with. If you will post your component values and results of simulation and MATLAB computation, MrAl and I can do the same calculation and compare with your results. That comparison may help you discover your errors.
 
Your total problem may be more complicated, but in your first post you wanted help discovering why your MATLAB calculation didn't match the simulation result. The impedance calculation seemed to be the part of your problem where you needed help to begin with. If you will post your component values and results of simulation and MATLAB computation, MrAl and I can do the same calculation and compare with your results. That comparison may help you discover your errors.

Hi,

I have to agree as i think this would show us just exactly what his logic is behind all of this too. Im still wondering if he wants any input or output load and the voltage source in or out :)
 
Hello again,

Another thing we did not talk about yet is a voltage 'source' that acts as part of the load or as part of the feedback.

For example, if we have a 1:2 transformer with primary fed with 1vac the output is 2vac, and with a 1k resistor 2ma flows in the output and so 4ma flows in the primary. Since the primary is fed with 1vac that means the input impedance is 1/0.004 which is 250 ohms.
But now we connect another 1vac source in series with that 1k resistor on the output so the load is now the 1k resistor in series with a different 1vac source, and we set the phase of that second ac source equal to the same phase as the input source. Now there's only 1vac across the 1k resistor, so we only see 1ma in the secondary, and that means only 2ma in the primary, and with the 1vac input source that means the input impedance is now 1/0.002 or 500 ohms. So we have managed to raise the input impedance using a voltage source. We could get the same effect by replacing the 1vac secondary source with another 1k resistor so the total output load was 2k, and again that means 1ma secondary current and 2ma primary current and so the input impedance is 500 ohms again. So that means the secondary 1vac source looks like a 1k resistance.
If we change the phase of the secondary source though we'd change the input impedance as well.

But the catch here is that these are AC sources in circuits which contain components which work only in AC circuits (the transformer). We can see a similar result in a DC circuit but then it can not contain any transformers. If it contains inductors and capacitors then that would be a problem too with the DC circuit unless it didnt matter for our application.
For example, if we have a 2v source and 1k resistor to ground the 2v source sees 1k resistance, but if we connect a 1v source in series with the resistor that 1v source absorbs power and so becomes part of the load, and oriented the same way as the 2v source (both with negative terminals to ground) that means the 2v source would only see 2k resistance because there would only be 1ma flowing from the 2v source and so that makes it look like a 2k resistance now. So there the 1v source ends up looking like a 1k resistor again.
But it would be impossible to connect this second source (the 1v source) to the output of a transformer because it would cause infinite current to flow.

We would of course see changes in impedance if we used other parts in the AC circuit like inductors too instead of resistors. A simple example of this would be a 2vac source connected to ground and a 1H inductor, and the other side of the inductor to ground. The impedance is of course the impedance of the inductor at the operating frequency: Z=j*w*L. But if we disconnect the ground side of the inductor and connect it in series with another AC source of 1vac with the same phase as the 2vac source, then the impedance the 2vac source sees is twice as much or Z=2*j*w*L.
So there we have managed to increase the input impedance by a factor of 2 by including a voltage source as part of the load. We had an AC component though so we had to use AC voltages.
 
Hello again gentlemen !
I'm back at last. The problem was in the complex number arithmetic subroutines (functions in C-speak). After the usual suspects were nailed (truncation errors as MrAl mentioned plus a couple more), I had to contend with a much more insidious bug, where a number is negated (eg 5 is negated to -5). My error was that the function should have returned -5 without changing the original number. Instead it changed the sign of the number permanently, which screwed up all the subsequent calculations which depended on 5 being +5. I now have agreement with simulation. Thank you both for your confirmation that the problem was most likely not due to Matlab but something else. Now, I'm sure I'll get reprimanded for being off topic, but I found something which helped me cope with mental fatigue. It is this:
I only mention it because it might help a fellow forum member in a similar situation.

I have a new question for you both, especially TheElectrician. Its on reflected Impedances and I have posted it as a separate thread.
 
Last edited:
Hi,

And to think all this time i was listening to Chopin. Silly me :)
 
Hi,

Thanks much for posting those, well at least that first one :)

The first one is a very nice piece although not one of the all time most popular im sure. I liked the mood changes though typical of his music.

The second one however is an abomination :) A beautiful piece rendered into modern noise making <chuckle> That's a popular one too when it is done right that is.

You'll notice that some of his music might be considered a little depressing, although very beautiful nonetheless. If you are looking to get more energized then check out the piano works by:
Rachmaninoff

Some of the most exciting pieces ever written i think.


Hey, maybe we need to start a MUSIC thread.
 
Hi,

Thanks much for posting those, well at least that first one :)

The first one is a very nice piece although not one of the all time most popular im sure. I liked the mood changes though typical of his music.

The second one however is an abomination :) A beautiful piece rendered into modern noise making <chuckle> That's a popular one too when it is done right that is.

You'll notice that some of his music might be considered a little depressing, although very beautiful nonetheless. If you are looking to get more energized then check out the piano works by:
Rachmaninoff

Some of the most exciting pieces ever written i think.


Hey, maybe we need to start a MUSIC thread.

I'm glad that you liked the nocturne. Its one of my favourite Chopin pieces. And that noisy second piece is what you need after hours of debugging...as you admitted, Chopin can be a bit depressing...not what you need to lift your spirits. I don't know much about Rachmaninov (but I'll check him out). In general I find Slavonic music a bit too melancholic (apart from Chaikovski
Hi,

Thanks much for posting those, well at least that first one :)

The first one is a very nice piece although not one of the all time most popular im sure. I liked the mood changes though typical of his music.

The second one however is an abomination :) A beautiful piece rendered into modern noise making <chuckle> That's a popular one too when it is done right that is.

You'll notice that some of his music might be considered a little depressing, although very beautiful nonetheless. If you are looking to get more energized then check out the piano works by:
Rachmaninoff

Some of the most exciting pieces ever written i think.


Hey, maybe we need to start a MUSIC thread.
I'm glad that you liked the nocturne. But as you admit, Chopin can be a bit of a downer...not what you need to lift your spirits after hours of debugging, especially if you have not yet solved the problem. I don't know much about Rachmaninov, but I'll check him out. In general I find the Slavonic composers a bit melancholic (apart from a few like Tchaikovsky). The Latins on the other hand have written some very lively music...just what the doctor ordered for mild depression. For example this:
 
Hi,

Hey that was pretty cute. We really do need to start a music thread here in members section. See what other people like.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top