Tesla Coil Directivity Design Method Based on PCA-GA-BP Neural Network

The PCA-GA-BP neural network method addresses the lack of systematic Tesla coil design by integrating dimensionality reduction and optimization techniques, resulting in improved alignment of theoretical and practical performance.

CN119670586BActive Publication Date: 2025-07-15DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510192840.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-07-15
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

The existing Tesla coil design lacks systematicity and cannot effectively solve the coupling relationship between variables, resulting in the design being unable to meet the comprehensive optimization of all parameters.

Method used

The PCA-GA-BP neural network method is used to reduce the dimensionality of the samples through principal component analysis method, and the BP neural network weight and threshold value are optimized in combination with genetic algorithms to realize the system design of Tesla coils.

Benefits of technology

It has achieved improvements in the accuracy and efficiency of Tesla coil design, reduced design errors, and can freely design coils that meet characteristic indicators as needed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670586B_ABST
    Figure CN119670586B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of artificial intelligence design, and discloses a Tesla coil directivity design method based on PCA-GA-BP neural network. The design method includes the following steps: collecting neural network samples through a Tesla coil circuit model; reducing the dimension of the original data samples by using the principal component analysis method; determining the structure of the BP neural network; optimizing the weights and thresholds of the BP neural network by the genetic algorithm; training the samples by the PCA-GA-BP neural network to complete the design. Before this, there was a lack of a systematic method for designing Tesla coils, and more Tesla coil designs were based on practical experience. The present invention solves the limitation of the operation speed caused by a large number of input variables through the principal component analysis method; introduces the genetic algorithm to optimize the BP neural network, further enhances the design accuracy, and reduces the error. Finally, the reliability of the design is verified by an example, and in the future, experimenters can design the required Tesla coils according to this method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence design, and relates to a design method for the directivity of a Tesla coil based on a PCA-GA-BP neural network. Background Art

[0002] A Tesla Coil is a transformer that operates using the resonance principle. It was invented by the Serbian-American scientist Nikola Tesla in 1891 and is mainly used to produce alternating current with extremely high voltage but low current and high frequency. The Tesla Coil consists of two (sometimes three) coupled resonant windings, and its working principle is based on electromagnetic induction and resonance conversion. The structure of the coil is composed of a low-impedance primary winding coil and a high-impedance secondary coil. When the primary winding coil is energized, a high voltage is generated in the secondary coil through electromagnetic induction. Through a resonant circuit composed of appropriate capacitors and inductors, the secondary coil and the capacitor reach the resonance state, further increasing the output voltage. However, the frequency characteristics and output characteristics of the Tesla Coil are affected by various variables, and there is a strong coupling relationship between the non-linear variables. How to effectively solve the coupling between variables in the design of the Tesla Coil, enabling the variables to cooperate with each other to obtain the desired frequency characteristics and output characteristics, and realizing the directivity design of the Tesla Coil, is a difficult problem that urgently needs to be solved and is the basis for subsequent application experiments of the Tesla Coil.

