Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models...

28
A Methodology for Analog Circuit Macromodeling A Methodology for Analog Circuit Macromodeling Rohan Batra, Peng Li and Larry Pileggi Department of Electrical and Computer Engineering Carnegie Mellon University Yu-Tsun Chien Industrial Technology Research Institute Hsinchu, Taiwan

Transcript of Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models...

Page 1: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

A Methodology for Analog Circuit Macromodeling

A Methodology for Analog Circuit Macromodeling

Rohan Batra, Peng Li and Larry PileggiDepartment of Electrical and Computer Engineering

Carnegie Mellon University

Yu-Tsun ChienIndustrial Technology Research Institute

Hsinchu, Taiwan

Page 2: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

2

MotivationMotivationCompact sub-block macromodels are the key to whole-system verification

Back-annotation of such models facilitates system-level verification

These “reduced-order” macromodels capture the nonlinear effects

IIP3, THD, gain compression,…Dynamic range, spectral regrowth, etc…

Ana

log

Des

ign

Modeling Gap

DesignSpecifications

DesignSpecifications

System-LevelDesign

System-LevelDesign

Circuit-LevelDesign/Synthesis

Circuit-LevelDesign/Synthesis

LayoutLayout

VerificationVerification

Compact MacromodelsCompact

Macromodels

Page 3: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

3

AgendaAgendaIntroduction

MotivationPrevious Work

Nonlinear macromodeling approachBackgroundExtraction of Volterra ParametersOverall Macromodeling Flow

Experimental resultsConclusions

Page 4: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

4

Previous WorkPrevious Work

Reduced order modeling of time-varying systems[Roychowdhury TCAS 1999] [Phillips CICC 2000]

PWL/PWP and model order reduction[Rewienski, White ICCAD 2001] [Dong, Roychowdhury DAC 2003]

NORM : compact model order reduction of weakly nonlinear systems

[Li, Pileggi DAC 2003] Hybrid approach to nonlinear macromodel generation

[Li, Xu, Li, Pileggi ICCAD 2003]Multivariate formulation

[Li, Pileggi BMAS 2003]

Page 5: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

5

Macromodeling ProblemMacromodeling Problem

Reduced OrderModel

L& +++= 33

221 xaxaxax

+- +

-

Can we build efficient analog macromodels to capture: linearconversion + time variance + distortion ?

Nonlinear MOR

Page 6: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

6

Modeling of Nonlinear Analog CircuitsModeling of Nonlinear Analog Circuits

Volterra Series to describe weakly nonlinear systems

