An investigation on discharge servo parameters and machining servo mode optimization of MS-WEDM

Increasing the machining efficiency of middle speed wire electrical discharge machining (MS-WEDM) is usually through optimizing process parameters, but the discharge servo parameters of the servo controller can also be optimized to achieve the same purpose. This paper develops a multi-mode servo controller for MS-WEDM to investigate discharge servo parameters. Firstly, the structure and control principle of the servo controller are introduced, and the core functions are described in detail. Secondly, it introduces the discharge servo parameters that can be optimized: gap state threshold and feedback period. At the same time, the platform specifications and parameters for optimization experiments are introduced. Thirdly, the experimental scheme and result analysis of parameter optimization are described, and the optimized parameters are obtained. Finally, different machining experiments are carried out for the multi-mode of the servo controller to investigate the effectiveness and practicability of the different machining servo modes. In the parameter optimization and machining experiments, the recording function of the servo controller was used to draw the speed curve, and the servo response effects of different servo modes were obtained.


Introduction
Wire-cut electrical discharge machining (WEDM) is an electrical discharge machining (EDM) method using wire electrodes as tools. Due to its high energy density and noncontact processing characteristics, WEDM is widely used in the processing of high hardness and high melting point materials. According to the speed of wire transport, it is usually divided into low speed (LS), middle-speed (MS), and high speed (HS). In HS-WEDM and MS-WEDM, the wire electrode is usually reciprocating. Improving machining efficiency is one of the key goals of WEDM.
Usually, researchers search for process parameters to improve processing efficiency. The process parameters of WEDM include electrical and non-electrical parameters. Electrical parameters mainly include machining polarity, pulse on time, pulse off time, peak current, and open circuit voltage. The non-electric parameters mainly include the type, pressure, and flow rate of the dielectric, wire tension, and the wire speed. Sarkar [1] optimized process parameters of γ titanium aluminide alloy through an artificial neural network (ANN) model. Hargrove [2] developed a finite element method (EFM) program to model temperature distribution in the workpiece under different cutting parameters. Patil [3] proposed a semi-empirical model for material removal rate (MRR) based on thermo-physical properties of the work piece and process parameters and an empirical model based on response surface method. Kumar [4] developed mathematical models between process parameters and responses like MRR and surface roughness (SR) by using nonlinear regression analysis. These mathematical models were then optimized by using multi-objective optimization technique based on Non-dominated Sorting Genetic Algorithm-II to obtain a pareto-optimal solution set. Rao [5] optimized machining parameters of WEDM process using an integrated statistical approach. Shihab [6] used Box-Behnken design of the response surface methodology to optimize the WEDM process parameters for machining of frictionstir-welded 5754 aluminum alloy. These research results provide a reference for improving the machining efficiency of WEDM. The method of improving machining efficiency by optimizing process parameters has been relatively mature, and the researchers began to find new approaches to improve machining efficiency.
The difference between WEDM and traditional machining is that it has its own unique servo system. Therefore, in addition to the process parameters, there are other parameters that affect the machining process. WEDM needs to track the discharge state between tool and electrode in real time and feed it back to the feed system. Such parameters related to tracking the discharge states between the electrodes can be called discharge servo parameters. Discharge servo parameters include two types, one is the threshold parameters for discriminating the discharge states, and the other is the feedback period. The threshold parameters for determining the discharge states will have different corresponding parameters according to the specific determining method. If the discharge states are determined based on the voltage values, the voltage thresholds are threshold parameters. If the voltage is converted to a frequency to determine the discharge states, the counting thresholds are threshold parameters. The feedback period is a time parameter, which determines the response time of the system to the machining. WEDM's servo system regulates motors' movement based on the state obtained by the discharge servo parameters. Different machining servo modes have different responses to the discharge state, so it is also one of the factors that affect the machining effect.
He [7] proposed a new servo control system for HS-WEDM based on discharge probability detection. The study showed the influence of threshold parameters on machining efficiency. Hoang [8] described a new approach for controlling a micro wire electrical discharge machining (μ-WEDM) process. Use voltage and current probes to measure the discharge voltage, discharge current, and discharge frequency, and then predict the material removal rate and workpiece thickness in real time to determine the feed rate. Kwon [9] developed a micro-control system using an unstable discharge pulse ratio and instantaneous discharge energy as feedback information to improve the stability and efficiency of the machining. Lee and Liao [10] developed a control system to improve the processing efficiency of workpieces with varying thicknesses. The abnormal ratio R ab defined by the proportion of abnormal sparks in a sampling period is taken as the controlled variable. Three cases were tested: the constant machining parameters, the constant R ab and the proposed adaptive R ab . Samanta [11] adopted different servo strategies for workpieces with varying thicknesses to observe the influence of servo strategies on cutting speed, surface roughness, gap voltage, and other processing characteristics. Wu [12] presented a method for the online detecting discharge state based on the voltage and current with the PSO-SVM algorithm. This method divides the discharge state into 5 types, and is applied to the HS-WEDM machining experiment of atmosphere and water mist medium. Zhang [13] proposed a two-stage discharge classification method. The first stage employs support vector machine (SVM) to distinguish open circuit, short circuit and mixed state pulses, and the second stage employs random forests (RF) to divide mixed state pulse into spark, transient arc, and arc pulse . Zhang [14] presented a gap discharge state identification and servo control method based on discharge current. It is a useful exploration of the machining of high height-diameter ratio workpieces by using a microwire electrode in high-speed wire-cut electrical discharge machining.
The above research usually starts from the discrimination of the discharge state to obtain a matching servo control system. Some of them also need to cooperate with pulse power supply, which is difficult to develop and apply. The threshold set by the state discrimination is rarely verified by experiments. The feedback period is usually set directly, and no one has studied the influence of the feedback period on the machining effect. In this study, a motion controller with adjustable discharge servo parameters and machining servo modes is developed. Therefore, we will conduct experimental research on discharge servo parameters including threshold parameters and feedback period, and analyze the movement patterns under different servo modes.
The rest content of this paper are arranged as follows: Section 2 introduces a multi-mode servo controller and its main operating principles. Section 2.1 shows optimized experimental conditions and preparations. Section 4 optimizes the threshold parameters and feedback period through experiments. In Section 4, a multi-mode machining experiments is conducted to compare the effectiveness of the machining servo modes.