[0003] At present, Tesla coils have many applications in wireless power transmission and single-wire power transmission. However, the existing designs of Tesla coils are more based on experience and lack a systematic design method. In 2017, the team led by Professor Chen Xiyou from Dalian University of Technology designed a Tesla coil with a self-resonant frequency of about 30 kHz to achieve energy transmission over a distance of more than a hundred meters. However, the design method was based on past experimental results, lacking theoretical formulas and unable to achieve accurate design. In 2023, Dr. Jin Xin from Dalian University of Technology published an article on the modeling and analysis of multi-layer Tesla coils, obtaining the influence of the number of turns on the power and efficiency of the Tesla coil based on the circuit model of the Tesla coil, and then designing the number of turns of the Tesla coil according to requirements. However, in practical applications, in addition to the number of turns, parameters such as the radius, wire diameter, and turn spacing of the Tesla coil are important design indicators and will have an important impact on the coil characteristics. Obviously, this design method can only achieve the optimal design of a single variable and cannot meet the comprehensive design of all parameters. To address the above problems, a design method for Tesla coils based on PCA-GA-BP neural network was invented. This intelligent algorithm mainly consists of three parts: principal component analysis (PCA), genetic algorithm (GA), and BP neural network. The principal component analysis method can be traced back to Karl Pearson and Harold Hotelling in the early 20th century. It can transform multiple variables into a few principal component variables (i.e., comprehensive variables) through dimensionality reduction technology. These principal component variables can reflect most of the information of the original variables and have the largest variance. The neural network was born in the 1940s. The core principle is to model the input data by adjusting the weights between neurons. To date, the neural network has developed many branches. The BP neural network established by Rumelhart is a multi-layer feedforward network trained according to error backpropagation and is one of the most widely used neural network models. It can approximate any continuous function and has strong non-linear mapping ability. The genetic algorithm is a search heuristic algorithm that simulates natural selection and genetic mechanisms. It can optimize the initial weights and thresholds of the neural network to improve network performance and solve the local optimum problem.

[0004] The PCA-GA-BP neural network composed of the above methods can solve the non-linear, multi-variable, and strong-coupling problems faced in the design process of Tesla coils and can freely design Tesla coils that meet the characteristic indicators. Summary of the Invention

[0005] Aiming at the problem of no systematic design method for Tesla coils, the present invention studies a guiding design of Tesla coils based on PCA-GA-BP neural network. Neural network samples are collected through the Tesla coil circuit model, the principal component analysis (PCA) is used to reduce the dimension of the samples, the structure of the BP neural network is determined, the weights and thresholds of the neural network are optimized by the genetic algorithm, and the BP neural network trains and predicts the samples to realize a systematic design method for Tesla coils.

[0006] The technical solution of the present invention:

[0007] A guiding design method for Tesla coils based on PCA-GA-BP neural network, the steps are as follows:

[0008] Step 1: Collect neural network samples through the Tesla coil circuit model

[0009] Sampling is carried out on the basis of the Tesla coil circuit model in the published literature. The input impedance in the circuit model is selected as the output parameter, and the number of turns of the winding, the radius of the high-voltage winding, the radius of the low-voltage winding, the wire diameter, and the turn spacing in the circuit model are used as input parameters. By changing the input parameters of the circuit model, the output parameters will also change accordingly, thereby obtaining a large number of original data samples. It should be noted that the input parameters of the circuit model are the output parameters of the neural network design model, and the output parameters of the circuit model are the input parameters of the neural network design model.

[0010] Step 2: Use the principal component analysis (PCA) to reduce the dimension of the original data samples

[0011] Step 2.1: Standardize the original data samples.

[0012] First, standardize the original data matrix; the original data samples are represented by the following matrix, each row represents a sample, a total of n samples, and each column represents a variable, a total of p variables:

[0013] (1)

[0014] Standardize it:

[0015] (2)

[0016] Among them, is the sample mean of the th index. is the sample standard deviation of the th index.

[0017] Step 2.2: Calculate the correlation coefficient matrix R.

[0018] (3)

[0019] Among them, the correlation coefficient matrix , where in the formula: , , is the correlation coefficient between the th index and the th index.

[0020] Step 2.3: Calculate the eigenvalues and eigenvectors.

[0021] Calculate the eigenvalues of the correlation coefficient matrix R and the corresponding standardized eigenvectors , , , , where . The new index variables are composed of the eigenvectors. In a total of n samples, the derivation formula of the principal component variable of the cth sample is as follows:

[0022] (4)

[0023] where is the th principal component of the cth sample, and the principal component variables of all samples are obtained.

[0024] Step 2.4: Select principal components as the training samples of the neural network.

[0025] In order to screen the training samples of the neural network, it is necessary to calculate the information contribution rate and cumulative contribution rate of the eigenvalues . The information contribution rate of the principal component is calculated by the following formula:

[0026] (5)

