Automatic Estimation of Excavator’s Actual Productivity in Trenching and Grading Operations Using Building Information Modeling (BIM) †

.


Introduction
Heavy-duty mobile machines (HDMMs) play major roles in the world and are used in a variety of industries, including mining, forestry, and construction.The industries are growing rapidly, but they face serious problems such as a lack of skilled workers, harsh working conditions, lack of safety, and low productivity.HDMMs, such as excavators, loaders, and dozers, considerably affect the productivity and efficiency of construction projects.Studies show that the productivity of the construction sector has barely increased by 1% over the past 20 years.Also, these machines are powered by diesel engines, which emit a great amount of CO 2 when burning fossil fuels.In addition, it has been discovered that the cost of the equipment utilized in a construction project may account for 5% to 10% of the direct costs and up to 40% of the direct costs in a highway construction project [1,2].
Therefore, monitoring and improvement of HDMMs' productivity can lead to cost efficiency, reduced CO 2 production, operating time, fuel consumption, maintenance costs, downtime, and labor expenses, and mitigate the impact of labor shortages.Moreover, productivity monitoring can help to optimize planning and working parameters, detect potential project issues, and improve management and economic situations.The worksite managers can modify the number of resources and machines in a site based on productivity to ensure the project stays on schedule and within budget.Additionally, human operators can improve their skills by employing the machine's productivity [3,4].
Traditional manual productivity monitoring heavily relies on manual data collection, which is extremely time-consuming, costly, laborious, and error-prone.A fundamental obstacle to effectively managing ongoing projects as well as accurately costing and budgeting for future projects is the difficulty in estimating the productivity of HDMMs in earth-moving operations.Also, another challenge is that in the grading and trenching tasks, the sheer amount of moved material does not matter, but it is important that the work is carried out accurately within required tolerances [5].Therefore, an automated procedure is required to estimate the productivity of HDMMs in grading and trenching operations, which are dependent on target models [6,7].

Hydraulic Excavator
The hydraulic excavator is one of the most prominent HDMMs in the construction industry.Most construction projects, including the construction of industrial and residential buildings, highways, and airports, require different sorts of excavation operations [8].An excavator is a multi-purpose machine that can be used in many earth-moving operations since it is capable of performing a variety of tasks, such as digging, loading, trenching, cutting, and grading soil [7].Human operators exploit their senses and reasoning-based knowledge to control and monitor operations.Figure 1 depicts a standard hydraulic excavator.The machine's manipulator is built from the boom, arm, and bucket [9].

Grading Operation
In a grading operation, an excavator is used to level and smooth the ground's surface.This is frequently carried out for building or landscaping purposes, to prepare a site for construction, or to make a level surface for paving or other activities.The excavator uses its bucket to move and spread the material to create a level surface.Compared to other tasks, the grading process requires higher positioning accuracy of ±5 or ±10 cm, and in some applications, the accuracy of ±2 cm is needed [5].Figure 2 shows the grading task using an excavator.The type and condition of the material, the size and complexity of the desired surface, the level of accuracy, the size and capabilities of the excavator, the type and size of the bucket, and the operator's skills are all determining factors that can impressively influence the productivity of an excavator in the grading operation.
The productivity must be determined based on the objectives of the duty cycle.Conventionally, the material's quantity and the cycle time are two key factors in the productivity definition of the most cyclical types of machinery.The easiest way to define the excavator's productivity is the amount of material it moves per unit of time, but this definition cannot be employed to determine the productivity of the grading operation.In the grading operation, the quality and time of the operation are given utmost priority by worksite management, and only a small amount of materials are added or removed.Hence, the amount of material cannot accurately reflect the operation's productivity.In this study, the excavator's productivity in the grading task is defined using the area of the graded surface per unit of time: where Q Grading is the excavator's productivity in the grading operation (m 2 /s), A is the area of the graded surface (m 2 ), and T is the time (s).

Trenching Operation
A trenching operation involves using an excavator to dig trenches in the ground for the installation of underground utilities, such as water and sewer pipes.The operator uses the excavator to dig into the ground and create a trench corresponding to the desired size and depth.Several parameters can significantly influence the productivity of an excavator in the trenching operation, such as the size and capabilities of the excavator, the type and condition of the ground, the operator's skill and experience, the depth and width of the trench, and the type and size of the bucket.For the trenching operation, contractors typically estimate the productivity in terms of the linear length of the trench per unit of time [11][12][13].The trenching operation using an excavator is shown in Figure 3.In this paper, the length of the trench per unit of time is utilized as the productivity definition in the trenching operation: where Q Trenching is the excavator's productivity in the trenching operation (m/s), L is the length of the trench (m), and T is the time (s).The productivity depends on the type of material, swing angle, bucket size and type, cross-sectional area of the trench, the skill of the human operator, and weather conditions.This productivity definition assists contractors and managers to track the productivity of the operation; they can also determine how long it will take to complete the trenching work, and how many excavators will be needed to meet the project timeline.In addition, worksite managers can use the estimated productivity for the planning of future projects.

Objectives
In this research, two novel algorithms are presented to estimate the actual productivity of an excavator in the grading and trenching operations based on the target model designed in building information modeling (BIM).The productivity definitions in the grading and trenching operations are the area of graded surface per unit of time and the length of the trench per unit of time, respectively.An LiDAR sensor mounted on top of the excavator is used to model the surrounding areas using an elevation terrain mapping technique.The positions of the revolute joints are estimated to be able to remove the extra points from the point cloud since the motions of the bucket, arm, and boom in front of the excavator add extra points to the point cloud.The positions of the bucket, arm, and boom are estimated using the excavator's forward kinematics and the inertial measurement units (IMUs) installed on different parts of the excavator.Additionally, BIM provides the desired model of the surface and trench.The algorithm compares the obtained actual maps with the desired model to be able to calculate productivity, and the error should be less than the required accuracy.Finally, the presented methods are tested by implementation on a real dataset.The dataset is collected using a medium-rated excavator in a private worksite, and the operations are performed by a competent operator.The results show that the developed methods can efficiently estimate the actual productivity of an excavator and monitor the operation progress.
This paper presents a significant contribution to the field of construction by introducing an automatic method for estimation of the productivity of excavators in grading and trenching operations.The study shows that this method effectively estimates and monitors productivity, helping project managers track progress.It simplifies ongoing project management, aids in cost estimation and budgeting, and overcomes the problems of manual data collection.Moreover, the paper highlights the underexplored potential of utilizing BIM in productivity estimation algorithms for HDMMs, emphasizing the importance of quality and accuracy in grading and trenching operations, rather than merely the quantity of moved material.Overall, this work provides a promising solution to enhance cost efficiency, reduce environmental impact, and improve management practices in earth-moving operations.
The paper is organized as follows: the literature review is presented in Section 2. The proposed algorithms for the actual productivity estimation of excavators in grading and trenching tasks are described in Section 3. The results and data collection procedure are shown in Section 4. Finally, the advantages and disadvantages of the approaches are discussed in Section 5, and Section 6 concludes the article.

Literature Review
Traditionally, a surveyor gathers information to track progress and performs construction site surveys.The need for automated monitoring tools has driven the adoption of 3D sensing technologies for the precise and accurate collection of onsite data.These data can be combined with a BIM-based planned model to assess the project's progress [15].Numerous research studies have been conducted to explore the application of 3D sensing technologies in the construction sector.Initially, researchers focused on developing techniques to replace manual inspections with automated methods, aiming to enhance response times to any project delays [16,17].BIM combines as-planned models into computer-generated programs to create a spatial representation of objects [18,19].
Research moved towards the integration of BIM and sensing technologies for real-time progress monitoring in order to mitigate schedule and cost overruns [20].This integration was driven by the utilization of BIM across various dimensions.For instance, a 4D BIMbased model, also known as a schedule model, was established to sequence activities over time.Another dimension of BIM, known as a 5D BIM-based model, focused on tracking activity costs over time [15].Furthermore, other researchers conducted reviews on machine learning techniques for processing point cloud data in construction and infrastructure applications [21].In [22], an object recognition method was utilized to assess construction progress by matching onsite photographic images with 3D BIM models.This method involves identifying specific objects in the site images and using advanced imaging algorithms to compare them with corresponding 3D objects in the BIM model.In [23], it was emphasized that a major benefit of BIM is its ability to manage and convey information, which enhances our understanding of planned activities.In [24], a modeling and augmented reality were used to compare what is planned with what is actually happening onsite.In [25], the automatic identification of safety issues in models was discussed during the design phase.In [26], excavation changes were computed based on depth differences of the surface using a light detection and ranging (LiDAR) sensor.Occasionally, obstructions like piles that block the sensor's vision can reduce the precision and accuracy of volume estimation.In [27], two approaches for estimating ground volume based on LiDAR observations were performed and compared.An integrated vision and control system that enables a robot to move across challenging terrain with obstacles was proposed in [28].Point-cloud matching and nonparametric terrain modeling approaches were utilized to rebuild the terrain's occluded areas.In [29], a method was suggested that used a stereo camera and an LiDAR sensor to build a 3D visualization of a construction site.A method was described in [30] that used point cloud data gathered by a laser mobile mapping system (LMMS) to automatically assess the excavation volume required for road widening.For managing soil volume progress in a construction site, a network-based cloud system was proposed in [31].The bucket cutting-edge historical data that were gathered from sensors installed on heavy equipment were used to estimate the daily progress volume.Three aspects of excavation progress monitoring were covered in [7]: estimation of the excavation volume, detection of occlusion areas, and 5D mapping.Both bucket volume and ground excavation volume estimation were supported by the volume estimation module.Three mining industry surveying methods, photogrammetry, terrestrial laser scanning (TLS), and aerial laser scanning (ALS), were compared and assessed in [32] based on their time consumption, effectiveness, and safety.In addition, utilizing data from a laser scanner, a coordinate-based volumetric computational technique was designed to estimate the volume of stockpiles.
There is currently limited research that looks at connecting real-time data to models to show what is happening on a construction site.Also, the amount of material is the primary concern in the literature review.Some of the main problems with existing studies include a lack of input from the construction industry regarding their specific needs and use cases, not integrating well with BIM, and not developing effective tools to visualize how construction equipment is performing.Moreover, there is no automatic method for determining productivity during grading or trenching operations based on BIM.Quality and accuracy have the utmost priority in the grading and trenching operations and must be considered.

Methodology
In this section, the proposed technique is completely described.Firstly, the elevation terrain mapping using an LiDAR sensor, GNSS, and IMUs is described to cover the excavator's working area.In the algorithm, a forgetfulness scheme [33] is utilized to handle dynamic conditions.In the next step, the positions of the excavator's revolute joints are estimated to remove the manipulator from the 3D point clouds.Secondly, the BIM and its advantages are introduced.In the final part, the productivity is estimated using the height comparison between the desired mode and the actual map from surrounding areas, which is updated every few seconds.Since the productivity definitions of grading and trenching are different, two different techniques are introduced for productivity calculation.

Elevation Terrain Mapping
In the presented approach, a height map from working areas must be obtained in order to estimate the excavator's actual productivity in grading and trenching operations.Generally, a height map is constructed by combining sensor measurements from LiDAR, stereo cameras, and RADARs with localization information from the Global Navigation Satellite System (GNSS), IMUs, or wheel odometry.A typical data structure for describing a robot's surrounding areas is the elevation map.Every cell in a grid-based height map (2.5D map) depicts the height of the terrain within that cell relative to some known reference level, e.g., elevation above sea level.The precision and accuracy of the localization data and sensor calibrations have a significant impact on the accuracy of the map in the global frame [28].
An LiDAR sensor is a standard piece of mapping technology.Measurements are transformed from the sensor's spherical coordinate system to the global Cartesian coordinate system to generate a 3D point cloud of spatial data.The transformation is prone to error when the actual location and orientation of the LiDAR sensor deviate from the measured values.The final elevation map is generally constructed through a sequence of transformations, such as from the sensor coordinate frame to the machine's body frame and then into the global frame.The accumulation of small transformation errors causes significant inaccuracies in the final map [34].

