Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of...

Post on 17-Jan-2016

234 views 0 download

Tags:

Transcript of Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of...

Circuits TheoryCircuits TheoryExamplesExamples

Newton-Raphson Method

Formula for one-dimensional case:

Series of successive solutions:

If the iteration process is converged , the limit is the solution of the equationf(x)=0.

)k()k()k()k( xfx'fxx11

,...x,x,x )()()( 210

0)x(f

0xf )(Multidimensional case:

)k()k()k()k( xfxJxx11

where:

n

nnn

n

n

x)(f

x)(f

x)(f

x)(f

x)(f

x)(f

x)(f

x)(f

x)(f

xxx

xxx

xxx

xJ

21

2

2

2

1

2

1

2

1

1

1

)()k(

kxxxJxJ

JACOBIANMATRIX

ALGORALGORITHMITHM

STEP 0 )o(0k x STARTING POINT

STEP 1 )k()k( , xJxfCalculate

STEP 2 Solve the equation:

)()()()1()1()()(

)()1()(

,, kk xfbxxyxJA

byA

kkkkk

kkk

STEP 3 find )()1()1( kkk xyx

check STOP conditions

If the current solution is not acceptable:1kk

GO TO 1

EXAMPLE of STOP PROCEDUREEXAMPLE of STOP PROCEDURE

1

1 )( ky

2

1 )( kxf

NNoo

NoNo

k=k+1GOTO 1

YesYes

YesYes

*)1k( xx STOP

• Stop condition parameter 1

1

212

1

1

1

1 )k(

n

k

n

)k(kk xx...xxy

• Stop condition parameter

2

2121

11 k

nn

k xf...xf1kxf

2

Numerical EXAMPLESNumerical EXAMPLES

Example 1

Solve the following set of nonlinearequation using the Newton’s Method:

02

0143

01023

2

3

3

21

3

2

2

3

1

32

2

1

xxx

xxx

xxx

T321 xxx,)( x0xf

2

143

1023

2

3

3

213

3

2

2

3

12

32

2

11

xxx)(f

xxx)(f

xxx)(f

x

x

x

Starting point (first approximation):

T)0( 111x

T)0( 194)(f xCalculate:

)()(' 0xx

0 xJxf

1x1x1x

322

221

1

3

2

1x2x31

3x2x3

12x6

231

323

126

)0()1()( xfyxJ 0 where: )0()1()1( xxy

1

9

4

231

323

126

)1(3

)1(2

)1(1

y

y

y

123

9323

426

)1(3

)1(2

)1(1

)1(3

)1(2

)1(1

)1(3

)1(2

)1(1

yyy

yyy

yyy (1a)

(1b)

(1c)

3)0(

333)0(

232)0(

131

2)0(

323)0(

222)0(

121

1)0(

313)0(

212)0(

111

byayaya

byayaya

byayaya

(1a)

(1b)

(1c)

Let us assume )0(yy

3333232131

2323222121

1313212111

byayaya

byayaya

byayaya

(1a)

(1b)

(1c)

Gauss elimination computer scheme

STEPSTEP 1 ELIMI 1 ELIMINATE NATE y y11 fromfrom b i c b i c:

1y2y3y

9y3y2y3

4yy2y6

321

321

321

Multiply by

and add to 1b63

aa

11

21

7y25

y

9y3y2y3

2y21

yy3

32

321

321

1y2y3y

9y3y2y3

4yy2y6

321

321

321

Multiply by

and add to 1c61

61

a

a

11

31

31

y6

11y

310

1y2y3y32

y61

y31

y

32

321

321

New set : )()( 22 byA

)2(33

)2(332

)2(32

)2(23

)2(232

)2(22

)2(13

)2(132

)2(121

)2(11

byaya

byaya

byayaya

(2a)

(2b)

(2c)

31

y6

11y

310

7y25

y1

4yy2y6

32

32

321

(2a)

(2b)

(2c)

31

y6

11y

310

7y25

y1

4yy2y6

32

32

321

(2a)

(2b)

(2c)

Elimination scheme repeat for equations 2b i 2c:

Multiply by

add o 2c1

3/10a

a)2(

22

)2(32

370

y325

y310

32

371

y661

3

)3()3( byA

)3(33

)3(33

)3(23

)3(232

)3(22

)3(13

)3(132

)3(121

)2(11

bya

byaya

byayaya

(3a)

(3b)

(3c)

371

y661

7y25

y1

4yy2y6

3

32

321

(3a)

(3b)

(3c)

Back substitution part:

328.261

142ab

y )3(33

)3(3

3

Setting y3 to 3b:

61142

y

7y25

y1

4yy2y6

3

32

321

Multiply by

add to 3b

25

a )3(23

61142

y

6172

y

4yy2y6

3

2

321

1a )3(13

2a )3(12

328.2

180.1

115.0

y

y

y

100

010

001

3

2

1

3283

1802

8150

0

3

1

3

0

2

1

2

0

1

1

1

.

.

.

xy

xy

xy

)()(

)()(

)()(

)( 1x

Because )()()( 011 xxyy

It is the first calculated approximation of the solution.Next iterations form a converged series:

006.3

010.2

002.1)2(x

3

2

1)3(x *)4(

3

2

1

xx

ExampleExample 2 2

Nonlinear circuit having two variables (node voltages)

R 3

VS 3

R2

j1 j

4

5i

6iv

5v

6

1

2

i 3

i2

e1

e2

Data:

1)(

)(

6666

25

35555

kvedvgi

cbvavvgi

VkAd

AcV

Ab

V

Aa

VvAjAj

RR

S

11,1

,1,1,1

,3,4,1

,3,2

23

341

32

R 3vS 3

R2

j1 j

4

5i

6iv

5v

6

1

2

Nodal equations:

013

312215

2

1

jR

veeeeg

R

e S1

2 04

3

31226215

j

R

veeegeeg S

013

312215

2

1

jR

veeeeg

R

e S

043

31226215

j

R

veeegeeg S

Jacobian matrix:

2

)(2)(31

)(2

)(31

)(2)(31

)(2)(3

11

)(

212

213

21

221

3

212

213

212

21

32

kedke

eebeeaR

eeb

eeaR

eebeeaR

eebeea

RR

eJ

We choose starting vector:

0

0)0(e

4

1)( )0(ef

Calculate:

333.1333.0

333.0833.0)( )0(eJ

Applying N-R scheme:

)0()1()( efyeJ 0 where: )0()1()1( eey

4

1

333.1333.0

333.0833.0)1(

2

)1(1

y

y

hence:

6673

66721

2

1

1

.

.

y

y)(

)(

667.3

667.2)0(

2)1(

2

)0(1

)1(1

)1(2

)1(1

ey

ey

e

e

STOP CRITERIA not satisfied:

1211

1 100010 .,.,y )(

455.34

0)( )1(ef

k=k+1:

455.40333.1

333.1833.1)( )1(eJ

Second NR iteration

)1()2()1( efyeJ

where:)1()2()2( eey

46311

10

455403331

333183312

2

2

1

.

.

y

y

..

..)(

)(

hence:

8730

63502

2

2

1

.

.

y

y)(

)(

794.2

032.2)1(

2)2(

2

)1(1

)2(1

)2(2

)2(1

ey

ey

e

e

for k=7: )6()7()6( efyeJ where: )6()7()7( eey

002.0

003.0

105.6885.0

718.0225.1)7(

2

)7(1

y

y

hence:

47

2

7

1

101811

0010

.

.

y

y)(

)(

629.1

807.1)6(

2)6(

2

)6(1

)6(1

)7(2

)7(1

ey

ey

e

e

Because:

6

6)(

10653.2

10689.2)( 7ef

629.1

807.1*2

*1

)7(2

)7(1

e

e

e

e

2

6

272

712

272

711

7

10777.3

,,

eefeefef

Briefly about:Briefly about:

Iterative models of nonlinear elements

Iterative NR model of nonlinear resistor (voltage Iterative NR model of nonlinear resistor (voltage controled)controled)

vfi i i

v v

circuit

11 '' kkkkkk vvfvvfii

ki~ kG kkkk vvfii '~ kk vfG '

From NR method:From NR method:

Model iterowany opornika (Model iterowany opornika (66))

11 ~ kkkk vGii

ki~

kG 1ki 1kv

ExampleExample 3 3

Newton-RaphsonNewton-Raphson

Iterative model method

R 3

VS 3

R2

j1 j

4

5i

6iv

5v

6

1

2

i 3

i2

e1

e2

Data:

1)(

)(

6666

25

35555

kvedvgi

cbvavvgi

VkAd

AcV

Ab

V

Aa

VvAjAj

RR

S

11,1

,1,1,1

,3,4,1

,3,2

23

341

32

Scheme for (k+1) iterationScheme for (k+1) iteration

v S3

R 2

R3

j1 j4

v 5(k+1)

i5(k+1)

G5

(k)

(k)i5~ (k)

i6~ G 6

(k)

v 6(k+1)

i 6(k+1)

1

2

11

ke 12

ke

0~51

3

31

11

2

5

12

11

2

11

k

Skk

k

kkk

ij

R

vee

R

ee

R

e1

v S3

R 2

R3

j1 j4

v 5(k+1)

i5(k+1)

G5

(k)

(k)i5~ (k)

i6~ G 6

(k)

v 6(k+1)

i 6(k+1)

1

2

11

ke 12

ke

2

0~~654

3

31

11

2

6

12

5

12

11

kk

Skk

k

k

k

kk

iij

R

vee

R

e

R

ee

v S3

R 2

R3

j1 j4

v 5(k+1)

i5(k+1)

G5

(k)

(k)i5~ (k)

i6~ G 6

(k)

v 6(k+1)

i 6(k+1)

1

2

11

ke 12

ke

0~51

3

31

11

2

5

12

11

2

11

k

Skk

k

kkk

ij

R

vee

R

ee

R

e1

2

0~~654

3

31

11

2

6

12

5

12

11

kk

Skk

k

k

k

kk

iij

R

vee

R

e

R

ee

3

351

53

12

352

11

~

11111

R

vij

RRe

RRRe

Sk

kk

kk

1

2

3

3

654

356

12

53

11

11

11111

R

v

RRj

RRRe

RRe

Skk

kkk

kk

• For starting vector:

0

00

2

0

10

v

v)(v

0' 02

015

05 eegG

02

01

05 eev

1'~ 05

05

05

05 vvfii

055

05 vgi

• We calculate parameters of the models:

0' 026

06 egG

02

06 ev

0'~ 06

066

06

06 vvgii

066

06 vgi

• For nonlinear element g6:

Linear equations for the first approximationLinear equations for the first approximation::

4

1

333.1333.0

333.0833.01

2

11

e

e

667.3

667.2)1(

2

)1(1

e

e

Solution for k=1=i5

x1y11

Second stepSecond step

371.110

0

468.40333.1

333.1833.12

2

21

e

e

794.2

032.2)2(

2

)2(1

e

e

Solution for k=2

Briefly about:Briefly about:

Forward Euler Method (Explicit)

Backward Euler Method (Implicit)

Forward Euler Method (Explicit)

),( 111 kkkk txfhxx

Backward Euler Method (Explicit)

),(1 kkkk txfhxx

Backward Euler Method (Explicit) is based on the following Taylor series expansion

2

1

hdt

dxhtx

htxx

ktk

kk

),(1 kkkk txfhxx

EX A M PLE .

E

L

CR

i (t)L

t=0

Cu (t)v (t)

Cvs

HL

FC

R

VvVv CS

25.0

1

200

200)0(,100

eudt

diL C

L (1)

R

u

dt

duCi CC

L (2)

State vector:

2

1

L

C

x

x

i

ux (3)

f r o m ( 1 ) a n d ( 2 ) :

SCL

LCc

vL

vLdt

di

iC

vRCdt

du

11

11

( 4 )

o r :

SvLx

x

L

CRC

1

0

01

11

2

1x ( 5 )

,.

L

CRC

04

101050

01

1164

A

( 6 )

VvvL

S 100,4

010

B ( 7 )

I n i t i a l c o n d i t i o n s :

5.0

2001

200

0

0

0

0

2

1

Rvi

u

x

x

sL

Cox . ( 8 )

F E M :

11

11 )(

kk

kkk

h

fh

xx

xxx

Dla n=1, korzystając z wzoru (9) i uwzględniając, że V200u0u )0(CC i A5.0i)0(i )0(LL otrzymamy:

eL

1u

L

1hii

iC

1u

RC

1huu

)0(C)0(L)1(L

)0(L)0(C)0(C)1(C

(11)

F o r t h e s t e p h = 1 0 - 4 :

46.0400800105.0

15010

5.0

10200

20010200

4)1(

664

)1(

L

C

i

v

N e x t s t e p k = 2 :

44.04006001046.0

12110

46.0

10200

15010150

4)2(

664

)2(

L

C

i

v

vC(tk)

iL(tk)

Table for 10 iterations n 0 1 2 3 4 5 6 7 8 9 vC

200 150 121 104.5 95.41 90.685 88.506 87.789 87.891 88.429

iL 0.5 0.46 0.44 0.4316 0.4298 0.4316 0.4354 0.4399 0.4448 0.4497

B E M :

n1n

n1nn

h

)(fh

xx

xxx

SkCkLkL

kLkCkCkC

vL

vL

hii

iC

vRC

huv

11

11

)()1()(

)()()1()(

O r i n m a t r i x f o r m :

)e(h

)(h

n1n

nn1nn

BAxx

BuAxxx

f o r k = 1 , s e t t i n g : Vvv CC 2000 )0(

Aii LL 5.0)0( )0(

4004105.0

101020010200

)1(4

)1(

6)1(

6)1(4

)1(

CL

LCC

vi

ivv

solving in terms of )1(Cv and )1(Li :

935.164)1( Cv 474.0i )1(L

h=0.0001.

vc(tk)

iL(tk)

Example with nonlinear capacitorExample with nonlinear capacitor

• FEM

211

11

RRv

R

v

dt

dqc

S

0)0(,2,1,10 221 qqvRRVv cS

2410 qq

)410( 211

kqhqqkk

FEM stepsFEM steps

110*1.0)410( 2001

qhqq

6.1)410(1.01)410( 2112

qhqq

5811.1)410( 2889

qhqq

BEM step 1BEM step 1

)410( 2101

qhqq

0

)410(

11

11011

2

qfequationnonlinearofsolution

qqhqqf

0

)410(

1

01

2

xfequationnonlinearofsolution

xxhqxf

7655644.01

q

00 x

Using N-R method with starting point Using N-R method with starting point

)1(1)1()1()(11

' kkkk xfxfxx

1101.010 1)1( x

12)1(

011)1()( 4101.018.0 kkkkk xxqxxx

7777.0)161.0(18.01 1)2( x

7656.0)4( x

00 x

BEM step 2BEM step 2

)410( 2212

qhqq

0

)410(

22

22122

2

qfequationnonlinearofsolution

qqhqqf

0

)410(

2

12

2

xfequationnonlinearofsolution

xxhqxf

1947.12

q

after N-R procedure with new starting point

Using N-R method with starting point Using N-R method with starting point

2403.1)1( x

1947.1)4( x

7656.00 x

02)0(1

10)0()1( 410(1.018.0 xxqxxx

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.90

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6