SUGISAKAMASANORI

Journal of Robotics, Networking and Artificial Life
Vol. 9(2); September (2022), pp. 183–186
ISSN (Online):2352-6386; ISSN (Print):2405-9021
https://alife-robotics.org/jrnal.html

Research Article

An EtherCAT
Application

Based

Delta

Robot

Synchronous

Control

Chung-Wen Hung1, Yu-Hsuan Tseng1, Guan-Yu Jiang1, Chau-Chung Song2

Department of Electrical Engineering, National Yunlin University of Science & Technology, 123 University Road, Section 3, Douliou, Yunlin 64002,Taiwan
2
Department of Aeronautical Engineering, National Formosa University, No.64, Wenhua Rd., Huwei Township, Yunlin County 632, Taiwan
1

A R T I C L E I NF O
Article History
Received 26 November
2021 Accepted 12 July 2022

Keywords
Delta robot
Kinematics
Path planning

ABSTRACTThe delta robot synchronous control based on the Ethernet Control Automation Technology(EtherCAT) protocol for painting application is proposed in this paper. Personal Computer (PC)is used as master and the delta robot motor drivers are used as slaves in this work. The Master
sends command to slave base on the motion control profile CAN in Automation 402(CiA402).
Subsequently, the program in C# perform the user’s interface and EtherCAT communication.
And the system is not only for easy use, but also for quickly high-precision. A complex painting
application is proposed to show this system workable.
© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

EtherCAT

1.

Introduction

EtherCAT control is accurate and synchronize.

In recent years, the problem of labor shortage isgetting worse. Recent studies[1,2] proposed to reduce
the labor costs, improve production efficiency, andstabilize production quality, the company has
successively introduced automation technology or
replace manpower with a robotic arm.
Jung and Lim[3] and Lin et al.[4] present that
controlling each axis of the robotic arm needs to perform
coordinate movement tasks at the same time, so accuracy
and synchronization of control are important for therobotic arm. To achieve the multi-axis motors
synchronous control, the system stability and data update
times (cycle time) are also considered. In this paper, theindustrial communication EtherCAT is selected as thecommunication protocol between the robotic arm and thePC, which has the advantages of processing on the fly
and good synchronization[5,6,7,8,9].
Zhang et al.[10] and Lim et al.[11] proposed thatusing EtherCAT high speed communication to improveaccuracy and to reach higher control frequency between
the motor drivers and master. Cheng and Wang[12] used
EtherCAT to communicate with multi-axis motors. The
results show that EtherCAT solves the problem oftransmitting large amounts of data in real-time andrealizes high-precision synchronous control with highefficiency algorithms. Wang et al.[13] compared
EtherCAT and other common industrial protocols on
multi-axis motor control. The result shows that2.

Kinematics of the Delta Robot

The motion trajectory of the delta robot is basedon a parallelogram as a track, moving on the X-axis, Yaxis, or Z-axis, and can rotate around the vertical axis of
the platform center.
For the purpose of planning the trajectory in joint
space, we use inverse kinematics to convert the current
coordinates to the angle of each motor. To measure thefollowing error in the cartesian space, we substitute theangle of each motor into the forward kinematics to getcurrent coordinates. Fig.1 and Fig.2 are the kinematics
analysis diagrams of the delta robot.

Fig.1 Delta robot FK diagram[15]Fig.2 Delta robot IK diagram [15]If the rotation angle of each axis motor (𝜃𝜃1 , 𝜃𝜃2 , 𝜃𝜃3 )is known, we can use vector loop equations proposed byrecent studies[14,15] to derive the forward kinematics
and calculate the coordinate vector (𝐴𝐴1𝑣𝑣′ , 𝐴𝐴2𝑣𝑣′ , 𝐴𝐴3𝑣𝑣′ ).
Finally, substitute the coordinate vectors into the sphereCorresponding author’s Email: wenhung@yuntech.edu.tw183

