How to determine if a derived value or measurement is matching a specification - Page 1
Forum section: electronics / general

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 10:35:03 am
content: When combing components, to meet a requested replacement value I'd like to know the correct way of determining whether the replacement value is within spec.https://www.eevblog.com/forum/projects/how-about-combining-some-components/The requested target is something like: 987,6 Ω ± 300 mΩThe replacement value could be something like: 987,8 Ω ± 200 mΩIs there a standardized way of determining whether the latter is within spec, with ..٪ probability.I've done some research myself, but I don't expect to get a solid answer using Google.It would be great if someone knows of a method, better than taking the uncertainty bounds of both and check if the requested bounds are fully overlapping.I've edited the uncertainty from 987,6 Ω ± 3 mΩ to 987,6 Ω ± 300 mΩand 987,8 Ω ± 2 mΩ to 987,8 Ω ± 200 mΩ

author: alm
author_rank: Super Contributor
timestamp: April 01, 2022, 12:10:32 pm
content: I don't have a specific source (does GUM say anything about this?), but here's my $0.02 based on basic probability theory. The uncertainties you give characterize certain probability distribution. The specification might be a 99% confidence interval.If you assume the resistance is a random variable that follows the normal distribution (this is when you'd use root of sum of squares to add up errors) , it might be a normal distribution with a mean of 987.8 Ohm and a standard deviation of 2 mOhm / 2.58. You can then calculate the probability that this random variable is within 987.6 +/- 3 mOhm (from the cumulative distribution function). If this is more or equal than the original confidence level, you're good.If you assume the resistance to follow a rectangular distribution, the process is pretty much the same, but it boils down to that the confidence interval of the distribution should be fully within the original limits.

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 12:32:14 pm
content: Quote from: alm on April 01, 2022, 12:10:32 pmI've quoted this with updated uncertainties. Will have to digest the content.

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 12:44:11 pm
content: Quote from: alm on April 01, 2022, 12:10:32 pmThis stuff is not in my comfort zone, so please correct me if I'm wrong.I think the standard confidence interval for uncertainties is 1 std deviation and would be 68%,. (One could take multiple standard deviations of that, but then one should probably specify that) I asume that's the standard for specifications like resistor values and tolerances as well.

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 03:41:54 pm
content: https://www.npl.co.uk/special-pages/guides/gpg11_uncertainty.pdfI think this document may shine some light on uncertainties vs tolerances, etc.

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 05:04:43 pm
content: Quote from: HendriXML on April 01, 2022, 12:44:11 pmAfter reading some more, I know now that I don't know enough about this stuff...

author: HendriXML
author_rank: Super Contributor
timestamp: April 01, 2022, 08:12:10 pm
content: I think this link could usefull:https://calibrationawareness.com/differences-between-accuracy-error-tolerance-and-uncertainty-in-a-calibration-resultsOne thing I've begin to understand is that the combined components tolerance specs may need some extra indication to be able to convert to a standard uncertainty.probability distribution kind: rectangular|normalcoverage factor (k): 1|2|3If I had to pick a default indication, would that be: rectangular, k=3?

author: martinr33
author_rank: Frequent Contributor
timestamp: April 01, 2022, 10:33:12 pm
content: The really important thing here is, what does the circuit need? If the value is that precise, you probably will miss out on drift or thermal characteristics.That said, another approach is to buy a pack of resistors that are close to the right value, then measure and select one that meets your requirements.988 is a standard value. I would start by seeing if 988 would actually work in your circuit, or if you can switch out a second resistor to balance things up. Or you could spring for a custom value, likely about $50.https://www.mouser.com/ProductDetail/Vishay-Dale/RN60C9880BB14?qs=OWN3l4e3w4Gvy8KUIIvLAA%3D%3DA third choice is parallel resistors. For example, 1k + 79.6 will get you to 987.6. 80.6 will give you 987.8.I find parallel to be a bit tidier, plus you can use a low TC 1k resistor.

author: bdunham7
author_rank: Super Contributor
timestamp: April 01, 2022, 10:50:02 pm
content: Quote from: HendriXML on April 01, 2022, 10:35:03 amI didn't read the entirely of the like, so perhaps I'm missing some context. IMO your question can't be answered without knowing exactly what "+/- 300mΩ" and "+/- 200mΩ" means in each case. That could mean one standard distribution or it could mean they are binned using a meter that can measure them to 1mΩ so that it is a rectangular distribution with a very hard limit. AFAIK there are no guarantees on uniformity or non-uniformity of resistance on batches of resistors--every single one of the latter could be 987.95Ω on the nose and there'd be no reason to complain--and every one would be out of your specified limits.

author: alm
author_rank: Super Contributor
timestamp: April 01, 2022, 11:49:28 pm
content: I agree that without knowing anything else, the only safe thing to assume about a single resistor with a value of X +/- Y is that it is a rectangular distribution from X-Y and X+Y. Whether this was whoever came up with the target spec was in mind is anyone's guess, but it seems sensible. So if you're substituting a single resistor, you could just check that the window given by the tolerance is inside the tolerance window of the target. Once you have many components, like say you put dozens of resistors in series to make this value, then the central limit theorem starts coming into play, so you might assume a less conservative student-t or normal distribution (though careful if the values are actually independent, like resistors from the same batch).Uncertainty specifications for equipment, like a multimeter, are generally 99% confidence intervals. At least in metrology-grade instruments where people worry about this.

author: HendriXML
author_rank: Super Contributor
timestamp: April 02, 2022, 12:34:57 am
content: Some background might be needed, in the threadhttps://www.eevblog.com/forum/projects/how-about-combining-some-components/I presented a component combine simulation script for multiple configurations (17, up to 4 components).Because the tool I use calculates with uncertainties I wanted to use those in decision making. It would be nice to determine if some replacement value is within spec. More usefull might be a metric of how close it meets the target. Taking uncertainties in consideration, which can differ between configurations.I thought this would be straightforward, but it seems that tolerances are not uncertainties.It's something that I must improve in other scripts as well.My hobby seems more about methods and scripts than creating hardware: that kind of matches my abilities. (Statistics do not).I think if I can get this metric and check right, the solution I need for using component values and tolerances in other calculations will also emerge. In other scripts I simulate different component values as well, and then also checking whether its in spec needs to be done.Because the uncertainty propagation assumes normal distribution, I think having a solid check with that is most usefull. The other rectangular distribution could then be transformed into a normal one. Divide by sqrt(3) * k?It won't be perfect, but propagating uncertainties of different kind of distributions...

author: HendriXML
author_rank: Super Contributor
timestamp: April 02, 2022, 12:41:17 am
content: Quote from: alm on April 01, 2022, 11:49:28 pmI've a Keithley DMM6500, which would not be metrology-grade, but I think is uses 1 sigma. I have a scripts that determines the uncertainty of each measurement depending on settings and range, so if someone know for sure.. I couldn't find its k value or confidence interval explicitly stated.

author: alm
author_rank: Super Contributor
timestamp: April 02, 2022, 08:24:15 am
content: Here's some information on how Keithley defines accuracy for their instruments:https://forum.tek.com/viewtopic.php?t=105280

author: HendriXML
author_rank: Super Contributor
timestamp: April 02, 2022, 09:04:05 am
content: Thanks!This section was key for me:Uncertainty in Measurement" paragraph 4.3.7), this is still the most common practice among instrumentmanufacturers and the user should assume a rectangular probability distribution and calculate the standarduncertainty as u(xi) = Tolerance limit / SQRT(3).I would advocate that manufacturers calculate the standard uncertainty theirselves (maybe have the user select a confidence level k) and make it accessible.

author: HendriXML
author_rank: Super Contributor
timestamp: April 02, 2022, 09:30:47 am
content: Bit out of context, but I think nice to repeat:In the other threadhttps://www.eevblog.com/forum/projects/how-about-combining-some-components/msg4080850/#msg4080850I did a simulation of 10,000 target values, simulating 17 configurations. Displaying the guaranteed precision of each configuration.My ٪ calculations are not entirely "standard" though.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 02, 2022, 09:54:27 am
content: Quote from: HendriXML on April 02, 2022, 09:04:05 amTo do the math one would need to know the way on how to parts specs are to read and what model is behind it. Especially with only a few parts, it makes a difference if the parts are binned parts with more like rectangular distribution or more normal distributed parts with a 3 sigma (or maybe different k factor) number given as specs.For guarannteed values one would have to use the worst case combination and than still has the problem that the parts used may only have 3 sigma specs.

author: alm
author_rank: Super Contributor
timestamp: April 02, 2022, 10:19:57 am
content: This article by Fluke sheds some light on the topic of uncertainty specifications and standard uncertainty:Having Confidence in Specifications, and why they provide 99% confidence intervals rather than just limits (or 95% confidence intervals):Quote from: Fluke: Having Confidence in Specifications

author: HendriXML
author_rank: Super Contributor
timestamp: April 02, 2022, 05:10:53 pm
content: Useful reference for converting to a standard uncertainty:https://www.isobudgets.com/probability-distributions-for-measurement-uncertainty/Useful reference for checking for conformityhttps://www.isobudgets.com/statements-of-conformity-and-decision-rules/https://www.isobudgets.com/conformance-to-specifications/https://iopscience.iop.org/article/10.1088/0026-1394/51/4/S206 (Using measurement uncertainty in decision-making and conformity assessment)

author: martinr33
author_rank: Frequent Contributor
timestamp: April 03, 2022, 10:08:29 pm
content: This is a tricky question.The nature of a manufacturing process is that the measurements will follow a normal distribution. I would lay out three possibilities:1) The process is very well controlled and the parts bin out across a very narrow range, all close to nominal. The SD is small, and the mean is spot on.2) The process is very well controlled, but different batches may sit at a different mean value, still with a tight distribution. The SD is small, but the mean could be several SDs off from nominal.3) The process has a very wide distributuion, and parts are bucketed according to their value. These parts will follow a rectangular distribution, and the SD will be relatively large.Any part could sit somewhere on a spectrum like this. My experience of supplier specs is they want the broadest specification window possible, to minimise customer rejection.