Transformation
LiDAR measurements are given in the sensor spherical coordinate system.In order to use the data for mapping, the data need to be transformed into point clouds in a global Cartesian coordinate system.This can be achieved by applying a series of coordinate transformations.Three frames, A i ∈ {g, m, s}, are the main frames in coordinate transformations, where g, m, and s show the global, machine, and sensor frames, respectively.Equation (3) formalizes an affine coordinate transformation: where j T i indicates the 4 by 4 transformation matrix from ith frame to jth frame, j R i shows the 3 by 3 rotation matrix from the ith frame to the jth frame, j P i is the 3-element translation vector from the ith frame to the jth frame, R roll j ϕ i shows the rotational matrix around the x-axis, R pitch j θ i is the rotational matrix around the y-axis, R yaw j ψ i is the rotational matrix around the z-axis, j ϕ i , j θ i , and j ψ i indicate roll, pitch, and yaw angles, respectively [34].
Spherical coordinates (r, θ, φ) and Cartesian coordinates (x, y, z) are two ways to represent a single LiDAR measurement.Figure 4 depicts the relationship between spherical and Cartesian coordinates.The point g P in the global frame is obtained using the point s P in the sensor frame and a chain of transformations: where m T s depicts the transformation matrix from the sensor frame to the machine frame and g T m shows the transformation matrix from the machine frame to the global frame.The transformation matrix from the sensor to the machine m T s is obtained using a targetbased calibration technique.In the calibration process, the sensor and machine frames are precisely aligned using several known spherical targets as reference points.Any object with well-defined and known dimensions and a known position in relation to the machine frame can serve as a target.To calculate the transformation matrix, it is necessary to have a set of corresponding points in both the sensor and machine coordinate frames [36].The transformation matrix from the machine frame to the global frame g T m is estimated using IMU and GNSS measurements.In this approach, the machine's acceleration and angular velocity obtained from IMU and position information (latitude, longitude, and altitude) obtained from GNSS are fused using an extended Kalman filter (EKF) to accurately estimate the machine's position.The integration of sensors can provide a highaccuracy and drift-free estimation of the machine's position in the global frame.Firstly, the EKF predicts the machine's current state using a mathematical model that is called the a "priori" estimate.The EKF then generates an a "posteriori" estimate of the state by comparing the a priori estimate with the current sensor measurements.This step, known as the measurement update, includes applying the Kalman gain to weigh the relative contributions of the a priori estimate and the sensor measurements.At regular intervals, the process of predicting and updating the state is performed using the most recent sensor measurements [37].
In a two-dimensional grid called a height map, the mean and variance of height are stored in each cell.To generate the height map, each point in the 3D point cloud is assigned to a cell based on its x and y coordinates.The z coordinate values of all 3D points assigned to a cell are regarded as new measurements of the cell.Using a Bayesian update technique, the previous estimation in a cell is updated using the new measurements.The forgetfulness scheme [33] is utilized in our algorithm so it can handle dynamic conditions.Gaussian distribution N(z t , σ 2 z t ) is utilized to model the height observations z t .Using the observation z t made at time t and the Kalman filter, the height estimate ĥ is updated: σ 2 z t ĥ(t − 1) + σ 2 ĥ(t−1) z t , (7) The main influence is derived from the new measurements.The update is performed in a manner that increases the variance of the current estimate by an amount that is directly proportional to the time between the previous and current measurements.If the variance component of a point exceeds a threshold, it is discarded from processing.As a result, information with a high degree of uncertainty is removed [34].In the next phase, the height map is cropped using a rectangular filter.Based on the excavator's maximum digging reach and its width, the size of the rectangular filter is determined to cover the entire working area.

