Introduction

Before a turnout rail is assembled, it must undergo rolling, transportation, bundling, and various types of processing, which cause the rail to bend and deform due to the action of external forces, temperature changes and the influence of self-weight. Because the turnout rail needs to have a certain bending angle when the train is reversed and there is a complex contact relationship between the wheel and the turnout rail, this deformation can produce a large impact force; damage the railway turnout, especially for a high-speed railway turnout; and affect the speed and safety of the train. To meet the safety and stability requirements of trains, especially high-speed trains, railway turnouts should have high smoothness, high precision and high reliability1,2,3 . The areas of turnout rails that have deformed due to external forces need to be corrected through alignment adjustments. Most turnout rail components undergo three-point reverse bending adjustments via a press.

Topping of turnout rail parts mainly involves straightening and bending of rail parts, and the main process parameters of topping are the downwards pressure position of the jackaxe, the transverse distance of the pickaxe and the stroke and pressure of the jackaxe in the process of jacking. In the process of topping, one topping often does not meet the corresponding standards, and many toppings are needed to meet the requirements of straightness and circular vectors. In addition, the workpiece may be scrapped due to the inaccuracy of the worker’s judgement, as the given top-adjustment parameter may cause the workpiece to be scrapped. Existing methods require the worker to have rich work experience, the labour for the worker is intense, and the accuracy and efficiency of top adjustment cannot be guaranteed.

At present, many scholars have studied the theoretical basis of pressure topping. Talukder et al.4,5 analysed the three-point pressure straightening process for metal materials and studied the mechanism of elastic deformation and plastic deformation in the metal material straightening process. Johnson6,7 derived the bending rebound equation for rectangular strip parts on the basis of the linear strengthened constitutive model and the nonlinear power strengthened material constitutive model. Lian Jiachuang and Cui Fu8,9,10 systematically and comprehensively studied straightening theory and defined and classified the bending and straightening of metal profiles.

Yongquan Zhang11,12,13 developed a mathematical model of the curvature-bending moment for the process of straightening linear guides, analysed the influence of material parameters on the straightening process, and derived the relationship between a section’s rotation angle and deflection during straightening. Volegov14, from both theoretical and experimental perspectives, established a mathematical model for rail straightening, investigated the appropriate amount of reduction, and conducted experimental validation. EN Srimani15 employed finite element simulation and analysis methods to examine the straightness of rail ends.

The straightening process involves the following steps: first, measure and mark the deformed areas of the rail; then, prepare and clean the equipment and environment; next, place the rail under the press, adjust the press settings, and apply pressure to correct the deformation; and finally, check the correction results to ensure the rail has returned to its normal shape.

This paper focuses primarily on the straightening of stock rails and does not consider the impact of straightening on gauge variation. By analysing the factors affecting straightness and the effectiveness of straightening, it is concluded that the initial deflection, asymmetry coefficient and straightening distance parameters strongly influence straightening. On the basis of the data obtained from the finite element simulation, a BP neural network model is constructed with the above parameters as inputs, and the finite element method is used to compare and analyse the prediction results for multiple groups of rail pieces with different initial bending states. The results show that the neural network prediction method has high accuracy and efficiency and provides reference data for automated topping.

Mechanical straightening model

To simplify the calculation, the pressure straightening process for a switch rail is simplified as a supported beam subjected to concentrated forces during the theoretical calculations concerning the rail. As shown in Fig. 1, is the pressure straightening load of the top pick, is the straightening distance, \({\delta }_{0}\) is the initial maximum deflection of the basic turnout rail, \({\delta }_{f}\) is the springback amount of the basic turnout rail after unloading, \({\delta }_{w}\) is the amount of reverse bending of the basic turnout rail, \({\delta }_{c}\) is the deflection that is corrected by straightening, \({\delta }_{r}\) is the residual deflection after the basic turnout rail straightening is completed, and \(\delta _{\Sigma }\) is the straightening stroke for the basic turnout rail. The straightening process always satisfies \(\delta _{\Sigma }=\delta _{\textrm{c}}+\delta _{\textrm{f}}=\delta _{0}+\delta _{\textrm{w}}\). Curve 1 is the basic turnout rail in the initial defect state, curve 3 is the bent rail when the jacking stroke reaches the maximum, and curve 2 is the final bent rail after the jacking pick is unloaded by the external force; if the rebound is complete, then \(-0.1mm/m\leqslant {\delta }_{r}/L\leqslant 0.1mm/m\) is satisfied, and the basic turnout rail straightening process is complete.

