1 Introduction

Six-axis machining robots have replaced computer numeric control (CNC) machines to process large workpieces. Compared to CNC, industrial robots (IRs) are economical and flexible due to their reconfigurability [1]. However, IRs in conventional machining has been severely limited by the lack of stiffness combined with the high forces of traditional machining [2]. As a result, robotic machining is mainly applied in low accuracy and soft materials.

Parallelly, electric discharge machining (EDM) is found in different variants, while die-sinking is the one that refers to the fundamental EDM principle. In die-sinking EDM, a block electrode is previously machined with the negative shape of the cavity. Next, the electrode is connected to the machine head to perform linear up and down movements towards the workpiece until a small distance gap where the sparkles can occur. The process will gradually melt portions of the workpiece surface by repeating this kinematic several times to deploy high-frequency electric discharges [3]. Unlike traditional machining, EDM offers nearly no cutting forces, while mechanical stresses, chatter, and vibrations are eliminated [4]. However, the characteristics of a customised electrode tool and one-axis linear kinematic configure the main limitations for die-sink EDM. Thus, equally large electrodes are necessary to machine complex and significant parts [5]. As a solution, an EDM variant called milling EDM (MEDM) has been studied. Unlike sink EDM, MEDM uses smaller electrodes shaped in primitive geometries such as cylinders, cones, and prisms [6]. Next, analogous to traditional milling, the electrode acts as a tool that performs layer-by-layer cutting paths [7].

Therefore, this study investigates a synergistic combination of MEDM and IR machining to overcome weaknesses in sink-EDM and IR machining by achieving a novel process able to cut large and complex workpieces of hard-to-cut materials. The research is organised as follows. Section 1 presents the background that motivates the research. Section 2 retrieves state-of-the-art literature. Section 3 describes the materials and methods, Sect. 4 presents the findings and discussions, while Sect. 5 is the conclusion.

2 Literature review

This section explores previous research in both robotic machining and MEDM fields.

2.1 The application of robotics in electrical discharge machining

