Position Soft-Sensing of Direct-Driven Hydraulic System Based on Back Propagation Neural Network

: Automated operations are widely used in harsh environments, in which position information is essential. Although sensors can be equipped to obtain high-accuracy position information, they are quite expensive and unsuitable for harsh environment applications. Therefore, a position soft-sensing model based on a back propagation (BP) neural network is proposed for direct-driven hydraulics (DDH) to protect against harsh environmental conditions. The proposed model obtains a position by integrating velocity computed from the BP neural network, which trains the nonlinear relationship between multi-input (speed of the electric motor and pressures in two chambers of the cylinder) and single-output (the cylinder’s velocity). First, the model of a standalone crane with DDH was established and veriﬁed by experiment. Second, the data from batch simulation with the veriﬁed model was used for training and testing the BP neural network in the soft-sensing model. Finally, position estimation with a typical cycle was performed using the created position soft-sensing model. Compared with the experimental data, the maximum soft-sensing position error was about 7 mm, and the error rate was within ± 2.5%. Furthermore, position estimations were carried out with the proposed soft-sensing model under differing working conditions and the errors were within 4 mm, but the periodically cumulative error was observed. Hence, a reference point is proposed to minimize the accumulative error, for example, a point at the middle of the cylinder. Therefore, the work can be applied to acquire position information to facilitate automated operation of machines equipped with DDH.


Introduction
In order to meet the increasing energy efficiency requirements and adapt to dangerous and harsh environments, intelligent and autonomous have become the main development trend of heavy-duty or construction machinery [1]. In hydraulic systems, pump-controlled cylinder systems are increasingly proposed in academia and have attracted industry attention due to high energy efficiency, compactness, and low cost compared with valvecontrolled systems. Therefore, this trend provides the opportunity to implement sensorless position control systems for hydraulic cylinders using virtual sensors. The benefits of using virtual sensors include increased redundancy and reduced reliance on expensive position sensors typically used in hydraulic cylinders [2][3][4].
The rest of this paper is divided into five sections. In Section 2, modeling and verification of a crane with DDH are presented. Section 3 describes the soft-sensing model based on a BP neural network, where Subsection 3.1 depicts the principle of position softsensing, 3.2 obtains the training and test data, and Section 3.3 trains and tests the BP neural network. Section 4 verifies the position soft-sensing model by the measured data. In Section 5, simulations are carried out with the verified model, where Subsections 5.1 and 5.2 present a simulation of two cycles with varying loads and demonstrate the cumulative error under multi-cycles, and 5.3 proposes a method to eliminate the cumulative error. Section 6 draws the conclusions.

Modelling and Verification of a Crane with DDH
Section 2.1 illustrates the modeling of a crane with DDH. Section 2.2 validates the created model by measurement.

Modeling
In this research, a standalone crane was chosen as the test case. The crane was equipped with a direct-driven hydraulic system as shown in Figure 1. Figure 2 shows the schematic diagram of the direct-driven hydraulic system. In the system, two external gear motors driven by a permanent magnet synchronous motor coaxially are used as bi-directional pump/motors. One of the hydraulic accumulators is used as a tank and the other is not in use (cut off by a ball valve). Two pressure sensors and one position sensor were utilized to collect data to validate the simulation in the next step. Additionally, two checkvalves were installed for anti-cavitation and two pressure relief valves for safety. Table 1 shows the parameters of the main components of the DDH.     Figure 3 illustrates the load force of the crane and Table 2 presents the structural parameters.   Table 1 shows the parameters of the main components of the DDH.  Figure 3 illustrates the load force of the crane and Table 2 presents the structural parameters.    Figure 3 illustrates the load force of the crane and Table 2 presents the structural parameters.  [25]. Figure 3. Free body diagram of the crane [25].  Figure 4 demonstrates the simulation model of the crane with DDH. Most of their detailed explanations refer to work in [25,26].
Actuators 2021, 10, x FOR PEER REVIEW 5 of 19 The simulation model of the crane with DDH including the DDH model and load model was built in MATLAB/Simulink. Figure 4 demonstrates the simulation model of the crane with DDH. Most of their detailed explanations refer to work in [25,26].

