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
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
3
AgendaAgendaIntroduction
MotivationPrevious Work
Nonlinear macromodeling approachBackgroundExtraction of Volterra ParametersOverall Macromodeling Flow
Experimental resultsConclusions
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]
5
Macromodeling ProblemMacromodeling Problem
Reduced OrderModel
L& +++= 33
221 xaxaxax
+- +
-
Can we build efficient analog macromodels to capture: linearconversion + time variance + distortion ?
Nonlinear MOR
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),(),,( ++−∞
∞−
∞
∞−∫ ∫=
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
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
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
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
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
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
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
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 −==
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 −=
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 −=
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
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+
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
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
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
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
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)
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
25
Backup SlidesBackup Slides
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
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
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, …
Top Related