Abstract

Motion modularity is the main method of motion control for higher animals. That means the complex movements of the muscles are made up of basic motion primitives, and the brain or central nervous system does not care about the specific details of the movement. However, the industrial robot control system does not adopt the technical roadmap of motion modularity, it generates complex trajectories by providing a large number of sampling points. This approach is equivalent to using the brain to directly guide the specific movement of the muscle and has to rely on a faster Fieldbus system to obtain complex motion trajectories. This work constructs a modularized industrial robot trajectory generation component based on Dynamic Movement Primitives (DMP) theory. With this component, the robot controller can generate complex trajectories without increasing the sampling points and can obtain good trajectory accuracy. Finally, the rationality of this system is proved by simulations and experiments.

1. Introduction

Motion modularity is an idea of decomposing complex motion into simple motion modules. That means complex motions are composed of some motion primitives. Studies in motor neuroscience have shown that the nervous systems of higher animals are controlled by a modular approach. The central nervous system achieves coordinated control of multiple muscles and multiple joints by combining modules that represent basic motion [1]. Neuroscience research on motion modularity has achieved many results in muscle synergy [2], motion primitive understanding [3], motion pattern learning [4], and motion modeling [5].

Since higher animals rely on modular methods to complete motion control, motion modularity technology should also be the future of robot control. However, currently the robot control system does not adopt the motion modularity technology roadmap, it adopts another centralized control technology roadmap which enhances the capability of Fieldbus to improve control effect. We will introduce this in detail in Section 3. Actually, scholars in the field of robotics have conducted long-term research on motion modularity. Professor Roger Brockett of Harvard University first proposed this idea in robotics. He pointed out that the motion of robots has the characteristics of the hybrid system, and can drive a robot to generate continuous motion by symbol string and real-valued functions. He proposed Motion Description Language (MDL) method [6, 7]. After that, Motion Description Language was combined with the dynamic system to establish a control method for the inverted pendulum choreography robot [8]. MDL has been applied in teleoperation system [9]. Since then, MDL has also been applied to the trajectory planning and control of mobile robots [10]. Based on the function decomposition theory of Hilbert space, this work decomposes the trajectory of the robot to obtain the motion primitives. The modular trajectory is sent to the mobile robot and good results are achieved. This method has been promoted and applied to the control of the industrial robot via mapping the robot joint trajectory to the motion primitives by function space decomposition [11]. Then, a small number of motion primitives are sent to the robot joint and the joint reproduces the trajectory by combining the primitives. Through this technology, the purpose of not reducing the accuracy of the trajectory but reducing the real-time communication frequency of the robot is realized. However, this method has problems such as insufficient generalization ability of the motion primitives and the unstable number of primitive elements, and it cannot be deployed in the actual industrial robot control system.

In this paper, the Dynamic Motion Primitive (DMP) technology is used to expand the MDL method, and the shortcomings of the previous work are solved. In the past, the DMP method was mainly used for imitative learning of robots which was on the task level. To reduce the data without compromising the accuracy of trajectory, the novelty of this work is that we apply the DMP method on the level of joint trajectory generation firstly based on the motion modularity idea and a new industrial robot trajectory generation component is added to the industrial robot controller.

The following chapters will first sort out the Dynamic Motion Primitive theory, and then elaborate on the industrial robot trajectory generation component based on the motion modularity technology. Finally, the corresponding simulation and experimental results are introduced.

2. Basis of Dynamic Movement Primitives

The Dynamic Movement Primitives (DMP) method was first proposed by Professor Stefan Schaal of the University of Southern California and is a method for robot trajectory control and planning. This method improves the generalization ability of the robot motion primitives and can regress the trajectory better. It has many applications in the research of robot imitative learning [12], human-robot collaboration [13], and human motion modeling [14]. Besides, this method has been applied to neurosurgical science research by scientists, shows how movement primitives can be used to learn appropriate muscle excitation patterns and to generalize effectively to new reaching skills [15]. This achievement combines the study of motion modularity in neuroscience and robotics.

