1 Introduction

3D printing is a process in which material is deposited in layers to form a three dimensional object. The increasing popularity of this additive way of manufacturing is due to the fast and cheap way of building not only prototypes but also end-use products.

The shortcomings of conventional approaches to 3D printing is the use of robotic manipulators with only three degrees of freedom, which limit the deposition of material in horizontal layers. This leads to object weakness in the vertical direction and poor surface quality due to the ‘stair-step’ effect [1].

The issues above are mitigated by printing in curved layers [2, 3], instead of horizontal ones. This requires the use of manipulators with more degrees of freedom and new methods of trajectory planning, which we presented in [4].

Our experimental set-up includes an industrial 6 DOF manipulator. The manipulator has heavier moving parts than conventional 3 DOF printers that only have a light printing head (printhead) moving. This results in the failure to attain the programmed speed of motion of the printhead on many path segments. Because the quality and strength of the printed objects depend crucially on the uniform deposition of material, the extrusion speed has to be adjusted for the actual motion speed of the printhead and not the programmed one.

Therefore, we develop an empirical approach to predicting the actual motion speed along the printing trajectory, such that the speed of material extrusion can be set correctly.

In Sect. 2 we describe our experimental set-up (both hardware and software), in Sect. 3 we present our approach to the control of the material extrusion speed, in Sect. 4 we illustrate the difference between objects printed with adjusted extrusion speeds and with fixed extrusion speeds, and in Sect. 5 we conclude.

2 Set-Up: Control System with Manipulator and Components

In this section, we present each individual component of our set-up. The building of the whole 3D printing system is ongoing and is part of a larger collaborative project.

Robot Cell: The robot cell for 3D printing will support the use of composite as well as natural materials, besides the standard plastics such as ABS, PLA, and NYLON. The robot cell is built as a mobile unit and fits the size of the KUKA KR 10 R900 Sixx manipulator.

The cell is designed as a heated chamber in order to reduce the difference between the extruded material and ambient temperature, thus enabling better print quality. The heat prevents uneven cooling of the extruded material which causes bending and internal stresses in the object. The cell includes a printing bed onto which the initial layers are printed - the printing bed is also heated to prevent warping and unsticking of the initial layers.

Manipulator: KUKA KR 10 R900 Sixx manipulator, one of standard industrial manipulators available on the market, is used together with the KR C4 Compact controller. The manipulator has 6 DOF enabling the access to the same point from multiple directions and printing on curved surfaces.

Printing Head and Its Control Board: The printing head incorporates two nozzles in a single head. The first nozzle supports material extrusion while the second nozzle supports the extrusion of carbon fibre filament as additional strengthening component. The deposit of material is controlled by controlling two stepper motors.

We use readily available open source 3D printing controller boardFootnote 1, which is designed for conventional 3 DOF 3D printers. The board supports multiple stepper motor drivers which are used for extrusion speed regulation of material. The board is also used for temperature regulation of two heating elements - one in the nozzle and one in the printing bed.

2.1 Software and Communication

The complete printing set-up includes a PC, which with its software represents the main data and control interface between the manipulator, the printing head, and the user.

We developed the trajectory planning module as well as the communication module [4] for communication between the PC, robot controller, and the printhead control board. The communication with the robot controller is implemented via Ethernet, and with the printhead control board via serial connection. The communication continuously provides the trajectory information and desired speed of motion to the robot controller as well as extrusion speed and temperature to the printhead. Figure 1 provides a schema of the set-up and Fig. 2 a sample output from our trajectory planning software.

Fig. 1.
figure 1

Robot cell for 3D printing.

Fig. 2.
figure 2

An example object (a) with printing head motion trajectory for curved surface printing (b)

3 Material Extrusion Control Based on Prediction of Motion Speed

The quality of printed object depends crucially on the uniform deposition of material. This is achieved only if the extrusion speed of the material from the printing head is synchronized with the motion speed of the printing head nozzle - the tool centre point (TCP). If the motion speed is too slow with respect to the extrusion speed, too much material is extruded leading to overflow and incorrect outer dimensions of the printed object. Conversely, if the motion speed is too fast, not enough material is extruded leading to lack of intertrack fusion, gaps, and weakness of the printed object.

For conventional 3D printers with only three axes, the main moving part is just the (light) printhead. There, the speed of the printhead and the speed of extrusion can be maintained constant along the printing trajectory. However, industrial manipulators with more degrees of freedom have moving parts with non-negligible inertia. This results in significant speed variation on and within the printing trajectory segments despite programming the robot controller to maintain constant speed along the trajectory. We illustrate this in Fig. 3.

Fig. 3.
figure 3

The histogram of actual speeds that were attained during printing a sample object (in Fig. 2) with our set-up. The desired constant motion speed of 4 cm/s was set on the robot controller. Not accounting for the varying actual speed would lead to about 60% more of material extruded than needed. The slowest parts of the printing trajectory were on the curved surface which requires constant reorientation of the printhead.

Therefore, to achieve good print quality when printing with large and heavy manipulators, the actual speed of the tip of the nozzle has to be estimated in advance for the whole printing path, such that the extrusion of material can be adjusted before each trajectory segment begins. The prediction of actual speeds additionally enables a more accurate estimation of total printing times.