equations and quadratic formula to derive the final target
coordinates P(x, y, z) of the end effector.
−√𝟑𝟑−√𝟑𝟑𝟎𝟎design steps are as follows:（1） Store the path coordinate in the array, and thendefine the thresholds of adjacent points tocomplete the establishment of the problem model.

(1)

𝑨𝑨𝟏𝟏𝟏𝟏′ = � 𝟑𝟑 𝒔𝒔𝑷𝑷 + 𝟔𝟔 𝒔𝒔𝑩𝑩 − 𝑳𝑳 𝐜𝐜𝐜𝐜𝐜𝐜 𝜽𝜽𝟏𝟏 �−𝑳𝑳 𝐬𝐬𝐬𝐬𝐬𝐬 𝜽𝜽𝟏𝟏
√𝟑𝟑 √𝟑𝟑√𝟑𝟑𝝅𝝅−√𝟑𝟑 √𝟑𝟑√𝟑𝟑𝝅𝝅（2） Divide the problem into n.

⎡ 𝟐𝟐 � 𝟔𝟔 𝒔𝒔𝑩𝑩 + 𝑳𝑳 𝐜𝐜𝐜𝐜𝐜𝐜 𝜽𝜽𝟐𝟐 � − 𝟑𝟑 𝒔𝒔𝑷𝑷 𝐜𝐜𝐜𝐜𝐜𝐜 𝟔𝟔 ⎤⎥𝝅𝝅√𝟑𝟑𝑨𝑨𝟐𝟐𝟐𝟐′ = ⎢⎢ 𝟏𝟏 √𝟑𝟑
� 𝒔𝒔 + 𝑳𝑳 𝐜𝐜𝐜𝐜𝐜𝐜 𝜽𝜽𝟐𝟐 � − 𝒔𝒔𝑷𝑷 𝐬𝐬𝐬𝐬𝐬𝐬 ⎥𝟑𝟑𝟔𝟔 ⎥⎢ 𝟐𝟐 𝟔𝟔 𝑩𝑩−𝑳𝑳 𝐬𝐬𝐬𝐬𝐬𝐬 𝜽𝜽𝟐𝟐⎦⎣（3） Define the purpose (Find the coordinates nearestto the target).

(2)⎡ 𝟐𝟐 ( 𝟔𝟔 𝒔𝒔𝑩𝑩 + 𝑳𝑳 𝐜𝐜𝐜𝐜𝐜𝐜 𝜽𝜽𝟑𝟑 ) + 𝟑𝟑 𝒔𝒔𝑷𝑷 𝐜𝐜𝐜𝐜𝐜𝐜 𝟔𝟔 ⎤⎥𝝅𝝅
√𝟑𝟑
𝑨𝑨𝟑𝟑𝟑𝟑′ = ⎢⎢ 𝟏𝟏 √𝟑𝟑( 𝒔𝒔 + 𝑳𝑳 𝐜𝐜𝐜𝐜𝐜𝐜 𝜽𝜽𝟑𝟑 ) − 𝒔𝒔𝑷𝑷 𝐬𝐬𝐬𝐬𝐬𝐬 ⎥𝟑𝟑𝟔𝟔 ⎥⎢ 𝟐𝟐 𝟔𝟔 𝑩𝑩−𝑳𝑳 𝐬𝐬𝐬𝐬𝐬𝐬 𝜽𝜽𝟑𝟑⎦⎣（4） Find the best solution to n small problems basedon the greedy strategy.

(3)（5） Combine the best solutions of n small problems
to get the overall best solution.

