NC State
BioResources
Rakic, A., Zivanovic, S., Dimic, Z., and Knezevic, M. (2021). "Digital twin control of multi-axis wood CNC machining center based on LinuxCNC," BioResources 16(1), 1115-1130.

Abstract

This paper presents an application of an open architecture control system implemented on a multi-axis wood computer numerical control milling machining center, as a digital twin control. The development of the digital twin control system was motivated by research and educational requirements, especially in the field of configuring a new control system by “virtual commissioning”, enabling the validation of the developed controls, program verification, and analysis of the machining process and monitoring. The considered wood computer numerical control (CNC) machining system is supported by an equivalent virtual machine in a computer-aided design and computer-aided manufacturing (CAD/CAM) environment, as well as in the control system, as a digital twin. The configured virtual machines are used for the verification of the machining program and programming system via machining simulation, which is extremely important in multi-axis machining. Several test wood workpieces were machined to validate the effectiveness of the developed control system based on LinuxCNC.


Download PDF

Full Article

Digital Twin Control of Multi-Axis Wood CNC Machining Center Based on LinuxCNC

Aleksandar Rakic,a Sasa Zivanovic,b Zoran Dimic,c,* and Mladen Knezevic d

This paper presents an application of an open architecture control system implemented on a multi-axis wood computer numerical control milling machining center, as a digital twin control. The development of the digital twin control system was motivated by research and educational requirements, especially in the field of configuring a new control system by “virtual commissioning”, enabling the validation of the developed controls, program verification, and analysis of the machining process and monitoring. The considered wood computer numerical control (CNC) machining system is supported by an equivalent virtual machine in a computer-aided design and computer-aided manufacturing (CAD/CAM) environment, as well as in the control system, as a digital twin. The configured virtual machines are used for the verification of the machining program and programming system via machining simulation, which is extremely important in multi-axis machining. Several test wood workpieces were machined to validate the effectiveness of the developed control system based on LinuxCNC.

Keywords: Digital twin; Multi-axis machining; Wood CNC machine; LinuxCNC

Contact information: a: University of Belgrade, School of Electrical Engineering, Bulevar kralja Aleksandra 73, 11120 Belgrade; b: University of Belgrade, Faculty of Mechanical Engineering, Kraljice Marije 16, Belgrade 11120 Serbia; c: LOLA Institute, Kneza Višeslava 70a, Belgrade 11030 Serbia; d: Technical School, Kosovke djevojke 18, Gradiska 78400, Serb Republic; *Corresponding author: zoran.dimic@li.rs

INTRODUCTION

Current trends in the manufacturing industry are linked to various initiatives, e.g., Industry 4.0 cyber-physical systems (CPS) (Rajkumar et al. 2010), internet of things (IoT) (Dervojeda et al. 2015), cloud computing (Kagermann et al. 2013), and machine tool cyber twins (which is better known as a digital twin, a digitalization of the machine tool) (Liu and Xu 2017). Primary trends of digitalization in the manufacturing industry are increasing efficiency, productivity, and the quality of products. As a base of the modern manufacturing industry, numerical controlled machine tools play an essential role in industrial digitalization (Zivanovic et al. 2018).

A partial virtual representation of machines is currently well known by machine tool builders, in the form of computer-aided design (CAD), computer-aided manufacturing (CAM), and finite element modeling (FEM). In the past few years, a new application of the digital twin has increased in popularity, called “virtual commissioning” (Hoffmann et al. 2010; Lee and Park 2014). “Virtual commissioning” implies that a virtual representation of the machine is used to design, program, and validate the controller. At the same time, digital twins provide the possibility of interacting with the real representation of the machine. The digital twin is based on a combined application of the cyber and physical worlds. The cyberworld consists of computation, communication, and control systems, and in a digital twin, both the physical and cyberworlds will be interconnected. The cyberworld will make use of real machine tools and process data throughout its life cycle. A digital twin of a manufacturing system is created by combining the corresponding theoretical models, according to machine tool design and process specifications. During part manufacturing, the holistic simulation model can be updated, according to real-time machine tool conditions, using data obtained through monitoring and additional characterization tests designed for this purpose (Armendia et al. 2019a; 2019b).

