Construction pit deformation measurement technology based on neural network algorithm

: The current technology of foundation pit deformation measurement is ine ﬃ cient, and its accuracy is not ideal. Therefore, an intelligent prediction model of foundation pit deformation based on back propagation neural network (BPNN) is proposed to predict the foundation pit deformation intelligently, with high accuracy and e ﬃ ciency, so as to improve the safety of the project. Firstly, to address the shortcomings of BPNNs, which rely on the initial parameter settings and tend to fall into local optimum and unstable performance, this study adopts the modi ﬁ ed particle swarm optimization (MPSO) to optimise the parameters of BPNNs and constructs a pit deformation prediction model based on the MPSO – BP algorithm to achieve predictive measurements of pit deformation. After training and testing the data samples, the results show that the prediction accuracy of the MPSO – BP pit deformation prediction model is 99.76%, which is 2.25% higher than that of the particle swarm optimization – back propagation (PSO – BP) pit deformation prediction model and 3.01% higher than that of the BP pit deformation prediction model. The aforementioned results show that the MPSO – BP pit deformation prediction model proposed in this study can e ﬀ ectively predict the pit deformation variables of construction projects and provide data support for the protective measures of the sta ﬀ , which is helpful for the cause of construction projects in China.


Introduction
In various engineering activities, the geological conditions involved are relatively complex, the demand for underground space is also increasing, and the number of foundation pit works is also increasing [1].In this context, the measurement and prediction of foundation pit deformation is very important, which is directly related to the safety of foundation pit engineering [2].In previous studies, scholars from various countries have conducted in-depth research and discussion on the prediction and measurement of foundation pit deformation, and a large number of research results have been published [3].The current foundation pit deformation measurement technology is inefficient, and its accuracy is not ideal enough to effectively ensure the safety of construction workers.Based on previous research results, this study proposes the use of neural network algorithms to make intelligent predictive measurements of foundation pit deformation in construction projects, in order to provide data to support the safety and protection of staff.Firstly, this study proposes strategies to improve the particle swarm optimization (PSO) algorithm in terms of particle flight speed, inertia weights, and learning factors.Then, the back propagation neural network (BPNN) is optimised based on the improved PSO algorithm, and a pit deformation prediction model is constructed using MPSO-BP.The model has a positive effect on the safety of foundation pit projects and provides guidance for the application of intelligent algorithms in foundation pit projects.The main purpose of this study is to build a model to predict the deformation of the foundation pit efficiently and accurately, so as to play a positive role in the safety guarantee of the foundation pit project.The main contributions of the research are two points.The first point is to provide guidance for the application of intelligent algorithms in foundation pit engineering and promote the development process of automation and intelligence in construction engineering.The second point is to provide an efficient and accurate path for the deformation prediction of the foundation pit, thus improving the safety of the staff.There are two main innovations in the research.The first is to apply BPNN to the deformation measurement of foundation pit to realise intelligent and accurate measurement of foundation pit deformation; the second point is to use the improved PSO algorithm to optimise the BPNN, thus improving the performance of the BPNN model.