Model Verification
To verify the feasibility of the built crane model with DDH, a test was performed with a load of 40 kg. In the test, the cylinder extended and retracted two times with a displacement of about 300 mm using open-loop position control. In addition, the measured rotational speed of the electric motor in Figure 5 was used as the reference input to the model in Figure 4. Moreover, the displacement and two pressures of the cylinder from measurement and simulation are presented and compared. Figure 6 shows the simulated and measured displacement curves and Figure 7 shows the error of displacement. Figures  8 and 9 illustrate the pressures of the two sides of the cylinder.
In Figure 7, it can be seen that the maximum position error was 6 mm (about 2%), occurring at the maximum displacement point. Additionally, Figures 8 and 9 illustrate that the simulated and measured pressure levels are acceptable. Hence, the comparison result between the simulation and measurement demonstrates that the accuracy of the

Model Verification
To verify the feasibility of the built crane model with DDH, a test was performed with a load of 40 kg. In the test, the cylinder extended and retracted two times with a displacement of about 300 mm using open-loop position control. In addition, the measured rotational speed of the electric motor in Figure 5 was used as the reference input to the model in Figure 4. Moreover, the displacement and two pressures of the cylinder from measurement and simulation are presented and compared. Figure 6 shows the simulated and measured displacement curves and Figure 7 shows the error of displacement. Figures 8 and 9 illustrate the pressures of the two sides of the cylinder.
In Figure 7, it can be seen that the maximum position error was 6 mm (about 2%), occurring at the maximum displacement point. Additionally, Figures 8 and 9 illustrate that the simulated and measured pressure levels are acceptable. Hence, the comparison result between the simulation and measurement demonstrates that the accuracy of the crane model is acceptable. In this case, the built model can be used to produce batch data under differing working conditions for the training of the BP neural network and test the performance of the proposed soft-sensing model in the next step.

Position Soft-Sensing Model Based on BP Neural Network
Section 3.1 illustrates the principle of the proposed position soft-sensing method. Section 3.2 demonstrates the preparation of the data for training and testing of the BP neural network. Furthermore, Section 3.3 presents the training and testing of the neural network.

Principle of Position Soft-Sensing
The proposed position sensing model computes the velocity using BP neural network and integrates the velocity to obtain the position, as shown in Figure 10. In the DDH, the velocity of the cylinder depends on its in-and out-flow rates. Additionally, these flowrates are determined by the flowrates from or to the pumps, the nonlinear leakages of pumps and cylinder, and volume changes of the oil due to pressure

Position Soft-Sensing Model Based on BP Neural Network
Section 3.1 illustrates the principle of the proposed position soft-sensing method. Section 3.2 demonstrates the preparation of the data for training and testing of the BP neural network. Furthermore, Section 3.3 presents the training and testing of the neural network.

Principle of Position Soft-Sensing
The proposed position sensing model computes the velocity using BP neural network and integrates the velocity to obtain the position, as shown in Figure 10. In the DDH, the velocity of the cylinder depends on its in-and out-flow rates. Additionally, these flowrates are determined by the flowrates from or to the pumps, the nonlinear leakages of pumps and cylinder, and volume changes of the oil due to pressure

Position Soft-Sensing Model Based on BP Neural Network
Section 3.1 illustrates the principle of the proposed position soft-sensing method. Section 3.2 demonstrates the preparation of the data for training and testing of the BP neural network. Furthermore, Section 3.3 presents the training and testing of the neural network.

Principle of Position Soft-Sensing
The proposed position sensing model computes the velocity using BP neural network and integrates the velocity to obtain the position, as shown in Figure 10.

Position Soft-Sensing Model Based on BP Neural Network
Section 3.1 illustrates the principle of the proposed position soft-sensing method. Section 3.2 demonstrates the preparation of the data for training and testing of the BP neural network. Furthermore, Section 3.3 presents the training and testing of the neural network.

