# Methods on the Determination of the Circuit Parameters in an Underwater Spark Discharge

Authors: Zhen Han; Xiaobing Zhang; Bing Yan; Liang Qiao; Zhihua Li
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

We constructed an underwater discharge system to conduct a number of experiments. Considering the constant resistance of the plasma channel, we got an analytic expression for the current containing unknown parameters on the basis of the Kirchhoff voltage law. Therefore, we are required to determine the total circuit resistanceR with the measured current data in hand. Three methods are employed to get this job done, namely, nonlinear least squares with three variables (NLS-TV), nonlinear least squares with a single variable (NLS-SV), and waveform calculation method (WCM). The Levenberg–Marquardt (L-M) algorithm and particle swarm optimization (PSO) algorithm are employed in NLS-TV and NLS-SV, and the root mean square error (RMSE), as well as an improved cosine similarity (ICS), was selected to evaluate the performance of algorithms. The results show that NLS-TV gives an optimal solution with the combination of the PSO algorithm and L-M algorithm. Then, by calculation, R = 1.3195 Ω, C = 0.56865 μF, and L = 17.172 μH. RMSE and ICS between fitted current data and measured one are 43.9689 and 0.9947, respectively. NLS-SV gives a satisfying solution either by PSO or by L-M, yet it needs information of angular frequency from the measured current waveform and the total inductance C. In this case, we get R = 1.3115Ω, L = 16.969 μH, RMSE = 48.0883, and ICS = 0.9967. As for WCM, it is completely dependent on the measured current waveform and the total inductance C. The corresponding values of R and L are 1.2463 Ω and 16.993 μH. Also, we get RMSE = 52.1902 and ICS = 0.9728. For NLS-SV and WCM, the needed total capacitance during calculation is determined using the computed capacitance by NLS-TV. If the energy storage capacitance is used as the total capacitance, the obtained solution is frustrating. Therefore, independent use of NLS-SV or WCM demands a precise capacitance of the total circuit measured by an RLC meter. We also draw a conclusion that ignoring the capacitance of other parts of the circuit is incorrect and will lead to an enormous error during calculation.


---

## Body

## 1. Introduction

The shock wave produced by an underwater spark discharge has been used in electrohydraulic forming [1], electrohydraulic cleaning [2], medical extracorporeal lithotripsy [3], rock breaking [4], marine geological exploration [5], underwater attack and defense [6], and so on. Therefore, the characteristic of shock wave drew great attention to researchers. Based on the electrohydraulic effect [7], a shock wave came into being after the formation of the plasma channel between an anode and a cathode with an amount of high-temperature and high-pressure plasma. The energy of the shock wave is attributed to the energy deposited into the plasma channel [8–11], which is strongly related to the channel resistance Rp. In other words, Rp is so important that it takes a great impact on the energy of the shock wave.Some researchers used to treatRp as a time-varying resistance [12–18] and others prefer to regard Rp as a constant [19–23] during the discharge. It turned out that usage of constant resistance to calculate the channel power, channel energy, and electroacoustic conversion efficiency and to simulate bubble motion together with bubble dynamics model, equation of state of water, and energy conservation equation can bring about accepted results. As a result, obtaining the constant resistance makes good sense.The constant channel resistance is expressed by the total resistance of the circuit minus the external circuit resistance. The external circuit resistance can be obtained by the short-circuit method, and the total resistance of the circuit is usually obtained by the fitness to measured current on the basis of analytic expression for current coming from the RLC equivalent circuit model. However, the calculation detail was not described in previous studies.In our research, we proposed NLS-TV, NLS-SV, and WCM to obtain the circuit parameters and adopted RMSE and ICS to measure the performance. For NLS-TV and NLS-SV, we use the PSO algorithm and L-M algorithm to find the optimal solution. As for WCM, it is completely based on the measured current waveform. The effectiveness of the three methods is verified by the good fitness to the measured current, and the advantages as well as the disadvantages of the three methods are discussed.


## 2. Experiment and Methods

### 2.1. Description of the Problem

At the beginning of an underwater discharge, the equivalent circuit of the discharge system is shown in Figure1.Figure 1
Equivalent circuit of the discharge system.The inductance and the capacitance of the plasma channel are ignored because their impedance is much smaller compared to the channel resistance [18, 20–22, 24]. The total inductance of the circuit is L. The channel resistance is Rp. The external resistance (except the channel resistance) is Rc. Thus, the total resistance R is the sum of Rp and Rc. According to the Kirchhoff voltage law, with constant resistance considered, we get(1)d2idt2+RLdidt+1LCi=0.Under the condition of a spark discharge, the RLC circuit is underdamped. That is to say,R<2L/C. Due to the extremely low conductivity of the tap water in the anechoic pool, no conductive current existed during the pre-breakdown period. The breakdown moment is assumed to be time zero. Thus, i0=0, and di/dt|t=0=U0/L, where U0 is the initial voltage of the pulse power supply. With these initial conditions considered, the solution of (1) is(2)i=Ae−αtsinωt,where(3)A=U0L,α=R2L,ω=1LC−α2.Now, with the analytic expression containing unknown parameters for the current, we are required to determine the circuit parameters, such asR, L, and C based on the measured current data.


### 2.2. Experiment