[0027] Sort them again according to the size of the information contribution rate of the principal components, from largest to smallest. The principal component with the largest contribution rate is listed as , and the principal component with the smallest contribution rate is listed as . The cumulative contribution rate , , , of the principal components is calculated by the following formula:

[0028] (6)

[0029] When is close to 1 ( ), then select the first One index variable , , , As One principal component, replacing the original index variables, select principal components as the training samples of the neural network.

[0030] Step 3: Determine the BP neural network structure

[0031] Establish a three-layer BP neural network structure, including an input layer, a hidden layer, and an output layer. In the three-layer network, the number of principal component variables obtained in Step 2 is the number of neurons in the input layer, is the number of neurons in the hidden layer, is the number of neurons in the output layer. And and There is a linear relationship between them.

[0032] (7)

[0033] In addition to the number of neurons, it is also necessary to design the transfer function, the number of iterations, the training accuracy, and the learning rate. The available transfer functions for the hidden layer include sigmoid, logsig, tansig, purelin, etc. The number of iterations is usually in the range of 100 to 1000, and the training accuracy is less than 10 -5 , and the learning rate is generally set to 0.01.

[0034] The input layer only serves to introduce variables. The output formula of the hidden layer nodes is as follows:

[0035] (8)

[0036] Where represents the weight value of the neural network hidden layer, represents the bias term of the hidden layer, represents the nodes of the input layer, represents the activation function, represents the output of the

[0037] The output formula of the output layer nodes is as follows:

[0038] (9)

[0039] Where represents the weight value of the neural network output layer, represents the bias term of the output layer, Denotes the th node of the hidden layer, Denotes the activation function, Denotes the output value of the th neuron in the output layer.

[0040] Step 4: Optimize the weights and thresholds of the BP neural network using the genetic algorithm

[0041] Step 4.1: Initialize the population

[0042] The neural network structure has been established in the previous step, including input layer neurons, hidden layer neurons, output layer neurons. Therefore, the number of weights and thresholds to be optimized is as follows: The connection weights between the input layer and the hidden layer are , the hidden layer threshold is , the connection weights between the hidden layer and the output layer are , and the output layer threshold is .

[0043] Each weight and threshold is encoded using M-bit binary. Connecting the encodings of all weights and thresholds gives the encoding of an individual. The first bits are the encoding of the connection weights between the input layer and the hidden layer, to are the encoding of the hidden layer threshold, to are the encoding of the connection weights between the hidden layer and the output layer, and the last part is the encoding of the output layer threshold.

[0044] After specifying the encoding format, it is also necessary to give the population size , the crossover probability , the mutation probability , the maximum number of iterations , and the iteration count variable .

[0045] Step 4.2: Fitness function

[0046] The BP neural network is used to train the principal component variable samples processed by the PCA algorithm. The trained neural network is used to predict the test samples. The norm of the error matrix between the predicted values and the expected values of the test samples is selected as the output of the fitness function. The smaller the error, the stronger the adaptability of the individual to the living environment. Calculate the fitness value of each individual, compare and retain the current best fitness value and the best individual.

[0047] Step 4.3: Selection operator, crossover operator, mutation operator

[0048] There are many population selection strategies (selection operators), and their core purpose is to inherit excellent individuals to the next generation. The present invention selects the roulette wheel strategy, that is, converts the fitness value of the objective function into a probability value. The larger the probability value, the more chances of being selected. The population has individuals, and the probability of each individual being selected is . The fitness value of individual is . The calculation formula is as follows:

[0049] (10)

[0050] The crossover operator plays a role in exploring space and providing global search ability. It is related to the crossover probability . A random number is generated by programming. If it is less than , then a crossover event occurs. The present invention selects single-point crossover, randomly selects a crossover point on two binary-coded parent individuals, and exchanges the binary codes of the left and right parts of the crossover point to generate two new individuals.

