Below is a *very* simple example (A RC time delay circuit) about how to use xcircuit and ngspice together for Electronic Simulation on Fedora.
There are also different methods to get the simulation done, if you think there is a better way, please do comment on it :)
Xcircuit is a UNIX/X11 program for drawing publishable-quality electrical circuit schematic diagrams and related figures, and produce circuit netlists through schematic capture. XCircuit regards circuits as inherently hierarchical, and writes both hierarchical PostScript output and hierarchical SPICE netlists.
Ngspice is a general-purpose circuit simulator program.
It implements three classes of analysis:
- Nonlinear DC analyses
- Nonlinear Transient analyses
- Linear AC analyses
Ngspice integrates Xspice, a mixed-mode simulator built upon spice3c1 (and then some tweak is necessary merge it with spice3f5). Xspice provides a codemodel interface and an event-driven simulation algorithm. Users can develop their own models for devices using the codemodel interface.
To install them on your Fedora,
yum install xcircuit ngspice
Download my xcircuit example.
open a konsole.
Design your circuit.
xcircuit fedora-xcircuit.ps &
Spice Simulation
Convert the scheme into a netlist: Netlist -> Write Spice Netlist
ngspice fedora-xcircuit.spc
Got 1 devices.
Added device: spice2poly
Got 0 udns.
Got 17 devices.
[....]
******
** ngspice-17 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Sun Sep 3 20:56:32 EDT 2006
******
Circuit: *SPICE circuit
Choose a scale to study the evolution in potential difference between the capacitor.
I chose 5 times the time constant (5xRxC=0.7755s about 1s)
ngspice> tran 0.05 1 uic
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
Initial Transient Solution
--------------------------
Node Voltage
---- -------
int1 0
gnd 0
int2 0
v1#branch 0
Warning: singular matrix: check nodes int2 and int2
No. of Data Rows : 63
tran means transient analysis which is dependent on time
0.05 is the step
1 is the duration of study
UIC means "use initial conditions"
See the graph of evolution - The charging process of the capacitor.
ngspice> plot v(int2,GND)
Monday, September 04, 2006
Fedora: Example : xcircuit and ngspice
Posted by
Chitlesh GOORAH
at
Monday, September 04, 2006
Subscribe to:
Post Comments (Atom)
3 comments:
Thanks for the great work on packing the eda tools for fedora!
On bug report:
On x86_64 systems,
ngspice puts its .cm files under /usr/lib64 and it looks for them under /usr/lib.
ngspice fedora-xcircuit.spc
/usr/lib/spice/spice2poly.cm: cannot open shared object file: No such file or di rectory
Error: Library /usr/lib/spice/spice2poly.cm couldn't be loaded!
/usr/lib/spice/analog.cm: cannot open shared object file: No such file or directory
Scott Tsai
Thanks, upstream has been notified and I'm looking at it too.
徵信, 徵信社, 感情挽回, 婚姻挽回, 挽回婚姻, 挽回感情, 徵信, 徵信社, 徵信, 捉姦, 徵信公司, 通姦, 通姦罪, 抓姦, 抓猴, 捉猴, 捉姦, 監聽, 調查跟蹤, 反跟蹤, 外遇問題, 徵信, 捉姦, 女人徵信, 外遇問題, 女子徵信, 外遇, 徵信公司, 徵信網, 徵信, 徵信社, 外遇蒐證, 抓姦, 抓猴, 捉猴, 調查跟蹤, 反跟蹤, 感情挽回, 挽回感情, 婚姻挽回, 挽回婚姻, 感情挽回, 外遇沖開, 徵信, 徵信, 徵信社, 抓姦, 徵信, 徵信社, 外遇蒐證, 外遇, 通姦, 通姦罪, 贍養費, 徵信, 徵信社, 徵信社, 抓姦, 徵信社, 徵信社, 徵信, 徵信, 徵信公司, 徵信社, 徵信, 徵信公司, 徵信社, 徵信社, 徵信社, 徵信社, 徵信社, 徵信公司, 徵信社, 徵信, 徵信, 徵信公司, 女人徵信, 外遇, 外遇, 外遇, 外遇
徵信, 徵信網, 徵信社, 徵信網, 徵信, 徵信社, 外遇, 徵信, 徵信, 徵信社, 抓姦, 徵信, 徵信社, 外遇, 徵信社, 抓姦, 徵信社, 徵信公司, 徵信, 徵信社, 徵信公司, 徵信, 徵信社, 徵信公司, 徵信社, 徵信社, 徵信社, 徵信社, 徵信, 徵信社, 徵信社, 徵信社, 徵信,
Post a Comment