Underwater discharge experiments were carried out in an anechoic water pool. The center of the stainless steel electrode gap is 1 m underwater, and the rod-to-rod electrode gap distance is adjustable from 0.5 mm to 1 cm. The pulse power supply with a manual trigger switch had an initial voltage of 10 kV and an energy storage capacitor of 0.11μF. A high-voltage probe (Tektronix P6015A) is used to monitor the voltage across the electrode gap. A Rogowski coil (Pearson 2879) is sheathed on the transmission line to measure the current through the circuit. A hydrophone with a sensitivity of -205 dB re 1 V/ μPa in the range of 5 Hz–15 MHz was placed 1 m underwater and 1 m away from the center of the stainless steel electrode gap to receive acoustic signals produced during pulsed discharges and to transform them into voltage signals. A digital storage oscilloscope (RIGOL MSO5354) was selected to store and display all of the electric signals and acoustic signals. A diagram of the experiment setup is shown in Figure 2.Figure 2
Diagram of the experiment setup.The voltage and the current waveforms produced by a typical spark discharge with a 1 mm electrode gap are shown in Figure3.Figure 3
Voltage and current waveforms of a typical spark discharge with a 1 mm electrode gap.


### 2.3. Nonlinear Least Squares with Three Variables (NLS-TV)

For (2), the expression for the current contains three variables, and our purpose is to determine A, α, and ω, and on the basis of the measured current data. This turns into a nonlinear least squares problem. The objective function is constructed by the sum of squares of residuals of the theoretical current values and the measured ones. Thus, we get the objective function expressed as(4)fA,α,ω=∑k=1Nitk−ik2=∑k=1NAe−αtksinωtk−ik2,where tk is the discrete-time series and ik is measured current with the length of N. Considering A,α,ω as a vector, we are inclined to find A∗,α∗,ω∗ to minimize fA,α,ω. Thus, proper algorithms are in need to complete the calculation and appropriate evaluation indices are needed to measure the performance of the algorithms.


#### 2.3.1. Selection of the Algorithms

Due to the strong nonlinearity of the objective function, typical iterative methods and intelligent optimization algorithms are alternatives. The steepest descent method, Newton–Gauss method, trust region method, Levenberg–Marquardt algorithm (L-M algorithm), and so on are typical iterative methods [25]. L-M algorithm, which is a kind of trust region method in nature, is a widely used one for nonlinear least squares problems. With the merits of both the steepest descent method and the Newton–Gauss method, it can easily find the most optimal value of the objective function by iteration. Therefore, the L-M algorithm is selected as a typical iterative method. However, L-M is a local search algorithm and the result is strongly dependent on the given initial value of the unknown parameter, which gives a local optimum instead of global optimum sometimes. For comparison, we choose a global search algorithm, which has convergence with large probability and fine accuracy under the condition of any given initial value of the unknown parameter within its range. The particle swarm optimization (PSO) algorithm is a good choice. As an intelligent optimization algorithm, the PSO algorithm was proposed by Eberhart and Kennedy [26] inspired by birds’ predation in 1995. Subsequently, PSO algorithm was widely used in function optimization [27], developing network training [28–30], biomedical research [31], and so on. Next, we briefly describe the basic idea of the algorithm. Firstly, a number of particles were placed in the search space with its dimensions being the number of unknown parameters. Position and velocity are two major attributes for each particle, and the position of a particle is a potential solution of the unknown parameter. Secondly, initialization is completed by random assignment of particle position and velocity. The initial positions of particles are the initial solutions of the unknown parameters, and the optimal solution is obtained by iteration. Lastly, the particles updated their positions and velocities on the basis of the individual optimal solution obtained by themselves and the group optimal solution obtained by particle swarm during every iteration. The updated velocity and position are indicated by (5) and (6), respectively.(5)vj+1D=λvjD+c1r1pbest−xjD+c2r2gbest−xjD,(6)xj+1D=xjD+vjD,where vjD is the D-th velocity component of the j-th particle, xjD is the D-th position component of the j-th particle, λ is inertia weight, c1 and c2 are individual learning factor and learning factor of swarm, respectively, pbest is individual optimal value, gbest is group optimal value, r1 and r2 are random numbers ranging from 0 to 1, D is the dimension of search space (number of unknown parameters), M is the number of particles, and j ranges from 1 to M−1. When the terminal principle of iteration is satisfied, the search for a solution is finished. The basic flowchart of PSO is shown in Figure 4.Figure 4
Flowchart of PSO.


#### 2.3.2. Selection of the Indices

Appropriate indices are necessary to evaluate the performance of the algorithms quantitatively. The measured value as well as the calculated value can be taken as a vector. Root mean square error (RMSE) is a widely adopted index to measure the deviation between two vectors in mathematical statistics. Compared to the sum of squares of residuals which has a similar evaluation effect, it eliminates the impact of data length. Hence, the smaller the value of RMSE, the better the fitting effect. In order to make the evaluation more comprehensive and scientific, we use improved cosine similarity as another index. Because cosine similarity is defined as the cosine of the angle between two vectors, it focuses on the difference in direction and is not sensitive to the difference in length. However, we care about not only the difference in direction but also the one in length. Therefore, an improved cosine similarity (ICS) is proposed. The difference in length is expressed by the ratio of the length of two vectors, and ICS is expressed as the multiplication of cosine similarity and the ratio of the length of two vectors. The closer the value of ICS is to 1, the higher the similarity is no matter in direction or in length. The corresponding formula is as follows:(7)RMSE=1N∑k=1Nitk−ik2,(8)ICS=∑k=1Nitkik∑k=1Nitk2∑k=1Nik2min∑k=1Nitk2,∑k=1Nik2max∑k=1Nitk2,∑k=1Nik2.