If the final target coordinates P(x, y, z) is known,
we can derive use vector loop equations proposed byrecent studies [14,15] to calculate the rotation angle ofeach axis motor (𝜽𝜽𝟏𝟏 , 𝜽𝜽𝟐𝟐 , 𝜽𝜽𝟑𝟑 ) via the inverse kinematics.
The relevant equation is such as Eq.(4)-Eq.(6).
𝜽𝜽𝟏𝟏 = 𝟐𝟐 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏 (𝜽𝜽𝟐𝟐 = 𝟐𝟐 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏 (−𝒛𝒛±�𝟒𝟒𝒛𝒛𝟐𝟐 −𝟒𝟒𝑭𝑭𝟏𝟏 (𝑭𝑭𝟏𝟏 −𝒚𝒚−𝒂𝒂)𝟐𝟐𝟐𝟐±�𝟏𝟏𝟏𝟏𝟏𝟏𝟐𝟐 −𝟒𝟒𝑭𝑭𝟐𝟐 (𝑭𝑭𝟐𝟐 +𝟐𝟐�𝟑𝟑(𝒙𝒙+𝒃𝒃)+𝒚𝒚+𝒄𝒄)𝜽𝜽𝟑𝟑 = 𝟐𝟐 𝒕𝒕𝒕𝒕𝒕𝒕−𝟏𝟏 (where:(5))

𝑭𝑭𝟐𝟐𝟐𝟐𝟐𝟐±�𝟏𝟏𝟏𝟏𝟏𝟏𝟐𝟐−𝟒𝟒𝑭𝑭𝟑𝟑(𝑭𝑭𝟑𝟑 −𝟐𝟐�𝟑𝟑(𝒙𝒙−𝒃𝒃)−𝒚𝒚−𝒄𝒄)
𝑭𝑭𝟑𝟑𝟏𝟏(6))(𝒙𝒙𝟐𝟐 + 𝒚𝒚𝟐𝟐 + 𝒛𝒛𝟐𝟐 + 𝒂𝒂𝟐𝟐 + 𝑳𝑳𝟐𝟐 + 𝟐𝟐𝟐𝟐𝟐𝟐 − 𝒍𝒍𝟐𝟐 )𝟏𝟏
𝑭𝑭𝟐𝟐 = − ��𝟑𝟑(𝒙𝒙 + 𝒃𝒃) + 𝒚𝒚 + 𝒄𝒄� − (𝒙𝒙𝟐𝟐 + 𝒚𝒚𝟐𝟐𝑳𝑳+𝒛𝒛𝟐𝟐 + 𝒃𝒃𝟐𝟐 + 𝒄𝒄𝟐𝟐 + 𝑳𝑳𝟐𝟐 + 𝟐𝟐(𝒙𝒙𝒙𝒙 + 𝒚𝒚𝒚𝒚) − 𝒍𝒍𝟐𝟐 )𝑭𝑭𝟏𝟏 = (𝒚𝒚 + 𝒂𝒂) −(7)𝟐𝟐𝟐𝟐

𝟏𝟏𝑭𝑭𝟑𝟑 = ��𝟑𝟑(𝒙𝒙 − 𝒃𝒃) − 𝒚𝒚 − 𝒄𝒄� − (𝒙𝒙𝟐𝟐 + 𝒚𝒚𝟐𝟐 +𝟐𝟐𝟐𝟐−√𝟑𝟑𝒔𝒔 ;𝟔𝟔 𝑷𝑷

𝐛𝐛 =𝑳𝑳𝟐𝟐𝒛𝒛 + 𝒃𝒃 + 𝒄𝒄 + 𝑳𝑳𝟐𝟐 − 𝟐𝟐(𝒙𝒙𝒙𝒙 − 𝒚𝒚𝒚𝒚) − 𝒍𝒍𝟐𝟐 )System Architecture

The system architecture is showed in Fig.3 and thephoto of actual configuration diagrams developed in thispaper is presented in Fig.4. In the system we proposed,
Windows operating system is used to be the computing
platform to solve the most of the task in our experiment.
The Automation Device Specification(ADS)
communication library provided by Beckhoff is used toexchange data between EtherCAT master software,
TwinCAT, and the proposed user's human-machineinterface based on Visual Studio C#, then the TwinCAT,will transmit the information with salvers, the threeaxis’s motor driver of delta-robot.

(4))

𝑭𝑭𝟏𝟏4.

(8)(9)

The parameters are defined as follows:
𝐚𝐚 =

name

meaning

𝑠𝑠𝐵𝐵

base equilateral triangle side

𝑙𝑙𝑠𝑠𝑃𝑃3.

