bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/fulltext.docx · web viewmatlab...

21
International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11 Matlab Symbolic Circuit Analysis and Simulation Tool using PSpice Netlist for Circuits Optimization Ogri J. Ushie * , Maysam Abbod, and Evans Ashigwuike Electronic and Computer Engineering, Brunel University London Received 15 June 2011; received in revised form 05 August 2010; accepted 10 September 2010 Abstract This paper presents new Matlab symbolic circuit analysis and simulation (MSCAM) tool that make uses of netlist from PSpice to generate matrices. These matrices can be used to calculate circuit parameters or for optimization. The tool can handle active and passive components such as resistors, capacitors, inductors, operational amplifiers, and transistors. The transistors are converted into small signal analysis and operational amplifiers make use of the small signal analysis which can easily be implemented in a program as explained in the main work. Five examples are used to illustrate the potential of the approach. Results presented are similar when compared to PSpice simulation. This approach can handle larger matrix dimension compared to symbolic circuit analysis tool (SCAM). Keywords: Matlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit analysis. 1. Introduction There are a series of simulation software of which some are free with limited capacity or licensed. The simulators help students settle or demonstrate what they have learned from class. Some of free analog simulation software includes; Simulation Program with Integrated Circuit Emphasis (SPICE) is an open source and general-purpose analog electronic circuit simulator [1-2]. Also, Electric VLSI Design System is electronic design automation software for printed circuit board and integrated circuits [3-5]. Furthermore, gpsim is a Microchip PIC microcontrollers simulator designed for PIC circuit simulations [6]. Others include; DoCircuits is a cross-platform virtual learning system, web-based that models an instrument as well circuits used in labs to enable the student performs experiments in a virtual environment [7-8]. Also, PartSim is an easy to use and free circuit simulator that can run in a web browser [9]. In addition, SimOne is European’s leading software use for gas transport and distribution simulation and *Corresponding author. E-mail address: [email protected]

Upload: nguyenhanh

Post on 21-Apr-2018

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

Matlab Symbolic Circuit Analysis and Simulation Tool using PSpice Netlist for Circuits Optimization

Ogri J. Ushie*, Maysam Abbod, and Evans Ashigwuike

Electronic and Computer Engineering, Brunel University London Received 15 June 2011; received in revised form 05 August 2010; accepted 10 September 2010

AbstractThis paper presents new Matlab symbolic circuit analysis and simulation (MSCAM) tool that make uses of

netlist from PSpice to generate matrices. These matrices can be used to calculate circuit parameters or for

optimization. The tool can handle active and passive components such as resistors, capacitors, inductors,

operational amplifiers, and transistors. The transistors are converted into small signal analysis and operational

amplifiers make use of the small signal analysis which can easily be implemented in a program as explained in the

main work. Five examples are used to illustrate the potential of the approach. Results presented are similar when

compared to PSpice simulation. This approach can handle larger matrix dimension compared to symbolic circuit

analysis tool (SCAM).

Keywords: Matlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit analysis.

1. Introduction

There are a series of simulation software of which some are free with limited capacity or licensed. The simulators help

students settle or demonstrate what they have learned from class. Some of free analog simulation software includes;

Simulation Program with Integrated Circuit Emphasis (SPICE) is an open source and general-purpose analog electronic

circuit simulator [1-2]. Also, Electric VLSI Design System is electronic design automation software for printed circuit board

and integrated circuits [3-5]. Furthermore, gpsim is a Microchip PIC microcontrollers simulator designed for PIC circuit

simulations [6]. Others include; DoCircuits is a cross-platform virtual learning system, web-based that models an instrument

as well circuits used in labs to enable the student performs experiments in a virtual environment [7-8]. Also, PartSim is an

easy to use and free circuit simulator that can run in a web browser [9]. In addition, SimOne is European’s leading software

use for gas transport and distribution simulation and optimization [10-11]. Furthermore, CircuitLab it simulates digitally and

analog components side-by-side and gives accurate results for nonlinear circuit effects [12]. Other analogs and digital

(mixed-signal) for electrical circuit simulators are; EasyEDA is an enthusiast’s web-based tool for students, educators and

electronics engineers [13]. Falstad Circuit Simulator Applet is an electronic circuit simulator that starts up with animated