### 2.4. Nonlinear Least Squares with a Single Variable (NLS-SV)

As is seen in Figure3, the oscillation of the current lasted three cycles. Representing T as a cycle, then we get T = 1.966e-5s and the angular frequency ω can be determined by ω=2π/T=3.1959e5 rad/s. If the total capacitance C is regarded as a known quantity, the inductance of the circuit can be expressed as L=1/Cα2+ω2 on the basis of (3). Then, only α is the variable in (2).Now our purpose is to determine α in the expression for the current on the basis of the measured data. This turns into a data fitting problem. The objective function is constructed by the sum of squares of residuals of the theoretical current values and the measured ones. Thus, we get(9)fα=∑k=1Nitk−ik2=∑k=1NU0ωCα2+ω2Ae−αtksinωtk−ik2.We are inclined to findα∗ to minimize fα.


### 2.5. Waveform Calculation Method (WCM)

We can also get the job done merely according to the measured current waveform. The specific calculation progress is as follows.Whent=1/4T=π/2ω, from (2) and (3), we get Im1=U0/ωLe−πR/4ωL. When t=3/4T=3π/2ω, we get Im2=U0/ωLe−3πR/4ωL. Let η=lnIm1/Im2; then, η=πR/2ωL. Combining it with ω=1/LC−R/2L2, we get(10)R=ηTCπ2+η2,L=T24Cπ2+η2.


## 2.1. Description of the Problem

At the beginning of an underwater discharge, the equivalent circuit of the discharge system is shown in Figure1.Figure 1
Equivalent circuit of the discharge system.The inductance and the capacitance of the plasma channel are ignored because their impedance is much smaller compared to the channel resistance [18, 20–22, 24]. The total inductance of the circuit is L. The channel resistance is Rp. The external resistance (except the channel resistance) is Rc. Thus, the total resistance R is the sum of Rp and Rc. According to the Kirchhoff voltage law, with constant resistance considered, we get(1)d2idt2+RLdidt+1LCi=0.Under the condition of a spark discharge, the RLC circuit is underdamped. That is to say,R<2L/C. Due to the extremely low conductivity of the tap water in the anechoic pool, no conductive current existed during the pre-breakdown period. The breakdown moment is assumed to be time zero. Thus, i0=0, and di/dt|t=0=U0/L, where U0 is the initial voltage of the pulse power supply. With these initial conditions considered, the solution of (1) is(2)i=Ae−αtsinωt,where(3)A=U0L,α=R2L,ω=1LC−α2.Now, with the analytic expression containing unknown parameters for the current, we are required to determine the circuit parameters, such asR, L, and C based on the measured current data.


## 2.2. Experiment

Underwater discharge experiments were carried out in an anechoic water pool. The center of the stainless steel electrode gap is 1 m underwater, and the rod-to-rod electrode gap distance is adjustable from 0.5 mm to 1 cm. The pulse power supply with a manual trigger switch had an initial voltage of 10 kV and an energy storage capacitor of 0.11μF. A high-voltage probe (Tektronix P6015A) is used to monitor the voltage across the electrode gap. A Rogowski coil (Pearson 2879) is sheathed on the transmission line to measure the current through the circuit. A hydrophone with a sensitivity of -205 dB re 1 V/ μPa in the range of 5 Hz–15 MHz was placed 1 m underwater and 1 m away from the center of the stainless steel electrode gap to receive acoustic signals produced during pulsed discharges and to transform them into voltage signals. A digital storage oscilloscope (RIGOL MSO5354) was selected to store and display all of the electric signals and acoustic signals. A diagram of the experiment setup is shown in Figure 2.Figure 2
Diagram of the experiment setup.The voltage and the current waveforms produced by a typical spark discharge with a 1 mm electrode gap are shown in Figure3.Figure 3
Voltage and current waveforms of a typical spark discharge with a 1 mm electrode gap.


## 2.3. Nonlinear Least Squares with Three Variables (NLS-TV)

For (2), the expression for the current contains three variables, and our purpose is to determine A, α, and ω, and on the basis of the measured current data. This turns into a nonlinear least squares problem. The objective function is constructed by the sum of squares of residuals of the theoretical current values and the measured ones. Thus, we get the objective function expressed as(4)fA,α,ω=∑k=1Nitk−ik2=∑k=1NAe−αtksinωtk−ik2,where tk is the discrete-time series and ik is measured current with the length of N. Considering A,α,ω as a vector, we are inclined to find A∗,α∗,ω∗ to minimize fA,α,ω. Thus, proper algorithms are in need to complete the calculation and appropriate evaluation indices are needed to measure the performance of the algorithms.


### 2.3.1. Selection of the Algorithms