𝒔𝒔𝒑𝒑 𝟏𝟏− 𝒔𝒔 ;𝟐𝟐 𝟒𝟒 𝑩𝑩

𝐿𝐿

𝐜𝐜 =

√𝟑𝟑
√𝟑𝟑
𝒔𝒔 −𝒔𝒔 ;𝟔𝟔 𝑷𝑷 𝟏𝟏𝟏𝟏 𝑩𝑩

Fig.3 System architecture diagram

value (mm)865.9

platform equilateral triangle side

118.6

upper legs length

336.1

lower legs parallelogram length1022.4

Path Planning

In order to complete the path planning of the image,first, upload the image from the user and convert thepicture to a binary image. Then analyze and sort thecoordinate pixels of the neighboring to connect them aspaths. Finally, by setting the maximum moving distanceof two points in cartesian space to get the velocity
information.
During the drawing process, the trajectory plannedby adjacent coordinate make the robot moves
continuously and ensure the accuracy of the result. In
this paper, greedy algorithm is used to solve the adjacentcoordinate problem.
The greedy algorithm is a fast-iterative method tofind successive regional optimal solutions. Each regional
optimal solution must be proved the final problem obtain
the overall optimal solution and can be reduced theproblem range to get the overall optimal solution[16], theFig.4 Actual configuration diagram

The CANopen over EtherCAT (CoE) is thestandard communication protocol in EtherCAT system,and the CiA402 sub-protocol of the CANopen is
proposed for motion controller. The proposed softwaresystem in this paper also follows the CiA402 protocol tocontrol the robot.
For the purpose of control the robotic arm runningaccording to the trajectory planned by their motion andcontrol algorithm, the Cyclic Sync Position mode (CSPmode) and Cyclic Sync Velocity mode (CSV mode) inthe CiA402 sub-protocol are more suitable for multi-axis
synchronous control.
To accomplish the multi-axis synchronization
control, we choose 4ms to be the communication cycle
time of the CSP and CSV mode. The following will184

introduce the control methods based on these two control
modes in this paper:

Tab.2 Different control methods and motor moving distance in thespecified path of the final coordinate error（2） Set CSP mode as the operation mode object of thedriver, set the rotation distance of the motor to theTarget Position object on the driver. Thenfollowing error will be calculated in real-time,and set to velocity offset object value to improve
velocity references.

（4） Set CSV mode as the operation mode object of thedriver, convert the rotation distance of the motor
to speed, and set it to the Target Velocity object
on the driver. Then following error will becalculated in real-time, and set it to the velocity
offset object value to compensate error.
（5） Set CSV mode as the operation mode object of thedriver, convert the rotation distance of the motor
to speed, and set it to the Target Velocity object
on the driver. Finally, the following error whichcalculated in real-time, will be compensated byproportional-derivative controller (PD controller)
shown in Fig.5.

CSP mode

0.005

8.554E-02

8.872E-02

9.424E-02

3.952E-02

4.009E-02

0.01

1.601E-01

1.656E-01

1.882E-01

7.410E-02

7.502E-02

0.1

1.673E+00

1.705E+00

1.731E+00

7.162E-01

5.077E-01

