Modeling of Interelectrode Gap in Electric Discharge Machining andMinimumVarianceSelf-TuningControlof InterelectrodeGap

In the electric discharge machining system, the determination of the gap between the anode and the cathode is a difficult point of this kind of machining approach. An accurate mathematical model of interelectrode gap is obtained, and the precise control of the gap is achieved on this basis. In this paper, based on the example of discharge machining of P-type single crystal Si, the theoretical analysis proved that the discharge channel can be equivalent to pure resistance, and the physical model of the interelectrode gap and voltage and current was established. ,e order and parameters of the EDM system model were determined by adopting the system identification theory. We designed the minimum variance self-correcting controller to accurately control the interelectrode gap in combination with the actual machining process. Experimental results show that the interelectrode gap model can correctly reflect the interelectrode gap in the actual machining process; the minimum variance self-correcting controller eliminates the short circuit phenomenon during processing and can stably track different desired gaps; the material removal rate and the surface roughness decrease with the increase of the interelectrode gap.


Introduction
Single crystal Si is the most widely used semiconductor material [1,2], when adopting conventional machining methods; it has low efficiency and poor surface quality, but it is easy to collapse. Electrical discharge machining (EDM) [3][4][5] technology for high-efficiency, high-quality processing of single crystal Si has become a research hotspot [6][7][8]. EDM has high energy density [9][10][11][12]; it is not limited by the brittleness of materials. It is widely used in machining brittle and hard materials. EDM is a typical complex nonlinear multiparameter time-varying system [13,14]; both mechanical parameters and power parameters determine the removal efficiency and surface roughness of the workpiece and the electrode loss. e discharge mechanism of EDM is rather complex and is often affected by many factors such as adhesion, cavitation, and short-circuit phenomena [15,16], which brings considerable difficulties to detection and control. Since discharge conditions such as no-load, transitional arc, stable arc, and short circuit [3,4,17] seriously affect processing efficiency and surface quality, the EDM equipment is required to have a perfect interelectrode gap detection and control system. Behrens et al. [18] proposed the fact that the discharge state can be identified by comparing detected gap voltage with preset voltage. Rajurkar et al. [19] discerned discharge state by monitoring the interelectrode characteristic voltage values and compared them with the known voltage thresholds. Dauw and Wong et al. [20][21][22] also used the voltage threshold method to detect the electrode gap; although this method is simple, it requires a large number of tests and the thresholds for stable and transitional arc discharges are difficult to determine, and the determined voltage threshold has no universality; for different processing conditions, the corresponding threshold voltage should be determined according to the specific situation. Han et al. [23] proposed a transistor-based constant pulse generator to monitor the gap by using the average breakdown delay time. Bhattacharyya et al. [24] adopted the radio frequency signal (RFS) detection method to monitor the gap distance according to different discharge gap RFS characteristics corresponding to different gap discharge state. Other methods for identifying EDM gap distance include wavelet transform detection [25], fuzzy identification [26], and neural network identification [27,28]. e abovementioned EDM interelectrode gap detection method cannot accurately detect the specific value of the interelectrode gap, resulting in the fact that subsequent control can only use the artificial intelligence method to conduct the interelectrode gap estimation to control the electrode feeding according to the obtained data experimentally. Rajurkar et al. [29,30] established a random model of discharging machining; the spark frequency was used as the feedback signal of the discharge gap to adjust the servo feed speed, which can reduce the change of the control process and improve the processing efficiency. Weck and Dehmer [31] controlled the interelectrode gap by the feedback signal of the adaptive control system with the breakdown delay time and the drop time to ensure that the discharge is in a stable state. Behrens and Ginzel [32] designed the discharge gap controller with the open circuit rate and short circuit rate of the machining process as the inputs. e controller had higher processing efficiency and lower electrode loss in rough or finishing machining. Kao et al. [33,34] used the spark deviation rate and the average gap voltage as the input of the fuzzy controller, the output is the electrode feed speed and the feed direction, and the performance of the paste controller was evaluated by the gain control controller. Kaneko and Onodera [35] took the arc rate and the short circuit rate as the input of the fuzzy control system to control the electrode lifting motion, which improved the machining speed and depth.
In the existing EDM equipment, the power supply parameters control method is generally adopted to realize the control of the processing process. Because there is no accurate mathematical model yet, only relying on the data obtained from trial and error processed to estimate the gap with large error and lower control precision. To solve the above problem, the EDM of P-type single crystal Si is used as an example to establish the EDM interelectrode gap equivalent resistance model; the order and parameters of the model are determined by system identification theory. e minimum variance self-correction controller is designed to accurately control the interelectrode gap and verified by actual machining.