Related works
With the number of construction projects increasing year by year, people's demand for underground space has become increasingly strong, and the number of foundation pit projects has also increased.The deformation of deep foundation pit engineering will affect the safety of project construction and surrounding buildings, so the deformation measurement of foundation pit has always been the focus of engineering practice.Many scholars have conducted in-depth research on foundation pit engineering.Taking a large deep foundation pit project in Guangzhou financial city as the research background, Xi et al. [4] conducted a comparative analysis of numerical simulation and monitoring data of deep foundation pit excavation deformation.Wang et al. [5] used the finite element analysis software ABAQUS 6.1.4to simulate and analyse the displacement changes of supporting structures such as deep foundation pit excavation, underground diaphragm wall, and steel support.In order to study the stability and adjacent historical operation of the foundation pit during excavation, Liao et al. [6] carried out numerical simulation and field monitoring with a foundation pit in the southern new City of Nanjing as the research background.Wen and Yuan [7] established a three-dimensional symmetrical shield model to study the influence of the change of grouting pressure on the deformation and mechanical properties of the foundation pit and tunnel when the double line shield tunnel crosses the existing foundation pit.Based on the Verhulst model, Chang et al. [8] realised the prediction and early warning of axial force of foundation pit steel support to improve the safety of foundation pit engineering.Li et al. [9] proposed an isolation method in the backfill area of foundation pit to reduce the ground vibration of buildings and developed a new isolation product with high axial stiffness and low shear stiffness.Liu et al. [10] analysed the construction monitoring data of deep foundation pit in structural loess in northwest China to optimise the foundation pit design scheme and save the cost of foundation pit engineering.
With the progress of science and technology, the rapid development of computer technology, and Internet technology, all fields have begun to carry out information and intelligent transformation.In this case, as an important member of intelligent algorithm technology, BPNN plays an important role in various fields.Therefore, many scholars have discussed the application effect of BPNN.Zou et al. [11] used a genetic algorithm (GA) to optimise a BPNN for lunar shear parameter identification.Wang et al. [12] combined convolutional neural networks and BPNNs to construct an integrated model for automatic classification of mill grains to improve the efficiency of mill grain classification and reduce workload.Song et al. conducted mathematical modelling of solid oxide fuel cell (SOFC) through BPNN to evaluate and predict the performance of SOFC at different furnace temperatures.The experiment shows that the error of this prediction method is less than 5%, and it is better than the traditional method [13].In order to make up for the defects of BPNN, Han et al. selected GA to obtain network parameters, optimise BPNN, and evaluate the effect of unmanned aerial vehicle shape product design scheme based on the optimised BPNN.The results show that the relative error of the evaluation method is less than 4%, and the design scheme can be evaluated quickly and scientifically [14].Wang and Fu [15] analysed the integrated performance statistics of green suppliers based on fuzzy mathematics and BPNN, through which enterprise managers can reasonably evaluate the key aspects of enterprise management, correctly, completely, and reasonably allocate enterprise resources correctly, completely and rationally to minimise costs and maximise profits.Zou [16] concluded that the causes of consumer resale behaviour are complex, so based on machine learning and BPNNs, he constructed a model for measuring consumer online resale behaviour, and the results showed that the model is effective and can provide a theoretical reference for subsequent related research.Wei and Jin [17] applied machine learning techniques to a human resource management system in order to improve the usefulness of the system and built a combined model consisting of an optimised GM(1,1) model and a three-layer BPNN model according to the dimensionality of the prediction method selection.Zhang and Liang [18] developed a wearable inertial sensor-based athlete motion capture based on the BPNN algorithm for the problem that most of the body recognition detection of athletes is technical recognition and less motion state detection, and he constructed a wireless signal transmission scheme based on the sensor system.Huang et al. [19] proposed a beetle swarm antennae search-BPNN algorithm, a method that was proposed to predict the crosstalk of multi-stranded bundles of multi-stranded wires.
As can be seen in the aforementioned review of research results, BPNNs are widely used in various fields and play an important role in various industries.However, there are few research results that apply BPNNs to the measurement of foundation pit deformation in construction projects.The study uses the improved PSO algorithm to optimise the BPNN and constructs a pit deformation prediction model based on the optimised BPNN to achieve intelligent prediction and measurement of pit deformation and ensure the safety of pit work, bridging the gap in the application of neural network algorithms in pit engineering.
3 Improved BPNN-based pit deformation prediction model

