steady-state methods

48
1 Steady-State Methods UCB EE219A Oct 29 2002 Joel Phillips, Cadence Berkeley Labs Some artwork thanks to: K. Kundert

Upload: jola

Post on 16-Jan-2016

40 views

Category:

Documents


4 download

DESCRIPTION

Steady-State Methods. UCB EE219A Oct 29 2002 Joel Phillips, Cadence Berkeley Labs. Some artwork thanks to: K. Kundert. Steady-State Methods: Goals. Understand alternative way of analyzing differential equations Faster Application-Specific “Tie together” several numerical themes - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Steady-State Methods

1

Steady-State Methods

UCB EE219A Oct 29 2002

Joel Phillips, Cadence Berkeley Labs

Some artwork thanks to: K. Kundert

Page 2: Steady-State Methods

2

Steady-State Methods: Goals

• Understand alternative way of analyzing differential equations

‑ Faster

‑ Application-Specific

• “Tie together” several numerical themes

‑ Circuit theory

‑ Solution of ODEs/DAEs

‑ Newton methods

‑ Iterative solvers & preconditioning

Page 3: Steady-State Methods

3

Review: Solution of ODEs/DAEs

1. Given an ODE/DAE

2. Start with an initial condition

3. Pick a next time point (discretize time)

4. Compute next solution (Newton etc.)