Construction of the servo controller
The MS-WEDM control system usually employs the "PC + motion control card" mode. The personal computer (PC) completes functions such as human-computer interaction, parameter setting, and non-real-time information processing. The servo controller is a motion control card, which mainly completes functions such as motion information conversion and signal processing. This section mainly describes the functional structure and operation modes of the servo controller.

The composition of the servo controller
In order to meet the experimental requirements, the servo controller needs to have the following functions: (1) The feedback period can be adjusted; (2) The threshold can be adjusted according to the feedback period; (3) The speed signal can be adjusted according to the servo mode and discharge state.
The functional block diagram of the servo controller that meets the above requirements is shown in Figure 1. The servo controller contains 8 modules, and different types of modules have different shapes. The main signals and their meanings are shown in Table 1. The controller mainly contains three functions: servo regulator, interpolator, and gap state discriminator.
The operating principle of the servo controller is as follows: (1) The motion information is stored in motion information and sent to interpolator. The motion data of each axis is generated by interpolator and stored in motion data storage. Motion data storage is controlled by the feed signal F d to send the motion data (MD) to motion signal generator, then sent MD to each motor driver. (2) Frequency counter receives the gap frequency signal GF and sends the recorded value to gap state discriminator. Gap state discriminator determines the gap state GS according to the set gap thresholds G1/G2/G3 and sends GS to servo regulator. The sampling signal F b generated by feedback period signal generator is used as the drive for each discrimination and transmission; (3) Servo regulator sends the feed speed signal v ser to Feed signal generator, and adjusts v ser according to the received GS and the set servo mode SM in each feedback period. Servo regulator will send a reverse feed signal RF to Motion information when the conditions are met.

Main function of the servo controller
The servo controller developed has the basic functions of a motion controller. Like other motion controllers, the Interpolator has linear and circular interpolation functions, and is the core of motion control. This paper does not introduce the interpolation function in detail, but mainly focuses on the servo control part.