Due to the strong nonlinearity of the objective function, typical iterative methods and intelligent optimization algorithms are alternatives. The steepest descent method, Newton–Gauss method, trust region method, Levenberg–Marquardt algorithm (L-M algorithm), and so on are typical iterative methods [25]. L-M algorithm, which is a kind of trust region method in nature, is a widely used one for nonlinear least squares problems. With the merits of both the steepest descent method and the Newton–Gauss method, it can easily find the most optimal value of the objective function by iteration. Therefore, the L-M algorithm is selected as a typical iterative method. However, L-M is a local search algorithm and the result is strongly dependent on the given initial value of the unknown parameter, which gives a local optimum instead of global optimum sometimes. For comparison, we choose a global search algorithm, which has convergence with large probability and fine accuracy under the condition of any given initial value of the unknown parameter within its range. The particle swarm optimization (PSO) algorithm is a good choice. As an intelligent optimization algorithm, the PSO algorithm was proposed by Eberhart and Kennedy [26] inspired by birds’ predation in 1995. Subsequently, PSO algorithm was widely used in function optimization [27], developing network training [28–30], biomedical research [31], and so on. Next, we briefly describe the basic idea of the algorithm. Firstly, a number of particles were placed in the search space with its dimensions being the number of unknown parameters. Position and velocity are two major attributes for each particle, and the position of a particle is a potential solution of the unknown parameter. Secondly, initialization is completed by random assignment of particle position and velocity. The initial positions of particles are the initial solutions of the unknown parameters, and the optimal solution is obtained by iteration. Lastly, the particles updated their positions and velocities on the basis of the individual optimal solution obtained by themselves and the group optimal solution obtained by particle swarm during every iteration. The updated velocity and position are indicated by (5) and (6), respectively.(5)vj+1D=λvjD+c1r1pbest−xjD+c2r2gbest−xjD,(6)xj+1D=xjD+vjD,where vjD is the D-th velocity component of the j-th particle, xjD is the D-th position component of the j-th particle, λ is inertia weight, c1 and c2 are individual learning factor and learning factor of swarm, respectively, pbest is individual optimal value, gbest is group optimal value, r1 and r2 are random numbers ranging from 0 to 1, D is the dimension of search space (number of unknown parameters), M is the number of particles, and j ranges from 1 to M−1. When the terminal principle of iteration is satisfied, the search for a solution is finished. The basic flowchart of PSO is shown in Figure 4.Figure 4
Flowchart of PSO.


### 2.3.2. Selection of the Indices

Appropriate indices are necessary to evaluate the performance of the algorithms quantitatively. The measured value as well as the calculated value can be taken as a vector. Root mean square error (RMSE) is a widely adopted index to measure the deviation between two vectors in mathematical statistics. Compared to the sum of squares of residuals which has a similar evaluation effect, it eliminates the impact of data length. Hence, the smaller the value of RMSE, the better the fitting effect. In order to make the evaluation more comprehensive and scientific, we use improved cosine similarity as another index. Because cosine similarity is defined as the cosine of the angle between two vectors, it focuses on the difference in direction and is not sensitive to the difference in length. However, we care about not only the difference in direction but also the one in length. Therefore, an improved cosine similarity (ICS) is proposed. The difference in length is expressed by the ratio of the length of two vectors, and ICS is expressed as the multiplication of cosine similarity and the ratio of the length of two vectors. The closer the value of ICS is to 1, the higher the similarity is no matter in direction or in length. The corresponding formula is as follows:(7)RMSE=1N∑k=1Nitk−ik2,(8)ICS=∑k=1Nitkik∑k=1Nitk2∑k=1Nik2min∑k=1Nitk2,∑k=1Nik2max∑k=1Nitk2,∑k=1Nik2.


## 2.3.1. Selection of the Algorithms

Due to the strong nonlinearity of the objective function, typical iterative methods and intelligent optimization algorithms are alternatives. The steepest descent method, Newton–Gauss method, trust region method, Levenberg–Marquardt algorithm (L-M algorithm), and so on are typical iterative methods [25]. L-M algorithm, which is a kind of trust region method in nature, is a widely used one for nonlinear least squares problems. With the merits of both the steepest descent method and the Newton–Gauss method, it can easily find the most optimal value of the objective function by iteration. Therefore, the L-M algorithm is selected as a typical iterative method. However, L-M is a local search algorithm and the result is strongly dependent on the given initial value of the unknown parameter, which gives a local optimum instead of global optimum sometimes. For comparison, we choose a global search algorithm, which has convergence with large probability and fine accuracy under the condition of any given initial value of the unknown parameter within its range. The particle swarm optimization (PSO) algorithm is a good choice. As an intelligent optimization algorithm, the PSO algorithm was proposed by Eberhart and Kennedy [26] inspired by birds’ predation in 1995. Subsequently, PSO algorithm was widely used in function optimization [27], developing network training [28–30], biomedical research [31], and so on. Next, we briefly describe the basic idea of the algorithm. Firstly, a number of particles were placed in the search space with its dimensions being the number of unknown parameters. Position and velocity are two major attributes for each particle, and the position of a particle is a potential solution of the unknown parameter. Secondly, initialization is completed by random assignment of particle position and velocity. The initial positions of particles are the initial solutions of the unknown parameters, and the optimal solution is obtained by iteration. Lastly, the particles updated their positions and velocities on the basis of the individual optimal solution obtained by themselves and the group optimal solution obtained by particle swarm during every iteration. The updated velocity and position are indicated by (5) and (6), respectively.(5)vj+1D=λvjD+c1r1pbest−xjD+c2r2gbest−xjD,(6)xj+1D=xjD+vjD,where vjD is the D-th velocity component of the j-th particle, xjD is the D-th position component of the j-th particle, λ is inertia weight, c1 and c2 are individual learning factor and learning factor of swarm, respectively, pbest is individual optimal value, gbest is group optimal value, r1 and r2 are random numbers ranging from 0 to 1, D is the dimension of search space (number of unknown parameters), M is the number of particles, and j ranges from 1 to M−1. When the terminal principle of iteration is satisfied, the search for a solution is finished. The basic flowchart of PSO is shown in Figure 4.Figure 4
Flowchart of PSO.