The basic idea of the DMP theory is to use a relatively simple and stable system to parameterize the expression of complex trajectories and then adjusts the system through a nonlinear function, so that the trajectory of the system exhibits the desired characteristics. It inherits the advantages of linear systems: convergence to the attracting domain, robustness to interference, and time independence. The addition of a force function allows the system to generate arbitrary motion trajectories. There are two main types of DMP models: discrete and rhythmic [16]. Discrete systems are based on attraction points and rhythms are based on limit cycles. The trajectory of the robot manipulator is essentially a mapping from time to robot configuration. In the actual system, it is a discrete motion through numerous intermediate points. Therefore, the discrete DMP is selected as the basis of manipulator trajectory control.

The DMP system consists of two parts: a second-order system and a force function system. The second-order system produces a basic motion that converges to the target location. In the control of electromechanical systems, most of the models can be described by the spring-damping model. Therefore, we use the spring-damping model as the basic second-order system in the DMP. The force function is a supplement to the second-order system and is used to fit the motion pattern of the original trajectory by producing an arbitrarily smooth motion trajectory. Using the spring-damped system to construct DMP, we can get the basic equations of the DMP system:

In the basic equation, the force function is essentially a function approximator that uses some regression method to approximate the original trajectory. The DMP system is made to converge to a given target while producing a trajectory that satisfies the requirements and is sufficiently smooth. However, it does not ensure that the system converges to the target point after the force function is added to the basic equation. Therefore, a gating term should be added that makes the force function converge to 0 while the system reaches the target . The first-order system has such a property (Figure 1), so it is considered to use the variable as a gating term. In addition, the force function is a function that depends on the system time; it is not a time-independent autonomous system. We should make the force function an autonomous system that does not depend on the system time . Therefore, the independent variable of the force function can be replaced by the of the gating term. The entire force term can be expressed as . Thus, a complete DMP system can be expressed in the form of the following equation:

Among Equation (2), and are the spring rate and damping coefficient respectively related to the spring system, indicates the target position of the system, , , are the system position, velocity and acceleration states respectively. The parameter is a scaling factor that controls the speed of motion. is the force function with gating term and represented by a phase parameter.

The forced function is a function approximator that uses the regression method to approximate the original trajectory. There are many algorithms of function regression that can be summarized into two unified models, which are mixture of linear models (3) and weighted sum of basis functions (4) [17].

In this paper, we use the local weighted regression (LWR) algorithm that belongs to the mixture of linear models to approximate. According to the characteristics of the LWR algorithm and the DMP system, the unified model can be simplified, and the specific expression form of the function approximator is obtained:

where is a standard Gaussian function:

is the center of the Gaussian function, and is the width of the Gaussian function, which is a known parameter given in advance by the user. The entire DMP system only has the weight parameter which needs to be solved by prior data.

To solve the optimal parameter of the system, we need to pre-plan the end-effector trajectory of the manipulator according to the task requirements, and then calculate the reference trajectory of the robot joint according to the kinematics and dynamics model of the robot. After that, the sets state point data are sampled on the trajectory with a fixed sampling period. Finally, the sampling point data are substituted into the original system equation, and the force function can be obtained.

According to the above Equation (7) and the force function , the minimum error criterion is selected to find the optimal weight of the system

among it

At this point, the theoretical preparation of the DMP controller is completed. Figure 2 shows the whole process of DMP algorithm from the training of motion primitives to the implementation.

3. Trajectory Generation Component Based on Motion Modularity Technology