Gap state discrimination
From the perspective of the distance between the wire electrode and the workpiece, this paper takes the gap size as the research object. Discrimination of the gap state is a prerequisite for effective servo control. There are different judgment approaches for different detection circuits. Here adopts the most widely used voltage-frequency conversion circuit. The voltage-frequency conversion circuit converts the voltage between the wire electrode and the workpiece into a frequency signal. The range of the feedback frequency signal is 0~1000Hz, that is, 0Hz corresponds to 0V, and 1000Hz corresponds to the open circuit voltage. The discrimination of the gap state depends on the thresholds.
The state of a single discharge spark is generally divided into four states: open circuit, spark, arc, and short circuit. However, the discharge state is complicated, and the state of a single spark does not indicate the state of the gap, so it is usually determined based on statistical results over a period of time. This time period is the feedback period.
The voltage-frequency conversion circuit obtains the average voltage of the gap, which is also a statistical result. At the same time, in order to facilitate speed adjustment, the gap state is divided into four types according to the gap distance: limit, small, middle, large. The four gap states require three thresholds to distinguish. G1, G2, and G3 are used to represent the three thresholds. The sequence of thresholds is shown in Figure 2. The four gap states can be regarded as four distance ranges, and different gap states can be regarded as different discharge states dominate. For example, spark indicates that the number of spark discharge pulses is large in the feedback period; limit indicates that the short circuit state is dominate.

Feedback period
Most WEDM control systems are based on speed adjustment for motion. Its working principle is to discriminate the gap state in each feedback period, and adjust the feed rate according to the gap state. The feedback period is different, the response of the system is different, and the machining efficiency is also different. As shown in Figure 3, after the feedback period signal is sent, the feedback counter stops counting, and the gap state discriminator determines the state based on the thresholds and the feedback count. The servo controller adjusts the feed rate according to the servo mode.

Motion servo mode
In order to develop a stable and practical servo strategy, it is necessary to analyze the gap state obtained through the feedback period. The gap state is a transient state and may change in the next period. When the thickness changes greatly during machining, the gap state may directly change from large state to small or limit state. The limit state may also turn into middle or small due to the movement of the wire electrode. Therefore, the speed adjustment needs to consider a variety of situations to find a suitable servo strategy.
In order to apply to different machining occasions, three motion servo modes are set: mode 1, mode 2, and mode 3. Mode 1 is a constant speed mode, that is, the feed speed is maintained at v set , and only when the gap state is limit, it does not feed. Modes 2 and mode 3 are both adjustable speed modes, and the speed is adjusted according to different states. The difference is that the speed returns to zero when the mode 2 encounters limit state, and then adjusts based on the zero speed. Mode 3 stops the feed when it encounters limit state, saves the speed v ser , and adjusts the feed speed on the saved speed when there is no limit state. The speed adjustment adopts incremental type; the increment is 5 steps/s. The step   in the speed unit is equal to the motion accuracy of the machine tool. The generation of the reverse feed signal in all modes is the same, and the gap state needs to be the limit for 8 consecutive cycles (Table 2).

Parameters to be optimized
According to the composition of the servo controller, before machining experiments, there are two sets of parameters that need to be optimized to achieve better processing results. One group is the state thresholds such as G1, G2, and G3, and the other group is the feedback period T sam .

Threshold setting principle
The threshold contains three parameters ranging from 0 to 1000 and follows the relationship of G1<G2<G3. G1 mainly distinguishes the gap limit state, and the servo of the limit state corresponds to stop feed. Stopping the feed will reduce the machining efficiency. Therefore, under the premise of ensuring normal machining, the value of G1 should be as small as possible. G2 distinguishes between small and middle states. A larger G2 value can effectively avoid the arc state, but it will also cause more speed fluctuations. A small G2 value can avoid speed fluctuations, but it will reduce the surface quality.
Therefore, the value of G2 should be moderate. G3 mainly distinguishes the state of large gap, prevents the distance between the wire electrode and the workpiece from being too large, and ensures the machining efficiency. Therefore, the value of G3 should be smaller. Because the three thresholds influence each other, in accordance with the machining requirements, first ensure normal machining, and then work to improve processing efficiency. Therefore, the order of determining the three thresholds is G1, G2, and G3.

Feedback period setting principle
The feedback period T sam reflects the adjustment frequency of the control system. Under normal circumstances, the system will be stable when the frequency is low, but it will also fail to respond in time to sudden changes. High adjustment frequency can respond to various situations in time, but it may also cause system instability. The ideal value of the sampling frequency can reach both to ensure the stability of the system and to respond to various situations.

