Soft Sensor Simulation of Minimum Energy Consumption of Joint Manipulator Drive System Based on Improved BP Neural Network

The energy dissipation level of articulated mechanical arms directly affects the control stability of industrial robot systems. For a six-degree-of-freedom articulated robot driven by a DC servo motor and reduction gear, based on the Hamiltonian and Minimum theories, a model of the articulated manipulator drive system under load torque is established, and the expressions of optimal angular velocity and control current are obtained considering the viscous friction and coulomb factors. According to the analysis of actual parameter simulation experiments, it can be seen that the energy consumption of the joint manipulator drive system increases with the decrease of efficiency, the increase of the coulomb friction torque of the servo motor, and the increase of the load torque. Within the transit time, the total energy consumption of the drive system is smaller, so it is very important to obtain the transit time within the optimal area for the minimum energy consumption of the joint robotic arm drive system. At the same time, a soft neural network model based on the improved BP neural network built on the neural network toolbox for the energy consumption of the articulated mechanical arm is established. Finally, the experimental platform of servo motor drive system is built and used for the experiment of servo motor drive, and the purpose of closed-loop control is also achieved. Through experimental analysis, it can be seen that the proposed soft sensor model of joint minimum energy consumption based on improved BP neural network can more accurately realize the energy consumption prediction under unknown angular displacement and unknown load, and provide a theoretical basis for joint energy monitoring.


Introduction
Energy-saving and consumption-reducing and the improvement of effective energy utilization rate are the needs for the healthy development of industrial automation production in the future. At the same time, industrial robots have gradually replaced humans as one of the indispensable equipment in the automated production process, therefore, considering how to minimize the energy consumption of the control system on the premise of meeting the accuracy requirements of industrial robot motion control is a hot issue that many domestic and foreign experts and scholars have been studying. As early as the early 1950s, experts and scholars began to study the optimal control of the system. The main problem of the research is: according to the time domain mathematical model or frequency domain mathematical model of the controlled object system established, On the basis of satisfying that the controlled object system can operate normally as expected, the system control strategy and method are designed so that a certain performance parameter index of the controlled object system during operation can also reach the optimal value. Zhang [1] et al. discussed a control strategy based on the optimal energy consumption of the joint drive system. Considering the PTP motion mode as an example under load torque conditions, a single joint robot arm drive in the presence of nonlinear friction was established. Mathematical model of the minimum energy consumption of the system, through real-parameter simulation comparison experiments, to further clarify the impact of various parameter variables on the energy consumption of the joint drive system, but this method has the disadvantages of large calculation and other defects. Su [2] et al. discussed a method of minimum energy consumption control for a robot drive system. Taking a six-joint robot as the research object, based on the optimal control theory method, and considering the presence of nonlinear friction, a joint robotic arm drive system was established. The mathematical model of the minimum energy consumption, and the function expressions of the optimal control current and the optimal angular velocity are solved separately, and the experimental comparison of actual parameters is carried out to clarify the effect of the conversion time on the calculated optimal control current and the optimal angular velocity. However, this method has defects such as poor accuracy. Liu [3] discussed a robot arm optimization control method, taking the robot arm link model as the research object, using a hybrid algorithm to design and optimize the RBF neural network controller, and obtained through the simulation comparison experiment The controller has the advantages of fast response speed, small torque fluctuation and anti-interference, but this method does not consider nonlinear friction. In view of the problems in the above research, this article takes the articulated handling robot as an example, based on the relevant theory and method of optimal control, the model of the articulated manipulator drive system under load torque conditions is established, and the viscous friction and coulomb are considered The optimal angular velocity and control current expression during friction, and through the actual parameter simulation in the Mathematica environment, to further clarify the effect of each key variable parameter on the minimum energy consumption of the joint drive system. At the same time, a soft neural network model based on the improved BP neural network algorithm and the neural network toolbox for the energy consumption of the articulated mechanical arm is established. Finally, the experimental platform of servo motor drive system was built, and the experiment of servo motor drive was completed, and the purpose of closed-loop control was achieved. Through experimental analysis, we can see that the proposed soft-sensing model of joint minimum energy consumption based on improved BP neural network can accurately predict energy consumption under unknown angular displacement and unknown load.