nnnnn ddtutuhtx ττττττ LLLL 111 )()(),,()( −−= ∫∫∞

∞−

∞−

+- +

-

∑∞

=

=1

)()(n

n txtx

outputinput

tjAe 0ω )(1 ωH tjeAH 0)( 0ωω

tja

aeA ω

),( 212 ωωH ( )tjbaba

baeHAA ωωωω +),(tjb

beA ω

tja

aeA ω

),,( 3213 ωωωH ( )tjcbacba

cbaeHAAA ωωωωωω ++),,(tjb

beA ωtj

cceA ω...

......

nffj

nnnn ddehffH nn ττττ ττπ LLLL L1

)(2

1111),(),,( ++−∞

∞−

∞−∫ ∫=

Page 7: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

7

Modeling of Weakly Nonlinear CircuitsModeling of Weakly Nonlinear Circuits

Volterra-based descriptions are based on multi-dimensional transfer functions

Full-models are extremely complex to be used efficiently

Reduced-order modeling techniques are required

X2

H1(s)

X3HP(s)

X2

H1(s)

X3HP(s)

System-Level Simulation EngineSystem-Level Simulation Engine

Page 8: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

8

Nonlinear Transfer FunctionsNonlinear Transfer Functions

)())((())(( tbutxqdtdtxf =+

Nonlinear dynamic system( ) ( )( )

( ) ( )

00

)(!1)(

!1

321

321

xxi

i

ixx

i

i

i qxi

Cfxi

G

buxxxGxxGxG

xxxCxxCxCdtd

== ∂∂=

∂∂=

=+⊗⊗+⊗+

++⊗⊗+⊗+

L

L

Tnnn

Tnnn

xxxxxxxxxxx

xxxxxxxxxx

]............[

]............[32

12

1221

31

21121

21

=⊗⊗

=⊗

( ) bGSCsH 1111 )( −+=

1st order

( ) ( ) )()()(),(),( 211122212121212121 sHsHGCssssHGssHCss ⊗⋅++−=⋅+⋅+

[ ])()()()(21)()( 112121112111 sHsHsHsHsHsH ⊗+⊗=⊗

2nd order

Page 9: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

9

Moments of Nonlinear Transfer FunctionsMoments of Nonlinear Transfer Functions

Moments of linear transfer functionsBGsCLsH T 1)()( −+=

L+++= 2210)( sMsMMsH

Now for nonlinear transfer functions

L++++++= 220,2,2211,2,2

212,2,220,1,211,1,20,2212 ),( sMssMsMsMsMMssH

1st order 2nd order

L+++++++= 0,0,2,3211,1,2,3210,2,2,330,0,1,321,0,1,310,1,1,30,33213 ),,( MssMsMsMsMsMMsssH

1st order 2nd order

Moment matching these nonlinear transfer fcts via projection for MOR

Page 10: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

10

Reduced Order ModelingReduced Order ModelingUsing a projection-based reduction – multipoint NORM

VGVG T11

~ = VCVC T11

~ = bVb T=~ ( )VVGVG T ⊗= 22~ ( )VVCVC T ⊗= 22

~

H2

f1

f2

Fully captures interactions between transfer functions of different orders

Page 11: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

11

Extraction of Volterra ParametersExtraction of Volterra Parameters

Vdd

M1

M2

M3 M5

M4

M8 M7

M6 M9

M10 M17 M18

M19

M20M11 M12

M13M14

M15 M16

VoutVin- Vin+

Spice models like BSIM3 include physical effects + numerical parameters which increase model complexity

Infeasible to determine the coefficients by computing higher derivatives of device model equations

Page 12: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

12

Simulation SetupSimulation Setup

SimulationEngine

Hspice, SpectreRF ….

Numerical fitting

Commercial simulators like Hspice, SpectreRF can be used to characterize the model parameters for each transistor

For each transistor, perturb the bias voltages to generate data-points for numerical fitting

Page 13: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

13

NonlinearitiesNonlinearitiesSecond and third order fitting of drain current using least squares

Second and third order fitting of the charge is carried out by fitting the capacitances. For instance,

Differentiating w.r.t. drain

In order to fit Qg, need to fit Cgd, Cgs and Cgg

Page 14: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

14

Least-squares fittingLeast-squares fittingY matrix contains the voltage powers and cross terms p contains the corresponding coefficientsR contains the residue (Ids –Ids0)

]...........[

,

..........

::::::

..........

..........

32

3222

22222

3111

21111

sssdggsd

sngndndngnsndn

sgddgsd

sgddgsd

gggggp

vvvvvvv

vvvvvvv

vvvvvvv

Y

=

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

=

[ ] 021 ...... dsdsnnT

n IIIIIIR −==

Page 15: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

15

Least-squares fittingLeast-squares fittingMinimize the error for each data-point, in matrix form:

The least-mean-square algorithm estimates the coefficients in p by minimizing the sum of squares errors:

Tne ]......[ 21 εεε=

eRYp =−

)()( RYpRYpeeF TT −−==

)(.)( 1 RYYYp TT −=

Page 16: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

16

Improving the fit …Improving the fit …

Weighted-least squares approach

Fitting rangeLarge enough to encompass nonlinearitiesShould not cover effects outside signal swing range*

* [“Distortion in RF power amplifiers”, Vuolevi and Rahkonen, Artech House, 2003]

.......)( 0 ++++=− isididsisisididdsdsii wvvgwvgwvgIIw

)()( RYpWRYpF T −−=

)(.)( 1 WRYWYYp TT −=

Page 17: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

17

Overall Macromodeling FlowOverall Macromodeling Flow

LNA IF AMP

LO

I

Mixer

Q

090

( )

xdeey

ubxCCCf

xCCCqdtd

Ttfj ˆˆ],,,[

),ˆ,ˆ,ˆ,ˆ,ˆ(

)ˆ,ˆ,ˆ,ˆ(

020

321

321

⋅⋅Γ⋅=

=

KK π

NonlinearMOR

Reduced-order Model

+- +

-

Nonlinear analog, RF, MEMS circuit netlist

LO/clock SimulationEngine

)()()()( 3,3

2,2,1 tvatvatvati ttt ++=

TPeriodic Time-varying Op

Hspice, SpectreRF ….

Back-annotation of models

Page 18: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

18

An OpampAn OpampModeled as a time-invariant system, linearized at the DC bias point to fit second and third-order coefficients for each transistorSecond-order nonlinearities are much higher than third-order nonlinearities for single-ended output

Vdd

M1

M2

M3 M5

M4

M8 M7

M6 M9

M10 M17 M18

M19

M20M11 M12

M13M14

M15 M16

VoutVin- Vin+

Page 19: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

19

An OpampAn Opamp

Perform transient analysis in Hspice followed by fouriertransform to compare with model resultsFirst-order (small-signal) results

Max error between full model generated using small-signal parameters and reduced-order model is 0.07%

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

x 107

2

4

6

8

10

12

14

16

18

20

22

Frequency (Hz)

Orig

inal

H1

Mag

nitu

de

Page 20: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

20

An OpampAn OpampSecond-order distortion as a function of frequency

Max error between transient simulation and full model : 5.1%Max error between full model and reduced model : 2.9%Max error between transient simulation and reduced model : 5.3%

106 107 10810-3

10-2

10-1

100

Frequency (Hz)

Seco

nd O

rder

Dis

torti

on(N

orm

aliz

ed)

Hspice SimulationFull ModelReduced Order Model

Page 21: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

21

A Double-Balanced MixerA Double-Balanced MixerCharacterized using time-varying Volterra series w.r.t. RF input based on 1350 time-sampled circuit variablesEach nonlinearity is modeled as a third-order polynomial about the time varying operating point due to large-signal LO

+ Vout -

Vlo

Vrf

)()()()( 3,3

2,2,1 tvatvatvati ttt ++=

TPeriodic Time-varying Op

Page 22: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

22

A Double-Balanced MixerA Double-Balanced Mixer

Third-order results Single tone RF input frequency varied from 300MHz to 1200MHzThird-order harmonic of the RF input down-converted w.r.t LO Max error between transient simulation and full model : 8%

020406080

100120140160180200

300 800 900 1100 1200

Frequency (Mhz)

HspiceSimulationOur model

X 10-4 LO frequency = 1 GHz

Page 23: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

23

A Double-Balanced MixerA Double-Balanced Mixer

Reduced order model14 circuit variables as compared to 1350 in the full modelThird-order transfer function: 300Mhz ≤ f1, f2 ≤ 1.2Ghz and fLO = 1Ghz

2

4

6

8

10

12

x 108

24

68

1012

x 108

0

0.02

0.04

0.06

RelativeError

Frequency (Hz) Frequency (Hz)

24

68

1012

x 108

2

4

6

8

10

12

x 108

200

300

400

500

600

1/V 2

Frequency (Hz) Frequency (Hz)

Page 24: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

24

ConclusionsConclusions

Reduced-order models for weakly nonlinear analog circuits can be generated from transistor-level netlists

The accuracy is comparable to transistor-level simulation using commercial simulators

Explore the adoption of these compact reduced-order models in behavioral languages like Verilog-A

Page 25: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

25

Backup SlidesBackup Slides

Page 26: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

26

Opamp ResultsOpamp Results

0 10 20 30 40 50 60 70 80 90 1000

0.2

0.4

0.6

0.8

1

1.2

1.4x 10

-3

Frequency (Mhz)

Sec

ond

Ord

er D

isto

rtion

Hspice SimulationFull ModelReduced Order Model

Page 27: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

27

Compact Nonlinear MacromodelsCompact Nonlinear Macromodels

The purpose of developing compact macromodels is two-fold

A library of reduced-order models can facilitate system-level design exploration by “re-use”

Verification of the complete system based on these compact macromodels

Ana

log

Des

ign

Modeling Gap

DesignSpecifications

DesignSpecifications

System-LevelDesign

System-LevelDesign

Circuit-LevelDesign/Synthesis

Circuit-LevelDesign/Synthesis

Compact MacromodelsCompact

Macromodels

X2

H1(s)

X3HP(s)

X2

H1(s)

X3HP(s)

System-Level Simulation EngineSystem-Level Simulation Engine

LayoutLayout

VerificationVerification

Page 28: Department of Electrical and Computer Engineering Carnegie ......M15 M16 Vin- Vin+ Vout Spice models like BSIM3 include physical effects + numerical parameters which increase model

28

Overall Macromodeling FlowOverall Macromodeling Flow

Perturb terminal voltages and perform DC op point analysis for

each transistor

Numerical fitting

gm

gds

gmbs

Circuit Netlist

Spectre PSS simulation,Hspice Transient Analysis, …