Fig. 1
figure 1

Mechanical model of straightening by reverse-pressure bending.

Fig. 2
figure 2

Three stages of plastic deformation.

According to the simplification method in Ref.16 , the rail cross-section is simplified as an I-section, and the parameters before and after simplification are basically unchanged, indicating that the simplification results are reasonable. The load-deflection data in the process of topping the simplified rail and an actual rail are compared and analysed via finite element analysis; the comparison values are close and the error is small, which confirms the correctness of the simplification results. When the bending moment of the rail is analysed, considering the specific characteristics of the rail cross-section, the plastic deformation process in the transverse top bending of the rail is divided into three stages according to the distance from the rail cross-section to the neutral axis, as shown in Fig. 2.

When only elastic deformation occurs during rail bending, the stress-strain relationship satisfies Hooke’s law, and the ultimate elastic bending moment in the topping process can be obtained:

$$\begin{aligned} M_{\textrm{t}}=\int _S \sigma z \mathrm {~d} z=\int _S \frac{2 z}{H_{\textrm{t}}} \sigma _{\textrm{s}} z \mathrm {~d} z=\frac{B_1^3 H_1+B_2^3 H_2+B_3^3 H_3}{6 B_1} \sigma _{\textrm{s}} \end{aligned}$$
(1)

When plastic deformation occurs during the bending process, the elastic–plastic deformation of the rail can be divided into three stages according to the above analysis, the bending moment is calculated for the different stages, and the bending moment formula is obtained:

$$\begin{aligned} M_\lambda =\int _S \sigma z \mathrm {~d} z=\int _S\left[ 1+\lambda \left( \frac{2 z}{H_{\textrm{t}}}-1\right) \right] z \mathrm {~d} z=\left( m_1+m_2 \xi ^2+\frac{m_3}{\xi }\right) \frac{M_{\textrm{t}}}{W_{\textrm{x}}} \end{aligned}$$
(2)

Depending on the stage, \({m}_{1}\), \({m}_{2}\) and \({m}_{3}\) have different values, as shown below:

Phase 1:

$$\begin{aligned} m_{1}=\frac{(1-\lambda ){B}_{1}^{2}H_{1}}{4} \quad m_{2}=\frac{(\lambda -1){B}_{1}^{2}H_{1}}{12} \quad m_{3}=\frac{(\lambda -1)B_{1}^{2}H_{1}}{6}+W_{x} \end{aligned}$$
(3)

Phase 2:

$$\begin{aligned} \begin{aligned}&m_{1}=\frac{(1-\lambda )(B_{1}^{2}H_{1}+B_{3}^{2}H_{3})}{4} \quad m_{2}=\frac{(\lambda -1){B}_{1}^{2}(H_{1}+H_{3})}{12} \\&m_{3}=\frac{\left( \lambda -1\right) \left( B_{1}^{3}H_{1}+B_{3}^{3}H_{3}\right) }{6}+W_{x} \end{aligned} \end{aligned}$$
(4)

Phase 3:

$$\begin{aligned} \begin{aligned}&m_{1}={\frac{(1-\lambda )(B_{1}^{2}\,H_{1}+B_{2}^{2}\,H_{2}+{{B}_{3}^{2}}\,H_{3})}{4}} \quad m_{2}=\frac{(\lambda -1){B}_{1}^{2}(H_{1}+H_{2}+H_{3})}{12} \\&m_{3}=\lambda W_{x} \end{aligned} \end{aligned}$$
(5)

In Fig. 3, the concentrated load acts on a noncentre point of the turnout rail, the left side is the coordinate origin, the area that produces plastic deformation is shaded in the figure, \(l_s+l_s^{\prime }\) is the length of the area where the plastic deformation is produced in the axial direction, \(l_{\textrm{t}}\) is the length of the elastic deformation area on the left side of the application point, and \(l_{\textrm{t}}^{\prime }\) is the length of the elastic deformation area on the right side of the application point.

Fig. 3
figure 3

Elastoplastic region and bending moment distribution.

At the pressure point, \({x=l}\), the relationship between the load and the elastic area ratio \({\xi }\) in the process of bending and deformation can be obtained:

$$\begin{aligned} F={\frac{1}{l\left( 1-k\right) }}\left( {m_{1}+m_{2}{\xi _{x}^{2}}+{\frac{m_{3}}{\xi _{x}}}}\right) {\frac{M_{t}}{W_{x}}} \end{aligned}$$
(6)

