Message Boards Message Boards

2
|
7621 Views
|
4 Replies
|
10 Total Likes
View groups...
Share
Share this post:
GROUPS:

Optimum number of cog teeth for two step helical gearbox

Posted 11 years ago
Hi, guys!

I am to design a  two step gearbox. The first step is to choose the number of teeth in each cog wheel in order to achieve a gear ratio of 17.3. In other words:
(N1 N2)/(n1 n2) == 17.3
where N1 and N2 are the number of teeth in gear 1 and 2, and n1 and n2 are the number of teeth in pinion 1 and 2. Is it possible to get Mathematica to "guess" the lowest number of teeth possible and still get as close as possible to 17.3? The number of teeth in the pinions must not be lower than 20. In addition, the number of cog teeth in the gears must not be divisible, i.e. only common factor has to be 1.


Thanks for any help.
POSTED BY: Julian Lovlie
4 Replies
Part of what makes this tricky is that you have two separate goals.

Here is a simple approach: 

Consider all possibilities with 20<=n1, n2<=30 and 1<=N1,N2<=100 and whose ratio is closest to 17.3 (ignore the total number of pegs)
SortBy[Tuples[{Range[100], Range[100], Range[20, 30], Range[20, 30]}], Abs[#[[1]] #[[2]]/(#[[3]] #[[4]]) - 17.3] &][[1]]

Oddly you get the same answer if you multiply the error by the total number of pegs.  So the answer may not dependtoo much on the goal of minimizing the number of pegs (which on its own yields a trivial answer).
POSTED BY: Todd Rowland
In[2]:= Minimize[{(N1 N2/(n1 n2) - 17.3)^2,
  N1 > 17 && N2 > 23 && n1 > 19 && n2 > 19 && n1 != n2 &&
  GCD[N1, N2] == 1}, {N1, N2, n1, n2}, Integers]

Out[2]= {5.16529*10^-6, {N1 -> 59, N2 -> 129, n1 -> 22, n2 -> 20}
POSTED BY: Udo Krause
One must somehow wight the two goals, normally this is done by practical considerations (economical, physical) etc. 
 In[36]:= With[{\[Alpha] = 0.01, \[Beta] = 0.99},
   Minimize[{\[Alpha] (N1 + N2) + \[Beta] (N1 N2/(n1 n2) - 17.3)^2,
   N1 > 17 && N2 > 23 && n1 > 19 && n2 > 19 && n1 != n2 && GCD[N1, N2] == 1}, {N1, N2, n1, n2}, Integers]
 ]
 
 Out[36]= {1.7502, {N1 -> 74, N2 -> 99, n1 -> 21, n2 -> 20}}
 
 In[39]:= GCD[74, 99]
 Out[39]= 1

In[40]:= (74. 99.)/(21 20)
Out[40]= 17.4429
N1 and N2 must be around Sqrt[17.3] bigger tha n1 and n2 respectively. The Alpha must be small enough to make the 17.3 condition a pretender against the teeth number. In the contrary, with big Alpha and small Beta the 17.3 condition looses its relevance, still it is a Minimize[]
In[58]:= With[{\[Alpha] = 0.9, \[Beta] = 0.1},
   Minimize[{\[Alpha] (N1 + N2) + \[Beta] (N1 N2/(n1 n2) - 17.3)^2,
     N1 > 17 && N2 > 23 && n1 > 19 && n2 > 19 && n1 != n2 &&
     GCD[N1, N2] == 1}, {N1, N2, n1, n2}, Integers]
]

Out[58]= {64.9903, {N1 -> 19, N2 -> 24, n1 -> 21, n2 -> 20}}

Regards
Udo. 
POSTED BY: Udo Krause
Seemingly
 In[51]:= Minimize[{Abs[N1 N2/(n1 n2) - 17.3],
   N1 > 0 && N2 > 0 && n1 > 19 && n2 > 19 && GCD[N1, N2] == 1}, {N1,
   N2, n1, n2}, Integers]
 
 During evaluation of In[51]:= NMinimize::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations. >>
 
 Out[51]= {0.0225, {N1 -> 41, N2 -> 169, n1 -> 20, n2 -> 20}}
 
 In[53]:= 41 169/(20 20.)

Out[53]= 17.3225
one should tune this up, because n1 = n2 sounds silly for your approach.
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract