SIMetrix 5.4 quick start

advertisement
SIMetrix 5.4 quick start
SIMetrix demo is a student version of an electronic circuit PSPICE simulator running under
Windows and use is free of charge. The limitation of the demo/student version is the
maximum number of nodes. For normal system analysis you will not reach that limit.
SIMetrix allows the basic signal
simulations: AC analysis, transient analysis
and noise analysis. For those who have no
experience with this kind of simulation
software: AC analysis gives a frequency
response (gain and phase) of the circuit for
small signal. Non-linear signal processing
like a rectifier diode is not taken into
account. Transient analysis gives the voltage
to voltage transfer for a voltage or current
versus time input signal and the effect of
non-linearity is taken into account. Noise
analysis allows the calculation of the output
noise and calculation of the contributions
from the separate sources (resistors and
active devices).
These files:
sint54.exe (16.6 MB, the simulator program)
Helpful: UserManual.pdf (4 MB) and SimulatorReference.pdf (3 MB).
Setup of the program:
Run sint54.exe
Select SIMetrix/Simplis intro
“Yes, I agree, yes, etc. You do not really have another choice”.
After install the program “SIMetrix Intro 5.4” can be found in “All programs”. Create a
desktop Icon when you plan to use this program more regularly (all programs, SIMetrix Intro,
right-mouse-click, send to desktop (create shortcut)).
Learning by doing
It is not necessary to read all the information about the program and to understand all the
options that you have. With a few percent of the knowledge about the program you can use 80
percent of the power.
First start up of the program asks for permission to connect the unique five-letter file
extensions to the SIMetrix program (advice is yes, I never experienced a problem).
First example: RC-low pass filter.
Choose “file, new schematic”. A new schematic window opens. Select a source; place the
source (one source, disable further source placing with the right mouse click). Select a
resistor, place the resistor, and rotate the resistor 90 degrees (the blue circle-arrow). Move the
resistor when necessary to the right position. Select a capacitor and place at the correct
position. Place at least one ground and connect the components.
1
Drawing a line: left or middle mouse click, toggling on/off line drawing). Now you should
have something comparable to this schematic.
1K
5
V1
R1
1n
C1
Component value editing: select the component (active
component is now blue-colored), edit the selected part
(right mouse click) and choose or type the value that you
want to give it. SIMetrix allow even your 2k2 or 2200 or
2.2e3 or 0.0022meg and modifies it to 2.2k.
Definition of the source: select the source and “enable AC”. When you forget this you have
no active source. The default amplitude is one volt. AC analysis is relative, so for this moment
it is not important to know whether this is a peak value or an rms-value. (The output has just
the same definition as the input.).
That is the schematic entry. Now select the type of analysis “Simulator, Chose Analysis”.
Select AC for analysis mode and enter the frequency range (lowest, highest frequency) and
the X-axis resolution or frequency step size, here adjusted to 1000 per decade, very high.
Alternative: “Probe, dB-voltage” gives
the output in decibel (volt/volt).
1
400m
C1-P / V
Then RUN (or F9 in the schematic
menu). To see the output you must place
now a probe on the node that contains
your signal. “Probe, Voltage” and place
on the output node, anywhere on the
wire. The output gives this plot.
200m
100m
40m
20m
10m
Placement of fixed probes for voltage or
decibel is also in the two probe menus.
1 2 4 102040 100 400 1k 2k 4k 10k 40k 200k
Frequency / Hertz
That is the basic AC simulation.
It is possible to step a component value and see the result on the transfer.
2
1M
Stepping component value
The same RC-low pass filter. Click on the resistor and press
(keyboard) SHIFT and function key 7. A text window opens.
Type {rvar} in de text window and close with the OK button.
Now open the parameter window by activating the schematic
window and pressing function key F11. Type the text line as
indicated here:
.param rvar 1k
Now the value of the resistor is fixed to the original value of 1
kΩ, but the value can be stepped. Stepping a component value
is activated via “Simulator, choose analysis, AC, enable
multistep, define”. Choose Parameter, enter start and stop value
and type of sweep (Logarithmic, linear or discrete special values that you want) and the
number of steps or steps per decade.
Then RUN (or press function key F9). Place marker (here the decibel marker is used).
dB / dB
-10
-20
-30
-40
-50
1
10
100
1k
10k
100k
1M
Frequency / Hertz
It is possible to place a fixed marker. After a run then the output screens then opens
automatically.
Shortcut for placing a fixed voltage probe: just press B and place the marker. There is no
shortcut for decibel-probes.
To clear the control window content: press shift-delete.
3
12
V1
Transient analysis
1K
R1
Place a transistor plus some components and
end-up with this circuit:
5 AC 1 0 Sine(0 200m 10k 0 0)
V2
The AC analysis of this circuit reveals the
small-signal gain and bandwidth. This result
is an AC-analysis result, given here just for
information (do not forget to activate the
“AC-enable” button of the source!).
150k
R2
1u
10k
Q1
BC548B
R3
C1
Q1-collector / V
10
1
100m
1
10
100
1k
10k
100k
1M
10M
Frequency / Hertz
Transient analysis with duration 500 µs
(enter that value in the transient analysis
window for the stop time).
“Choose analysis, transient, and 1
milliseconds”. Press F9 to run.
Input signal frequency 10 kHz and input
voltage 1 volt peak. The source V2 must be
activated (choose “Sine”).
That input voltage is an overload situation,
since due to the small-signal voltage gain
the supply voltage will limit the output
voltage. The output node (place probe) gives
this result.
10
Q1-collector / V
The coarse steps, the green plot, result from
the default time step. The finer steps in the
red plot require a manual control of the
simulator: choose advanced options in
transient analysis and set a manual limitation
of the time step (or step ceiling).
The spectrum on the collector output of the
transistor (“probe, Fourier, probe voltage
quick”). Use a longer run (10 ms) for better
6
4
2
0
100
200
300
400
Time/uSecs
500
100uSecs/div
9.947511k 20.03562k
10.08811k
10
Spectrum(Q1-collector) / V
“Simulator, choose analysis, advanced
options, modify the value for max time step
to (in this example) 1 µs”.
It is also possible to plot the waveform of
the signal on the base of the transistor and
see the distortion.
8
4.7213116
1
624.7555m
100m
-4.096556
10m
1m
100u
10u
1u
-0
10
REF
Frequency/kHertz
20
A
30
40
50
60
10kHertz/div
4
resolution. The cursor to indicate values can be toggled on and off; the position of the cursor
can be moved with the mouse position. The mouse position marker changes its shape when
approaching a cross-hair section. Then the position can be shifted to another position or
another curve. In the lower-left part of the output screen the position of the cursor is displayed
with X and Y-axis values.
The FFT-output values are peak amplitude values. The DC-value (frequency zero) is the
actual DC-value.
Arbitrary function blocks
Signal processing is also possible in behaviormodel function blocks. For example a multiplier
can be made in such a function block.
“Place, analog behavioral, non-linear transfer
function”. Enter the formula and voila, a
multiplier. Or a radio frequency mixer, because
that function can be realized with a perfect
mixer.
Formulas are allowed in the function blocks.
The formula can contain multiply or V(n1)*V(n2) as explained but also divide, add, subtract,
raise to a power, ABS, ATAN, SIN, COS, TAN, LOG (equals LOG10), LN and SQRT
(SQRT: negative values allowed and handled as positive values).
Also constants can be added and expressions containing PI.
A gain-limiter expression for voltage gain is 1000 and output saturation or clip level at –1 and
+1 is LIMIT (V(n1)*1000, -1,1). See the manual for an extensive description. Not mentioned
so far: SIMetrix contains a very powerful help (“command window, help”).
The more or less standard blocks like voltage controlled current sources and all the
variations that you can imagine are also present in the library. In fact they are all obsolete
since the Arbitrary Source covers them all and offers much more.
An example that gives the frequency transfer of a firstorder hold circuit, like a sampler or like the output of a
DAC, is given here:
v (n1)*(sin(hertz*PI/44100)/(hertz*PI/44100))
ARB1
N1 OUT
5 AC 1 0
V1
The frequency response:
1.000000k
20.17070k
19.17070k
-7.34783m
-3.226760
dbV @ ARB1-OUT / dB
0
-10
-20
-3.219412
-30
-40
-50
-60
1k
2k
4k
REF
Frequency / Hertz
10k
20k
A
40k
100k
5
And to be complete a simple
SINC correction:
v (n1)*(sin(hertz*PI/44100)/(hertz*PI/44100))
ARB1
N1 OUT
5 AC 1 0
V1
1.3k
10m
50
L2
R2
R1
simplest
33k
R10
1.2n
4.7n
C1
C2
0
-10
Response with analog low-pass filter (in
red) and without (in green):
-20
dB
-30
-40
-50
-60
-70
-80
1k
2k
4k
10k
20k
40k
100k
200k
Frequency / Hertz
Laplace functions
Laplace transfer can be inserted in a Laplace function block. Also the integration function is
part of the Laplace functions. Divide by zero at t = 0 needs to be avoided. An integrator that is
operational in AC analysis and in Transient analysis is for example 1/(s+1e-12).
Example: operational amplifier with poles at 30 Hz and 1 MHz and
an open loop DC voltage gain of 33k (for s = 0).
33k/(1+s/(6.28*30))/(1+s/(6.28*1e6))
LAP3
The phase and gain of the transfer (these probes for AC analysis can
be found under “probe AC / noise” :
Y2
Y1
-20
100k
-40
10k
-60
1k
-80
-100
-120
-140
-160
Probe1-NODE / V
Phase @ LAP1-OUTP / deg
AC 1 0 Pulse(0 1 0 500n 500n 50u 100u)
V1
100
10
1
100m
10m
10 20 40 100200
1k 2k 4k 10k20k40k 100k
400k 1M 2M 4M 10M
Frequency / Hertz
6
Experience this: add a differential input stage (non-linear function, arbitrary source, formula
V(n1)-V(n2)) in front of this Laplace open-loop gain block, feedback the output to the
inverting input and run AC and transient analysis (square wave input 20 kHz) and change in
the Laplace formula the value 6.28*1e6 in 6.28*1e5. The result (ringing or overshoot in
transient and AC) is clear and as expected. This is an entry-level feedback demonstration.
Laplace integrator bias point
There is however a problem with the Laplace integrator and transient analysis: the DC-bias
point at moment t = 0 assumes frequency zero and the gain of an integrator is infinite for that
frequency. "Skip DC bias point" is a solution for this problem.
Filters
Low-pass and high-pass filters are part of the SIMetrix library. Bessel, Butterworth and
Chebyshev can be used in a Laplace transfer. See help, index, and Laplace expression.
Example: ButterworthLP(8,1000) for 8th order low-pass filter with 1 kHz cut-off frequency.
X-Y relation graphic
Any relation between voltages, currents, time and temperature can be plotted. A simple
example is given in the figure here. The JFET transistor DC curve "drain current versus gatesource voltage" is obtained from a DC-sweep. In stead of placing standard probes, the way to
obtain the curve is: "Probe, add curve", select the Y-field and left-click while SHIFT is
pressed in the schematic on the drain of the transistor. Check the X-Y plot box, select the Xfield and left-click on the gate of the transistor. Press OK and the curve pops-up!
Add curve menu and result. The red curve is from a BF851B (see "Library: discrete
components"); the green curve is from the 2N3819. Voltages are selected by left-clicking on
the node; currents are selected with a left-click while the shift key is pressed.
So far the basics for a quick-start with SIMetrix. Have fun!
Frans Sessink, 2010 May
7
Easy to know list:
•
•
•
•
•
•
•
•
•
•
•
•
•
In command window: “file, windows, clear messages” or easier “shift-delete” to clear all
the previous error messages. There is no such message as “simulation terminated
successfully”. When you look for information in this window, you do not get the
indication that the shown error message is valid for the last simulation run or for many
runs ago.
Drawing a connection line: middle-mouse button, toggle drawing ON/OFF
A connection line under a component is difficult to remove. Choose “delete” for the
combination of component and line and place the component from scratch; that is faster
than trying to select the line or the component.
Zoom out and in with F12 and shift-F12. Fit to page with “Home”. This works for
schematic window and for output (probe-result) window.
In the output window: press F12 and then “fit width” to make headroom in the shown
curve.
Cursor option: place cursor on another curve by moving the cursor cross hair to another
curve. The cross hair can be picked up ONLY when the cursor is showing FOUR arrows.
This is only the case when placed precisely on the curve. Play with it and see it yourself.
There is a “potmeter” function. The slider position can be changed from the keyboard.
After a change, a run can be started (option; check box) and the result of the simulation
after that potentiometer-touching will be shown in the output window (fixed marker is
required).
Initial condition: connects node to predefined voltage via 1 ohm only at t = 0.
Nodeset: proposes voltage in case bias point at t = 0 is ambiguous or not found.
Once a simulation is started, it can not be stopped.
Workaround: “pause simulation”, start a new simulation. You are asked to "continue
or stop the running simulation". Choose no and the new simulation starts.
Attention: a voltage marker placed on a digital output indicates zero or one (the digital
status). When the output is connected to a resistor or an analogue function, the indication
has changed, surprise, to zero or Vcc (five volts digital supply). A digital marker,
indicating zero or one, can be used too. Any device connected to such a digital output is
however using the actual voltage; 5 volts for logic.
FFT output indicates sine-peak values. Measurement of voltages (output window, more
functions, etc) gives rms-values. Sine-wave voltage sources are defined as sine-peak
value; noise source is defined as rms-value.
Model import is easier as you have ever seen. Example: the model for an operational
amplifier like the OPA2134 can be added by copying (copy-paste or “move” the model
OPA134.MOD (3 kB text file, can be found on the TI/Burr Brown page
http://focus.ti.com/docs/prod/folders/print/opa2134.html#toolssoftware ) from the
windows explorer into the command window. You are asked to allow the component to
the library. You can use the component without program restart. Just two seconds.
-------------------
SIMetrix is an incredible versatile program. When you run into the limitations of a free demo
or student version then feel free to contact SIMetrix headquarters in Thatcham, UK. See
www.simetrix.co.uk. Newest version of the program is version 6.
8
Download