The purpose is to solve the problems of cumbersome calculation, low accuracy, poor timeliness, rigid data acquisition, high cost, large volume, and insufficient signal processing capacity of traditional vision sensor (VS) in Ningxia companies. Firstly, this paper designs an embedded smart VS based on advanced RISC machines (ARM) processor. Secondly, it proposes a cost estimation algorithm for power transmission and transformation project (PTTP) based on particle swarm optimization-least squares support vector regression (PSO–LSSVR). Afterward, a cost estimation model of PTTP based on building information modeling (BIM) is proposed. Thirdly, historical cost data of PTTP of a Ningxia company within five years are selected as data samples to verify the accuracy of the PSO-LSSVR estimation algorithm and BIM model. The results show the following: (I) The measurement error of the designed smart VS is less than 4%, with high accuracy, which is suitable for large-scale measurement in the construction site. (II) The error of the PSO-LSSVR algorithm in engineering cost prediction is less than 20%, and the accuracy is higher than that of traditional support vector machine (SVM) and LSSVR algorithms. The optimization effect is remarkable and can be used for the feasibility analysis of PTTPs. (III) The proposed BIM-based PTTP cost estimation model error in the project cost estimation is controlled within 10%. With high accuracy, it can be applied to the PTTP management of Ningxia company. The purpose is to provide important technical support for the upgradation of traditional VS technology and the realization of visual management and rapid cost estimation of PTTP of Ningxia companies.

1. Introduction

The whole process cost of the power transmission and transformation project (PTTP) refers to reasonable cost control without affecting the overall project quality and in-time deviation correction during the construction process to manage the project costs [1]. With the rapid progress and development of society, computer and Internet technology have been popularized, making qualitative changes in people’s lives and the development and management of enterprises [2]. Lv et al. constructed a cognitive computing model based on context-aware data flow, which was significant for operators to analyze user behavior and develop personalized services [3]. At present, some developed countries have made full use of computer and networking technology (CNT) in the cost management of enterprise PTTP projects. Various project cost-oriented software is also being developed and used [4]. PTTPs involve various fields, a wide range, many influencing factors, large investment, and long operation period, making the cost management and monitoring of PTTPs a complicated and difficult problem [5]. At present, most companies in Ningxia still use the traditional cost method for PTTPs, which has shown some shortcomings: (1) The quantities are usually calculated manually using two-dimensional (2D) drawings, and there are many kinds of quantities and changeable rules, so it is easy to miss items in the calculation; (2) quota is often applied when quantity is calculated manually, which is highly dependent on personal experience; (3) data, such as material and equipment prices and personnel costs, need to be collected manually, with poor timeliness; and (4) some expenses need to be adjusted manually. There are many projects, and it is not easy to update data [6]. The birth of support vector machine (SVM) and building information modeling (BIM) tools offers a new solution to solve the above problems. SVM has an excellent ability to learn and process small sample data and estimate the cost of PTTP rapidly. BIM can model PTTP into a virtual three-dimensional (3D) model and provide a close-to-actual engineering information base for cost estimation to obtain the engineering quantity information. At the same time, it also provides a platform for all project parties to work together [7]. 3D BIM needs to input the spatial information of the construction site, which the vision sensor (VS) can facilitate.

Juszczyk proposed a cost estimation model of bridge construction projects based on SVM and verified the model performance over data from several bridge construction projects completed in Poland. The outcome showed that the model could provide an early estimation of bridge construction cost with high accuracy [8]. Lan et al. believed that BIM had a strong 3D-aided design ability to help designers quickly generate 3D models for PTTPs, thus providing the overall image and visual effect of the project for investors in the design bidding stage and reference for the design of relevant drawings in the later stage [9]. Zhang thought BIM software could realize the construction units’ 3D visualization and control the on-site construction process. Through intelligent components, the construction unit could solve the construction management problems of complex grid structure engineering. Then, the construction schedule and cost optimization model was constructed based on the genetic algorithm (GA) to optimize costs [10]. Xu and Yang adopted the deep learning (DL) method to identify tunnel cracks based on image sensors intelligently. The experiment was set against a several-kilometer-long subway tunnel structure and built a 3D model. Then, the cracks were automatically identified by image data. Thus, it solved the problem that the traditional tunnel detection methods were time-consuming, cost high, and highly dependent on people’s subjective initiative [11].