The Establishment of the Mathematical Model of the Joint Manipulator Drive System
Taking the articulated mechanical arm as the research object, its drive system is mainly composed of a DC servo motor and a gear reducer. The DC servo motor drives the articulated mechanical arm through the gear reducer. Fig. 1 shows the schematic diagram of the articulated mechanical arm drive system.
Eq. 5 is the Hamiltonian function (Hamiltonian) in the acceleration and deceleration phase of the joint manipulator drive system during the acceleration and deceleration phases, where λ -represents a covariate variable function. According to the Eq. 4 and Eq. 5, during the acceleration and deceleration phases, the regular equations of the joint manipulator can be expressed as: In Eq. 6, 1 ( ) 0 in the acceleration and deceleration phase, the optimal control current of the articulated robot arm drive system can be expressed as: Substituting Eq. 7 into Eq. 6 and sorting out: Where, 2 1 (1 )(2 ) / 2 (2 ) / a n K R J vJ From Eq. 8, the covariate function can be expressed as: It can be obtained by substituting Eq. 8 into Eq. 9, the general solution of the function expressions of and acceleration and deceleration can be expressed as: C , 2 C , 3 C and 4 C -represent integral constants.

System Optimal Current and Optimal Angular Velocity Solution
In the actual work process, in order to minimize the energy dissipation of the joint manipulator drive system, it is necessary to restrict it to some motion constraints, even 2 (0) 0 , you can get: Substituting Eq. 11 into Eq. 10 gives: at at Let c t be the ride-through time. When c t t  , during the acceleration and deceleration phase, the acceleration of the DC servo motor becomes 0 and the torque is 0, then the system current can be expressed as: Substituting Eq. 13 into Eq. 3 yields: From Eq. 13 and Eq. 14, we can see: The continuous conditions of angular velocity are: In Eq. 16, 0 Substituting Eq. 16 into Eq. 12, the coefficients 1 C , 2 C , 3 C and 4 C in the angular velocity function can be obtained as:    3 C and 4 C into Eq. 12, the expression of the optimal angular velocity function of the system is: )/[ According to Eq. 9 -Eq. 11, the mathematical expression of the optimal current with respect to time t during the acceleration and deceleration phase is: The above formula is a function expression of the optimal angular velocity and optimal control current of the joint mechanical arm drive system based on the minimum energy consumption in the acceleration and deceleration phase when considering the Coulomb friction and viscous friction of the servo motor and the gear transmission. Substituting Eq. 18 -Eq. 21 into Eq. 2, we can arrange: (2 )

Simulation Analysis
This time, the 36SYK71.24.90.G.T.01 + P36HA DC gear reducer motor produced by Shanghai Aiyi was selected for actual parameter simulation. Its key performance parameters are shown in Table 1.

Simulation experiment of optimal angular velocity and optimal control current.
According to the function expressions of optimal angular velocity, optimal control current and minimum energy consumption of the articulated robotic arm drive system deduced above, actual parameter simulation experiments are conducted in the Mathematica software environment to further clarify the parameters of each key variable The effect of the minimum energy consumption of the drive system, as shown in Fig.  2, is the variation curve of optimal angular velocity and control current under different loads.
(a) When , the optimal angular velocity and control current curve ,the optimal angular velocity and Control current curve  Observation from Fig.2 shows that as the load torque increases, the optimal control cerrent will increase upwards, gradually tending to change linearly, and its corresponding ride-through time becomes smaller.

System energy consumption simulation experiment.
In this paper, the Coulomb friction torque, load torque, reduction gear transmission efficiency and ride-through time of the servo motor are selected as the key variable parameters, and the termination time is set to 1s. The method of controlling variables is used to explore the relationship between each key variable parameter and the ride-through time. The influence of the energy consumption of the joint drive system, as shown in Fig. 3, is the simulation curve of the energy consumption of the joint manipulator drive system when the parameters of different key variables change.   Fig. 3(a) and Fig. 3(b), it can be seen that the energy consumption of the joint manipulator drive system increases with the reduction of the transmission efficiency of the reduction gear and the increase of the Coulomb friction torque of the servo motor. From the observation and analysis of Fig. 3(c) and Fig. 3(d), it can be seen that under the same crossing time, the energy consumption of the joint robotic arm drive system increases with the increase of the load torque. Under the same load torque, when the ride-through time changes from 0.2 to 0.4, within this range, the energy consumption of the joint manipulator drive system decreases as the ride-through time increases; but the ride-through time changes from 0.5 to 0.85 In this range, the energy consumption of the joint manipulator drive system increases with the increase of the transit time. In summary, it shows

Simulation Experiment Analysis of Joint Energy Consumption
Select the following two cases as joint energy consumption sample data, respectively: ① When the joint load torque is constant and the joint angular displacement changes, the joint energy consumption value is consumed. ② When the angular displacement of the joint is constant, the energy consumption value of the joint consumed when the load torque of the joint changes is unknown. Run Mathematica software, export and save the required data as text format, and the exported data can be opened with Excel table. For the first case, 380 groups are selected as sample data, of which 285 groups are the learning and training data samples of the joint manipulator energy model, and 95 groups are the test data samples; for the second case, 520 groups are selected as the sample data, of which 390 groups are the learning and training data samples of the energy consumption model of the joint mechanical arm, and 130 groups are the test data samples. In the MATLAB working path, import the data saved in the Excel table. In order to improve the training and accuracy of the network model, the data needs to be normalized first, and then used as a sample set for training and learning the energy consumption model of the joint robotic arm [12,13]. Among them, the normalized processing function format: . pn meanp stdp tn meant stdt prestd p t  In Eq. 26, p and t -represents the input and expected target output of the network, respectively, pn and tn -represents the normalized network input and expected target output, respectively.  Network training error convergence graph In order to reduce the target error of the network and improve the convergence speed, the training function trainlm is selected in this paper, and the number of hidden layer neurons is 12, the target error of the network is set to 0.000001, and the determined network is trained, as shown in Fig. 4 and Fig. 5 Therefore, the soft measurement model of energy consumption of the articulated mechanical arm can be expressed as:

Verification of Soft Sensor Models
After the soft measurement model of energy consumption of the articulated mechanical arm is established, the selected test data is normalized and Anti-normalized to verify the accuracy of the established soft measurement model. Based on the sample data of joint energy consumption in the two selected cases, a simulation prediction experiment is performed on the joint energy consumption of unknown angular displacement and unknown load, and the corresponding joint energy consumption value is obtained according to the input and output mapping relationship. By comparing the joint energy consumption value actually output by the network with the energy consumption value in the test data, if the error is reduced to meet the requirements, the selected training network is available [13,14]. Fig. 6 and Fig. 7 are the simulation prediction diagrams of the joint energy consumption of unknown angular displacement and unknown load, where the abscissa is the number of measurement data samples and the ordinate is the change value of the joint energy consumption.  Fig. 6, it can be seen that the system energy consumption increases with the increase of angular displacement, and the system energy consumption is the smallest at the optimal crossing time. For the first case, the predicted value of the network model and the target value basically coincide, but As the number of measurement data samples increases, a deviation occurs and the accuracy is poor. In order to improve the prediction accuracy of the network model, for the second case, the original network target error is increased to 0.000001. From the observation and analysis in Fig. 7, it can be seen that the system energy consumption shows an upward trend with increasing load, and with the measurement data sample. As the number increases, the network model has a good prediction effect and high accuracy. Fig. 8 shows the structure principle diagram of the joint servo drive system experimental platform built in this article. The experimental platform of the servo drive control system is mainly composed of four parts: TIA Porta V15 host computer software, based on S7-1200 PLC controller and inverter, controlled DC servo motor and detection part [15]. Among them, TIA Porta V15 upper computer software is mainly used as an input unit for designing HIM touch screen operation panel and communication with the lower computer; S7-1200 PLC controller and inverter constitute the servo drive controller part of the system, mainly used to The communication of the machine and the servo control and frequency conversion speed regulation of the DC servo motor; the tested part is mainly based on incremental encoders and current transformers to achieve the detection of speed and current. Output standard electrical signal waveforms, such as voltage and current signals.   13

Software Experiment Platform Construction
The communication with the lower computer is realized based on the software of the upper computer of Portal, thereby driving the DC servo motor. The specific operation steps mainly include four parts, followed by the addition of modal components, the configuration parameter setting of the servo motor shaft, the variable address assignment table of the PLC module and the design and configuration of the HIM touch screen operation panel [16]. Among them, the addition of modal components and the design and configuration of HIM touch screen operation panel are shown in Fig. 9 and Fig. 10 respectively.

Joint Servo Motor Drive Experiment and Result Analysis
Based on the configuration interface of the TIA Porta V15 upper computer software and the compilation and debugging of the lower computer PLC program, it is downloaded to the S7-1200 PLC controller through Profinet communication, and the programming computer is connected to the communication network port of the S7-1200 PLC controller through a network cable The S7-1200 PLC controller is connected to the V90 6SL3210-5FB10-8UF0 frequency converter through the signal line from the Ethernet communication interface. The S7-1200 PLC controller, inverter and all are powered by a switching power supply. When the system is powered on and the DC servo motor is running, the digital oscilloscope detects the standard electrical signal output by the incremental encoder in the motor, as shown in Fig. 11 for the digital oscilloscope The collected speed waveform of the DC servo motor during operation.  Figure 11. DC servo motor collected by digital oscilloscope By observing and analyzing Fig. 11, we can see that the speed waveform of the DC servo motor changes steadily without large fluctuations, and is basically consistent with the optimal control current simulation change trend solved above, but there are errors. Then, connect a resistance wire in series at the output end of the DC servo motor and pass it th--rough the current transformer. When the power supply is driven to drive the DC servo motor to run, use a passive probe to contact the resistance wire passing through the current transformer. By adjusting the duty cycle of the sine wave pulse signal of the digital oscilloscope, the voltage output waveform can be detected and displayed. Fig. 12 shows the voltage output waveform of the DC servo motor collected by the digital oscilloscope during operation. The output voltage waveform can be seen by observation and analysis There is a periodic change without large fluctuations.

Conclusion
In this paper, based on the relevant theory and method of optimal control, the joint manipulator is taken as the research object, the model of the joint manipulator drive system under the load torque condition is established, and the optimal angular velocity and control current when considering nonlinear friction are derived Expression, at the same time, a new algorithm based on improved BP neural network is proposed, and a neural network toolbox is used to establish a soft-sensing model of the energy consumption of the articulated manipulator. Through modeling, simulation analysis and experimental verification, the nonlinear friction is further clarified The influence mechanism of other factors on joint energy consumption under load torque condition, and the following conclusions are obtained:  15 (1) The total energy consumption of the joint manipulator drive system is not only affected by the load torque, but also the Joule heat loss, viscous friction loss and Coulomb friction loss also affect the total energy consumption of the drive system. Energy consumption prediction provides a theoretical basis for joint energy consumption monitoring. In the actual production process, some measures can be taken to reduce the total energy consumption of the robot control system to optimize its energy consumption. Running speed, etc.
(2) The proposed soft sensing model of joint minimum energy consumption based on improved BP neural network can more accurately realize the unknown angular displacement and more accurately predict the energy consumption under unknown angular displacement and unknown load.
(3) Designed relatively simple upper computer HIM touch screen operation panel and lower computer PLC program, realized configuration interface and lower computer communication, and speed control of DC servo motor. In the next stage, this research will take the articulated heavy-duty handling robot as the research object, collect the sample data of the energy consumption of the articulated robotic arm in the actual site, and use the optimization-based algorithm during the establishment of the soft measurement model of the minimum energy consumption of the joint The neural network obtained the optimal network structure and network weights through simulation calculation.