Maximummoving
distance ofmotor(mm)`

CSV mode

8.689E-02

8.689E-02

9.540E-02

3.880E-02

4.089E-02

0.01

1.587E-01

1.620E-01

1.912E-01

7.260E-02

7.693E-020.11.770E+00

1.770E+00

1.867E+00

7.116E-01

5.261E-01

Original image(b) Drawing path

Fig.7
The drawing resultin the CSP mode

Fig.8
The drawing resultin the CSV modewith PD controller

Drawing path

CSP mode

CSV mode withPD controller

To ensure the accuracy of the painting, it isnecessary to compensate the error. In this paper, wechoose CSV mode with PD controller to be our control
method. Error distance will be computed in real-time,and convert it to velocity. Then the PD controller is used
to speed up or slow down to complete compensation. Wetake Fig.6 as the example. 0.1mm is used as themaximum moving distance to compare the two results ofsimple CSP mode and CSV mode with PD control. Fig.7and Fig.8 are the drawing results. Tab.3 shows theRMSE of two control mode. According the result ofRMSE, it is easy to find that the CSV mode with PD
controller is a better choice. These two methods with themaximum moving distance 0.1mm are also used to draw
other figures, and the results are shown in Tab.4.

(10)

CSP mode,
compensate
error toVelocity
Offset

0.005

RMSE(mm)
9.1214E-01
4.3303E-01
Tab.4 The drawing result in the CSP mode and CSV mode with PD
controller to compensate error

6.

Tab.1 Different control methods and motor moving distance in thespecified path of the RMSE
ControlMethod

CSV modewith PDcontroller tocompensate
error

Tab.3 The RMSE of five control method with a maximum movement
distance of 0.1mm
CSP mode
CSV mode with PD controller

To discuss the method proposed in this paper, we
compared the accuracy with different maximum
movement distances (such as: 0.1mm, 0.01mm, and0.005mm) with each method.
The root-mean-square error (RMSE) can be asimple standard to make comparison of the data in
different numerical range. The equation is as Eq.(10) andthe correlation results are shown in Tab.1 to Tab.2.
𝒏𝒏CSV mode,
compensateerror toVelocity
OffsetFig.6 The command drawing path

System Testing Result𝟐𝟐∑𝒏𝒏 (𝒚𝒚�−𝒚𝒚𝒕𝒕𝒕𝒕 )CSV mode(a) Original image

Fig.5 PD controller system block diagram

𝑹𝑹𝑹𝑹𝑹𝑹𝑹𝑹 = � 𝒕𝒕=𝟏𝟏

CSP mode,
compensate
error toVelocity
Offset

The more distance we move means the more angle
that motor rotate, will cause bigger moving error. To
discuss the relationship between moving distance anderror, there are three moving distance commands aretested, they are 0.005, 0.01 and 0.1 mm. It can beconcluded from Tab.1 and Tab.2. The better choice
between two kinds of CSP method is the simple CSPcontrol. On the other hand, CSV mode with PD control
is the better one in CSV control.

（3） Set CSV mode as the operation mode object of thedriver, convert the rotation distance of the motor
to speed, and set it to the Target Velocity object
on the driver.

5.

CSP mode

Control
MethodMaximummovingdistance ofmotor(mm)`（1） Set CSP mode as the operation mode object of thedriver, set the rotation distance of the motor to theTarget Position object on the driver.

CSV mode,
compensate
error toVelocityOffset

CSV modewith PD
controller tocompensateerror

185

Conclusion

The proposed image processing methods convert
the image to a binary image, analyze and sort thecoordinate pixels of the neighboring to connect them aspath. The experimental results show that the analyzed
image command coordinate points are enough to present
the original image information.
Using CSP mode or CSV mode as the control
method, it is necessary to adjust the proportionalcoefficient and derivative coefficient of the motor
drivers to prove the accuracy. After adjustment in theactual proposed system, the motion error was notreduced due to incorrect adjustment methods ormechanical problems. In order to perfect remake humanpaintings, the CSV mode with PD control is used. Thismethod calculates the following error distance in realtime. The following error distance is defined as thedistance between the command and actual position of theend effector in motion control. Convert the following
error distance to velocity, then the PD controller is used
to improve the velocity to complete compensation.
Experiments have confirmed that the error in theCSV mode with PD control is less than 0.5mm which isthe smallest error compared with other methods.
Moreover, this control method compensates error in realtime and precisely control the delta robot to completelyremake paintings.

[13]

[14]
[15]
[16]

International Conference on Information Science andTechnology, June 2012
L. Wang, H. Jia, J. Qi, and B. Fang, “The construction ofsoft servo networked motion control system based onethercat,” In International Conference on Environmental
Science and Information Application Technology (ESIAT),
July 2010
L. Zhang and Y. Song “Optimal design of the Delta robot
based on dynamics” 2011 IEEE International Conferenceon Robotics and Automation, May 2011L. Williams II, Ph. D, “The Delta Parallel Robot:Kinematics Solutions Robert” Mechanical Engineering,
Ohio University, October 2016
J. D. Gorman, “The application of optimization algorithms
in antenna array beampattern synthesis” 2015 26th Irish
Signals and Systems Conference (ISSC), July 2015