Principle of Position Soft-Sensing
The proposed position sensing model computes the velocity using BP neural network and integrates the velocity to obtain the position, as shown in Figure 10. In the DDH, the velocity of the cylinder depends on its in-and out-flow rates. Additionally, these flowrates are determined by the flowrates from or to the pumps, the nonlinear leakages of pumps and cylinder, and volume changes of the oil due to pressure In the DDH, the velocity of the cylinder depends on its in-and out-flow rates. Additionally, these flowrates are determined by the flowrates from or to the pumps, the nonlinear leakages of pumps and cylinder, and volume changes of the oil due to pressure change, temperature, and rotational speed [27]. In this research, the temperature of the system was assumed to be constant, namely, the viscosity of the fluid was unvaried and did not affect the leakage of the system. Hence, the velocity of the cylinder had a nonlinear relationship with the pressures of the cylinder and the speed of the electric motor. The neural network simulates the processing of information by the human brain and has a strong self-learning ability. In various industrial application scenarios, for nonlinear problems, the neural network is an effective solution to such problems [28]. The development of a neural network provides new ideas and methods for hydraulic cylinder displacement estimation [29]. Therefore, a position soft-sensing model using the BP neural network was proposed for DDH and its principle diagram is shown in Figure 11. change, temperature, and rotational speed [27]. In this research, the temperature of the system was assumed to be constant, namely, the viscosity of the fluid was unvaried and did not affect the leakage of the system. Hence, the velocity of the cylinder had a nonlinear relationship with the pressures of the cylinder and the speed of the electric motor. The neural network simulates the processing of information by the human brain and has a strong self-learning ability. In various industrial application scenarios, for nonlinear problems, the neural network is an effective solution to such problems [28]. The development of a neural network provides new ideas and methods for hydraulic cylinder displacement estimation [29]. Therefore, a position soft-sensing model using the BP neural network was proposed for DDH and its principle diagram is shown in Figure 11. The structure of the BP neural network for velocity estimation is shown in Figure 12. This research adopted a 3-layer BP neural network including three input nodes, 10 hidden layer nodes, and one output node. The training function is traingdx, the hidden layer neuron transfer function is tansig, and the output layer neuron transfer function is logsig.

Training and Testing Data Preparation
In order to produce enough data for BP neural network training and testing, a batch simulation was performed using the created crane model. Figure 13 displays the reference speed for the electric motor, a sinusoidal signal f1(t) = 550 sin(2πt/15)t. Meanwhile, according to the capability of the crane, 11 loads were used for the batch simulation (from 0 to 250 kg with an interval of 25 kg). In this way, the simulation can generate data covering a wide range of velocities under varying loads and rotational speeds. The structure of the BP neural network for velocity estimation is shown in Figure 12. This research adopted a 3-layer BP neural network including three input nodes, 10 hidden layer nodes, and one output node. The training function is traingdx, the hidden layer neuron transfer function is tansig, and the output layer neuron transfer function is logsig. change, temperature, and rotational speed [27]. In this research, the temperature of the system was assumed to be constant, namely, the viscosity of the fluid was unvaried and did not affect the leakage of the system. Hence, the velocity of the cylinder had a nonlinear relationship with the pressures of the cylinder and the speed of the electric motor. The neural network simulates the processing of information by the human brain and has a strong self-learning ability. In various industrial application scenarios, for nonlinear problems, the neural network is an effective solution to such problems [28]. The development of a neural network provides new ideas and methods for hydraulic cylinder displacement estimation [29]. Therefore, a position soft-sensing model using the BP neural network was proposed for DDH and its principle diagram is shown in Figure 11. The structure of the BP neural network for velocity estimation is shown in Figure 12. This research adopted a 3-layer BP neural network including three input nodes, 10 hidden layer nodes, and one output node. The training function is traingdx, the hidden layer neuron transfer function is tansig, and the output layer neuron transfer function is logsig.

Training and Testing Data Preparation
In order to produce enough data for BP neural network training and testing, a batch simulation was performed using the created crane model. Figure 13 displays the reference speed for the electric motor, a sinusoidal signal f1(t) = 550 sin(2πt/15)t. Meanwhile, according to the capability of the crane, 11 loads were used for the batch simulation (from 0 to 250 kg with an interval of 25 kg). In this way, the simulation can generate data covering a wide range of velocities under varying loads and rotational speeds.