author: HendriXML
author_rank: Super Contributor
timestamp: April 04, 2022, 10:49:31 am
content: https://iopscience.iop.org/article/10.1088/0026-1394/51/4/S206Using measurement uncertainty in decision-making and conformity assessmentThat webpage might be of interest, going into depth.

author: HendriXML
author_rank: Super Contributor
timestamp: April 04, 2022, 02:09:33 pm
content: It's kind of tricky to define a metric (log version) on whether a value confirms with some specification.I'm not skilled enough to implement a defined standard.But because it will mostly be used just by me, I can implement one I understand.Used variables:T: target valueA: actual valueTu: target uncertaintyAu: actual uncertaintyIt has the following characteristics:Can be used with standard uncertainties (1 sigma)Follows the ordering using |log(T) - log(A)|Takes both Tu and Au into accountA value of <=1 should be considered within specsIt takes the log difference of T, A.Divides that by the log of an uncertainty factorIn this uncertainty factor Au is capped at Tu and is also divided by 3.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: April 04, 2022, 04:37:23 pm
content: The statistics are above my pay grade but remember that purchased parts may have been sorted to meet other needs, so the distribution can be anything but normal. An entire block could be missing around the nominal value or someplace else. I've also received batches of parts where every one is right up against one of the tolerance walls.

author: HendriXML
author_rank: Super Contributor
timestamp: April 04, 2022, 05:41:04 pm
content: My previous graph used 1 sigma normal distribution. If the tolerances of both the target and the actual where rectangular distributed, one should divide their tolerances by sqrt(3) (-> standard uncertainty).Then it becomes a bit conservative, but in case of combining components that's not really an issue.

author: HendriXML
author_rank: Super Contributor
timestamp: April 04, 2022, 05:45:56 pm
content: Quote from: Conrad Hoffman on April 04, 2022, 04:37:23 pmI'll be using it in "decision support", I guess real life tests will always be needed to verify decisions... (Looking at his collection of Ali Express resistors)

author: alm
author_rank: Super Contributor
timestamp: April 04, 2022, 09:43:19 pm
content: Quote from: Conrad Hoffman on April 04, 2022, 04:37:23 pmThis is exactly why without having additional information, like a confidence interval, the only safe assumption is that it follows a rectangular distribution where there is an equal chance to be anywhere within the tolerance band. The out-of-print bookAnalog SEEKrets by Leslie Green(Dave mirrored with permissionthe full PDF version) has a decent discussion of this topic in chapter 3.Quote from: HendriXML on April 04, 2022, 10:49:31 amThanks for sharing that. Its main topic is "given you have X parameters that are measured to be within tolerance with a certain confidence interval, what's the chance that the entire system is inside tolerance on all parameters". The Fluke paper I linked earlier also touches upon this topic of why they use 99% confidence intervals, not 95% confidence intervals, to specify their calibrator that have dozens of points that have to meet specifications.

author: HendriXML
author_rank: Super Contributor
timestamp: April 05, 2022, 06:43:24 pm
content: I changed the metric. The graph uses now actual tolerances which are half of the target one.Some value is within spec, if this nonconformity metric is <= 1.It would be nice if the combinations where ordered by exactly the same metric. But that would probably hurt performance a lot. Not only because of the nonconformity expression, but mostly because the combine expression would need to be calculated with propagated uncertanties.Currently only the value is optimized. With this metric, the combined uncertanty should also be (partly) optimized.I could alter the simulation to only calculate fully when the combination is a candidate by value. But to deterimine that it must be preceded by many other full calculations. Also there will be targets where succeeding combinations keep getting better a very large proportion of the combinations, forcing many full calculations.There're so many combo's that keeping the results in memory and do a second pass (starting with the best, ending when uncertainty cannot alter the optimal metric anymore), is not doable.

