How do I learn RPL and solve this problem with it?
09-25-2017, 06:36 PM (This post was last modified: 09-25-2017 06:52 PM by mfleming.)
Post: #17
 mfleming Senior Member Posts: 362 Joined: Jul 2015
RE: How do I learn RPL and solve this problem with it?
(09-25-2017 05:39 PM)pier4r Wrote:  Anyway I had to stop the process because after 20+ hours it was not finished.

Hi guys,

I believe you've been misled by the OP's approach of pre-computing all possible values of two resistors in parallel (combinatorial explosion), when in reality there are only a few combinations of two resistors that will meet the original criteria of being within 1% of the desired resistance value.

Consider Req = R1 || R2 = R1*R2/(R1+R2). If R1 = R2, then R1 & R2 = 2*Req. Neither R1 or R2 can be less that Req which puts a lower bound on the values we can choose. Also notice that if R2 increases to infinity then the computed Req value will converge on R1. If 2*Req happens to be a valid discrete resistor value, pick two resistors of that value and we're done.

Highly unlikely though, so pick R1 and R2 such that they bracket 2*Req. If we maintain that R1 is less than 2*Req, then there are only a few discrete resistor values that satisfy the constraint Req < R1 < 2*Req. Furthermore if R1 is fixed and R1 || R2 > Req, then any further increase in the value of R2 will only diverge from the desired Req value.

To use pier4r's example value of 177 for Req, 2*Req is 354 which is not a valid discrete resistor value. So choose R1=330 and R2=390. According to the previous constraint, the discrete value of R1 can only be 180, 200, 270, 300 and 330.

330||390 = 178.8 which is greater than 177, so no point increasing R2 any further. We will need to decrease R1 and compute again.

300||390 = 169.5 < 177 and 300||470 = 183.1 > 177 so keep the value of R2 and decrease the value of R1 again.

270||470 = 171.5 < 177 and 270||560 = 182.1 > 177 so again keep the value of R2 and decrease the value of R1.

I won't bore you with the rest of the series, but there are obviously a limited number of pairs to examine. Keep them sorted by how close they are to the desired resistor value and pick the closest pair.

Give this a try in RPL!
~Mark

Cui Bono?
 « Next Oldest | Next Newest »

 Messages In This Thread How do I learn RPL and solve this problem with it? - setq - 09-24-2017, 12:48 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-24-2017, 01:29 PM RE: How do I learn RPL and solve this problem with it? - HP67 - 09-24-2017, 01:44 PM RE: How do I learn RPL and solve this problem with it? - John Keith - 09-24-2017, 03:03 PM RE: How do I learn RPL and solve this problem with it? - setq - 09-24-2017, 03:18 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-24-2017, 03:21 PM RE: How do I learn RPL and solve this problem with it? - HP67 - 09-24-2017, 04:06 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-24-2017, 04:10 PM RE: How do I learn RPL and solve this problem with it? - HP67 - 09-24-2017, 04:14 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-24-2017, 04:17 PM RE: How do I learn RPL and solve this problem with it? - HP67 - 09-24-2017, 04:25 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-24-2017, 06:02 PM RE: How do I learn RPL and solve this problem with it? - Brad Barton - 09-24-2017, 06:35 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-25-2017, 05:48 AM RE: How do I learn RPL and solve this problem with it? - HP67 - 09-25-2017, 04:08 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-25-2017, 05:39 PM RE: How do I learn RPL and solve this problem with it? - mfleming - 09-25-2017 06:36 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-25-2017, 08:27 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-26-2017, 06:03 AM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-26-2017, 02:50 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-26-2017, 02:55 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-26-2017, 06:37 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-26-2017, 06:57 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-26-2017, 08:22 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-25-2017, 07:10 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-25-2017, 07:41 PM RE: How do I learn RPL and solve this problem with it? - David Hayden - 09-25-2017, 07:55 PM RE: How do I learn RPL and solve this problem with it? - emece67 - 09-25-2017, 08:04 PM RE: How do I learn RPL and solve this problem with it? - Gerson W. Barbosa - 09-26-2017, 04:37 PM RE: How do I learn RPL and solve this problem with it? - Dieter - 09-26-2017, 07:01 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-26-2017, 08:25 PM RE: How do I learn RPL and solve this problem with it? - Dieter - 09-26-2017, 08:36 PM RE: How do I learn RPL and solve this problem with it? - David Hayden - 09-25-2017, 08:17 PM RE: How do I learn RPL and solve this problem with it? - brickviking - 09-26-2017, 01:02 AM RE: How do I learn RPL and solve this problem with it? - John Keith - 09-26-2017, 12:06 PM RE: How do I learn RPL and solve this problem with it? - Claudio L. - 09-26-2017, 02:29 PM RE: How do I learn RPL and solve this problem with it? - David Hayden - 09-26-2017, 01:02 PM RE: How do I learn RPL and solve this problem with it? - Dieter - 09-26-2017, 06:20 PM RE: How do I learn RPL and solve this problem with it? - Didier Lachieze - 09-26-2017, 06:46 PM RE: How do I learn RPL and solve this problem with it? - pier4r - 09-26-2017, 10:20 PM

User(s) browsing this thread: 1 Guest(s)