Traditional VSs have problems, such as high price, large volume, and insufficient signal processing capacity [12]. SVM is an optimization algorithm with high computational complexity to solve inequality-constrained convex quadratic programming. Therefore, this paper selects the improved SVM algorithm for cost estimation: least squares support vector regression (LSSVR). The proposed algorithm replaces inequality constraints with equality constraints to greatly simplify the calculation. Still, its robustness has somewhat been affected, and thus, the estimation accuracy is reduced to some extent. Based on this, this paper creatively designs a low-cost and small-volume embedded smart sensor to integrate image acquisition, self-processing, and communication transmission functions. Then, an algorithm with excellent problem solution optimization ability, particle swarm optimization (PSO), is used to optimize the LSSVR parameters to improve its calculation accuracy. Finally, the PSO-LSSVR optimization algorithm is combined with BIM to build the PTTP cost estimation model. The purpose is to provide important technical support for upgrading traditional VS technology and realizing visual management and rapid cost estimation of PTTP of Ningxia company.

2. Construction of Project Cost Estimation Model

2.1. Measurement Principle and Calibration of VS

Combining the real-time data of the construction site collected by the VS with the BIM model can realize the construction progress real-time monitoring to find and correct the deviation in time and update the BIM model information in real-time. Thus, it can achieve the goal of accurately managing project costs. VS data acquisition’s principle and calibration method will be described next.

2.1.1. Measurement Principle of VS

(1) Principle of Line-Structured Light 3D Vision. The line-structured light mode is to project a light beam to the object. The light bar is modulated per the change of the depth of the object’s surface and the possible gap. In the image, the light bar is distorted and discontinuous, the degree of distortion is directly proportional to the depth, and the discontinuity shows the physical gap of the object’s surface. The 3D information of the object surface is obtained through the distorted light bar image information [13]. The schematic diagram of line-structured light vision measurement is shown in Figure 1.

(2) Conversion from Image Coordinate System to Camera Coordinate System. The coordinates of any point P(xc, yc, zc) projected onto the camera imaging plane in space can be expressed as (x, y), and Eq. (1) can be obtained:

In Eq. (1), is the focal length of the camera.

Equation (1) is converted into matrix form, as shown in Eq. (2):

In Eq. (2), is the homogeneous coordinate of point P in the camera coordinate system.

The conversion equation from the image coordinate system to the camera coordinate system can be obtained by combining Eqs. (1) and (2), as follows:

Eq. (4) is obtained: where (, ) is the image coordinate system, as shown in Figure 2;

(, ) is the image coordinate of the intersection of the optical axis centerline of the camera and the imaging plane; and kx and denote the magnification factor in the -axis and -axis, respectively; is a matrix.

(3) Conversion from Camera Coordinate System to World Coordinate System. For any point P in space, the homogeneous coordinates between the camera coordinate system and the world coordinate system have the following corresponding relationship:

(, , ) represents the coordinates of the measuring point in the world coordinate system .

In the camera coordinate system,, , and represent the direction vector, direction vector, and direction vector, respectively. The origin coordinate position of is denoted by .

indicates the camera external parameter matrix.

and stand for translation and rotation matrices, respectively.

2.2. Calibration of the Vision System
2.2.1. Camera Calibration

Given the coordinates of the measuring point in the world coordinate system, the 3D coordinates and the 2D coordinate mapping relationship of the corresponding image are calculated as in Eq. (6):

2.2.2. Laser Plane Calibration

The laser plane is calibrated based on the stereo target given the internal and external parameters of the camera. The schematic diagram of the target is shown in Figure 3.