Training and Testing Data Preparation
In order to produce enough data for BP neural network training and testing, a batch simulation was performed using the created crane model. Figure 13 displays the reference speed for the electric motor, a sinusoidal signal f 1 (t) = 550 sin(2πt/15)t. Meanwhile, according to the capability of the crane, 11 loads were used for the batch simulation (from 0 to 250 kg with an interval of 25 kg). In this way, the simulation can generate data covering a wide range of velocities under varying loads and rotational speeds.  Furthermore, the data required for the neural network training and testing were obtained by batch simulation. Pressures of the cylinder chambers p A and p B are shown in Figures 14 and 15, and the corresponding velocities in Figure 16.   The effect of load on the pressures of the two chambers can be observed in Figures  14 and 15, where the pressures increased with the heavier loads. The three local magnifications in Figure 16 show that the heavier load, the greater the speed fluctuation. Finally, 33,000 groups of data were obtained from the simulation for the training and testing of the BP neural network.

Training and Testing the BP Neural Network
The 33,000 groups of data were randomly classified into a training set (25,000 groups) and a testing set (8000 groups). A five-point numerical differentiation and normalization of the sample data were performed, and then the offline training of the BP neural network was conducted. Since the velocity was in the order of 1 mm/s, to ensure accuracy, the training accuracy was set to 10 −3 mm/s and the number of training was 10,000 times. The predicted and expected values of each point of the BP neural network and errors are shown in Figure 17.
To evaluate the training results of the BP neural network, the coefficient of determination (R 2 ), mean square error (MSE), and root mean square error (RMSE) were used as the evaluation indexes. R 2 represents the goodness-of-fit of the regression fitting curve, and the value was between 0 and 1 (the closer to 1 the greater goodness-of-fit). MSE represents the Euclidean distance between the predicted value and the true value. Smaller MSE means that the predicted value is closer to the true value. RMSE represents the stability of the prediction error and can be used to investigate whether the prediction model can make stable and accurate predictions, where the smaller the better. R 2 , MSE, and RMSE are defined as follows: where i Y is the expected value; i y is the predicted value; and Y is the average of the expected value. z is the number of test data groups. The effect of load on the pressures of the two chambers can be observed in Figures 14 and 15, where the pressures increased with the heavier loads. The three local magnifications in Figure 16 show that the heavier load, the greater the speed fluctuation. Finally, 33,000 groups of data were obtained from the simulation for the training and testing of the BP neural network.

