0% found this document useful (0 votes)
36 views

Computer Aided Design and Analysis of El

This document describes a computer program for obtaining symbolic transfer functions of complex electronic circuits. The program accepts both numerical and symbolic elements as input and can perform analysis of the calculated transfer function, such as Bode and Nyquist plots. The mathematical algorithm underlying the program is also briefly discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Computer Aided Design and Analysis of El

This document describes a computer program for obtaining symbolic transfer functions of complex electronic circuits. The program accepts both numerical and symbolic elements as input and can perform analysis of the calculated transfer function, such as Bode and Nyquist plots. The mathematical algorithm underlying the program is also briefly discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Computer-aided design and analysis of electronic circuits for instrumentation and

control
Victor M. Castaño, and Adolfo Bribiesca

Citation: Computers in Physics 3, 69 (1989); doi: 10.1063/1.168333


View online: https://doi.org/10.1063/1.168333
View Table of Contents: https://aip.scitation.org/toc/cip/3/4
Published by the American Institute of Physics
Computer-aided design and analysis of electronic circuits
for instrumentation and control
Victor M. Castano and Adolfo Bribiescaal
Instituto de Fisica, Universidad Nacional Autbnoma de Mexico, Apartado Postal 20-364,Mexico,
D.F. 01000, Mexico
(Received 29 January 1988; accepted JO March 1989)

A computer program for obtaining symbolic transfer functions of complex electronic circuits is
described. The program accepts both numerical and symbolic elements as input and it is
capable of performing some analysis of the calculated transfer function (Bode and Nyquist
plots, for example). The mathematical algorithm underlying the program is briefly discussed
as well.

INTRODUCTION l(s) can be obtained with the help of the transfer function
T(s) of the circuit:
Designing complex electronic networks (i.e., those which
include components such as transistors, diodes, voltage- O(s) = T(s)l(s) .
controlled current sources, and even integrated circuits)
has become an almost standard task in many experimental- Obviously, in order to be linear, T must behave as a
ly oriented physics laboratories, since the use and design of linear function, in the same sense of that oflinear algebra. 1
most modem ·experimental equipment requires a good In other words, obtaining and analyzing the transfer
knowledge of automatic control (a good example of this function T of an electronic circuit is all that is needed for
statement is the recent development of the scanning tunnel- characterizing the circuit itself (if the system is linear, of
ing microscope). Also, besides the design problem itself, it course). In principle, the transfer function can contain ei-
is extremely important to analyze, from a control theory ther numerical and symbolic coefficients for the variable s
point of view, the behavior of the resulting electronic (for example, 30s2 or C3 s, C3 being, for instance, the sym-
network, for instance, in terms of its frequency response bolic value of a capacitor in the circuit) or combinations of
under various conditions. 1•2 both. In practice, however, most algorithms for obtaining
On the other hand, given the size and complexity of an transfer functions out of big circuits (i.e., bigger than 100
actual electronic network, it is impossible to even think of nodes) work only with purely numerical values, 2 in such a
performing such design and analysis in a purely theoretical way that the typical output of one of those programs is a
basis. Thus the digital computer arises in these cases as an table containing the actual value of the transfer function for
invaluable tool for the experimentalist. The problem, how- a given frequency. Obviously, this constitutes a serious li-
ever, is that most available algorithms for performing com- mitation if a versatile circuit is to be designed because, in
puter-aided design in electronics are either limited in the many cases, some of the parameters of the circuit have to be
number and type of components they are able to handle or changed under different operation conditions and recalcu-
are very complicated and not user-friendly at all, 2 the latter lating the numerical transfer function each time a single
point being especially important for those people who are parameter has varied would be highly inconvenient and
not professionals in electronics (and most physicists are impractical.
not!). This present report describes a computer program As for the circuits containing some symbolic ele-
developed for a medium-size computer (Digital's VAX- ments, various computational approaches have been pro-
11/780), as well as some examples of the application of the posed in the specialized literature (see, for example, Ref. 1)
program to typical electronic networks. Some of the char- and, in practically all the cases, they are based in topologi-
acteristics and advantages of the algorithm in which our cal considerations about a graph associated with the circuit
program is based4 are also discussed and compared to other (the so-called tree-enumeration technique, 2-s for exam-
approaches. ple). The practical problem being, nevertheless, the enor-
mous computing time required for calculating the transfer
I. GENERAL function in circuits bigger than 100 nodes and which con-
As it is well known, the output O(s) of a linear system (sis tain more than, let's say, 30 symbolic components. 4 •5 For-
the frequency-domain variable) for a given input signal tunately, some authors have proposed some variants of the
standard topological methods that allow us to use some
"Current address: l.T.A.M., Rio Hondo I, San Angel, Mexico, D.F. 01000, Mexi-
numerical analysis type of algorithms and then enable us to
co. produce more efficient programs. Specifically, Alderson

COMPUTERS IN PHYSICS, JUL/ AUG 1988 89