The two top-end faces on the target are parallel and rectangular. The relative positions of the vertices of the rectangle and the distance of the end faces are known. The world coordinate system () is established at the center of the upper-end face. The equation of the plane of the two end faces under the camera sitting system can be obtained through Eqs. (7) and (8):

The coordinates of any point Pj on the laser stripe on the normalized imaging plane read as follows:

Point Pj is on the straight line between the center point of the camera optical axis and the point (), and Eq. (10) is obtained:

Point Pj is on the laser plane. In the camera coordinate system, the equation of the laser plane reads as follows:

where , , and are the parameters of the laser plane equation in the camera coordinate system.

The 3D coordinates of the object can be obtained by combining Eqs. (12) - (14):

For the feature points on the laser stripe on the high-end surface, Eqs. (12), (13), and (14) are introduced into Eq. (7), and Eq. (15) is obtained:

For the feature points on the laser stripe on the low-end face, Eqs. (12), (13), and (14) are introduced into Eq. (8) to obtain Eq. (16):

2.3. Design of the Embedded Smart VS

Embedded VS is mainly composed of embedded hardware platform, embedded processing software, image sensor, line structure light source, and data output interface. The structure of the smart VS is shown in Figure 4.

2.3.1. Hardware Design of Smart VS.

Functions of a smart VS include image collection, lighting, laser control, and communication, as well as good scalability. Therefore, in the design of a smart VS, the hardware platform must have high data processing speed and good flexibility. Hardware platforms can be divided into several types, such as (), Field Programmable Gate Array (FPGA), Digital Signal Processor (DSP), and Advanced RISC Machines (ARM) 11. The performance comparison is shown in Table 1.

Table 1 illustrates that the ARM11 processor is superior to other processors in processing speed, processing capability, design complexity, and scalability. This paper selects the S3C6410 ARM11 processor of Samsung, which is a processor with strong data processing capability, perfect function, and strong scalability; it is suitable for the design of the embedded smart VS.

Comprehensive metal oxide semiconductor (CMOS) image sensor is used for image acquisition, with high integration and low power consumption, meeting the needs of balancing image quality and device cost. Accordingly, this section selects the CMOS image sensor OV9650 of OmniVision company as the image acquisition camera to directly convert the collected visual signal into a digital signal and output it.

Then, the line structured light projector is used to obtain the object’s 3D information, which is rigidly connected with the whole hardware system to fix the relative position of the structured light source and the image sensor. It ensures that the structured light plane based on the coordinate system of the image sensor is fixed in the actual measurement.

The hardware system is designed with several interfaces, including a 100 M Ethernet interface, Controller Area Network (CAN) bus interface, and 8G Secure Digital (SD) Memory card. The data information obtained by image acquisition and processing can be directly stored in an SD card or transmitted to other terminals through the CAN bus to realize the high interaction and scalability of the system.

The embedded vision measurement unit is designed with the ARM11 core processor and the CMOS image sensor, which has the advantage of low cost, easy implementation, strong interaction, and convenient use.

2.3.2. Software Design of Smart VS

The embedded visual measurement unit is run on a Linux operating system (OS), which is an open-source code system, supports multifile systems and multitask operations, and has a small kernel and high efficiency [14]. The smart VS is designed with a trimmed Linux-3.0.1 as the kernel. The Linux kernel provides a unified application interface to access the audio and video drivers, namely, Video For Linux Two (V4L2), and the relevant interfaces of V4L2 are defined in include/Linux/videodev2.h. The collected images and processed results can be transmitted through the network interface. The program design flow is shown in Figure 5.

2.4. Design of Cost Estimation Model of PTTP Based on BIM

Next, a fast project cost estimation method based on particle swarm optimization (PSO) [15] and least squares support vector regression (LSSVR) [16] is proposed. PSO algorithm is used to classify the data and eliminate abnormal data sample points accurately, and then LSSVR is used to design the cost estimation method of PTTP. Further, the PSO-LSSVR algorithm is applied in BIM, thereby realizing 3D visual monitoring of PTTPs and rapid project cost estimation.

2.4.1. PSO Algorithm