Authors Introduction
Prof. Chung-Wen Hung
Chung-Wen Hung received the Ph.D.
degrees in Electrical Engineering from
National Taiwan University in 2006.
Currently he is a Professor in National
Yunlin University of Science &Technology.
His research interests include the IoT, IIoT,and AI application.

References
A. Nayyar and A. Kumar, “A Roadmap to Industry 4.0:
Smart Production, Sharp Business and SustainableDevelopment,” Springer, Cham,2020, pp 157-169[2] H. A. F. Almurib, H. F. Qrimli and N. Kumar, “A review ofapplication industrial robotic design,” 2011 Ninth
International Conference on ICT and Knowledge
Engineering, February 2012[3] I. K. Jung and S. Lim “An EtherCAT based real-time
centralized soft robot motion controller” 2012 International
Symposium on Instrumentation & Measurement, Sensor
Network and Automation (IMSNA), October 2012[4]
C. Y. Lin, T. T. Mac and L. W. Chuang, “Real-time artistic
human face portrait by humanoid robot,” 2009 IEEE Control
Applications, (CCA) & Intelligent Control, (ISIC), October
2009[5]
J. H. Kim, J. W. Jeon, J. H. Lee and B. S. Yeom, “Migrationfrom RS-485 to EtherCAT for closed loop step motor drive,”2014 IEEE International Conference on Industrial
Technology, September 2014
[6]
G. Shuai, S. Zhuoyuan, W. Zhiyong and M. M. Islam,“Beckhoff based arm control system design for Elderly
Assisting Robot,” 2011 IEEE International Conference onAutomation and Logistics (ICAL), Chongqing, 2011
[7]
G. Zhang, F. Ni, Z. Li and H. Liu, “A Control System
Design for 7-DoF Light-weight Robot based on EtherCATBus,” 2018 IEEE International Conference on
Mechatronics and Automation (ICMA), Changchun, 2018,
pp. 2169-2174.
[8]
S. Lim, H. S. Jung and I. K. Jung, “Real time PC based
control of parallel robot,” Intelligent Robotics ResearchCenter, Korea Electronics Technology Institute, Bucheonsi, South of Korea, April 2015
[9]
G. Cheng and X. Wang, “Design of tri-axial motion servo
control systems based on EtherCAT,” 2012 IEEE
International Conference on Information Science andTechnology, June 2012[10] G. Zhang, F. Ni, Z. Li and H. Liu, “A Control System
Design for 7-DoF Light-weight Robot based on EtherCATBus,” 2018 IEEE International Conference on
Mechatronics and Automation (ICMA), Changchun, 2018,
pp. 2169-2174.
[11] S. Lim, H. S. Jung and I. K. Jung, “Real time PC based
control of parallel robot,” Intelligent Robotics ResearchCenter, Korea Electronics Technology Institute, Bucheonsi, South of Korea, April 2015[12] G. Cheng and X. Wang, “Design of tri-axial motion servo
control systems based on EtherCAT,” 2012 IEEE
[1]Prof. Chau-Chung SongHe received the M.S. degree in Control
Engineering in 1994 and the PhD degree inElectrical and Control Engineering fromNational Chiao Tung University in 2001 atTaiwan. He is currently a distinguishedprofessor in Department of AeronauticalEngineering, National Formosa University.
His research interests include the analysis and control ofnonlinear systems the integration application ofnetworking information system, the UAV technology, andthe cloud network and Cyber-Physical system (CPS).
Ms. Yu-Hsuan Tseng
She is a graduate student at department ofElectrical Engineering, National Yunlin
University of Science & Technology.

Mr. Guan-Yu Jiang
He is a graduate student at department ofElectrical Engineering, National Yunlin
University of Science & Technology.

186