Author Topic: Calculating "worst case" error from tolerances  (Read 5049 times)

0 Members and 1 Guest are viewing this topic.

Offline leblancTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: ca
Calculating "worst case" error from tolerances
« on: July 04, 2015, 09:00:20 pm »
I’ve had to do some error/tolerance analysis at work recently. I thought I’d share how I do this. A lot of the time, when people design something like an opamp circuit, they simply take the worst case values of each component to see the worst case error. If the worst case fits your requirements, that’s great, but a lot of the time, you will find that you just can’t meet your requirements.

When we say a resistor has 1% tolerance, what does that mean? The easy explanation is that the manufacturer guarantees that the resistor will be within these bounds. In reality, when the resistors are manufactured, the values have a Gaussian distribution. The 1% means that a certain percentage of them are expected to be within 1% of the nominal value. If the 1% is the 6 sigma, tolerance, this means that we only expect 0.00034% of resistors (3.4 ppm) to be outside the 1%.

Let’s take the example of two 1k 1% (6-sigma) series resistor. Worst case analysis would tell us that we could get 1.01k+1.01k=2.02k, which is 1% error (0.02k/2k). But really, what are the odds of both our resistors being at the extreme? A lot smaller than the odds of having a single resistor at the extreme, which means that the odds of being outside the 1% are smaller than 0.00034%. This raises the following question: “What tolerance on my equivalent resistance will give me an expected 0.00034% out-of-tolerance?” (what is the 6-sigma tolerance for the equivalent resistance). In the case of the two 1k 1% series resistors, the 6-sigma tolerance is 0.707% ((1%)/sqrt(2)).

I will demonstrate slightly more complex examples. See attached.
« Last Edit: July 04, 2015, 09:02:16 pm by leblanc »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Calculating "worst case" error from tolerances
« Reply #1 on: July 04, 2015, 11:13:23 pm »
Is it a fact that resistors of a certain nominal value have Gaussian distribution? I would think that if the manufacturer does binning by value, it distorts the distribution, for example, 5? resistors will not be in the 1%range.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22434
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Calculating "worst case" error from tolerances
« Reply #2 on: July 04, 2015, 11:20:10 pm »
I thought a truncated Gaussian was more typical of resistors?

The hardest part about statistical design, when it comes to engineering, is they don't say what kind of error it is.  Rarely, you get graphs of these things (the old Burr-Brown/TI op-amp datasheets often had histograms of offset voltage and such; some newer ones do, as well as some offerings from ADI and LT).

Taking min/max limits is the most common approach, since with most parts rated that way, there's nothing else you can do.  You can also assume a flat distribution in that range, which will very likely be a worst case condition as well (since pathological cases like bathtub curves or missing notches are rare, and full or truncated Gaussian is most common otherwise).

Ed: It's worth noting that the differential approach is good for plotting not just sensitivity, but for analyzing more gross "noise" sources -- namely, if you think of the value of a resistor, then the values being quantized into discrete catalog values produces a noise much like ADC quantization error does, except at design time, rather than "run" time.  And this error can be expressed (approximately) as a finite differential (delta/delta x rather than d/dx) in the same equations. :)

Related subject: http://seventransistorlabs.com/Calc/Tempco.html
This calculates the tempco of a temp compensating network of normal (zero-TC) and 'active' values.  It occurs to me, you could use this approach to compensate a network in the opposite direction, i.e., using an NTC to cancel the PTC of a network of ordinary resistors.  The calculation would be as shown above, but adding a nonzero tempco for the added resistors, and the overall TC can be allowed to be between the TC rates of the active and normal parts, which includes crossing through zero if both PTC and NTC parts are used.

Tim
« Last Edit: July 04, 2015, 11:33:12 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38680
  • Country: au
    • EEVblog
Re: Calculating "worst case" error from tolerances
« Reply #3 on: July 05, 2015, 01:00:59 am »
Is it a fact that resistors of a certain nominal value have Gaussian distribution? I would think that if the manufacturer does binning by value, it distorts the distribution, for example, 5? resistors will not be in the 1%range.



and

 

Offline Fsck

  • Super Contributor
  • ***
  • Posts: 1157
  • Country: ca
  • sleep deprived
Re: Calculating "worst case" error from tolerances
« Reply #4 on: July 05, 2015, 01:06:39 am »
where did you get the 6 sigma confidence interval from? I haven't bothered to ask manufacturers but I've never seen their confidence intervals published in their datasheets
"This is a one line proof...if we start sufficiently far to the left."
 

Offline leblancTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: ca
Re: Calculating "worst case" error from tolerances
« Reply #5 on: July 07, 2015, 07:30:45 pm »
I went over the calculations again using a truncated gaussian distribution. If I have the time, I will upload the work this week.

Turns out that the distribution of the sum of two random variables has a distribution that is equal to the convolution of the distribution of the individual variables (https://en.wikipedia.org/wiki/List_of_convolutions_of_probability_distributions).

If I use the convolution method with the truncated 2-sigma gaussian distribution (2 sigma, reject out-of-bounds), I can get an output distribution that looks somewhat like a normal distribution, but instead of probability -> 0 when x -> +/- inf, the probability just goes to zero for some finite x.

We can technically give a 6-sigma tolerance. However, the 6-sigma tolerance ends up being *extremely* close to the worst-case.

For example, if we have two 1k 1% (truncated 2-sigma) resistors in series, 6-sigma tolerance is 0.9998% (need to verify). 4-sigma tolerance is 0.9695%. Worst case (infinite-sigma) is 1%.

Doing the calculation using 0.9998% error instead of 1% error doesn't seem very beneficial.


** NOTE: This doesn't mean that putting multiple resistors in series won't make it more accurate. Series/parallel resistors still give you a nicer distribution (more likely to get close to nominal):

 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Calculating "worst case" error from tolerances
« Reply #6 on: July 07, 2015, 08:03:25 pm »
If you want to put something into space, and I suspect anything life critical, then you'll be using the proper worst case for each part, which is the selection tolerance, plus the temperature variation plus the long term drift. There will usually be a radiation analysis done for space hardware too.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf