On 03/02/2011 10:30 AM, Daniel B. Thurman wrote: > On 03/02/2011 10:05 AM, Daniel B. Thurman wrote: >> On 03/02/2011 09:55 AM, Vladimir Zhbanov wrote: >>> On Tue, Mar 01, 2011 at 05:59:42PM -0800, Daniel B. Thurman wrote: >>>> Hi, I found the time to go back to my past >>>> and revisit spice (used older Berkeley spice then) >>>> so I tried a simple RLC circuit from the following >>>> link and using ngspice: >>>> >>>> http://www.allaboutcircuits.com/vol_2/chpt_6/3.html >>>> >>>> Unfortunately, I was not able to duplicate the >>>> plots as shown in the above link. I am assuming >>>> that the author is using something other than ngspice >>>> or I am doing something wrong? >>>> >>>> Attached is the rlc.sch file with the same circuit sans >>>> the circuit netlist but it can be easily generated: >>>> >>>>> gnetlist -o rlc.cir -g spice-sdb rlc.sch >>>> The contents of rlc.cir is: >>>> >>>> ********************************************************* >>>> * Spice file generated by gnetlist * >>>> * spice-sdb version 4.28.2007 by SDB -- * >>>> * provides advanced spice netlisting capability. * >>>> * Documentation at http://www.brorson.com/gEDA/SPICE/ * >>>> ********************************************************* >>>> *============== Begin SPICE netlist of main design ============ >>>> L1 0 3 10mH >>>> C1 3 2 10uF >>>> R1 1 2 1 >>>> V1 1 0 dc 0 ac 1 sin >>>> .end >>> L1 is 100mH there. Could it help? >>> >>> -- >>> VZh >> Duh oh! That worked! >> Reminder to self: Get some hi-powered glasses and strong coffee! >> >> Thanks! > There seems to be a problem; v(3) plot is inverted, > otherwise the other nodes probes look good. Perhaps > this has to do with "vm" which is not a recognized > vector, so I just used "v" for node probes. Other than > that, it looks good. > > > > _______________________________________________ > geda-user mailing list > geda-user@moria.seul.org > http://www.seul.org/cgi-bin/mailman/listinfo/geda-user Problem solved. It was 'vm' and I recognized C/L are inverted plot WRT each other as expected. So to get the mags, one has to do:
plot 100*mag(v1#branch) mag(v(2,3)) mag(v(3)) which amounts to the same thing. All is well & thanks for pointing out the error! _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user