1 Introduction

The world has witnessed the continuous development of manufacturing in past decades. As the backbone of the modern industrialized society, manufacturing always plays an important role in promoting the growth of national economy [1, 2]. Industrial robots (IRs), which enable the end products produced more efficiently and intelligently, are widely utilized in various manufacturing process since they provide high precision, repeatability, programmability and high automated capability. However, the massive application of IRs is often accompanied with high level of energy consumption, a recent research showed that the energy consumption of IRs is approximately 8% total electrical energy consumed in manufacturing process [3]. At this point, it is in urgent need of energy consumption optimization and energy efficient improvement of IRs.

With the need of energy minimization of IRs, the accurate monitoring, evaluating and prediction for energy consumption of IRs should be taken into account firstly, and energy modelling of IRs is an effective way to meet these demands. However, there exist many challenges on the modelling of robot energy consumption, the application of which is also limited. New methods for energy consumption modeling of IRs are required to be developed.

Digital twin, a novel concept that refers to virtual substitutes of real world objects [4], has aroused broad concern along with the amazing growth and advancements in computer science and information technologies. The idea of digital twin is to create a digital counterpart to mimic the characteristics and behaviors of its corresponding twin. As an important aspect driving the future of manufacturing, digital twin has many remarkable advantages and provides a new way for robot energy modeling, which can assist in visualization, simulation and prediction for energy consumption of IRs as well as decision support for enterprises.

The remainder of the paper is structured as follows. The next section gives a review of related works. Section 3 describes the system framework of the proposed method. The details for energy modelling of IRs based on digital twin is explained in Sect. 4. In Sect. 5, a case study is presented to validate the proposed method. Finally, the conclusion and the future work is discussed in Sect. 6.

2 Related Works

The robotic energy consumption reduction has become a major objective for many researchers and groups, there have been plenty of studies that focus on it. For instance, the work described in [5] aims at improving energy efficiency of pneumatic drive by hardware modification. The research introduced in [6] emphasizes the energy consumption optimization for multi-robot system rather than an individual robot. In another respect, many researchers are interested in minimizing energy consumption of IRs by means of robotic energy-efficient trajectory planning [7,8,9]. Others such as [10] focus on optimizing operating parameters for energy saving of IRs, in which experimental investigations are conducted by using a specific IR.

As for the modeling and evaluation of robot energy consumption, there are little literature concerned with it. Some researches such as [11, 12] focus on processing and analyzing the real data from direct measurement of robot energy consumption, which combines the direct energy measurement and computer evaluation. In [13], a mathematical approach which follows from a specific expression of an energy consumption equation is represented. Because of the advanced computer and information technologies, the application of simulation tools for energy modeling of IRs is also studied. In [14], the power consumption is calculated and dynamic behavior is analyzed for a six axis IR in assembly system by the combination of simulation and experiment. Literature [15] proposes a computer-aided modelling approach to model the energy consumption of industrial articulated robots. In [16], an energy modeling method based on the simulated power data and parameter identification is proposed to calculate the energy consumption of IRs whose torques are difficult to be directly measured.

Digital twin has received much attention in academic circles at present. The concept of digital twin emerged from the course on Product Lifecycle Management (PLM) in 2002 [17]. As an effective way to link the cyber space with the physical space, digital twin has gained further research and applications in some fields. The U.S. Air Force Research Laboratory utilized Digital Twin for the maintenance and lifetime prediction of aerocraft [18]. Dassault built an 3D platform based on Digital Twin to optimize the product entities in physical world [19]. In [20], the digital twin workshop is proposed which consist of physical workshop, cyber workshop, workshop service system and digital twin data. A digital twin-driven method is presented in [21] to support and improve the efficiency and intelligence in product design, manufacturing and service phases. In [22], it studies the modeling method for digital twin workshop on the base of physical perception data to drive the workshop more intelligent.

In this paper, a novel method which combines the energy modeling of IRs with digital twin is proposed and the system framework is developed, which may aid to robot energy consumption simulation and prediction.

3 System Framework