author: HendriXML
author_rank: Super Contributor
timestamp: April 05, 2022, 09:03:03 pm
content: I thought I was done with the simulation stuff, but I think it might take less than 3x the time to optimize using the metric. So investigating the metric improvement might be worthwhile.First a normal value optimization, with no uncertainty calculations.Then with the optimal as a "candidate selector" the same calculation again, where potential metric winners will be fully calculated with uncertainties and metric. So no excessive usage of memory.I added a simple example on how the same combination result can have different uncertainty/tolerance.https://uncertaintycalculator.com/

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 04:22:31 pm
content: Quote from: HendriXML on April 01, 2022, 10:35:03 amI had to read this over a couple of times, because I couldn't really follow.But I can give an answer of using a couple of methods.One is the theoretical way to get you in the right direction.This is called relative error estimation based on partial derivatives.Sometimes also called linear approximations with the chain rule I believe?My apologies, I am a bit lost in translation, since I learned this stuff in my native language, see pic I found as an example.Basically what you do, is you make an equation of the circuit in question, derive all the variables and take the absolute, multiply them with the expected error and sum all of these.The downside of this method is that it expects that the error will be linear, in reality this isn't always true obviously. *If we are talking about probabilities, one needs to use standard error as well as the standard deviation.Although these two look very similar (and A LOT of people mix them up!), they are VERY different!One will give you a number how precise you know the average, the other one will give a number of the spread across the samples.Using 2 or 3 sigma is enough for most general electronics, in science they mostly use 4 or 5 sigma (or more)That being said, in general paralleling resistors usually results in not changing the relative error.While putting them in series results in doubling (or summing) them.* Since the behavior and tolerance of most electronics is pretty tight (< 2%) and for devices like resistors pretty predictable, this isn't really an issue.It will be a much bigger issue for other variables (non electronics) with a relative error around 20-30% or that kind of order of magnitude.

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 04:45:06 pm
content: edit;So if this is about the schematic shown in the first post with just some resistor networks, the equation is actually very easy to solve.Since resistors in series will always get worse, the best possible network is just to parallel resistors at best.Other configurations will always get worse by definition.

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 06:23:36 pm
content: Thanks for responding!I calculate uncertainties with:https://www.isobudgets.com/combining-measurement-uncertainty/Root of squares summed, in that case putting components in series doesn't need to be worst.If mayor contributing values are close to one another they may improve the resulting uncertainty a bit.The configuration which can do that and also get close to the target value might be the best choice. Hence the choosen metric.

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 07:06:43 pm
content: Quote from: HendriXML on April 13, 2022, 06:23:36 pmThe root method is also something you can use.It's just not as correct as the other method, especially when your equation will become a little more complex.The GUM method assumes that variables don't influence each other, which is very debatable (and often unlikely)I would never recommend using it for that reason, unless you have a strong point and certainty to believe that they won'tThese days it's just very easy to do these things in WolframAlpha example with a voltage divider and a variable V(input)So why bother?https://www.wolframalpha.com/input?i=abs+derivative+V*R2%2F%28R1%2BR2%29+with+respect+to+R2(copy-paste, link isn't fully working unfortunately)You also have repeat this for R1 and V obviously.If you use math programs like Maple or so, this can be done a little easier and quicker, or otherwise just copy it to Excel or something.Btw, this is worst case way of calculating errors, there is also a more "probable" way of summing them.Since it's very unlikely that all variables will be at their maximum errorIn that case you combine the partial derivatives method like the GUM method, by taking the power of two of each term, summing them and taking the square root of the whole again.Personally I prefer the worst case method, because that will give you an answer that you canmore likelyrely on.btw, multiple variables in series (more than two) will never improve, but always worsen, with the variable with the smallest error as the (bare) minimum.Just fill in the numbers and you will see why!

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 08:56:05 pm
content: I should have said relative uncertainty..Those can improve a bit. using root sum squared method.Nice WolframAlpha link you posted, may become handy!It's nice to know of another method of calculating uncertainties. I don't think I am going to switch to that way of calculating in my tool.That tool uses datatapes which propagate the "standard" uncertainties. I took that as it seemed the scientific convention.But it could theoretically support an extra "field" of worst case uncertainty in its quantity datatype as well.But I know the cost of adding such functionality "system wide" so I'm not likely to go down that road. But it's good to know of the current limitations.The initial purpose of propagating uncertainties wasn't "worst case analysis" at all, it was about how to display quantities with sensible sig figs.Besides that it can still be used to have an indication of "uncertainty issues". I think you mean the same, but using slopes (partial diffs) is in some case pretty tricky to calculate the effects of uncertainties. Especially when variables have large uncertainties. In that case both systems are likely not good enough.

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 09:09:30 pm
content: B.t.w. when using the root sum squared method, is there a way to calculate theminimal relative uncertaintyof the resulting value. When only the relative uncertainty (all equal) of the inputs is known (but not their values). I need to calculate/know that for each component configuration for some optimalisation, but haven't got a clue yet. (Will take 0, just to be safe)