Training and Testing the BP Neural Network
The 33,000 groups of data were randomly classified into a training set (25,000 groups) and a testing set (8000 groups). A five-point numerical differentiation and normalization of the sample data were performed, and then the offline training of the BP neural network was conducted. Since the velocity was in the order of 1 mm/s, to ensure accuracy, the training accuracy was set to 10 −3 mm/s and the number of training was 10,000 times. The predicted and expected values of each point of the BP neural network and errors are shown in Figure 17.
To evaluate the training results of the BP neural network, the coefficient of determination (R 2 ), mean square error (MSE), and root mean square error (RMSE) were used as the evaluation indexes. R 2 represents the goodness-of-fit of the regression fitting curve, and the value was between 0 and 1 (the closer to 1 the greater goodness-of-fit). MSE represents the Euclidean distance between the predicted value and the true value. Smaller MSE means that the predicted value is closer to the true value. RMSE represents the stability of the prediction error and can be used to investigate whether the prediction model can make stable and accurate predictions, where the smaller the better. R 2 , MSE, and RMSE are defined as follows: where Y i is the expected value; y i is the predicted value; and Y is the average of the expected value. z is the number of test data groups. The training results in Figure 17 illustrate that small errors occurred about every 1500 groups. The pressure fluctuated when the hydraulic cylinder was around the zero position. The motor speed signal was set according to the expected displacement, which is a sinusoidal signal. Hence, the velocity of the cylinder computed by the neural network is similar to a harmonic signal, the derivative of the expected displacement. Three sets of velocity were computed respectively including groups 0-2000 with a load of 200 kg during 10-30 s, 2001-5000 with a load of 225 kg during 0-30 s, and 5001-8000 with a load of 250 kg during 0-30 s. Finally, the data of the three sets were put together to form a curve, similar to a sinusoidal, as shown in Figure 17. This phenomenon affects the training, but, from an overall point of view, the index (R 2 = 0.99986, MSE = 6.3886 * 10 −5 , and RMSE = 0.0080, calculated in mm) demonstrates that the performance of the trained BP neural network was good.
The mean square errors of the training set, validation set, test set, and the overall set varied with the number of training images, as shown in Figure 18. Each stage of BP neural network training is demonstrated in Figure 19. The correlation analyses of each sample set and the whole are presented in Figure 20.  The training results in Figure 17 illustrate that small errors occurred about every 1500 groups. The pressure fluctuated when the hydraulic cylinder was around the zero position. The motor speed signal was set according to the expected displacement, which is a sinusoidal signal. Hence, the velocity of the cylinder computed by the neural network is similar to a harmonic signal, the derivative of the expected displacement. Three sets of velocity were computed respectively including groups 0-2000 with a load of 200 kg during 10-30 s, 2001-5000 with a load of 225 kg during 0-30 s, and 5001-8000 with a load of 250 kg during 0-30 s. Finally, the data of the three sets were put together to form a curve, similar to a sinusoidal, as shown in Figure 17. This phenomenon affects the training, but, from an overall point of view, the index (R 2 = 0.99986, MSE = 6.3886 × 10 −5 , and RMSE = 0.0080, calculated in mm) demonstrates that the performance of the trained BP neural network was good.
The mean square errors of the training set, validation set, test set, and the overall set varied with the number of training images, as shown in Figure 18. Each stage of BP neural network training is demonstrated in Figure 19. The correlation analyses of each sample set and the whole are presented in Figure 20. The training results in Figure 17 illustrate that small errors occurred about every 1500 groups. The pressure fluctuated when the hydraulic cylinder was around the zero position. The motor speed signal was set according to the expected displacement, which is a sinusoidal signal. Hence, the velocity of the cylinder computed by the neural network is similar to a harmonic signal, the derivative of the expected displacement. Three sets of velocity were computed respectively including groups 0-2000 with a load of 200 kg during 10-30 s, 2001-5000 with a load of 225 kg during 0-30 s, and 5001-8000 with a load of 250 kg during 0-30 s. Finally, the data of the three sets were put together to form a curve, similar to a sinusoidal, as shown in Figure 17. This phenomenon affects the training, but, from an overall point of view, the index (R 2 = 0.99986, MSE = 6.3886 * 10 −5 , and RMSE = 0.0080, calculated in mm) demonstrates that the performance of the trained BP neural network was good.
The mean square errors of the training set, validation set, test set, and the overall set varied with the number of training images, as shown in Figure 18. Each stage of BP neural network training is demonstrated in Figure 19. The correlation analyses of each sample set and the whole are presented in Figure 20.   It can be seen from Figures 18-20 that the target value of MSE was quite different from the best value, but it can be seen from other parameters that the neural network was well trained. Additionally, the weights of the trained BP neural network are listed as follows: 1       It can be seen from Figures 18-20 that the target value of MSE was quite different from the best value, but it can be seen from other parameters that the neural network was well trained. Additionally, the weights of the trained BP neural network are listed as follows: 1     It can be seen from Figures 18-20 that the target value of MSE was quite different from the best value, but it can be seen from other parameters that the neural network was well trained. Additionally, the weights of the trained BP neural network are listed as follows:

Verification of Position Soft-Sensing Model
To verify the position soft-sensing model, the measured data from the previous experiment were utilized as inputs to the model including the measured pressures of the cylinder chambers, the rotational speed of the electric motor, and the initial position of the cylinder. Figures 21 and 22 illustrate the positions from the soft-sensing model and measurement and the errors after comparison.

Verification of Position Soft-Sensing Model
To verify the position soft-sensing model, the measured data from the previous experiment were utilized as inputs to the model including the measured pressures of the cylinder chambers, the rotational speed of the electric motor, and the initial position of the cylinder. Figures 21 and 22 illustrate the positions from the soft-sensing model and measurement and the errors after comparison.  The training data for the BP neural network from thee simulation but not the measurement affects the accuracy of the proposed position soft-sensing model. It can be seen from Figure 22 that soft-sensing errors were within ±2.5% and the maximum error was 7 mm, occurring at 45 s. The comparison results show that the proposed soft-sensing model is feasible and has acceptable accuracy for further simulations.

Simulation and Accumulative Error Correction
To further verify the feasibility and accuracy of the proposed model, simulations and comparisons were performed. Considering the influence of different loads and motor speeds on the soft-sensing, three loads (50 kg, 120 kg, and 200 kg) and two types of reference speed (sinusoidal and typical working cycle) were utilized for the simulations.

