## 2 Joint Optimization Algorithm of Genetic Optimization Algorithm and Capsule Network
### Genetic Optimization Algorithm  
The parameter optimization of electromagnetic characteristic fitting is the process of obtaining the optimal parameters of electromagnetic characteristics through mathematical optimization methods. Optimization problems generally include three elements: decision variables, constraints, and objective functions. The core is to select one or more variables. Under the premise of meeting the user-defined constraints, various optimization algorithms are used to obtain the best value of the objective function. Optimization problems in engineering design are divided into function optimization with continuous variables and combinatorial optimization with discrete solutions. The solution method is to convert the optimization problem into a mathematical model and solve it according to a specific optimization algorithm. The elements for establishing a mathematical model are shown in Equation (1):  
\[\left\{ \begin{array}{l}X=[x_{1},x_{2}\cdots x_{n}]^{T}\\ s.t.x\in R^{n}|g_{i}(x)\leq 0\ (i=1,2\cdots n)\\ \max f(x)\ or\ \min f(x)\end{array} \right. \tag{1}\]  
where \(X\) represents the value range of the decision variable, \(g_{i}(x)\) represents the constraint condition, and the objective function is represented by \(\max f(x)\) or \(\min f(x)\). In the optimization design process of the optimization model, the selection of variables is generally determined based on practical problems. However, different forms of variables will have different effects on the mathematical property analysis of the objective function and also have corresponding effects on the difficulty of solving the objective function. In practical engineering applications, a common method is equivalent transformation. For example, when the original objective function is in the form of a composite function, a second variable is introduced to transform the problem into the same problem with constraints; if the constraint of the original objective function is an inequality constraint, it can be transformed into an equality constraint and a single constraint. The purpose is to simplify and unify the optimization problem and obtain the solution of the original objective through an iterative solution and other methods. The fitness depends on the reasonable setting of the objective function and the variable range, and it plays a decisive role in the solution speed and convergence performance of the model. The genetic algorithm (GA) imitates the evolution process of natural organisms at the gene and population levels, integrating reproduction, variation, competition, and selection in the biological evolution process into the algorithm to form a simulation optimization algorithm with adaptive random search functions [20]. This algorithm was initially proposed by Professor [PERSON] of the University of Michigan in the United States in 1962 and has  
Figure 1: Structure diagram of electromagnetic characteristic parameter optimization method. the characteristics of parallel computing. Genetic algorithms are widely used in nonlinear, multi-objective function optimization and combinatorial optimization. This algorithm can automatically control the re-optimization of optimization parameters, can achieve efficient heuristic search in the solution space, avoid the completely random search of exact algorithms, and can perform large-scale parallel computing, which greatly improves the timeliness of optimization. Therefore, this paper uses the genetic algorithm for the initial parameter optimization design of electromagnetic characteristic fitting. The basic process of the genetic algorithm is shown in Figure 2.  
Figure 2 mainly contains three aspects: Firstly, the electromagnetic characteristic index parameters are introduced into the population in the form of optimization parameters.