Wood computer numerical control (CNC) machinery automatically controls the movements of a spindle and table. In the wood industry, CNC woodworking machinery is used for automatically cutting, milling, drilling, and shaping. A type of CNC router has become especially popular in furniture manufacturing and has been used for the grooving, side milling, and patterning of furniture material. In addition, CNC routers have been introduced into the production lines of precutting factories and have been used under demanding processing conditions to raise productivity (Ohuchi and Murase 2005). Milling is the process of machining wood using CNC machine tools in conjunction with rotating tools (milling tool, milling head, etc.), where the depth of the cut changes the nominal chip thickness. In counter-rotating climb milling, the chip thickness changes from the minimum to the maximum value, while in simultaneous conventional milling, the chip thickness changes from the maximum value to the minimum value (Barcik and Gasparik 2014; Vanco et al. 2017).

The current study establishes a new development methodology for open architecture CNC systems in accordance with the Industry 4.0 paradigm. The speeding up of development cycles in an industrial environment have proved challenging, leading us to a “virtual commissioning” strategy, which, along with its “digital twin” technology, presents the main contribution within the field of control systems development. The paper is organized as follows: Following this introductory section, the description of the multi-axis wood CNC machining center will be presented, including the kinematic modeling. The next section will describe the structure of the programming system, which includes the programming in the CAD/CAM environment. The next section describes configuring an open architecture control system based on LinuxCNC, after which the configuring of the virtual multi-axis wood CNC machining center as a digital twin is presented. In the next section, the digital twin control system is verified through experiments, while the concluding remarks are summarized in the last section.

EXPERIMENTAL

Description of the Multi Axis Wood CNC Machining Center

The six-axis wood CNC machining center (Bacci MX6, Paolino Bacci, Cascina, Italy) is equipped with a very rigid base structure, which is especially suited for the production of elements such as chairs, tables, beds, shells, stairs, and musical instruments (as shown in Fig.1).

The wood CNC machining center is equipped with two independent working tables, that can perform movement along the Y/V axes. Movement of the machine column is performed along the longitudinal axis (X), while the working unit slides in a vertical direction (Z axis) along the machine column. The working unit has two rotations, first B, and second A. The CNC machine has four independent electro spindles, which can change during the machining process via rotating. All the components, along with the main assembly of the machine, were modeled in PTC Creo. The configured virtual machine with marked translatory and rotary axes is shown in Fig. 1a.

Fig. 1. Multi-axis wood CNC machining center

Inverse and direct kinematics (Kinematic modeling)

The multi-axis wood CNC machining center is considered a specific configuration of the five-axis vertical milling machine with the YY’OXZBA structure spindle-tilting type. In this paper, the kinematic modeling involves solving direct and inverse kinematics. Switching kinematic functions are implemented according to the functional demands, and the machine kinematics structure.

Figure 2 represents the geometric model of the machine mechanism shown in Fig. 1. The coordinate reference frame (M) and the coordinate tool frame (T) are attached to the pivot and the tooltip, respectively. The ZT axis coincides with the tool axis, according to the adopted tool frame. The joint coordinates and the world coordinates are defined as shown in Fig. 2.

Fig. 2. Kinematic model

If the existence of two worktables is neglected, then it is well known how to solve the direct and inverse kinematic problems for machine tools with the presented kinematics structure. The inverse functions for both worktables are shown in Eqs. 1 through 6,

where coordinates and angles determine tool position and orientation in the Cartesian coordinate system. Pivot length and tool length are designated as and , respectively.

In parallel with the inverse kinematic functions, the direct kinematic solutions were derived, as shown in Eqs. 7 through 12,