[0051] The mutation operator plays a role in enhancing the local random search ability and population diversity of the algorithm. The mutation operator originates from imitating the gene mutation phenomenon in biological inheritance and is similar to the actual gene mutation phenomenon. The mutation probability takes a smaller value (0.001 - 0.01). The present invention adopts binary coding, and the mutation operation is realized by changing the coding position of the solution or changing the value of the coding.

[0052] Step 5: The PCA-GA-BP neural network trains the samples to complete the design.

[0053] In the previous steps, the establishment of the three major modules of principal component analysis (PCA), genetic algorithm (GA), and BP neural network has been successively realized. Here, they are combined. The sample data processed by the PCA algorithm is used as the training sample of the BP neural network. During the training process of the BP neural network, the GA algorithm is called to optimize the weights and thresholds of each neuron until the termination condition is met, and the best weights and thresholds of the BP neural network are obtained, so as to design the Tesla coil.

[0054] The beneficial effects of the present invention: There was no scientific method for designing Tesla coils before. More Tesla coil designs were based on experimental experience. The present invention proposes a method for designing Tesla coils based on PCA-GA-BP neural network. The sample is dimensionally reduced by the principal component analysis method (PCA), which solves the limitation of a large number of input variables on the operation speed. The genetic algorithm (GA) is introduced to optimize the BP neural network, further enhancing the design accuracy and reducing errors. In the future, experimenters can design the required Tesla coils according to this method. Description of the Drawings

[0055] Figure 1 It is the amplitude-frequency characteristic of the open-circuit input impedance of the Tesla coil.

[0056] Figure 2 It is the phase-angle frequency characteristic of the open-circuit input impedance of the Tesla coil.

[0057] Figure 3 It is the circuit model of the Tesla coil.

[0058] Figure 4 It is the schematic diagram of the three-layer BP neural network structure.

[0059] Figure 5 It is the schematic diagram of the PCA-GA-BP neural network.

[0060] Figure 6 It is the Tesla coil actually made according to the neural network design result.

[0061] Figure 7 It is the comparison between the frequency characteristic of the Tesla coil made according to the design result and the initial target frequency characteristic. Specific implementation mode

[0062] The following further illustrates the specific implementation mode of the present invention in combination with the attached drawings and technical solutions.

[0063] Design a Tesla coil, and require the frequency characteristic of the open-circuit input impedance of the Tesla coil to be as Figure 1 Figure 2 shown. The specific steps of the present invention are as follows:

[0064] Step 1: Collect neural network samples through the Tesla coil circuit model

[0065] Sampling is carried out on the basis of the Tesla coil circuit model in the publicly available literature, and the circuit model is as Figure 3As shown, the input impedance in the circuit model is selected as the output parameter, and the number of turns of the winding, the radius of the high-voltage winding, the radius of the low-voltage winding, the wire diameter, and the turn spacing of the circuit model are used as input parameters. By changing the input parameters of the circuit model, the output parameter will also change accordingly, thereby obtaining a large number of original data samples. It should be noted that the input parameter of the circuit model is the output parameter of the neural network design model, and the output parameter of the circuit model is the input parameter of the neural network design model. In the example, the sample ranges generated are as follows: the number of turns takes values from 1500 to 3800 with an interval of 50, the radius of the high-voltage winding takes values from 4.5 cm to 8 cm with an interval of 0.5 cm, the radius of the low-voltage winding takes values from 8 cm to 12 cm with an interval of 2 cm, the wire diameter takes values from 0.21 mm to 0.3 mm with an interval of 0.01 mm, and the turn spacing takes values from 1.1 times the wire diameter to 1.2 times the wire diameter. A total of 48,300 samples are collected, and each sample includes 200 variables. Starting from the first resonant frequency, the frequencies from 50 kHz before to 50 kHz after are 100 variables, and the magnitude of the input impedance corresponding to the frequency is another 100 variables.

[0066] Step 2: Use the principal component analysis (PCA) method to reduce the dimension of the original data samples

[0067] Step 2.1: Standardize the original data samples.