Digital twin is an effective way to realize the communication and interaction between physical and cyber world. Applying the digital twin to robotic energy modeling will enable the simulation and data visualization for energy consumption of IRs as well as facilitate the comprehensiveness and accuracy of energy consumption prediction. Based on digital twin, a novel system framework for energy modeling of IRs is built, as shown in Fig. 1.

Fig. 1.
figure 1

System framework.

There are mainly four parts contained in the system framework, including the physics-based energy model of the physical IRs, the virtual robot model, the ontology-based unified digitized description model and the digital twin data. In the physical space, the physical energy model is responsible for energy consumption calculation of IRs. For the establishment of physical energy model, the dynamic parameters identification is important and the data like angle, velocity, acceleration, torque etc. are all necessary. Hence the multi-source data are collected and stored firstly by using data perception devices like robot controller, smart meter and torque sensor, etc. After data pre-processing, the parameter identification is conducted with the help of Denavit-Hartenberg (D-H) notation, robotic kinematics and dynamics, thereby the physical energy model can be obtained by parameter identification based on the perception data. In the cyber space, the 3D virtual robot should be built to carry out the visualization, simulation and prediction of robot energy consumption. Besides, an unified digitized description model of IRs based on ontology should be developed, which is significant to provide knowledge support for the virtual robot and map it to the corresponding physical energy model. Finally, the digital twin data refers to all data both from physical space and cyber space, including the multi-source perception data, calculating data, inference data, data of virtual model and simulation data, etc. which provides data driving for the digital twin-based energy model.

4 Energy Modeling of Industrial Robots Based on Digital Twin

4.1 Physics-Based Energy Modeling of IRs

In order to build the physical energy model of IRs, a linear model of torque should be developed, D-H notation, robotic kinematics and dynamics are needed as prior knowledge. By the design of excitation trajectory, the data for dynamic parameters identification can be acquired. After data pre-processing, the identification process can be completed by solving linear equations. The last step is to validate the correctness of the energy model. If the obtained model is not satisfied, then the modeling procedure should be repeated. The whole process is shown in Fig. 2(a).

Fig. 2.
figure 2

(a) Procedure of physics-based energy modeling of IRs. (b) Robot’s frame system.

Denavit-Hartenberg (D-H) Notation.

The definition of robot parameters is quite crucial for kinematics and dynamics calculations in the forthcoming steps. The Denavit-Hartenberg (D-H) notation is widely used for the description of robot parameters. By using D-H notation, robot base and each joint are assigned with a frame, the z-axis of the assigned frame is aligned with the rotational axis of the according joint. Figure 2(b) gives an application of the D-H notation on the robot model, the robot base is fixed with frame 0 which is used as world frame. L1–L5 are robot structural parameters, which are given by the robot manufacturer.

Linear Model of Torque.

A dynamic model should be obtained before parameter identification. There are several approaches to derive the dynamic equation of IRs, like Newton-Euler or Lagrangian method. The dynamic equation from both approaches can be written as the form shown in (1) [23].

$$ M\left( {q,\phi } \right)\ddot{q} + C\left( {q,\dot{q},\phi } \right) + G\left( {q,\phi } \right) = \tau $$
(1)

Where: for a n degree-of-freedom robot, n-vector of joint torques τ is a function of n-vector of joint angle q, angular velocity \( \dot{q} \), acceleration \( \ddot{q} \) as well as dynamic parameters ϕ. \( M\left( {q,\phi } \right) \) is called the inertia matrix, \( C\left( {q,\dot{q},\phi } \right) \) includes Coriolis and centrifugal terms, \( G\left( {q,\phi } \right) \) represents gravity terms. The torques is nonlinear in the dynamic parameters in (1), which is complicated and not suitable for fast calculation. By means of robot kinematic and dynamic analysis, Eq. (1) can be formulated linearly with respect to dynamic parameters. Using the base parameters [23], a linear model of form shown in (2) can be obtained.

$$ \tau = H\left( {q,\dot{q},\ddot{q}} \right)\phi_{linear} $$
(2)

