The Architecture, Methodology and Implementation of STEP-NC Compliant Closed-Loop Robot Machining System

Industrial robots are gradually being employed in machining processes, particularly the cutting process, owing to their flexibility, mobility, and economic efficiency. However, it is difficult to make the manufacturing process intelligent owing to the complexity of robot machining process information handling and programming. In this paper, the architecture of a STEP-NC compliant closed-loop robot machining system was designed, including its function model and information stream. A methodology based on STEP-NC was established to enable the analysis of high-level information directly and automatically generating robot program according to the actual machining conditions. The STEP-NC Application Activity Model (AAM) and Application Reference Model (ARM) of closed-loop robot machining system is built to integrate the machining process data, monitoring and inspection data, mechanical equipment data, machining status data and inspection result data within a unified data flow, making it possible to realize intelligent manufacturing and adaptively adjusting the robot machining process. The proposed closed-loop robot machining system was implemented based on an open STEP-NC interpreter that interprets the high-level information in STEP-NC directly to reduce machining robot programming time. An industrial camera was integrated with the robot for rawpiece positioning, then the STEP-NC interpreter can generate robot path rapidly according to the parameters of manufacturing features and position of rawpiece. The STEP-NC interpreter can generate a robot control program or communicate with a software controller using an application program interface, so it can be integrated with both existing industrial robot controllers and future open robot controllers. Finally, case studies are conducted for the functional verification of the proposed STEP-NC compliant closed-loop robot machining system.


21
Industrial robots are widely used in welding, loading, dis-22 charge, conveying, and painting. They have also been used 23 in machining processes such as grinding, polishing, drilling, 24 milling, and additive manufacturing in recent years. Unlike 25 machining tools, industrial robots are more flexible, cost- 26 effective, and can be installed on mobile platform [1]. 27 The associate editor coordinating the review of this manuscript and approving it for publication was Tao Liu . Therefore, it is more suitable for machining large-scale and 28 complex-shape workpieces in single and small batch pro-29 duction. However, low machining precision and complexity 30 of robot programming are the main problems to be solved 31 in robot machining [2]. Firstly, the relative position from 32 part to machining robot is changeable, especially in mobile 33 machining. In that case, inspection, calibration, and regen-34 eration of robot program are necessary to reduce position- 35 ing error when a workpiece is newly installed [3]. Sec- 36 ondly, structure deformation and cutting chatter caused by 37 and developed a STEP-NC interpreter to extract informa-92 tion of machining, inspection, and feedback [12]. They also 93 proposed a STEP-NC data model for on-machine dimen-94 sional measurement and system structure for integrated pro-95 cess planning and feedback [13]. Wosnik et al. presented a 96 structured STEP-NC model for describing machining pro-97 cess data and built a process chain framework to opti-98 mize machining process [14]. Ridwan et al. proposed an 99 architecture for machining condition monitoring based on 100 STEP-NC in order to optimize feed-rate of CNC machin-101 ing [15]. Sivakumar et al. proposed a methodology for the 102 inspection and feedback of cylindrical parts based on geo-103 metrical data based on STEP standard to integrate various 104 stages of product lifecycle [16]. The architecture and imple-105 mentation of closed-loop machining system for CNC machin-106 ing is proposed by the first author of this paper to apply 107 on-machine inspection and process control based on an open 108 STEP-NC controller [17]. Lei et al. built a STEP-NC data 109 model for aligning and laser tracker-measuring process to 110 realize closed-loop machining of large-scale component [18]. 111 Danjou et al. proposed a closed-loop manufacturing approach 112 focus on machining knowledge feedback based on STEP-113 NC, which used ontology method to extract and capitalize 114 machining data for guiding future process planning [19], [20]. 115 There is no CLM system for robot machining at present. 116 STEP-NC has been used in industrial robot and robot 117 machining mainly on programming. Solvang et al. built 118 a CAM system, which generate robot machining program 119 based on STEP-NC process information [21]. Xiao et al. 120 defined a STEP-compliant Industrial Robot Data Model 121 (IRDM) for representing information of robot such as kine-122 matic, geometric and controller and being used in robot 123 off-line programming system [22]. Minango and Ferreira 124 proposed a method for post-process of milling robot con-125 sists of tool paths generation and kinematic algorithm [23]. 126 Zivanovic et al. developed a RoboSTEP-NC module to gen-127 erate G codes for robot machining based on STEP-NC file 128 [24]. The robot controller system used in their research is 129 based on LinuxCNC platform, which can interpret G codes 130 directly [25]. Toqiuca et al. built a STEP-NC compliant robot 131 machining platform using PTC Creo, STEP-NC Machine 132 and machining robot with LinuxCNC controller [26], [27]. 133 In their research, kinematic parameters of machining robot 134 are modeled in XML file and input to the system along 135 with STEP format geometric model. Slakovic et al. used 136 Robot Language Converter (RLC) to extract cutter location 137 trajectory from STEP-NC file and transfer it into robot pro-138 gramming language [28]. Alvares et al. discussed and imple-139 mented six architectures for applying STEP-NC in robot 140 machining [29]. The key issue is to handle the information 141 in STEP-NC file and then to simulate or machine on robot 142 platform. However, the information flow of robot machining 143 based on STEP-NC in existing research works is unidirec-144 tional and only part of information is used, so the advantage 145 of STEP-NC is not fully realized. 146 To sum up, it is a potential way to manage inte-147 grated robot machining process information by combining 148 CLM, STEP-NC with robot machining, and further more 149 VOLUME 10,2022 to achieve intelligent manufacturing by comprehensive anal-150 ysis of integrated robot machining information. However, 151 building a framework of robot machining system that can 152 perform machining tasks intelligently and adaptively based 153 on closed-loop data chain of high-level information, such 154 as robot parameters, online-inspection result and real-time 155 machining status, is still a problem to be solved.

