Sunday 7 April 2019

Design a servo switch machine to control a model railroad turnout [excel]


Fig. 1


I was wondering if I could reveal the relationships between the parts which are involved in the control of a turnout by a servo-wire actuator mounted under the bench. The parts are the motor, the stiffness of the wire, the thickness of the bench and the subroadbed and the stiffness of the point rails. Why bother? Because I like to understand how things work and have a tool to answer the questions: 

  • Can I design a servo wire actuator for a thick bench and subroadbed? 
  • What kind of wire (material, diameter) I have to use? 
  • How to choose the distances between the throwbar, the wire’s pivot and the end connected to the servo? 
  • What is the proper angle range for the servo motion? 
  • What is the torque on servo? How to lock the servo at end positions? 
  • How to not overbend the wire? 
  • How to not overstress the point rails and their connections?


Someone can say “the ‘trial and error’ method is good enough for this problem”. From my point of view the use of this method to solve this problem highlights only its disadvantages. Following the “trial and error” method leads in waste of time and material. The result is unusable when the input parameters changes. I like the “bloodless” way of an analytical approach. 

The servo-wire actuator is a linear mover, it transforms the rotation of the servo motor to the linear motion of the throwbar. The servo moves between the left and the right end positions and this move corresponds to an angle (2α). 


The wire is an elastic lever (it deforms and acts as a linear spring with a constant K) with one point (S). connected to the servo., one end (T) connected to the throwbar and one point (O) as fixed pivot. While the servo moves the wire three forces are acting on the wire. The first force (F) acts between the wire's end and the throwbar and moves the throwbar. Its value depends on the horizontal distance travelled, on the stiffness of the wire and on the stiffness of the point rails. The second force (Fs) acts between servo's horn and the wire and the third force (Fo) acts between wire and its pivot point. These forces are in equilibrium and they can be evaluated if one of them is known. In this work i use the force (F) formula. The wire’s spring constant depends on its material properties, its diameter and the lengths OT and OS. 


The stiffness of the point rails depends on the cross section, the material and the length of the rails and the stiffness of the rail connections on the heels and the rod. It causes a linear spring force to withstand the movement of the throwing rod. The spring constant (Ke) must be used for the calculation. For full hinged point rails at the heals and the throwbar, we have a kinematic mechanism and Ke=0. There is a simple way to obtain a sufficiently good approximation of the spring constant shown in the figure 2.We can try the sensitivity of the actuator by entering in the excel, values in range +/- 10% or 15% of the obtained value.
Fig. 2


The thickness of the benchwork and subroadbed dictate, partially, the position of the points S and O and consequently the length of the wire and its spring constant.



Another aspect is that the throwbar’s traveling has limits, end points which are the stock rails.



So far so good, we have a description of the actors and the relationships between them in this adventure. Lets see them in action.



The servo’s horn rotates and moves the wire’s point (S). The wire rotates around its pivot (O) and its other end (T) moves the throwbar. The throwbar resists to the motion like a spring and bends the wire till the point rail touches the stock rail. The point rail touches the stock rail and the move ends. Further servo rotation causes a) the force (F) on the wire increases and bends it more, b) the force (F*) between the stock rail and the point rail increases and stresses the point rail-throwbar connection. There is no further stress increment in the point rails (no further bending).



Engineering mechanics

It is not obligatory to read this part, but I suggest to take a look at the figures.

This part contains the equations which describes the actuator’s behavior. Four cases are examined. The difference is in the way that the servo moves the wire.The results are the formulae for the forces (F, Fe, F*), the torque moment (T) on the servo, the stress in the wire (σ) in dependency of the input variables.


Input variables:
Actuator’s wire: E - modulus of elasticity; fy – elastic tensile strength; dw – diameter
Actuator geometry:
α: Servo’s rotation angle between the center position and the end position.
Lup: Distance from the strand’s pivot to the throwbar at zero position.
Ldn: Distance from the strand’s pivot to the hinge between servo’s horn and the strand at zero position.
Ls: Servo’s horn length.
Lp: Distance between the pivot and the servo’s shaft.
D: Half of the throwbar’s run. (flangeway)
Ke: Spring constant of the throwbar
Output:
For different angles of the servo’s horn:
Geometry – deformed shape of the actuator.
Forces - moments acting on the servo and the throwbar.
The bending moment and the stress in the wire.

