The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 12:30pm
Pages: 1
Send Topic Print
question about probes and sources (Read 1649 times)
Zorro
Community Member
***
Offline



Posts: 63

question about probes and sources
Apr 11th, 2011, 8:10am
 
Hi all,

I'm a little confused about this:

"It is not possible for a probe to simultaneously be a potential and flow probe, and so it is illegal to observe both the potential and flow of a probe branch."
Designers Guide, page 61 near to the bottom.

"A branch cannot simultaneously be both a potential and a flow source, ..."
Designers Guide, page 62 near the top

But then in page 59 near the top there is a model for a diode (listing 12) using this:

l(a,c) <+ is*(limexp((V(a,c) – r*l(a,c))/$vt) – 1);

i.e. the probe is monitoring both the voltage (potential probe V(a,c)) and the flow (flow probe I(a,c)) which is a contradiction to the note from page 61.

Could please somebody explain this to me because I got confused.


From page 64 I understand that I can have, for example:

I(a, c) <+ V(a, c)*r1;
I(a, c) <+ V(a, c)*r2;
I(a, c) <+ V(a, c)*r3;
...

that means a flow source (parallel branches, KCL) and potential probes

but I cannot have this:

I(a, c) <+ V(a, c)*r1;
I(a, c) <+ V(a, c)*r2;
V(a, c) <+ I(a, c)*r3; X error
...


or that I can have this:

V(a, c) <+ I(a, c)*r1;
V(a, c) <+ I(a, c)*r2;
V(a, c) <+ I(a, c)*r3;
...

that means a potential source (branches in series, KVL) and flow probes

but I cannot have this:

V(a, c) <+ I(a, c)*r1;
V(a, c) <+ I(a, c)*r2;
I(a, c) <+ V(a, c)*r3; X error
...


so the question is why is it possible to monitor (probe) both the current and the voltage in this equation:

l(a,c) <+ is*(limexp((V(a,c) – r*l(a,c))/$vt) – 1); ???

I'm really confused and very grateful for any explanation.

thank you!

best regards!

- Zorro
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: question about probes and sources
Reply #1 - Apr 11th, 2011, 9:55am
 
Zorro,
Zorro wrote on Apr 11th, 2011, 8:10am:
l(a,c) <+ is*(limexp((V(a,c) – r*l(a,c))/$vt) – 1);
is an implicit definition of I(a,c).

B O E
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: question about probes and sources
Reply #2 - Apr 12th, 2011, 1:03am
 
A branch ceases to be a probe branch once you contribute to it. So the branch from a to c in
Code:
I(a,c) <+ is*(limexp((V(a,c) – r*I(a,c))/$vt) – 1);  

is not a probe branch, it is a source branch (in this case it is a current source branch), and you can probe both the voltage and the current of a source branch.

In a probe branch, either the voltage or the current is always zero depending on what type of probe branch it is. As such, the language uses what you are observing to determine what type of probe branch it is. That is why you cannot probe both (not only is it not useful, but it would hide your intent). None of this is true with source branches. The type is determine by what you contribute to, not what you probe. And both the voltage and current of a source branch are interesting and useful.

And B.O.E is correct that the branch equation is an implicit formulation, but that does not affect what you can probe.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #3 - Apr 12th, 2011, 2:14am
 
thank you for the reply.

I also read that in the Designer's Guide Book about I(a,c) <+ is*(limexp((V(a,c) – r*l(a,c))/$vt) – 1) being an implicit equation. (page 59)

What I don't understand is when such an assignation is allowed and where it is not.

here is the reason why I am confused. please see the attached picture.

I wanted to describe that network like this:

                                               component      left side            right side            status

I(ref, pole_gain)      <+ V(inp, inm) * dc_gain/rp1;            
// vccs            flow source            potential branch      ok      

V(pole_gain, ref)      <+ I(pole_gain, ref) / rp1;            
// resistor      potential source      flow branch            error

I(pole_gain, ref)      <+ ddt(cp1 * V(pole_gain, ref));      
// capacitor      flow source            potential branch      ok


but it was not working as expected.
then I read the section about sources and probes (section 4.2, page 60) and it says that "A branch cannot simultaneously be both a potential and a flow source" and that's is the case with the description of the resistor. I am using flow sources and potential sources to describe a branch which is not allowed.

so I changed my code to this:


                                               component      left side            right side            status

I(ref, pole_gain)      <+ V(inp, inm) * dc_gain/rp1;            
// vccs            flow source            potential branch      ok      

I(pole_gain, ref)      <+ V(pole_gain, ref) / rp1;            
// resistor      potential source      flow branch            error

I(pole_gain, ref)      <+ ddt(cp1 * V(pole_gain, ref));      
// capacitor      flow source            potential branch      ok


and correcto! now it's working as expected because I have flow sources and potential probes, and not a mix.

now let's go back to this equation:

I(a,c) <+ is*(limexp((V(a,c) – r*l(a,c))/$vt) – 1)



let's make it simpler and let's say that it is similar to:

I(a,c) <+ k1 * V(a,c) - k2 * I(a,c);

I could re-write this equation:

I(a,c) <+ k1 * V(a,c)            flow source            potential branch      

I(a,c) <+ - k2 * I(a,c);      flow source            flow branch