This section will take an actual robot control system as an example to analyze the traditional industrial robot control system in detail. Figure 3 shows the SIA-SmartPainting, a painting system for vehicle maintenance developed by our team. Its controller is a typical centralized industrial robot control system. The system visually models the car's door, generates a paint path in the upper controller and performs interpolation operation, then sends intermediate points of trajectory to the joint through EtherCAT bus. According to the characteristics of the robot control task, the robot control system can be divided into four levels from top to bottom: planning layer, trajectory layer, communication layer, and joint layer. At the planning layer, the SIA-SmartPainting system visualizes the painted door to create a motion path of the robot’s end-effector. The trajectory layer performs operations such as inverse kinematics, trajectory interpolation, and time parameterization. It maps the path in Cartesian space to the joint space and adds time parameters. It also plans reasonable velocity and acceleration through interpolation and optimization algorithms. After obtaining the reference trajectory of the joint space, the relevant data are transmitted to the communication layer, and the intermediate point of the reference trajectory is sent to the joint layer by the Fieldbus system of the communication layer. Since the communication layer is a real-time component, the closed-loop control of the manipulator is also carried out in this layer. To ensure the smoothness of the trajectory and the stability of the spray gun while painting operation, the communication layer needs to perform closed-loop control of the position and speed of the joint. To improve the communication rate, we adopt the high-speed EtherCAT bus, and the real-time communication frequency can reach 1 kHz, that is, the communication layer performs closed-loop control with a period of 1 ms. The bottom layer of this control system is the joint layer. This layer receives the reference signal sent from the Fieldbus, controls the joint motor motion according to the reference signal, and feeds the motor status to the upper controller in real-time.

Through the detailed analysis of a typical industrial robot control system, we can find that the control system of an industrial robot is mainly composed of two kinds of hardware: the upper controller and the joint motor driver. The upper controller is responsible for the control of the whole robot arm and the joint motor driver is responsible for the motion control of the joint motor. The two parts rely on the Fieldbus system to communicate. In the traditional industrial robot control system, the path of the robot is generated in the planning layer; the trajectory layer is responsible for the inverse kinematics and interpolation calculation; the communication layer sends the reference points of the trajectory to the joint in real-time; the joint layer is the motor control unit, which controls the specific motion of the joint motor according to the reference signal. This control system is essentially a discrete control which discretizes the joint’s trajectory and then sends the discrete intermediate points of trajectory to the joint controller. The characteristic of this system is that all the motion details of the joint are generated by the upper controller, and the joint itself is only an execution unit without any autonomy. This kind of control system is a centralized structure. Under this structure, if we want to improve the trajectory accuracy of the robot, we need to increase the number of sampling points of the interpolation point, and the communication rate of the Fieldbus determines the accuracy of the trajectory. In connection with the idea of motion modularity, we hope to establish a modularized trajectory generation component. This component, with motion primitives in joints, can improve the trajectory accuracy and the performance of the robot without increasing the sampling points and communication rate.

There has been a lot of research on modular robots, but the current modularity mainly refers to modular joints, which are modular in mechanical and electrical aspects. That is to say, only hardware is modular and there is no software modularity currently. We hope to use motion modularity technology in the structure of the system, such that the motion is generated by the motion primitives. Therefore, we have made a trajectory generation component based on the DMP theory that generates motion in a modular way, improves joint autonomy, and achieves good motion performance without transmitting a large number of intermediate points of the trajectory. As can be seen from the structure diagram (Figure 4), the modularized system has one more component for DMP model generation and analysis than the traditional control system. This new system first precalculates the robot trajectory and then trains the basic DMP motion primitives with the obtained trajectories in advance. After obtaining the optimal parameters, we deploy these primitives to the joint driver. When the robot is running, the joint itself calculates the feedforward information of the trajectory via motion primitives. The upper controller only needs to control the position of the joint trajectory at a very low frequency, so that an accurate and smooth trajectory can be obtained. This system implements the control that is feedforward and supplemented by feedback.

Figure 5 shows the similarities and differences after adding the new trajectory generation component to the robot control system. The hierarchy is similar, but there are differences in the specific functions of each layer. The planning layer is no different from the traditional controller and is still responsible for the path planning. The trajectory layer is responsible for the trajectory solving tasks and the generation of motion primitives. Specifically, this layer should calculate the reference trajectory of the joint space according to the optimization index of the system and the kinematics and dynamics model of the robot. Then generates a DMP model based on the previously obtained trajectory to complete the mapping from trajectory to motion primitives. The communication layer is responsible for deploying the motion primitives to the robot joint driver in advance. Thus, during the motion of the manipulator, the joint driver can generate a feedforward signal of the trajectory according to the predeployed motion primitives.

