You are on page 1of 14

Introductory Exercise Using the Saber Simulator

R.E. Betz
School of Electrical Engineering and Computer Engineering
The University of Newcastle, Australia
Created: July 21, 2000
Last modied: March 19, 2002
Generated: March 19, 2002

Introduction

Saber1 is a software simulation program. Its main attribute is that it allows


the simulation of mixed mode systems i.e. one can have continuous time
analogue circuitry, digital circuits, continuous and discrete time transfer functions, magnetic systems (such as electrical machines and magnetic actuators),
mechanical systems, and hydraulic systems all in the same simulation. This is
unusual since most simulation packages cannot readily handle this mix of systems. They tend to be more specialised i.e. only for electronic circuits, only
for power systems, digital simulation packages etc.
Simulation packages are very useful for the simulation of electronic systems,
since the models of electronic components behave nearly the same as the actual
component. In some circumstances simulation is almost mandatory, since a
poor design can result in immediate catastrophic failure of the real circuit. An
example where this is often true is in the area of power electronics.
The Saber simulator consists of four major components:
SaberSketch: This provides a means to graphically enter a schematic to
be simulated.
SaberGuide: To some degree this component is hidden, since it provides
the connection between SaberSketch and the Saber Simulator.
Simulator: This module is the actual simulation engine. It is activated
via SaberGuide.
SaberScope: This is the back end postprocessing section of the Saber
system. SaberScope allows the user to process the les produce by the
Saber simulator and produce new les of results, but more importantly it
allows the user to generate graphs of the results.
In this introductory exercise we shall be using the Saber simulator for circuit
simulation. The circuit to be simulated is a very simple one, but it is able to
demonstrate many of the features of the software. In order to minimise the
1 Saber

is a registered trademark for Avant!

vd

vL

vR

vS

Saber ground
node
Figure 1: Simple single phase, half wave rectier, with an LR load.
simulation times we shall be using idealised components from the Saber parts
library. If one wanted to work out the power dissipation in semiconductor
components then the more realistic real component libraries would have to be
used, but use of these makes the simulation times considerably longer.
The circuit to be simulated is shown in Figure 1. It is a simple single phase
half wave rectier circuit. The only complication is that it has a load that
includes inductance.

Circuit Schematic Capture

The rst step in the circuit simulation process is to capture the circuit schematic.
This is achieved by using the SaberSketch section of the Saber suite. Figure 2
shows the initial screen that appears when SaberSketch is invoked (via the Start
menu).2
The sequence of steps to follow to set-up a design are as follows.
Create the design: This is achieved by selecting the FileNewDesign pulldown menu. If we wanted to open an existing design then one would use
OpenDesign, and then navigate to the desired le. Often if SaberSketch
starts it will load the last design le automatically.
2 The drawing area is shown in white in this gure. This has been done to prevent toner
wastage when this document is printed.