Case 1,  the servo’s horn lays in the plane defined by the throwbar and the wire. The servo's shaft (P) is in  between the end of the wire (S0) and the rotation point (O).
Fig. 3


From the triangle PS0S1 :
\[{y = L_{S}\ }{\sin\alpha}\] \[{z = L_{S}\ }{\cos\alpha}\]
Equations (1),(2) are common in all cases
From the triangles OS0S1 , OT0T1:
\[\beta = \ \tan^{- 1}\frac{y}{L_{p} + z}\] \[L_{1} = \sqrt{y^{2} + {(L_{p} + z)}^{2}}\ \]\[L_{2} = \ \frac{L_{\text{up}}}{\cos\beta}\]\[L_{\text{dn}} = L_{p} + L_{S}\]\[H = L_{\text{up}}\]

\[D + \delta = L_{\text{up}}\tan\beta\ \  = > \ \ \delta = \ L_{\text{up}}\tan\beta - D\]

Forces (common in cases 1-3):
\[F_{S} = \ \frac{L_{2}}{L_{1}} F\]\[F_{O} = \ F_{S} + F\]Torque on servo from the bended wire (common in all cases): 
\[T = zF_{S}\ \]


Case 2,  the servo’s horn lays in the plane defined by the throwbar and the wire. The end of the wire (S0) is in between the servo's shaft (P) and the rotation point (O).


Fig. 4

From the triangles OS0S1 , OT0T1:

\[\beta = \ \tan^{- 1}\frac{y}{L_{p} - z}\]\[L_{1} = \ \sqrt{y^{2} + {(L_{p} - z)}^{2}}\] \[L_{2} = \ \frac{L_{\text{up}}}{\cos\beta}\] \[L_{\text{dn}} = L_{p} - L_{S}\] \[H = L_{\text{up}}\]





Case 3, the servo’s horn lays perpendicular to the plane defined by the throwbar and the wire. 



Fig. 5
From the triangles OS0S1 , OT0T1:
\[\beta = \tan^{- 1}\frac{y}{L_{p}}\]\[L_{1} = \ \sqrt{y^{2} + {L_{p}}^{2}}\]\[L_{2} = \ \frac{L_{\text{up}}}{\cos\beta}\] \[L_{\text{dn}} = L_{p}\] \[H = L_{\text{up}}\]



















Case 4,  the servo’s horn lays in the plane defined by the throwbar and the wire. The servo's shaft (P) is in between the end of the wire (S0) and the wire’s rotation point (O).

Fig. 6

From the triangles OS0S1 , OT0T1:
\[\beta = \ \tan^{- 1}\frac{y}{L_{p} + z}\]\[L_{1} = \ \sqrt{y^{2} + {(L_{p} + z)}^{2}}\] \[L_{2} = \ \frac{L_{\text{up}} - L_{p} - z}{\cos\beta}\] \[L_{\text{dn}} = L_{p} + L_{S}\] \[H = L_{\text{up}} - L_{p} - z\]Forces:\[F_{O} = \ \frac{L_{2}}{L_{1}}\ F\] \[F_{S} = \ F_{O} + F\ \]


Forces formulae (common for all cases)


Fig. 7


Bending moment:
For the part of the wire OT1:     \[M = \frac{H}{L_{2}}Fx\ \ ;x \in \lbrack 0,L_{2}\rbrack\] For the part of the wire OS1  :   \[M = \frac{H}{L_{1}}Fx\ \ ;x \in \lbrack 0,L_{1}\rbrack\]

Using Castigliano's second theorem we obtain the force formula for the wire.
\[I = \frac{\pi d_{w}^{4}}{64}\]\[U = \int_{0}^{L}\frac{Μ^{2}}{2ΕI}dx\ ;\ \delta = \frac{\partial U}{\partial F}\ \]\begin{equation} \begin{split} U & = \int_{0}^{L2}\frac{F^{2}H^{2}x^{2}}{2ΕI{L_{2}}^{2}}dx + \int_{0}^{L1}\frac{F^{2}H^{2}x^{2}}{2ΕI{L_{1}}^{2}}dx =\\ & = \frac{F^{2}H^{2}}{2ΕI}(\frac{{L_{2}}^{3}}{3{L_{2}}^{2}} + \frac{{L_{1}}^{3}}{3{L_{1}}^{2}}) = \frac{F^{2}H^{2}}{6ΕI}(L_{2} + L_{1})\ \end{split} \end{equation}
\[\delta = \frac{\partial\left\lbrack \frac{F^{2}H^{2}}{6ΕI}(L_{2} + L_{1}) \right\rbrack}{\partial F} = \frac{FH^{2}}{3ΕI}\left( L_{2} + L_{1} \right)\]
\[F = \frac{3EI\delta}{\left( L_{2} + L_{1} \right)H^{2}}\]

