# SCEPTRE: Simulation of Nonlinear Electrical Circuits

SCEPTRE is an automatic circuit analysis program capable of determining initial condition, transient, frequency and steady-state response of electrical networks and dynamic systems. It is considered a general-purpose tool for engineers and can be used to assist in the design and analysis of various circuits. The problem of interest is described in a free-format, easy-to-learn, engineer-oriented language. The basic set of network elements consists of linear and nonlinear resistors, capacitors, inductors, voltage and current sources, and mutual inductances.

In addition, SCEPTRE has a “Defined Parameter” mode allowing it to solve state equations, which might be written to describe non-electrical systems. This outstanding feature allows the user to couple electrical networks with differential equation systems giving a great deal of versatility, especially for interdisciplinary problems like mechatronics.

If the problem of interest cannot be described by the built-in functions, the user can describe his problem as an ultima ratio via a FORTRAN program. The program uses the state variable method. Other highlights are the model library, reruns with automatic varied network quantities, extended DC options (sensitivity, worst-case, Monte Carlo, optimization), and several integration routines for accurate and fast solution of even “stiff” problems.

To give the uninitiated some idea of the input data required to accommodate a simple but practical problem, consider the electrical schematic of the Darlington pair in Figure 1. The SCEPTRE version of the circuit appears in Figure 2 with the assumption that a transistor equivalent circuit named 2N706A has been stored in the model library at some previous time.

The problem is to determine the output voltages across R3 and R4 and the power requirements of this circuit under nominal conditions and after the current gain of the first-stage transistor has been degraded to various levels. Defined Parameters will be used to calculate the power consumption (PEC, PEIN). The rerun feature accommodates the additional runs required for the degraded alpha version (P1T1). The SCEPTRE input is shown in Listing 1.

This section describes the preparation of circuits and the basics of the circuit description language for better understanding of the examples.

**Circuit Preparation**

Assuming the user wants to analyse an electric circuit, the following steps should be considered:

Draw an equivalent circuit consisting of resistors, capacitors, inductors, mutual inductances, voltage sources, current sources or models containing these elements. All of these elements may be linear or nonlinear.

Assign to each node an arbitrary alphanumeric name.

Give each element in the circuit a unique name, where the first character classifies the component according to Table 1.

Choose a consistent set of parameter units. SCEPTRE assumes no set of units for the element values. It operates directly on the numbers supplied by the user. For numerical reasons, users should select a set of units so that the voltage and current responses expected in the solution are as close to unity as possible. A consistent set of units is one which satisfies the following equations simultaneously: U = I R, t = R C = L/R.

Choose an arbitrary current flow in each passive circuit element, indicate the direction of positive current flow in each current source and voltage source.

SCEPTRE statements are entered under major headings and subheadings. The most important headings used are the following:

MODEL DESCRIPTION CIRCUIT DESCRIPTION ELEMENTS DEFINED PARAMETERS OUTPUTS FUNCTIONS RERUN DESCRIPTION END

The actual problem is described under the major heading
**CIRCUIT DESCRIPTION**. For the temporary
definition or permanent storage of models, the corresponding input
data go under the heading **MODEL DESCRIPTION**. The
**RERUN DESCRIPTION** heading is always used
whenever the rerun feature is exercised. All changes to the master
network must appear under this heading.

The network topology of a circuit must be written under the
subheading **ELEMENTS** in the general form:

element,fromnode-tonode=value

in case of mutual inductances:

M...,Lname1-Lname2=value

*value* may be a number, defined parameter,
reference to a table, mathematical expression using any intrinsic
FORTRAN function, reference to a statement function or user-defined
FORTRAN function.

Controlled sources (**E**...,
**J**...) may depend on any circuit quantity
(linearly dependent sources). Mainly for the analysis of
semiconductor devices, current sources may depend on diode tables
or built-in diode equations (primary dependent current sources) or
even on other primary dependent current sources (secondary
dependent current sources). In this way, the simulation is carried
out in a cost-effective manner. SCEPTRE determines the correct
sequence for the circuit calculation to avoid computational delays
normally introduced by these nonlinearities. The controlled sources
will run in an AC analysis without modification.

For the Monte Carlo, worst-case and optimization calculations, resistors and sources may be provided by bounds.

Mathematical expressions are entered in two ways. The direct way has the general form

Xname(mathematical_definition)