PSO is initialized as a group of random particles (random solutions), and the optimal solution is found through iteration. In each iteration, the particles update themselves by tracking two “extreme values” (pbest and gbest). After obtaining these two optima, the particle updates its speed and position through the following equations.

and represent the -dimensional variable of the ith particle; stand for the -dimensional velocity component and position component of the ith particle at time t; denotes the optimal position of the -dimensional individual of the ith particle at time ; means the optimal position of the -dimensional component of the whole particle swarm at time ; c1 and c2 refer to the self-learning ability of particles and the ability to learn from excellent particles in the group, respectively; r1 and r2 are random number between [0, 1].

2.4.2. Classification and Regression Analysis Method of Project Cost Data.

(1) Classification Analysis. The Gaussian radial basis function (RBF) kernel is commonly used, as shown in Eq. (18).

represents the inner product of a transformation space; stands for training data set input samples; and σ refers to function parameters.

(2) LSSVR Analysis. Support vector machine (SVM) is a generalized linear classifier for binary data classification according to supervised learning. Its decision boundary is the maximum margin hyperplane for learning samples. At present, it has been widely used. Wan et al. constructed a brain image fusion Digital Twin diagnosis and prediction model based on a semisupervised support vector machine and improved AlexNet [17]. The optimization index of LSSVR adopts the square term to convert inequality constraints into equality constraints. The solution relationship reads as follows:

and : a vector perpendicular to a hyperplane that is defined by a parameter (, ); : penalty coefficient; and : Relaxation term;

2.4.3. Fast Estimation Method of Project Cost Based on PSO-LSSVR

First, c1 and c2 parameters in the PSO algorithm are optimized, and the optimized PSO algorithm is used to optimize the parameters of LSSVR further. The penalty factor and the function parameter in LSSVR are selected to constitute the particles in the PSO algorithm. And the particles are coded based on these two parameters. Each particle is a 2D solution vector. Through iteration, the optimal solution vector is found to determine the optimal and . Specifically, directly determines the complexity of the model; determines the radial action range of the function. To sum up, the PSO algorithm does not directly obtain the empirical values of the two parameters but only optimizes them.

2.4.4. BIM Model Architecture Design

The cost estimation model architecture of PTTPs based on BIM is shown in Figure 6.

The working steps of the BIM cost estimation model are as follows: (1) Historical engineering data are selected to train and verify the accuracy and precision of the model. (2) Autodesk Revit is used to build a 3D visual model of the substation, and some project information is obtained. Some parameters are applied to the standard quota to obtain the project parameters and cost, and the project data are determined accordingly. (3) The determined project data are taken as the verification sample to obtain the estimated cost of the project finally, and the design should be modified in time by comparing the actual static investment data.

Based on the designed BIM model, accurate and fast engineering information can be obtained, and the accuracy and precision of engineering quantity and cost calculation are higher. In the process of actual project cost, the collaborative work of all participants should be strengthened, and work efficiency should be improved. The BIM model can update the data in real-time, calculate the cost, and save the change in data for search in case of design change. To sum up, the introduction of BIM technology has important practical significance for the cost of PTTPs.

2.5. Experimental Methods
2.5.1. Measurement Accuracy-Test Method of Embedded Smart Sensor.

(1) Displacement Measurement. Displacement measurement is usually used to obtain scene depth information, mainly by adjusting the position relationship between smart VS and measurement point, and structured light vision measurement is used to calculate depth information. First, the laser line projected by the VS is placed on the measuring point. Then, the VS is moved, and the displacement variation is calculated relative to the measuring point each time, as shown in Eq. (20).

(): initial position of smart VS; (): position of smart VS after each adjustment.

The relative displacement variation obtained by the measurement is calculated as in Eq. (21).

(): 3D coordinates of the measuring point obtained by the VS at the initial position; (): 3D coordinates of the measuring point obtained by the position of the VS after displacement.

