[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: dependent sources in gschem





On 9/12/05, H. S. <hs.samix@xxxxxxxxx> wrote:
Hi,

I am trying to use a dependent source (CCCS) in an example for basic circuit analysis. How do I specify a current source to be dependent on a current through a resistor in a circuit in gschem?

Here is the circuit I am trying:
$> cat johnson-p-4_16.net
* gnetlist -v -g spice-sdb -o johnson-p-4_16.net johnson-p-4_16.sch
*********************************************************
* Spice file generated by gnetlist                      *
* spice-sdb version 10.9.2004 by SDB --                 *
* provides advanced spice netlisting capability.        *
* Documentation at http://www.brorson.com/gEDA/SPICE/   *
*********************************************************
F1 1 2 unknown
R3 0 2 4
R2 1 2 3
R1 0 1 2
I1 0 1 15A
.END


I want F1 to be dependent on current "i" flowing from node1 to node0 through R1.

All help is appreciated,
thanks,
->HS


One way that I have found is to put a dummy voltage source of 0V between R1 and node 1 with the source purpose of just measuring the current through this branch. Then using:
F1 1 2 Vm 2

as the dependent source works perfectly.

Okay, the problem seems to have been solved. But I guess, from my limited experience of spice, that this is the "spice method". Is there any other way with which I can specify a CCCS without having to use a dummy voltage source?

thanks,
->HS

PS: The new spice file is:
* gnetlist -v -g spice-sdb -o johnson-p-4_16.net johnson-p-4_16.sch
*********************************************************
* Spice file generated by gnetlist                      *
* spice-sdb version 10.9.2004 by SDB --                 *
* provides advanced spice netlisting capability.        *
* Documentation at http://www.brorson.com/gEDA/SPICE/   *
*********************************************************
F1 1 2 Vm 2
R3 0 2 4
R2 1 2 3
R1 0 3 2
Vm 1 3 0V
I1 0 1 15A
.END