• No results found

GENERALISED CIRCUIT ANALYSIS PROGRAM 1 INTRODUCTION

GCAP is a general-purpose circuit simulation program. It is written in Turbo Pascal Version 5.5 and may be run on mainframe or IBM-compatible personal computers. GCAP is available on both 5.25" and 3.5" disks. The present version of GCAP contains approximately 10,000 executable statements and occupies about 2 MBytes of memory. Although this exceeds the limit of 640 KBytes of RAM inherent in MS-DOS, the use of "overlays" facilitates the development of large development projects. By this method, subprograms are loaded into memory when needed, and unloaded when not. Subprograms are used extensively (over one hundred in total) to perform a wide range of analysis, formatting and modelling functions. The program can cope with almost any component including those which may be non-linear, time-varying, and voltage- or current-sensitive. Any system that can be modelled as a collection of linear or non-linear, time-invariant or time-varying circuit elements (resistors, capacitors, inductors, independent or dependent (voltage- or current-controlled) voltage and current sources, etc.) can be analysed. GCAP has built-in models for the most common semiconductors and the user needs only to specify the relevant parameter values. These devices are the diode, BJT and MOSFET. With regard to the applicability of GCAP to the field of pulsed power, the user may define subcircuits in order to model devices. Thyratron switches, spark gaps and laser loads are examples of elements modelled by GCAP that are beyond the scope of MICROCAP. GCAP can produce four main categories of solution: non-linear DC, linear AC, non-linear transient and frequency analyses. Output data is in either tabular or graphics form.

This introduction is not meant to represent a complete guide to the use of 21

GCAP - this information can be found in the user manual . Rather, it is intended to give a brief description of the use of the program. The user interface is simple and straightforward. Interaction between the designer and GCAP is by means of three command types, namely component, analysis and structure descriptors. A descriptor is simply an input statement, the exact format of which is described in detail in Sections 2.4.2, 2.4.3 and 2.4.4. Descriptors are entered in the form of input files in any order and at any stage when running the program. For convenience, all the component and the majority of the analysis descriptors will be entered prior to program execution, whereas structure descriptors are individual statements which tend to be input at convenient stages.

2.4.2 ACCEPTABLE CIRCUIT COMPONENTS

The circuit to be analysed must first be defined to GCAP. The user need only specify element type and value, nodal connections and any relevant non-linear/time-varying data to completely describe the circuit. Component descriptors are used for this purpose and data entered as an input file (COMPON) at the beginning of the program, but they may be appended at any stage during the execution. Data is input on two separate lines, the first containing character data (to identify the element and its type) and the second numerical data (element value, nodal connections and any non-lineai/time-varying parameters). To maintain generality, the user requires no special knowledge of the computational technique to enter this information. Numbers to designate nodes must be positive integers but need not be consecutive (see Section 2.3.2). An algorithm is used to arrange this information into a form acceptable to the program.

Examples of circuit components which come within the scope of GCAP are listed in Table 2.1.

Passive components: Resistors, capacitors, inductors, independent and controlled voltage and current sources

Element Model

GCAP library: Transmission lines N pi-networks consisting of series resistance and inductance and shunt capacitance and conductance Diodes Square-law I-V characteristic

22

23

BJTs Ebers-Moir

MOSFETs Schichman-Hodges

User-defined examples: Switches, time-varying sources, flux-controlled magnetic components, voltage-controlled gas discharge devices Table 2.1. Acceptable components

Modelling of Components

Library models are sub-circuits which, in GCAP, are considered as single elements. The library contains models based on well-documented models of

22 23

predominantly semiconductor devices ’ , the model relevant to each component being indicated in Table 2.1. The user needs only to specify the relevant model parameter values to define the element. User-defined models are also entered as sub-circuits. This feature allows simulation of components such as switches and saturable magnetic devices.

The time-dependent behaviour of components is entered explicitly in the form of equation (2.8). For the purpose of GCAP, opening and closing times of switches are divided into chosen intervals. New state matrices are formulated

at each successive time step. For continuity, the final switch states at any one time are the initial states at the next time step.

Non-linear dependence may be described either analytically or in piece-wise linear form. Examples of the former are the thyratron (Chapter Three) and the saturable bypass inductor (Chapter Six). The parameters used to describe non-linear elements are listed in Table 2.2. One of the two distinct state variables must be chosen for each element.

Element Control parameter (State variable)

Capacitor Voltage, V^

Charge,

Magnetics Current, i^

(inductors, transformers) Flux, (()^

Switches Voltage, V

Current, i

Table 2.2. Control parameters for non-linear components As an example, the general form of a component descriptor is R R******* (LIN/GRA/POLAJSE) (VAR/INV)

Value NANB (Limitl) (Limit2) (Limit3) (Limit4) (LimitS) (Limit6) (Limit?)

The first character, R defines the element to be a resistor and the, second term is used to identify that element. ‘Value’ is the resistance in ohms and NA and NB are the nodal connections. This information is essential input to GCAP. Items in parentheses are optional. The first two are used to specify any

relevant non-linear/time-varying characteristics. The option LIN/GRA/POLAJSE indicates whether the resistor is linear or non-linear (GCAP-modelled graphically, polynomially or by the user), respectively. The default value is LIN. VARANV specifies whether the resistor is time-varying or time-invariant,

the default value being INV. Finally, the limits 1-7 are required to specify I

the relevant parameters if the options GRA/POL/USE (Limits 1-5) or VAR (Limits 6 and 7) are used. An example of a component descriptor is shown below:

R RBYPASS GRA