Test Equipment.
In order to facilitate the analysis of discharge circuit volt-ampere characteristics, a self-designed EDM test equipment is adopted, which is shown in Figure 1. It is mainly composed of pulse power supply, mechanical device, and photoelectric distance meter; each part is independent, without interference or coupling. Pulse power supply voltage adjustment range is 90 V∼110 V, pulse width adjustment range is 24 μs∼100 μs, and pulse duty cycle range is 3∼12. e mechanical device consists of a marble base and vertical column, X-Y horizontal table and Z-direction table, precision ball screw, drive motor and coupling, etc. e feed resolution of the Z-axis worktable is 0.1 μm, the positioning accuracy is 300 mm with stroke maximum error ±0.02 mm, and repeat positioning accuracy does not exceed ±0.04 mm. e photoelectric distance meter is composed of a precision grating sensor mounted on the Z-direction workbench and an inductance micrometer, the grating sensor is used to read the displacement value, and the inductance micrometer is used to determine the zero reference point of Z-axis table displacement. e workpiece is a cylindrical Si rod with a length of 30 mm and a diameter of 25.4 mm installed on the chuck. e insulating working fluid is a special oil for electric spark. e signal acquisition device adopts Tektronix DPO 2014B quad-channel digital phosphor oscilloscope.

EDM Equivalent Circuit.
e discharge circuit of the EDM system can be equivalent to the circuit shown in Figure 2. When the insulating working fluid medium is broken down to form a discharge loop, the interelectrode voltage and loop current will become feedback signals during processing. In order to study the volt-ampere characteristics of the discharge circuit, the feedback signal must be acquired without distortion, and a precision sampling resistor with a resistance of 0.1 Ω is connected close to the side of the negative pole of the pulse power supply. Because the interelectrode gap voltage cannot be directly measured, the oscilloscope 1 channel measures the sum of the gap voltage, the workpiece voltage, and the sampling resistor voltage. Oscilloscope channel 2 measures the voltage across the sampling resistor and further converts it into a loop current. e EDM interelectrode voltage and loop current waveform are shown in Figure 3.
According to Figure 3, the single pulse discharge is divided into breakdown delay, spark discharge, and arc discharge. During the spark discharge phase, the interelectrode voltage gradually decreases and the current increases rapidly, showing a significant negative impedance characteristic, and the spark discharge occurs at the moment when the insulating working fluid medium is just broken down, so the spark discharge is an unstable transient process. e interelectrode voltage and the loop current are almost constant during the arc discharge phase. Due to the large current in the arc discharge phase, instantaneous high temperature and intense luminescence are generated.

EDM Interelectrode Gap Model Based on Equivalent Resistant
In the EDM process, when the spark is converted into arc discharge, the position and shape of the discharge channel are in an equilibrium state. At this time, the diameter of discharge channel remains merely the same, the voltage between electrodes and the loop current are also basically unchanged, and the interelectrode insulation dielectric changes from insulating state into plasma.

