using spice monte carlo tool for statistical error analysis

19
Using SPICE Monte Carlo Tool for Statistical Error Analysis TIPL 4203 TI Precision Labs ADCs Created by Art Kay Presented by Peggy Liska 1

Upload: others

Post on 02-Jan-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Using SPICE Monte Carlo Toolfor Statistical Error AnalysisTIPL 4203 TI Precision Labs – ADCs

Created by Art Kay

Presented by Peggy Liska

1

Page 2: Using SPICE Monte Carlo Tool for Statistical Error Analysis

-3σ -2σ -1σ 0 1σ 3σ

100k

1% 100kΩ

Max Limit+3σ

Min Limit-3σ

101k99k

Devices outside the minimum and maximum limits are discarded

VCM

2.5V

Rf1 2kRg1 100k

Rf4 2kRg4 100k

Rf3 2k

Rg3 100k

Rg2 100k

Rf2 2k

Vin

±100

-

+

U1

-

+

U2

3V

Vref

3V

AVDD DVDD

AGND DGND

5V

ADS9110

Vneg = - Vin∙(Rf/Rg)+VcmVneg = -(±100V)∙(2k/100k)+2.5VVneg = 4.5V to 0.5V

Vpos = Vin∙(Rf/Rg)+VcmVneg = (±100V)∙(2k/100k)+2.5VVneg = 0.5V to 4.5V

Vdif = ±4V

Discrete resistor tolerance sets gain error

2

𝐺𝑑𝑖𝑓𝑓 = 2 ∙𝑅𝑓𝑅𝑔

𝐺𝑑𝑖𝑓𝑓 = 2 ∙2𝑘Ω

100𝑘Ω= 0.04

𝑉𝑜𝑢𝑡 = 𝐺𝑑𝑖𝑓𝑓 ∙ 𝑉𝑖𝑛

𝑉𝑜𝑢𝑡 = 0.04 ∙ ±100𝑉 = ±4𝑉

Page 3: Using SPICE Monte Carlo Tool for Statistical Error Analysis

3

DC Transfer Function

Select “Vin” for the

input and enter the

range from “Start

value” to “End value”

VCM

2.5V

2k100k

2k100k

1k

100k

100k

1k

Vin

±100

-

+

U1

-

+

U2

3V

Vref

3V

AVDD DVDD

AGND DGND

5V

ADS9110Vdif = ±4V

T

Input voltage (V)

-100 -50 0 50 100

Vdif

-4.0

0.0

4.0

Vneg

500.0m

2.5

4.5

Vpos

500.0m

2.5

4.5

Page 4: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Set tolerance on resistors and capacitors

4

Set to 1% or 0.1% per

resistor spec

Gaussian Distribution Click here to set the

tolerance.

Page 5: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Monte Carlo Analysis

5

99.73% sets the

component tolerance to

±3 Standard deviations

More cases will give you a better statistical

distribution. The max is 1000.

Note the default of 68.26% will

not give realistic results for

resistor and capacitor tolerance.

Select “Monte Carlo”

Page 6: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Monte Carlo for DC Transfer Characteristic

6

2. Press CTRL+Alt

to select all

3. Select Process>Statistics

1. Run a dc transfer

characteristic

Page 7: Using SPICE Monte Carlo Tool for Statistical Error Analysis

The cut option

7

Number of bins in histogram.

10 is usually sufficient

We generate the

distribution from the

vertical section at x=100

T

Input voltage (V)

90.00 95.00 100.00

Volta

ge (

V)

-4.10

-3.95

-3.80

-3.65

-3.50

Zoom in

Use Cut

option

Enter the X-axis value

where the cut set is taken

Page 8: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Generate the statistical data and histogram

8

T

Values

-4.03 -4.02 -4.01 -4.00 -3.99 -3.98 -3.97

Sa

mp

les

0

22

44

66

88

109

131

153

175

197

219

Press Calculate to get

statistics, and draw to

show histogram Use to calculate gain error.

Press draw to get a graph

of the histogram

𝑇𝑦𝑝𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 =𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛

𝑀𝑒𝑎𝑛∙ 100 =

9.7𝑚

4∙ 100 = ±0.24% For 68.26% of the population

𝑀𝑎𝑥𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 = 3 ∙ 𝑇𝑦𝑝𝑖𝑐𝑎𝑙 = 3 ∙ ±0.24% = 0.73% For 99.73% of the population

Page 9: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Thanks for your time!Please try the quiz.

9

Page 10: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: Using SPICE Monte Carlo Toolfor Statistical Error Analysis

TIPL 4203 TI Precision Labs – ADCs

Created by Art Kay

1

Page 11: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool1. Use Monte Carlo analysis to determine a statistical estimate of typical and worst case gain

error. Assume each resistor has a ±0.1% tolerance. Note: this exercise assumes that you are

using the “Industrial” version of TINA SPICE. TINA-TI does not include this feature. Many

other SPICE simulators also include Monte Carlo capabilities, so you should get similar results

if you are using another simulator.

2

Vcc

Vcc

VccVneg

Vneg

Vcc

Vneg

-+

+ +-Vocm

-

U3 THS4551

R1 2k

R2 2k

R3 4k

R4 4k

V2

5

V5

-300m

V+

Vdif_total

+

Vin 622m

V1

2.048

R5 18.7kR6 6.04k

-

+ +

U2 OPA320_gwl

Page 12: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Solutions

3

Page 13: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

4

Vcc

Vcc

VccVneg

Vneg

Vcc

Vneg

-+

+ +-Vocm

-

U3 THS4551

R1 2k

R2 2k

R3 4k

R4 4k

V2

5

V5

-300m

V+

Vdif_total

+

Vin 622m

V1

2.048

R5 18.7kR6 6.04k

-

+ +

U2 OPA320_gwl

Click on this imbedded file,

for the TINA spice file used

in this solution.

1. Use Monte Carlo analysis to determine a statistical estimate of typical and worst case gain error.

Assume each resistor has a ±0.1% tolerance. Note: this exercise assumes that you are using the

“Industrial” version of TINA SPICE. TINA-TI does not include this feature. Many other SPICE

simulators also include Monte Carlo capabilities, so you should get similar results if you are using

another simulator.

Page 14: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

5

1. Set Monte Carlo Mode

2. Set percent of population to 99.73%

3. Set Number of cases to 1000

Page 15: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

6

1. Update the tolerance of each resistor by

clicking on the component.

2. Press the button next to the resistance.

3. Enter the tolerance (0.1% in this case)

4. Select Gaussian distribution.

Page 16: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

7

1. Click on graph and press

“Ctrl+A” to select all the curves.

It will highlight red when

selected.

2. Select “Process>Statistics”

Page 17: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

8

1. Select “Cut” for a cut set of the curves. Enter a

value for the cut set. In this case 0.9 is used to

avoid the end points of the curve which may have

non-linearity.

2. Press “Calculate”. This will display the statistics.

Cut set at 0.9

Page 18: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

9

1. Press “Draw” to show the

histogram.

Page 19: Using SPICE Monte Carlo Tool for Statistical Error Analysis

Quiz: SPICE Monte Carlo Tool

10

𝑇𝑦𝑝𝑖𝑐𝑎𝑙𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 =𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛

𝑁𝑜𝑚𝑖𝑛𝑎𝑙𝑉𝑎𝑙𝑢𝑒∙ 100

𝑇𝑦𝑝𝑖𝑐𝑎𝑙𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 =3.83𝑚𝑉

3.2777𝑉∙ 100 = ±0.11%

𝑀𝑎𝑥𝑖𝑚𝑢𝑚𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 = 𝑇𝑦𝑝𝑖𝑐𝑎𝑙𝐺𝑎𝑖𝑛𝐸𝑟𝑟𝑜𝑟 ∙ 3 = ±0.33%

Note: Typical gain error represents one standard deviation

of gain error or 68.3% of the population. Maximum gain

error represents ±3 standard deviations or 99.73