21
analysis and synthesis of electronic circuits

analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

analysis and synthesis of electronic circuits

Page 2: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

linear circuit analysis

the circuit simulation problemproblem formulationgeneral solution strategy

the circuit equationscircuit theorysparse tableau approachnodal analysismodified nodal analysis

solving linear resistive circuitsgauss elimination LU decomposition

pivoting for accuracysparse matrix techniques

Page 3: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

the circuit analysis problem

the circuit topologythe circuit graph with identification

the branch relationsthe parameters of the branch componentidentification of the controlling quantitie(s)

the state of the circuitthe energy stored in the circuit

the stimuli to be appliedthe response demands

what quantities are required?what numerical accuracy is required?

Page 4: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

strategy for solving network equations

linear resistive circuit:- solve the set of simultaneous linear equations

read the circuit and and compose the set of circuit equationsread the simulation commandsinitialize the circuit solution

determine the time discretization

dynamic non-linear circuit:- solve the set of simultaneous differential equations

non-linear resistive circuit:- solve the set of simultaneaous algebraic equationsestimate the solutiondo { linearize the equations around current solution

} (no convergence)print (current solution)

while (t < t_final){

}

Page 5: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

ideal elementsresistorcapacitorinductor

voltage sourcecurrent source

coupled inductorscontrolled sources

iRv = or i = i ( v ) or v = v ( i )

[ ]dtdv