Kinematics of Excavators
Because the LiDAR sensor is installed on top of the excavator to map the working area, the boom, arm, and bucket add extra points that are not representative of the height of the ground.Another concern is that the boom, arm, and bucket are constantly moving, and their locations are not static.Thus, the extra points should be removed from obtained point clouds.In the proposed approach, the positions of the excavator's revolute joints are first estimated, then points in proximity to the estimated positions are eliminated.
In order to estimate the positions of the revolute joints, the forward kinematic of an excavator is introduced.Kinematic equations accurately describe the motion of the excavator's manipulator without considering the driving forces and torques.An open-loop articulated chain with a boom, arm, and bucket can be used to model the excavator.One end of the chain is attached to a supporting base, and another end is free.A group of rigid bodies, referred to as links, are connected using revolute joints.The forward kinematic is utilized to estimate the bucket position when the joint angles are known, whereas the inverse kinematic is employed to estimate the joint angles when the bucket position is known [38].The kinematics of the excavator are shown in Figure 5.Each link has its own Cartesian coordinate system that moves with the link.Most studies manage the coordinate transformation between two Cartesian coordinate systems using the Denavit-Hartenberg (D-H) convention (Table 1).The D-H convention is used to establish a local coordinate system for each link, with the z-axis pointing in the direction of rotation of the revolute joint and the x-axis pointing at the other joint in the same link.Accordingly, the right-hand rule is utilized to determine the y-axis.Finally, as shown in Figure 5, a fixed Cartesian coordinate system is used as the machine coordinate system [39].
Given the joint angles and lengths of the links, forward kinematic equations are employed to estimate the positions of the manipulator links.The D-H convention can be applied to construct a transformation matrix between two adjacent coordinate systems (from i + 1th to ith) on a link: where θ i+1 is the the rotation angle about the z i -axis, α i+1 is the rotation angle of the z i -axis about the x i+1 -axis, d i+1 is the offset along the z i -axis, and a i+1 is the length of the link.All points in local coordinate systems can be presented in the machine coordinate system using a chain of coordinate transformations: where m P is the Cartesian coordinates in the machine frame, m T n is the transformation matrix from the nth coordinate system to the machine coordinate system, and n P is the Cartesian coordinates in the nth coordinate system.The next step is to model each link as a simple cylinder.A cylinder's axis is a line connecting two adjacent coordinate systems.The radius of all cylinders is considered equal to a constant value.Figure 6 depicts the schematic of the modeled boom, arm, and bucket.The points that overlap the cylinders and point clouds are eliminated, and the remaining points are then utilized in the elevation terrain mapping algorithm.Sometimes, when the bucket is close to the ground surface, some points that belong to the ground are removed.However, there is no challenge because when the bucket moves away from the surface, the area can be seen and added to the height map.

Building Information Modeling (BIM)
Building information modeling (BIM) is a method that creates and maintains digital representations of the physical and functional elements of construction projects over their entire life cycle.The model contains comprehensive details regarding the project's geometry, construction components, systems, and other elements.Despite being in the development phase since the 1970s, BIM did not become widely accepted until the early 2000s.BIM is supported by a wide range of technologies and tools.In the first step of the BIM process, a 3D model of a construction project is generated, and it is frequently updated to reflect changes and modifications during the design and construction phases.BIM can visualize a construction project and simulate how it will perform.A construction project's costs and time requirements can also be estimated using it, as well as any potential issues or conflicts [3,15].
Moreover, Infrastructure BIM, or InfraBIM, refers to the use of BIM principles and practices for the planning, design, construction, and management of infrastructure projects.InfraBIM can be used for a wide range of infrastructure projects, including roads, bridges, tunnels, airports, rail systems, and water and wastewater treatment plants.InfraBIM enables real-time progress monitoring by comparing as-built data to the original design.Also, it helps track the allocation and usage of resources, and ensuring optimal resource utilization.Additionally, it can allow for the integration of multiple disciplines and the coordination of complex systems, enhance stakeholders' collaboration and communication, improve efficiency and overall quality of the project, and facilitate decision making while reducing errors and rework [40,41].
Nowadays, construction projects can be facilitated by the integration of BIM and machine control systems, e.g., Xsite ® PRO 3D.In Figure 7, the Xsite ® PRO 3D system is shown.Using machine control systems, the operator can quickly and accurately complete the task by comparing the bucket tip position with the target model.Target models are designed by construction professionals using 3D design software programs.

Productivity Estimation
In this section, two methods for the excavator's actual productivity estimation in the grading and trenching operations are proposed.In the presented algorithms, a target model is first designed using BIM, and then the operator performs the task based on the model.The Xsite ® PRO 3D system is installed in the cabin that guides the human operator to easily compare the bucket tip position with the designed model.During the operation, the height map from working areas is updated every few seconds using the elevation terrain mapping algorithm.In the proposed approaches, productivity is calculated using the comparison between the desired model and actual maps from surrounding areas.

