# Real-Time State Evaluation System of Antenna Structures in Radio Telescopes Based on a Digital Twin
## 3 Construction of a Lightweight Twin Model  
DT technology focuses on efficient real-time data mapping between physical entities and their corresponding twin models. There are a large number of triangular facets in the mesh model of a large antenna, and too many triangular facets need to spend a long calculation time in data processing and transmission, which does not meet the real-time requirements of DT technology. Therefore, to make the antenna twin model quickly and accurately map the current actual state of the physical entity, it is necessary to reduce the dimensions of the mesh model, that is, under the premise of ensuring the original geometric characteristics of the model, the number of vertices and faces is appropriately reduced, thereby reducing the amount of data and shortening the operation time.  
The overall construction technical route of the lightweight twin model is shown in Figure 3. Firstly, based on the ANSYS APDL 2022 R2 mesh model, the improved quadric error metrics (QEMs) are used to simplify the mesh. Secondly, after extracting the vertex coordinates of the simplified mesh and the construction order of triangular facets, the mesh data are stored in the MySQL database. Finally, based on the mesh reconstruction algorithm of the Unity3D engine, the three-dimensional coordinates of the mesh and the node index are imported and assigned to the Mesh Filter component, and finally, the construction of the lightweight twin model is realized.  
The key technology to build a lightweight model is the QEM algorithm. The core idea is to use edge contraction to reduce the number of triangular mesh faces. Each time, the edge with the smallest contraction cost is selected and iterated many times to achieve mesh simplification [19]. The algorithm process is shown in Figure 4.  
Figure 3: Technical route of the lightweight twin model construction.  
Considering the one-time edge collapse, wherein the \(v_{1}\) and \(v_{2}\) points in the graph are shrunk into a point \(v_{i}\), the optimization objective \(v_{i}\) is  
\[v_{i}=arg\min_{v}\sum_{p\in\mathbf{P}(v_{1})\cup\mathbf{P}(v_{2})}D(v,p)^{2} =arg\min_{v}\sum_{p\in\mathbf{P}(v_{1})\cup\mathbf{P}(v_{2})}v^{T}K_{p}v \tag{2}\]  
\[K_{p}=pp^{\mathrm{T}}=\left[\begin{array}{cccc}a^{2}&ab&ac&ad\\ ab&b^{2}&bc&bd\\ ac&bc&c^{2}&cd\\ ad&bd&cd&d^{2}\end{array}\right] \tag{3}\]  
\[Q(v)=\sum_{p\in\mathbf{P}(v)}K_{p} \tag{4}\]  
where \(\mathbf{P}(v_{i})\) denotes the original triangular face corresponding to \(v_{i}\), and \(p=[a,b,c,d]^{T}\) denotes the set of all faces. The expression is \(ax+by+cz+d=0\), and \(a^{2}+b^{2}+c^{2}=1\). \(D(v,p)^{2}\) denotes the distance from \(v_{i}\) to the original triangle. \(K_{p}\) denotes the fundamental error quadratic form of plane \(p\). \(Q\) represents the quadratic error measure matrix, that is, the square of the distance from the vertex to the triangular surface is calculated according to \(K_{p}\). Then the collapse cost of the \(v_{1}\), \(v_{2}\) points contracted to \(v_{i}\) is  
\[\Delta(v_{i})=v^{T}(Q_{v_{1}}+Q_{v_{2}})v\approx v^{T}Q_{v_{1}}v \tag{5}\]  
After the above steps, the triangular patches of the simplified model show uniformity, and the meshes obtained by ANSYS are different in size. Therefore, the feature details of the small meshes are lost after simplification, resulting in appearance distortion. Therefore, the triangular patch area constraint factor \(S\) is introduced, and a new folding cost is obtained. Equation (5) is updated as  
\[\Delta(v_{i})=v^{T}(\sum_{i=1}^{n}S_{v_{1}}Q_{v_{1}})v=(\sum_{i=1}^{n}S_{i})v ^{T}Q_{v_{1}}v\quad(i=0,1,2...n) \tag{6}\]