[0068] First, perform standardization processing on the original data matrix, which is equivalent to performing coordinate translation and scale stretching on the original variables. The original data samples are represented by the following matrix, where each row represents a sample, with a total of n samples, and each column represents a variable, with a total of p variables. In this example .

[0069] (1)

[0070] Perform standardization processing on it:

[0071] (2)

[0072] Among them, is the sample mean of the th index. is the sample standard deviation of the th index.

[0073] Step 2.2: Calculate the correlation coefficient matrix R.

[0074] (3)

[0075] Among them, the correlation coefficient matrix , in the formula: , , is the th index and the The correlation coefficient of each index.

[0076] Step 2.3: Calculate the eigenvalues and eigenvectors.

[0077] Calculate the eigenvalues of the correlation coefficient matrix R and the corresponding standardized eigenvectors , , , , where is composed of eigenvectors to form new index variables. For the c-th sample in a total of n samples, the derivation formula of the principal component variable is as follows:

[0078] (4)

[0079] Among them, is the principal component of the c-th sample, and the principal component variables of all samples are obtained.

[0080] Step 2.4: Select principal components as the training samples of the neural network.

[0081] In order to screen the training samples of the neural network, it is necessary to calculate the information contribution rate and cumulative contribution rate of the eigenvalues . The information contribution rate of the principal component is calculated as follows:

[0082] (5)

[0083] Reorder according to the magnitude of the information contribution rate of the principal components, from largest to smallest. The principal component with the largest contribution rate is listed as , and the principal component with the smallest contribution rate is listed as . The cumulative contribution rate , , , of the principal components is calculated as follows:

[0084] (6)

[0085] When is close to 1 ( ), then select the first index variables , , , as principal components to replace the original One index variable is selected principal components as the training samples for the neural network. In this example, the dimensionality of the sample variables is reduced through principal component analysis, and 200 variables ultimately result in 11 principal components.

[0086] Step 3: Determine the BP neural network structure

[0087] A three-layer BP neural network structure is established, as Figure 4 shown, including an input layer, a hidden layer, and an output layer. In the three-layer network, the number of principal component variables obtained in Step 2 is the number of neurons in the input layer, is the number of neurons in the hidden layer, is the number of neurons in the output layer. And and have a linear relationship.

[0088] (7)

[0089] In addition to the number of neurons, it is also necessary to design transfer functions, the number of iterations, training accuracy, and learning rate. Available transfer functions for the hidden layer include sigmoid, logsig, tansig, purelin; the number of iterations is usually in the range of 100 to 1000, the training accuracy is less than 10 -5 , and the learning rate is generally set to 0.01

[0090] The input layer only serves to introduce variables. The output formula for the hidden layer nodes is as follows:

[0091] (8)

[0092] Where represents the weight values of the neural network hidden layer, represents the bias term of the hidden layer, represents the nodes of the input layer, represents the activation function, represents the output of the th neuron in the hidden layer.

[0093] The output formula for the output layer nodes is as follows:

[0094] (9)

[0095] Where represents the weight values of the neural network output layer, represents the bias term of the output layer, represents the th node of the hidden layer, represents the activation function, represents the output value of the th neuron in the output layer.

[0096] In this example, equals 11, representing 11 principal components; equals 23; equals 5, representing 5 output variables, namely the number of winding turns, the radius of the high-voltage winding, the radius of the low-voltage winding, the wire diameter, and the turn pitch. The number of iterations is set to 1000, the transfer function is logsig, and the training accuracy is 10 -5 , and the learning rate is 0.01.

[0097] Step 4: Optimize the weights and thresholds of the BP neural network using the genetic algorithm

[0098] Step 4.1: Initialize the population

[0099] The neural network structure was established in the previous step, including neurons in the input layer, neurons in the hidden layer, neurons in the output layer. Therefore, the number of weights and thresholds to be optimized is as follows: the connection weights between the input layer and the hidden layer are , the hidden layer threshold is , the connection weights between the hidden layer and the output layer are , and the output layer threshold is .

