Abstract
At present, the intelligent control system of robots is closed, which has the disadvantages of poor fault tolerance, unstable operation and low positioning accuracy. Aiming at these deficiencies, a Petri net model of the intelligent control system for open architecture robots based on PMAC is designed. Starting from the kinematics of robots, the forward and inverse kinematics model of open architecture robots are established according to DH method; then the trajectory planning is performed from Cartesian space linear interpolation algorithm and circular interpolation algorithm respectively, and the basic function of robot path planning is constructed. Finally, a PMAC-based open architecture robot intelligent control system is established. The control system adopts dual-microcomputer hierarchical control mode and modular structure design. Real-time communication between the upper computer and the lower computer can be realized by calling the Pcomm32 dynamic link library; based on the robot’s forward and inverse kinematics model and trajectory interpolation algorithm, the modular control software for the robot system is developed. The control software realizes functions such as security check, parameters setting, kinematics analysis, and teaching reproduction. Combined with the principle of hierarchical Petri nets, various modules of open architecture robot control system based on PMAC are modeled. Experiments show that the designed system runs smoothly, has high positioning accuracy, good openness and scalability.
Introduction
Traditional robot control systems have many defects such as poor scalability and portability, and low fault tolerance, which bring heavier cost burden to enterprises and reduce their market competitiveness [1]. The robot control system with an open architecture structure has become the main direction of research in the field of control systems today [2]. Modular design method has become an inevitable choice for open architecture system structure design, and the loose coupling between modules is an inevitable requirement to achieve openness, increasing the complexity of the system [3]. If only rely on program design to implement the system, it will be difficult to detect the defects of the system as early as possible and effectively improve, which will seriously affect the time and cost of system development [4]. In this case, the system needs to be effectively modeled, and the system is repeatedly simulated using the modeling tool to dynamically and truly reflect the logical structure of the system and perform performance analysis andimprovement [5].
Many research programs on open architecture robot control systems have been carried out at home and abroad. Wang et al. designed a robot motion control system [6]. The hierarchical control method and modular structure software design are adopted, the system has a good openness and scalability. Information processing speed of the system is fast and dynamic response time is shorter. However, the fault-tolerant performance of the entire control system is reduced, which will lead to a reduction in the accuracy of motion control.
Yin reported a Delta robot control system based on the Sysmac automation platform [7]. The NJ series robot controller and the high-speed network EtherCAT are utilized to unify the robot’s motion control and the peripheral movement’s logic control, and positional deviation of the grasping object is judged by the vision system to realize the positioning control. The robot controlled by this system has good flexibility, but the positioning accuracy is low.
In addition, a modular electropneumatic industrial robot system based on the design ideas of electropneumatic technology and modular combination was came up with [8]. This system has the characteristic of high stability, but the control program development process is more complicated and operation stability is poor.
Moreover, Zhang et al. designed the robot control system based on the real-time expansion system (RTX) of the Window operating system [9]. A modular approach and a single IPC are utilized to design the human-machine interface and various functional modules based on VC software. The control stability of this system is superior, but the control accuracy of robots of which operational tasks always changes is relatively general.
In response to the above problems, an open architecture robot control system was developed, and theoretical knowledge of robot kinematics and trajectory planning were studied. The main tasks include:
The D-H modeling method is utilized to establish a kinematics model of an open architecture robot, and carry out forward and inverse kinematic analysis.
Trajectory planning for open architecture robots is studied in-depth.
Based on hardware and software, an open architecture robot control system based on PMAC is designed.
The petri net model of open architecture robot control system based on PMAC is constructed.
The control system functions and performance are verified by experiments.
Material and methods
Robot kinematics and calibration technology
A suitable modeling method is used to establish a kinematics model of the robot and kinematics equations are obtained. The kinematics equation is the basis for the analysis of forward kinematics and inverse kinematics. The forward kinematics analysis refers to the process of solving the pose of end effector when each joint variable of the robot is known. The inverse kinematics analysis refers to the process of solving each joint variable of the robot by when the pose of end effector is known. In robot control, kinematic analysis is a very important part and basis of trajectory planning. The D-H modeling method establishes a connecting rod coordinate system on each rod to describe the relationship between connecting rods [10].
Robot kinematics analysis
The main role of connecting rods is to maintain the relative relationship between the front and the end of the joint axis, indicated by the connecting rod length a i and the connecting rod rotation angle α i . The connecting rod length a i is the normal length of the joint axes i and i + 1; the connecting rod rotation angle α i is the angle between the joint axes i and i + 1 in a plane perpendicular to a i .
In the front-to-end structure of connecting rods of a robot, it is necessary to describe the relationship between connecting rods. The relationship between two adjacent connecting rods can be described by the connecting rod offset d i and the joint angle θ i . d i is the distance between the intersection points of two common normal lines a i and ai-1 on the i axis, and θ i is the angle between a i and ai-1. a i , α i , d i , θ i can be used to describe each connecting rod of the robot completely.
In general, for rotary joints, θ
i
is the joint variable, and the other three connecting rod parameters are constants; for moving joints, d
i
is the joint variable, and the other three connecting rod parameters are fixed. Assuming that the transformation relationship between two adjacent connecting rod coordinate systems has been obtained, the coordinate transformation of each connecting rod can be combined by the product to obtain the overall transformation matrix of the robot. For a robot with n joints, the pose of the coordinate system {n} fixed to the end effector relative to the reference coordinate system {0} is:
The above equation is also the kinematics equation of the robot. It establishes a functional relationship between the robot’s end pose and each joint variable. According to the D-H method, a coordinate system is fixed on each connecting rod of the robot. θ1, θ2, d3, and θ4 represent joint variables, and L1 and L2 respectively represent the lengths of the robot’s upper arm and forearm. The pose matrix of the robot end effector can be obtained from the transformation matrix of the adjacent connecting rods coordinate system and the D-H parameter:
The above equation establishes the functional relationship between the robot end pose and four joint variables θ1, θ2, d3, and θ4. When given the specific values of four joint variables of the robot, the kinematics equation can be used to obtain the end effector pose 0T4, the process of which is called forward kinematic analysis [11].
If the pose 0T4 of the robot end effector is known, by substituting it in the kinematics equation, each joint variable can be solved. This solving process is called inverse kinematics analysis [12], using 0T1’s inverse matrix to multiply both sides of the kinematics equation:
By solving the joint variables θ1, θ2, θ3 and θ4, all joint variables of the robot corresponding to the end pose can be obtained.
Assuming that position of the end point of the robot in the measurement coordinate system {C} is
Where pC,k+1 is the actual distance between two points k and k + 1 in the space of the measured end point p C , pC,k is the command distance of the point, and pB,k+1 is the actual distance between the point pB,k+1 and the two points k and k + 1 in the space. pB,k indicates the command distance of this measured point. Let dp be the position deviation vector of the point in the robot reference coordinate system.
The relationship between the distance error and position error between two points is:
The D-H model has singularity when the adjacent joint axes are parallel. The MD-H modeling method is chosen to build the kinematics model of the robot. The model adds a rotation item around the y axis based on the DH model, that is torsion angle β i . The torsion angle β1, β2 ≠ 0 can be obtained through the structure of the SCARA robot, and A i denotes the homogeneous transformation matrix of two adjacent connecting rods coordinate system.
A tool coordinate system {T} parallel to the coordinate system of the fourth joint is established. The homogeneous transformation matrix which is equal to the coordinate system of the fourth joint is:
In the equation, t
x
, t
y
, and t
z
represent the coordinates of the origin of {T} in the fourth joint coordinate system. Assuming that the measured point of the end coincides with the origin of the tool coordinate system {T}, the pose of the measured point in the robot coordinate system is:
The pose error of the measured point of the end is recursively derived from the joint errors, as shown in the following equation:
Among them,
After completing the trajectory planning using the Cartesian space trajectory planning algorithm [13], the displacement of each joint of the robot in each interpolation period is calculated through interpolation, and the result is converted into a pulse output to control the robot to follow the trajectory movement. According to the requirements of the robot’s motion accuracy, the spatial straight lines and spatial arcs are segmented to obtain the pose node sequence in Cartesian space.
Two points determine a straight line in space. Let the end effector of the robot move from point P A to point P B in a straight line.
The position of point P A is (x A , y A , z A ), the position angle of RPY transformation is (α B , α B , α B ), the coordinate of point P B is (x B , y B , z B ), and the position angle of RPY transform is (α B , β B , λ B ).
Assuming that the distance between two points is L, and the running speed is v, which is not greater than d. d is determined according to the robot’s task accuracy requirements.
Then:
The number of segments can be obtained by the distance between two intermediate points:
The distance d r = L/N between two intermediate points is corrected. Then, the increments of position and attitude angle can be found, and the pose node sequence T i can be obtained. The pose sequence can be solved by inverse kinematics to obtain the joint position sequence.
The running time of two adjacent dividing points is t = d r /v, each joint must move to the next point of the joint position sequence in time t. Thus, the target speed of each joint can be calculated.
In the robot control system, a circular arc is specified with three circumferential points. The starting point of the arc is p1, the middle point is p2 and the end point is p3. If these three points are not on the same line, there must be a section of arc passing through these three points. The method of spatial arc segmentation is as follows:
The equation for the plane M determined by p1 (x1, y1, z1), p2 (x2, y2, z2) and p3 (x3, y3, z3) when the center point p0 (x0, y0, z0) and the radius r of the arc is given is:
Similar to the calculation principle of the plane M, three plane equations, M, T, and S are combined. The elimination method can be used to find the center p0 (x0, y0, z0) of the circle and convert the coordinate system [14–17].
Through the above steps, the position sequence on the arc can be obtained. The pose does not require coordinate conversion and can be split directly. The running time of two adjacent pose points is t = d r /v, each joint must move to the next point of the joint position sequence in time t, and the target speed of each joint can be calculated.
The number of axes of the robot is generally more than three, and the straight path segment in the joint space is a straight line in a broad sense. Let the displacement of each joint be L
i
, the speed be v
i
, and the acceleration be a
i
, then, the resultant displacement L, the resultant speed v, and the resultant acceleration a are:
Let the allowable maximum speed and maximum acceleration of each joint axis of the robot as vmax and amax, respectively. In order to ensure that the resultant speed (acceleration) does not exceed their limits on the components of each axis, the minimum value of the maximum speed (acceleration) of each axis is selected as the maximum resultant speed(acceleration).
Where vmax is the maximum allowable resultant speed and amax is the maximum allowable resultant acceleration. In the segmentation of space lines and arcs, the required time for motion between the two segmentation points and the target velocity of each joint have been obtained. Each joint needs to move to the next point of the joint position sequence in time t. Target speed of each joint can be calculated. If the joint resultant target speed is F, then:
For a given path, its resultant displacement L, maximum allowable resultant velocity vmax, and acceleration amax can be determined. When the starting and ending speeds of a certain path are determined, the motion is basically determined.
A dual-microcomputer hierarchical control method and modular structure design are adopted. The control system has good openness and extensibility and can be adapted to different types of robots or robotic automatic production lines.
Hardware composition of robot control system
The open architecture robot system motion controller takes the central logic control unit as the core, the sensor as the signal sensitive element, and the motor power device and the execution unit as the control objects. Based on the above analysis and the basic design ideas of the open architecture robot controller, a robot control system as shown in Fig. 1 is designed.
Overall structure.
PMAC is an open architecture programmable multi-axis motion controller developed by Delta Tau in the United States following the open architecture system standard. It is a multi-functional motion control product with motion axis control, PLC control, and data acquisition, as shown in Fig. 2.
PMAC motion control card.
Technical parameters
In the designed system, the motor encoder and driver are connected together by the CN SIG connector, and the CN 1/F connector of the driver is connected with the PMAC, as shown in Fig. 3. During the entire connection process, special attention should be paid to the use of twisted-pair shielded cables in the selection of signal transmission lines for the encoder, which has a great influence on the stability, anti-jamming capability and signal transmission of the entire system.
Wiring diagram.
Figure 4 is a schematic block diagram of the structure when a single joint is operated in a closed loop manner. The computer sends the target position to the motion controller in absolute or relative coordinates, and sends the motion start command. After the controller receives the motion start command, it calculates the motion trajectory according to the current acceleration and speed settings, and gives the ideal position coordinate should be reached at each moment.
A block diagram of the work of a single loop.
The PID control section is responsible for tracking control of the actual position to the ideal position, the tracking process continues until it reaches the target position, or is updated by the computer’s new position target and motion startcommand.
PMAC provides online instructions, motion program instructions, and PLC program instructions. The PMAC executes immediately after it receives the command and generates the specified action, changes the value of the variable or displays the required information, etc. Many other instructions can be used to write the motion program and the PLCprogram.
Communication between upper computer and PMAC
In the mechatronic system, the upper computer needs to exchange data with the motion control card. PMAC has its own high-speed CPU to handle real-time tasks to ensure the stability and reliability of the system, while users need a friendly man-machine interface to control and monitor the operation of the entire system. Programming generally need several steps, editing, compiling, linking, loading, and running. PMAC provides users with PComm32Pro. This dynamic link library completes the data exchange between the upper computer and the PMAC.
Software design for robot control system
The system software is designed with modular structures and is mainly used to implement module functions such as security check, parameter setting, teaching reproduction, kinematic analysis, motion trajectory planning, and system management.Figure 5 is the modular software architecture of the system. The PMAC communication driver library Pcomm32 provided by DeltaTau Company serves as a bridge between Windows and PMAC.