In the straightening process, the plastic region spreads from the pressure point to both sides, and when \(0<x<l\) is satisfied, the relationship between x and \({\xi }\) in the elastoplastic deformation stage is

$$\begin{aligned} x=\frac{l}{\varphi W_{x}}\Biggl (m_{1}+m_{2}\xi ^{2}+\frac{m_{3}}{\xi }\Biggr ) \end{aligned}$$
(7)

Similarly, when \(l<x<L\), the relationship between x and \({\xi }\) in the elastoplastic deformation stage is

$$\begin{aligned} x=L-{\frac{L(1-k)}{\phi W_{x}}}\left( m_{1}+m_{2}\xi ^{2}+{\frac{m_{3}}{\xi }}\right) \end{aligned}$$
(8)
Fig. 4
figure 4

Schematic diagram of the bending process deflection.

As shown in Fig. 4, the reverse bending rate at x is \({A}_{x}\), and the corresponding radius of curvature is \({\rho }_{x}\); then, because \(d_{\theta }=d_{x}/\rho _{x}=A_{x}d_{x}\), the change in deflection at x can be obtained: \(d_{y}=x d_{\theta }=x A_{x}d_{x}\). Therefore, the reverse bending deflection at the pressure point can be obtained:

$$\begin{aligned} {{\delta }_{w}=\int _{0}^{\delta }dy=\int _{0}^{l}{\mathcal {A}_{x}}d x=\int _{0}^{l}{{x}(A_{\Sigma x}-A_{o x})dx}=\int _{0}^{l}{{x}A_{\Sigma x}}dx-\int _{0}^{l}{\mathcal {X}}A_{ox}dx} \end{aligned}$$
(9)

\(A_{\Sigma x}\)–Total curvature at x

\(A_{o x}\)–Initial curvature at x

The integral formula is divided into two stages for calculation, namely, the elastic deformation stage and the elastoplastic deformation stage:

$$\begin{aligned} {\delta _{\Sigma }}=\frac{F l_{t}^{3}(1-k)^{2}}{3E I k}+\left( \frac{1-k}{k}\right) \int _{l_{t}}^{l}x A_{\Sigma }d x \end{aligned}$$
(10)

When the inclination of the longitudinal axis caused by bending is not large, the reverse bending deflection can be calculated via the following formula. By considering the known parameters, the deflection and straightening load at the pressure point of the asymmetric bending defect of the turnout basic rail can be solved, and then the neural network prediction can be obtained.