schematic LRC circuit. In it the green indicator signifies positive voltage, gray color for the ground, red for negative voltage

and moving yellow dots for current [14]. GeckoCIRCUITS is a power electronic modeling circuit simulator; with a fast

circuit simulation capability [15]. Also, Ngspice is a mixed-signal/mixed-leveled circuit simulator. It code is based on three

software packages; XSpice, Cider1b1 and Spice3f5 [16-17]. In addition, NL5 is also an analog simulator that works with

piecewise-linear components [18]. SuperSpice from AnaSoft is a circuit simulator for both board-level applications and

integrated circuit [19]. Moreover, SIMetrix is a simulator that enables engineers to simulate and design switching power

electronics systems that combine speed and accuracy in design environment [20]. Furthermore, Maple is a computer algebra

system developed and it enables users to enter mathematical notation in the traditional way [21]. Conclusively, National

Instrument Multisim includes microcontroller simulation. It can also import and export features to printed circuit board [22].

In most of this software, there is no detailed analysis of the simulation process shown during the process or most have no

access, as most optimizations cannot be performed directly with them.

*Corresponding author. E-mail address: [email protected]

Page 2: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

2 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

Symbolic circuit analysis has been applied widely in analog circuit: an interactive symbolic analysis of analog circuit [23]. It

provides analog designer with deep insight into circuit behavior than mechanical simulators do. Also, Simulated Annealing

and symbolic simulation for analog circuit design optimization is described in [24]. In addition, a tutorial overview of a

symbolic analysis applications and methods for analog circuit is presented [25]. Wambacq, et al. [26] applied approximate

small-signal characteristic of analog IC using symbolic computation. While an unified approach to an approximate symbolic

analysis of analog IC is presented in [27]. Furthermore, determinant decision diagram (DDD) with canonical symbolic

analysis of analog circuit [28] and a new approach to hierarchical symbolic analysis of analog IC through DDD is presented

and implemented [29]. However, new two-graph representation for non–admittance elements which do not require symbolic

solution in terms of familiar circuit components like resistance, and other non–admittance circuit elements like voltage and

current gain [30]. Besides, a symbolic circuit simulator implementation for topological network analysis is described in [31].

In addition, a symbolic analog circuit simulator is developed by graphic reduction approach [32]. The simulator is used to

analyze analog circuit in a frequency domain. Also, a symbolic circuit analysis application for multi-physical system is

presented as new modeling approach [33]. The potential of the approach is demonstrated on usage for modeling and analysis

of gas-pipeline nets and mixed mechanical and electrical systems.

The process of transforming electrical circuit into matrices has been tedious, and each circuit has to undergo the same

process each time a circuit has to be solved. Also in some cases transforming the equations that represent a circuit is by

human method that may result in an error or take longer time to solve a simple circuit. The existing automated method

(SCAM) [34] cannot handle some components such as BJT, and MOSFET. Also to handle circuit more than 8 by 8 matrices

tend to be very slow, required large memory and in some cases it is inefficient. Two commonly taught methods for the

formation the set of equations are the nodal analysis method and the mesh analysis method [35]. The two methods are

briefly described. Modified Nodal Analysis, which introduces algorithmic solution and also describes how to use Matlab tool

for producing a set of equations representing the circuit that can be solved symbolically [36].

2. Circuits Simulation Method

The Matlab Smbolic Circuit Analysis and Simulation (MSCAM) tool is summarized in the form of a flowchart is shown

in Fig. 1.

Copyright © TAETI

Page 3: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

3 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

Fig. 1 The proposed MSCAM algorithm

2.1. New Modified Nodal Analysis

This process follows the same approach as modified nodal analysis (MNA) but the only difference is in the conversion of

transistor to small signal analysis and also operational amplifier (Op-Amp) representation is different from the way MNA is

represented. The new operational small signal representation makes it occupy less memory, and increased speed and can

handle larger size of the matrix as compared to MNA. Detailed explanation of the approach is below.

2.2. Development Algorithm for New Modified Nodal Analysis

New modified nodal analysis (NMNA) applied to a circuit with resistors, capacitor, inductor, transistors, operational

amplifiers, independent current and voltage sources results in a matrix equation of the form:

AX=I (1)

For a circuit with p nodes, the following describe how each matrix A, X and I are formed.

Copyright © TAETI

Some element small signal module

Initialize circuit parameters

Stop

yes

noObjective function

Generate the MATLAB code

Call PSpice netlist

Symbolize variable

Start

Page 4: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

4 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

The A matrix:

A matrix is p×p and includes only known quantities, specifically the values of the passive elements (the resistors) and gain

of the operational amplifier. Element connected to ground, only appears along the diagonal; while a non-grounded appears

both on and off the diagonal summarized below.

(a) Is p×p in size, and consists of only known quantities.

(b) Have both passive and active elements

(c) Elements connected to the ground appear only on the diagonal

(d) Elements not connected to the ground are both on the diagonal and off-diagonal terms.

(e) The operational amplifier is program such that 1 is added to the operational amplifier output (i.e. A(p,p)=A(p,p)+1), and positive input is subtracted with Av while negative input is added with Av.

The X matrix: Is a p×1 vector that holds the unknown quantities (node voltage)

The I matrix:

(a) Is a p×1 vector that holds only known quantities

(b) It contains summation of current sources in a loop corresponding to node voltage. The current sources are either independent source or the one as a result of the voltage source.

(c) Matrix manipulation below is used to solve the circuit:

X=A−1 I (2)

The matrices manipulation may be complicated by hand and it is easily done and straightforward by computer and can

handle larger matrix dimension than MNA.

2.3.0 Presentation

The convention of representation obviously does not change the solution. However, the procedure described below

simplifies the formation matrices necessary for the solution of the circuit.

(a) The ground is labeled as node 0.

(b) The remaining nodes are labeled in order from 1 to p.

(c) Voltage at node 1 is refers to as v_1, at node 2 as v_2 and so on.

(d) Independent voltage sources naming is quite flexible, the naming must start with the letter "V" and must be unique from any node names.

(e) The current from a voltage source is labeled with "I1, I2 I3 and so no” while the current source as a result of the voltage source is V1/R111 i.e. voltage source over impedance. The current at a particular branch is the sum of these current sources.

2.3.1 Symbolic Presentation

Any symbol, to be use in the program has to be symbolized. The essence is for the computer to treat them as symbolic in

order to form an equation with them and enable you to perform a variety of symbolic calculations in Science and

Copyright © TAETI

Page 5: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

5 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

Mathematics. A data structure that stores a string representation of the symbol is called symbolic object [36]. As an

illustration, symbolizing a, b, c and x is as follows:

syms a b c x, however if only one letter to be symbolized the sym is singular.

2.3.2 Small Signal Analysis

The small signal analysis is the process of replacing a non-linear device with linear ones and also represents its internal

operation of the device. The small signal operation of an operational amplifier is shown in Fig. 2.

Fig. 2 Small signal analysis of operational amplifier [37]

Here because of the unknown voltage VRin it is difficult in simulation. The second option small signal analysis of an

operational amplifier explained in [26] is being used. The summary of the op amp nodal analysis detailed procedure can be

reduced to the following equations:

V out=Av(Vin+

−Vin−

) (3)

For example, if an Op-Amp has at its inputsV

in+=V 3 ,

Vin−

=V 4 and output V out=V 5 , then the node voltage is

V 5=Av(V 3−V 4 ) (4)

From equation (1),

Av Vin−

−Av Vin+

+V out (5)

From the analysis of equation (3) if the output of the Op-Amp is in n, then the matrix of A(p,p) is added with 1. i.e.

A( p , p )=A ( p , p )+1 (6)

In this case, as V

in+ is at p-2 and V

in− is at p-1, the expression is as follow:

A( p , p−1 )=A( p , p−1)+ Av (7)

Copyright © TAETI

Page 6: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

6 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

A( p , p+1)=A ( p , p+1 )−Av (8)

In other word, the output of Op-Amp is added with 1, V

in+ is added with (-Av) and V

in− is added with Av as in above

illustrated. The program is programmed in such a way that each Op-Amp is replaced with the above illustration.

2.3.3 Small Signal Analysis of Transistor

In this work, a transistor is being replace by it small signal analysis shown in Fig. 3. The values of Ro, Rpi, gm, Cmu and