Analysis of Interelectrode
Impedance. e discharge channel is full of plasma containing a number of substantially equal positively and negatively charged particles and neutral particles. e distance between cathode and anode is rather small only with a few electron free paths, so the size of channel plasma region is almost equal to the gap between electrodes. Since the end face of electrode is parallel to the surface of workpiece, insulating working fluid medium is filled between the two, so there exists a plate capacitance between the electrodes. When interelectrode insulating working fluid is broken down, the plasma is hindered during the high-speed movement between electrodes, so there is a resistance between electrodes and the current in entire discharge circuit instantaneously increases. According to the law of electromagnetic induction, there exists a little inductance between the electrodes; however, when discharge channel expands to the position-shape balance, the interelectrode voltage and loop current still remain unchanged; the interelectrode inductance is equivalent to a wire which can be thought of as not existing. As the current of plate capacitor is mainly determined by the voltage change rate between electrodes, the capacitor is bridged between electrode and workpiece. Combined with above analysis, the EDM interelectrode gap can be equivalent to the circuit impedance model shown in Figure 4.
According to the interelectrode impedance model shown in Figure 4, the interelectrode impedance Z of EDM can be represented as (1) C is the interelectrode equivalent capacitance. Before the breakdown of interelectrode dielectric fluid, electrode tip surface, workpiece surface, and dielectric fluid in the middle constitute the plate capacitor. e capacitance expression of plate capacitor is as follows: In that formula, ε is the dielectric constant of dielectric fluid. e dielectric fluid used in EDM is usually spark oil, so ε is set as 2.8; ε 0 is vacuum dielectric constant (ε 0 � 8.86 × 10 -12 F/m); S is the positive area of electrode and workpiece. e area of electrode in conventional processing is generally less than that of workpiece, so S is actually the area of electrode. In terms of the technical index of Charmilles Act Spark, the maximum area of the electrodes is 20 cm 2 . Because the large area of the electrode can easily lead to arc-drawing, which further results in large-area burning on the workpiece surface, S is set as the maximum area of the electrodes (S � 20 cm 2 ); d is the interelectrode distance, and, in general, when d is less than 10 μm, short circuit and arcdrawing can occur, so d is set as the minimum of the interelectrode distance (d � 10 μm).
e parameters determined by the above analysis determine the maximum value of interelectrode plate capacitance; namely, C � 4.96 × 10 − 9 F after analysis and calculation. ω is pulse power supply frequency. ere is a unique breakdown delay phenomenon in the normal discharge stage of discharge machining, which usually lasts about a few microseconds. If the pulse power supply is small in pulse width, it can be difficult to break through interelectrode dielectric fluid and form a discharge channel. According to the technical index of Charmilles Act Spark, the pulse width and interval are both set as 1 μs, so ω, the maximum operating frequency of pulse power supply, is set at 0.5 MHz.

Mathematical Problems in Engineering
With combination of the above analysis with Formulas (1) and (2), a simplified expression of interelectrode impedance Z in stable discharge stage of EDM system can be obtained as follows: R is the equivalent resistance of plasma discharge channel. In the normal discharge stage of EDM, the resistance of plasma discharge channel is usually several ohms. erefore Formula (3) can be simplified as follows: In Formula (1), the phase angle difference between interelectrode voltage and current is as follows: Put the ω and C determined by the above analysis into Formula (5), and the following formula can be obtained: When the EDM system enters the stable discharge stage, the interelectrode resistance is generally less than 5 ohms. erefore, the phase angle difference between current and voltage in the interelectrode impedance model is less than 0.01°, and there is almost no lag in current. e current and voltage are in the same phase. erefore, according to the above comprehensive analysis, the interelectrode impedance in stable discharge stage of EDM can be equivalent to pure resistance.

Analysis of Plasma Channel Pressure Drop.
When the EDM interelectrode plasma channel in normal discharge stage is equivalent to pure resistance, the acquisition circuit shown in Figure 2 can be simplified to Figure 5.
From the partial pressure relationship shown in Figure 5, the voltage u of interelectrode equivalent resistance (plasma channels) can be obtained as where U is the oscilloscope 1-channel acquisition voltage, u is the voltage across the equivalent resistance (plasma channel) between the electrodes, u R X is the voltage of the workpiece equivalent resistance, and u R S is the voltage of the sampling resistor. e removal rate of workpiece and electrode by single pulse discharge is very small and the interelectrode heat is less diffused; therefore, the effect of temperature on the equivalent resistance of electrode and workpiece can be ignored.
e equivalent resistance of the semiconductor material is measured by using a short circuit test to make electrode contact with workpiece material closely. e test circuit is shown in Figure 6. e loop current i is obtained as the voltage is divided by resistance of the sampling resistor; the equivalent resistance of the semiconductor is According to Formula (8), the equivalent resistance of the semiconductor can be obtained in the short circuit state. e resistance of sampling resistor is known, according to Formula (7); the voltage of equivalent impedance (plasma channel) between electrodes is