{
Zooming
controls

Grid
control

Select to
draw a line

Invoke SaberGuide

Parts
menu

Figure 2: Initial screen upon invoking SaberSketch.


Place parts on the schematic: The next step is to place the desired components on the blank schematic. The is achieved using the Parts Gallery
button. When clicked-on this opens up another window which allows one
to select the parts folder to be used. The folder that you will use for this
exercise is the Analogy Parts Library. If one double-left-clicks on this then
the contents of the Available Categories window will change to a selection
of component categories. One can select a category, eventually ending up
with a listing of individual parts in the Available Parts list scroll window.
An example of this window is shown in Figure 3, which shows the content
of the Inductors & Coupling component category.
To place a component in the schematic one selects a particular component
from the Available Parts window and then click-on Place. The component
will then appear in the middle of the schematic window. An alternative
is to left-click-on the part and then go the to schematic window and click
the middle mouse button (if there is one).3
One can also access the Parts Gallery via using the right mouse button
selecting Get PartsParts Gallery, or from the Schematics main menu.
As a specic example, if we want to place a diode on the schematic
then one navigates to the Analogy Parts LibraryElectronicSemiconductor
DevicesDiodes category. From the Available Parts window select the
3 Only

works if a mouse driver that recognises the middle mouse button is installed.

Figure 3: An example of a parts gallery screen.


Diode, Ideal (PWL) component and then press Place. If you look at the
schematic you will nd a green diode in the middle of it. The green colour
indicates that the component is selected. If a component is selected then
it can be dragged around the schematic to position it where one likes by
moving the cursor pointer over it (the component then changes to red),
pressing the left mouse button, and then dragging to the desired location.
Set a parts properties: Once a part is on the schematic then its properties
can be set. This is carried out by double-left-clicking on the part (one can
also get the properties of the part by right clicking and then selecting the
Symbol Properties on the drop-down menu). One can also obtain help on
a part by selecting the Help drop-down menu from the properties screen.
The Help explains the meaning and range of values for all the properties
listed for the part.
The properties window contains three columns Property Name, Property
Value and a set of round buttons on the right that denote the visibility of
the property on the schematic. The latter two of these can be altered by
the user. The Property Value elds can contain undef, or *req*. The undef
eld usually means means that the value is undened, but the part will
execute correctly with some underlying default value. However, in many
cases this does not make sense. For example the resistor component has
undef for its value, and clearly one would wish to set the value of a resistor
in a particular circuit. If an undef value has to be dened the simulator
will let you know when you try to run the simulation. The *req* eld
means that there are no default values dened, and it is mandatory to
dene a value. The values of the components can be entered in two main
4

number formats. Saber uses a set of multiplier factors which are shown in
Table 1. One can of course use whole numbers, and also scientic notation
if desired e.g. 25e-4 for 0.0025.
It should be noted that the ref property name contains a unique name for
the part on the schematic. Sometimes if a part is copied on the schematic
this name is not changed appropriately (this appears to be a bug in the
software). Therefore one gets duplicate part references, and consequently
the simulation fails. One has to manually change the ref name if this
occurs.4
The visibility eld allows one to nominate whether the property value (the
visibility button is half on), or the property name and property value (the
visibility full on), are to be displayed on the schematic. If the button is
o then nothing about that property is displayed on the schematic.
In a manner similar to the placement of the diode all the other components
are placed on the schematic. The wires that join the components are drawn
by moving the cursor over one of the component node points. The cursor
will change to a cross-hair and pressing and holding the left mouse button
will allow a wire to be drawn. There is a grid that wires and components
lie on, which makes drawing the lines very simple. If for some reason the
cursor does not change (for examples one is drawing a line not connected
to a component, then the wire drawing tool can be selected (see Figure 2).
A wire which does not terminate on a component node can be terminated
by double-left-clicking at the point where one wishes to stop the wire.
Place a Saber ground node: A schematic must contain a ground reference
designator for the simulator to be able to function. This symbol is called
Ground (Saber Node 0) in the parts library. This ground symbol can be
located in a number of places in the parts library tree. The ground is
connected to the point in the schematic from which all the voltages in the
design will be measured.
Wires: We have already mentioned how to draw wires on the schematic. One
can also select a wire and delete it by pressing delete on the keyboard, or
right clicking and selecting Delete Wire on the drop-down menu. One can
also alter the properties of a wire by right-clicking on the selected wire
and selecting Attributes... on the drop-down menu (see Figure 4 for an
example of the Attributes... window). For example, one can change the
name of a wire in the Name eld in the window, and then select whether
this name should be displayed on the schematic (which is often very handy
for documentation reasons).
Repeat the above steps until the complete circuit shown in Figure 1 has
been drawn. At this point we are now ready to start the simulation phase of
the exercise.
4 A part can be copied by selecting the component and then moving the cursor to the
place where one wishes to have the duplicate component, and then clicking the middle mouse
button.

Name
femto
pico
nano
micro
milli
kilo
mega

Scientic Notation
1015
1012
109
106
103
103
106

Saber shortcut
f
p
n
u
m
k
meg

Table 1: Number magnitude speciers in Saber

Executing the Transient Analysis

In order to carry out the simulation of a design one now has to invoke the
simulator. This is achieved by pressing the SaberGuide button (see Figure 2).
One then gets the screen shown in Figure 5. Note the new toolbar at the top
of the screen. This toolbar allows one to control the Saber simulator from the
SaberSketch window.
The main tool used in SaberGuide is the DC/Transient button shown in
Figure 5. If one clicks on this button then the window shown in Figure 6
appears. The parameters circled should be lled out so that the end time and
time step of the simulation are set-up, and the simulator will automatically open
SaberScope upon the completion of the simulation. One can see that there are
a number of other tabs on the window. In more sophisticated simulations some
of these may have to be used. The only other one that we shall look at in this
simulation is the Input Output tab, which is shown in Figure 7. The circled
quantities have been altered from the default values. These alterations cause to
simulator to save all the signals in the design, and all types of variables (across
variables (i.e. voltages) and through variables (i.e. currents)).
Remark 1 One can also select specic signals for the simulator to save. This is
essential in large simulations otherwise the output les produced by the simulator
are huge. The signals can be selected using the Browse Design... selection from
the Input OutputSignal ListSelect sub-menu. Note that the simulator has
to be running to carry out this function, therefore it is necessary to start a
simulation and stop it (using the Stop button), and then reenter this menu to
carry out this function.
Once all this information has been lled out then one simply clicks OK at the
bottom of the window and the simulation will begin. It rstly netlists the design,
and if this is successfully completed it will work out the dc starting condition,
and then nally start the transient analysis. A rotating icon in the top right
corner of the Saber window indicates that the simulator is running. When it
nishes, which is very fast in the case of this simulation, the simulator will
automatically open up SaberScope to allow the results of the simulation to be
post-processed.

Figure 4: The wire attributes window.

Plotting and Processing Results

If SaberScope has not been set to automatically open then it can be opened
manually via the ResultsView Plotles in Scope... menu item.
If SaberScope opens automatically it loads the plot le just generated by the
simulator (because of the setting made in the DC/Transient screen), and then
displays the plot le opened in the Signal Manager window, and the signals in
this plot le in a second window named after the plot le. The SaberScope
opening window is shown in Figure 8.
Notice in the Diode LR cct.tr signal window that some of the signals have
a + next to them. This means that if one double-left-clicks on them then
another more detailed signal list will expand from this root. One can then
select one of these signals to plot, and then left-click the Plot button. Figure 9
shows the inductor component expanded, and the i(m) signal plotted.
Remark 2 From Figure 9 one can see the advantage of naming signals with
meaningful names, as opposed to the default names given to the signals by Saber.
The default names in the signal list window do not make much sense. When
one is scanning through the signal list for complex designs, it is much easier to
nd the signals/components of interest if the names make sense.
If one wishes to plot a number of variables, then left-click the desired signals holding down the Ctrl key on the keyboard, and then left-click Plot. The
selected signals will all be plotted on separate axes. One can also superimpose
several plots on the one set of axes. This can be achieved in two dierent ways,
7

DC and transient
analysis button

Figure 5: An example of SaberSketch with the Saber guide toolbar activated.


dependent on whether one has already plotted the signals on separate axes. If
one wishes to plot two signals on the same axis then select one of the signals
and plot it, and then select the other, and go the the plot window and press the
centre mouse button over the graph upon which one wishes the second signal
to be plotted.
The other way of plotting two or more signals on the same axis, is to rstly
plot the signals on separate axes, and then use the Stack Region feature. This
is activate by selecting one of the signals to be stacked on the same axis (this
is achieved by placing the mouse cursor over the signal name to the right of
the plot the plot will go red, and then left-click), and then right-click and go
the drop-down sub-menu Stack Region. At the bottom of this yout one can
see a number of Analog signals listed (the number dependent on the number
of signals plotted on the graph window), with Analog 0 being the one at the
bottom of the graph window. Select the analog signal number that corresponds
to the axis that one wishes to plot onto.
If one plots a signal and wants to delete it, then select the signal in the graph
window, and then right click to get the drop-down menu and select the Delete
Signal option.

4.1

Manipulating Results

One of the very powerful features of the SaberScope system is its ability to
perform calculations on the results of the simulation, and also to take accurate
8

Changed fields

Figure 6: An example dc/transient simulation set-up window.


measurements on the waveforms produced.
Let us rstly consider the calculation capability. The waveform calculator
allows one to subtract, add, multiply, divide, and perform a number of other
manipulations on signals. The calculator is activated by pushing the Calculator button at the bottom of the screen. The signals that one wishes to carry
out the calculations on are selected by left-clicking them in the signal window,
and then middle clicking in the area just below the toolbar in the calculator.
The signal name should appear in this window and the scrolling window immediately below it. The calculator works using reverse polish notation (like a HP
calculator), therefore before selecting an operation we need to select the two
signals to operate on.
In the example shown in Figure 10, we have selected the inductor voltage
(vl) and current (i), and then selected the multiply function of the calculator (*)

Changed
variables

Figure 7: The input-output table of the dc/transient analysis window.


i.e. we are working out the instantaneous power ow into the inductor. The
result then appears in the top window of the calculator. We can then plot this
result by left clicking the small graph icon at the extreme left of the calculator
toolbar.
In order to look at a waveform in more detail one can expand the horizontal
or vertical axis by simply selecting the axis by left-clicking, and then holding
down the button to extend a yellow bar along the region of the axis that one
wishes to expand. One can do this more precisely by right-clicking on the axis
of interest and then using the drop-down menu to carry out a more precise
numerical expansion of the axis (or alternatively go back to the original axis
scaling).
In addition to expanding the axes using the mouse cursor, one can also
zoom in on the waveforms by simply clicking the mouse over the section of the

10

Figure 8: The initial SaberScope window.


waveform of interest, and then dragging out a square marque over the area.
This area will then be zoomed on the plot.
All plotted curves have properties that can be altered. This is achieved by
selecting the plot of interest, and then right-clicking and selecting Attributes....
The contents of the resultant window are self explanatory.
The other major facility that is of use for processing plots is the measurement
tool. This is activate by left clicking the Caliper button at the bottom of the
SaberScope screen. This tool allows one to measure the precise absolute values of
the quantities on the screen, rise time of steps etc. There are too many features
to document here, so it is suggested that you have a look at the features, and
try them to see what happens.

4.2

Fourier Analysis

The Fourier Analysis facility allows one to get frequency response plots for data
produced by the simulator. A Fourier Analysis can only be performed after the
simulator has run, and therefore falls into the post-processing category.
In order to perform a Fourier Analysis one must rstly return to the SaberGuide window (dont close the SaberScope window, simply iconise it to keep
it out of the way). The following steps are carried out to perform a Fourier
Analysis on a periodic waveform.
1. Select the AnalysesFourierFourier... menu.
2. The left window in Figure 11 will show up. I have lled in some values
for this window. The Fundamental Frequency of the output waveforms is
known as it was set by the frequency of the sine wave source in the circuit.
The 80 millisecond time next to the Period End dialogue indicates that we
11

Figure 9: A signal plotted in SaberScope.


are to analyse the period of the output ending at 80 milliseconds. Finally
the Number of Harmonics stipulates the maximum number of harmonics
that that analysis will calculate.
3. Another tab in the Fourier window is the Input Output tab. Its contents
appear as the right window in Figure 11. In this case I have set the Signal
List to be /... which means all signals, and the Include Signal Types is set
to all, meaning that through and across variables are to be included.
4. Finally we left click OK or Apply and the Fourier analysis is carried out
on the signals selected.
Remark 3 If one is analysing a non-periodic waveform or a pulse then the Fast
Fourier Transform option should be used.
In order to plot the results of the Fourier analysis go back to SaberScope
and via the Signal Manager window open a le dialogue. One should see a new
le with a fou.ai pl extension. Click on this le and click on Open. Another
signal list box should open with the signals listed for which frequency data is
available. These signals can then be plotted in a fashion similar to the time
domain signals.

A Practice Exercise

In order to test your understanding of the above concepts it is suggested that


you carry out the following on the circuit of Figure 1. I suggest that you dont
blindly carry out the simulation, but try and understand what you are seeing in
12

Figure 10: An example of a waveform calculation in SaberScope.


the results. For a simple circuit, it has surprising results, and you might learn
something!
1. Execute the simulation and plot graphs of vs , vR , vL and i.
2. Measure the average and rms load current from the plots.
3. Measure the average voltage across the inductor, and try and explain the
result.
4. Measure the voltage across the diode. What is the maximum reverse
voltage it is subject to?
5. Plot graphs of the power dissipated in the load and the energy stored in
the inductor. Measure the average power dissipation.
6. Measure the ac source power, and compare this value with the value dissipated in the load resistor. Why is there a discrepancy?
7. Perform a frequency analysis of the rectier output voltage and current.
Why is the spectrum of the current dierent from that of the voltage?
8. Replace the load resistor with a 300 volt dc source. Plot vS , i and vL . Note
that current only ows for part of the half cycle of the voltage supply. Note
where the peak current occurs.
9. Measure the average and rms values of the load current and voltage. Also
measure the average power transferred to the load. Note that the average
load power is now the product of the average current and average load
voltage.
13

Figure 11: Fourier analysis dialogues in Saber.


10. Perform a frequency analysis of the load current and voltage, and compare
the results with the resistive load case.
If the above exercise is carried out successfully then you should have a good
preliminary working knowledge of the operation of the Saber simulation system.
There are many other aspects of the system that we have not considered you
will need to know these for more sophisticated simulations.

Acknowledgment
This tutorial is partially based on a Saber tutorial written by Dr. B.J. Cook of
the Department of Electrical and Computer Engineering, University of Newcastle, Australia.

14

You might also like