Control software design.
The teaching of the robot is to hand the action route information to the robot in a certain way; the reproduction of the robot is to reproduce the route or work just based on the previously recorded information. The robot’s route is taught and the operation sequence and position information of each joint are recorded in the form of a file, and then the reproduction function is completed by reading the already-recorded file.
Using the colored Petri net simulation tool CPN Tools to realize modeling of the open architecture robot control system based on PMAC. The top layer of the model fully embodies the hierarchical concept of the designed control system. The sub-modules of the hierarchy are introduced and explained in detail. The specific description is as follows:
CPN supports the hierarchical modeling of the system by introducing subnets. It can clearly reflect the structural relationship of the system and reflect the modular design concept of the system. CPN Tools uses alternative transitions and fusion libraries to connect subnets distributed at different levels. The entire model consists of several subnets (modules). The subnets interact with each other through well-defined interfaces. Introducing the concept of time can model the execution time of the process and provide the basis for optimizing the robot control system.
Two methods are commonly used to build a hierarchical model of CPN:
The bottom-top modeling method
In the bottom-top modeling method, the system’s functions are layered, and the sub-layer functions are analyzed and modeled. The substitution transition is used to represent each subnet, and substitution transitions form the top model of the model;
The top-bottom modeling method
The top-bottom modeling method is a relatively conventional hierarchical modeling method. It establishes the system’s comparatively simplified top-layer model, defines the overall picture of the system being modeled in a broad sense, and utilizes the substitution transitions in the top layer to associate each module to a more detailed subnet, which gradually refines the system, and finally completes the entire system modeling. The top-layer model of the control system is established, and the subnet structure of each top-layer model is established through the hierarchical technology.
Results
The purpose of modeling the system is mainly to verify the correctness of logical of the system and the impact of the design and configuration of the analysis system on the performance. In terms of system verification, CPN Tools introduce state space analysis tools. For performance analysis, CPN Tools provides Monitor monitoring mechanism for experiments. The industrial computer configuration of the PMAC-based open architecture robot intelligent control system is: CPU: Intel (R) Celeron (R) CPU E3300 @ 2.50GHz, memory is 4G, hard drive is 300G, and the experimental object is robot body with six degrees of freedom.
Joint acceleration performance
Set acceleration and actual acceleration of each axis motor
Set acceleration and actual acceleration of each axis motor
The single-axis control is performed for the robot, the acceleration from small to large accelerates the joint axis movement in sequence. According to the data in Table 2, the maximum acceleration of the S-axis is 450.25 r/s2, the maximum acceleration of the L-axis is 287.69 r/s2, the maximum acceleration of the U-axis is 396.58 r/s2, and the maximum acceleration of the R-axis is 388.36 r/s2. The measurement of these maximum acceleration values is obtained when only one axis moves and the other axes stay still. The maximum acceleration of each axis in the robot actually has a great relationship with the dynamic coupling between the axes.
Three path points A (788.59, 0.152, 788.25), B (853.25, 105.25, 860.25), C (766.58, 188.58, 788.58) are selected in the Cartesian space for the simulation experiment. It is required that the open architecture robot moves from point A to point C while passing the point B, the optional path is a straight line or an arc. The first three parameters of each path point represent the three-dimensional position on the Cartesian coordinate system, and the unit is millimeters (mm). The last three parameters represent the RPF attitude transformation angle in radians (rad). The interpolation period of Cartesian space trajectory planning is set to be 35 milliseconds (ms). The maximum positioning distance is 8 millimeters (mm), and the joint space planning interpolation period is 8 milliseconds (ms). The trajectory error plot for the straight line planning is shown in Fig. 6. The abscissa is the interpolation point sequence (the time interval between every two adjacent points is 35 milliseconds), and the ordinate is the error value (unit: mm):
Figure 6 quantitatively gives the trajectory error of the straight line planning, with the overall error close to zero. This is because the straight line planning is only the trajectory of the preliminary planning pose variable, and the trajectory smoothing problem is not taken into consideration. The final trajectory error needs to be given by the subsequent smoothing planning transformation.
Error diagram of straight line planning trajectory.
Based on the input data given above, the arc planning algorithm is called to perform arc planning, resulting in a series of position-time sequence, which is drew using the Matlab tool. Figure 7 is the error diagram of the arc planning theory. The abscissa is the interpolation point sequence (the time interval between every two adjacent points is 40 milliseconds), and the ordinate is the error value (unit: mm).
Error diagram of arc planning theory.
Docking errors
Docking errors
The average error obtained is: 0.6_Scm, and the maximum limit error is less than plus or minus 2 cm, which meets the requirements of the system. At the same time, the trajectory navigation control of the robot is verified. The actual test can realize the trajectory control of the omnidirectional mobile robot and realize the motion of omnidirectional mobile robot from the starting point to the end point following the required route.
Taking the development of an open architecture industrial robot control system as the research goal, the theoretical knowledge of robot kinematics and trajectory planning are studied. Using the “PC+ motion control card” as the hardware platform, a control program based on MFC is designed. And development of an open architecture industrial robot control system is completed. The main work completed is as follows:
The kinematics model of the SCARA robot was established using the D-H modeling method, and the forward kinematics and inverse kinematics analysis were performed. Using Robotics toolbox inMATLAB performed kinematic analysis verification.
In order to improve the robot’s absolute positioning accuracy, the robot kinematics calibration technology was studied, and the error model of the SCARA robot was established by introducing the distance error.
The trajectory planning of industrial robots was studied. The linear programming method on the basis of parabolic transition is used to complete the joint space trajectory planning and the corresponding interpolation algorithm is designed. In the Cartesian space planning, lines and arcs in the space are segmented according to the requirements of trajectory tracking accuracy, and the robot is controlled by transforming into the joint space using inverse kinematics method.
For the traditional speed control method, when dealing with a series of consecutive small line segments, problems such as overshoot and abnormal vibration are prone to occur. A velocity-forward planning algorithm independent of the number of axes was proposed.
A dual-microcomputer hierarchical control mode and modular structure design were adopted to meet the real-time requirements of robot control. The lower robot program, such as the robot motion program and the gripper PLC program, was prepared. PMAC completed coordinated control of six joints according to the user’s control requirements for each joint.
The Pcomm32Pro dynamic link library was used to realize the real-time communication between the upper computer and the lower computer. Based on the robot’s forward and inverse kinematic model and the trajectory interpolation algorithm, the modular control software of the robot system was developed, and the safety inspection, parameter setting, kinematic analysis, teaching reproduction and other functions were realized.
A hierarchical colored Petri net model of the prototype system was established using mainstream simulation tool CPN Tools of CPN. Through these experiments, the feasibility and advancement of the architecture and its implementation technology were effectively verified.
Footnotes
Acknowledgments
1. The National Natural Science Foundation of China (U1504615).
2. The Science and Technology Development Program of He’nan Province (172102210190).