Defects of traditional PSO algorithm
In the course of the rapid development of China's market economy, the number of deep foundation pit construction projects is also increasing year by year.The deformation of deep foundation pit projects can affect the construction safety and the safety of the surrounding buildings, so the measurement of foundation pit deformation has always been the focus of engineering practice.The BPNN-based pit deformation prediction model has been proven to be effective in previous studies, but the BPNN is not stable enough and easily falls into local optimisation, so the study uses the PSO algorithm to improve the BPNN.The PSO algorithm is a biomimetic intelligent algorithm that can obtain the optimal solution through information transfer between particles and the overall iterative update of the population.Therefore, the PSO algorithm is widely used in the solution of optimisation problems.Let there be a population containing m particles, denoted as denotes the coordinates of the i particle; denotes the flight speed of the i particle; denotes the fitness value of the i particle, where the best fitness value is denoted as p best and is considered as the individual extreme value; is the position of all particles in the population; and the best position is denoted as g best and is considered as the global extreme value.In previous studies, in order to improve the performance of the PSO algorithm, some scholars have introduced inertia weights on the velocity term w, and after obtaining the individual and global extremes, PSO can be updated iteratively according to equation (1) to update the velocity and position of the particle i in the d dimension.
where k represents the number of iterations of the algorithm update; c c , 1 2 is the learning factor, where c 1 mainly regulates the step of the optimal flight of individual particles and c 2 mainly regulates the step of the global optimal flight; ( ) ⋅ rand is a random number with the value range of [0,1]; ( ) represents the velocity of the i th particle in the d th dimension at the k th iteration; ( ) represents the position of the i th particle in the d th dimension at the k th iteration; ( ) represents the global extreme value of the i th particle in the k th iteration; d ( ) represents the global extremum of the population in the d dimension at the k iteration.In Construction pit deformation measurement technology  3 equation ( 1), when the value of w is large, it is good for global optimisation, but it will affect the solving efficiency of the algorithm; when the value of w is small, the solving efficiency of the algorithm is faster, but it is easy to fall into local optimisation.Therefore, the setting of the w value is related to the speed and accuracy of the PSO algorithm.In order to adjust the w value, using a linear decreasing strategy, w can be expressed in the following equation: where w max and w min are the maximum and minimum values of w and T max is the maximum number of iterations of the algorithm.The basic flow of the PSO algorithm is shown in Figure 1.
However, the PSO algorithm also has more obvious limitations, such as weak global convergence, the tendency to fall into local optima, and the tendency to converge early.To this end, the study proposes strategies to improve the PSO algorithm in terms of particle flight speed, inertia weights, and learning factors.