156
The main purpose of this study is to build a frame-157 work of machining robot system that executing machin-158 ing tasks adaptively, along with a closed-loop data stream 159 integrated geometrical data of part, process plan data of 160 machining, inspection, and monitoring tasks, robot and tool 161 information, and status data during robot machining process.     adaptively. An integrated and distributed information stream 204 based on STEP-NC standard is used to represent all data 205 in connection with machining process. Integrated means all 206 information of geometrical data of parts, integrated process 207 plan, robot and tool information, robot path and integrated 208 machining data and their relationship are formatted in a 209 consistent manner. Distributed means information collected 210 during machining of every individual part should be stored 211 separately to make the machining process traceable.

213
The AAM of closed-loop robot machining process is built by 214 Integration DEFinition method 0 (IDEF0) for detailed analy-215 sis. The total process and procedures are represented using 216 functional activities of IDEF0 diagram. Streams of input, 217 output, control, and mechanism are represented using four 218 groups of arrows around the functional activities. Fig. 2    from activity A5 is considered as the part design will affect 247 the manufacturability of parts. Output of this activity is geo-248 metrical model of both rough and finished part, which is 249 represented in neutral format compatible with integrated data 250 model standard. This model contained not only the 3D model 251 such as STEP AP203 and STEP AP214 but also the material 252 of part and tolerance of every feature. This will ensure the 253 following activities to have comprehensive characteristic of 254 the object to be machined. By this way activity A2 can make 255 adjustment to geometrical data based on the actual situation in 256 order to optimize the machining process. These adjustments 257 will be inputted to activity A1 and manipulated by designer 258 manually or by CAD platform software automatically. Activity A2 generates integrated process plan of robot 262 machining contains machining task, online inspection, and 263 machining status monitoring task. All information is repre-264 sented with STEP-NC compliant data model and connected 265 with geometrical data from activity A1. This procedure is 266 divided into the following steps:         made by analyzing the machining information in real-time. 322 The detailed function of activity A4 will be described in part 323 D of section II. Function of activity A5 is storing, analyzing, and reusing all 327 information collected during machining process, then gen-328 erating and preserving machining knowledge, which con-329 tains both machining process information and its relationship. 330 Artificial intelligence algorithms such as deep convolutional 331 neural networks, Apriori algorithm, and genetic algorithm 332 can be used in this procedure to obtain machining knowledge 333 and to improve the machining quality [31], [32]. The machin-334 ing knowledge is outputted to activity A1 to A4 as control 335 streams to guide the machining process such as generating 336 process plan, selecting machining parameters, and generating 337 robot path.

339
Robot machining and process control (A4) is the core func-340 tion of CLRMS. Its material input stream is rough part, which 341 will be processed into finished part as output stream. During 342 the machining process, activity A4 manipulates information 343 from other activities to make adjustment of process plan, 344 robot path, and process parameters in real-time according 345 to machining status and inspection result, then sends the 346 adjustment to other activities. It is divided into four collab-347 orative functional activities as shown in figure 4, namely 348 pre-machining inspection (A41), machining and monitoring 349 (A42), online inspection (A43), and adjust machining process 350 (A44).

351
Pre-machining inspection (A41) is needed when a rough 352 part is installed on the fixture for the first time. Its purpose is 353 to get the accurate relative position and orientation between 354 machining robot and rough part. Activity A44 will adjusts the 355 part to the position determined by process plan or recalculates 356 the robot path and sends it back to activity A3. This procedure 357 is necessary owing to machining robot is usually used in 358 single and small batch production without fixture specially 359 customized for the part, or in mobile machining of large-scale 360 workpiece.

361
Function of activity A42 is getting robot path form activity 362 A3 and executing the machining, inspection, and monitoring 363 process determined in the integrated process plan. During 364 machining, sensors are installed on robot, fixture or part to get 365 machining status parameters such as force, torque, velocity, 366 acceleration, and temperature. The collected data is outputted 367 to other activities for further analysis.

368
An online inspection workingstep is added in machining 369 process plan by activity A2 during machining process plan-370 ning stage and conducted by activity A43 in the following 371 situations: 372 1) The required precision of some manufacturing features 373 is higher than the guaranteed precision of robot machining 374 system. 2) The workpiece is re-installed during machining pro-376 cess so that the position of next manufacturing feature to be 377 machined is changed.   2) When the cutting force is greater than the set value, 407 which means deformation of robot and workpiece may be 408 greater than the dimensional tolerance of the manufacturing 409 feature. Then the process controller will adjust feedrate or 410 cutting speed in real-time to reduce cutting force.

411
3) After the machining workingstep, A44 will send a 412 request to A43 to add an online inspection workingstep to 413 examine the actual error. 414 4) After the newly added inspection workingstep, A44 will 415 send a request to A2 to add a new machining workingstep to 416 fix the part if the error is repairable, or to abandon the part if 417 the error cannot be fixed. Data model integrating complete machining process infor-423 mation is the basis of closed-loop robot machining. In this 424 section, the ARM of integrated robot machining data is built 425 based on STEP-NC standard, which uses high-level infor-426 mation to describe machining process and supports bidirec-427 tional data transmission between any sections of the robot 428 manufacturing system. Several extensions are made using the 429 description method defined in STEP-NC standard to cover the 430 whole closed-loop robot machining process. The overall data 431 model structure contains both original STEP-NC standard 432 and its extensions are illustrated in Fig. 5. All extensions are 433 defined by EXPRESS and EXPRESS-G method and can be 434 integrated seamlessly with other STEP-NC data model [35]. 435  This part of data model is the core data of current STEP-452 NC standard, which describes machining process by using 453 entity project and its properties. The most significant prop-454 erty of project is its main_workplan representing by using 455 entity workplan and its property its_elements, which contains 456 one or several executables such as workingstep, nc_function, 457 and program_structure. At present, most machining process 458 information of milling and turning are already defined in ISO-459 14649 part 11 and 12, and can be directly referenced to build 460 robot machining process plan data model [37], [38]. How-461 ever, data model for machining status monitoring and online 462 inspection are not defined in ISO-14649 or other compliant 463 STEP standards. Therefore, a group of entities are newly 464 defined and integrated with existing ISO-14649 data model. 465   corresponding machining workingstep, items to be moni-525 tored, equipment, technology, and functions. The EXPRESS 526 definition is shown in Fig. 8. Entity monitoring_item is 527 an abstract super type of realtime_status_monitoring, more 528 items would be defined base on this super type in the future. 529 In this paper, three real-time monitoring items as shown in 530 Fig. 9 are defined as subtype of realtime_status_monitoring, 531 namely robot_joint_position_monitoring, end_effector_ 532 acceleration_monitoring, and end_effector_force_monitoring. Process control of robot machining system is more complex 536 than machine tool, so that an abstract super type mechani-537 cal_equipment and several subtypes are defined to describe 538 VOLUME 10, 2022   Furthermore, other equipment such as inspection devices and 557 sensors may not be installed on the robot structure. In this 558 context, the four-level hierarchical coordinate systems in 559 ISO-14649 are insufficient to describe the relative position of 560 equipment in CLRMS. In this paper, a multi branch frame of 561 coordinate systems for robot machining are designed as show 562 in Fig. 11. The Setup-Workpiece-Feature chain coordinate 563 systems is no longer described in MCS but in a newly defined 564 global coordinate system (GCS), in which machine coordi-565 nate system (MCS) and its link coordinate systems (LCS) of 566 more than one equipment can be defined in separate chains. 567 MCS of the equipment can also be defined in MCS or LCS 568 of another equipment on which it is installed. For example, 569 the MCS of end effector is usually defined in LCS of the last 570 joint of industrial robot.

