# Inversion of a Thunderstorm Cloud Charging Model Based on a 3D Atmospheric Electric Field
## Materials and Methods
### Nonlinear Inversion Method for Thunderstorm Cloud Charge Parameters  
The charge region in the thunderstorm cloud is mainly related to the structural characteristics of the temperature layer in which it is located [16]. The charge region in the cloud is evenly distributed in the horizontal direction, and is only related to the vertical height. It was assumed that the thunderstorm cloud was divided into several equally thick layers, and the charge of each layer was regarded as a point charge, as shown in Figure 3. The ground three-dimensional electric field value was the result of the interaction of multiple charge regions in the thunderstorm cloud. The ground three-dimensional electric field value was determined as in Equations (18)-(20):  
\[E_{x}=\sum_{k=1}^{n}\left[\frac{Q_{k}(x-x_{0})}{2\pi(\varepsilon_{0}+ \varepsilon_{1})}\left[(x-x_{0})^{2}+(y-y_{0})^{2}+(z_{0}+(k-1)h+\frac{h}{2}) ^{2}\right]^{-\frac{3}{2}}\right] \tag{18}\]  
\[E_{y}=\sum_{k=1}^{n}\left[\frac{Q_{k}(y-y_{0})}{2\pi(\varepsilon_{0}+ \varepsilon_{1})}\left[(x-x_{0})^{2}+(y-y_{0})^{2}+(z_{0}+(k-1)h+\frac{h}{2}) ^{2}\right]^{-\frac{3}{2}}\right] \tag{19}\]  
\[E_{z}=\sum_{k=1}^{n}\left[-\frac{Q_{k}(z_{0}+(k-1)h+\frac{h}{2})}{2\pi( \varepsilon_{0}+\varepsilon_{1})}\left[(x-x_{0})^{2}+(y-y_{0})^{2}+(z_{0}+(k-1 )h+\frac{h}{2})^{2}\right]^{-\frac{3}{2}}\right] \tag{20}\]  
where \((x,y,0)\) and \((x_{0},y_{0},z_{0})\) were the coordinates of the ground three-dimensional electric field meter and the thunderstorm cloud, respectively. \(h\) was the thickness of the thunderstorm cloud charge, \(k\) was the index that indicated the charge zone layers, \(Q_{k}\) was the charge of the \(k\) layer charge zone, and \(n\) was the total number of charge layers. Based on the functional relationship between the ground three-dimensional atmospheric electric field and the charge of the thunderstorm cloud (Equations (18)-(20)), combined with the classical thunderstorm cloud charge model, the parameters of the charge structure of the thunderstorm cloud--including the charge quantity \(Q_{k}\) of each layer and the relative distance between the thunderstorm cloud and observation point \(\left|x-x_{0}\right|\), \(\left|y-y_{0}\right|\), \(z_{0}\) could be inverted by using the ground three-dimensional electric field data. Generally, the [PERSON] iteration method is a common method for calculating non-linear equations. Each iteration direction is along the direction of the current point function value descending. However, the selection of the initial value of iteration is very important. The least square method is usually used to determine the initial value of iteration. The combination of the two algorithms can transform the non-linear problem into a linear one. Due to the existence of \(x-x_{0}\) and \(y-y_{0}\) in Equations (18)and (19) and their high dimensions, it is difficult to convert to the form of linear AX = B, and the initial values of [PERSON]'s method cannot be solved by the least square method. Therefore, other non-linear inversion algorithms were considered. Genetic algorithm and particle swarm optimization are commonly used in geophysical non-linear inversion. In the process of solving nonlinear inversion, the genetic algorithm does not have a memory function. The solution obtained will change with the charge structure of thunderstorm cloud in the inversion process, and easily fall into local optimum, so it is difficult to obtain truly satisfied structural parameters. In the process of solving parameters of the three-dimensional electric field \(\left\{E_{x},E_{y},E_{z}\right\}\), the convergence speed of genetic algorithm is slow. Particle swarm optimization (PSO) has memory function and can well preserve all the charge structure parameters with the optimal solution probability. It only updates the internal velocity of the particle and has fast convergence speed [17; 18]. The problem of slow convergence of the three-dimensional inversion process can be well solved.