Cpi are usually specified in the simulated result from PSpice. Also, MOSFET is also converted into its small signal analysis

in a similar way as shown in Fig. 4.

Fig. 3 Small signal analysis of transistor [38]

Fig. 4 Small signal analysis of FET transistor [35]

3 Existing methods

3.1 Mesh Analysis and Nodal Analysis Methods

Mesh current method also called loop current method. It is similar to branch current method in the following ways; it uses

Kirchhoff’s voltage law, Ohm’s law and simultaneous equations to find unknown currents in a circuit. It does not apply

Kirchhoff’s current law which makes it different from branch current method. It is useful to solve a circuit with fewer

Copyright © TAETI

DRAIN

SOURCE

GATE

Page 7: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

7 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

variables and less simultaneous equations and to be useful to solve a circuit without calculator [39]. Node voltage method is

used to determine unknown voltages at circuit nodes. It replaces voltage sources with equivalent current sources and resistors

values are also replaced by equivalent conductance in Siemens [40-41].

The Mesh Analysis method applies the following rules:

(a) Define each loop current with a consistent method, for simplicity all unknown currents are clockwise while all know currents follow direction from the current source.

(b) Kirchhoff's voltage law is being applied to each loop not containing a current source.

(c) Solve for unknown voltages [1].

3.2 Nodal Analysis

The following steps are usually applied when using this method.

(a) Reference node is usually labeled as 0 or the ground

(b) Name the remaining nodes (p-1 nodes) and label a current through each passive element and each current source.

(c) Apply Kirchhoff's current law at each node.

(d) The unknown voltages of p-1 are determined [42].

3.3 Modified Nodal Analysis

A circuit with p nodes with q voltage sources, the rules for modified nodal analysis is as follows [43-44]:

(a) Reference node is commonly indicated by 0 or the ground and names the remaining p-1 nodes. Besides, label currents through each current source.

(b) Give a name to the current through each voltage source. Conventionally, current flows from the high potential node to the low potential node of the source.

(c) Apply Kirchhoff's current law to each node. The current out of the node is taken to be positive.

(d) Write an equation for the voltage in each voltage source.

(e) Solve the system with p-1 unknowns.

The problem with MNA is that it is useful for circuit with only passive elements (resistors) and independent current and

voltage sources results in large size of matrix, and the way operational amplifier is being represented makes it inefficient.

4 Circuits Simulation Examples

The circuit simulation is summarized in the form of a flowchart shown in Fig. 1. In this section, four examples are

considered in order to implement the potential of the algorithm, namely Chebyshev filter, Common Emitter circuit, and

example 3 discussed with the result under section C and example 4 discussed with the result under section D.

4.1 Example 1

Copyright © TAETI

Page 8: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

8 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

In example 1, seventh order Chebyshev filter circuit used by max integrated in online tutorial titled “Minimizing

Component-Variation Sensitivity in Single Op-Amp Filters” [45]. The seventh order Chebyshev filter circuit is shown in Fig.

5 and being simulated in PSPICE and its frequency response is in Fig. 6 indicated by different line style. The circuit’s netlist

is fed to the NSCAM program to simulates the frequency response, which is the same as that of PSpice as shown in Fig. 6.

Same approach is applied to examples 2, 3 and 4.

1 6

18

U 1

O P A M P

+

-

O U T

U 2

O P A M P

+

-

O U T

U 3

O P A M P

+

-

O U T

R 1 1 1

1 6 .9 k R 2

1 6 .9 k

4R 3

1 0 k

2

V 1

1 V ac

0 V dc

C 2 1 2 0 0 p

C 1 1 2 00 p

R 6

1 6 . 9 k

R 4 95 . 3 k

1

0V 0 V

5

R 5 1 0 k

6

7 U 4

O P A M P

+

-

O U T

U 5

O P A M P

+

-

O U T

U 6

O P A M P

+

-

O U TR 716 .2 k

R 8

16 .2 k 11R 9

1 0 k

8

C 3 1 5 00 p

C 4 15 0 0 p

R 1 2

1 6 .2 k

R 10 2 6 .7 k

1 2

0V

0V

R 11 10 k

U 7

O P A M P

+

-

O U T

U 8

O P A M P

+

-

O U T

U 9

O P A M P

+

-

O U T

R 1 3