571
Entity machine_setup which describes MCS of mechanical 572 equipment is defined as shown in Fig. 12. Property mechani-573 cal_equipment describes which equipment the MCS is related 574 to. Property its_origin defined the MCS of mechanical equip-575 ment in GCS or in MCS of another mechanical equipment, 576 depends on the related mechanical_equipment is installed 577 separately or on another equipment. This entity should not be 578 used if the mechanical equipment is installed on a movable 579 part of another equipment.

580
Entity mechanism and entity kinematic_link are referenced 581 from ISO-10303 Part 105 to describe kinematic structure of 582 machining robot [33]. However, these two entities cannot 583 describe D-H parameters of machining robot. In that case, 584 new data model of industrial robot integrating D-H parame-585 ters, dynamic parameters, and stiffness parameters is defined 586 as shown in Fig. 13. Entity link_parameter describes D-H 587 parameters of industrial robot using the first four properties 588 to represent distance and rotation angle between adjacent 589 joints. Property its_type represents type of joint, which can 590 be revolute or prismatic.

591
Data model for machine vision system is defined as shown 592 in Fig. 14. Entity inspection_device is super type of all 593 inspection devices such as vision measuring system, indus-594 trial camera, and lens. Entity vision_measuring_system has 595 one or more industrial cameras is used to perform vision mea-596 surement tasks in robot machining. Entity industrial_camera 597 and industrial_lens and their sub types are used to describe 598 parameters of camera and lens in vision measuring system. 599

601
Entity machining_status and its subtype realtime_machining 602 _status is defined for recording real-time machining status 603 data in robot machining process. The EXPRESS definition is 604 shown in Fig. 15. Its property linked machining status data 605 with corresponding monitoring workingstep. Time domain 606 data of machining status is saved as separate data file owing 607 to its large data volume. Property data_storage indicates the 608 storage location of data file. Only characteristic values of 609 real-time machining status data such as average force, aver-610 age acceleration, and average velocity are saved in STEP-611 NC file. Three entities are defined for recording force and 612   platform, CAPP software platform, open STEP-NC inter-620 preter, and machining knowledge management system. Hard-621 ware platform consist of machining robot, machine vision 622 system and hardware interface. Programming interface con-623 nects software with hardware. CAD software platform cor-624 responds to functional activity A1 in section II generates 625 geometrical model of machined part and transfers it to CAPP 626 software platform. Any CAD software with function of geom-627 etry modeling can be used in CLRMS to accomplish this task. 628 CAPP software platform corresponds to functional activ-629 ity A2 in section II generates machining process plan inte-630 grates geometrical information of machined part, mechanical 631 equipment in robot machining system, machining working-632 step, inspection workingstep, and monitoring workingstep 633 VOLUME 10, 2022   3) Robot path planning module deals with kinemat-657 ics calculation and velocity planning problems to generate 658 robot path in Cartesian space or joint space. This mod-659 ule has two types of implementation mode, namely inte-660 grated mode and standalone mode. Integrated mode means 661 the STEP-NC interpreter is integrated with an open robot 662 controller with software interfaces and can control the servo 663 drivers directly. Standalone mode means the robot controller 664 is a closed-system that can only accept program of native 665 language. A postprocessor specially developed for the robot 666 controller is needed if this module works in the latter mode. 667 4) Online inspection module communicates with machine 668 vision system through hardware interface such as USB port 669 and Ethernet port to capture image of workpiece. Then the 670 images are processed to measure the shape, dimension, posi-671 tion, and surface roughness. Inspection results are saved in 672 STEP-NC file and analyzed for adjusting robot machining 673 process. 674 5) Real-time monitoring module communicates with sen-675 sors through hardware interface such as USB port, serial port, 676 and data acquisition card to record real-time robot machining 677 status data. The collected data is analyzed by using artifi-678 cial intelligence algorithms to determine the robot machin-679 ing condition and adjust machining parameters adaptively in 680 real-time to get better machining quality.