Verification of Position Soft-Sensing Model
To verify the position soft-sensing model, the measured data from the previous experiment were utilized as inputs to the model including the measured pressures of the cylinder chambers, the rotational speed of the electric motor, and the initial position of the cylinder. Figures 21 and 22 illustrate the positions from the soft-sensing model and measurement and the errors after comparison.  The training data for the BP neural network from thee simulation but not the measurement affects the accuracy of the proposed position soft-sensing model. It can be seen from Figure 22 that soft-sensing errors were within ±2.5% and the maximum error was 7 mm, occurring at 45 s. The comparison results show that the proposed soft-sensing model is feasible and has acceptable accuracy for further simulations.

Simulation and Accumulative Error Correction
To further verify the feasibility and accuracy of the proposed model, simulations and comparisons were performed. Considering the influence of different loads and motor speeds on the soft-sensing, three loads (50 kg, 120 kg, and 200 kg) and two types of reference speed (sinusoidal and typical working cycle) were utilized for the simulations.  The training data for the BP neural network from thee simulation but not the measurement affects the accuracy of the proposed position soft-sensing model. It can be seen from Figure 22 that soft-sensing errors were within ±2.5% and the maximum error was 7 mm, occurring at 45 s. The comparison results show that the proposed soft-sensing model is feasible and has acceptable accuracy for further simulations.

Simulation and Accumulative Error Correction
To further verify the feasibility and accuracy of the proposed model, simulations and comparisons were performed. Considering the influence of different loads and motor speeds on the soft-sensing, three loads (50 kg, 120 kg, and 200 kg) and two types of reference speed (sinusoidal and typical working cycle) were utilized for the simulations. Figure 23 displays the sinusoidal cycle f 2 (t) = 410 sin(2πt/30)t under three loads (50 kg, 120 kg, and 200 kg). The given motor speed signal and load were input into the simulation model of the crane. At the same time, the pressure of two chambers and motor speed were extracted and then used as input to the position soft-sensing model. Figure 24 shows the soft-sensing positions and simulated positions. Furthermore, Figure 25 shows that the soft-sensing error was within ±3 mm. shows the soft-sensing positions and simulated positions. Furthermore, Figure 25 shows that the soft-sensing error was within ±3 mm. Additionally, the error curves shifted downward with the increase in load, caused by the greater leakage under heavier load. It can be seen that the error trend in the first cycle (0~30 s) was basically the same as the second one (30~60 s), but accumulated errors can be observed at 30 s and at 60 s (the end of each cycle). shows the soft-sensing positions and simulated positions. Furthermore, Figure 25 shows that the soft-sensing error was within ±3 mm. Additionally, the error curves shifted downward with the increase in load, caused by the greater leakage under heavier load. It can be seen that the error trend in the first cycle (0~30 s) was basically the same as the second one (30~60 s), but accumulated errors can be observed at 30 s and at 60 s (the end of each cycle). shows the soft-sensing positions and simulated positions. Furthermore, Figure 25 shows that the soft-sensing error was within ±3 mm. Additionally, the error curves shifted downward with the increase in load, caused by the greater leakage under heavier load. It can be seen that the error trend in the first cycle (0~30 s) was basically the same as the second one (30~60 s), but accumulated errors can be observed at 30 s and at 60 s (the end of each cycle). Additionally, the error curves shifted downward with the increase in load, caused by the greater leakage under heavier load. It can be seen that the error trend in the first cycle (0~30 s) was basically the same as the second one (30~60 s), but accumulated errors can be observed at 30 s and at 60 s (the end of each cycle).  Figure 26 displays the typical motor speed signal (similar to the reference speed in the experiment) under three loads (50 kg, 120 kg, and 200 kg) [30]. After simulation and position soft-sensing, Figures 27 and 28 present the positions of soft-sensing and simulation and error. The comparison results demonstrate that the errors were within ±3 mm. In Figure 28, the phenomenon of error accumulation was also observed at the end of each cycle. This is because the soft-sensing method first predicts the velocity and then  Figure 26 displays the typical motor speed signal (similar to the reference speed in the experiment) under three loads (50 kg, 120 kg, and 200 kg) [30]. After simulation and position soft-sensing, Figures 27 and 28 present the positions of soft-sensing and simulation and error. The comparison results demonstrate that the errors were within ±3 mm. In Figure 28, the phenomenon of error accumulation was also observed at the end of each cycle. This is because the soft-sensing method first predicts the velocity and then  Figure 26 displays the typical motor speed signal (similar to the reference speed in the experiment) under three loads (50 kg, 120 kg, and 200 kg) [30]. After simulation and position soft-sensing, Figures 27 and 28 present the positions of soft-sensing and simulation and error. The comparison results demonstrate that the errors were within ±3 mm. In Figure 28, the phenomenon of error accumulation was also observed at the end of each cycle. This is because the soft-sensing method first predicts the velocity and then In Figure 28, the phenomenon of error accumulation was also observed at the end of each cycle. This is because the soft-sensing method first predicts the velocity and then integrates it. In the prediction process, there is a velocity prediction error first, and then there is a cumulative error in the integration process. Such a double-layer error will result in a cumulative error, as shown in Figures 25 and 28. Hence, it is necessary to eliminate or minimize the accumulative error.