dvdCv)v(Ci +=

[ ]dtdi

didLi)i(Lv +=

+_ v ( t ) = ES ( t )

i ( t ) = IS ( t )

+_

ckk vEv =

kvcv

+

_

ckk vGi =

cvki

+

_

+_

ckk iHv =

kvci

ckk iFi =

kici

Page 6: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

kirchhoff current laws

0000

iiii

ii

iiiii

8786

6543321

====

−+++

−−+−++

+_+_1 2 3

4

1R 4R

3R

8R

37vE

6ES

5IS32vG

A i = 0

Page 7: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

kirchhoff voltage laws

00000000

eevev

eeveveveev

evev

43847

3262524213

1211

========

+−−

−++−+−

−−

A i = 0

+_+_1 2 3

4

1R 4R

3R

8R

37vE

6ES

5IS32vG0eAv T =−

Page 8: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

the complete sparse tableau

−−

−−

−−

−−

−−−−

−−−

1R1E

11

1R1R

G11R

11111

1111111

1111111

1111

1111111

87

43

21

=

00

ESIS0000000000000000

eeeevvvvvvvviiiiiiii

65

43218765432187654321

Page 9: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

the sparse tableau

=

soo

evi

OKKAIOOOA

vi

T

A is the reduced incidence matrix of the circuit graph!

there 2b+n-1 equations for 2b+n-1 unknownsb being the number of branches, n the number of nodes

works for any linear resistive networkit provides all node voltages and currentsthe tableau can be easily assembled by inspectionthe coefficient matrix is very sparse

however, sophisticated algorithms are needed to exploit sparsityand maintain sufficient accuracy, andonly few responses are of interest!

Page 10: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

nodal analysis

1 2

1R 4R

3R

5IS32vG52R

121R

1

21R1

221R1

ISe4

)ee(3

0)ee(3

)e1e(Ge1

=+−−

=−+−+

kirchhoff current equations:

with branch relations:

and node potentials substituted:

ISIS0

ee

333

3G

3G

1e Y52

1

R1

R1

R1

R1

2R1

2R1

n =

=

+−

−−++=

or in matrix notation:nodal

admittancematrix

0ISv4

v3

0v3

v2Gv1

0iii0iii

54R1

3R1

3R1

31R1

543321

=−+−

=++=−+−=++

0ISv4

v3

0v3

v2Gv1

0iii0iii

54R1

3R1

3R1

31R1

543321

=−+−

=++=−+−=++

0ISv4

v3

0v3

v2Gv1

0iii0iii

54R1

3R1

3R1

31R1

543321

=−+−

=++=−+−=++

Tv

1-in AKAKY −=

Page 11: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

from sparse tableau to nodal analysis

=

−−

IS00

evi

OYIAIOOOA

T

−=

−−

IS0

IS A

evi

OYIAIOOAYO

T

−=

−−

ISO

IS A

evi

OYIAIO

AYAOOTT

v1-

i KKY −=

sKIS 1-i=

these are exactly the nodal analysis

equations!

the sparse tableau approach cannot be less accurate or less efficient than nodal analysis

it is just a specific pivoting order!Yn has non-zero diagonal, is even diagonally dominantYn is also very sparse, though relatively less than STYn can be easily assembled by inspection

Page 12: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

assembling by inspection

=∆

..

....

k..

k..

..

....

k..

k..

..

..

Y

R1

R1

R1

R1

n

+

=∆

.

.IS..

IS..

IS

k

k

=∆

..

..

..

....G..G....

..

....G..G....

..

..

Ykk

kk

n

Page 13: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

modified nodal analysis

+_+_1 2 3

4

1R 4R

3R

8R

37vE

6ES

5IS32vG

•start with KCL•use branch relations•add missing relations

0vEvESv

0v8

i

0v8

i

0iISv4

v3

0v3

vGv1

0ii0ii0iiii0iii

37766

8R1

7

8R1

6

654R1

3R1

3R1

321R1

8786

6543321

=−=

=−

=+

=−−+−

=++=−+=+=−−+−=++

0vEvESv

0v8

i

0v8

i

0iISv4

v3

0v3

vGv1

0ii0ii0iiii0iii

37766

8R1

7

8R1

6

654R1

3R1

3R1

321R1

8786

6543321

=−=

=−

=+

=−−+−

=++=−+=+=−−+−=++

0vEvESv

0v8

i

0v8

i

0iISv4

v3

0v3

vGv1

0ii0ii0iiii0iii

37766

8R1

7

8R1

6

654R1

3R1

3R1

321R1

8786

6543321

=−=

=−

=+

=−−+−

=++=−+=+=−−+−=++

Page 14: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

modified nodal analysis

=

−−

−+−

−−++

0ES

00

IS0

iieeee

0010EE0001101000010001000000GG

6

5

7

6

4

3

2

1

77

R1

R1

R1

R1

R1

R1

R1

R1

2R1

2R1

88

88

433

331

+_+_1 2 3

4

1R 4R

3R

8R

37vE

6ES

5IS32vG

IS AAKAK Tv

1-i =−

Page 15: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

solving linear resistive circuits= solving a set of linear algebraic equations: A x = b

(A is a non-singular square matrix)back substitution:

nnnn

2nn22221nn1212111

bxu:::::bxu.....xubxu.....xuxu

=

=++=+++

1,1nn,122,11

1

1n,1nnn,1n1n

1n

n,nn

n

uxu.....xub

x

. . . . .

. . . . .

. . . . .u

xubx

ub x

−−−=

−=

=

−−

−−−

j,j

n

1jkkk,jj

j u

xubx

∑+=

−=

forward substitution:j,j

1j

1kkk,jj

j l

xlbx

∑−

=−

=)1n(n2

1 + multiplications

Page 16: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

)n(nn

)n(n,n

)2(2n

)2(n,22

)2(2,2

)1(1n

)1(n,12

)1(2,11

)1(1,1

bxa:::::

bxa.....xa

bxa.....xaxa

=+

=+++

=+++

gaussian elimination

nnn,n22,n11,n

2nn,222,211,21nn,122,111,1

bxa.....xaxa::::::::::bxa.....xaxabxa.....xaxa

=+++

=+++=+++

)2(nn

)2(n,n2

)2(2,n

)2(2n

)2(n,22

)2(2,2

1nn,122,111,1

bxa.....xa0::::::::::

bxa.....xa0

bxa.....xaxa

=+++

=+++

=+++

11,11,i

i)2(

i

j,11,11,i

j,i)2(

j,i

baa

bb

aaa

aa

−=

−=

eliminate x1, using

continue with the smaller matrices until an upper-triangular

setis obtained

n divisions

3nn3n 23 −+ multiplications

Page 17: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

pivoting

75x5.12x5.1225.6x25.1x000125.0

2121

=+=+

52

521

1025.6x1025.125.6x25.1x000125.0×−=×−

=+

9999.4x0001.1x

21

==

5x0x

21

==

75x5.12x5.1225.6x25.1

212

=+=+

5x1x

21

==

obviously all pivots have to be non-zeroif necessary, interchange rows and/or columnsthis is always possible, since the tableaux are non-

singularmore problems with STA than with MNA

interchange needed for accuracy as well!

partial pivoting: row interchange only complete pivoting: row and column

interchange

Page 18: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

LU decomposition

=

nnn3n2n1

n3333231n2232221n1131211

nn

n333n22322n1131211

nn3n2nn1

33322221

11

a....aaa:: :;::

a....aaaa....aaaa....aaa

u....000:: ::::

u....u00u....uu0u....uuu

l....lll:: ::::0....ll31l0....0ll0....00l

if we set U x = y, then we can solve A x = b byfirst solving L y = b by forward substitution,and then, U x = y by backward substitution.

IMPORTANT ADVANTAGE : LU decomposition independent of b

this means: for each right-hand side only n2 multiplications suffice!

LU decomposition itself is solving n2 + n unknowns from n2 equations:

ij}j,imin{

1ppjip aul =∑

=

Page 19: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

LU decompositionset the diagonal elements of L equal to one, and proceed:

n1n111

121211111111

aul: ::

aulaul

=

==

1n11n1

311131211121

aul: ::

aulaul

=

==

n2n121n222

23132123222212212222

aulul:: :: :aululaulul

=+

=+=+

in general:

kk

1k

1ppjipik

ik1k

1ppjkpkjkj u

ula

l ulau∑

=−

=

=−=

n.....1k,n....1ka ++

k....1,n....1u

n....

1 ,k....

1lin essence LU decomposition is just a way to do gaussian elimination

ANOTHER ADVANTAGE:LU decomposition can be done "in situ"!

it requires n divisions and multiplications 3

nn3 +

Page 20: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

sparse matrix techniques

n)1r()1c()1c)(1r(1n

1k

1n

1k

1n

1kk kkk

+−+−+−− ∑∑∑−

=

=

=

number of multiplications to solve Ax=b

the minimum fill-in problem is NP-hard

markowitz-criterion :

beware of numerical accuracy!!!

row th-k in zeros-non#crowth-kinzeros-non#r

kk

==

minimize (ri - 1)(cj -1 )in case of ties,choose the one with minimum row count

)k(kk

)k(kj

)k(ik)k(

ij)1k(

ij a

aaaa −=+

a fill-in is created in position (i,j) fif zero-non are a and a )k(kj

)k(ik

since

Page 21: analysis and synthesis of electronic circuits · analysis and synthesis of electronic circuits. linear circuit analysis the circuit simulation problem problem formulation general

data structures

− 1 137 00 3 1 00 0 2 71 2 3 5

1 2 3 4

1

5

7

9

5 1 1 3 1 2 2 1 3 1 1 4 •

7 2 1 • 2 2 2 •

1 3 2 3 3 3 •

7 4 2 • -13 4 3 • 1 4 4 • •