1 6 .2 k R 14

16 .2 k R 1 5

1 0 k

14

C 5 2 2 0 0 p

C 6 2 2 00 p

R 18

16 .2 k

R 1 6 1 2 .7 k

0V

0 V

R 1 7 1 0 k

U 10

O P A M P

+

-

O U T

R 1 9

4 2 .2 k

20

C 7 1 2 0 0 p

R 2 0 4 2 . 2 k

21

0 V

17

0V0

1 3

3 9

1 9

0V

V

0V

V o u t15

1 0

Fig. 5 Seventh order Chebyshev circuit [45]

Fig. 6 Seventh order Chebyshev PSpice and MSCAM frequency response curve

4.2 Example 2

Copyright © TAETI

Page 9: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

9 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

Example 2 is a common emitter circuit used to show how transistor can be converted to small signal analysis which

replaces the internal operation of the transistor. Original common emitter circuit is shown in Fig. 7 while it has PSpice

frequency response is in Fig. 8. The small signal equivalent circuit of the common emitter is in Fig. 9 and the small signal

frequency response and MSCAM simulation is shown in Fig. 10.

V 11 V a c0 V d c

R 1 1 1

1 0 0

R 15 1 .2 k

R 29 .6 k

R c2 k

C 1 1 1

5 u

0

V 21 0 V d c C L

1 uV o u t

R L3 k

R e3 0 0 C e

1 0 u

Q 2 N 2 2 2 2 A

Q 1

Fig. 7 Common emitter circuit

Fig. 8 Common emitter PSpice frequency response curve

Copyright © TAETI

Page 10: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

10 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

V 11 V a c0 V d c

R 1 1 1

1 0 0

R 15 1 .2 k

R 29 . 6 k

R c2 k

C 1 1 1

5 u

1 2

0

3C L

1 uV o u t6

R L3 kIN-

OUT+OUT-

IN+G 1

V (4 )* 6 9 . 6 mG V A L U E

C m u

2 p

R o5 8 . 3 k

5

C p i1 0 p

R p i1 .5 1 k

4R x

1 0

Fig. 9 Common emitter small signal analysis

Fig. 10 Common emitter small signal analysis PSpice frequency response curve

4.3 Example 3

Example 3 is a simple circuit that has a combination of both Op-Amp and transistor. It demonstrates how the program

can be used to implement a circuit that is made up of both Op-Amp and transistor. The circuit is shown in Fig. 11, while

its small signal analysis circuit is shown in Fig. 12. The PSpice, small signal analysis and MSCAM simulation frequency

responses are in Fig. 13. The different line styles differentiate the frequency response curve respectively. The presented

results show the potential of the proposed approach that can be used for simulation and optimization.

Copyright © TAETI

Page 11: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

11 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

U 1

O P A M P

+

-

O U T

V 11 V a c0 V d c

Q 1

0

V o u t

8

R L1 k

R 3

1 0 0

R 58 . 2 k

R 43 . 9 k

3

R 21 2 k

21

4

7R 1 1 1

1

C b

1 n

C L

1 n

5 6

Fig. 11 Example 3 circuit

IN-OUT+OUT-

IN+G 1

V (6 )* G A I NG V A L U E

PARAMETERS:G A I N = 69 . 6m

R p i1 . 5 1 k

R o58 . 3k

C m u

2 p

C p i1 0 p

6 7

U 1

O P A M P

+

-

O U T

V 11 V a c0 V d c

R 3

10 0

3

R 212 k

1

4V o u t

8

R L1 k

R 48 . 2 k

R 53 . 9 k

R 1 1 1

1

2

0

C b

1n

C L

1 n

5

Fig. 12 Example 3 small signal analysis circuit

Fig. 13 Example 3 original PSpice small signal analysis and MSCAM frequency response curves

4.4 Example 4

Copyright © TAETI

Page 12: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

12 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

The example 4 circuit was used in [26] as common-source amplifier shown in Fig. 14. The small signal analysis of it was

also illustrated with the same material. Fig. 15 illustrates common source amplifier small signal analysis circuit while Fig. 16

illustrates FET amplifier PSpice and MSCAM frequency response analysis indicated with different line styles.

Fig. 14 Common- source amplifier [37]

0V

V 1