Derivation of Interelectrode Gap Model.
According to the voltage of interelectrode plasma channel and the loop current, the equivalent resistance of plasma channel is as follows: where u is the equivalent resistance voltage between electrodes and i is the loop current. According to the resistance definition, the resistance R is u R R P (power internal resistance) Pulse power supply Figure 5: EDM simplified circuit.
where ρ is the resistivity of the plasma channel, d is the length of channel in the plasma area, the size of the area is so small with only a few electron free paths in total, almost equal to the interelectrode gap, and s is the cross section of the discharge channel in the plasma area, rather than the area directly facing electrode and workpiece. Combined with Formula (10) and Formula (11), the following can be obtained: e resistivity ρ of the plasma channel is highly related to the ionization degree of the medium [36], but the resistivity measurement of plasma channel is rather difficult. When the interelectrode insulating working fluid medium is broken down, the discharge channel completes expansion in a very short time (only a few microseconds); the diameter of discharge channel is stabilized near the maximum value [37,38]; the larger the interelectrode distance becomes, the larger the diameter of the channel is. en, in the EDM stable arc discharge phase, the cross-sectional area of the discharge channel remains unchanged. Here, we do the following treatment and rewrite Formula (12) into where κ is called the equivalent resistance of the plasma channel. Combined with Formula (13) and Formula (14), the EDM interelectrode gap d can be obtained: 3.4. Determination of Equivalent Resistivity κ. κ values corresponding to different d values are determined by combining the interelectrode voltage u with the loop current i obtained synchronously. e rod copper electrode is used in the experiment and the electrode diameter is 10 mm. e workpiece material is P-type single crystal Si; the parameters are shown in Table 1. e gap between electrodes ranges from 10 μm to 70 μm, and each time increases to 10 μm. When the gap is greater than 70 μm, the discharge phenomenon no longer occurs. e pulse on and pulse off of power supply are 100 μs and 400 μs, respectively. Due to the randomness in EDM, each set of tests was conducted 30 times; the test data is shown in Table 2. e least squares fit is performed on the experimental data in Table 2, and the fitting curve is shown in Figure 7.
e results of the variance analysis of average equivalent resistivity κ ave of the plasma channel and the interelectrode gap d by least squares fitting are shown in Table 3. e squared error sum (SSE) of variance analysis results in Table 3 is 0.07158; if the value is closer to 0, this indicates that the expression fit is better and the data prediction is more successful. e R-square is 0.9986, when the value is closer to 1, indicating that the correlation between the fitted value and the experimental value becomes higher. e correction coefficient (Adj R-square) is 0.9983, which means that 0.17% of the test data cannot be explained by this fitting expression. e root mean square error (RMSE) is 0.1196, which shows the degree of deviation of the fitted expression from the true value; the smaller the value is, the higher the fitting degree is. e relationship between average equivalent resistivity of plasma channel and the interelectrode gap d is According to Formula (15) and Formula (16), the EDM interelectrode gap can be obtained as

Verification of EDM Interelectrode Gap
Model. e model in (17) was verified using a single pulse discharge. 30 tests were performed at each interval; the 3σ-test method, also called Leine Da test, is used to analyze the test data; σ is the standard deviation: where n ≥ 25, for a certain observation data e observation data x i is the gross error, where the mean x of observation data x i is A rectangular coordinate system is established; the model calculation distance of the horizontal axis and the actual distance is vertical axis. e minimum, maximum,  Figure 8. It can be seen from Figure 8 that the minimum, maximum, and average values of the model calculated gap are within ±3σ, in which the σ is the minimum value in Table 4; the model calculation distance has no gross error.

Order Identification.
A single input single output (SISO) model of the EDM system was established based on the system identification theory. Taking the moving position of the electrode as the control input and the interelectrode gap d as the output, the model of the EDM system is identified. e Akaike information criterion (AIC) method can objectively determine the model order of the system. e model of single input and single output process is described as where u(k) is the input variable of the process, in the identification process, u(k) represents the moving position of the electrode, z(k) is the output variable of the process, z(k) is the interelectrode gap d, ξ(k) is the uncorrelated random noise with the mean value of zero and the variance σ 2 v , and A(z − 1 ) and B(z − 1 ) are the delay operator polynomials:        Mathematical Problems in Engineering e estimated value of the model order is n; the AIC guidelines are where θ ML � a 1 a 2 · · · a n , b 0 b 1 · · · b n T , where L is the data length. When (23) reaches the minimum value, then n can be considered as the true order of the model. e spectral density of the inverted M sequence is similar to that of the M sequence, which is twice as large as that of the M sequence and has no direct current component. erefore, in this study, the order of the EDM system is identified using the inverse M sequence that can fully stimulate various modes of the system. Combined with the characteristics of the EDM system, in view of the continuous erosion of the workpiece and the electrode in the actual processing, the amplitude of the reverse M sequence is set to 0 and 10 μm after repeated trials. e inverse M sequence in the identification process is shown in Figure 9, 0 means that the electrode remains in the original place, and 10 μm means that the electrode moves 10 μm toward the workpiece. e experiment was repeated 3 times, the order n of the model can be determined by AIC criterion, and the results are shown in Figure 10. It can be seen from the figure that the three test results n are 2, so the order of the EDM system model is n � 2.