Experiment preparation
When the servo controller is developed, it is installed in the existing machine tool of MS-WEDM. The machine model is DK7732ZAA. The physical developed device of the servo controller includes a core board and an expansion board. The part of the program that requires signal processing and calculation is programmed into the FPGA chip of the core board. The expansion board is an optocoupler isolation board, used to connect with the motor drive signal and sampling signal. The experiment uses the original pulse power supply and wire transport system. The machining information is shown in Table 3. The experiment equipment is shown in Figure 4.
The servo parameters are the same as the process parameters, and the final effect is the machining efficiency and processing quality. Cutting rate (CR) and surface roughness (SR)   Pulse off time T off 6.5 T on Peak current I p 11A Wire speed v w 9m/s are the two most commonly used indicators. Usually CR and SR are in contradictory relationship. In this paper, increasing the cutting rate is the optimization index of the servo mechanism.
In addition, the developed servo controller can communicate with the host computer and record the machining status. Therefore, the speed and status statistics are also included in the scope of investigation.
In order to ensure the smooth progress of the experiment and prevent the occurrence of unobvious effects or wire rupture, combined with the preliminary exploratory experiments, the determined process parameters are shown in Table 4.

Discharge servo parameter optimization
This section will conduct optimization experiments on the two sets of servo parameters of threshold and feedback period and analyze the results.

Experiment design and implementation
In addition to the determined process parameters, the feedback period and servo mode must also be determined. T sam is set to 0.5s, and SM adopts mode 2.  According to the order of threshold optimization and considering the specific numerical range, the experiment arrangement and results is shown in Table 5. The workpiece material is AISI1045 steel, the size is High × Width = 15 × 50(mm).
According to Table 5, this experiment has three stages. In the first stage, that is, experiment numbers 1.1 to 1.3, G2 and G3 are set large values and remain fixed, and G1 is small and changed. By the results, we can find the critical value of G1 that can guarantee normal machining. In the second stage, that is, experiment numbers 2.1 to 2.4, the values of G1 and G3 are kept fixed, and the value of G2 is generated based on the optimized G1 value. The optimized value of G2 is obtained according to the maximum cutting rate. In the third stage, that is, experiment numbers 3.1 to 3.4, the values of G1 and G2 are fixed, and the G3 value is generated based on the optimized G2 value. We can obtain the optimized value of G3 according to the machining efficiency.

Analysis of results
According to the results of the first stage, the optimized value of G1 is 50Hz which can ensure the normal machining. The experimental data of the second stage is charted in Figure 5a, and the optimized value of G2 is 200Hz. The experimental data of the third stage is charted in Figure 5b, and the optimal value of G3 is 500Hz. The three optimized threshold values are also the most efficient in the experiments.
The following conclusions can be obtained through experiments: (1) thresholds satisfying G1 conditions can be machined; (2) threshold changes will have a significant impact on machining efficiency; (3) threshold optimization can improve machining efficiency. In the end, 16 sets of thresholds are set for machining options based on the optimized thresholds obtained.

Feedback period optimization
In WEDM, the wire electrode is always in motion, and it is affected by the discharge spark to produce a slight vibration, so the gap state changes frequently, even the same position can get the different state. The feedback period is to judge the gap state for a period of time, but due to the variability of the gap state, the feedback period is not as small as possible, but can match the processing state.

Experiment design and implementation
This experiment is to verify the effect of the feedback period on the machining efficiency, adopt the optimized threshold results and servo mode 3 for the machining experiments, change the value of the feedback period, and record the cutting rate and the discharge state during machining. The workpiece is the same as in Section 2.1. The experimental arrangement is shown in Table 6. The experimental result is shown in Table 6 and Figure 6.

Analysis of results
According to the experimental results, the cutting rate is maximum when the feedback period is set to 0.5s, and the speed will be reduced when the feedback period is less than or greater than 0.5s. Changing the feedback period causes the gap state to change during machining. According to Figure 6b, when the feedback period is as large as 1s, the proportion of middle state exceeds 50%, indicating that the machining state is relatively stable. As the feedback period reduces, the proportion of the middle state becomes smaller, and the proportion of the large state increases, indicating that the frequency of speed adjustment in machining increases, which causes the cutting rate to increase. When the feedback period is 0.25s, the limit state increases, indicating that too frequent speed adjustment leads to poor followability of wire electrode and workpiece, which will reduce the cutting rate. In order to analyze the effect of the feedback period on the cutting rate in more detail, the speed records during machining are plotted as a curve, as shown in Figure 7. Figure 7 shows the feed change of the machining time between 100 and 200s when the feedback periods are 0.25s, 0.5s, and 1s. The periodic zero speed is due to the power off when the wire electrode commutates and the feed must be stopped. The commutation period is 18s. Figure 7d shows the waveform structure of a single period, with crests, troughs, and flat segments. In Figure 7a, the speed changes more frequently, with 3 to 4 wave crests and 2 to 3 wave troughs appearing in a single wire cycle, with large amplitude changes and almost no flat sections. In Figure 7b, there are 3 crests and 2 troughs in one cycle, with small amplitude changes and flat segments. In Figure 7c, there are 0~2 crests or troughs in one cycle, and the main parts are flat.
5 Multi-mode servo controller machining experiment