[0100] Each weight and threshold is encoded using M-bit binary. Connecting the encodings of all weights and thresholds gives the encoding of an individual. The first bits are the encoding of the connection weights between the input layer and the hidden layer, to are the encoding of the hidden layer threshold, to are the encoding of the connection weights between the hidden layer and the output layer, and the last part is the encoding of the output layer threshold. After specifying the encoding format, the population size , the crossover probability , the mutation probability , the maximum number of iterations , and the iteration count variable also need to be given. In this example, the population size N is set to 40, the crossover probability is 0.7, the mutation probability is 0.01, and the maximum number of iterations is 50.

[0101] Step 4.2: Fitness function

[0102] The principal component variable samples processed by the PCA algorithm are trained by a BP neural network, and the trained neural network is used to predict the test samples. The norm of the error matrix between the predicted value and the expected value of the test samples is selected as the output of the fitness function. The smaller the error, the stronger the individual's adaptability to the living environment. Calculate the fitness value of each individual, compare and retain the current best fitness value and the best individual.

[0103] Step 4.3: Select operators, crossover operators, and mutation operators

[0104] There are many population selection strategies (selection operators), and their core purpose is to inherit excellent individuals to the next generation. In this invention, the roulette wheel strategy is selected, that is, the fitness value of the objective function is converted into the size of the probability value. The larger the probability value, the more opportunities to be selected. The population has individuals, and the probability of each individual being selected is , and the fitness value of individual is , and the calculation formula is as follows:

[0105] (10)

[0106] The crossover operator plays a role in exploring space and providing global search ability. It is related to the crossover probability . Generate a random number by programming. If it is less than , a crossover event occurs. In this invention, single-point crossover is selected. Randomly select a crossover point on two binary-coded parent individuals, and exchange the binary codes of the left and right parts of the crossover point to generate two new individuals.

[0107] The mutation operator plays a role in enhancing the local random search ability and population diversity of the algorithm. The mutation operator is derived from imitating the gene mutation phenomenon in biological inheritance, which is similar to the actual gene mutation phenomenon. The mutation probability takes a smaller value (0.001 - 0.01). In this invention, binary coding is adopted, and the mutation operation is realized by changing the coding position of the solution or changing the value of the coding.

[0108] Step 5: The PCA-GA-BP neural network trains the samples to complete the design.

[0109] In the previous steps, the establishment of the three major modules of principal component analysis (PCA), genetic algorithm (GA), and BP neural network has been successively realized. Combine them here. As Figure 5 shown, the sample data processed by the PCA algorithm is used as the training samples of the BP neural network. During the training process of the BP neural network, the GA algorithm is called to optimize the weights and thresholds of each neuron until the termination condition is met, and the best weights and thresholds of the BP neural network are obtained, so as to design the Tesla coil.

[0110] In this example, Figure 1 and 2 200 variables in are input into the trained PCA-GA-BP neural network, and the neural network gives the design results. The number of turns of the winding is 1700.03287, the radius of the high-voltage winding is 4.571 cm, the radius of the low-voltage winding is 8.1984 cm, the wire diameter is 0.246 mm, and the turn spacing is 0.286 mm. The structure of the single-layer Tesla coil is as shown in Figure 6 . Considering that it is impossible to fabricate an exactly identical Tesla coil in practice, a Tesla coil with a similar specification is fabricated. The number of turns of the high-voltage winding is 1700, the number of turns of the low-voltage winding is 6, the radius of the high-voltage winding is 4.5 cm, the radius of the low-voltage winding is 8 cm, the wire diameter of the high-voltage winding is 0.25 mm, and the turn spacing is 0.29 mm. To verify the accuracy of the design method, the actual input impedance characteristics of the fabricated Tesla coil are measured next. The measurement results are as shown in Figure 7 . The blue curve is the frequency characteristic of the fabricated Tesla coil, and the red curve is the frequency characteristic of the Tesla coil with the ideal design target. There are 4 resonance points in the open-circuit experiment within the frequency range. The input impedance first shows a rapid increase and then drops rapidly. The ideal design result of the Tesla coil is basically consistent with the actual measurement result, and the resonance frequencies of the two are basically in agreement. At the frequency corresponding to the extreme point, the error between the experimental measurement result and the ideal design result is less than 1%, indicating that the design method is accurate and effective.