Where τ is the joint torque vector, H is the n×k observation matrix which is determined by the robot motion data only. \( \phi_{linear} \) represents the k-vector of base parameters. Friction, which influences significantly on robot dynamic behavior, is not considered in (1) and (2). Hence it is greatly necessary to compensate the friction effect. Friction is usually complicated and high nonlinear, a simplified friction model which is a combination of Coulomb and viscous friction is commonly used for robotic applications [24]. As shown in (3), note that friction torque \( \tau_{f} \) is linear in unknown parameters \( f_{c} \) and \( f_{v} \), which is in line with the structure in (2). \( f_{c} \) an \( f_{v} \) are the coefficients of Coulomb and viscous friction respectively.

$$ \tau_{f} = f_{c} sign\left( {\dot{q}} \right) + f_{v} \dot{q} $$
(3)

Excitation Trajectory Design.

The optimal parameter identification requires specially designed robot trajectory, and it is essential to ensure whether the excitation is sufficient for accurate and fast parameter estimation in the presence of disturbances. Trajectory parameterization based on finite Fourier series can provides periodic and bandlimited excitation [23], which helps to simplify and improve the accuracy of parameter estimation. It can be expressed by (4).

$$ q_{i} \left( t \right) = q_{i,0} + \sum\nolimits_{k = 1}^{N} {\left( {a_{i,k} \sin \left( {k\omega_{f} t} \right) + b_{i,k} \cos \left( {k\omega_{f} t} \right)} \right)} $$
(4)

Where \( \omega_{f} \) is base frequency which is the same for all joints, t represents time, \( q_{i,0} \) is the initial position of joint, the Fourier series of each joint includes 2N + 1 parameters. In order to reduce the estimation error, the input trajectory need to be optimized and the condition number of observation matrix can be a criterion for optimization, reducing the condition number will help to improve the identification accuracy. By solving the nonlinear optimization problem, the coefficients \( a_{i,k} \) and \( b_{i,k} \) can be obtained. Meanwhile, there exists limitations on robot joints like position, velocity, acceleration as well as the Cartesian space, these constraints should be considered for solving the optimization problem.

Data Acquisition and Parameter Identification.

The calculated optimized excitation trajectory will be programmed in the robot controller so that the robot can execute the trajectory continuously. Meanwhile, the data will be collected with a constant frequency. Joint positions and torques are monitored by joint encoder, angle velocities and accelerations can be calculated by the differential of positions. After denoising and smoothing process for measured data, the observation matrix and vector of torques can be calculated, thus the over determined equations showed in (5) can be obtained.