Traditionally, to obtain a highly accurate and smooth trajectory, the upper controller generally performs reference trajectory sampling and control with a period of 1 ms. The advantage of this new method is that the reference trajectory is generated autonomously by the joint, and the upper controller can greatly improve the control period. For example, the joint’s position loop can be controlled with a period of 10 ms, but the trajectory accuracy and smoothness can also be realized. Figure 6 shows the relationship between feedforward and feedback of this kind of control strategy. With the modularized component, the robot control system can complete complex trajectory with a small number of sampling points, achieve the control effect of high-speed Fieldbus with the low-speed Fieldbus, and improve the accuracy of the trajectory without increasing the real-time data.

4. Simulations

To verify the feasibility of the trajectory generation method in the robot control system, we need to simulate the system at first. The simulation environment is built by V-REP and MATLAB platforms. V-REP is a robot integrated simulation environment with the robot and environment model. We can quickly develop and research robot algorithms through embedded scripts, plug-ins or remote APIs [18]. The V-REP contains the dynamics engine that supports the Unified Robot Description Format (URDF) file. Importing a URDF file with the dynamic characteristics and inertia information of the robot, the robot can be dynamically simulated and the joints can be controlled. The developer can also directly adjust the joint PID parameters. We will simulate the robot body and joint driver through V-REP. The user can operate robot joints and obtain feedback by calling V-REP’s Remote APIs in MATLAB. Therefore, we write a program to simulate the robot’s controller in MATLAB.

This simulation uses the SIA-SmartPainting robot model as the analysis object, and controls the robot to reproduce the four types of end-effector trajectory in different ways (Figure 7), then compare and analyze the relevant characteristics. The specific versions of the simulation software are V-REP 3.5 and MATLAB 2014a. The simulation adopts the synchronous mode of V-REP, the simulation period is 5 ms. Programs are written in MATLAB which are applied to both traditional and modularized system architectures:

(1) Traditional architecture: This scheme is applied to the control system of the traditional architecture. The upper system controls the position loop of the joint with a control period of 50 ms and there is no modularized tajectory generation component on joint.

(2) Modularized architecture: This scheme is applied to the control system of the modularized architecture. The upper system controls the position loop of the joint with a control period of 50 ms and there is modularized tajectory generation component on joint. The joint is simulated at the period of 5 ms to generate feedforward signal for the position and velocity loops.

In order to make a quantitative analysis of the reproducibility of the trajectory, we define the pose error of the end-effector trajectory. Since the pose matrix of the robot belongs to the Special Euclidean Group , which is not closed to addition, it is considered to map the end pose matrix to the corresponding Lie Algebra for error analysis and comparison. Let the desired pose matrix be , and the actual matrix of trajectory is , so that the actual trajectory points are in one-to-one correspondence with the desired trajectory points. Then the error of the i-th point on the trajectory is defined as:

That is the two norms of the difference between the two Lie Algebras. Thus, we can define the Root Mean Square Error (RMSE) of the two trajectories:

Table 1 shows the weights of force function in different tajectory type. Table 2 shows the analysis of the simulation results and Figure 8 shows the position curve of the robot in Cartesian coordinates. In the four sets of simulations, the robot used the same joint PID parameters. It can be seen that adopting the modularized architecture, better control effects can be obtained with the same control period and the same amount of data. Simulation analysis proves the feasibility of the trajectory generation component based on DMP technology.

5. Experiments

5.1. Experimental Platform

In order to verify the practical ability of the motion modularity technology in the industrial robot control system, we built a principle verification experimental platform consisting of an upper controller and a joint motor driver (Figure 9). The hardware of the upper controller is an computer with a real-time Linux system. The software system is mainly based on ROS and has been developed packages such as trajectory generation, DMP calculation, and communication. The trajectory generation package is developed based on the pilz industrial robot trajectory generation library [19]. The DMP calculation package is developed based on the DMPBBO calculation library [20]. Figure 10 shows the overall node architecture and information flow of the experimental platform, the blue dashed box indicates the corresponding tool used by the node.