where and are scalar joint variables controlled by actuator.

The existence of two worktables can offer several benefits to this kind of machine tool, but two of these benefits are of primary interest in terms of efficient production. The first aim of redundant axes is to increase the productivity of the machine tool by making the workspace switchable, which allows machining and setting up at the same time on different worktables. The second is when both worktables work simultaneously, allowing for the machining of bigger workpieces.

The requested functionality of the machine tool can be achieved via the implementation of switchable functions within the kinematic software module. Figure 3 shows the direct and inverse algorithms with the possibility of activating the desired axes according to user demands.

The implementation of switchability in kinematics functions is possible by using customized M codes, e.g., M200-M202. When the interpreter of the G-code program recognizes code M200-M202, it calls a defined subroutine, as shown in Fig. 4. Before changing the execution flow in the kinematic function, it is necessary to move the orientation axes into a neutral position, i.e., A = 0 and B = 0. If not, during the switch from the axis to the and vice versa, the transient movement could occur with servo error. Code M65 sends a signal to the kinematics module, which changes the execution flow according to a specific P-code. Different P-codes control the activation or deactivation of various parts of the kinematic software, as shown in Figs. 3 and 4.

Fig. 3. Kinematic algorithms

Fig. 4. Customized M functions

Structure of the Programming System

The programming of a wood CNC machining is very conventional. Machining programs can be generated via the use of standardized or specialized CAD/CAM systems. Standardized CAD/CAM systems, e.g., PTC Creo, CATIA, NX Siemens, AlphaCAM, etc., offer the possibility of generating machining programs for vastly different machine tools, including the Bacci wood CNC machining center. PITAGORA (Pitagora 2020) is a CAM software that was specially designed for the Bacci wood CNC machining center. Its usage is straightforward and has all the necessary power to perform the required operations.

Programming in the CAD/CAM environment

The programming system applicable to the wood CNC machining center is shown in Fig. 5. The CAD model of a workpiece is the base for tool path generation. In the case of this study, the CAD/CAM system PTC Creo is used to accomplish a file with a tool path (CLF). The generated tool path is tested through the NC Check (material removal simulation) software module, which is followed by the G-code generation. Postprocessing for the vertical 5-axis milling machines, configured for AB spindle-tilting type, is used to obtain the machining program. The CAD/CAM system PTC Creo is capable of performing a verification of the obtained programs through virtual simulation.

Fig. 5. Programming system in the CAD/CAM environment

Configuring the Open Architecture Control System Based on Linux CNC

The development of the control system for the presented wood CNC machining center is based on an available open architecture control software LinuxCNC. LinuxCNC was initially developed by NIST (National Institute of Standards and Technology), which is located in Gaithersburg, MD (Staroveški et al. 2013; LinuxCNC 2020). As a real-time control system with an open architecture, it is used to control various types of CNC machine tools and robots. Years of research and development on the LinuxCNC program have produced a solid, time-proven machine control platform. A simplified structure of the low-cost control system based on LinuxCNC is shown in Fig. 6. LinuxCNC software system contains the following four base modules: (i) movement controller EMCMOT; (ii) discrete input/output signals controller EMCIO; (iii) process controller EMCTASK; and (iv) GUI (Graphical User Interface) (Zivanovic et al. 2016; LinuxCNC 2020).

The EMCMOT module performs the real-time interpolation of the programmed path, according to the direct and indirect kinematic functions. The EMCIO module processes all peripheral operations, while the EMCTASK (task coordinating module) module interprets the G-code instructions and coordinates the activities of the EMCMOT and EMCIO modules accordingly. As shown in Fig. 6, communication between the real-time EMCMOT module and the non-real-time EMCTASK module is done through the shared memory buffer, which is a part of the real-time operating system mechanism.

Fig. 6. Structure of the control system based on LinuxCNC