Industrial robots have successfully replaced many manufacturing techniques [8]. Compared to CNC machines, IRs offer many advantages, thus attracting research interest aiming for cost-efficiency, flexibility, and multi-functionality [1]. IRs can be defined as a series of interconnected bodies and joint mechanisms with 6 degrees of freedom (DOF) [9]. Thus, IRs can perform machining trajectories in 3-dimensional space while kee** arbitrary positions and orientations [10]. However, the high forces of conventional machining techniques combined with the lack of stiffness of IRs limit their use as machining tools [11]. While CNC machines have stiffness greater than 50 N/μm [12], IRs usually have less than 1 N/μm. Also, even IRs with a large mass have a natural frequency of around 10 Hz and cannot be compared with hundreds to thousands of hertz of CNC machines [12]. To overcome robotic machining deviations, researchers have studied cutting path strategies coupled with dynamic identification methods embedded in offline programming [13]. The main advantages are a better use of the time [14], precise conversion of the 3D workpiece into less force [15], or less vibration cutting-path [16] while avoiding collision and singularities [17], achieving stiffer robot pose [18,Full size table

Fig. 4
figure 4

Minimal and maximal total deformation from 10 natural frequency modes

By focusing on the electrode Z-axis, Fig. 5 shows that the amplitude decreases with the increase of pulse frequency. Thus, even light forces of EDM combined with low pulse frequencies present a real risk of prohibitive vibrations, short circuits, and poor accuracy in robotic MEDM. In other words, for the system here presented, frequencies below 528.42 Hz will generate prohibitive vibrations, while frequencies above 460 Hz can offer a feasible electrode gap oscillation lower than 0.06 μm. Since EDM can be performed in a broad range of frequencies from 2 kHz to 0.5 MHz, the experiment’s amendments consist solely of kee** the pulse frequency above the natural frequencies.

Fig. 5
figure 5

Electrode frequency response on Z-axis

A triaxial piezoelectric accelerometer Kistler 8694M1 was attached to the end-effector to capture the range of vibrations using a decoder type 5134B. The sensor weighs only 2.5 g and has a frequency response from 10 to 20,000 Hz. Lastly, the accelerometer is grounded, isolated, and sampled at 1500 Hz.

3.4 Robotic milling EDM control

This section approaches two main controlling aspects: (1) cutting-path programming and (2) EDM adaptive robot speed control.

3.4.1 Adaptive fuzzy EDM controller

EDM process is characterised as stochastic and capable of abrupt change. Fortunately, fuzzy controllers can capture knowledge and make reasoning to simulate human intellect for controlling stochastic processes such as EDM [41]. However, the current range of industrial robots needs from 0.3 to 0.5 s to implement a speed change command [42]. Such delay is considered significant for the EDM. Suppose the robot runs at 5 mm/min, and the controller sends a strong reduce speed command (nearly a stop). If the delay is 0.5 s, the robot will continue moving towards the workpiece of 41 μm before adjusting the speed. Since the discharge gap is found at 20 μm, a collision followed by short circuits will happen without premonitory control capabilities. Therefore, an adaptive control improved with predictive capabilities is crucial, and different researchers have demonstrated that the abnormal pulse frequency rise helps predict process deterioration [43, 44]. Therefore, to develop the adaptive control that captures the expertise of experienced EDM operators, we adapt a multiple-input vs multiple-output (MIMO) three-region fuzzy controller initially designed for wire EDM [45]. The three main changes focus on (1) fuzzy rules that are experimentally adjusted to emphasise premonitory frequency characteristics and better cope with slow robot response. (2) The range of pulse-off time adjusting output is no longer limited to increase or decrease 2 μs. Instead, we use the generalisation made by Juran and Godfrey [46] pp. 5.20–24 for the postulate of Pareto [47]. In context, a minor change of up to 20% of the total pulse-off time represents most process change. (3) The fastest way to make online robot speed adjustments is by speed override. Thus, the fuzzy scale is changed to accommodate an output from 0 to 100% of a pre-determinate maximal robot speed [48].

The control’s objective function is to optimise material removal rate (MRR), which means that the robot’s speed is controlled to be as fast as possible, while the constraint is to keep stable process sensed by pulse frequency (kHz) together with bad pulses percentage (i.e., arcing and shorts) to modulate both pulse-off time (μs) and robot speed (mm/min) every 10 ms sampling interval. It is worth noting that the cut-off percentage of bad pulses can be adjusted so that MRR can increase as a compromise over SR. In other words, it is possible to choose a percentage value that falls in between a fine cut to a rough cut.

The gap status is continuously read and discriminated by the percentage of pulses classified as a normal, arcing, and short circuit. Each pulse is individually analysed by concurrently measuring gap voltage and gap current curves to achieve pulse discrimination. It is possible to classify the pulse according to the combined behaviour of current and voltage along with pulse time. Figure 6 shows a typical example of different pulse classifications available at the ITRI pulse generator.

Fig. 6
figure 6

WEDM process pulse discrimination by voltage and current waveforms. Adapted from [49]

According to Fig. 6, each pulse discrimination is summarised as follows:

  • A normal pulse is the desired and useful pulse. In it, gap voltage drops from maximal value only after the programmed pulse-off time, while the current rises proportionally until the pulse is once more turned off by the programmed pulse-off time.

  • Arcing occurs when several pulses hit the same area resulting in continuous material removal. It is caused by inductive reactance in one ionisation point, preventing the dielectric fluid from deionising. It is a harmful effect since it creates larger craters, increasing surface roughness. Nonetheless, it is frequently unavoidable yet should be kept low as possible as a trade-off with the intended SR vs MRR.

  • A short circuit occurs when the wire electrode touches the workpiece by (1) direct contact or (2) indirectly by debris accumulation. A short circuit is identified when the current curve is found at maximum while the voltage is at minimum. Also, a short pulse does not remove material.

    On the other hand, disturbances in pulse frequency are controlled by modulating pulse-off time. The main causes of frequency peaks are as follows:

  • Robot speed running faster them MRR, increasing short pulses.

  • Flushing is inefficient, causing debris accumulation and lower dielectric resistivity, resulting in unstable pulse-off time between cycles.

  • Insufficient pulse-off time causes arcing. Since a series of involuntary pulses characterise arcing, frequency peaks will occur.

Lastly, regarding the functionalities of the ITRI pulse generator, it has four pulse protection options: (1) none, (2) shorts, (3) shorts tuned, and (4) shorts arc tuned. However, we have selected option 1 (no protection) to evaluate the fuzzy controller performance unbiased.

In brief, the controller operates by identifying which of the three regions the frequency input (e1) is operating, namely safe, critical, and dangerous region domains. The respective linguistic sets to identify the regions are positive (P), zero (ZO), and negative (N). Figure 7 presents the fuzzified input signals as to frequency error (e1), abnormal pulse ratio error (e2), and change of abnormal pulse ratio error (ce2), while each of the crispy input values are calculated as follows:

abnormal pulses = short-circuit pulses + arcing pulses

e1 = (reference frequency - sparking frequency) × GE1

e2 = (reference abnormal pulse ratio - current abnormal ratio) × GE2

ce2 = (current abnormal pulse ratio error - previous abnormal pulse ratio error) × GCE2

where GE1, GE2, and GCE2 are scale factors respectively found, in this case, as 0.5, 1, and 10. The inputs are fuzzified using five linguistic variables of negative big (NB), negative small (NS), zero (ZO), positive small (PS), and positive big (PB).

Fig. 7
figure 7

Fuzzy input variables membership functions where (A) stand for the frequency error = e1 and (B) is used for both abnormal ratio error = e2 and change of abnormal ratio = ce2

Similarly, Fig. 8 presents the fuzzified output control signals of robot speed (Δu1) and pulse-off time (Δu2), both using the fuzzy linguistic variables of NB, NS, ZO, PS, and PB. Finally, the output values are calculated:

Robot speed (%) = Δu1 × \(^{1}\big/_{100}\)  

Pulse-off time (μs) = [ (pulse-off time set) \(\times {\mathrm{\Delta u}}_{2}\times ^{20}\big/_{100}\)] + (pulse-off time set).

where GE1, GE2, and GCE2 are scale factors respectively found, in this case, as 0.5, 1, and 10. The inputs are fuzzified using five linguistic variables of negative big (NB), negative small (NS), zero (ZO), positive small (PS), and positive big (PB).

Fig. 8
figure 8

Fuzzy output variables membership functions where (X) stands for Δu1 = change in the feed control and (Y) is Δu2 = change in pulse off-time

The max–min inference method is adopted to perform the fuzzy reasoning on the linguistic rules, while the centre of the area method is used for defuzzification [45]. Table 3 presents the resulting fuzzy rules, while Figs. 9, 10, 11, 12, 13 and 14 depicts the fuzzy input vs output relationships.

Table 3 Fuzzy rules for a MIMO three-region robotic EDM fuzzy controller
Fig. 9
figure 9

Inputs e1 and e2 vs robot speed output in % of robot pre-defined maximal speed in mm/min

Fig. 10
figure 10

Inputs e1 and ce2 vs robot speed output in % of robot pre-defined maximal speed in mm/min

Fig. 11
figure 11

Inputs e2 and ce2 vs robot speed output in % of robot pre-defined maximal speed in mm/min

Fig. 12
figure 12

Inputs e1 and e2 vs pulse-off time output in microsecond

Fig. 13
figure 13

Inputs e1 and ce2 vs pulse-off time output in microsecond

Fig. 14
figure 14

Inputs e2 and ce2 vs pulse-off time output in microsecond

Finally, the fuzzy controller is coded using LabVIEW to capture input signals and output signal control for both robot speed and pulse-off time while performing accurate data acquisition, later used for experimental analysis. Figure 15 shows the fuzzy controller interface.

Fig. 15
figure 15

MEDM fuzzy controller graphic interface

3.4.2 Offline cutting path programming and wear compensation

On a macro-scale, MEDM demands compensation, and the approach chosen is offline control. To generate robotic offline cutting path programming that includes compensation, the three-dimensional models for the robot MEDM cell were imported, positioned, and programmed within computer-aided manufacturing (CAM) software PowerMill [50]. Figure 18A depicts the virtual apparatus for offline programming, including wear compensation, collision, and singularity avoidance.

Aiming to verify robotic EDM capabilities in terms of pulse control, robot speed, and offline wear compensation, the chosen geometry to be machined is a circular pocket of 12 mm in diameter, varying in depth, position, and angle. Figure 16 depicts the three approaches.

Fig. 16
figure 16

Three different MEDM workpiece pocket approaches

The adopted strategy is a helical path with a pitch defined according to the electrode wear. Since wear in MEDM is a unique combination of materials, process parameters, and flushing conditions, to build the offline electrode wear model, a preliminary experiment was performed following the steps of Lee et al. [51]. As a result, the pitch of the helix was found as 0.009 mm. Next, to anticipate the wear of the electrode corner, the resulting radius is defined as 0.2 mm by approximating the cutting pitch as in Ding and Jiang [7]. Figure 17 exemplifies the cutting path strategy embedding offline wear compensation for electrode length and radius (Fig. 18).

Fig. 17
figure 17

Conceptual helical cutting path strategy

Fig. 18
figure 18

A Computer-aided manufacturing (CAM), and B robotic MEDM apparatus in the corner cut 45°

3.4.3 Discharge gap calibration

To accurately follow the offline programmed path, it is vital to calibrate the gap voltage accordingly. Thus, the gap is experimentally measured as follows. First, with the pulse generator turned off, the electrode is aligned with the Z-axis and positioned to a contact (zero distance) from the workpiece. Next, it is moved away along the Z-axis to the distance of 500 microns so that a discharge spark cannot be generated. Next, the EDM parameters in the pulse generator are all set together with the dielectric flow and pressure. Third, the distance between the electrode and the workpiece progressively decreases until a first spark is detected. Next, the found gap distance of 20 μm is added to the tool electrode in length and the diameter to update the cutting path and assure that the selected process parameters and offline cutting path are in agreement. The list of process parameters is summarised in Table 4.

Table 4 MEDM process parameters