## 2.3.2. Selection of the Indices

Appropriate indices are necessary to evaluate the performance of the algorithms quantitatively. The measured value as well as the calculated value can be taken as a vector. Root mean square error (RMSE) is a widely adopted index to measure the deviation between two vectors in mathematical statistics. Compared to the sum of squares of residuals which has a similar evaluation effect, it eliminates the impact of data length. Hence, the smaller the value of RMSE, the better the fitting effect. In order to make the evaluation more comprehensive and scientific, we use improved cosine similarity as another index. Because cosine similarity is defined as the cosine of the angle between two vectors, it focuses on the difference in direction and is not sensitive to the difference in length. However, we care about not only the difference in direction but also the one in length. Therefore, an improved cosine similarity (ICS) is proposed. The difference in length is expressed by the ratio of the length of two vectors, and ICS is expressed as the multiplication of cosine similarity and the ratio of the length of two vectors. The closer the value of ICS is to 1, the higher the similarity is no matter in direction or in length. The corresponding formula is as follows:(7)RMSE=1N∑k=1Nitk−ik2,(8)ICS=∑k=1Nitkik∑k=1Nitk2∑k=1Nik2min∑k=1Nitk2,∑k=1Nik2max∑k=1Nitk2,∑k=1Nik2.


## 2.4. Nonlinear Least Squares with a Single Variable (NLS-SV)

As is seen in Figure3, the oscillation of the current lasted three cycles. Representing T as a cycle, then we get T = 1.966e-5s and the angular frequency ω can be determined by ω=2π/T=3.1959e5 rad/s. If the total capacitance C is regarded as a known quantity, the inductance of the circuit can be expressed as L=1/Cα2+ω2 on the basis of (3). Then, only α is the variable in (2).Now our purpose is to determine α in the expression for the current on the basis of the measured data. This turns into a data fitting problem. The objective function is constructed by the sum of squares of residuals of the theoretical current values and the measured ones. Thus, we get(9)fα=∑k=1Nitk−ik2=∑k=1NU0ωCα2+ω2Ae−αtksinωtk−ik2.We are inclined to findα∗ to minimize fα.


## 2.5. Waveform Calculation Method (WCM)

We can also get the job done merely according to the measured current waveform. The specific calculation progress is as follows.Whent=1/4T=π/2ω, from (2) and (3), we get Im1=U0/ωLe−πR/4ωL. When t=3/4T=3π/2ω, we get Im2=U0/ωLe−3πR/4ωL. Let η=lnIm1/Im2; then, η=πR/2ωL. Combining it with ω=1/LC−R/2L2, we get(10)R=ηTCπ2+η2,L=T24Cπ2+η2.


## 3. Results and Discussion

### 3.1. Results of NLS-TV