Parameter Estimation and Simulation.
e least squares recursive algorithm is widely used to estimate the model parameters. With the increase of data collection, in order to prevent "data saturation," this paper uses the forgetting factor recursive least square method to estimate the parameters of the system. Since EDM is a 2-order system, the SISO system model is described in (21); the least-squares expression is where a 1 , a 2 , b 0 , and b 1 are model parameters, u(k) is the moving position of the electrode, and z(k) is the interelectrode gap d.
Equation (25) can be written as  Mathematical Problems in Engineering where where h(k) is the observable data vector and θ is the system parameter needed to be identified. e parameter estimation equation for the forgetting factor recursive least squares is , where λ(0 < λ ≤ 1) is the forgetting factor and P is the covariance matrix. e recursive least squares algorithm of forgetting factor is simulated in MATLAB environment. e second-order system shown in Formula (25) is tested. e time-varying parameters of the subject are set as follows: Set the initial values as P(0) � 10 6 I, θ(0) � 0. e forgetting factor λ is set as 0.95, 0.98, and 1, respectively, and the white noise with variance of 1 is selected as the input signal of u(k).
In Figure 11, when the forgetting factor λ � 1, the recursive least squares algorithm of forgetting factor degenerates to the simulation result of the recursive least squares algorithm. e dotted line represents the reference value of system model parameters, and the solid line represents the estimation result of algorithm. When k � 500, the system model parameters change abruptly, and the estimated value of recursive least squares algorithm differs from the true value greatly, so the recursive least squares algorithm cannot be applied to parameter estimation of the model parameter jump. Figure 12 shows the parameter estimation result when forgetting factor λ � 0.98. It can be seen from the figure that FFRLS can track the system mutation effectively when system changes abruptly. Figure 13 is the result of parameter estimation when forgetting factor λ � 0.95. Compared with the result when the forgetting factor λ � 0.98, the algorithm converges faster but shows larger fluctuation.
Based on the above simulation results, the recursive least square method of forgetting factor is selected for parameter identification of single crystal silicon EDM system model, in which the forgetting factor λ is set as 0.98.

Controller Design.
Based on the estimated model, the minimum variance self-correction controller uses the variance of the output error of the system as a function of the performance index to ensure that the error variance in the steady state is minimized; according to the calculated control law, the parameters are adjusted to realize the process control. Consider the following system: where u(k) and z(k) represent the moving position of the electrode and interelectrode gap, respectively, where C(z − 1 ) is a Hurwitz polynomial, ξ(k) is white noise with variance σ 2 , and d � 1 is the number of pure delays; since the order of the EDM system is 2nd order, there are Interelectrode gap at iteration k + d is based on the electrode position and gap measurement at iteration k and the previous iteration. is predicted gap at iteration k + d is denoted by z(k + d | k), and the prediction error is Interelectrode gap prediction error variance is e minimum d-step optimal prediction output with y * (k + d | k) in above performance index equation (33) needs to satisfy

Mathematical Problems in Engineering
Equation (34) is called the optimal output prediction equation, and (35) is called the Diophantine equation. erefore, the minimum variance control law is where z r are the reference gap and z are the measurement gaps. Mathematical Problems in Engineering estimate the order and parameters of the system model. On this basis, the minimum variance self-tuning controller based on single crystal silicon EDM system is designed. In order to verify the performance of the designed controller, a control platform for the interelectrode spacing of single crystal silicon EDM system is designed. e overall scheme of the control platform is shown in Figure 14. e pulse power supply in Figure 1 is adopted here. e workpiece is P-type single crystal silicon and its parameters are shown in Table 1. e output voltage range of signal conditioning module is 0∼10 V. e NI PXle-5172 data acquisition card is used to collect voltage and current synchronously, and the sampling frequency is set as 10 MS/s. e motor motion is controlled by the NI PXle-7342 motion controller with the maximum pulse output rate as 4 MHz. Yaskawa SGM7J servo motor is used. rough the test, the motor rotates for one circle and the electrode moves 104 μm. In order to reduce the error of electrode movement, the motor is set to rotate for one circle at 105 pulses, which is equivalent to electrode moving by 1 μm at 10 pulses. e pulse output rate of the motion controller is set as 4 MHz, and it takes 0.25 μs to output one pulse. e position of the electrode is adjusted every 100 ms in the experiment.