A GUI (graphical user interface) is an external program that communicates with LinuxCNC by sending various commands, e.g., machine turn on, switch to automatic mode, start the program, and machine shut down. The GUI can also send manual messages, initiated by the operator, e.g., moving the machines axes in manual mode (JOG) or throwing all axes in a reference position. Different GUIs can be used; however, Axis is the most commonly used user interface. The Axis environment is very intuitive, with recognizable icons that help facilitate ease of use for the operator. In addition, another convenience of the Axis environment is the possibility of integration with the virtual machine as a digital twin.

A major contribution to the expansion and popularization of LinuxCNC software was brought through the development of HAL (hardware abstraction layer). The HAL enables the simple integration of user-defined direct and inverse kinematic models into the control system. It also provides a uniform interface for hardware and software modules of the system, thus simplifying the establishment of a connection.

In order to use LinuxCNC software to control the multi-axis wood CNC machining center, the following steps were necessary (Zivanovic et al. 2019):

(i) creating a directory which contains all the configuration files of the multi-axis wood CNC machining center;

(ii) creating configuration (*.ini) files that contain the core machine parameters: the range of all the axes, the maximum velocities and accelerations of all the individual axes, the parameters for real-time system operation, etc.;

(iii) creating configuration (*.hal) files which contain information relating to the motion control of both the real and virtual machines;

(iv) configuring the control system concerning the hardware platform being used as a host; and

(v) building and configuration of the interactive virtual machine tool within the LinuxCNC system using the tools available in the OpenGL-Python 3D environment.

Configuring the Virtual Multi-axis Wood CNC Machining Center as a Digital Twin

Machining simulation is essential in modern manufacturing. Virtual machines can be classified into three main types: (i) virtual machines in CAD/CAM systems; (ii) virtual machines in control systems; and (iii) virtual reality machines (Dimic et al. 2016). The subjects of the author’s study are the first two types of virtual machines as a digital twin.

Virtual machine in the CAD/CAM environment

Standardized CAD/CAM systems are used for programming, which includes machine simulation with the movement of solid model components, including the tool at the end of spindle and the workpiece on the working table. The configured virtual wood CNC machining center is used for the simulation of the tool path generated in the CAD/CAM system (using PTC Creo2). Virtual simulation is essential for the following reasons: (i) to configure the programming environment; (ii) to verify the program before machining; and (iii) to detect collision during program simulation.

Machine simulation via running the program is possible thanks to the applied modeling of all kinematic connections between the moving components. This allows the motion of a virtual model of the machine to function as a system of rigid bodies (Zivanovic et al. 2015).

Within the used software, the kinematic connections of the considered machine were generated by applying a Slider type connection for all translational movements (X, Y, and Z) and two rotational movements (B and A), which use rotary connections (Pin). The corresponding movement limits are defined for each axis. Such assembly enables the movement of the components in the range specified for each joint. A detailed virtual machine with all the kinematic relations between the moving components is defined and shown in Fig. 7a.

After defining the moving parts of the machine, (Fig. 7a), it is necessary to make a connection between the coordinate systems on the workpiece and the tool with adequate coordinate systems on the virtual machine, Fig. 7b. As shown in Fig. 7b, it is necessary to define the coordinate systems on the workpiece, which is marked as MACH_ZERO, and on the working table, which is also marked as MACH_ZERO. By matching these coordinate systems, MACH_ZERO enables the setting of the workpiece on the configured virtual machine during the tool path simulation. The coordinate system of the tool is defined in the same way as the workpiece coordinate system and is marked as TOOL_POINT. This coordinate system is set at the head of the main spindle, and on the tool, as shown in Fig. 7b. By matching these coordinate systems, TOOL_POINT enables the setting of the tool at the head of the main spindle on the virtual machine during the tool path simulation, as shown in Fig. 7c. For the programmed and simulated tool paths using machine simulation, the physical CNC machine is shown in Fig. 7d and demonstrates the 5-axis machining of a concave calotte.