Grading Operation
In the grading operation, the difference between the initial and target surfaces should be less than the height of the bucket because if it is greater, the digging operation should be carried out first.In the proposed method, the first step is to select a region of interest (commonly abbreviated as ROI) around the ith point of the desired model.The point is located in the center of the ROI, which is regarded as a square.The square is the same size as the grid size of the target model.The next step is to search for the actual points inside the defined ROI.In Figure 8, a simplified schematic of desired and actual points inside an ROI is shown.The desired height Z Desired is equal to the z coordinate value of the ith point in the model.The average height of actual points within the ROI is formalized by Equation ( 11): where Z Actual indicates the average actual height, z j shows the z coordinates of the jth point within the ROI, and N is the total number of points within the ROI.In Figure 9, the flowchart of the presented method is illustrated.In the presented technique, the area of ROI is added to the productivity calculation when the point has not yet been classified as a valid point and the error between the actual and desired height values is smaller than the required accuracy.Further, the actual height of a point that has been already approved as a valid point should be checked because it may change.When the error exceeds the required accuracy, the point is labeled an unaccepted point, and the area of ROI must be deducted from the productivity calculation.This condition may result in negative productivity, meaning that the error exceeds the threshold.

Trenching Operation
As earlier described, the definition of the actual productivity of the trenching operation is the length of the trench per unit of time.In the proposed approach, the ROI is a narrow strip of the trench.A simple schematic of the desired and actual points within an ROI in the trenching operation is illustrated in Figure 10.The desired height Z Desired of a strip is equal to the average of z coordinates of desired points inside the ROI.The desired height is calculated using Equation ( 12): where z i indicates the z coordinates of the ith desired point within the ROI, and N is the total number of the desired points inside the corresponding strip.The average height of actual points inside a strip is computed via Equation (13): where Z Actual is the average actual height, z j shows the z coordinates of the jth actual point inside the ROI, and M is the total number of the actual points within the ROI.The flowchart of the proposed method for the actual productivity estimation of an excavator in the trenching operation is presented in Figure 11.
In the presented algorithm, the length of a strip is added to the productivity estimation if the strip has not been already accepted as a valid strip and the error between the average actual and desired heights is less than the required accuracy.Also, the actual height of strips that have been already accepted as valid strips must be checked since the height may change.If the error increases to higher than the required accuracy, the length of the strip is subtracted from the productivity estimation, and the strip is marked as an unaccepted strip.In this case, the error exceeding the required accuracy can cause negative productivity.

Results
In this section, the performance of the suggested methods is demonstrated by applying to the grading and trenching operations.The algorithm is implemented using MathWorks Matlab ® R2021a on a laptop with a 1.8 GHz Intel Core i7 CPU and 16 GB of RAM.Firstly, sensor configurations and data collection procedure are explained.Then, the actual and aggregate productivity of the excavator in the grading and trenching operations are estimated.

Data Collection Procedure
In the tests, the data were gathered using a Komatsu ® PC138US excavator.The crawler excavator used in the experiments is shown in Figure 12.Although the excavator is old, regular maintenance and inspections have been performed every 500 working hours, so it has been kept in good condition.The bucket is attached to the arm via a quick coupler, and the excavator uses a tiltrotator.According to the Society of Automotive Engineers (SAE) standard, the heaping bucket capacity is 0.37 m 3 .On top of the excavator cabin, a Livox Horizon ® LiDAR is mounted.The LiDAR has a wide field of view (FOV) of 25.1 • vertically and 81.7 • horizontally.The LiDAR must cover the area that the bucket can reach.A private worksite without any active construction project was chosen for data collection.A competent operator performed the experiments, and two types of material were used in the grading and trenching operations: clay and a mix of sand and gravel, respectively.
Robot Operating System (ROS) and the MathWorks Simulink ® model are employed to collect measurements from the excavator.The ROS is a communication interface that provides full compatibility between programs written in different languages and running on different platforms [43].This communication framework allows various components to access various measurements and variables, such as the height map and the positions of the revolute joints.The schematic of different connections between different sensors and processors is demonstrated in Figure 13.In this structure, an NVIDIA ® Jetson AGX Xavier serves as the ROS master, and the Simulink ® generates and links its own ROS node to it.Measurements of IMUs are sent over the controller area network (CAN) bus at a sampling rate of 200 Hz.To connect Simulink ® to the CAN bus, a Kvaser leaf light CAN to USB interface is utilized.An ethernet connection is used to connect the LiDAR, GNSS, NVIDIA ® Jetson AGX Xavier, and Simulink ® to the ROS framework.The configuration of the IMUs, GNSS, Xsite ® PRO 3D, and LiDAR sensor on the excavator is shown in Figure 14.