5. Go to 3. and repeat till done

),,( 1111

nnnnn

tuxfhxx),,( tuxf

dtdx

Page 4: Steady-State Methods

4

Good Questions For Transient Analysis

• How does the circuit behave

‑ When driven by a sinusoids (for a short time?)

‑ When driven by a step input?

‑ When driven by unstructured (i.e. a-periodic) inputs

• Other time-domain characteristics

‑ Delay, Risetime, Overshoot

Page 5: Steady-State Methods

5

Hard Questions for Transient Analysis

• How does the circuit behave

‑ When driven by sinusoid(s) for a very long time? (steady-state)

• How much noise does the circuit introduce to a signal?

‑ Where does the noise come from? Where does it go?

• Other frequency-domain questions

‑ Small-signal stability, Bode plot, pole-zero

Page 6: Steady-State Methods

6

Example Frequency-Domain Analysis

TBR Model Not Positive Real

)( Re Y

Page 7: Steady-State Methods

7

Why steady-state methods?

• Speed

‑ E.g., AC

• Accuracy

‑ E.g., distortion

• Insight

‑ E.g., stability

• No choice!

‑ RF noise

Page 8: Steady-State Methods

8

Prototypical steady-state analysis: AC

• Linear Circuits

‑ Apply a sinusoidal source at single frequency

‑ Sweep the frequency of source (Bode/Nyquist plot)

Small-signalsource

Measuredresponse

+

–v1 i2 i4

+

–v5

+

–v3

Page 9: Steady-State Methods

9

AC via TRAN

• Apply source

• Solve IVP (Trap, Euler, etc.)

• Wait till steady state is reached

• Fourier-transform the output

Page 10: Steady-State Methods

10

Problem #1: Speed

• Consider a 1Hz sinusoid applied to a resonant RLC circuit

Transients mustdie out to avoid

corrupting steady-state

Each period requires20-50 timepoints?

Must simulate forminimum one second

past transients

Page 11: Steady-State Methods

11

Problem #2: Accuracy

• Widely used BAD method for Fourier analysis

‑ Interpolate onto uniform timepoints, apply FFT

• Problems

‑ Detecting “onset” of steady-state

‑ Polynomial interpolation creates high noise floors in Fourier analysis

‑ Truncation errors corrupt spectrum

‑ Aperiodicity/endpoint errors

Page 12: Steady-State Methods

12

How bad can it be?

• Experiment:

‑ Sample sinusoid at 256 random points

‑ Interpolate onto uniform 1024-point grid

‑ FFT

• Looks good so far!!!

Page 13: Steady-State Methods

13

It can be really bad!!!

dB

Page 14: Steady-State Methods

14

AC Linear Analysis

• Consider linear problem

• Recall: In the frequency-domain

• Nice feature: work for all linear elements (e.g., transmission lines)

tjueAxdtdx

uAxxj )()(

)(AA

)()( ssxtxdtd xjx

dtd

Laplacetransform

Fouriertransform

Sinusoidalsteady-state

tjacextx )(

Sinusoidalinput u

FundamentalAC analysis equation

Page 15: Steady-State Methods

15

AC Small-Signal for Nonlinear Circuits

• Step 1: Find the DC operating point

‑ In a circuit, this means find a set of currents, voltages that satisfy Kirchoff’s voltage & current laws, with all capacitors deleted and all inductors shorted

),,( tuxfdtdx 0)0,,( dcuxf

(Recall that: DC operating point itself is very useful in circuit design…..)

Page 16: Steady-State Methods

16

AC Small-Signal for Nonlinear Circuits

• Step 2: Linearize around the DC operating point

‑ Assume the inputs are small perturbations around the DC point

‑ Assume circuit response is in turn a small perturbation around the DC point (use Taylor series)

0)0,,( dcdc uxf

tiacdc euutu )(

)()0,,(),,( dcdcdc xxxf

uxftuxf

Page 17: Steady-State Methods

17

AC Small-Signal for Nonlinear Circuits

• Step 3: Solve the AC analysis equation

• Note: Fourier portion of analysis is exact

‑ No truncation error

‑ No aliasing errors

‑ No periodicity errors

acx

uxxf

xjdc

)()(

Page 18: Steady-State Methods

18

More Linear Analyses: Pole-Zero

• Is the design stable? Poles all in left half-plane? Recall AC analysis:

• Poles occur at (complex) such that

• Solve eigenvalue problem by

‑ Direct methods: QZ; or Krylov methods: Lanczos, Arnoldi (similar to GMRES!)

0)(

sxxf

sIdcx

s

acx

uxf

sIsxdc

1

)(

Page 19: Steady-State Methods

19

Noise Analysis

• Lossy devices in circuit generate noise

• Noise is: Stochastic (random) unwanted signal

• Typical model:

‑ Stationary Gaussian process characterized by power spectrum

Thermal Noise

Source

Noise appearsat output

Page 20: Steady-State Methods

20

White Noise

•Noise at each time point is independent

‑ Noise is uncorrelated in time

‑ Spectrum is white

•Examples: thermal noise, shot noise

R(t,) S(f )

f

FourierTransform

Autocorrelation Spectrum

Page 21: Steady-State Methods

21

Colored Noise

‑ Noise is correlated in time because of time constant

‑ Spectrum is shaped by frequency response of circuit

‑ Noise at different frequencies is independent (uncorrelated)

Time correlation Frequency shaping

R(t,) S(f )

f

FourierTransform

Autocorrelation Spectrum

Page 22: Steady-State Methods

22

Noise Analysis

• Typical model

‑ Assume “small” small signal analysis

‑ Stationary Gaussian process characterized by power spectrum

• Small-signal analysis with noise sources

• Frequency-domain method:

‑ Compute transfer function from each noise source to the observation point (output) [Same transfer functions as computed by AC]

‑ Sum noise power contributions. Correlations will be correctly tracked.

dwwdwwdtxxf

dxdcx

21

Possibly correlated “white” Gaussian processes

Page 23: Steady-State Methods

23

AC-like Transfer Function Computation

LinearizedCircuit

Source 1

Source M

etc.

kuxxf

xj kac

k

x

k

dc

sourceeach for )()(

Output

• Each source requires a transfer function analysis

• Number of sources M number of devices

•Too many solves!

Page 24: Steady-State Methods

24

Adjoint Analysis

• Standard AC analysis to compute

‑ Solve (expensive)

‑ For any output desired, compute (cheap)

• Key observation:

• Adjoint analysis

‑ One c, lots of b (or many more b than c)

‑ Solve

‑ For all the inputs (sources), compute

bAx

bAcTk1

xcTk

cAbbAc TTT 1

cyAT ybTk

Page 25: Steady-State Methods

25

Forward Analysis: Circuit Interpretation

LinearizedCircuit

Output 1

Output 2

Output 3

Output 4

Input 1

Input 2

Input 3

For one input configuration, compute TF from to all possible outputs

Page 26: Steady-State Methods

26

Adjoint Analysis: Circuit Interpretation

LinearizedCircuit

Output 1

Output 2

Output 3

Output 4

Input 1

Input 2

Input 3

For one output configuration, compute TF from all possible inputs

Page 27: Steady-State Methods

27

Generalizations of Steady-State Analyses

• Mostly ways of dealing with LARGE signal effects

‑ i.e., NONLINEAR analysis

• Examples:

‑ Distortion

‑ Frequency Conversion

Page 28: Steady-State Methods

28

Distortion

• Consider amplifier with cubic nonlinearity

• Harmonic distortion

• Intermodulation distortion

+

-inv

3ininout BvAvv

tBatBaAvout 3sin4/sin4/3 33 tavin sin

tbtavin 21 sinsin ,)2(,3,3in termssinsin 212121 ttttbAtaAvout

Page 29: Steady-State Methods

29

Distortion

122

Real life is more complicated with nonlinearfrequency-dependent terms, higher-order nonlinearities, and more complex inputs.

Page 30: Steady-State Methods

30

Frequency-Translation

• Linear Mixer

• Common confusion: frequency translation itself is a linear process (not nonlinear)

‑ But all actual frequency-translating devices are nonlinear

tavin sin

tbvlo 2sin

ttab

vvv inloout

)cos()cos(2

2121

Page 31: Steady-State Methods

31

Simple Nonlinear Steady-State Problems

• Compute harmonic distortion in the amplifier

• Compute conversion gain in the mixer

• Compute noise in either

• All three are periodic-steady-state problems

‑ (or periodic steady-state + small-signal analysis)

*

*[intermodulation distortion is a quasi-periodic steady-state problem]

Page 32: Steady-State Methods

32

Periodic Steady-State

• Assume general excitation by periodic inputs

• In many cases, we expect a periodic solution [if we wait long enough…]

‑ Recall: periodic functions have a Fourier-series representation (sum of sine and cosines)

• Why not solve for the periodic solution directly?

Page 33: Steady-State Methods

33

Periodic Steady-State Computation

• Apply a sinusoid or other periodic input signal

• Find the periodic response

‑ Time-domain solution over one “fundamental” period

‑ Or spectrum: Fourier coefficients at fundamental + harmonics

• Sound familiar????

‑ Recall: in AC, we solved directly for the Fourier response (“fundamental”). No higher harmonics arise because system was linear.

• Need:

‑ Steady-state “equations” ala

‑ FAST & ACCURATE way of solving equations

acx

uxxf

xjdc

)()(

Page 34: Steady-State Methods

34

IVP vs BVP

• No problem specified with differential equations is complete without boundary condition

• Before: Solving an Initial Value Problem (IVP)

• What about:

• Example of a boundary-value problem (BVP)

),,( tuxfdtdx 0)0( xx

),,( tuxfdtdx )()0( Txx

Page 35: Steady-State Methods

35

Note on PBCs

• If solution to DAE is unique, then solution on one period determines solution for all time

‑ Both the shooting method and spectral interval methods (harmonic balance) use this fact

• From knowledge of solution at one timepoint, can easily construction solution over entire period by solving IVP

‑ We will exploit this in the shooting method

Page 36: Steady-State Methods

36

Enforcing PBCs

• Approach 1: Build BCs in basis function

‑ Example: Fourier series satisfy periodic boundary conditions

• Approach 2: Write extra equations

‑ PBC

tkbtkatxk

kk

k

00

10 cossin)(

)()0( Txx

Page 37: Steady-State Methods

37

PSS Algorithm #1: Harmonic Balance

• Periodic solution can be expressed in terms of Fourier series with fundamental frequency

• Pick

tkbtkatxN

kk

N

kk

00

10 cossin)(

N

Nk

tikkectx 0)(

0

kk cc

-- OR --

(real solutions please!)

Page 38: Steady-State Methods

38

PSS Algorithm #1: Harmonic Balance

• Pick

• Want to solve

• Clever trick: spectral derivatives!

N

Nk

tikkectx 0)(

N

Nk

tikkecik

dtdx

00

N

Nk

tikkecdt

dx0

kk cikc 0

utxfdtdx ),(

Page 39: Steady-State Methods

39

Spectral Differentiation

• Recall

• Works on any function

‑ With suitable technical conditions

• Spectral differentiation is exact for sinusoids!!!!

)()(

ssxdttdx

Occasional linearity confusion:Linear circuit sinusoids do not interact.Differentiation acts on signals, not the nonlinear functions, so Fourier analysisworks fine.

Page 40: Steady-State Methods

40

How good is spectral differentiation?

Plot vs. on finite difference grid i)(2xieD

Page 41: Steady-State Methods

41

Aside on Weighted Residuals

• Many numerical methods you know are weighted residual methods

• General scheme to solve

‑ Pick basis functions

‑ Ansatz:

‑ Select weighting functions

‑ Force

uxF )(

N

kkkcx

1

k

j

0)(,0

N

kkkj cFu

Page 42: Steady-State Methods

42

Weighted Residuals: Examples

• Least-Squares

‑ GMRES

• Collocation:

‑ Original equations satisfied exactly at some “points”

‑ BDF collocates derivatives

• Galerkin:

‑ Residual orthogonal to basis space (or some other space)

‑ Krylov-based Model Reduction

)( jj t

jj

Page 43: Steady-State Methods

43

Harmonic Balance: Equation Formation

• Enforce

‑ Galerkin (true spectral method)

‑ Point collocation (“pseudo-spectral method”)

• Force at selected timepoints

‑ Which ones? Time for another trick…..

uxF )( ),()( txfdtdx

xF

uxF )(

Page 44: Steady-State Methods

44

Differentiation and the DFT

• Fourier transform (DFT) relates solution at discrete points to Fourier coefficients

Mx

x

x

KX

KX

2

1

0

0

F

)(

)(

[strictly speaking, we are evaluating the Fourier integral via quadratureusing the trapezoidal rule. Useful fact: trapezoidal rule is the best rule (spectrally accurate!) for quadrature on a circle. ]

Page 45: Steady-State Methods

45

Differentiation and the FFT

• Derivative in Fourier space:

• DFT-based differentiation formula

• We can evaluate a DFT fast using an FFT

• Suggests selecting timepoints to be evenly spaced

MM x

x

x

K

K

K

i

x

x

x

dtd

2

1

1-0

2

1

F1

F

)()( kXikkX

Page 46: Steady-State Methods

46

Equation Structure

• BVP becomes

• Jacobian with

),(

),(

),(

-F )( F),()(22

11

1-

MM txf

txf

txf

itxfdtdx

xF

M

2

1

1-0

g

g

g

-F

K

K-

F

iJ

xtxfg kkk /),(

(sorta looks like AC, doesn’t it???)

Page 47: Steady-State Methods

47

Equation Solution

• We need to solve

• These matrices are dense in either Fourier- or real- space LU factorization is bad news

• They are potentially very large

• Yet a matrix-vector product can be done fast

• Ideal candidate for iterative solution methods (GMRES!)

• Good preconditioners are necessary, but hard to construct

M

2

1

1-0

g

g

g

-F

K

K-

F

iJ

bJx

Page 48: Steady-State Methods

48

Historical Note about Device Evaluation

• Once upon a time…..microwave/RF simulators were purely frequency-domain…..like AC.

• Problem: This required frequency-domain transistor models.

• At some point it was noticed that the devices could be evaluated in the time-domain (with equations written in frequency domain) by using Fourier transforms.