683
The proposed STEP-NC interpreter can generate tool path in 684 FCS of every manufacturing feature. Then the robot path is 685 generated based on tool path in FCS and relative position and 686 orientation between coordinate systems in robot machining 687 system. However, the location of workpiece is usually not 688 fixed in robot machining, so that online workpiece position-689 ing is needed when a new workpiece is to be machined. 690 In this paper, machine vision method is used to get the relative 691 position between workpiece and machining robot.

692
The coordinate systems of CLRMS in this paper is shown 693 in Fig. 17

725
The method of online workpiece positioning is shown in 726 Fig. 19. Compared with deep learning method that needs 727 training of a large amount of samples, template match-728 ing algorithm has low computational complexity and good 729 robustness and is widely used in feature recognition and local-730 ization [43]. The characteristics of rectangle shape workpiece 731 used in this paper is clear and distinguishable. Furthermore, 732 the shape and dimension of workpiece and the machining 733 environment is usually known in advance, and the axis of 734 camera is perpendicular to the upper planner of workpiece 735 during positioning process, which makes the characteristic 736 more markedly and leads to more accurate measurement 737 results. In this context, it is practicable to make a template 738 VOLUME 10, 2022  that is accurately matched with the three target points in 739 Fig. 17 and use template matching algorithm to get the loca-740 tion of feature-point correctly [44].

741
The template matching algorithm is carried out as follows.  Table 1, which indicate that the recog-756 nition rate is 100% when using template correspond to the Axis Z S is parallel with axis Z G and G S T can be represented where θ S is rotational angle from {G} to {S} around axis Z G .

815
According to (1)-(7), (3) can be represented as Take the first two rows of (8) as Put the three groups of coordinates into (9) and get  Take the first three rows of (14) as Put M R z T 0 4 into (15) and get

917
As described above, the architecture and methodology of 918 STEP-NC compliant closed-loop robot machining system 919 are proposed in this paper to realize integrated bidirectional 920 data stream and simplify robot programming. The AAM of 921 CLRMS is built by using IDEF0 method. There are five func-922 tional activities in CLRMS namely part design (A1), inte-923 grated process planning (A2), machining robot path planning 924 (A3), robot machining and process control (A4), and machin-925 ing knowledge management (A5). The ARM of STEP-NC 926 data for CLRMS is defined by using both EXPRESS-G and 927 EXPRESS method to represent integrated robot machining 928 process plan, inspection data, monitoring data, machining 929 status data, and mechanical equipment. The newly defined 930 STEP-NC data model is integrated with existing data model 931 in ISO 14649. A framework of multi branch coordinate sys-932 tems is defined in STPE-NC data model to describe the rela-933 tive position and orientation between mechanical equipment 934 and workpiece in CLRMS. Functional activity A3 and A4 935 are implemented based on an open STEP-NC interpreter, 936 which is developed using C++ to realize online interpreting 937 of STEP-NC file contains entities of the proposed integrated 938 STEP-NC data model. An industrial camera is integrated 939 with the STEP-NC interpreter to determine the position of 940 workpiece using template matching algorithm. Tool path in 941 FCS is planned and transformed to robot path in MCS of 942 machining robot rapidly, which remarkably reduced the pro-943 gramming time of robot machining. Implementation plat-944 form of CLRMS is built, on which a case study of inspec-945 tion and machining of a rectangle shape plastic workpiece 946 is conducted. The feasibility and validity of the proposed 947 framework and methodology of CLRMS is verified by the 948 experimental result.

950
Future research works should be carried out to enhance and 951 optimize the proposed system. Firstly, the positional accu-952 racy of industrial robot is usually limited, which should be 953 calibrated for compensation. However, the commonly used 954 laser tracking system is costly and time-consuming. In that 955 case, high efficiency machining robot accuracy calibration 956 approach based on machine vision will be investigated. Fur-957 thermore, template matching algorithm may not be suitable 958 if the machining environment is complex and variable. More 959 adaptable machine vision algorithm based on deep learning 960 is needed for online positioning and inspection of workpiece. 961 Secondly, real-time monitoring of machining status and con-962 trol is necessary to improve the stability of robot machining 963 process. The placement of sensors, real-time data processing 964 algorithm, and real-time adaptive control algorithm will be 965 studied to reduce deformation and chatter in robot machin-966 ing. The data mining method for extracting the relation-967 ship between robot parameters, processing parameters, and 968 real-time status information should also be investigated to 969 predict and recognize the deformation and chatter of robot. 970