Comparison of different servo modes
Adjusting the feed rate according to different gap states is a recognized servo method for WEDM. However, the kind of servo mode can be used to achieve better machining efficiency and quality is the focus of servo system research.
The three servo modes mentioned in Section 2 are all based on speed adjustment. The specific realization of speed adjustment adopts an incremental method. In mode 2 and mode 3, the speed increment is 5 steps per second. When the gap state is large the speed increases by 5, the small state speed  decreases by 5, and the limit state speed drops to 0. The machine tool accuracy is 1μm, and the discharge gap is tens of microns, which can meet the machining requirements. Similarly, mode 1 and mode 2 can also meet machining requirements, and can be applied to different occasions. Mode 1 feeds at a constant speed, which can provide better machining stability. With mode 2 in the limit state, the speed drops to 0 and then accelerates again, which can be applied to poor machining conditions. This section conducts research on machining in three modes.

Experiment design and implementation
According to the comparison of the periods used in Section 4, the feedback period is set to 0.5s, and the threshold values use the optimal thresholds. The workpieces are the same as Section 4. At the same time, in order to analyze the change of the machining state at different speeds, the change of the machining state at different speeds in mode 1 is added. The experimental list is shown in Table 7. The cutting rate and gap state ratio are shown in Figure 8.

The influence of servo mode on cutting rate
According to Figure 8 and Table 7, mode 1 will get different cutting rate due to different speed settings, and mode 2 and mode 3 are not affected by the speed setting. The cutting rate of mode 1 increases with the increase of the setting speed, and exceeds the cutting rate of mode 2 and mode 3 if the appropriate set speed is selected. Mode 3 has higher machining efficiency than mode 2. Mode 2 will set the speed to zero in the limit state, and then accelerate from zero in the large state. Although a smoother acceleration is obtained, the feed speed is about 22% lower than that in mode 3. Although mode 3 and mode 2 are not the most efficient, they have the ability to self-regulate, so if they encounter varying thickness or speed regulation demands, they can exert better results. Mode 1 can achieve very high processing efficiency, but the optimal setting speed needs to be explored in advance, which limits its application in more occasions.

Feed speed change analysis
In order to study the influence of different servo modes on the feed speed, three groups of experiments are selected of the experiment: 5.3, 5.6, 5.7, and 5.8 as the analysis and research objects. The machining time is selected as the sample of the speed curve of 300~400s, and the speed curves are shown in Figure 9.
Although mode 1 is a constant speed mode, the speed will fluctuate because the gap state is changing. As shown in Figure 8a and b, the speed waveforms obtained by setting different feed speeds are very different. When the speed is set to 40, the most is flat except for the transmission speed fluctuation when the wire is moved in commutation. When the speed is set to 70, there will be multiple speed fluctuations in one commutation cycle. The stripes on the surface of the workpiece are more obvious after machining. As shown in Figure 8c, the speed is reset to zero in the limit state in mode 2, and then it is accelerated again. The curve in the first part of each cycle will be smoother, the machining will be more stable, and the surface quality will be better. As shown in Figure 8d, mode 3 resumes the speed after the limit state ends, so the speed will not fluctuate greatly in each commutation cycle, and the feed speed is the fastest.

Conclusions
This paper proposes discharge servo parameters and their experimental optimization methods. The main contributions are as follows: (1) A servo controller with multiple modes and adjustable discharge servo parameters was developed and used for experimental verification. (2) Different optimization methods are used to optimize the gap state thresholds and feedback period, and it is proved that the discharge servo parameters have a great influence on the machining efficiency. In the traditional WEDM system, the improvement of cutting efficiency is mainly through process parameters. The motion controller proposed in this paper provides another method to improve cutting efficiency from three aspects: gap state discrimination, feedback cycle, and servo mode. This paper expands the methods and means of WEDM to improve cutting efficiency.
This paper only conducted experiments on parts with a certain thickness. The next step will be based on the developed Data availability All data generated or analyzed during this study are included in this published paper.
Code availability Not applicable.

Declarations
Ethics approval Not applicable.
Consent to participate Not applicable.
Consent to publish Not applicable.