author: alm
author_rank: Super Contributor
timestamp: April 13, 2022, 09:25:30 pm
content: Quote from: b_force on April 13, 2022, 07:06:43 pmWell, yes the absolute error will increase if you put things in series, but then you can use smaller values (with generally smaller absolute uncertainty) if you put resistors in series vs parallel. If you put N resistors in series (and let's keep things simple and conservative by assuming a rectangular distribution that can be added and not worry about central limit theorems), the partial derivative of the series resistance with respect to R1 will be 1, so if there are 10 resistors with a value that follows a rectangular distribution between 990 Ohm and 1010 Ohm (1k +/- 1%), the worst-case total uncertainty will be 100 Ohm for a 10 kOhm resistor, aka a 1% 10 kOhm resistor. If you parallel 10 resistors, the partial derivative with respect to R1 will be 1/100 (for small enough deviations between resistors so the partial derivative is roughly constant), but you need 100 kOhm resisotrs (with a rectangular distribution from 99 kOhm to 101 kOhm) to get a total resistance of 10 kOhm. So the worst-case total uncertainty will be 10 * 1 kOhm / 100 = 100 Ohm with a mean of 10 kOhm, or again a 1% 10 kOhm resistor. It works the same if you calculate with normal independent distributions (the math gets easier if you use conductance instead of resistance in the parallel case). So where do you see the difference, other than parasitics like lead resistance and leakage?

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 09:47:33 pm
content: Quote from: alm on April 13, 2022, 09:25:30 pmJust make those partial derivatives as mentioned in post 27 and you will see, that's the best answer I can give.But my main point was that the results cannever get betterthan the variable (resistor in this case) with the least amount of error, but always will be bigger,neversmaller.In your specific case of all resistors being equal, I guess you're right.With four resistors as an example, the total relative error is ΔRtot=4*ΔR=ΔR1+ΔR2+ΔR3+ΔR4 (since the derivative = 1 in all cases) and the total resistor is also Rtot=4*RMeaning that the total error in the end is the same,relativelyspeaking.Theabsoluteerror is bigger of course yes.

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 09:53:13 pm
content: Quote from: HendriXML on April 13, 2022, 09:09:30 pmWell the point with relative error is that you always have to calculate it for each component (or variable), since it's always relative?But this all depends in what you're looking for, sometimes one needs to know the absolute error instead.Never bigger than ±0.001 ohm for example independent of the value itself.Also little trick when reading a multimeter, since the error of an multimeter is relative (in percent).Often means that the last digit won't be the same for lower or higher values on the same range!!

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 10:49:28 pm
content: Quote from: b_force on April 13, 2022, 09:53:13 pmI think I've got a solution method to my root sum squared problem.Using config 13 and the rule: when two component are the same, the relative uncertainty is lowest:Take 100±1 (1%) for both A en B, resulting in 50±0.353553390593274.Match C with that value, the combination A,B,C resulting in: 100±0.612372435695795Match D with that value, the combination A,B,C,D resulting in: 50±0.293150984988965Resulting in a relative uncertainty of: 0,58630196997793%So theminimalrelative uncertainty is 0,58630196997793 of the input uncertainty.I could do that for every configuration and it will be fine I guess.

author: alm
author_rank: Super Contributor
timestamp: April 13, 2022, 11:12:29 pm
content: Quote from: b_force on April 13, 2022, 09:47:33 pmThat's true, but with components in parallel you need to start off with much larger values (and hence larger uncertainties). So while the uncertainties do get better as you parallel more resistors, the absolute uncertainty of the resistors started off much higher. If you are doing an academic exercise of arranging resistors, then a parallel combination gives you a lower absolute uncertainty. But if you are actually trying to achieve a particular resistance value, then I doubt it matters (maybe in some extreme cases?).Another example, 1 kOhm + 2 kOhm + 3 kOhm + 4 kOhm = 10 kOhm, and if all resistors were 1%, the uncertainty will be 10 Ohm + 20 Ohm + 30 Ohm + 40 Ohm = 100 Ohm (dR/Rn=1). Now for a parallel combination of 21k // 42k // 62k // 81k Ohm, the total resistance is 10.01 kOhm, and the uncertainty is again 100 Ohm.Quote from: b_force on April 13, 2022, 09:47:33 pmIf my case where it doesn't matter is so specific, can you give an example where a series combination of resistors with the same relative tolerance yields a larger uncertainty than a parallel combination of resistors with the same tolerance that yields the same total value?

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 11:28:56 pm
content: Quote from: alm on April 13, 2022, 11:12:29 pmTo be honest, I don't know, I just fill in the numbers, well equations, and that's itMaybe someone finds it a great exercise, lol.Point is still that the error is not going down, always up or maybe stays the same.Seen from the lowest error of all variables.

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 11:33:52 pm
content: Quote from: alm on April 13, 2022, 11:12:29 pmHmm I think I've misread the challenge...but anyway:Example:P: 2x101±1 = 50.5±0.353553390593274S: 50±0.5+0.5±0.005 = 50.5±0.500024999375031(Been lazy: not 100% accurate uncertainty values, but close enough)Hence the rule, if both values are the same (P or S) the relative uncertainty is minimal.

author: b_force
author_rank: Super Contributor
timestamp: April 13, 2022, 11:40:15 pm
content: Quote from: HendriXML on April 13, 2022, 10:49:28 pmbtw, all those many decimals is not needed (is that an EE thing or so?)In fact, physically even non existing (only in theoretical math).1% on 100 is ±1 at best, so all the answered technically can't be better than ±1 ohm.So the 50 ohm can never be better than 1% worst case.I will show you the other method, will take a while to get that done!

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 11:41:07 pm
content: This one is better?Example:P: 100±1 | 100000±1000 = 99.9000999000999±0.998003495006367S: 2*50±0.5 = 100±0.707106781186548(Been lazy: not 100% accurate values, but close enough. Had to edit this one as well. It's getting late..)

author: HendriXML
author_rank: Super Contributor
timestamp: April 13, 2022, 11:43:16 pm
content: Quote from: b_force on April 13, 2022, 11:40:15 pmNo just copy 'n pasting..

author: b_force
author_rank: Super Contributor
timestamp: April 14, 2022, 12:19:35 am
content: Quote from: HendriXML on April 13, 2022, 11:43:16 pmLol, no worries!Here are the expressions btwSome weird formatting thanks to Libre office, so it's the whole abs expression squared.Hopefully I didn't make a mistake or typoDo you have all the values for Ra, Rb, Rc and Rd ?

author: b_force
author_rank: Super Contributor
timestamp: April 14, 2022, 12:32:14 am
content: Well here the resultAssumed that the resistors are all equal to 100 ohm.

author: b_force
author_rank: Super Contributor
timestamp: April 14, 2022, 12:36:51 am
content: But all jokes aside, watch what happens when we change the tolerance of the individual resistors;So the contribution of Rd is the most significant, followed by Rc, than Ra and RbThis is exactly the reason why you want to do these kind of calculations.To see which variable is the most significant and needs to be the most accurateOneEXTREMELYimportant thing to mention, is that this WILL change drastically when values (and tolerances or errors) will be of different values!!!This will change the entire overall picture totally.So no general conclusions can be made!

author: arcnet
author_rank: Newbie
timestamp: April 15, 2022, 11:02:44 am
content: What could also be used here is guard bandinghttps://www.isobudgets.com/guard-banding-how-to-take-uncertainty-into-account/"Ultimately, you use guard band methods to prevent the occurrence of false acceptance (Type I Error) and false rejection (Type II Error) errors."

author: HendriXML
author_rank: Super Contributor
timestamp: April 15, 2022, 05:39:22 pm
content: In the metric I`ll be using the guard band is kind of represented by actual uncertainty / target uncertainty as an offset /addend. Its a nonconformity metric, so less is better.https://www.eevblog.com/forum/metrology/how-to-determine-wether-a-value-or-measurement-is-matching-a-specification/msg4102789/#msg4102789

author: alm
author_rank: Super Contributor
timestamp: April 17, 2022, 05:11:22 pm
content: Quote from: HendriXML on April 13, 2022, 11:33:52 pmThis difference has nothing to do with a parallel combination. If you compare a parallel combination using linear adding of uncertainties, you arrive at the exact same result (50.5 +/- 0.505). The difference only appears when you start assuming the central limit theorem applies, and calculate uncertainties as the root of the sum of squares. Because in the root of the sum of squares of two unequal value, the largest value counts much more (quadratically more) than the smaller value. That's why paralleling a large value with a smaller value gives a lower uncertainty with this calculation. Try doing the same math for two resistors with the same value in parallel, but a resistor with a much smaller resistor in series. For example two 50 +/- 0.5 Ohm resistors in series (giving you 100 Ohm +/- 0.7 Ohm, versus a 101 +/- 1.01 and 10111 +/- 101.11 resistor in parallel (giving you 100 Ohm +/- 0.99 Ohm). So what helped is making sure both resistors contribute the same to the total uncertainty, not paralleling them.Quote from: b_force on April 13, 2022, 11:28:56 pmWhile this statement is true, it's useless when it's about finding combinations of resistors that produce a target value with the smallest uncertainty, because the you are not comparing resistors with the same value in series vs parallel. And as I showed above, it's getting the absolute uncertainty close is what gives you the lowest total uncertainty. This aligns with the intuition that you want to design a system so the error budget is evenly distributed instead of having one "weak link". Because the chance that this one weak link has an extreme value in the long tail of the distribution (say > two sigma from nominal) is much higher than 10 different variables all having a value in the long tail of their distribution.

author: b_force
author_rank: Super Contributor
timestamp: April 17, 2022, 07:22:54 pm
content: Quote from: alm on April 17, 2022, 05:11:22 pmWell actually it does, one resistor will give the the smallest error.Otherwise two, etc etc etc.That being said, just putting multiple resistors in some kind of odd combination doesn't make any sense.Unless you need a values that don't fit in any E-series.As for statistically examples, I would go for worst case, not best case.10 resistors might as well all have a systematic bias or drift in one direction.Point is, you just never know unless you verify.So sorry, but the idea of 10 resistors likely being better on average doesn't hold up I think.Again I don't know what the whole idea is of this circuit, but even 0.1% is pretty cheap these days.

author: alm
author_rank: Super Contributor
timestamp: April 17, 2022, 07:45:25 pm
content: Quote from: b_force on April 17, 2022, 07:22:54 pmCan you elaborate? Why would a single resistor have a lower uncertainty than two resistors?I mean, obviously in a production unit you are not going to make some complex resistor network to achieve a value you can easily order, unless there's some other reason like sharing load / reducing parasitics (two 100 Ohm in parallel to make a 50 Ohm termination), tunability (cut resistors from the network to achieve a particular value), temperature coefficient compensation (that's why the Fluke 742A standard resistor has a bunch of parallel resistors), etc, for the simple reason of the extra costs and complexity (BOM, assembly, etc) compared to the costs of a better resistor.Quote from: b_force on April 17, 2022, 07:22:54 pmFair enough, so you linearly add all uncertainties, and it doesn't matter if you do parallel or series combinations to achieve a value.Quote from: b_force on April 17, 2022, 07:22:54 pmWhy not? It may not be \$\sqrt{N}\$ better, as the central limit theorem would imply for \$N \to \infty\$, but I would still expect the uncertainty to go down. The systematic deviation will be there no matter the number of resistors, but there will always be some random component to the value, and averaging resistors (which is what combining them does) reduces this random component. So I'd think it will always be slightly better. However, that indeed won't be worth it for 99.9% of real-world applications.

author: b_force
author_rank: Super Contributor
timestamp: April 17, 2022, 08:31:07 pm
content: Quote from: alm on April 17, 2022, 07:45:25 pmDo the math youself, in short, because the total relative error only has one variable.Any additional part will have more variables, and therefor the total error will be higher.Will have more variables in the equation.One resistor only will have dR.Multiple resistors will have dR1 + dR2 + dR3 + dRxSo byDEFINITIONthe total error MUST be higher.We only have seen before that in some situations the total will be equal to just one resistor.So that means there is no benefit of using multiple ones.The ultra short answer; because of math.I know showed it several times in how to do these calculations, so after a while I expect that someone can do it as well.

author: b_force
author_rank: Super Contributor
timestamp: April 17, 2022, 08:35:42 pm
content: Quote from: alm on April 17, 2022, 07:45:25 pmUsing the standard deviation and standard error is a little strange to use in this way.One would use those things the other way around.So we take a sample of a some readings and afterwards want to know how well we know the average (the standard error) and how much spread we might expect based on the sample size we took (the standard deviation), based on either 2 or 3 sigma (95% and 99.8%).In other words, it's being used during and/or after doing practical experiments.For technical design it doesn't make any sense at all to use this, because it can be done with the method of relative error.Again, please fill in the numbers and you will see all the answers in front of you.I am very sorry and apologies, but just don't know how to explain this otherwise.edit; one other way is to do some monte carlo simulations with the tolerances.But you simply will get the same answer.

author: alm
author_rank: Super Contributor
timestamp: April 17, 2022, 09:13:16 pm
content: Quote from: b_force on April 17, 2022, 08:31:07 pmUnless you express some relationship between dR and dR1, dR2 etc, then no, what you state is not true by definition. Actually, if R1+R2+R3+...+Rx = R, and the relative tolerance is the same for all resistors, then dR1+dR2+dR3+...+dRx = dR. So your claim that a single resistor will always have a lower uncertainty is wrong. Do you get a lower uncertainty while combining multiple resistors, that depends on how you model the resistors. For a rectangular distribution it will be the same, no better, but no worse either.Quote from: b_force on April 17, 2022, 08:35:42 pmCombining resistors helps if you know something about the distribution of parameters like resistance. That would indeed require measuring a lot of them, or working closely with the manufacturer. That's what I'm sure what Fluke did (since they made those precision wire wound resistors themselves) when they designed theFluke 742A, andWekomm(who worked closely with Vishay Precision Group). If you want better performance than the resistor manufacturers can give you, that's what you do.Going through this with bog-standard 1% resistors is kind of ridiculous, of course. Then you'd just order a 0.1% resistor instead. But we are in the metrology section here.

author: HendriXML
author_rank: Super Contributor
timestamp: April 17, 2022, 09:15:23 pm
content: Quote from: alm on April 17, 2022, 05:11:22 pmThat's the whole reason I'm upgrading my simulation with the option of using a metric which also takes uncertainties in consideration instead of just the closeness of the combined result. Without the metric the simulation might wel take values that are far from each other. When the simulation parallels a 1k resistor with a 1M resistor. The 1M is dwarfed by the uncertainty of the 1k. So a better combination would maybe take some values closer to each other.I understand the metric makes assumptions on the distribution of the tolerances, which may not be consistent with what's on the market.But the simulation still can be used for decision support anyways. And having the option to take uncertainty into account can be of use: it may propose different, probably more "sensible" combinations.In practice combining just 3 resistors can reach a precision much better than the resulting accuracy when using affordable components.https://www.eevblog.com/forum/projects/how-about-combining-some-components/msg4087474/#msg4087474But the option of 4 component combinations is still a nice feature to me. This is kind of where the e-hobby leads me to (.... not making great or even actual circuits). But I like the feadback from engineers out of the field.

author: b_force
author_rank: Super Contributor
timestamp: April 17, 2022, 10:14:12 pm
content: Quote from: alm on April 17, 2022, 09:13:16 pmThan yes and no it's not wrong, just follow the math (which you haven't done it seems?), the information I gave you before, that's literally all I can give you. Next is try to read a bit more careful, because i alsoLITERALLYsaid that AT BEST it will be the same, but it will and can NEVER be lower.I have also been doing this for almost 15 years, but you're allowed to believe whatever you want of course.I like to keep my methods to physics and math, this method is even used in all kinds of notified bodies (aka calibration companies like NMI etc)Bit done with contributing if people don't seem to follow up the math and calculate those things by themselves even more so when those methods are unfamiliar and new territory. As well as some respect for the fact that someone (I ) took actually the effort and time to derive and calculate this whole thing for free.I am sorry, I must be an horrible person.The only counter argument I would fully take if someone would have said that this linear uncertainties are maybe debatable and very simplified and non-linear expressions should be used. Although for an extremely simple resistor network I would have find that a bit of a stretch, that is technically correct.Non-linear error analysis is a whole deep rabbit hole on its own, people graduate and get their PhD on that subject alone.

author: alm
author_rank: Super Contributor
timestamp: April 18, 2022, 06:53:13 pm
content: I have gone through the math several times, and also done Monte Carlo simulations to verify. How would I have come up with all those examples without doing the math? It's just that the math disagrees with what you say. Don't blame the messenger!Treating uncertainties of resistors as rectangular (uniform) distributions (linear addition)For the specific case of two resistors in series, it's trivial to see that if \$R_s=R_{1s}+R_{2s}\$, and both resistors have a tolerance \$\alpha\$ (\$\alpha=0.01\$ for a 1% resistor), then:$$\Delta R_s = \frac{\partial R_s}{\partial R_{1s}}\alpha R_{1s}+\frac{\partial R_s}{\partial R_{2s}}\alpha R_{2s} = \alpha (R_{1s} + R_{2s}) = \alpha R_s$$Similarly, for two parallel resistors so \$R_p=\frac{1}{\frac{1}{R_{1p}} + \frac{1}{R_{2p}}}\$, and both resistors have a tolerance \$\alpha\$, then:$$\Delta R_p = \frac{\partial R_p}{\partial R_{1p}}\alpha R_{1p}+\frac{\partial R_p}{\partial R_{2p}}\alpha R_{2p} = \alpha\frac{R_{1p}R_{2p}}{R_{1p} + R_{2p}} = \alpha R_p$$Now given the associative properties of the series and parallel operator within linear circuits, so R1 + R2 + R3 = (R1 + R2) + R3 = R1 + (R2 + R3), and R1 // R2 // R3 = (R1 // R2) // R3 = R1 // (R2 // R3), and the substitution theorem for linear circuits, it follows that for any two-terminal linear circuit consisting of a set of n resistors R1, R2, ..., Rn with tolerance \$\alpha\$ and a resistance R between the two terminals, the uncertainty of this resistance will be \$\alpha R\$. I'm pretty sure you could expand this to the complex plane to also incorporate capacitors and inductors.Treating uncertainties of resistors as normal distributions (root of sum of squares)Here things get more complicated, and I don't feel like doing the same rigorous proof here, but based on Monte Carlo simulations, and the fact that for any set of resistors R1..Rn with tolerance \$\alpha\$ such that \$R_1+R_2+\cdots+R_n=R\$, the minimum of \$\sqrt{\Delta R_1^2+\Delta R_2^2+\cdots+\Delta R_n^2}\$ is at \$\Delta R_1=\Delta R_2=\cdots=\Delta R_n\$, I'm pretty confident that the lowest uncertainty is if all resistors contribute the same to the total uncertainty (whether they are parallel or series). So for example 100 // 100 + 25 would have a lower uncertainty than 50 // 50 + 50 assuming all resistors have the same tolerance. Also, the more resistors, the lower the total uncertainty using this calculation.

author: HendriXML
author_rank: Super Contributor
timestamp: April 18, 2022, 10:21:50 pm
content: Quote from: alm on April 18, 2022, 06:53:13 pmThe lowest uncertainty would probably be when 75 || 75 + 37.5For me this important because I may need the correct method of determining it for some rejection threshold optimalisation. (And it seems to work out)

author: alm
author_rank: Super Contributor
timestamp: April 19, 2022, 10:16:25 am
content: Quote from: HendriXML on April 18, 2022, 10:21:50 pmI get a lower uncertainty with 100 // 100 + 25 (0.43 Ohm instead of 0.46 Ohm in MC simulation with 100k iterations). My logic is that 100 // 100 is twice as large as 25, so it will contribute twice as much to the total uncertainty, but this is the result of paralleling two resistors. So the contribution per resistor is the same.A more general way would be determining the partial derivative towards the value of each resistor, multiplying by absolute uncertainty of the resistor, and optimizing so these values are as close as possible. Taking into account practical things like E... values etc.

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 12:04:54 pm
content: Quote from: alm on April 19, 2022, 10:16:25 amDid you simulate with a gaussian distribution?

author: alm
author_rank: Super Contributor
timestamp: April 19, 2022, 01:30:48 pm
content: Yes, normal distributions with the nominal value as mean and 0.01 times the nominal value as standard deviation. Multiplying the standard deviation with a constant factor won't change the results except that all uncertainties will be multiplied by the same factor.

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 02:09:16 pm
content: Your simulations are consistent with the calculations..I now see I didn't take your best guess.. (only the one I thought that would be better)At least I now know my hypothesis about the method was invalid.

author: alm
author_rank: Super Contributor
timestamp: April 19, 2022, 02:22:00 pm
content: Glad to be of service

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 05:02:31 pm
content: This expression calculates the resulting tolerance/input tolerance$$\frac{\left( B+A\right) \sqrt{\left( {{B}^{4}}+4 A {{B}^{3}}+6 {{A}^{2}} {{B}^{2}}+4 {{A}^{3}} B+{{A}^{4}}\right) {{C}^{2}}+{{A}^{2}} {{B}^{4}}+{{A}^{4}} {{B}^{2}}}}{\sqrt{{{B}^{4}}+4 A {{B}^{3}}+6 {{A}^{2}} {{B}^{2}}+4 {{A}^{3}} B+{{A}^{4}}} \left( \left( B+A\right) C+A B\right) }$$When I seacrh for a minimum in Maxima I get:Code:[A=1.330838982814392,B=1.330838982814392,C=0.3327058050538422]Substituting:Code:0.5773502691986249That is the number I need for each configuration. So I think I'll use Maxima to determine it mathematically (might be an approximation).Using your values (100, 100, 25) one gets:$$\frac{1}{\sqrt{3}}$$Which is probably spot on. (0.5773502691896258).

author: alm
author_rank: Super Contributor
timestamp: April 19, 2022, 05:37:08 pm
content: Quote from: HendriXML on April 19, 2022, 05:02:31 pmIf that's the sum of the partial derivatives towards each resistor times their resistance, then minimizing that is indeed a valid (brute-force) method. I'm on mobile, which doesn't render MathJax, so reading the expression is a bit roughQuote from: HendriXML on April 19, 2022, 05:02:31 pmFunny, that corresponds with A=B=4*C, which has the same ratios as my best guess.Quote from: HendriXML on April 19, 2022, 05:02:31 pmMaxima is returning floating point numbers, so it clearly used a numeric algorithm to calculate the derivative and find the roots. But there's nothing wrong with that as long as performance is satisfactory in terms of speed and accuracy.

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 05:52:36 pm
content: It's a value that I can precalculate for each configuration.It might be used to determine if a combination is still a candidate for the best metric, after the resulting value is calculated (fast).For the metric uncertainties need to be calculated, which is a lot slower. Rejecting more false candidates will speed things up.However I did a benchmark, and slowest configuration in terms of uncertainty calculations is still 25 mega calculations/s.However -whether a resulting value is a candidate- window expressions cannot be solved by maxima entirely yet.

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 06:12:09 pm
content: To summarize the purpose of the uncertainty determination as part of the metric:When the metric is used when simulating the combination 100||100+25 will thus be the best match, instead of for instance 50||50+50.Because this would give the same precision but a bit better accuracy.Also the metric will give easy insight whether the high precision that can be reached by combining 3 or 4 components is significant at all. That makes comparing configurations more easy.

author: alm
author_rank: Super Contributor
timestamp: April 19, 2022, 07:38:58 pm
content: I would like to highlight the comment b_force made earlier that treating a combination of a few resistors as normal distributions is optimistic. With this approach you are either assuming the individual resistor values are normally distributed and independent (if both 100 Ohm resistors are from the same batch, how independent are they?), or that you have so many components contributing to the uncertainty that the central limit theorem applies. I find neither case particularly plausible for a combination of four resistors. Even if you measure a bunch of resistors and find them to be normally distributed, the manufacturer might introduce a new 0.5% series selected from the 1% resistors, and the distribution would become bimodal with the center -0.25% to +0.25% missing (they would apply some guard-banding). So in this case my choice would be to calculate with uniform distributions and do linear addition of errors. The advantage is that this makes the math much easier, as I showed earlierI like Leslie Green's rule-of-thumb:Quote from: Leslie Green - Analog SeekretsThe entire chapter 3 ofhis bookwould be a good read if you haven't yet.

author: HendriXML
author_rank: Super Contributor
timestamp: April 19, 2022, 08:54:30 pm
content: I have primarily a collection of AliExpress "2%" resistors, I have pretty low electronics skill and a good amount of brain damage limiting much progression beyond that.So I'm not that worried about therealdistribution of them resistorsIn practice I also cherry pick them, which means I'll end up with a U shaped distributionBut thanks for the link! I'll give it a look.For now I'll be using the uncertainty expressions that I've spend time on optimizing. For me exploring techniques of doing things is the most important.I like to calculate circuits and that's also done using std uncertainties. This simulating stuff will be part of that, so it's more consistent to keep it like that.It doesn't need to be perfect: the metric is not validated in practice as well.

author: HendriXML
author_rank: Super Contributor
timestamp: April 20, 2022, 09:49:47 am
content: I changed the metric into using relative uncertainties.$$\operatorname{Metric}\left( T\operatorname{,}A\operatorname{,}{\mathrm{Turel}}\operatorname{,}{\mathrm{Aurel}}\right) \operatorname{:=}\frac{\left| \log{(T)}-\log{(A)}\right| }{\log{\left( {\mathrm{Turel}}+1\right) }}+\frac{{\mathrm{Aurel}}}{{\mathrm{Turel}}}$$That makes it solvable for getting a candidate window (gate to further calculations).$${A_{{\mathrm{rejectlow}}}}=T {{\% e}^{\frac{{A_{{\mathrm{urmin}}}} \log{\left( {T_{{\mathrm{urel}}}}+1\right) }}{{T_{{\mathrm{urel}}}}}-{M_{{\mathrm{best}}}} \log{\left( {T_{{\mathrm{urel}}}}+1\right) }}}$$$${A_{{\mathrm{rejecthigh}}}}=T {{\% e}^{{M_{{\mathrm{best}}}} \log{\left( {T_{{\mathrm{urel}}}}+1\right) }-\frac{{A_{{\mathrm{urmin}}}} \log{\left( {T_{{\mathrm{urel}}}}+1\right) }}{{T_{{\mathrm{urel}}}}}}}$$$${A_{{\mathrm{urmin}}}}$$ is the minimal relative uncertainty for each configuration.If it passes these bounds (which only needs to be calculated when there's a new best combination) the actual uncertainty will be determined.Because actual uncertainty is calculated with a Sqrt (slow), the squared uncertainty might first be checked against its own "next best" window. Only truly better metrics will pass that one.

author: HendriXML
author_rank: Super Contributor
timestamp: April 20, 2022, 12:50:38 pm
content: I've let Maxima determine the optimal combinations for the lowest resulting relative uncertainty. Then I did some puzzling, to get to the right ratio's. Those where then used in substituting the variables. The results are the resulting tolerance / input tolerance.One could say the max uncertainty improvement for each configuration (gaussian distribution):Code:(mintolA)1(mintolAsB)1/sqrt(2)(mintolApB)1/sqrt(2)(mintolAsBsC)1/sqrt(3)(mintolApBpC)1/sqrt(3)(mintolApBsC)1/sqrt(3)(mintolAssBpC)1/sqrt(3)(mintolAsBsCsD)1/2(mintolApBpCpD)1/2(mintolApBsCsD)1/2(mintolAssBpCpD)1/2(mintolAssBpCsD)1/2(mintolAppBssCpD)1/2(mintolAssBssCpD)1/2(mintolApBpCsD)1/2(mintolAssBpCssD)1/2(mintolApBsCpD)1/2$$\tag{A} 1$$$$\tag{A+B} \frac{1}{\sqrt{2}}$$$$\tag{A||B} \frac{1}{\sqrt{2}}$$$$\tag{A+B+C} \frac{1}{\sqrt{3}}$$$$\tag{A||B||C} \frac{1}{\sqrt{3}}$$$$\tag{A||B+C} \frac{1}{\sqrt{3}}$$$$\tag{A+B||C} \frac{1}{\sqrt{3}}$$$$\tag{A+B+C+D} \frac{1}{2}$$$$\tag{A||B||C||D} \frac{1}{2}$$$$\tag{A||B+C+D} \frac{1}{2}$$$$\tag{A+B||C||D} \frac{1}{2}$$$$\tag{A+B||C+D} \frac{1}{2}$$$$\tag{A||B+C||D} \frac{1}{2}$$$$\tag{A+B+C||D} \frac{1}{2}$$$$\tag{A||B||C+D} \frac{1}{2}$$$$\tag{A+B||C+D} \frac{1}{2}$$$$\tag{A||B+C||D} \frac{1}{2}$$

author: HendriXML
author_rank: Super Contributor
timestamp: April 20, 2022, 12:56:20 pm
content: The ratio's are:Code:A+B: [A=1];A+B: [A=1, B=1];A||B: [A=1, B=1];A+B+C: [A=1, B=1, C=1];A||B||C: [A=1, B=1, C=1];A||B+C: [A=4, B=4, C=1];A+B||C: [A=1, B=1, C=4];A+B+C+D: [A=1, B=1, C=1, D=1];A||B||C||D: [A=1, B=1, C=1, D=1];A||B+C+D: [A=4, B=4, C=1, D=1];A+B||C||D: [A=1, B=1, C=4, D=4];A+B||C+D: [A=9, B=9, C=36, D=4];A||B+C||D: [A=4, B=4, C=1, D=9];A+B+C||D: [A=1, B=1, C=1, D=9];A||B||C+D: [A=9, B=9, C=9, D=1];A+B||C+D: [A=1, B=1, C=1, D=1];A||B+C||D: [A=1, B=1, C=1, D=1];

author: HendriXML
author_rank: Super Contributor
timestamp: April 20, 2022, 01:05:53 pm
content: I think it's nice that the improvement is 1/sqrt(n), where n is the number of components and that it's independent of the configuration!. Valid for 1 <= n <= 4, but is probably also valid for n > 4 as well.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 20, 2022, 08:50:58 pm
content: Quote from: HendriXML on April 20, 2022, 01:05:53 pmThe 1/sqrt(n) improvement is valid only if all the parts get the same weight on 1/n, like in a sereis connection of equal resistors. It does not apply if some parts have more weight than others (e.g. 2 in parallel with 1 in series) - the andvantage is than reduces.The case with a small number of parts (or a few dominating the uncertainty) is the tricky one and for the uncertainty one may not use the simple RSS rule, and things depend on details of the error distributions. To be on the safe side one may have to assume a larger uncertainty.It is with a large number of parts involved and if they are really independent / uncorrelated tha the squart root (n) rule really works. The sum of many small contribtions to the variartions approaches a normal distribution and thus gives a justification for the RSS summing.

author: HendriXML
author_rank: Super Contributor
timestamp: April 21, 2022, 12:56:12 am
content: Quote from: Kleinstein on April 20, 2022, 08:50:58 pmI would have thought that as wellI was quite surprised when the results where shown.I've posted an example from a different source where it also shows 1% -> 1%/sqrt(4)=0.5%

author: alm
author_rank: Super Contributor
timestamp: April 21, 2022, 06:32:40 am
content: The resistors do have the same weight: while some are connected in parallel and others are in series, the values are adjusted so their contribution to the total resistance is the same (partial derivatives are equal). That's what gives the lowest uncertainty exactly because of this sqrt(N) factor.The caveats re number of resistors and independence of course apply.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 21, 2022, 07:28:20 am
content: The partial derivaives depend on the circuit. With the more simple or symmetric parallel and series circuits one can get the same weight for all resistors, this is no longer the case with more asymmetric parallel / series combinations. With equal resistors the question is if all resistors see the same voltage.

author: tszaboo
author_rank: Super Contributor
timestamp: April 21, 2022, 08:21:39 am
content: You cannot put 3 1% resistors in parallel and expect to get better than 1% as result. It is because the 1% specification is not because of measurement errors, but because of binning. And you rarely need more than 1% specification for anything in EE, and if you do, that is a critical component, and some of the engineering will go into that. If you need a 0.01% resistor with custom value, you order one, and they will make it specifically for you. As I tried to explain it in the other thread: You estimations for accuracies is off by orders of magnitude, and there is no real word use case for the software you are writing.

author: HendriXML
author_rank: Super Contributor
timestamp: April 21, 2022, 02:07:35 pm
content: Quote from: tszaboo on April 21, 2022, 08:21:39 amI've come to realize that for some time now and I still have gone through the trouble...Quote from: tszaboo on April 21, 2022, 08:21:39 amThere's a huge difference between executing some tasks as a hobby and doing professional electronics enginering.I really don't mind if it's not that usable in general/professionally.Maybe I'll be using it less than 10x. Then I go to my collection of "2%" ali express resistors, pick them, repeatitly until one of them measures OK. Then I'll put them in the right configuration and measure the replacement value being very close and think great software!Anyways I won't be buying custom made resistors for my circuits....IMO most hobbies are "useless" from a professional perspective, and being quite expensive doing electronics has a high ranking on that list.But I'm gonna be honest about not having laid a golden egg. But some people might still be interrested in the process of developing these simulations. And maybe even the results as a means to think about this stuff.

author: b_force
author_rank: Super Contributor
timestamp: April 22, 2022, 01:00:53 pm
content: Quote from: tszaboo on April 21, 2022, 08:21:39 amThe reason is because we just simply don't know.It could be your lucky day and that the resistors are nice and evenly distributed like on can expect from a normal distribution.It could also be a bad day and all of them have a shift of 0.95%.But maybe that's what you mean with "binning"?Most important point is, we simply don't know.Second, 3 resistors is not enough. One can't use a normal distribution on such a low number.Five is the absolute bare minimum (rule of thumb), but really the BARE minimum.If one would use 50 different resistors, from different manufactures, from different years, different batches I would say that it's more likely they follow a normal distribution. Which may as well also just prove the 1% error.But again, you can only know by testing it, not before hand.

author: HendriXML
author_rank: Super Contributor
timestamp: April 22, 2022, 03:16:17 pm
content: I agree to that.Besides that I think the uncertainty part of the metric might still be usefull when cherry picking components.https://www.eevblog.com/forum/projects/how-about-combining-some-components/msg4131715/#msg4131715Which could be handy in non-professional or prototyping situation.

author: HendriXML
author_rank: Super Contributor
timestamp: April 23, 2022, 10:24:26 am
content: One thing which I suspect to be a funny (but probably explainable) side effect of the metric is that it chooses a combination of resistors in which the spread of power consumption is (partly) optimized as well. (Lower spread). This means the self heating is more the same between them, and there's also less of it.This would mean an improvement in thermal stability.So I think the simulations can be of use in creating cheap "custom resistors" for the hobbyist. Especially now that I've planned on simulatingmeasuredresistors as a second phase.Cherry picking a very precise replacement value.After that I'll try to find out whether the stability is any good. Both resistance wise, but also part of a voltage divider of similar resistors.

author: HendriXML
author_rank: Super Contributor
timestamp: April 23, 2022, 10:45:17 pm
content: Quote from: b_force on April 22, 2022, 01:00:53 pmThe resistor combination can/will also be part of circuit where other components have some uncertainties as well. So circuit globally or in case of many copies of a circuit, it can still be better to have even a bit better combined uncertainty. It's only not something one can rely upon. If garanties are needed, one must pay extra coin for better components.Not that I mind the professional "uselessness" of my simulation scripts, I still like to put the simulation software aside from the fruitfull discussions about uncertainties, tolerances etc. (Which where insightfull to me, thanks! But also had the potential to stall the progression of them scripts)I started these simulations not with the idea of improving uncertainties. But just as some tool to get a certain (undetermined) resistor value out of a some combination. Thus not knowing the needed value on forehand, but as a result of other calculations. And when the circuit is ready and completely (re)calculated it can be build right away out of cheap components. Not per se needing super accuracy.That's a real world use case to me.What I then found out (surprice, surprice) is that the precision can get wel beyond the input tolerances. So it's nice to have a way to express how well the combination matches the requested value. This is where the metric is needed for. Instead of the sometimes very small relative differences - which are meaningless- it's a more sensible value that takes tolerances into account. So the metric is dependend on the distribution - but not entirily flawed because of it.If one has a metric, expressing the fit of what's requested and the combination result, than it's also a nice feature to have it as a optional simulation criteria.Secondly I previously made a script that can read and store resistor values pretty quickly using a bluetooth button along 2 kelvin clips.Which got me thinking about getting high precision replacement values, when combining different measured resistors.Which resistor values are suited as inputs and are on stock are nicely reported by the script. Having 4 components in such a combination gives more ways of combining and will contribute to better "real world" precision especially when the inputs are pretty far off. (Seem usefull to me) I'm pretty curious what precision can be reached and how stable it will be. But will put that in a seperate thread.