1 V a c0 V d c

R 1 1 1

5 0

R g 22 . 2 k

R g 11 k

R d2 . 2 k

1 2C 1 11

1 u

0

V o u t63

C L

1 u

R L

1 0 kIN-OUT+OUT-

IN+G 1

V (4 )* 6 9 . 6e -3G V A LU E

C g d

1 p

5

R d s5 0 k

C g s1 0 p

C d s1 p

4R x

1 0

Fig. 15 Common source amplifier small signal

Fig. 16 Example 4 Pspice small signal analysis and MSCAM frequency response

Copyright © TAETI

Page 13: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

13 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

Table 1 shows the execution time for each example and method. The original SCAM is very limited in terms of what it

can simulate which is due to the matrix dimension.

Table 1 Summary of simulation time.

Examples PSpice large

signal analysis

PSpice small

signal analysis

MSCAM matrix size

simulated in

Matlab/time

SCAM matrix size

simulated in

Matlab/time

Example 1 7th

order

0.16 sec non 21 by 21

0.025 sec

32 by 32

Unable to simulate

Example 2

CE Amp

0.05 sec 0.05 sec 0.008 sec Cannot handle BJT

transistor

Example 3

OpAmp/BJT

0.3 sec 0.3 sec 0.031 sec Cannot handle BJT

transistor

Example 4

FET Amp.

non 0.3 sec 0.01 sec Cannot handle FET

transistor

5 Optimization Result

Cascode Amplifier circuit is used to illustrate how the evolved matrices can be used in optimization. Three different

optimization tools (Fmincon-constrained nonlinear minimization, GA and PSO) are used. Fig. 17 presents the initial circuit

while Figs. 18, 19 and 20 represent the optimized Fmincon-constrained nonlinear minimization, GA and PSO respectively.

The results are summarized in Table 2.

R 11 5 k

R 3

3 0 k

R C7 5 0

R S

1

R E1 . 3k

R L5 0 k

Q 2 N 2 2 2 2 A

Q 1

C C 2

1 0 0 U F

C C 1

1 0 0 U F

V C C1 2 V d c

V S1 V ac0 V d c C e

1 0 0 U F

0

Q 2 N 2 2 2 2 A

Q 2C B

1 0 0 U F

R 21 5 k

Fig. 17 Cascode amplifier initial circuit [46]

Copyright © TAETI

Page 14: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

14 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

Q 2 N 2 2 2 2

Q 1C C 1

6 U F

C C 2

3 . 9 4 U F

C E

3 0 U F

R s

1

R 21 5 k

R C6 3 5

R 11 5 k

R E1 . 9 6 k

R L5 0 k

V 11 V a c0 V d c

V C C1 2 V d c

0

Fig. 18 Cascode amplifier using Fmincon-constrained nonlinear minimization

Q 2 N 2 2 2 2

Q 1C C 1

2 . 4 1 U F

C C 2

0 . 7 2 U F

C E

1 8 . 0 7 U F

R s

1

R 21 5 . 8 1 k

R C7 1 9

R 11 5 . 4 4 k

R E3 . 6 1 k

R L5 0 k

V 11 V a c0 V d c

V C C1 2 V d c

0

Fig. 19 Cascode amplifier circuit using GA

Q 2 N 2 2 2 2

Q 1C C 1

1 1 U F

C C 2

0 . 0 1 U F

C E

4 0 U F

R s

1

R 21 5 . 7 0 k

R C6 8 4

R 11 5 . 0 6 k

R E3 .7 0 k

R L5 0 k

V 11 V a c0 V d c

V C C1 2 V d c

0

Fig. 20 Cascode amplifier circuit using PSO

Table 2 Simulation optimization results

Circuit element

InitialCircuit

Fmincon-constrained nonlinear minimization

GA Circuit

PSOCircuit

CC2 (µF) 100 3.94 0.72 0.01RE (kΩ) 1.3 1.96 3.61 3.70RC (Ω) 750 635 719 684

CC1(µF) 100 6 2.41 11R1 (kΩ) 15 15 15.44 15.06R2 (kΩ) 15 15 15.81 15.70

Copyright © TAETI

Page 15: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

15 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 57-68

CE (µF) 100 30 18.07 40R3 (kΩ) 30 - - -CB (µF) 100 - - -

Q (2N2222) 2 1 1 1Rs (Ω) 1 1 1 1

RL (kΩ) 50 50 50 50Vac (volt) 1 1 1 1VCC (volt) 12 12 12 12

Earth 1 1 1 1Fl (Hz) 100 610 500 320

Fh (MHz) 32 30 32 32Power (mW) 22.10 36.31 21.91 21.41

Number of Components

16 13 13 13

Power change +64.3% -1% -3.2%

6 Conclusions

A new symbolic circuit analysis in Matlab which simulate larger circuit when compared to scam is presented. Result

shown demonstrates the potential of the approach. The matrices generated can be used to calculate circuit parameters or use

for optimization. The program can handle active and passive components such as resistors, capacitors, inductors, operational

amplifiers, BJT transistors and FET transistor. The potential of the tool for optimization is section 5. It shows the result

obtained when the generated matrices was applied using different optimization tools.

References

[1] L. Nagel and D. Pederson, "Simulation program with integrated circuit emphasis (SPICE)," Memorandum ERL-M382.Electronics Research Laboratory, College of Engineering, University of California, Berkeley, CA, USA, 1973.

[2] L. W. Nagel, "SPICE2: A computer program to simulate semiconductor circuits," ERL Memo ERL-M520, 1975. [3] S. Rubin, "ELECTRIC: An Integrated Aid for Top-Down Electrical Design," Schlumberger Palo Alto Research,

1987. [4] R. J. Baker, CMOS: Circuit Design, Layout, and Simulation, John Wiley & Sons, 2011. [5] G. W. Zobrist, Progress in Computer-Aided VLSI Design: Implementations, Intellect Books, 1990.[6] “Gpsim,” http://gpsim.sourceforge.net/gpsim.html . Nov 6, 2014. [7] “DoCircuits,” http://www.docircuits.com/ Nov 6, 2014. [8] “DoCircuits: An online Virtual Lab Electronics”,

http://foradian.com/docircuits-an-online-virtual-lab-in-electronics/ , Nov 6, 2014. [9] “PartsSim on Circuit Analysis Simulator by Aspen Lab,” http://www.partsim.com/ Nov 6, 2014. [10] “Simone Software System Description,” http://www.simone.eu/simone-simonesoftware.asp Nov 6, 2014. [11] http://eda.eremex.com/products/simone/features/ Nov 6, 2014. [12] “Effortless Schematics. Powerful Simulation,” https://www.circuitlab.com/ Nov 6, 2014. [13] “An Easier EDA Experience,” http://www.easyeda.com Nov 6, 2014. [14] “RF Channels,” http://www.falstad.com/circuit/ Nov 6, 2014. [15] “Gecko-Simulation,” http://www.gecko-simulations.com/geckocircuits.html Nov 6, 2014. [16] “Mixed Mode-Mixed Level Circuit Simulator,” http://ngspice. sourceforge.net/presentation.html Nov 6, 2014. [17] “NGSPICE Online,” http://www.ngspice.com Nov 6, 2014. [18] “NL5 Circuit Simulator,” http://nl5.sidelinesoft.com/index.php?lang=en Nov 6, 2014. [19] “Anasoft SuperSpice,” http://www.anasoft.co.uk/ Nov 6, 2014. [20] “Simetrix Technologies,”http://www.simetrix.co.uk/ simetrix-simplis.html Nov 6, 2014. [21] “Maple (software),” http://en.wikipedia.org/wikimaple_(software) Nov 6, 2014. [22] “NI Multisim,” http://en.wikipedia.org/NI_M ultisim Nov 6, 2014.

Copyright © TAETI

Page 16: bura.brunel.ac.ukbura.brunel.ac.uk/bitstream/2438/11484/1/Fulltext.docx · Web viewMatlab simulation, PSpice netlist, small signal analysis, electronic circuits, symbolic circuit

16 International Journal of Engineering and Technology Innovation, vol. 1, no. 1, 2011, pp. 01-11

[23] G. G. Gielen, H. C. Walscharts and W. Sansen, "ISAAC: A symbolic simulator for analog integrated circuits," Solid-State Circuits, IEEE Journal of, vol. 24, pp. 1587-1597, 1989.