Stiffness K:
\[Κ = \frac{3EI}{\left( L_{2} + L_{1} \right)H^{2}}\]\[F = K\delta\]
Throwbar spring force:
\[F_{e} = \ K_{e}\delta_{e}\]\[F_{e,max} = \ K_{e}D\]
Final force F on the wire and the throwbar:
\[Y_{\text{up}} = \ L_{\text{up}}\tan\beta\]
IF    \(\delta_{e} \leq D\)  Then
\[F_{e} = F \Leftrightarrow \ K_{e}\delta_{e} = K\left( Y_{\text{up}} - \delta_{e} \right) \Leftrightarrow \delta_{e} = \frac{K}{K + K_{e}}\ Y_{\text{up}}\]
and
\[\frac{K}{K + K_{e}}\ Y_{\text{up}} \leq D \Rightarrow Y_{\text{up}} \leq \frac{K + K_{e}}{K}\ D\]\[\delta_{\lim} = \frac{K + K_{e}}{K}D\]\[Y_{\text{up}} \leq \delta_{\lim}\]
\[{F = F}_{e} = \ K_{e}\delta_{e} = K_{e}\frac{K}{K + K_{e}}\ Y_{\text{up}}\]
IF    \(\delta_{e} > D\)  Then
\[Y_{\text{up}} > \frac{K + K_{e}}{K}\ D \Leftrightarrow Y_{\text{up}} > \delta_{\lim}\]
and
\[{F = F}_{e,max} + K\left( Y_{\text{up}} - D \right)\]

Force \(F^{*}\) between the point rail and the stock rail:
\[Y_{\text{up}} \leq \delta_{\lim} \Rightarrow F^{*} = 0\]\[Y_{\text{up}} > \delta_{\lim} \Rightarrow F^{*} = K\left( Y_{\text{up}} - D \right)\]
or
\[F^{*} = F - Fe\]
Stress in the wire:
\[\sigma = \frac{Md_{w}}{2I}\]
Some words about the excel 2013 worksheet 
Download turnoutservo7.7z

Unzip the archive, the excel file and the images must coexist in a folder.

The work sheets in the workbook are protected to avoid accidental changes. You can unprotect the sheets without password. Also I want to point to a strange thing. When you open the workbook in CALC you can’t see the active cell frame. A solution is to jump to another worksheet and then return to the CALC. 

The workbook includes the worksheets:

· CALC, is the primary sheet with the data and the results.

· GRAPH_Picture_Legend, containes the figure for the current case, a graph shows the dependency between the forces F,Fs and the rotation angle α, the legend. It is a help sheet.

· UNITS, is a help sheet.

The CALC sheet

The data cells have data validation. Don’t be afraid of error messages, they exist only to ensure the right input. Always check the values to be in accordance with the figure in the GRAPH_Picture_Legend sheet. The rows 15-30 have conditional formatting as shown in the next figure. The yellow color means that the point rail did not reach the stock rail. The red color means that the stress in the wire exceeds the elastic limit, the wire is overbended. The lines in between are the working range of the actuator.

The Ew,Fy values in worksheet are common for spring steel and can be used if there is no more accurate data.

The Lwire_zero is the length of the wire at zero position. The Lwire is a rough approximation of the wire length at the end position. In both cases the wire doesn’t stick out from the top of the throwbar. 

If you want to find the precise values of the start-end angles, you can choose between the ‘trial and error’ method and the excel's solver.

Fig. 8
Obviously, it is desirable to have a fairly good angular range ("white lines"). This adds comfort, as we do not need to be so accurate with the input data (ie Ke) and the choice of the final angular range. For shorter Ls bigger angle movement is needed to switch the turnout. More stiffer wire causes, for small angle changes, bigger forces. Wire's stiffness is inversely proportional to the 3rd power of its lengths and proportional to the 4th power of its diameter.

Finally a note using the Fermat's style: 

"I have discovered a truly marvelous way for the setup and mount of the servo switch, which this margin is too narrow to contain.”


1 comment: