Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4a Stochastic Modeling

Similar presentations


Presentation on theme: "Chapter 4a Stochastic Modeling"— Presentation transcript:

1 Chapter 4a Stochastic Modeling
μx σx x f (x) Prof. Lei He Electrical Engineering Department University of California, Los Angeles URL: eda.ee.ucla.edu

2 Outline Introduction to Stochastic Modeling Monte Carlo Simulation Example: SRAM cell Yield Estimation with MC&QMC

3 R.V. X can take value from its domain randomly
Review of Probability R.V. X can take value from its domain randomly Domain can be continuous/discrete, finite/infinite PDF vs. CDF x dx f (x) 1 x F (x)

4 Review of Probability Mean and Variance Normal Distribution σx μx
f (x)

5 Multivariate Distribution
Similar definition can be extended for multivariate cases Joint PDF (JPDF), Covariance Becomes much more complicated Correlation MATTERS!!

6 Independent Random Variables
Two events A and B are independent  P(A ∩ B) = P(A)P(B). Two random variables X and Y are independent  events A={X<=a} and B={Y<=b} are independent. For two independent variables X and Y, we have E[X Y] = E[X] E[Y] var(X + Y) = var(X) + var(Y),

7 Correlation Coefficient
Normalized covariance: Always lies between -1 and 1 Correlation of 1  x ~ y, -1 

8 Principal Component Analysis
PAC helps to compress and classify data It reduces the dimensionality of a data set (sample) by finding a new set of variables The new set has a smaller number of variables The new set nonetheless retains most of the original information. By information we mean the variation present in the sample, given by the correlations between the original variables. The new variables, called principal components (PCs), are uncorrelated, and are ordered by the fraction of the total information each retains from high to low.

9 A sample of n observations in the 2-D space x = (x1, x2)
Geometric Interpretation of Principal Components A sample of n observations in the 2-D space x = (x1, x2) Goal: to account for the variation in a sample in as few variables as possible, to some accuracy

10 The 1st PC z1 is a minimum distance fit to a line in x space
Geometric Interpretation of Principal Components The 1st PC z1 is a minimum distance fit to a line in x space The 2nd PC z2 is a minimum distance fit to a line in the plane perpendicular to the 1st PC PCs are a series of linear least squares fits to a sample, each orthogonal to all the previous.

11 Outline Introduction to Stochastic Modeling Monte Carlo Simulation

12 Monte Carlo Simulation
Problem Formulation Given a set of random variables X=(X1, X2, … Xn)T and a function of X, Y=f(X), estimate the distribution of the Y Method Generate N samples of X=(X1, X2, … Xn)T For each sample of X, calculate the correspondent sample of Y=f(X) Obtain the distribution of Y from the samples of Y

13 Advantage and Disadvantage of MC simulation
Pro: Accurate Error→0 when N→∞ Flexible Works for any arbitrary distribution of X Works for any arbitrary function of f Simple Easy to implement Usually used as golden case in statistical analysis Con: Not efficient Need large N to obtain high accuracy Need to run large number of iterations Not suitable for statistical optimization

14 Example Given X1 and X2 are independent standard Gaussian RVs, estimate the distribution of max(X1, X2)

15 Quasi Monte Carlo Simulation
Basic idea Use deterministic samples instead of pure random samples Select deterministic samples to cover the whole sample space evenly

16 Discrepancy measures how evenly the samples are in the sample place
Definition N is total number of samples, A(B, P) is the number of points in bounding box B, λs(B) is the volume of B Discrepancy measures how evenly the samples are in the sample place

17 Low Discrepancy Sequence
Sample sequence with low discrepancy Low discrepancy array generation algorithms Faure sequence Neiderreiter sequence Sobol sequence Halton Sequence

18 Example: Halton Sequence
Basic idea Choose a prime number as base (let's say 2) Write natural number sequence 1, 2, 3, ... in base Reverse the digits, including the decimal sign Convert back to base 10: 1 = 1.0 => 0.1 = 1/2 2 = 10.0 => 0.01 = 1/4 3 = 11.0 => 0.11 = 3/4 4 = => = 1/8 5 = => = 5/8 6 = => = 3/8 7 = => = 7/8 High dimensional array Use different base for different dimension Example 2-d array, X-base 2, y-base 3 1 => x=1/2 y=1/3 2 => x=1/4 y=2/3 3 => x=3/4 y=1/9 4 => x=1/8 y=4/9 5 => x=5/8 y=7/9 6 => x=3/8 y=2/9 7 => x=7/8 7=5/9

19 Advantage and Disadvantage of QMC Simulation
Efficient Use fewer sample than random Monte Carlo simulation Disadvantage Only works in low dimension cases Very slow when number of random variations become large Not very common in statistical analysis

20 Comparison of MC and QMC
QMC converges faster than MC

21 Reference L. I. Smith. “A Tutorial on Principal Components Analysis”. Cornell University, USA, 2002. Singhee, A., Rutenbar, R. “From Finance to Flip Flops: A study of Fast Quasi-Monte Carlo Methods from Computational Finance Applied to Statistical Circuit Analysis.”

22 Homework 5 Yield Estimation using Monte Carlo Method
Consider “access time failure” : the time that voltage difference between BL_B and BL becomes larger than certain value. The schematic are shown as below Initial Value: BL_B=1; Q_B=0; Q=1; BL=1; Variation Source: Vth (threshold voltage) of Mn1 and Mn2 Leff of Mn1 and Mn2 Device Model: Use BSIM3 model for all MOSFETs

23 netlist Netlist for 6-T cell SRAM * SRAM netlist Vdd dd 0 5
Mn nmos Mn nmos Mn nmos Mn nmos Mp5 3 2 dd dd pmos Mp6 2 3 dd dd pmos all MOSFETs should use BSIM3 model

24 Detailed Steps Performance Constraint:
The voltage difference between BL_B and BL should be larger than ∆v at the time-step tthresh. Use Monte-Carlo and Quasi-Monte Carlo to calculate the yield Y, which is the percentage of circuits with satisfied performance. Steps: (1) Use MC and QMC to generate random sequences for two variable parameters with Matlab code. (2) Perform transient simulations with these sequences, and compare the variable performance with constraint. (3) Calculate the yield rate with definition. Nominal Values, Performance Constraint and Matlab code will be provided soon Due Feb 20th


Download ppt "Chapter 4a Stochastic Modeling"

Similar presentations


Ads by Google