0

I am working with the following equation (parallel resistors):

$\frac{1}{R_g} = \frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3}$

The values of $R_1, R_2$ and $ R_3$ are discrete - lets say 256 steps in increments of 3: $$R_1,R_2,R_3 \in \{3n : 1 \leq n \leq 256\}$$

Given some $R_g \in \mathbb R$, I want to find the best of choice of $R_1, R_2$ and $R_3$ so that they come closest to the value $1/R_g$ as per the equation above. In other words, I want to minimize the following: $$\left| \frac 1 {R_1} + \frac 1 {R_2} + \frac 1 {R_3} - \frac 1 {R_g} \right|$$ My current solution is a look up table or calculating values on the fly until the error is small enough.

This sounds not very smart and I want to believe that there is a more intelligent solution.

Is there?

Myridium
  • 2,583
  • 1
    Optimal in what sense and what are you trying to optimize? What error are you talking about? Try to define your question clearly and make it self contained. – Paul Apr 14 '15 at 10:31
  • 1
    I think this could be a good question if it was edited appropriately. Are you trying to ask how to obtain the closest value to $1/R_g$ given a certain set of allowed values for $R_1$, $R_2$ and $R_3$? – Myridium Apr 14 '15 at 10:36
  • @ Myridium: Yes - please advise if further clarifaction is necessary – Erik5000 Apr 14 '15 at 11:37
  • @Erik5000 Since this is math.stackexchange, I would suggest wording the question with minimal reference to the circuitry itself. i.e. "Given that I can choose $R_1$, $R_2$ and $R_3$ from this set: ${3n : 0 \leq n \leq 256}$, what method can I use minimize $| 1/R_1 + 1/R_2 + 1/R_3 - 1/R_g|$? (where I choose $R_g$)" – Myridium Apr 14 '15 at 11:58
  • @ Myridium - very sleek!, thank you very much. – Erik5000 Apr 14 '15 at 12:33

1 Answers1

0

You have a cubic equation really and you want to minimize the expression (acd+abd+abc-bcd)/abcd with given discrete values. In the ideal case (the equation is verified) you have 0 but if not I think you have min/Max as an option.

Piquito
  • 29,594
  • I can follow you to $\frac{R_1 R_2 R_3 + R_1 R_2 R_g + R_1 R_3 R_g + R_2 R_3 R_g}{R_1 R_2 R_3 R_g}$. So, do you want to say that the error can be Zero at best, but there is no chance to get a solid approximation? I'm confused, please elaborate ;) – Erik5000 Apr 14 '15 at 14:09
  • I did not want to give a solution but a hint to find it. The calculation being with discrete values, at first sight I see no other way to compute the resulting possible values; however it could be some shortcuts of course, according to the question (it seems to me that the given quotient min over Max could works maybe). – Piquito Apr 14 '15 at 14:39