and Lin's method4 offers a fast and straightforward way of TABLE I. Introduction of data to the program.
evaluating the symbolic transfer function of a big circuit
since it combines topological methods (it uses a classifica- No. Type From To Variable Value/Name
tion process similar to that of a normal tree-enumeration
I Capacitor I 2 FALSE
method) and fast numerical analysislike algorithms (the Resistance
2 I 3 FALSE
so-called parameter extraction technique 9 ) for separating 3 Resistance 3 4 TRUE
the symbolic part of the problem from the i;um~rcal o~· 56
' 4 Resistance 2 3 TRUE
reducing, by a good proportion, the CPU time m the digital 5 Source 2 4 FALSE
computer. The description of the algorithm involves a I 4
great deal of very specialized concepts related to electron-
ics and circuit theory and a detailed account has been al-
ready published elsewhere, 4-6 so no attempt to get into the
details of the method will be made at this point.

Another interesting feature is that the program offers


II. OBTAINING THE SYMBOLIC TRANSFER FUNCTION IN A to the user two choices to be utilized. If the operator is not
COMPUTER familiar with the program and has only a brief idea of the
A good program for computer evaluating symbolic trans- theory behind it, the option "RUN BY SEQUENC E"
fer functions suitable to be used in a physics lab should be should be taken at the beginning of the actual run. Then the
some of the following requirements. program decides the next step to follow according to a pre-
( 1) User-friendly, in the sense that only a basic knowl- vious sequence. On the other hand, if an expert is using the
edge of electronics must be required from the user. This program, the option "RUN BY COMMAN DS" enables
point implies both the existence of a ''.HELP" command him/her to make decisions at every step on what's next and
and a simple structure of the program itself. to change the standard sequence that the program normal-
( 2) Capable of using some of the fast algorit~ms ly follows. Also, a "HELP" command can be invoked at
th~
most medium-size modern computers have available m any time during the whole run and a tutorial is available at
their libraries (the well-known IMSL, for example). This the very beginning of each session.
characteristic would produce a transportable and fast pro- Additionally, the program allows the operator to per-
form the following analysis to the designed circuit.
gram. .
( 3) Modular, since in that way some routmes could be (1) Root locus 1 of the transfer function.
added or removed from the original program according to (2) Nyquist locus 1 which is basically a graphical rep-
the user's needs and new capabilities (more sophisticated resentation of the harmonic response of the circuit.
graphics, stability analysis, and so on) could then be easily ( 3) Bode plots. 3 The frequency response of any line~r
attached to the original program. network is indicated by plotting two curves: (a) the magm-
Accordingly, our resulting program, designed for_ a tude of the transfer gain and (b) the phase-lead angle as a
VAX-11/78 0 machine, was made in the Pascal language m function of the frequency. These curves are the so-called
order to utilize its module structure. At some point of the Bode plots.
program, some matrix operations (inverting or obtaining Obviously, the use of computer-aided design in
the determinant) were required and thus the command of science and technology is already a common tool for de-
the program was momentarily switched to BASIC (re- veloping high-quality scientific instruments and also for
member that BASIC offers a very simple way for doing automatic control applications in a modern laboratory.
matrix algebra numerically). Also, given the characteris- Creating sophisticated and powerful software for that pur-
tics of our particular computer system, some oft?e files are pose is, sometimes, not as hard at it could appear (a good
driven by routines written in FORTRA N. In this way, the example is our program, which was presented as a B.S.
advantages of three different programming languages are final project4 ). As was explained before, the program re-
utilized by our program. ported in this paper offers various very attractive features
that allow the user to design and analyze complex elec-
tronic circuits. Some negative points are yet to be corrected

TABLE II. Program results.


© @
+ + Numerator:
(S) +
Vjnput {1/g2 ){S-2.)

Denominator:
(1/g 1 )(4.S) +
{1/g 1 )(1/g2 )(S + !.) +
(llg2)(3. s + 3.) +
FIG. I. Example circuit, the values of the resistances are in ohms and the (3.S)
value of the capacitor is in Farads.

70 COMPUTERS IN PHYSICS, JUL/ AUG I 989


10K Ul2K

FIG. 2. Fourth-order Butterworth low-pass


filter used as a test for the program. As can
be observed, the circuit includes two oper-
ational amplifiers.

in the program. First of all, the program is strongly VAX 111. EXAMPLES
dependent and an effort to make it more friendly to other In order to illustrate the operation of the program, a couple
systems should be made. Second, the graphics capabilities of rather simple examples were chosen. First, consider the
included are very poor and some small modifications are circuit of Fig. 1 that appears in the original article by
needed in order to attach the program to some of the pow- Alderson and Lin4 and, as can be seen in the figure, in-
erful graphics systems available today. In any case, the ac- cludes two symbolic resistors (g 1 and g 2 ) • The reader can
tual program is obtainable from the authors and anyone
easily prove that the transfer function voutput (s)//input (s)
interested should contact them.
is equal to

voutput (s)
/input (s)

TABLE III. Introduction of data to the program.


