For Mr. Larkin, re: turns ratio

I saw the thread you started on calculating turns ratio, and while it's not an "online tool" exactly, I wrote this little script that you can run in the browser:

formatting link

It calculates a set of rational approximations to your desired turns ratio within a given tolerance and maximum number of turns, and sorts by them top to bottom by smallest absolute error. It uses a Stern-Brocot tree, which was a method used by clockmakers to determine gear ratios - essentially a type of binary search.

formatting link

Finding rational approximations for a given ratio is also possible via brute-force, but has a time complexity of O(n^2) in the number of turns. The Stern-Brocot algorithm has time complexity O(log(n)), so if you need to design a transformer with a million turns in a hurry it might be your best bet.

The results for your given turns ratio, less than 1e-6 absolute error and 10,000 max turns are:

6777/6193: absolute error: 1.61473e-08, relative error:1.47558e-08 4166/3807: absolute error: 2.62674e-08, relative error:2.40038e-08 2611/2386: absolute error: 8.38223e-08, relative error:7.6599e-08 1555/1421: absolute error: 2.11119e-07, relative error:1.92926e-07 1056/965: absolute error: 5.18135e-07, relative error:4.73485e-07
Reply to
bitrex
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.