Optimisation strategy for the PSO algorithm
To facilitate the calculation, set the particle dimensions to one dimension, and assume that the position and velocity of all particles in the particle swarm, except for the particle i, do not change, then the subscript d i , can be ignored in the formula.Let = + φ φ φ 1 2 , where φ 1 and φ 2 are defined as shown in the following equation: where r r and Based on the aforementioned equations, equation ( 1) can be replaced with the following equation: From equation ( 5), the following equation is obtained: Through equation ( 6), it can be learned that the concept of speed can be removed from the PSO algorithm, thus being able to dispense with the initialisation of the initial speed when initialising the various parameters, thus reducing the complexity of the algorithm and improving its operational efficiency.Based on the aforementioned fact, it is possible to obtain an iterative update formula for the PSO algorithm, which is deformed by simplification to obtain a first-order differential equation, as shown in the following equation: It can be seen that the new iterative update formula in equation ( 7) has fewer parameters compared to equation ( 1), simplifying the algorithm's operations and improving efficiency.In traditional PSO algorithm optimisation, the inertia weights are generally used in a linear decreasing strategy to ensure both the global and local search capability of the algorithm.However, this method can lead to weaker flight ability of particles in the late iterative stage due to the small value of w , and thus, it is difficult to jump out of the local extrema for particles caught in the local extrema.To address this drawback, a random inertia weight is proposed to make the w value with some uncertainty, so that the particles have the ability to fly out of the local optimum even in the late iteration.The study combines the stochastic inertia weight and the linear decreasing inertia weight to obtain the following equation: where W W μ , , and are defined as shown in the following equation: where W W and max min are the maximum and minimum weight values set, respectively.Drawing on the idea of variation in GA, a variation operation is added to the random inertia weights to make it possible for the particles to have a reverse search to avoid missing the global optimum, and this parameter is represented by r 3 .Combining the aforementioned equations, the expression for the stochastic inertia weights is obtained and is given in the following equation: There are two learning factors in the PSO algorithm, c c , 1 2 .c 1 is used to adjust the step size of the particles towards the individual extremes, while c 2 is used to adjust the step size of the particles towards the global extremes.Therefore, a large value of c 1 is needed at the beginning of the iteration to ensure that all particles in the swarm are closer to the optimal position to obtain the individual extremes, thus enhancing the global search capability; a large value of c 2 is needed at the end of the iteration to ensure the convergence of the PSO algorithm and thus obtain the global optimal solution.From the aforementioned fact, we know that the values of c 1 and c 2 are basically inversely proportional.When the value of c 1 is larger, a smaller value of c 2 is required; when the value of c 2 is larger, a smaller value of c 1 is required.For this reason, the study proposes an evolutionary formula for the learning factor, as shown in the following equation: where c max and c min are the maximum and minimum values of the pre-set learning factors, respectively.According to equation ( 11), in the early iteration of the PSO algorithm, the value of c 1 is larger and the value of c 2 is smaller, which makes the PSO algorithm have a strong global search capability; in the late iteration, the value of c 2 is larger and the value of c 1 is smaller, which makes the PSO algorithm have a strong local search capability and higher accuracy, which in turn strengthens the convergence performance of the PSO algorithm.
In the process of the PSO algorithm particle search, there is a certain possibility of flying out of the feasible domain range, leading to a decrease in the accuracy of the PSO algorithm and the occurrence of invalid solutions.Therefore, certain measures need to be taken to deal with the out-of-bounds particles accordingly.
The strategy adopted in the study is as follows: when a particle in the population appears to be out of bounds, a dimension of the particle flies beyond the flight domain, or the particle flies beyond the flight domain, at which point the out-of-bounds particle is reset and a value is regenerated in the flight domain, as shown in the following equation: Based on the aforementioned fact, the modified particle swarm optimization (MPSO) is constructed to improve and optimise the particle swarm algorithm to increase efficiency and accuracy.The flow of the MPSO algorithm is shown in Figure 2.

Calculate the fitness of all particles
Reset particles according to formula (12) when out of bounds behavior occurs

Obtain individual extreme value after calculation Obtain global extreme value after calculation
Whether the termination conditions are met Output results

Construction of a pit deformation measurement model based on MPSO-BP
BPNN is a kind of error direction propagation neural network, which is one of the most widely used and mature neural networks.
As can be seen in Figure 3, the BPNN is a three-layer model, consisting of an input layer, an implicit layer, and an output layer.In Figure 3, x j represents the input signal of the node j; w ij represents the connection weight of the node i in the hidden layer and the node in the input layer; j θ i represents the threshold of the node in the hidden layer; i ( ) ϕ x is the activation function of the neuron in the hidden layer; ( ) ψ x is the activation function of the neuron in the output layer; a k represents the threshold of the nodek in the output layer; and o k is the output value of the node k in the output layer.There are two signals in the BPNN.One is called the work signal, which is propagated forward in the BPNN; the other signal is called the error signal, which is propagated backward in the BPNN.During the forward propagation of the working signal, the output value o k of the node k in the output layer is shown in the following equation: In the back-propagation process of the error, the error between the output value of the output layer and the desired output value is obtained after the calculation, and this error is back-propagated up to the neurons in the hidden layer, and then, the connection weights and thresholds are adjusted according to the value of this error, and this operation is repeated in the process of iteration until the error is less than the set value or the number of iterations reaches the set value.The training error of the BPNN is calculated as shown in the following equation: where E denotes the training error of the BPNN and p denotes the number of training samples.BPNNs have important applications in various fields, for example, in deep foundation pit projects, where the extent of pit deformation is predicted and measured by monitoring data.There are generally three types of pit deformation: surface settlement, pit bottom uplift deformation, and enclosure deformation.The historical data obtained from the monitoring points are fed into the BPNN, which is trained to obtain the predicted values of pit deformation and then formulate countermeasures to ensure the safety of the pit project.However, the performance of the BPNN depends on the initial parameters, which is prone to local optimisation and unstable performance, so a global optimisation algorithm is needed to optimise the training of the BPNN.The study uses

