[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Phase and Magnitude of Current
On Fri 04/10/09 2:25 PM , John Doty jpd@xxxxxxxxx sent:
>
> On Apr 10, 2009, at 11:04 AM, awchang2
> @buffalo.edu wrote:
> > Hi,
> >
> > I have this assignment for a circuit analysis
> class. We're supposed > to use pspice, but I'm having a couple of
> problems using the software.>
> > We're supposed to find the magnitude and phase
> of I, I_C, and I_L. > So I loaded up my netlist into ngspice, and I
> performed a transient > analysis with a step size of 5 ns and a duration
> of 200 ns:>
> > ngspice -> tran 5ns 200ns
>
> While it is possible to use transient analysis for this purpose, AC
> analysis is easier for a linear circuit like this.
Yeah, that's what I thought, but my TA wants us to use a transient analysis, for some reason.
As for doing it by hand, and how it's overkill to use ngspice, I know. But that's what the assignment asks for.
I guess it's to practice using ngspice...
It also wants it done by hand. For that portion, I'm using KVL, Ohm's Law, and complex impedance.
> >
> > It gave me the voltage, which is good and all,
> but how do I get the > magnitude and phase of the current without doing
> it by hand
> There's a trick: in SPICE, a voltage source of zero volts functions
> as a current meter.
Okay, so I can't seem to get it to work. Here's my netlist:
* Spice netlister for gnetlist
V1 4 1 DC 0
Vs 1 0 sin(0 56.56 477.5)
V3 6 3 DC 0
R2 5 6 1k
V2 5 2 DC 0
R1 4 5 1.5k
L 0 2 0.333
C 0 3 0.167uF
.END
when I try to do something like:
print mag(I(V1)) ph(I(V1))
it returns:
Error: no such function as I.
Thanks so much, so far Stuart Brorson and John Doty.
> > (i.e. only using ngspice)? Attached is a picture
> of the schematic > (if that's necessary).
> >
> > Best regards,
> > Albert Chang
> >
> >
> _______________________________________________> geda-user mailing list
> > geda
> -user@xxxxxxxxxxxxxx> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
> John Doty Noqsi Aerospace, Ltd.
> http://www.noqsi.com/jpd@xxxxxxxxx
>
>
>
>
>
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user