Grading Operation
Firstly, a surface is designed as a target model in the grading operation by the human operator using the Xsite ® PRO 3D inside the cabin of the excavator.In the next step, the 3D-Win ® software program is utilized to obtain a 3D point cloud.The 3D point cloud of the desired model in the grading operation is shown in Figure 15.The desired model is a roughly 3 m × 4 m rectangular surface.The desired surface is 50 cm deeper than the ground surface, and the slopes of the desired surface and the initial terrain are both equal to zero.In the operation, the required accuracy of the BIM model and the grid size of the point cloud are equal to 10 cm.The update rate of the elevation map from surrounding areas is equal to 5 s.The actual productivity of the excavator in the grading operation is illustrated in Figure 16.In this operation, the mean value of actual productivity (including positive and negative values) is roughly 0.03 m 2 /s.As can be seen, the productivity occasionally falls below zero.In actuality, negative productivity may result when the difference between the desired and actual heights exceeds the required accuracy.For example, it occurs when a large quantity of materials falls from the bucket onto a part that has already been graded or when the bucket goes too deep, and the error exceeds the threshold.The aggregate productivity of the excavator in the grading operation is shown in Figure 17.The whole area of the target model is approximately 12 m 2 .In some parts, the aggregate productivity is decreasing because of the negative productivity in the operation.At the end the operation, the productivity is approximately equal to the whole area of the target model.It means that, almost in the whole area, the error between the target model and the actual map is less than the required accuracy.Figure 18 monitors the progress of the operation at four different times.The sections with an error of more than the required accuracy are shown in red, and the points with an error of less than the required accuracy are presented in green.Using the presented algorithm, managers and contractors can easily monitor the productivity and progress of operations.This productivity information can assist project managers in time-scheduling and cost analysis.It is also feasible to detect issues and potential for productivity and efficiency improvements by comparing the productivity of the machine to industry standards or the productivity of other machines.Moreover, human operators can use the provided information as feedback to improve their skills and execute the operation with high accuracy in a short time.

Trenching Operation
In the second use case, the performance of the presented method is illustrated by implementation on the trenching operation.Firstly, a target model is designed according to the requirements and characteristics of the project using the Xsite ® PRO 3D installed in the cabin.The 3D point cloud of the desired trench is obtained using the 3D-Win ® software program and is shown in Figure 19.The depth and width of the trench are 1 m and 0.825 m, respectively.The whole length of the trench is around 23.8 m.In the grading operation, the required accuracy of the BIM model and grid size of the 3D point cloud is equal to 10 cm.As earlier explained, the definition of the actual productivity in the trenching operation is the length of the trench per unit of time.The actual productivity of the excavator in the trenching operation is presented in Figure 20.The mean value of the excavator actual productivity in the trenching operation is roughly 0.01 m/s.Similar to the grading operation, sometimes the productivity is less than zero.This happens when some materials fall from the bucket or sides of the trench or when the human operator goes too deep.The aggregate productivity of the excavator in the trenching operation is demonstrated in Figure 21.At the end of the operation, the aggregate productivity is not equal to the whole length of the trench since, in some parts of the trench, the error between the model and the actual map is not less than the threshold.The progress of the trenching operation at four different times is monitored in Figure 22.As shown, the quality of the operation at the beginning and end of the trench is not enough since, at the beginning of the trench, the error between the model and the actual map is higher than the threshold, and at the end of the trench, because of safety reasons, the operation was suddenly stopped.The operator was not able to complete the operation.