and is preferred when handling an equation, which is used only by a single reference. Using the mathematical sequence for several purposes, the equation form

Qname(par1,par2, ... ) = ( ... )

is the more efficient way. It serves as a statement function and
must be entered under the subheading **FUNCTIONS**.

The same subheading holds the table entries. Data are entered as point pairs with the independent variable in increasing algebraic order. To produce step functions, it is permissible to supply two consecutive independent-variable values that are equal but have different dependent-variable values.

Reference to an element voltage and element current is
accomplished by prefixing the element name with the single
character **V** and **I**,
respectively. These references may be used as output variables
under the subheading **OUTPUTS**, expressions,
equations, tables and defined parameters. One of the most powerful
features in SCEPTRE is the user-defined parameters under the
subheading **DEFINED PARAMETERS**. The general form
is

Pname=value

where value denotes the possible entries mentioned before. If the user specifies the time derivative

DPname=value

SCEPTRE calculates the integral:

Pname= ò DPname dt

This allows the solution of simultaneous differential equations,
which need not be coupled to any network quantity. By canonical
substitution, transfer functions to any order can be evaluated.
Thus, the subheading **ELEMENTS** is not mandatory.
For the AC analysis, the defined parameters may be complex-valued.

A variety of run controls can be entered under the subheading
**RUN CONTROLS** and used to control the simulation
to a fine degree.

**Simulation**

The simulation is carried out in two phases. In the first phase, SCEPTRE analyses the input data and, if the input statements are free of errors, generates the appropriate FORTRAN subroutines which solve the network equations. In the second phase, these subroutines are compiled and linked with modules from the SCEPTRE library and eventually with user-defined routines. Finally, the binary to be executed contains only those modules needed by the actual problem. Moreover, the working buffers are dimensioned accordingly.

During execution, the actual simulation time (or frequency in the AC analysis) with the requested output quantities is monitored (no graphics), but may be suppressed to considerably speed up the simulation. The results are written into a direct access file.

A postprocessor called NGP is available, which reads the direct access file and enables the user to select the requested quantities. NGP then calls GNUPLOT for the final graphical representation.

Despite its apparent complexity, to get full use of SCEPTRE, only a text editor is needed along with two system commands to start the simulation and the postprocessing.

**Program Organization**

It was the intention of the author to keep the organization of SCEPTRE as simple as possible without losing its power. The shell scripts for SCEPTRE and NGP, which control the flow of all actions, are kept simple, allowing the user to modify them according to his requirements. NGP comes with the source code. Thus, it is possible to adapt NGP to graphic software other than GNUPLOT. Moreover, the monitoring interface routine, which is called after each time or frequency step, is also available as source and may be modified for on-line graphics.

**Requirements and Availability**

The version of SCEPTRE now available runs under any Linux kernel. It needs a FORTRAN compiler and GNUPLOT. The X11 Window System is not required. The binaries of SCEPTRE, including libraries, NGP (source), auxiliary routines (source), English and German documentation and a set of examples are available at ftp://novilux.fh-friedberg.de/pub/sceptre_linux. The archive also contains a suitable GNUPLOT version and a FORTRAN compiler.

## Trending Topics

## Webinar

### Practical Task Scheduling Deployment

July 20, 2016 12:00 pm CDT

One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.

Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.

Join *Linux Journal*'s Mike Diehl and Pat Cameron of Help Systems.

Free to *Linux Journal* readers.

SUSE LLC's SUSE Manager | Jul 21, 2016 |

My +1 Sword of Productivity | Jul 20, 2016 |

Non-Linux FOSS: Caffeine! | Jul 19, 2016 |

Murat Yener and Onur Dundar's Expert Android Studio (Wrox) | Jul 18, 2016 |

Rogue Wave Software's Zend Server | Jul 14, 2016 |

Webinar: Practical Task Scheduling Deployment | Jul 14, 2016 |

- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SuperTuxKart 0.9.2 Released
- Doing for User Space What We Did for Kernel Space
- Google's SwiftShader Released
- SourceClear Open
- Parsing an RSS News Feed with a Bash Script

## Geek Guides

With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.

This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.

Get the Guide
## Comments

## Whoa, 10 year old post!

Whoa, I just saw the date on this post and was quite surprised. No wonder it look somewhat familiar to me, as I was in school right around that time, probably in one of my physics classes.

-Jack