## 5 Conclusions  
This work observed the gap phenomenon during the WEDM process using a high-speed video camera. From the acquired images, an algorithm was devised to determine the discharge location based on grayscale analysis. In addition, matching the image and the signals obtained from the oscilloscope allowed for determining the discharge delay time. The analysis of these data prompted the following conclusions:  
* The discharge location was successfully detected through grayscale analysis of images obtained from the high-speed video camera. The probability that \(d_{i}\) occurs within 0.5 mm from the location of \(d_{i-1}\) is the highest and is 14.1% higher than that of the random model. When there is a sufficiently large number of discharges between two discharges, the distribution tends to be random. * When discharges occurred around the previous discharge, most discharges occurred near the boundary of the bubble generated by \(d_{i-1}\), with relatively few taking place in  
Figure 16: Relationship between the undischarged rate and discharge delay time under different peak discharge currents. Figure 15: Oscillation of bubbles under different gap voltage. side the bubble. This finding confirms the influence of the debris particles concentrated at the bubble boundary on discharge occurrence in WEDM. * The size of the bubble and the first cycle of bubble oscillation is almost uniform under the same machining conditions. If the discharges are generated under different peak discharge currents, there are differences in the oscillation cycle and the size of the generated bubble. With a lower peak discharge current, the first oscillation cycle is shorter, and the bubble size is smaller. * By comparing the bubble oscillation cycle and the relationship between the discharge delay time and the undischarged rate, it was found that more discharges occurred during bubble expansion. This finding verifies the influence of bubble expansion on discharge occurrence and can be explained by the effect of the debris particles that accumulate around the bubble boundary. For future research, several aspects of this study can be extended to deepen the understanding of discharge behavior in WEDM, particularly the impact of varying discharge conditions, such as gap voltage and discharge delay time. By exploring a broader range of machining conditions, more detailed models can be developed to explain how these factors affect the distribution of discharges. In addition, the interaction between bubbles and debris is worth further study. Given that the accumulation of debris particles at the boundary of the bubble influences discharge locations, further research could delve deeper into the complex interactions between bubbles, debris, and fluid flow. High-speed imaging and computational fluid dynamics (CFD) simulations could provide more insights into how debris and bubble dynamics change with different machining conditions. Conceptualization, J.W. and J.A.S. ; methodology, J.W., J.A.S. and I.A. ; software, J.W. ; validation, J.W. and J.A.S. ; formal analysis, J.W. ; investigation, J.W. ; resources, B.I. and I.A. ; data curation, J.W. ; writing--original draft preparation, J.W. ; writing--review and editing, J.A.S., B.I. and I.A. ; visualization, J.W. ; supervision, J.A.S., B.I. and I.A. ; project administration, J.A.S. and I.A. ; funding acquisition, B.I. and I.A. All authors have read and agreed to the published version of the manuscript. This work received funding support from the Spanish Ministry of Economy and Competitiveness and the FEDER operation program for the project (DPI2017-82239-P). The data frame system for this work was partially supported by the MCIN/AEI/QUOLINK project (TED2021-130044B-100). Not applicable. The raw data supporting the conclusions of this article will be made available by the authors on request. Thanks are addressed to the Basque Government, Spain, for the support of university research groups IT1573-22.