Overall Design of the Control
According to the overall architecture requirements of the above control system, a control platform for the interelectrode spacing of single crystal silicon EDM system is built. e overall structure of the control platform is shown in Figure 15(a). e multifunction motion control card is integrated with the high-speed data acquisition card in the main control computer, and the external terminals remain to facilitate the connection between signal lines and power lines. e main control system is shown in Figure 15(b).

Controller Stability Test.
Based on the control platform for the interelectrode spacing of single crystal silicon EDM system shown in Figure 15, combined with the minimum variance self-tuning control algorithm, the control performance test of interelectrode spacing of single crystal silicon EDM is completed. Given the reference tracking waveform in the experiment, the stability of the reference tracking waveform under the control algorithm is observed. Because the range of the model established in Section 2 is 10∼70 μm, the output range of the control system for the interelectrode spacing of single crystal silicon EDM is limited to 10∼70 μm. e waveform of the tracking input signal is straight line and square wave, and the output interval is d. Figures 16 and 17 show the actual tracking effect and parameter identification results. Figure 16 shows the experimental effect and parameter identification results of the linear-tracking controller. Figure 16(a) shows the interelectrode spacing tracking effect. e red dotted line represents the desired reference spacing with the expected reference spacing as 50 μm while the blue solid line represents the actual output interelectrode spacing. Figure 16(b) shows the motion of electrodes. From the actual tracking results, it can be seen that the initial adjustment process takes a little longer time , resulting from inadequate data acquisition at the initial stage of the experiment, electromagnetic interference of pulse power supply, interference of processing environment, and inaccurate identification of system model parameters. But after a short adjustment, the system model parameters tend to be stable, and the actual spacing can be used to track the reference spacing steadily. Figures 16(c) and 16(d) show the identification results of the system model parameters. After a short adjustment, the identification results of the four parameters tend to be a straight line in the figure, indicating stable parameter identification results. Figure 17 is the result of square wave tracking experiment and parameter identification. e maximum and minimum expected reference spacing (square wave) are  60 μm and 40 μm, respectively. Figure 17(b) is the motion of electrodes. After a short adjustment, the parameters of the system model tend to be stable, and the actual spacing can be used to track the reference spacing steadily. Figures 17(c) and 17(d) show identification results of the system model parameters. After a short adjustment in the early stage, identification results of the four parameters show a straight line in the figure, indicating stable parameter identification results. Because the preset reference spacing is square wave, when the reference spacing changes from the maximum 60 μm to the minimum 40 μm or from the minimum 40 μm to the maximum 60 μm, it can be seen from Figure 17(b) that the controller will adjust the motion of electrodes. Electrodes at the inflection point have a large amplitude in motion position. After a short period of adjustment, the actual interelectrode spacing can be used to track reference spacing again. According to Figures 17(a) and 17(b), when the reference spacing changes from 60 μm to 40 μm, indicating decreasing interelectrode spacing, electrodes will move towards workpiece; and when the reference spacing changes from 40 μm to 60 μm, indicating increasing interelectrode spacing, electrodes will move away from workpiece. erefore, actually, the variation of the interelectrode spacing is consistent with the motion of electrodes. e parameter estimates are stationary. e results show that the controller has sound performance with stable parameter identification.