The way the data must be introduced to the program is
shown in Table I. The table contains the sequential order of
No. Type From To Variable Value/Name the element (in our case, the circuit has five components),
the type of element (resistances, diodes, OPAM's, etc.),
1 Resistance 1 2 FALSE l.OOE + 3 and the nodes in which the corresponding element is con-
2 Resistance 2 3 FALSE l.OOE + 3 nected. The words "FALSE" and "TRUE" indicate ifthe
3 OPAM 4 3 5 TRUE GI
4 Resistance 4 10 FALSE l.OOE + 4 element corresponds to a Boolean variable (i.e., a symbolic
5 Resistance 4 5 FALSE l.23E + 4
6 Resistance 5 6 FALSE l.OOE + 3
7 Resistance 6 7 FALSE l.OOE + 3
8 OPAM 8 7 9 TRUE G2
9 Resistance 8 10 FALSE l.OOE + 4
10 Resistance 8 9 FALSE l.52E + 3
11 Capacitor 2 5 FALSE l.60E- 7 529 -
12 Capacitor 3 10 FALSE l.60E- 7 •
13 Capacitor 6 9 FALSE l.60E- 7 476 .
14 Capacitor 7 10 FALSE l.60E- 7
423
-
370
318
265

212
TABLE IV. Program results. . •
GAIN = - 46246.023438
159
. •
FREQUENCY RANGE (1---10000)
106
.• ..
• •
Numerator:
52.9
....
- ~
...- •• •
cf3) - (40913.8125)(SZ) + 0.349E-02 CJ) .., .., ..,
( l.537457280E + 09) (S) - (3.204866376E + 12)
.-.,
CD N
N
CD ai
I()
0
N
u)
8 tn
CJ)
tn
N
Denominator: I I 1
(f4) - (12856.980469))S""3) +
(3.851705958E + lO)(S 2) -
( l.l66769521E + 12)(S) + (2.195563391E + 15) FIG. 3. Bode plot (magnitude of the transfer gain versus frequency) of the
Butterworth circuit of Fig. 2.

COMPUTERS IN PHYSICS, JUL/ AUG 1989 71


OPAM's. Table III shows the data as it is introduced to the
program (notice that the user has only to type "OPAM"
·. and the program recognizes the meaning). Table IV con-
tains the results obtained from the program (gain, frequen-
cy range, and transfer function Vof Vs ) . Figures 3 and 4
show the Bode and Nyquist plots of the Butterworth cir-
FIG. 4. Nyquist diagram corre-
cuit, respectively.
Cl> '
sponding to the Butterworth filter of
..
"O
~ Fig. 2.
a.
E o .. ACKNOWLEDGMENTS
<(

~
.. The authors wish to thank Professor Miguel Jose-Yaca-
-1 man, head of the Instituto de Fisica of the Universidad
0 2 3 4 5
Nacional Aut6noma de Mexico (IFUNAM) for his sup-
log frequency (Hz l port and encouragement during the development of this
work. This work is dedicated to Professor Tomas Brody, in
memoriam.
element) or not (when it has a numerical value). The last
column in Table I has the value or the name (if symbolic)
of the element.
The results from the program are shown in Table II.
As expected, they coincide with the theoretical value of the
transfer function (see equation above). Furthermore, the
program is capable of calculating much more complicated
networks (up to I 00 node circuits) that include transistors, REFERENCES
diodes, and operational amplifiers (OPAM's). The trick I. R. P. de la Barriere, Optimal Control Theory (Dover, New York, 1967).
2. L. 0. Chua and P. M. Lin, Computer-aided Analysis ofElectronic Circuits: Algor-
for doing so is rather simple: one only has to model those ithms and Computational Techniques (Prentice-Hall, Englewood Cliffs, NJ,
elements as a series of capacitors, resistances, and depen- 1975).
dent current and voltage sources in the standard procedure 3. J. Millman and C. C. Halkias, Integrated Electronics: Analog and Digital Circuits
and Systems (McGraw-Hill Kogakusha Ltd., Tokyo, 1975).
familiar to electronics experts. 3 Then, by storing the data in 4. G. E. Alderson and P. M. Lin, IEEE Trans. Circ. Theory CT-20, 43 ( 1973 ).
a special file, the operator of the program has only to type, 5. A. Bribiesca, B.S. thesis, Universidad Iberoamericana, Mexico City ( 1987).
6. A. Bribiesca and V. M. Castano, to be published in Ciencia (Mexico City).
for example, the word "Diode" and the program knows 7. V. M. Castano and A. Bribiesca, Proc. Int. Conf. Comput., Mexico City (in
what to do in that case. press).
The second example is a fourth-order Butterworth 8. B. Carre, Graphs and Networks, Oxford Applied Mathematics and Computing
Science Series (Clarendon, Oxford, 1979).
low-pass filter 3 with a cutoff frequency of I kHz (Fig. 2). 9. R. L. Burden, J. D. Faires, and A. C. Reynolds, Numerical Analysis (Prindle,
This example is interesting since the circuit includes two Weber& Schmidt, Boston, 1978).

72 COMPUTERS Ill PHYSICS, JUL/ AUB 1988

You might also like