# A Parameter-Driven Methodology of Wheel Flat Modeling for Wheel-Rail Impact Dynamics
## 3 Complex 3D Wheel Flat Surface Reconstruction
### Theoretical Derivation  
#### 3.1.1 Control Vertex Matrix Computation  
The computation process for the control vertex matrix involves the following steps.  
Step 1. Construct the wheel roughness sample point matrix \(\mathbf{Q}\), where each element \(q_{ij}(i=0,1,2,\ldots r;j=0,1,2,\ldots s)\) represents a sample point. The wheel flat region is divided into \(s+1\) parallel sections along the width direction, with each section sampled at equal intervals using a wheel out-of-roundness testing instrument. Given that the number of sampling points in each section may vary, it is necessary to resample the data points to align them uniformly, where each section contains \(r+1\) data points. The ordering direction of the data points in each section is defined as \(u\), and the ordering direction of each section is defined as \(v\).  
Step 2. Construct node vectors.  
The data points in each section are parameterized using normalized cumulative chord length, defined as follows:  
\[\left\{\begin{array}{l}u_{0}=0\\ u_{i}=u_{i-1}+\left|\Delta\overset{\rightharpoonup}{q}_{i-1}\right|,\;i=1,2, \ldots r\\ \Delta\overset{\rightharpoonup}{q}_{i-1}=\overset{\rightharpoonup}{q}_{i- }\overset{\rightharpoonup}{-}\overset{\rightharpoonup}{q}_{i-1}\end{array}\right. \tag{15}\]  
The parameterized sequences of all sections are averaged to obtain the \(u\)-parameter segmentation sequence \(\widetilde{u}_{i}(i=0,1,2,\ldots,r)\). The centroid of each section data point is computed, and the sequence of centroids is parameterized by the normalized cumulative chord length to obtain the \(v\)-parameter segmentation sequence \(\widetilde{v}_{j}(j=0,1,\ldots,s)\).  
Finally, the segmentation sequences are converted into node vectors \(U=[u_{0},u_{1},\ldots u_{m+4}]\) and \(V=[v_{0},v_{1},\ldots v_{n+4}]\), where \(m=r+2\), \(n=s+2\).  
Step 3. Compute the control vertex matrix. The computation process is illustrated in Figure 6.  
The computation of the control vertex matrix involves two inversion processes. Firstly, a cubic spline curve control vertex inversion process is applied to each column of data points in the sample point matrix to derive the control vertex matrix of intermediate vertices. Subsequently, another inversion process is conducted for each row of the intermediate control vertex matrix to obtain the final control vertex matrix.  
The inversion process follows a simplified form of the matrix equation as described in [30].  
\[\begin{bmatrix}b_{1}&c_{1}&a_{1}\\ a_{2}&b_{2}&c_{2}\\ &\ddots&\ddots&\ddots\\ &&a_{n-2}&b_{n-2}&c_{n-2}\\ &&c_{n-1}&a_{n-1}&b_{n-1}\end{bmatrix}\begin{bmatrix}d_{1}\\ d_{2}\\ \vdots\\ d_{n-2}\\ d_{n-1}\end{bmatrix}=\begin{bmatrix}e_{1}\\ e_{2}\\ \vdots\\ e_{n-2}\\ e_{n-1}\end{bmatrix} \tag{16}\]  
Figure 6: Control vertex matrix computation process [29].  
Equation (16) details the elements of each row of the coefficient matrix, excluding the first and last rows, as presented in Equation (17).  
\[\left\{\begin{array}{l}a_{i}=\frac{(\Delta_{i+2})^{2}}{\Delta_{i}+\Delta_{i+1}+ \Delta_{i+2}}\\ b_{i}=\frac{\Delta_{i+2}(\Delta_{i}+\Delta_{i+1})}{\Delta_{i}+\Delta_{i+2}+ \Delta_{i+2}}+\frac{\Delta_{i+1}(\Delta_{i+2}+\Delta_{i+3})}{\Delta_{i+1}+ \Delta_{i+2}+\Delta_{i+3}}\\ c_{i}=\frac{(\Delta_{i+2})}{\Delta_{i+1}+\Delta_{i+2}+\Delta_{i+3}}\\ e_{i}=(\Delta_{i+1}+\Delta_{i+2})q_{i-1}\end{array}\right.,(i=2,3,\ldots,n-2) \tag{17}\]  
In this study, free endpoint boundary conditions are employed, where:  
\[\left\{\begin{array}{l}b_{1}=\Delta_{1}+2\Delta_{2}+2\Delta_{3}+\Delta_{4}\\ c_{1}=-(\Delta_{1}+\Delta_{2}+\Delta_{3})\\ a_{1}=0\\ e_{1}=(\Delta_{2}+\Delta_{3}+\Delta_{4})q_{0}\end{array}\right.\left\{\begin{array} []{l}c_{n-1}=0\\ a_{n-1}=-(\Delta_{n}+\Delta_{n+1}+\Delta_{n+2})\\ b_{n-1}=\Delta_{n-1}+2\Delta_{n}+2\Delta_{n+1}+\Delta_{n+2}\\ e_{n-1}=(\Delta_{n-1}+\Delta_{n}+\Delta_{n+1})q_{n-2}\end{array}\right. \tag{18}\]  
The vertex vector of the inverse process can be solved using Equations (16)-(18).