[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: ngspice and dc sweep with "global parameter"
- To: geda-user@xxxxxxxx
- Subject: gEDA-user: ngspice and dc sweep with "global parameter"
- From: David Logan <djlogan2@xxxxxxxxxxx>
- Date: Sun, 20 Mar 2005 07:55:24 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: geda-user-outgoing@seul.org
- Delivered-to: geda-user@seul.org
- Delivery-date: Sun, 20 Mar 2005 09:58:18 -0500
- Reply-to: geda-user@xxxxxxxx
- Sender: owner-geda-user@xxxxxxxx
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316
Hello. Working through the book, one of the things that it's having me
do in pspice is plot the power as a function of resistance P(RL). We do
this by creating a resistor, setting its value to "{RL}", adding a
special part named "PARAM", setting "R2=2K" as name1/value of the PARAM
part, then running a DC sweep using "Global Parameter" and "RL" as the name.
We can then plot things with respect to RL, such as -V(R2)^2*I(R2),
where R2 is the resistor having the value {RL}. It's the graph of
maximum power transfer, so it looks like a horked -x^2 graph.
I have found nothing comparable in ngspice. Is this correct?
I have included the pspice circuit file below, changing ony the .INC
with the file data that was included.
David Logan
--------------------------------------------------------------
* D:\temp\testpspice\example_4_15.sch
* Schematics Version 9.1 - Web Update 1
* Sat Mar 19 07:36:22 2005
.PARAM RL=2k
** Analysis setup **
.DC LIN PARAM RL 100 5k 100
.OP
* From [PSPICE NETLIST] section of pspiceev.ini:
.lib "nom.lib"
* Schematics Netlist *
R_R1 $N_0002 $N_0001 1k
R_R2 0 $N_0001 {RL}
V_V1 $N_0002 0 DC 1V
* Schematics Aliases *
.ALIASES
R_R1 R1(1=$N_0002 2=$N_0001 )
R_R2 R2(1=0 2=$N_0001 )
V_V1 V1(+=$N_0002 -=0 )
.ENDALIASES
.probe
.END