Accumulative Error Correction
Since the accumulative error will inevitably occur in the integration process, this research proposes setting reference points using proximity sensors, for example, at the middle of the cylinder [16]. Hence, when the displacement of the hydraulic rod reaches the midpoint, the accumulative error will be reset to zero.
The hydraulic cylinder stroke is 400 mm, so the reference point was set at 200 mm, which means that the hydraulic cylinder rod position will be reset when it reaches 200 mm. Using the proposed accumulative error correction, the soft-sensing errors of the sinusoidal and the typical cycle in Section 4 decreased significantly, as shown in Figures 29 and 30. integrates it. In the prediction process, there is a velocity prediction error first, and then there is a cumulative error in the integration process. Such a double-layer error will result in a cumulative error, as shown in Figures 25 and 28. Hence, it is necessary to eliminate or minimize the accumulative error.

Accumulative Error Correction
Since the accumulative error will inevitably occur in the integration process, this research proposes setting reference points using proximity sensors, for example, at the middle of the cylinder [16]. Hence, when the displacement of the hydraulic rod reaches the midpoint, the accumulative error will be reset to zero.
The hydraulic cylinder stroke is 400 mm, so the reference point was set at 200 mm, which means that the hydraulic cylinder rod position will be reset when it reaches 200 mm. Using the proposed accumulative error correction, the soft-sensing errors of the sinusoidal and the typical cycle in Section 4.2 decreased significantly, as shown in Figures  29 and 30. It can be seen from Figure 29 that after the minimization of cumulative error, a whole cycle was observed from 9.12 to 39.12 s, and the trend of the previous cycle is repeated in 39.12-60 s. The error is approximately periodic and within 3 mm. Similarly, it can be seen from Figure 30 that the period from 8.51 to 38.51 s was a whole cycle, and the trend of the previous cycle was repeated in the period from 38.51 to 60 s. In addition, the error was within 4 mm. This method showed an error far less than the error of the soft measurement method in reference [4].
To further verify the performance of using a middle reference point, simulation and position soft-sensing were carried out under a multi-cycle sinusoidal signal with a load of 40 kg, as shown in Figure 31. The soft-sensing position with and without correction are shown in Figure 32. Figure 33 presents the errors. integrates it. In the prediction process, there is a velocity prediction error first, and then there is a cumulative error in the integration process. Such a double-layer error will result in a cumulative error, as shown in Figures 25 and 28. Hence, it is necessary to eliminate or minimize the accumulative error.