Using the L-M algorithm, we should give an initial value toA,α,ω. Unfortunately, the performance of the L-M algorithm is strongly dependent on initial values. Provided that a suitable initial value is given, good convergence can be obtained. However, the unsuitable initial value usually leads to no convergence. With the given initial value of A,α,ω being (200, 30000, 200000), the optimal solution is (1833, 38421, 317698) after calculation. Then, we get the fitted current waveform, which is in good agreement with the measured one. RMSE is 43.9689 according to (6). ICS is 0.9947 computed by (7). A solution for A,α,ω is (39.9, 1345.6, 8443.6) when another initial value is given as (200, 1300, 8600). In this case, RMSE is 602.5812 and ICS is 3.1027e-4. Accordingly, the fitting effect is terrible. In fact, this initial value brings about no convergence. Subsequently, PSO is employed to give a solution. It is necessary to assign values to some parameters before calculation. The data length N is 118101. The number of particles M is 50, the maximum number of iterations is 500, the dimension of search space D is 3, the individual learning factor c1 and swarm learning factor c2 are all 2, and the inertia weight λ is 0.6. A particle’s position is expressed as A,α,ω. To initialize the positions of particles smoothly, a certain value range of these three variables has to be given. We select three groups of boundary values for A,α,ω to look for the minimum of the objective function by PSO.Case 1.
The variableA ranges from 0 to 10000, the variable α ranges from 0 to 100000, and the variable ω ranges from 0 to 1000000.Case 2.
The variableA ranges from 0 to 3000, the variable α ranges from 10000 to 100000, and the variable ω ranges from 100000 to 1000000.Case 3.
The variableA ranges from 100 to 3000, the variable α ranges from 10000 to 50000, and the variable ω ranges from 100000 to 500000.
In case 1, a solution forA,α,ω is (3072.1, 57958, 318660), RMSE is 257.9199, and ICS is 0.7225. In case 2, a solution for A,α,ω is (1727.2, 20181, 316160), RMSE is 229.0062, and ICS is 0.7740. In case 3, a solution for A,α,ω is (1581.8, 33000, 318130), RMSE is 72.3547, and ICS is 0.9212. Measured current and fitted current by L-M algorithm and by PSO are shown in Figure 5.
Solutions forA,α,ω, RMSE, and ICS by L-M and PSO are listed in Table 1.
For PSO, we are only asked to give the general value range instead of initial values. The initial positions are displaced randomly within the boundary. Nevertheless, the convergence of the solutions can easily be obtained although the solution is not optimal. Substituting these three solutions forA,α,ω in these three cases into the L-M algorithm as initial values, the optimal solution is obtained. Thus, we have an idea that the solving process can be divided into two parts. Firstly, we get an initial value for A,α,ω by PSO, and then the optimal solution is obtained with this initial value by L-M. Under the condition of the optimal solution, R, L, and C can be calculated on the basis of (2). R = 1.3195 Ω; C = 0.56865 μF; and L = 17.172 μH. The capacitance of energy storage capacitor C0 = 0.11 μF. Thus, the total capacitance of the circuit is far more than C0. Whether the obtained total capacitance C is reasonable or not needs further verification.Figure 5
Measured current and fitted current by L-M algorithm and by PSO.Table 1
Solution, RMSE, and ICS.
AlgorithmA∗α∗ω∗RMSEICSRemarksL-M18333842131769843.96890.9947Optimal solution39.91345.68443.6602.58123.1027e-4No convergencePSO3072.157958318660257.91990.7225Convergence with low accuracy1727.220181316160229.00620.7740Convergence with low accuracy1581.83300031813072.35470.9212Convergence


### 3.2. Results of NLS-SV

Firstly,C is simply represented by the capacitance of the energy storage capacitor C0. We try different initial values of α, such as 10000, 20000, 30000…. However, solutions obtained by the L-M algorithm are always −5452. As an attenuation coefficient, the value of α must be a positive number. Therefore, this result indicates that the L-M algorithm is not convergent and solutions are meaningless. When PSO is used, values assigned to some necessary parameters before calculation are the same as mentioned in Section 3.1. Although we try different value range of α, the solutions have very low accuracy. In a word, with the total capacitance C being C0, the optimal solution for the objective function cannot be obtained whether L-M or PSO is used. Thus, we have reason to believe that the terrible result is likely to be caused by the usage of the incorrect value of capacitance C. In our experiment, the RLC meter was not available to measure the total capacitance. Therefore, we can use the calculated capacitance value from Section 3.1. Then,C = 0.56865 μF. Under this condition, if the initial value of α is between 10 and 7.7557e6, the solution by L-M is always 38643, which is close to the optimal obtained in Section 3.1. When the initial value of α is between 0 and 10, the accuracy of the solution decreases and we are likely to obtain the local optimum rather than the global optimum.Whenα ranges from 0 to 100000, we always get a solution of 38643 by PSO, which is the same as the result by L-M. With the solution of 38643, we get the indices. RMSE = 48.0883 and ICS = 0.9967. Then, we can obtain the inductance L = 16.969 μH and the resistance of the circuit R = 1.3115Ω. In conclusion, the PSO algorithm stably gives an optimal solution and the L-M algorithm can also converge to the optimal solution when the initial value of α is bigger than 10. This result indicates that the probability and the range of convergence are greater with the correct value of capacitance compared to the NLS-TV mentioned above.


### 3.3. Results of WCM

As is seen in Figure3, in the first cycle, the peak value of the current Im1 is 1543 A and the second peak value Im2 is 1076 A. Thus, η=lnIm1/Im2=0.3605. The meaning and the value of T are the same as mentioned in Section 3.1. That is to say, T = 1.966e-5s. If the total capacitance of circuit C is known, the values of R and L are easily computed. Due to the absence of an RLC meter, the actual capacitance of the total circuit C is not available in our experiment. Similar to Section 3.2, the value of C is either considered to be the capacitance of the energy storage capacitor or the calculated one obtained from Section 3.1. Firstly, the total capacitance of the circuit is thought to be the capacitance of the energy storage capacitor. This means that the capacitance of other parts of the circuit is ignored. Therefore, C = 0.11 μF and we get R = 6.443 Ω and L = 87.848 μH by (10). However, the value of R seems not reasonable compared to the one in existing research studies. It is too large to be accepted. For (10), if C increases, R can decrease to a reasonable value. To further verify the rationality of C obtained by Section 3.2, we substitute the value of C into equation (8) and we get R = 1.2463 Ω and L = 16.993 μH. This is basically consistent with the result of Sections 3.1 and 3.2.According to (2) and (3), we can obtain the calculated current for different C values. We make use of the evaluating indices to compare the measured current and calculated current for different C values. For C = 0.11 μF, RMSE = 483.7417 and ICS = 0.1975. For C = 0.56865 μF, RMSE = 52.1902 and ICS = 0.9728. The current waveform plotted with the calculated circuit parameters for different C values by WCM and the one with measured data are shown in Figure 6.Figure 6
Current waveforms plotted with measured data and with calculated circuit parameters for differentC values by WCM.We find that the fitness effect forC = 0.11 μF is not satisfying. Obviously, the amplitude of the fitted waveform is much smaller than that of the measured one. When capacitance increases to 0.56865 μF, the fitness turned out well. Thus, it is not appropriate to use an energy storage capacitor to replace the capacitance of the total circuit. When using WCM alone, we should precisely measure the capacitance of the total circuit with an RLC meter.