(2) Dimension Measurement. At present, VS has been widely used in industrial measurement. It has the advantages of noncontact, nonwear, fastness, and accuracy [18]. Here, different specifications of workpieces are selected to verify the measurement accuracy of the VS. The workpiece size information measured by an embedded smart VS is compared with its actual size, and the measurement error is calculated.

2.5.2. Test of Cost estimation Model of PTTP Based on BIM.

(1) Selection of Test Indexes. The four main subitems of static investment are selected as the index of the model test, namely, construction cost, installation cost, equipment purchase cost, and other costs. Static investment refers to the time value of the cost calculated by collecting the price level at a certain time according to the regulations. The size of the itemized cost directly determines the static investment [19, 20].

(2) Model Test Method. Firstly, partial cost data of a 220 kV PTTP of Ningxia company within five years are selected as the training and verification samples of the prediction algorithm. The proposed fast cost estimation algorithm of the PTTP is used to predict the project cost, and the predicted cost is compared with the actual settlement results to verify the accuracy of the PSO–LSSVR prediction algorithm. Then, this section also selects the standard SVM algorithm and the unoptimized LSSVR algorithm to make a comparative analysis with the proposed PSO–LSSVR algorithm.

According to the license, the cost data of 220 kV PTTP used to support the research findings are provided by Ningxia Electric Power Co., Ltd., so it cannot be provided free of charge. At the same time, the experimental data set is constructed based on the technically-treated original data provided by the company, which has a certain degree of confidentiality.

Secondly, BIM is used to implement the three-dimensional model of the project. It is necessary to obtain the project information and cost in combination with the indexes to determine the project information, such as voltage level, number of transformers, and capacity of each transformer. The information is imported into PSO–LSSVR prediction algorithm to obtain the cost prediction and compare it with the project’s actual cost. Therefore, the four costs are analyzed based on the model test experiment.

3. Results of Algorithm and Model Test

3.1. Results of Smart VS Measurement Accuracy Test
3.1.1. Displacement Measurement Results

The displacement measured by the designed smart VS is compared with the actual displacement, as shown in Figure 7.

Figure 7 demonstrates that, overall, the measured value is slightly larger than the actual value. The maximum difference between the measured and actual values is 16.9 mm, the corresponding error is 3.52%, the minimum difference is 2.6 mm, and the corresponding error is 1.30%. The average displacement difference is 9.61 mm, and the average error is about 2.56%. To sum up, under the designed embedded smart VS, the measurement error of the target is controlled within 4%, and the measurement accuracy is high.

3.1.2. Dimensional Measurement Results

The target dimension measured by the designed smart VS is compared with the actual dimension, as shown in Figure 8.

Figure 8 reveals that similar to the displacement measurement results, and overall, the dimensional measurement value is slightly larger than the actual value. The maximum difference between the two is 7.9 mm, the corresponding error is 3.94%, the minimum difference is 0.7 mm, and the corresponding error is 3.55%. The average dimension difference is 3.46 mm, and the average error is about 3.72%. To sum up, the error of the target dimension measurement with an embedded smart VS is controlled within 4%, and the accuracy is high. It is suitable for large-scale measurement on the construction site of PTTP.

3.2. Accuracy Test Results of PSO–LSSVR Project Cost Estimation Algorithm
3.2.1. Estimated Results of Itemized Cost.

The itemized cost prediction value and actual cost comparison results obtained by PSO -LSSVR project cost prediction algorithm are shown in Figure 9.

According to the comparison chart of itemized cost estimation results, there is a certain error between the estimated value and the actual value of the four itemized costs. Among them, the smallest error is 0.11% of project 4’s equipment purchase cost, and the largest error is 19.93% of project 2’s installation cost. The average errors of the four itemized costs are 5.13%, 6.55%, 17.43%, and 11.75%, respectively. Hence, the estimation error of itemized cost of PTTP based on the PSO–LSSVR algorithm is generally controlled within 20%, and the accuracy needs to be improved. Still, the range of itemized costs can be quickly understood, which is helpful to the feasibility analysis of PTTP in the early stage.