Accumulative Error Correction
Since the accumulative error will inevitably occur in the integration process, this research proposes setting reference points using proximity sensors, for example, at the middle of the cylinder [16]. Hence, when the displacement of the hydraulic rod reaches the midpoint, the accumulative error will be reset to zero.
The hydraulic cylinder stroke is 400 mm, so the reference point was set at 200 mm, which means that the hydraulic cylinder rod position will be reset when it reaches 200 mm. Using the proposed accumulative error correction, the soft-sensing errors of the sinusoidal and the typical cycle in Section 4.2 decreased significantly, as shown in Figures  29 and 30. It can be seen from Figure 29 that after the minimization of cumulative error, a whole cycle was observed from 9.12 to 39.12 s, and the trend of the previous cycle is repeated in 39.12-60 s. The error is approximately periodic and within 3 mm. Similarly, it can be seen from Figure 30 that the period from 8.51 to 38.51 s was a whole cycle, and the trend of the previous cycle was repeated in the period from 38.51 to 60 s. In addition, the error was within 4 mm. This method showed an error far less than the error of the soft measurement method in reference [4].
To further verify the performance of using a middle reference point, simulation and position soft-sensing were carried out under a multi-cycle sinusoidal signal with a load of 40 kg, as shown in Figure 31. The soft-sensing position with and without correction are shown in Figure 32. Figure 33 presents the errors. It can be seen from Figure 29 that after the minimization of cumulative error, a whole cycle was observed from 9.12 to 39.12 s, and the trend of the previous cycle is repeated in 39.12-60 s. The error is approximately periodic and within 3 mm. Similarly, it can be seen from Figure 30 that the period from 8.51 to 38.51 s was a whole cycle, and the trend of the previous cycle was repeated in the period from 38.51 to 60 s. In addition, the error was within 4 mm. This method showed an error far less than the error of the soft measurement method in reference [4].
To further verify the performance of using a middle reference point, simulation and position soft-sensing were carried out under a multi-cycle sinusoidal signal with a load of 40 kg, as shown in Figure 31. The soft-sensing position with and without correction are shown in Figure 32. Figure 33 presents the errors. It can be seen from Figure 33 that after correcting the accumulated error, the error curve becomes periodic and the error remains stable with high accuracy. This is because a proximity switch is set at the midpoint of the stroke. Therefore, the integration process will restart whenever the midpoint is reached, which limits the infinite amplification of the accumulated error and the max error rate drops to 1%.

Conclusions
Aiming at addressing the disadvantages of the physical position sensor of utilization in automation, a position soft-sensing model based on BP neural network was proposed to estimate the cylinder position. DDH was selected as a test case. The simulation model of a crane with DDH was established and validated by experiment. The BP neural network It can be seen from Figure 33 that after correcting the accumulated error, the error curve becomes periodic and the error remains stable with high accuracy. This is because a proximity switch is set at the midpoint of the stroke. Therefore, the integration process will restart whenever the midpoint is reached, which limits the infinite amplification of the accumulated error and the max error rate drops to 1%.

Conclusions
Aiming at addressing the disadvantages of the physical position sensor of utilization in automation, a position soft-sensing model based on BP neural network was proposed to estimate the cylinder position. DDH was selected as a test case. The simulation model of a crane with DDH was established and validated by experiment. The BP neural network It can be seen from Figure 33 that after correcting the accumulated error, the error curve becomes periodic and the error remains stable with high accuracy. This is because a proximity switch is set at the midpoint of the stroke. Therefore, the integration process will restart whenever the midpoint is reached, which limits the infinite amplification of the accumulated error and the max error rate drops to 1%.

Conclusions
Aiming at addressing the disadvantages of the physical position sensor of utilization in automation, a position soft-sensing model based on BP neural network was proposed to estimate the cylinder position. DDH was selected as a test case. The simulation model of a crane with DDH was established and validated by experiment. The BP neural network It can be seen from Figure 33 that after correcting the accumulated error, the error curve becomes periodic and the error remains stable with high accuracy. This is because a proximity switch is set at the midpoint of the stroke. Therefore, the integration process will restart whenever the midpoint is reached, which limits the infinite amplification of the accumulated error and the max error rate drops to 1%.

Conclusions
Aiming at addressing the disadvantages of the physical position sensor of utilization in automation, a position soft-sensing model based on BP neural network was proposed to estimate the cylinder position. DDH was selected as a test case. The simulation model of a crane with DDH was established and validated by experiment. The BP neural network was created and trained with the data from batch simulation using the validated crane model. Furthermore, the viability of the proposed soft-sensing model was verified by experiments and simulations under varying reference signals and loads. As the accumulative error occurs, a reference point was proposed to minimize the accumulative error under multicycle operation.

1.
The verification and simulations results show that the proposed position soft-sensing model for DDH had an accuracy within 7 mm and 4 mm, respectively, and the error rate was within 2.5%.

2.
Due to the notable accumulative error under multi-cycle, setting reference points can minimize the error accumulation. For example, when applying a middle reference point, the max error rate drops to 1%.
Further steps will entail an experimental validation of the proposed method for position control. In order to improve the accuracy of the proposed virtual sensor, more information from sensors can be utilized such as fluid temperature and additional pressure.