$$ \Gamma = \left[ {\begin{array}{*{20}c} {\tau_{1} } \\ \vdots \\ {\tau_{r} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {H\left( {q_{1} ,\dot{q}_{1} ,\ddot{q}_{1} } \right)} \\ \vdots \\ {H\left( {q_{r} ,\dot{q}_{r} ,\ddot{q}_{r} } \right)} \\ \end{array} } \right]\phi_{linear} = {\text{W}}\phi_{linear} $$
(5)

Where for \( k = 1, \ldots ,r \), \( \tau_{k} \) and \( H\left( {q_{k} ,\dot{q}_{k} ,\ddot{q}_{k} } \right) \) are the torque vector and identification matrix respectively based on the data from the \( k_{th} \) sampling. By using the least square method, the estimated value of parameters is

$$ \hat{\phi }_{linear} = \left( {W^{T} W} \right)^{ - 1} W^{T}\Gamma $$
(6)

Energy Consumption Calculating.

After the robot dynamic parameters has been identified, the joint torques can be calculated based on (2). The power calculation of each joint is performed by (7).

$$ P_{out,i} = \tau_{i} \dot{q}_{i} $$
(7)

Consequently, the total power of robot is

$$ P_{total} = \sum\nolimits_{i = 1}^{n} {P_{out,i} + P_{constant} } $$
(8)

Here, \( P_{constant} \) is the power consumption when the robot is in standby mode. Then the process ends in computing robot energy consumption as shown in (9).

$$ E = \int_{{t_{0} }}^{{t_{f} }} {P_{total} dt} $$
(9)

4.2 Unified Digitized Description of IRs Driven by Physical Energy Model

Unified Digitized Description of IRs Based on Ontology.

The linkage and correct mapping between the virtual model and corresponding physical energy model is crucial for the bidirectional interaction. Hence a unified digitized description model of IRs is built to provide knowledge support for the virtual robots. According to the physical energy model of IRs explained above, the factors that affect energy consumption significantly in the running process of IRs include joint speed, acceleration, joint torque, payload, etc. We organize the digitized description model of IRs in terms of robot basic information and running process information. Robot basic information mainly presents the information which determines a specific robot. Running process information includes the real-time and dynamic parameters of a running IR, which is mainly used to reflect the current running status and energy consumption of IR.

Ontology is the formal specification of conceptual models which has well-machine-understanding performance to enable the interacting and knowledge-transmission easily. We utilized OWL (Web Ontology Language) in this paper to build the ontology model for the unified digitized description of IRs explained above. Protégé, a general ontology editor, was used to realize the ontology structure.

The formal description of robot basic information ontology is shown in (10), IR_Information is defined as a class which describes the basic information of IR. The ontology model of IR_Information is given in Fig. 3(a).

Fig. 3.
figure 3

(a) Ontology of robot basic information. (b) Ontology of running process information.

$$ \begin{array}{*{20}l} {IR\_Information = (IR\_Name,IR\_ID,IR\_Type,Manufacturer,IR\_Weight,Controlled\_Axes,} \hfill \\ {Arm\_Movement\_Type \, , \ldots )} \hfill \\ \end{array} $$
(10)

The following definition describes the running process information of IR.

$$ \begin{array}{*{20}l} {IR\_RunProcess = (Current\_State,Joint\_Position,Joint\_Speed,Joint\_Acc,Joint\_Torque,} \hfill \\ {Payload,Run\_Power, \, Energy\_Consumption,Run\_time,\, \ldots )} \hfill \\ \end{array} $$
(11)

IR_RunProcess is defined by datatype properties that link individuals to data, which represents the dynamic parameters about running status and energy consumption of IRs. Dynamic information such as joint position, joint speed, energy consumption, etc. is involved in the ontology model of IR_RunProcess, as shown in Fig. 3(b).

The formal description of industrial robot ontology is given in (12).

$$ Industrial\_Robot = \left( {IR\_Information,IR\_RunProcess} \right) $$
(12)

Where IR_Information and IR_RunProcess reflect the robot basic information and running process information introduced above respectively. Industrial_Robot is defined as a class that has IR_Information and IR_RunProcess. By doing this, a virtual robot which is linked to the corresponding individual of Industrial_Robot can obtain the two kinds of information. The ontology model of Industrial_Robot is shown in Fig. 4(a).

Fig. 4.
figure 4

(a) Ontology of industrial robot. (b) Mapping relationship.

Mapping Relationship Between Digitized Model and Physical Model.

In this paper, the mapping relationship between the ontology attributes and real-time data is established, as shown in Fig. 4(b). The developed knowledge structure above plays a critical role to give a bond of interaction between the virtual model and respective physical energy model. Since the data and information from the physical energy model are changeable in the running process of IRs, the ontology attributes should be altered accordingly so as to reflect the current status of IRs effectively and precisely. However, the ontology editor Protégé just creates the initial structure of ontology and it can only modify ontology manually. In this respect, it is required to build the mapping relationship which associates the ontology attributes and real-time data. Jena, a free and open source Java framework for building semantic applications, is used to read and modify the established ontology. The data from the physics-based energy model will be stored in database firstly, in the light of the established mapping relationship, the value of these parameters stored in database can be added to the instance of ontology model dynamically using Jena, then the instance of ontology will be updated over time to get the current information of IRs according to the real-time data.

4.3 Integrated Energy Model of IRs Based on Digital Twin

In the light of the discussion above, an energy model based on digital twin which integrates the physics-based energy model, unified digitized description model and virtual model of IRs is constructed, as shown in Fig. 5. On the physics-based energy model layer, the energy modeling of physical IRs is conducted based on parameter identification. When a robot trajectory in joint space is generated, the energy consumption to execute this trajectory will be computed by the physical energy model of the corresponding IR, the real-time data from physical energy model such as joint position, joint torque and energy consumption, etc. will be stored in database to provide data drive for digitized description model and relevant virtual model. On the digitized description model layer, the unified knowledge description of IRs based on ontology is realized to give knowledge support for mapping the physical energy model to corresponding virtual robot model. The established ontology model is stored as OWL files. Meanwhile, according to the established mapping relationship above, the value of ontology attributes can be modified and updated based on the real-time data in database using Jena, thus the important connection between the physical energy model and digitized description model can be implemented. On the virtual model layer, the 3D virtual IR, as the real mapping to the physical one, can be realized in ROS (Robot Operating system), which is an open source and meta-operating system for robotic application development. With the knowledge support from the digitized description model and data drive from the physics-based energy model, the virtual model can perform the data visualization and motion simulation in virtual space for robot energy consumption.

Fig. 5.
figure 5

The integrated energy model of IRs based on digital twin.

For the establishment of virtual robot model in ROS, URDF (Unified Robot Description Format), MoveIt and RViz are utilized respectively, as shown in Fig. 6. URDF is used to record the whole information of a virtual robot. MoveIt, a state of art open source software, is used to perform the task of motion planning and control, and RViz is responsible for 3D visualization and simulation.

Fig. 6.
figure 6

The establishment of virtual robot model.

URDF is a language based on XML to describe the simulation model of a robot, which contains the information about virtual robot model such as the shape, size, color and kinematics information, etc. In URDF, the virtual robot model is specified using primarily two language elements, namely, link and joint. A link element represents a rigid body part of a robot by specifying its origin, mass, inertia, geometry, etc. whereas a joint element represents the connection between two links, the joint name, joint limits and joint type, e.g. revolute, continuous, or prismatic, are specified in element joint. After the virtual robot model are defined correctly in URDF, the created virtual robot can be displayed by importing the corresponding URDF file to RViz, as one of the core functions of ROS, RViz makes it convenient for users to display the virtual robot movements vividly in a 3D environment. For example, Fig. 7 gives the URDF specification of a KUKA KR6 R700 industrial robot and the corresponding 3D virtual model in RViz. Besides, in order to achieve the motion control on the virtual robot, MoveIt is required. MoveIt is the primary software framework in ROS and provide the capability for motion planning, manipulation, 3D perception, kinematics analysis, control and navigation. By means of using MoveIt software, we can control the virtual robot to perform the specified or planned trajectories.

Fig. 7.
figure 7

(a) The URDF specification of KUKA KR6 R700. (b) The corresponding 3-D virtual model in RViz.

5 Case Study and Performance Analysis

The rationality and effectiveness of the proposed method is verified in this section and a set of experiments are investigated. We take KUKA KR6 R700 sixx as IRs’ instance, as shown in Fig. 8. It is a compact, versatile and flexible six-axis articulated robot manufactured by KUKA Company for particularly high working speeds. KUKA KR6 R700 sixx not only works efficiently with high speeds but also provides high-precision, which makes it do well in many fields.

Fig. 8.
figure 8

KUKA KR6 R700 sixx industrial robot.

The physical energy model of this KUKA KR6 R700 sixx robot is established firstly based on parameter identification. There are mainly three steps:

  1. 1.

    MATLAB software is used to build the dynamics program of robot and deduce the symbolic expression of actuator torque, then the linear model of torque for parameter identification can be obtained base on it. After that, the excitation trajectory will be calculated in MATLAB.

  2. 2.

    The computed excitation trajectory from MATLAB is programed and executed by the robot, simultaneously, the motion data and torques of robot are sampled in each time interval of 0.012 s by joint encoders.

  3. 3.

    The obtained motion data from joint encoders can be used to calculate the coefficient matrix in the linear model of torque, and then we can identify the dynamic parameters using the least-square method.

It is necessary to validate the correctness of the established physical energy model. The verify experiment is conducted to compare the modeling power with the measurement power from the developed smart electric meter when the robot moves with a random trajectory. Figure 9 gives the trajectory for validation and the compared result between the modeling power and measurement power. Since energy consumption is a function of power based on time integral, the modeling and measurement energy consumption are computed respectively as shown in (13) and (14). The relative error between the modeling and measurement energy consumption is calculated by (15).

Fig. 9.
figure 9

(a) The trajectory while joint2, joint3 and joint4 move for validating the physical energy model. (b) The compared result between the modeling power and measurement power.

$$ {\text{Energy}}_{\text{Model}} = \int_{t1}^{t2} {P_{Model} dt = 559.59\,{\text{J}}} $$
(13)
$$ {\text{Energy}}_{\text{Measure}} = \int_{t1}^{t2} {P_{Measure} dt = 598.78} \,{\text{J}} $$
(14)
$$ {\text{Error}} = \frac{{\left\| {{\text{Energy}}_{\text{Model}} - {\text{Energy}}_{\text{Measure}} } \right\|}}{{{\text{Energy}}_{\text{Measure}} }} \times 100\% = 6.54\% $$
(15)

The compared result reveals that the modeling power is approximately associated with the trend of measured power. Analyzing the energy consumption from the physical energy model and measurement, there are mainly two reasons for the differences between the model and measurement. The first one is that the measurement power includes the power consumption of the motor torque, and the power loss of the motor. However, the power loss of the motor is regarded as constant in the physical energy model while it actually varies from the payload, temperature, velocity, etc. The other reason for the differences is the simplification of the used linear friction model.

For the linkage between the physical energy model and virtual model, the KUKA KR6 R700 sixx is described in the proposed ontology model by inserting individuals, including the basic information and running status information. Jena, a java API for ontology, is used to handle ontology. An individual of Industrial_Robot: KUKA_KR6_R700 is built, as shown in Fig. 10. The connection between KUKA_KR6_R700 and respective individuals of IR_Information and IR_RunProcess has been established, through which the individual KUKA_KR6_R700 can provide the basic information and running status information about this KUKA robot.

Fig. 10.
figure 10

Individual description of KUKA KR6 R700 sixx robot.

For achieving the simulation and data visualization on the energy consumption of the KUKA KR6 R700 sixx robot, the corresponding 3D virtual model is implemented in ROS. At the basis of the established physical energy model and knowledge description model, the developed 3D virtual model can perform moving with a specified trajectory and displaying the relevant data during the running process. To illustrate the feasibility and effectiveness of the integrated energy model of IRs, the trajectory shown in Fig. 11 is taken as an instance of process in robot movement, the KUKA KR6 R700 sixx robot is programmed to perform the process that is to move the robot from the initial configuration as shown in Fig. 12(a) to the final configuration as shown in Fig. 12(b). The total power and energy consumption are calculated by the physical energy model and stored in database, with the established individual of KUKA_KR6_R700, the related information during the process for executing this trajectory is read and loaded to ROS, thereby we can run the virtual robot model based on the obtained information, Fig. 13 gives the simulation result after the running process has finished. We could see that the virtual robot can move with the desired trajectory, in addition, the information including energy consumption in the process can be displayed dynamically as well in the interface. Our experiment shows that the developed virtual model can simulate correctly on robot energy consumption, which can contribute in energy consumption monitoring and prediction of IRs.

Fig. 11.
figure 11

The trajectory of the process in robot movement.

Fig. 12.
figure 12

(a) Initial configuration. (b) final configuration.

Fig. 13.
figure 13

The simulation result of the process, the related information is shown in the interface.

6 Conclusion and Future Work

In this paper, a novel system framework focused on energy modeling of IRs based on digital twin is proposed. In the light of that, the physical energy model of IRs based on parameter identification is built firstly, then we propose the unified description model for IRs using ontology, and the linkage between the physical energy model and description model is built based on the mapping relationship. Besides, the 3D virtual model for visualization and simulation is realized in ROS. Finally, to illustrate the effectiveness of the proposed method, a case study on a KUKA KR6 R700 sixx industrial robot is demonstrated. In general, the digital twin-based energy model is effective in energy consumption prediction and simulation for IRs. In the future, further research will be investigated to improve the accuracy of energy model and perfect the virtual model. Energy optimization for IRs based on the proposed approach is also planned in the following study.