Input layer Hidden layer Output layer o k
Forward calculation process the MPSO algorithm to optimise the training of BPNNs.Before the MPSO algorithm is used to optimise the BPNN, the connection weights and thresholds of the layers in the BPNN are first encoded.The study uses vector coding to perform the coding operation; in vector coding, all particles are considered as a vector, and each vector represents a neural network parameter that needs to be initialised, such as weights and thresholds.The coding can be expressed in the following equation: where i denotes the number of particles and = i m 1, 2,…, .After the coding is completed, the parameters to be initialised are mapped to particle dimensions and an optimisation search operation is performed to obtain the optimal parameters.After optimising the BPNN using the MPSO algorithm, the MPSO-BP model is constructed to achieve predictive measurements of pit deformation.The basic flow of the MPSO-BP algorithm is shown in Figure 4.

Performance analysis of MPSO-BP pit deformation prediction model
The consistent.The parameter settings are shown in the reference literature [20].The training process of the three models is shown in Figure 5.This process is represented by the fitness value of the model.In the training process, the faster the fitness value decreases, the better the convergence of the model.
In Figure 5, a lot of information can be shown.It can be seen that as the number of iterations increases, the fitness functions of all three models decrease.The MPSO-BP pit deformation prediction model has the fastest convergence rate and the best convergence performance, with the smallest fitness value of 6.52 at 165 iterations; the PSO-BP pit deformation prediction model has a worse convergence performance compared to the MPSO-BP pit deformation prediction model, with the smallest fitness value of 6.56 at 272 iterations: the BP pit deformation prediction.As can be seen, the MPSO-BP pit deformation prediction model requires the fewest number of iterations to achieve optimal performance, 107 fewer than the PSO-BP pit deformation prediction model and 135 fewer than the BP pit deformation prediction model.After convergence, the MPSO-BP pit deformation prediction model had the lowest fitness value, 0.04 lower than the PSO-BP pit deformation prediction model and 0.15 lower than the BP pit deformation prediction model.The aforementioned results show that the convergence and accuracy of MPSO-BP are better than those of the other two models, indicating that the optimisation effect of MPSO on BPNN is significant.
The variation in accuracy of the three models during the training process is shown in Figure 6.The accuracy of the model is evaluated by the error value.The smaller the error value, the higher the accuracy of the model and the better the performance of the model.In addition, the faster the error value of the model decreases, the better the convergence of the model.The MPSO-BP pit deformation prediction model requires the least number of iterations to achieve the target accuracy, 189, which is 84 less than the 273 iterations of the PSO-BP pit deformation prediction model and 373 less than the 562 iterations of the BP pit deformation prediction model.These results show that the convergence performance of the MPSO-BP pit deformation prediction model is better than that of the other two models.It shows that MPSO can effectively optimise the BPNN model.
The prediction errors of the three models were analysed by using the numbers in the three data sample sets as the test sample set.Prediction error refers to the error between the output value of the model and the actual measurement value.The smaller the prediction error, the better the prediction effect of the model on the deformation of the foundation pit.The percentage prediction errors of the three models for pit deformation are shown in Figure 7.
In Figure 7, it is easy to see that the MPSO-BP pit deformation prediction model has the smallest prediction error from day 10 to day 50 of monitoring, with an average of 4.84%; the PSO-BP pit deformation prediction model has a larger prediction error than the MPSO-BP pit deformation prediction model and a smaller prediction error than the BP pit deformation prediction model, with an average of 6.72%; the BP pit deformation prediction model has the largest prediction error of the BP pit deformation model, with an average of 9.46%.It can be seen that the prediction error of the MPSO-BP pit deformation prediction model is 1.88% lower than that of the PSO-BP pit deformation prediction model and 4.62% lower than that of the BP pit deformation prediction model.This shows that the accuracy of BPNN model has been significantly improved after MPSO optimisation, which also verifies the improvement effect of MPSO on BPNN.The mean absolute error (MAE) of the three models is shown in Figure 8.The average absolute error is the average of the absolute value of the deviation between all single observations and the arithmetic mean, which can accurately reflect the size of the actual prediction error.