3.1 Predicting the Actual TCP Speed

The failure to attain the desired speed generally occurs in sharp corners, during large orientation changes, near robot singularities, and for very short trajectory segments. The reduction of speed from the desired one originates from the torque, acceleration, and axis-velocity limits, as well as particularities of singularity handling and positioning approximation.

One way to predict the actual speed along the printing trajectory, is to simulate all of the kinematics, dynamics, and specifics of the robot controller and manipulator for a particular trajectory.

We decided for a simpler and empirical solution - we measured the actual speed of the TCP along random trajectories, modelled the collected data, and used the models to predict speeds for future printing trajectories. The prediction is performed offline, before the printing starts. In this paper, we focus on demonstrating the viability of such an empirical approach, and not on the details of statistical modelling.

Experimental Protocol. We generated random trajectories in the workspace of the robot, with varying lengths of the path segments as well as varying orientations and speeds along the path. Such random trajectories ensure we efficiently sample the possible configurations the robot will encounter during the printing process.

The trajectories were generated by sampling relative coordinates for each trajectory point from a normal distribution of typical scale 6 mm. This represents typical lengths of printing path segments of objects we plan to print. The relative orientation angles along each trajectory segment were generated by sampling from a normal distribution of typical scale \(10^{\circ }\). The programmed speeds along trajectories were set to 2 cm/s, 4 cm/s, and 6 cm/s, each for about 60 min, resulting in recorded data of about 68000 trajectory segments altogether. The robot controller we use enabled us to measure and record the actual speed as well as the desired speed along the trajectory. This gave us the input data (the trajectory) and the output data (the actual speed) to be used in statistical modelling.

We chose to predict the average speed on each path segment - relaying finer grained TCP speed within path segments could not be utilized in practice due to the communication delay between the robot controller and the printhead.

The actual TCP speed depends on the changes in the trajectory (such as sharp corners, orientation changes, ...). The controller in our experimental set-up implements positioning such that the executed trajectory consists of linear segments and parabolic blends between them. As a consequence, the information that determines the actual TCP speed needs to include not only the properties of the current path segment but also the previous and the next one.

Therefore, our input data to statistical models consist of the printhead coordinates, orientations, the path segment lengths, and the desired speed:

(xyzABClv), plus the same information for the previous and the next path segment along the trajectory. We illustrate this in Fig. 4a.

Results. The mapping between the input data (the trajectory) and the output data (the TCP speed) can be modelled in many ways. The relationship is expected to be non-linear, with complex, ‘hidden’, implementation of robot dynamics in-between. This set-up exactly corresponds to the architecture of neural networks (NN) [5]. Neural networks have been used for trajectory planning as well as for solving the inverse kinematics problem (see [6,7,8] and references in [9]). In this paper, however, we focus on using NN for predicting the actual TCP speed in the cases when the robot controller is programmed to keep the TCP speed constant.

We compare our non-linear NN models with a simple linear relation which serves as a baseline prediction between the input data and the output. We use 30 min of data for training and the rest for validation. The results are presented in Fig. 4b. With only 30 min of training data, we can predict the actual TCP speed to within 10 % for any future trajectory using our set-up. This way the printing head extrudes the correct amount of material on each trajectory segment, solving the issues with over and underflow.

Fig. 4.
figure 4

Schema of our modelling approach (a) and predictions of the NN model (b). In (b) the vertical axis shows the ratio between the actual TCP speed achieved and the speed set on the robot controller for some path segment (which are plotted on the horizontal axis).

For different experimental set-ups with different manipulators, controllers, or printing heads the approach we presented can be repeated; first collect data using random trajectories, then model this data giving a predictive model for actual TCP speeds and material extrusion speeds.

4 Printing Results: Comparison in Quality

We illustrate the improvements gained by our method by printing two identical objects (Fig. 5). A detailed study of material properties of objects printed by our set-up will be part of a separate publication.

The first object is printed by keeping the extrusion speed constant, such that the appropriate amount of material would have been extruded if the actual printhead motion speed had been as programmed on the robot controller. The second object is printed by dynamically adjusting the extrusion speed, as described in Sect. 3.

Fig. 5.
figure 5

Examples of different amount of extruded material, based on approaches to material extrusion control.

5 Conclusion

This paper deals with issues relating to 3D printing with 6 DOF industrial manipulators. We present our printing set-up consisting of the robot cell, manipulator, controller, printhead, and printhead controller.

In previous contribution, we dealt with new methods of trajectory planning. Here, we focus on the issue of material extrusion control in situations where the programmed motion speed of the printhead cannot be achieved due to limitations of the manipulator or controller. If the motion speed of the printhead and the extrusion speed of material are not synced, then an incorrect amount of material is deposited. This leads to poor quality of printed objects.

We demonstrate that a simple empirical method to predict the actual motion speed of the printhead is a viable approach to ensuring that the appropriate amount of material is extruded along the printing path. Firstly, we measure a number of random trajectories and speeds on them in the work space of our robot. This then serves as training data for our models which accept printing trajectory as input, while the actual speed of the printhead on each segment of the trajectory is the output of the models.