Discussion
Managing ongoing projects, as well as accurately costing and budgeting future projects, is an important requirement in various worksites.The proposed automatic methods for productivity estimation and progress monitoring are a step toward autonomous excavators since autonomous machines need information on their performance to enhance their work.However, one limitation of the presented algorithms is that they are specifically designed for grading and trenching operations and cannot be used for other tasks.In the future, the methods should be extended to other tasks and machines, such as bulldozers and compactors, based on their requirements.
The presented algorithms estimate the actual productivity of an excavator in the grading and trenching operations.In the future, theoretical productivity or the highest feasible productivity level should be calculated based on the task, aim, and operating conditions, such as type of material, swing angle, cross-sectional area of the trench, size of bucket and machine, etc., to normalize the actual productivity.The production performance ratio or normalized value between zero and one can describe the operational effectiveness of the machine in the task based on the current operating conditions.
Another challenge is that the required accuracy in some tasks and applications is ±2 cm.Achieving high accuracy in elevation terrain mapping algorithms can be challenging because it requires highly accurate and expensive sensors and time-consuming calibration processes.

Conclusions
The trenching and grading operations are two of the most important tasks in various worksites.In these tasks, the primary objective is achieving high-quality results, with a greater emphasis on precision and accuracy rather than the quantity.The proposed methods in the literature review mostly focus on the quantity of materials, not the quality of the operations.The productivity definitions of grading and trenching operations are an area of graded surface per unit of time and the length of trench per unit of time, respectively.In this paper, two novel methods are presented to automatically determine the productivity of an excavator in these operations.The presented algorithms comprise three main steps, including (1) elevation terrain mapping algorithm, (2) BIM, and (3) productivity calculation.Firstly, the elevation profile of working areas is estimated and updated every few seconds using an LiDAR sensor mounted on top of the machine and the elevation terrain mapping algorithm.In the second step, to remove the extra points caused by the movements of the manipulator (bucket, arm, and boom), the positions of revolute joints are calculated.The excavator's forward kinematics and IMUs installed on different moving parts of the machine are employed to estimate the revolute joints.In the next step, the shape of the desired surface or trench is obtained from BIM.The actual productivity is estimated using a map comparison between the target model and elevation maps.The ROI in the trenching productivity calculation is a narrow strip, while in the grading productivity calculation it is a small square.Finally, the presented algorithms are implemented on a dataset collected from a real excavator in the grading and trenching operations.The results demonstrate that the proposed methods can effectively estimate productivity and monitor the progress of the operations.Progress monitoring and productivity estimation can extensively guide contractors and worksite managers to analyze operations and find issues.Also, they can compare the productivity of an individual machine to industrial standards or the productivity of other machines.Moreover, human operators can employ productivity estimation as feedback to improve their skills based on the productivity estimation.

Figure 1 .
Figure 1.A standard hydraulic excavator and its different parts [4].

Figure 6 .
Figure 6.Schematics of the modeled boom, arm, and bucket using cylinders.

Figure 8 .
Figure 8.The desired and actual points within the region of interest (ROI) in the grading operation.

Figure 9 .
Figure 9. Flowchart of the productivity estimation in the grading operation.

Figure 10 .
Figure 10.The desired and actual points within the region of interest (ROI) in the trenching operation.
length & m ar k the str ip as an unaccepted str ip.Yes Add the length & m ar k the str ip as an accepted str ip.No Calculate the aver age desir ed height in the r egion of inter est.

Figure 11 .
Figure 11.Flowchart of the productivity estimation in the trenching operation.

Figure 13 .Figure 14 .
Figure 13.Schematic of various connections in the excavator.

Figure 15 .
Figure 15.The target model designed in BIM in the grading operation.

Figure 16 .
Figure 16.The productivity of the excavator in the grading operation.

Figure 17 .Figure 18 .
Figure 17.The aggregate productivity of the excavator in the grading operation.

Figure 19 .
Figure 19.The target model designed in BIM in the trenching operation.

Figure 20 .
Figure 20.The productivity of the excavator in the trenching operation.

Figure 21 .Figure 22 .
Figure 21.The aggregate productivity of the excavator in the trenching operation.