MPSO-BP PSO-BP BP
In Figure 8, there is a significant decrease in the MAE values of the models over the course of the three model iterations.After 150 iterations, the MAE value of the MPSO-BP pit deformation prediction model was 1.26; the MAE value of the PSO-BP pit deformation prediction model was 1.78, which was 0.52 higher than that of the MPSO-BP pit deformation prediction model; and the MAE value of the BP pit deformation prediction model was 2.27, which was 1.01 higher than that of the MPSO-BP pit deformation prediction model.The aforementioned results show that after optimisation, the error of the MPSO-BPNN model is lower than that of the other two models.
F1 indicator was used to evaluate the performance of the three models.The F1 values of the three models are shown in Figure 9. F1 is an indicator used in statistics to measure the accuracy of binary classification models.It takes into account both the accuracy and recall of the classification model, effectively reflecting the correctness and accuracy of the model.
In Figure 9, it can be seen that the F1 values of all three models increase as the number of iterations increases.At 300 iterations, the F1 value of the MPSO-BP pit deformation prediction model is 0.63; the F1 value of the PSO-BP pit deformation prediction model is 0.45, which is 0.18 lower than that of the MPSO-BP pit deformation prediction model; and the F1 value of the BP pit deformation prediction model is 0.27, which is 0.36 lower than that of the MPSO-BP pit deformation prediction model.At 600 iterations, the F1 value of the MPSO-BP pit deformation prediction model was 0.92; the F1 value of the PSO-BP pit deformation prediction model was 0.63, which was 0.29 lower than that of the MPSO-BP pit deformation prediction model; and the F1 value of the BP pit deformation prediction model was 0.44, which was 0.48 lower than that of the MPSO-BP pit deformation prediction model.The accuracy of the three models is shown in Figure 10.
In Figure 10, it can be seen that the pit prediction accuracy of all three models increases as the number of iterations increases.The prediction accuracy of the MPSO-BP pit deformation prediction model was 99.35% at 300 iterations; the prediction accuracy of the PSO-BP pit deformation prediction model was 97.75%, which was 2.60% lower than that of the MPSO-BP pit deformation prediction model; the prediction accuracy of the BP pit deformation prediction model was 96.51%, which was 2.84% lower than that of the MPSO-BP pit deformation prediction model.The prediction accuracy of BP pit deformation prediction model was 96.51%, which was 2.84% lower than that of the MPSO-BP pit deformation prediction model.At 600 iterations, the prediction accuracy of the MPSO-BP pit deformation prediction model was 99.76%, which was 2.25% higher than that of the PSO-BP pit deformation prediction model and 3.01% higher than that of the BP pit deformation prediction model.The aforementioned results show that the accuracy of the MPSO-BPNN model is significantly higher than the other two models.This shows that MPSO can optimise the accuracy of BPNN model by finding the optimal parameters.In summary, optimisation of the BPNN based on the improved particle swarm algorithm can effectively improve the prediction accuracy and efficiency of the pit deformation prediction model, so that countermeasures can be formulated to ensure the safety of the pit project.

Figure 6 :Figure 5 :
Figure 6: Accuracy changes of three models during training.

Figure 7 :
Figure 7: Prediction error percentage of three models for foundation pit deformation.