## 3.1. Results of NLS-TV

Using the L-M algorithm, we should give an initial value toA,α,ω. Unfortunately, the performance of the L-M algorithm is strongly dependent on initial values. Provided that a suitable initial value is given, good convergence can be obtained. However, the unsuitable initial value usually leads to no convergence. With the given initial value of A,α,ω being (200, 30000, 200000), the optimal solution is (1833, 38421, 317698) after calculation. Then, we get the fitted current waveform, which is in good agreement with the measured one. RMSE is 43.9689 according to (6). ICS is 0.9947 computed by (7). A solution for A,α,ω is (39.9, 1345.6, 8443.6) when another initial value is given as (200, 1300, 8600). In this case, RMSE is 602.5812 and ICS is 3.1027e-4. Accordingly, the fitting effect is terrible. In fact, this initial value brings about no convergence. Subsequently, PSO is employed to give a solution. It is necessary to assign values to some parameters before calculation. The data length N is 118101. The number of particles M is 50, the maximum number of iterations is 500, the dimension of search space D is 3, the individual learning factor c1 and swarm learning factor c2 are all 2, and the inertia weight λ is 0.6. A particle’s position is expressed as A,α,ω. To initialize the positions of particles smoothly, a certain value range of these three variables has to be given. We select three groups of boundary values for A,α,ω to look for the minimum of the objective function by PSO.Case 1.
The variableA ranges from 0 to 10000, the variable α ranges from 0 to 100000, and the variable ω ranges from 0 to 1000000.Case 2.
The variableA ranges from 0 to 3000, the variable α ranges from 10000 to 100000, and the variable ω ranges from 100000 to 1000000.Case 3.
The variableA ranges from 100 to 3000, the variable α ranges from 10000 to 50000, and the variable ω ranges from 100000 to 500000.
In case 1, a solution forA,α,ω is (3072.1, 57958, 318660), RMSE is 257.9199, and ICS is 0.7225. In case 2, a solution for A,α,ω is (1727.2, 20181, 316160), RMSE is 229.0062, and ICS is 0.7740. In case 3, a solution for A,α,ω is (1581.8, 33000, 318130), RMSE is 72.3547, and ICS is 0.9212. Measured current and fitted current by L-M algorithm and by PSO are shown in Figure 5.
Solutions forA,α,ω, RMSE, and ICS by L-M and PSO are listed in Table 1.
For PSO, we are only asked to give the general value range instead of initial values. The initial positions are displaced randomly within the boundary. Nevertheless, the convergence of the solutions can easily be obtained although the solution is not optimal. Substituting these three solutions forA,α,ω in these three cases into the L-M algorithm as initial values, the optimal solution is obtained. Thus, we have an idea that the solving process can be divided into two parts. Firstly, we get an initial value for A,α,ω by PSO, and then the optimal solution is obtained with this initial value by L-M. Under the condition of the optimal solution, R, L, and C can be calculated on the basis of (2). R = 1.3195 Ω; C = 0.56865 μF; and L = 17.172 μH. The capacitance of energy storage capacitor C0 = 0.11 μF. Thus, the total capacitance of the circuit is far more than C0. Whether the obtained total capacitance C is reasonable or not needs further verification.Figure 5
Measured current and fitted current by L-M algorithm and by PSO.Table 1
Solution, RMSE, and ICS.
AlgorithmA∗α∗ω∗RMSEICSRemarksL-M18333842131769843.96890.9947Optimal solution39.91345.68443.6602.58123.1027e-4No convergencePSO3072.157958318660257.91990.7225Convergence with low accuracy1727.220181316160229.00620.7740Convergence with low accuracy1581.83300031813072.35470.9212Convergence


## 3.2. Results of NLS-SV

Firstly,C is simply represented by the capacitance of the energy storage capacitor C0. We try different initial values of α, such as 10000, 20000, 30000…. However, solutions obtained by the L-M algorithm are always −5452. As an attenuation coefficient, the value of α must be a positive number. Therefore, this result indicates that the L-M algorithm is not convergent and solutions are meaningless. When PSO is used, values assigned to some necessary parameters before calculation are the same as mentioned in Section 3.1. Although we try different value range of α, the solutions have very low accuracy. In a word, with the total capacitance C being C0, the optimal solution for the objective function cannot be obtained whether L-M or PSO is used. Thus, we have reason to believe that the terrible result is likely to be caused by the usage of the incorrect value of capacitance C. In our experiment, the RLC meter was not available to measure the total capacitance. Therefore, we can use the calculated capacitance value from Section 3.1. Then,C = 0.56865 μF. Under this condition, if the initial value of α is between 10 and 7.7557e6, the solution by L-M is always 38643, which is close to the optimal obtained in Section 3.1. When the initial value of α is between 0 and 10, the accuracy of the solution decreases and we are likely to obtain the local optimum rather than the global optimum.Whenα ranges from 0 to 100000, we always get a solution of 38643 by PSO, which is the same as the result by L-M. With the solution of 38643, we get the indices. RMSE = 48.0883 and ICS = 0.9967. Then, we can obtain the inductance L = 16.969 μH and the resistance of the circuit R = 1.3115Ω. In conclusion, the PSO algorithm stably gives an optimal solution and the L-M algorithm can also converge to the optimal solution when the initial value of α is bigger than 10. This result indicates that the probability and the range of convergence are greater with the correct value of capacitance compared to the NLS-TV mentioned above.