so I have a mix at the right side which is not allowed:

"It is not possible for a probe to simultaneously be a potential and flow probe, and so it is illegal to observe both the potential and flow of a probe branch."
Designers Guide, page 61 near to the bottom.


Could please somebody explain me.
Back to top
 
 
View Profile   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #4 - Apr 12th, 2011, 2:16am
 
picture
Back to top
 

probes_and_sources.PNG
View Profile   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #5 - Apr 12th, 2011, 2:27am
 
thanks kundert. one more question. please see the last picture.

are both codes correct?

code1:
I(ref, pole_gain)      <+ V(inp, inm) * dc_gain/rp1;            
I(pole_gain, ref)      <+ V(pole_gain, ref) / rp1;            
I(pole_gain, ref)      <+ ddt(cp1 * V(pole_gain, ref));

and

code2:
I(ref, pole_gain)      <+ V(inp, inm) * dc_gain/rp1;            
V(pole_gain, ref)      <+ I(pole_gain, ref) * rp1;            
I(pole_gain, ref)      <+ ddt(cp1 * V(pole_gain, ref));

and this:
"A branch ceases to be a probe branch once you contribute to it." is what I was missing. thank you!

- Zorro
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: question about probes and sources
Reply #6 - Apr 13th, 2011, 12:19am
 
Case 2 is illegal because you are simultaneously treating the branch between ref and pole_gain as a flow source and a potential source.

Remember that if you make multiple contributions to a flow source it is as if you are adding branches in parallel (the flow sums). If you make multiple contributions to a potential source it is as if you are adding branches in series (the potential sums). Notice that this pattern does not generalize to mixed multiple contributions. Would they go in series or in parallel? How do you sum a flow and a potential? For these reasons, simultaneously contributing to the flow and potential of a branch is not allowed.

From your picture it is clear that you want the components to be arranged in parallel. The only way to do this with unnamed branches is to use flow sources which naturally combine in parallel. If you want to mix the formulations for the branches, you will need to explicitly declare separate branches using a branch statement and formulate each independently. Thus, case 2 can be written:
Code:
// code2:
branch (ref, pole_gain) isrc, res, cap;
I(isrc) <+ V(inp, inm) * dc_gain/rp1;
V(res) <+ I(res) * rp1;
I(cap) <+ ddt(cp1 * V(cap)); 



-Ken
Back to top
 
 
View Profile WWW   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #7 - Apr 14th, 2011, 1:44am
 
thank you again for the explanation.

to summarize:

this is valid:
I(a,c) <+ V(a,c)*k1;
I(a,c) <+ I(a,c)*k2;
the branches are in parallel and I could also say: I(a,c) <+ V(a,c)*k1 + I(a,c)*k2; (KCL)


this is not valid:
V(a,c) <+ I(a,c)*k1;
I(a,c) <+ V(a,c)*k2;
error, simultaneously treating the branch between "a" and "c" as a flow source and a potential source

thank you!
Back to top
 
 
View Profile   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #8 - Apr 14th, 2011, 1:59am
 
Hi again,

please see the attached picture with 3 resistances r1, r2, r3.

code1: using named branches
branch (a, x) res1, (x, c) res2, (a,c) res3;
V(res1) <+ I(res1)*r1;
V(res2) <+ I(res2)*r2;
I(res3) <+ V(res3)/r3;


code2: using unnamed branches
I(a,x) <+ V(a,x)*r1;
I(x,c) <+ V(x,c)*r2;
I(a,c) <+ V(a,c)*r3;


now a particular situation...

let's say that I start my definition like this (using unnamed branches):

V(a,c) <+ I(a,c)*r1+I(a,c)*r2;
indicates that r1 and r2 are in series which is correct.

now I need to describe the behavior of R3.


Situation 1:
if I add the second line to describe r3 like this:
V(a,c) <+ I(a,c)*r1+I(a,c)*r2;
V(a,c) <+ I(a,c)*r3;
this is a mistake because it's like saying that r1, r2 and r3 are in series, which is false.

Situation 2:
if I add the second line to describe r3 like this:
V(a,c) <+ I(a,c)*r1+I(a,c)*r2;
I(a,c) <+ V(a,c)*r3;
error, simultaneously treating the branch between "a" and "c" as a flow source and a potential source


this means that if for any reason I start describing the network like this:
V(a,c) <+ I(a,c)*r1+I(a,c)*r2;

there is no option left to describe what happens on r3.
this is just an example assuming extrictly that the description starts with:
V(a,c) <+ I(a,c)*r1+I(a,c)*r2;

can I do this?
V(a,c) <+ I(a,c)*r1+I(a,c)*r2; // extrictly so, just for education/understanding purposes
branch (a,c) res3;
V(res3) <+ I(res3)*r3;

i.e. using the nodes (a,c) first as an unnamed branch and then as a named branch.

thank you!
Back to top
 

res_network.PNG
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: question about probes and sources
Reply #9 - Apr 14th, 2011, 2:22am
 
yes
Back to top
 
 
View Profile WWW   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: question about probes and sources
Reply #10 - Apr 14th, 2011, 3:29am
 
ok!

thanks kundert and BOE for all the explanations and verifications.

best regards!
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.