Comparison Experiment between Minimum Variance Self-Tuning Control and Constant Speed Feed of Electrodes.
Minimum variance self-tuning control and constant speed feed control of electrodes are used to process single crystal silicon. e reference value of interelectrode spacing of the minimum variance self-tuning control is 50 μm. When the feed rate of electrodes is constant, the velocity of the electrode is 8 μm/s and 2 μm/s, respectively. Using the interelectrode spacing model established in Section 2, the interelectrode spacing in constant speed feed control is monitored in real time, and the interelectrode spacing during constant speed feed control is obtained. e results of comparison between minimum variance self-tuning control and electrode constant speed feed control are shown in Figure 18. e red solid line shows the change process of the interelectrode spacing when the minimum variance selftuning control is adopted, and the interelectrode spacing always remains stable, close to the reference value of 50 μm; the green curve shows the change process of the interelectrode spacing at the electrode feed speed of 8 μm/s. From the figure, it can be seen that the interelectrode spacing decreases gradually, but the decreasing rate is large at first and then becomes small. It is because the speed of electrode movement remains unchanged, but it is faster than that of single crystal silicon. As electrodes get closer to the workpiece, the energy of plasma discharge channel between electrodes becomes larger, and so does the corrosion removal amount of single crystal silicon. As a result, the interelectrode spacing decreases more and more slowly. When the processing lasts about 55 s, single crystal silicon has already touched electrodes, and the short circuit between the EDM electrodes occurs. e blue curve shows the change process of the interelectrode spacing at the electrode feed speed of 2 μm/s. It can be seen from the figure that the interelectrode spacing decreases gradually and then stabilizes around 60 μm. is is because, under different interelectrode spacings, the corrosion removal speed of the workpiece differs. In the beginning, the movement speed of electrodes is faster than that of the workpiece, and interelectrode spacing decreases. When the corrosion removal speed of the workpiece is exactly equal to the movement speed of electrodes, the spacing between the two will not change any more. e actual processing effect under three control modes is shown in Figure 19.
e Keyence VHX-5000 digital microscope system (Keyence Co., Ltd., China) is used to magnify and scan the processed area. e system is shown in Figure 20. e magnified scanning results of A, B, and C parts in Figure 19 are shown in Figures 21-23, respectively. It can be seen from Figure 21 that when the electrode feed speed is 2 μm/s, the surface quality is better due to the slow feed speed, but with very low processing efficiency. From Figure 22, it can be seen that the minimum variance selftuning control is used to stabilize the interelectrode spacing around 50 μm. Because the interelectrode spacing is smaller than that at the feed speed of 2 μm/s, the discharge energy is larger and the erosion removal rate is higher but with a lower surface quality. It can be seen from Figure 23 that, at the electrode feed speed of 8 μm/s, the interelectrode spacing decreases because the feed speed is greater than the erosion removal speed. In this process, the arc-drawing first occurs, which causes surface burning of the workpiece and makes electrodes continue to feed until single crystal silicon touches them, resulting in short circuit. If it is in short circuit for a long time, it will damage the pulse power supply.