[24] G. G. Gielen, H. C. Walscharts and W. Sansen, "Analog circuit design optimization based on symbolic simulation and simulated annealing," Solid-State Circuits, IEEE Journal of, vol. 25, pp. 707-713, 1990.

[25] G. Gielen, P. Wambacq and W. M. Sansen, "Symbolic analysis methods and applications for analog circuits: A tutorial overview," Proc IEEE, vol. 82, pp. 287-304, 1994.

[26] P. Wambacq, F. Fernández, G. Gielen, W. Sansen and A. Rodríguez-Vázquez, "Efficient symbolic computation of approximated small-signal characteristics of analog integrated circuits," Solid-State Circuits, IEEE Journal of, vol. 30, pp. 327-330, 1995.

[27] Q. Yu and C. Sechen, "A unified approach to the approximate symbolic analysis of large analog integrated circuits," Circuits and Systems I: Fundamental Theory and Applications, IEEE Transactions on, vol. 43, pp. 656-669, 1996.

[28] C. Shi and X. Tan, "Canonical symbolic analysis of large analog circuits with determinant decision diagrams," Computer-Aided Design of Integrated Circuits and Systems, IEEE Transactions on, vol. 19, pp. 1-18, 2000.

[29] X. Tan and C. Shi, "Hierarchical symbolic analysis of analog integrated circuits via determinant decision diagrams," Computer-Aided Design of Integrated Circuits and Systems, IEEE Transactions on, vol. 19, pp. 401-412, 2000.

[30] B. Rodanski, "Modification of the two-graph method for symbolic analysis of circuits with non-admittance elements," in International Conference on Signals and Electronic Systems (ICSES–2002).–Wroclaw-Swieradow Zdroj, 2002, pp. 249-254.

[31] W. Chen and G. Shi, "Implementation of a symbolic circuit simulator for topological network analysis," in Circuits and Systems, 2006. APCCAS 2006. IEEE Asia Pacific Conference on, 2006, pp. 1368-1372.

[32] G. Shi, W. Chen and C. R. Shi, "A graph reduction approach to symbolic circuit analysis." in ASP-DAC, 2007, pp. 197-202.

[33] R. Sommer, T. Halfmann and J. Broz, "Automated behavioral modeling and analytical model-order reduction by application of symbolic circuit analysis for multi-physical systems," Simulation Modelling Practice and Theory, vol. 16, pp. 1024-1039, 2008.

[34] E. Cheever, Symbolic Circuit Analysis in Matlab (SCAM), Swathmore Engineering (Online). Available from: http://www.swarthmore.edu/, November, 2005.

[35] J. O. Attica, Electronics and circuit analysis using Matlab, CRC Press, New York, 1999.[36] “Matlab basics and using the symbolic editor,” Unpublished.

www.tp.devry.edu/PDFs/ Matlab _Basics_and_the_ Symbolic _Editor.pdf , Nov 6, 2014. [37] L. Moura and I. Darwazeh, Introduction to Linear Circuit Analysis and Modelling: From DC to RF. Newnes, 2005.[38] B. Razavi, "Fundamentals of Microelectronics". John Willy and Sons, NJ, 2008.[39] T. R. Kuphaldt, "Lessons In Electric Circuits, Volume I–DC," Design Science, 2006. [40] G. Rizzoni and T. T. Hartley, Principles and Applications of Electrical Engineering, McGraw Hill, 2000. [41] R. J. Smith and R. C. Dorf, Circuits, Devices and Systems, John Wiley & Sons, 2009.[42] A. Theraja, ATB of Electrical Technology (Multicolour). S. Chand, 2005. [43] R. A. DeCarlo and P. Lin, Linear Circuit Analysis (Vol. 1): A Time Domain and Phasor Approach. Prentice-Hall,

Inc., 1994. [44] V. Litovski, VLSI Circuit Simulation and Optimization. Springer, 1997. [45] “Minimizing Component-Variation Sensitivity in Single Op Amp Filters,” http://www.maximintegrated.com/app-

notes/index.mvp/id/738, May 22, 2014.[46] G. T. A. Kovacs, “EE113 Course notes electronic circuits,” Stanford University, Department of Electrical

Engineering, p. 161, 1997. Unpublished.

Copyright © TAETI