The joint driver is based on the STM32 platform and is a brushless motor driver with DMP analysis. In order to improve the processing speed and the stability of the motor control, the driver is divided into two independent parts of low voltage side and high voltage side. Each part is assigned an independent CPU. The high voltage side uses the STM32F303 chip, a chip with an internal integrated amp unit which is very practical and suitable for motor control applications. The chip is responsible for sampling armature current and PWM generation. The low voltage side is responsible for control and operation, which is handled by an STM32F405 chip. The F4 chip contains a floating-point arithmetic unit, which can provide good support for mathematical operations. Therefore, the brushless motor FOC control, PID calculation, and DMP analysis are performed on the low voltage side. Figure 11 is a functional diagram of the driver unit. Figure 12 is the joint motor driver based on STM32.

5.2. Experimental Results

At this time, a single joint motion experiment was performed. Firstly, the robot model is controlled to run the previous four types of end-effector trajectory in the simulation environment of the upper control system, and then the trajectory data of each joint are collected. We use the joint trajectory data collected in the simulation environment to train the DMP model. After that, we send the parameters to the joint driver in advance. The joint motor driver stores the motion primitives after receiving the DMP's parameters. As soon as the target point is sent to the motor driver, the motor begins to run. During the motion, the upper controller controls the position loop of the motor in a period of 50 ms, which is longer than the joint feedforward given period (feedforward period is 5 ms). In the middle of the two control signals, the CPU on the low voltage side of the driver calculates the motion feedforward values (position, velocity, and acceleration) in real time. These feedforward signals are inputs of the corresponding control loop of the driver.

Since we cannot show the results of every joint, we only show the typical trajectory curves of joint 2 (Figure 13), it can be seen that the system achieves a good reconstruction of the trajectory. This experiment proves the effectiveness of the modularized control system for industrial robots.

6. Discussion

The current industrial robot control systems are centralized, and the upper control system is responsible for all the details of the motion, just as humans use the brain to guide the motion of each muscle. However, neuroscience research has shown that higher animals generate and control motion in a modular manner. Therefore, we hope that the robot control system can also have the same ability of motion modularity, which combining complex motion by simple primitives and improving joint’s autonomy. Based on the DMP theory, this work builds a modularized trajectory generation component for the industrial robot controller. Firstly, the method of motion primitive generation is constructed by DMP theory. Then the function and benefits of the components are analyzed. Finally, the feasibility of this system is proved by simulation and experiment.

The significance of the motion modularity component in practical work can be listed as following:(1) The autonomy of the joint has been improved. The joint automatically generates the feedforward information of the trajectory through the motion primitives and does not need to be provided all the motion details by the upper controller. The trajectory accuracy which can be achieved with 1 ms as the control cycle currently can be achieved via 10 ms through this component. That means reducing the real-time requirements of the main controller. We do not need to use the expensive real-time operation system.(2) A low-speed Fieldbus system can be used. Since the communication cycle of the upper controller is greatly improved, the high-speed Fieldbus system is no longer necessary. For example, the robot can also achieve good motion performance after replacing the EtherCAT bus with the CAN bus.(3) The robot can implement one master multi slaves control mode. Because of reducing the control frequency of the upper controller. The upper controller can greatly reduce the frequency of the feedback control. That means the ability of multirobot cooperation will be improved. For example, on the production line, one upper controller can be responsible for multiple manipulators and the operations are synchronized by the same upper controller. That will make it easier for multi-robot to work together.

This study also has the following shortcomings, which need to be improved in the future:(1) The clock synchronization of the joints has not been considered. Clock synchronization is a key issue in multiaxis control. This work only uses the local clock of the joint itself, and does not have multiaxis clock synchronization. Clock synchronization will be the focus of subsequent research.(2) The characteristics of motion primitives are not delved deeper. Currently the system obtains motion primitives by precalculating the trajectory, without analyzing the characteristics of the motion primitives. We hope to extract the characteristics of the motion primitives, classify them and establish a one-one mapping between primitives and trajectories.

Data Availability

The data and all other info used or produced in this project will be available for the publisher.

Conflicts of Interest

The authors declare that there are no conficts of interest regarding the publication of this paper.

Acknowledgments

This work is funded by International Thermonuclear Experimental Reactor (ITER) Project under Grant 2012GB102005.