Comparison Experiments of Process Objectives under Different Interelectrode Spacings.
e material removal rate and surface roughness are both affected by discharge voltage and circuit current. e literature [38] studied the influence of interelectrode spacing on discharge voltage and circuit current. erefore, it is necessary to study the effect of interelectrode spacing on material removal rate and surface roughness. e reference spacing of the minimum variance self-tuning control is set to be 20 μm, 40 μm, and 60 μm, respectively, and the experimental duration is 60 seconds. Figure 24 shows the tracking effect and parameter identification result with the expected interelectrode spacing of 20 μm. e red dotted line in Figure 24(a) represents the expected reference value of the interelectrode spacing while the blue solid line represents the actual output interelectrode spacing. Figure 24(b) represents the motion position of electrodes. Figures 24(c) and 24(d) show the identification results of system model parameters a and b. After a short adjustment in the early stage, the identification results of four parameters tend to be linear in the figure. Although parameters a 1 and a 2 will jump slightly, they will soon remain stable under the control algorithm. When the interelectrode spacing is 20 μm, the processing effect of single crystal silicon is shown in Figure 25. Figure 26 shows the tracking effect and parameter identification result of the expected value of the interelectrode spacing of 40 μm. Because of the complexity and randomness of EDM system, the parameters a 1 , a 2 , b 0 , and b 1 of the system model will jump slightly, but under the control of the minimum variance self-tuning control algorithm the parameters remain stable quickly. When the interelectrode spacing is 40 μm, the processing effect of single crystal silicon is shown in Figure 27. Figure 28 is the tracking effect and parameter identification result with the expected interelectrode spacing of 60 μm. When the interelectrode spacing is 60 μm, the processing effect of single crystal silicon is shown in Figure 29.
From Figures 25,27,and 29, it can be seen that, under the control of the minimum variance self-tuning control algorithm, there is no burning or short circuit in the processing, which shows that the control algorithm can effectively control the interelectrode spacing and prevent the arc- Arc burn area Figure 19: Experimental results at different feed rates.
drawing or short circuit from happening. As can be seen from the figure, with the increase of the interelectrode spacing, the processing depth decreases continuously, but the surface roughness decreases gradually. After the experiment is completed, the quality of single crystal silicon before and after processing is measured by JD500-3 precision electronic balance (Shenyang Dragon Electronics Co., Ltd.), and the material removal rate is further calculated. e JD500-3 precision electronic balance is shown in Figure 30. e maximum measurement value of the balance is 500 g, and the precision is 0.001 g. e surface morphology and roughness of the processed single crystal silicon are      measured by Leica DCM 3D laser confocal microscope (Leica Microsystems Ltd.). As shown in Figure 31, the measurement accuracy of Leica DCM 3D laser confocal microscope is 0.01 μm.
When the interelectrode spacing is 20 μm, the corresponding physical photos after processing are shown in Figure 25, and the surface roughness of physical objects shown in Figure 25 is measured. e corresponding three-    dimensional and two-dimensional morphologies of the machined surface are shown in Figure 32. When the interelectrode spacing is 40 μm, the corresponding physical photos after processing are shown in Figure 27, and the surface roughness of the physical objects shown in Figure 27 is measured. e corresponding three-dimensional and twodimensional morphologies of the machined surface are shown in Figure 33. When the interelectrode spacing is 60 μm, the corresponding physical photos after processing are shown in Figure 29, and the surface roughness of the physical objects shown in Figure 29 is measured. e corresponding three-dimensional and two-dimensional morphologies of the machined surface are shown in Figure 34. e results of material removal rate and surface roughness measurement of single crystal silicon under different interelectrode spacings are shown in Table 5.
In EDM system, the diameter and pit size of plasma discharge channel formed by single pulse discharge are determined by current and effective discharge duration [36]. e larger the current, the longer the effective discharge duration, and the larger the diameter and pit of plasma discharge channel. In continuous pulse machining, the higher the current, the longer the effective discharge time, and the greater the material removal rate and surface roughness. e quantitative relationship between the diameter of plasma discharge channel and interelectrode spacing is given in [37]. e larger the interelectrode spacing, the smaller the loop current. erefore, when the interelectrode spacing increases, the loop current decreases, which further leads to the decrease of material removal rate and surface roughness. As can be seen from Table 5, the material removal rate and surface roughness decrease with the increase of the interelectrode spacing. e above analysis fully proves the rationality of the experimental results.

Conclusions
e power supply parameter control method is generally adopted to realize the control of the process in the existing EDM equipment. Since there exists no accurate interelectrode gap model in EDM, the control of the interelectrode gap cannot be achieved. In this paper, based on the example of P-type single crystal silicon EDM, an equivalent resistance model for interelectrode gap is established; the order and parameters of the EDM system model are determined by the system identification theory; the minimum variance selfcorrection controller is designed to control the interelectrode gap of the EDM system in real time. Conclusions are as follows.
(1) e impedance model of the EDM interelectrode equivalent circuit is derived by analyzing the EMD interelectrode state. Based on those, a mathematical model of EMD interelectrode gap d and interelectrode voltage, loop current, and plasma channel equivalent resistivity κ is established. e established interelectrode gap model is verified by 3σ test method. e minimum, maximum, and average values are distributed within ±3σ, so the established EDM interelectrode gap model is correct and reliable.
(2) e EDM interelectrode gap model established in this paper is universal. When processing a metal or alloy material with good conductivity, the equivalent resistance of the single crystal silicon in (8) is ignored, and the equivalent resistivity of the plasma channel is redetermined by experiments to further derive EDM interelectrode gap model for the ordinary metal or alloy materials. e established interelectrode gap model has certain reference significance for the study of the noncontact EDM interelectrode gap. identification theory. e order and parameters of the EDM system model are determined by AIC order method and forgetting factor recursive least square method. e minimum variance self-correction controller is designed to realize the adaptive control of the electrode position and further ensure the  stable tracking of the expected interelectrode gap. It provides a theoretical basis and practical reference for the precise control of the interelectrode gap in EDM system. (4) e controller is verified on the improved EDM device; the minimum variance self-correction controller can effectively make the interelectrode gap track various reference trajectories (square wave, sine, etc.). In actual machining, the smaller the interelectrode gap, the higher the machining efficiency.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.