![]() |
previous | back | home | next |
CACD Group updated 2006.5.18 Author Janez Puhan |
Getting startedLet us consider a simple transistor amplifier shown on figure below.![]() First we have to describe the circuit in a *.cir file. The circuit netlist can be put together with some schematic editor or it can be written in a text editor. The netlist of the simple amplifier is as follows:
When the netlist of the circuit is written (in our case the
amplifier.cir file) the circuit can be simulated. Run
SpiceOpus. The
SpiceOpus Command window will appear and the program is waiting for our
first command with prompt:
First we have to load the netlist of the
circuit into the simulator. We can do this with
source command:
We perform a dc, transient and ac analyses
with
dc,
tran and
ac commands respectively. The voltage source
v2 is swept from 0 to 1V in 5mV increments in the dc analysis. A transient
analysis from 0 to 200us with a 10kHz sine wave input is performed by
tran command. And the input frequency is swept from 1kHz to 10MHz with 25
points per decade in ac analysis:
The results are saved in a special data
structures called plots. Our three analyses just created three new plots. We can
change the current plot with a
setplot command. The results of a particular analysis can be plotted by
plot command.
To plot phase in degrees (not in radians)
the
units variable has to be set. We can see the discontinuity of the phase
when plotted. That occur because
SpiceOpus calculates phase in an [-180°, 180°] interval.
The discontinuity can be eliminated with
defining a new vector called
phase. The expression for it transfers all positive components for 360°.
At the end we will delete all plots and
free memory with
destroy command and leave
SpiceOpus with
quit command.
|
previous | back | home | next |