[0111] In summary, the present invention proposes a design method for a Tesla coil based on a PCA-GA-BP neural network. The principal component analysis (PCA) is used to reduce the dimension of the samples, which solves the limitation of the large number of input variables on the operation speed. The genetic algorithm (GA) is introduced to optimize the BP neural network, further enhancing the design accuracy and reducing the error. The accuracy of the design method is verified by an example. In the future, experimenters can design the required Tesla coil according to this method.

[0112] The above describes the basic principle and main features of the present invention, showing the advantages of the present invention. Those skilled in the art of this industry should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.

Claims

1. A guiding design method for Tesla coils based on PCA-GA-BP neural networks, characterized in that, The steps are as follows: Step (1): Collect neural network samples through the Tesla coil circuit model; Collect neural network samples for the Tesla coil circuit model. Select the input impedance in the Tesla coil circuit model as the output parameter, and the number of turns of the winding, the radius of the high-voltage winding, the radius of the low-voltage winding, the wire diameter, and the turn spacing of the Tesla coil circuit model as the input parameters. By changing the input parameters of the Tesla coil circuit model, the output parameter will also change accordingly, thereby obtaining the original data samples; among them, the input parameter of the Tesla coil circuit model is the output parameter of the neural network, and the output parameter of the Tesla coil circuit model is the input parameter of the neural network; Step (2): Use the principal component analysis method to reduce the dimension of the original data samples; Step 2.1: Standardize the original data samples; First, standardize the original data sample matrix; the original data sample is represented by the following matrix, where each row represents a sample, a total of n samples, and each column represents a variable, a total of p variables: Standardize it: Among them, is the sample mean of the j-th index; is the sample standard deviation of the j-th index; Step 2.2: Calculate the correlation coefficient matrix R; Among them, the correlation coefficient matrix R = (r ij ) p×p , r ii = 1, r ij = r ji , r ij is the correlation coefficient between the i-th index and the j-th index; Step 2.3: Calculate the eigenvalues and eigenvectors; Calculate the eigenvalues λ1 ≥ λ2 ≥ … ≥ λ of the correlation coefficient matrix R p ≥ 0 and the corresponding standardized eigenvectors u1, u2, …, u p , where u j = [u 1j , u 2j , …, u pj T , and form p new index variables from the eigenvectors. For the c-th sample among a total of n samples, the derivation formula for the principal component variable is as follows:​ where y cp is the p-th principal component of the c-th sample; the principal component variables of all samples are obtained; Step 2.4: Select m principal components as the training samples of the neural network; To screen the training samples of the neural network, it is necessary to calculate the information contribution rate and cumulative contribution rate of the eigenvalue λ j ; the information contribution rate of the principal component y j is b j The calculation formula is as follows: Re - sort according to the magnitude of the contribution rate of the principal component information, from largest to smallest. The principal component with the largest contribution rate is listed as y1, and the principal component with the smallest contribution rate is listed as y p ; The cumulative contribution rates α of the principal components y1, y2, …, y m are calculated by the following formula: m The calculation formula is as follows: When α m ≥ 0.95, then select the first m indicator variables y1, y2,..., y m to replace the original p indicator variables, select m principal component variables as the training samples of the neural network; Step (3): Determine the BP neural network structure; Establish a three-layer BP neural network structure, including an input layer, a hidden layer, and an output layer; in the three-layer BP neural network, the number m of the principal component variables obtained in step two is the number of neurons in the input layer, n is the number of neurons in the hidden layer, and a is the number of neurons in the output layer; and there is a linear relationship between m and n; n = 2×m + 1 (7) In addition to the number of neurons, it is also necessary to design the transfer function, the number of iterations, the training accuracy, and the learning rate. The transfer functions of the hidden layer include sigmoid, logsig, tansig, and purelin. The number of iterations ranges from 100 to 1000, and the training accuracy is less than 10 -5 , and the learning rate is set to 0.01; The input layer only plays the role of introducing variables. The output formula of the hidden layer nodes is as follows: Among them, V represents the weight value of the hidden layer of the neural network, B represents the bias term of the hidden layer, X represents m nodes of the input layer, and f n represents the activation function, and z k represents the output of the k-th neuron in the hidden layer; The output formula of the output layer nodes is as follows: Among them, z h represents the h-th node of the hidden layer, and f y represents the activation function, and y k represents the output value of the k-th neuron in the output layer; Step (4): Optimize the weights and thresholds of the BP neural network by the genetic algorithm; Initialize the population. Select binary coding to describe all weights and thresholds. Select the norm of the error matrix between the predicted value and the expected value of the principal component samples in step (2) as the output of the fitness function. Select the roulette wheel strategy as the population selection strategy. Select the random single-point crossover on the binary parent individuals as the crossover strategy, and implement the mutation operation by changing the values of the binary coding, thereby generating a new population; Step 4.1: Population initialization The established BP neural network structure includes m neurons in the input layer, n neurons in the hidden layer, and a neurons in the output layer; therefore, the number of weights and thresholds to be optimized is as follows: the connection weight between the input layer and the hidden layer is m×n, the hidden layer threshold is n, the connection weight between the hidden layer and the output layer is n×a, and the output layer threshold is a; Each weight and threshold uses M-bit binary coding. Connecting the encodings of all weights and thresholds is the encoding of an individual. The first m×n×M bits are the encodings of the connection weights between the input layer and the hidden layer, m×n×M + 1 to m×n×M + n×M are the encodings of the hidden layer thresholds, (m + 1)×n×M to (m + 1)×n×M + n×a are the encodings of the connection weights between the hidden layer and the output layer, and the last part is the encoding of the output layer threshold; After specifying the encoding format, it is also necessary to give the population size N, the crossover probability Pc, the mutation probability Pm, the maximum number of iterations MaxIt, and the iteration count variable G = 0; Step 4.2: Fitness function The BP neural network is used to train the principal component variable samples processed by the PCA algorithm, and the trained BP neural network is used to predict the test samples. The norm of the error matrix between the predicted value and the expected value of the test samples is selected as the output of the fitness function; the smaller the error, the stronger the individual's adaptability to the living environment. Calculate the fitness value of each individual, compare and retain the current best fitness value and the best individual; Step 4.3: Selection operator, crossover operator, mutation operator The selection operator selects the roulette wheel strategy, that is, converts the fitness value of the objective function into a probability value. The larger the probability value, the more chances of being selected. The population has N individuals, and the probability of each individual being selected is P i , the fitness of individual i is f i , and the calculation formula is as follows: The crossover operator plays a role in exploring the space and providing global search ability. It is related to the crossover probability Pc. A random number is generated by programming. If it is less than Pc, a crossover event occurs; single-point crossover is selected. A crossover point is randomly selected on two binary-coded parent individuals, and the binary codes on both sides of the crossover point are exchanged to generate two new individuals; The mutation probability Pm ranges from 0.001 to 0.01; binary coding is adopted, and the mutation operation is realized by changing the coding position of the solution or changing the coding value; Step (5) Establish a PCA-GA-BP neural network to train the samples and complete the design; The sample data processed by the PCA algorithm is used as the training sample of the BP neural network. During the training process of the BP neural network, the GA algorithm is called to optimize the weights and thresholds of each neuron until the termination condition is met, and the best weights and thresholds of the BP neural network are obtained, so as to design the Tesla coil.