To read this email, so the columns come out reasonably, use a fixed-pitch font.
On Friday 10 April 2009, [email protected] wrote: > 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: What method were you told to use with Pspice? AC analysis? Transient, and look at the graphs to determine phase? There are lots of ways to do it. At this level, it should be almost the same whether you are using Pspice, NGspice, or Gnucap. Close enough that if you understand one you can easily move to another. ngspice -> tran 5ns 200ns Do you really want transient?? If so .. your voltage source specifies a frequency of 477.5 Hz, but running a transient analysis for only 200 ns will not show you much. You really want AC analysis .. Gnucap 2009.02.02 RCS 26.109 The Gnu Circuit Analysis Package Never trust any version less than 1.0 Copyright 1982-2007, Albert Davis Gnucap comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License, version 3 or later. See the file "COPYING" for details. gnucap> b >vs (1 0) sin (0 56.56 477.5) ac 56.56 >R1 (1 2) 1.5k >R2 (2 3) 1k >L1 (2 0) .333 >C1 (3 0) .167u > gnucap> print ac v(2) v(3) im(L1) ip(L1) im(C1) ip(C1) gnucap> ac 1 10k dec 2 #Freq v(2) v(3) im(L1) ip(L1) im(C1) ip(C1) 1. 0.078894 0.078894 0.037707 -0.07992 82.783n 179.86 3.1623 0.24949 0.24949 0.037707 -0.25274 827.83n 179.56 10. 0.78903 0.78899 0.037711 -0.79946 8.2788u 178.6 31.623 2.4979 2.4965 0.037753 -2.5354 82.838u 175.56 100. 7.9811 7.9375 0.038145 -8.2455 832.88u 165.76 316.23 26.293 24.955 0.039739 -32.278 0.0082805 129.37 1.K 31.662 21.844 0.015133 -91.033 0.022921 42.589 3.1623K 23.74 6.8502 0.003588 -94.519 0.02273 12.253 10.K 22.738 2.1572 0.0010867 -91.612 0.022635 3.832 gnucap> ac 100 1000 100 #Freq v(2) v(3) im(L1) ip(L1) im(C1) ip(C1) 100. 7.9811 7.9375 0.038145 -8.2455 832.88u 165.76 200. 16.39 16.04 0.039167 -17.945 0.0033662 150.2 300. 24.97 23.818 0.039781 -30.078 0.0074975 132.45 400. 32.229 29.717 0.038509 -44.253 0.012473 112.98 500. 36.363 32.2 0.034759 -58.327 0.016894 93.99 600. 37.28 31.549 0.029696 -70.014 0.019862 77.793 700. 36.337 29.286 0.02481 -78.568 0.021511 65.134 800. 34.749 26.615 0.02076 -84.448 0.022341 55.541 900. 33.119 24.079 0.017588 -88.396 0.022739 48.243 1.K 31.662 21.844 0.015133 -91.033 0.022921 42.589 gnucap> ac 477.5 #Freq v(2) v(3) im(L1) ip(L1) im(C1) ip(C1) 477.5 35.745 31.958 0.035778 -55.306 0.016012 98.081 A little warning about NGspice -- In AC, it shows phase in radians. To a professional, this is one of those trivial differences. To a beginner, the trivial can give you all kinds of grief if you are not prepared for it. _______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