## 3.3. Results of WCM

As is seen in Figure3, in the first cycle, the peak value of the current Im1 is 1543 A and the second peak value Im2 is 1076 A. Thus, η=lnIm1/Im2=0.3605. The meaning and the value of T are the same as mentioned in Section 3.1. That is to say, T = 1.966e-5s. If the total capacitance of circuit C is known, the values of R and L are easily computed. Due to the absence of an RLC meter, the actual capacitance of the total circuit C is not available in our experiment. Similar to Section 3.2, the value of C is either considered to be the capacitance of the energy storage capacitor or the calculated one obtained from Section 3.1. Firstly, the total capacitance of the circuit is thought to be the capacitance of the energy storage capacitor. This means that the capacitance of other parts of the circuit is ignored. Therefore, C = 0.11 μF and we get R = 6.443 Ω and L = 87.848 μH by (10). However, the value of R seems not reasonable compared to the one in existing research studies. It is too large to be accepted. For (10), if C increases, R can decrease to a reasonable value. To further verify the rationality of C obtained by Section 3.2, we substitute the value of C into equation (8) and we get R = 1.2463 Ω and L = 16.993 μH. This is basically consistent with the result of Sections 3.1 and 3.2.According to (2) and (3), we can obtain the calculated current for different C values. We make use of the evaluating indices to compare the measured current and calculated current for different C values. For C = 0.11 μF, RMSE = 483.7417 and ICS = 0.1975. For C = 0.56865 μF, RMSE = 52.1902 and ICS = 0.9728. The current waveform plotted with the calculated circuit parameters for different C values by WCM and the one with measured data are shown in Figure 6.Figure 6
Current waveforms plotted with measured data and with calculated circuit parameters for differentC values by WCM.We find that the fitness effect forC = 0.11 μF is not satisfying. Obviously, the amplitude of the fitted waveform is much smaller than that of the measured one. When capacitance increases to 0.56865 μF, the fitness turned out well. Thus, it is not appropriate to use an energy storage capacitor to replace the capacitance of the total circuit. When using WCM alone, we should precisely measure the capacitance of the total circuit with an RLC meter.


## 4. Conclusions

To conclude, we use three methods to obtain the parameters of the circuit, namely, NLS-TV, NLS-SV, and WCM. When using NLS-TV and NLS-SV, we try the L-M algorithm and PSO algorithm and employ two indices to evaluate the performance of algorithms. The fitted current waveforms, together with the measured current waveform, are plotted in Figure7. As we can see, the performance of fitness by these three methods is satisfying.Figure 7
Measured current waveform, fitted current waveform for NLS-TV, fitted current waveform for NLS-SV withC = 0.56865 μF, and fitted current waveform by WCM for C = 0.56865 μF.The advantage of NLS-TV is that there is no need to obtain the capacitance of the total circuit in advance. A solution, which may be of low accuracy, is given by PSO; then, with this solution as an initial value of the unknown variables, the optimal solution can be obtained by L-M. Thus, NLS-TV makes good use of the advantages of PSO and L-M.NLS-SV and WCM require knowledge of the capacitance of the total circuit. Due to the absence of an RLC meter, the actual capacitance of the total circuit is not able to be measured in this paper. Thus, we utilize the capacitance calculated by NLS-TV to verify the validity of NLS-SV and WCM. The solutions are close to the optimal one by NLS-TV, and the fitted current waveforms are in good agreement with the measured current one. In contrast, if we simply use the capacitance of the energy storage capacitor to conduct calculations, what we get from NLS-SV and WCM is frustrating. This result also draws a conclusion that ignoring the capacitance of other parts of the circuit is not correct and will lead to enormous errors. Independent use of NLS-SV or WCM demands a precise capacitance of the total circuit measured by an RLC meter. Speaking of NLS-SV, it is of wide convergence and of good accuracy with either PSO or L-M in use. However, the indispensable knowledge of the angular frequency has to be obtained from the measured current waveform. This is greatly different from NLS-TV which is free of angular frequency during the calculation. As to WCM, it is fully dependent on the measured current waveform. With the first and second current amplitudes as well as oscillation cycle, we can obtain the resistance and the inductance of the circuit by solving simple equations. As shown by the calculated results, NLS-TV gives the optimal solution which is a characteristic of the minimum RMSE and maximum ICS. NLS-SV and WCM need information from the current waveform manually and an error in value reading will take place. This is the reason why the accuracy of solutions is lower than the optimal solution by NLS-TV.



---

*Source: 7168375-2022-05-18.xml*