Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON...

30
Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN

Transcript of Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON...

Page 1: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

Adjoint Transient Sensitivity Analysis in Circuit

Simulation

Zoran Ilievski

22nd Nov, 2006COMSON RTN

Page 2: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

2

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 3: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

3

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 4: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

4

COupled Multiscale Simulation and Optimization

in Nanoelectronics

COMSON

• Eindhoven

• Wuppertal

• Bucharest

• Calabria

• Catania

• Infineon

• NXP / Philips

• STMicroelectronics

Page 5: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

5

COMSONMain

Objectives• Develop as Software, a Demonstrator Platform

• Coupled simulation of devices, interconnects,

circuits, EM fields and thermal effects

• WP1 - Mathematical Modelling and Analysis • WP2 - Demonstrator Platform• WP3 - Model Order Reduction• WP4 - Optimisation• WP5 - E-learning

Structure

Page 6: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

6

COMSONTU/e responsibilities – Model Order

Reduction

• Parameter analysis (BUC)

• Nonlinear circuits (WUP)

• Implementation (WUP, BUC)

WP3:Coordination by NXP

Partners

Page 7: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

7

Circuit Equations)())(())(( tt

dt

dt sxqxj

),()),,(()),,(( psppxqppxj ttdt

dt

x(t) = States j(x(t)) = Current

q(x(t)) = Charge s(x(t)) = Signal

p = some parameter

Page 8: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

8

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 9: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

9

Transient Sensitivity Analysis - TSA

A

LR

d

AKC P0

• Each circuit has an intended functionality

• Circuits are made in silicon (SoC), can be represented as a circuit diagram

• It could react to small changes in parameter values

• For example, width-length of a resistor

Page 10: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

10

TSA – Typical Problems in which parameter variation plays a role

Power dissipation

Threshold value

• Important to manage available power to realize a functionality

• Change in parameters will affect this.

• Timing in circuits is VERY important.

• Change in parameter could cause a desired functionality to perform with a delay.

Page 11: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

11

Observation Function

T

dtt0

)),,(()),(( ppxFppxG

p

pxpx

),(

),(ˆt

t

Example (power dissipation):• F, Power

• G, Energy

Sensitivity to a parameter p:

T

dtt

tt

d

d0

)),,((),(ˆ

)),,(()),((

p

ppxFpx

x

ppxF

p

ppxG

Inner Product

Page 12: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

12

),(ˆ)),,((

pxx

ppxFt

t

Inner Product Cost

F

P

N

p)p),,F(x(

p

)x(

t

t

Inner product is calculated at each time point, very expensive.

The inner product

FPNNPF,minO 2 + costs for ),(ˆ px t

The cost

Page 13: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

13

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 14: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

14

• Alternative to previous method

• Enables a cheap and clever calculation of the inner product.

• Introduction of a function λ*(t)

• λ*(t) has a related DAE that needs to be solved.

Backward Adjoint Method - BAM

(* = complex transpose)

Page 15: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

15

BAM – Inner Product Cost Reduction

T

0

**

*

*T

0

*

dp

p),ds()(λ

p

p)p),,q(x(

dt

)(dλ

p

p)p),,j(x()(λ

p

p)p),q(x(t,p)(t,xC)(λpxC

dt

dλ)G(λ

dtt

tttt

t

tdttt

t

T

0

*

ˆ),(ˆ)(

Then partial integrating

),()),,(()),,(( psppxqppxj ttdt

dt

0),()),,(()),,((

)(0

*

dt

d

td

d

td

d

td

dt

dt

T

p

ps

p

ppxj

p

ppxq

Multiply circuit equations by λ*(t) diff. w.r.t p

Page 16: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

16

T

0

**

*

*T

0

*

dp

p),ds()(λ

p

p)p),,q(x(

dt

)(dλ

p

p)p),,j(x()(λ

p

p)p),q(x(t,p)(t,xC)(λpxC

dt

dλ)G(λ

dtt

tttt

t

tdttt

t

T

0

*

ˆ),(ˆ)(

BAM – Inner Product Cost Reduction

Let λ(t) satisfy the following adjoint equation

*** )),,((

)()(

x

ppxFGC

tt

dt

td

T

dtt

tt

d

d0

)),,((),(ˆ

)),,(()),((

p

ppxFpx

x

ppxF

p

ppxG

Page 17: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

17

• is avoided by setting the initial condition (valid for DAE index =1)

• is easily found from the steady state DC condition, cheapest calculation

• Backward integration of adjoint equation enables that calculation of

),(ˆ px T

0)( T

),0(ˆ px

BAM – Inner Product Cost Reduction

*** )),,((

)()(

x

ppxFGC

tt

dt

td

)(t

Page 18: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

18

BAM – Inner Product Cost Reduction

dtd

tdt

t

dt

td

d

d

T

p

pxj

p

ps

p

ppxF

p

pxq

p

pxqx

x

pxq

p

ppxG

),(),()(

)),,((),()(

),(ˆ),(

)0()),((

**

0

00

0*

Calculate the following:)(t )(txdt

td )(

Substitution in the above will give the sensitivity.

Step 1:

Step 2:

Page 19: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

19

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 20: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

20

BAM – Steps and ImplementationForward step: Calculation of x(t)

Ttttt xxx ,...,,0

Euler-Backward application to circuit equations

p),s(p)p),,j(x()q(x)q(xΔ

1 n1n ttt

• Newton-Raphson iteration gives with Newton matrix:

• Time step control

1nx

GCt

Y

1

Page 21: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

21

BAM – Steps and ImplementationBackward step: Calculation of )(t

*** )),,((

)()(

x

ppxFGC

tt

dt

td

• Backward differential formulation

• Ideally choose same step size as forward integral, eliminates interpolation errors.

• C and G matrices are time dependent, if original circuit is linear they retain the same value at each time t. Only need to calculate them once.

x

qC

x

jG

0Tt

GCt

Y

1

Page 22: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

22

BAM – Steps and Implementation

*** )),,((

)()(

x

ppxFGC

tt

dt

td

Validation of anddt

td )()(t

Estimation of dttd )(

Δt

)tλ(t

dt

)tdλ 010

(

0t

t2Δ

)tλ(t

dt

)tdλ 1r1rr

(

Tt 0

Δt

)tλ(t

dt

)tdλ n1n1n (

Tt

Page 23: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

23

BAM – Steps and Implementation

dtd

tdt

t

dt

td

d

d

T

p

pxj

p

ps

p

ppxF

p

pxq

p

pxqx

x

pxq

p

ppxG

),(),()(

)),,((),()(

),(ˆ),(

)0()),((

**

0

00

0*

Substitution now give the sensitivities

Application of trapezoidal rule for the integral

Page 24: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

24

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 25: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

25

Results 1= 2=0.025 ohm meters

A1=A2=0.0001 meters^2

L1=0.02 meters

Ap1=1*10^-6 meters^2

d1=1*10^-6 metersCalculating for L2=0.02,0.021,0.022m

and observing the 2nd resistor

L2 dG/dp 1*10^-10

0.02 -0.235

0.021 -0.247

0.022 -0.256

Page 26: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

26

Overview

• Introduction (circuit analysis, COMSON)

• Transient Sensitivity, the direct approach

• The backward adjoint method

• Implementation

• Results

• Conclusions and further work

Page 27: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

27

)(tCalculation of

23 FNONO

Conclusions and further workHow fast is the adjoint method?

FPNNPF,minO 2

Original cost of inner product

Calculation of modified integral

FPPNO

Page 28: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

28

Conclusions and further work• If the circuit description is linear, BAM is immediately

attractive, only one LU decomposition is carried out.

• Remaining main burden is the O(N^3) LU decomposition in the backward integration for non-linear circuits where the time-varying C+G matrices force an LU decomposition at each time step.

• Noticing the output r = F x P << N this suggest a model order reduction approach could be taken for non-linear circuits.

Page 29: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

29

• In MOR we are looking for a matrix such that

• Which we can then use to reduce C & G

• Which MOR method could we use?

RNV xVx ~

Conclusions and further work

*** )),,((

)()(

x

ppxFGC

ttVV

dt

tdVV TT

Page 30: Adjoint Transient Sensitivity Analysis in Circuit Simulation Zoran Ilievski 22 nd Nov, 2006 COMSON RTN.

30

• Proper orthogonal decomposition is ideal

• POD requires snap shots of the output of a system, which we have.

Conclusions and further work

0tx 1tx 2tx