Figure 10 compares the itemized cost errors estimated by SVM, LSSVR, and the proposed PSO–LSSVR.

As plotted in Figure 10, from the overall trend, the prediction errors of the three algorithms for itemized costs are SVM, LSSVR, and PSO–LSSVR from large to small. The SVM algorithm and the LSSVR algorithm’s average prediction errors are 15.11, 15.22, 25.60, 23.35, and 9.97, 11.25, 22.33, and 18.17, respectively. By contrast, the proposed PSO–LSSVR algorithm has presented average prediction errors of 5.13, 6.55, 17.43, and 11.75, respectively, significantly lower than the other two algorithms. Thus, the calculation accuracy of the improved LSSVR algorithm is better than that of the traditional SVM algorithm. After LSSVR is optimized by the PSO algorithm (namely, the proposed PSO-LSSVR), the accuracy is further improved, and the optimization effect is remarkable.

3.2.2. Results of Static Investment Cost Estimation

The comparison results of estimated static investment based on the PSO–LSSVR project cost estimation algorithm and actual cost are shown in Figure 11.

Figure 11 presents that the maximum error between the static investment estimation cost based on PSO–LSSVR algorithm and the actual cost is 10.42% of project 1, the minimum error is 2.16% of project 5, and the average error is 5.92%. The comparison between Figures 10 and 11 suggests that the error of itemized cost is generally greater than that of static investment. This is probably because the itemized cost’s relevant information is more detailed, the level is lower than the static investment, and the index correlation and dependency are slightly poor; as a result, the PSO-LSSVR algorithm shows a low accuracy in estimating the itemized cost.

3.3. Test Results of BIM-Based PTTP Cost Estimation Model

The comparison between the estimated itemized cost of the BIM-based PTTP cost estimation model and the actual itemized cost is shown in Figure 12.

Figure 12 signifies that the installation cost error between the actual value and estimated value of the BIM-based estimation model is the smallest among the four itemized costs, 3.96%, while the largest error is other costs, 9.91%, and the overall average error is 7.86%. Therefore, the estimation error if the BIM-based PTTP cost estimation model on the itemized cost is generally controlled within the allowable range, which can be applied to the PTTP cost management of Ningxia company.

4. Conclusions

Traditional VS is generally expensive, bulky, and nonportable, with low data processing efficiency. The traditional cost management method of PTTP in Ningxia company is inefficient, cumbersome, insecure, error-prone, and rigid. To this end, firstly, the embedded ARM processor with a small volume and excellent data processing ability is applied to the VS to design an embedded smart VS. It can provide more accurate field spatial information for the BIM 3D model. Secondly, the PSO algorithm is used to optimize the key parameters of LSSVR to improve its robustness. Thirdly, the optimization algorithm is combined with BIM to build the cost estimation model for PTTP. The performance of the algorithm and the model is verified using real data. The results corroborate that (I) the designed embedded smart VS error is controlled within 4% and has high measurement accuracy. (II) The error of the proposed PSO-LSSVR algorithm in engineering cost prediction is held within 20%, and the accuracy needs to be improved. Still, it can also quickly understand the interval range of itemized cost. (III) The accuracy of the proposed algorithm is also higher than that of the traditional algorithm, and the optimization effect is remarkable. (IV) The error of the proposed BIM-based PTTP cost estimation model in the project cost prediction is controlled within 10%, with high accuracy, which can be applied to the PTTP management of Ningxia company. Lastly, the shortcomings of this paper are summarized as follows: (1) The function of the embedded smart VS is relatively simple, and the processing capacity needs to be improved. (2) The estimation error of the proposed PSO–LSSVR estimation algorithm in itemized costs and other index is larger than the static investment, and the accuracy and precision of the model need to be further improved. The purpose is to provide important technical support for upgrading traditional VS technology and realizing visual management and rapid cost estimation of PTTP of Ningxia companies.

Data Availability

All relevant data are within the manuscript and its Supporting Information files.

Conflicts of Interest

The author(s) declare(s) that they have no conflicts of interest.