$$\begin{aligned} \left\{ \begin{array} {l} F=\varphi \frac{M_t}{(1-K)l}\left( \phi =1\rightarrow \left( m_1+m_2\xi _{min}^2+\frac{M_3}{\xi _{min}}\right) / W_x\right) \\ \delta _{\Sigma }=\frac{Fl_t^3(1-k)^2}{3EIk}+\left( \frac{1-k}{k}\right) \int _{l_t}^{l}xA_{\Sigma }dx \\ A_{\Sigma }=\frac{A_t}{\xi } \\ x=\frac{l}{\varphi W_x}\left( m_1+m_2\xi ^2+\frac{m_3}{\xi }\right) \end{array}\right. \end{aligned}$$
(11)

Finite element analysis

According to the actual working conditions, the finite element model of the rail topping of the curved turnout is constructed as shown in Fig. 5, where the jack and the pickaxe have the same cross-sectional size in the topping model: the thickness is 60 mm, and the width is 100 mm. Since the positions of the bending switch rail and the pickaxe change during the topping process, mainly because of contact with the outside of the pickaxe, the support distance is defined as the outer distance between the two support pickaxes.

Fig. 5
figure 5

Finite element simulation model.

If the rail material is U71 Mn, the straightening distance is 1200 mm, and the asymmetry coefficient is 0.6, the stress contour diagram of the basic turnout rail bending and rebound can be obtained, as shown in Fig. 6. Here, the plastic deformation of the rail in the area with stress value \(\sigma \geqslant\) 590 MPa is indicated as the red area in the figure, and elastic deformation occurs in other areas, where the maximum point of stress is the position of the lower pressure point of the top pickaxe and the generated bending deflection is the largest. According to the analysis of the figure, the stress gradually decreases from the downwards pressure point along the axial direction to both ends, which is a typical bending stress distribution, and the plastic deformation spreads from the middle pressure point along the length to both sides, which is the same as the plastic deformation trend calculated theoretically.

Fig. 6
figure 6

Reverse bending and rebound of steel rails.

The initial deflection is set to 2 mm, and the simulation results are shown in Table 1.

Table 1 Springback and residual deflection under different bending parameters.

When the support distance is 800 or 900 mm, the residual deflection is less than the initial deflection, and the force application point is above the 0 mm baseline after rebound. When the support distance is 1100 or 1200 mm, the residual deflection is greater than the initial deflection, and the force application point is below the 0 mm baseline after rebound. Moreover, the final straightness is different under different asymmetry coefficients, and this straightness increases with an increasing asymmetry coefficient.

Neural network rebound prediction

Neural network input and output formulation

A neural network is a mathematical or computational model that simulates the structure and function of biological neural networks; it can effectively approximate arbitrarily complex nonlinear relationships via backpropagation algorithms and is often used to simulate complex relationships between inputs and outputs. The backpropagation (BP) neural network is a type of multilayer feedforward neural network that is trained via the backpropagation algorithm. It is one of the most classic and widely used types of artificial neural networks and particularly excels in supervised learning tasks. BP neural networks have strong adaptability and good approximation capabilities. Unlike traditional machine learning algorithms, BP neural networks can automatically learn and extract features from training data without the need for manual feature engineering. According to Ref.17 , the BP neural network has good performance, and the BP neural network is therefore selected for straightness prediction.

A straightness prediction model for the basic track of a curved turnout based on a multilayer feedforward neural network is established; the neural network used in the model has a single hidden layer, and the error backpropagation algorithm is used for training. The input parameters of the selected neural network are the initial deflection \({\delta }_{0}\), the asymmetry coefficient \({\delta }_{j}\) and the straightening distance , and the output obtained is the final straightness \({\delta }_{j}\); a three-layer neural network structure is selected, as shown in Fig. 7.

Fig. 7
figure 7

Schematic diagram of a neural network.

The main idea of the BP algorithm is to train and adjust the weights and biases of the network via the backpropagation algorithm so that the output vector is as close to the desired vector as possible. In the training process, the error between the output of the network and the expected output is calculated by input samples, and the error is backpropagated to each layer of the network. Then, the weights and biases are adjusted according to the error. Continuous iterative training is conducted, and the training is considered complete when the sum of the squares of the errors output by the network is less than the specified error. The sum of the squares of the error E is shown below.

$$\begin{aligned} E=0.5\sum _{p=1}^{p}\sum _{j=1}^{m}(t_{j}^{p}-y_{j}^{p}) \end{aligned}$$
(12)

To prevent the neural network from overfitting, straightness data obtained from 125 sets of simulations were used as the dataset, which was then randomly divided into training data and test data. The ratio of training data to test data was 8:2; the training data included 100 sets of samples, and the test data included 25 sets of samples. The momentum BP (MOBP) algorithm was adopted, which can effectively avoid the local minimum point problem in the process of training the neural network; this optimizes the process of training the model and increases the generalizability of the model to reduce the risk of overfitting and improve the prediction ability and stability of the model.

Neural network structure

The maximum number of training iterations is set to 1000, and the neural network performs 1000 iterations during training. The learning rate, a parameter that controls the weight updating amplitude, is set to 0.01. A smaller learning rate can make the network learn more stably. The minimum target value of the network training is set to 0.0001, and training is stopped when the training error of the network falls below this value. The number of hidden layer nodes significantly influences the performance of the BP neural network. A larger number of hidden nodes may lead to greater training accuracy because more hidden nodes can provide greater model capacity and expressiveness. However, increasing the number of hidden nodes can lead to longer training times and, in some cases, can lead to overfitting. To estimate the optimal number of hidden nodes, empirical formulas are usually used at present, and there are two main kinds of empirical formulas, as follows:

(1)\(\textstyle {\displaystyle \sum _{i=0}^{n}{C_{M}^{i}\ge k}}\), where k is the number of samples, M is the number of hidden neurons, and n is the number of neurons in the input layer. If \(i>M\), we stipulate that \(C_{M}^{i} = 0\).

(2)\(M = \log _{2}^{n}\), where n is the number of neurons in the input layer.

On the basis of the above empirical formula, the range of the number of nodes in the hidden layer is \(2\leqslant M \leqslant 10\). To further determine the number of nodes in the hidden layer of the neural network, the trial-and-error method is used for calculation. First, the number of nodes in the hidden layer is set to a specific value; 100 sets of data are used as the training data, and the average error between the straightness value of the 25 groups of test data under the set number of nodes in the hidden layer and the straightness value predicted by the neural network is calculated. By calculating and comparing the average errors under different numbers of neurons in the hidden layer, a set of data on the relationship between the number of nodes in the hidden layer and the average error are obtained, as shown in Fig. 8.

Fig. 8
figure 8

Average error under the number of meshes of different hidden layers.

As shown in Fig. 8, when the number of nodes in the hidden layer is 5, the average error between the simulation sample and the training sample reaches the minimum value. Therefore, the number of hidden-layer nodes of the neural network is set to 5 to obtain the best training performance. The training data were trained via the established neural network, the training time was 5 s, and a total of 13 iterations were carried out; the optimal average square error in the training process was 0.0012733, and the neural network model showed good fitting ability on the training set.

Straightness training and prediction based on neural network

The neural network is trained with the determined neural network parameters, and a comparison between the value predicted by the neural network and the test value and the error percentage can be obtained, as shown in Fig. 9.

Fig. 9
figure 9

Predicted value versus training value and percentage error.

As shown in Fig. 9, when the BP neural network is used to predict the input data, the matching between the predicted value and the test value curve is high; the maximum value of the calculated error percentage is 4.41%, the minimum value is 0.08%, and the average error percentage is 1.32%. The error between the prediction results and the actual training value of the BP neural network is small, and the overall prediction accuracy is high, which can accurately predict the straightness of the asymmetric bent rail after straightening, which indicates that the established BP neural network can effectively predict the straightness of the asymmetric bent rail after straightening.

Validation of results

According to the value intervals of the determined parameters shown in Table 2, parameters such as the initial deflection, pair asymmetry coefficient and straightening distance are input into the established neural network model to predict the corresponding straightness after straightening. According to the predicted results for the final straightness, the surface diagram is drawn in three-dimensional space, and the final straightness values corresponding to different parameters, such as the asymmetry coefficient, initial deflection and straightening distance, are obtained.

Table 2 Bending parameters with respect to the point interval.

After the straightening of the bending switch rail, its working edge needs to reach the straightness requirement of 0.2 mm/m. To examine this critical value more intuitively, the plane representing 0.2 mm/m straightness is drawn on the three-dimensional diagram, as shown in Fig. 10. The intersection point of the 0.2 mm straightness plane and the scatter plot shows the critical value of the straightening support distance and the initial deflection that meet the straightening accuracy requirements under different asymmetry coefficients.

Fig. 10
figure 10

3D surface plot of straightness values and simulated scatter points.

In Fig. 10, the straightness prediction surface coincides well with the straightness scatter plot obtained via simulation, and the critical value that meets the straightness accuracy requirement is determined by finding the junction between the straightness prediction surface and the plane of 0.2 mm straightness. This junction represents the critical value of the workpiece length and the initial deflection that meets the straightening accuracy requirements; when the straightness surface is below the 0.2 mm/m straightness plane, the corresponding bending parameters will meet the straightening accuracy requirements. According to Fig. 10, the straightening parameter surface that satisfies the straightening accuracy requirement can be obtained, as shown in Fig. 11.

Fig. 11
figure 11

Maximum initial deflection surface that meets straightening accuracy requirements.

In Fig. 11, the plane of 0.2 mm straightness divides the cube into upper and lower parts. Only a bending rail with an initial bending parameter under the plane of 0.2 mm straightness can be straightened to meet the requirements; the maximum initial deflections A that can be straightened to meet the 0.2 mm accuracy requirements under different bending parameters can be obtained according to Figs. 10 and 11, as shown in Table 3.

Table 3 The maximum initial deflections that meet the straightening accuracy requirements for different bending parameters.

As shown in Table 3, when the asymmetry coefficient of the bending rail \({\delta }_{0}^{max}\) that meets the requirements of 0.2 mm/m straightening accuracy is the same, the value of the maximum initial deflection \({\delta }_{0}^{max}\) increases with increasing straightening distance ; when the straightening distance is the same, the value of the maximum initial deflection \({\delta }_{0}^{max}\) decreases with increasing asymmetry coefficient k.To sum up, for bent rails with large support spacing and the closer the maximum initial deflection position is to the midpoint, that is, the bending rail with a small asymmetry coefficient, the greater the maximum initial deflection \({\delta }_{0}^{max}\) value that meets the straightening accuracy requirements after straightening.

Conclusion

On the basis of the principles of the BP neural network, the top-adjustment prediction model for the turnout rail is established, and the predicted final straightness can be obtained by inputting different initial deflections, asymmetry coefficients and straightening support distances. Compared with the traditional theoretical model, the proposed model avoids cumbersome formula derivations and mathematical calculations and has high accuracy, providing a new idea for the automatic top adjustment of turnout rails.