Electromagnetic Particle Algorithm for Beam–Wave Interaction in Traveling Wave Tube of Symmetry

: In many ﬁelds, such as space astrophysics, plasma and vacuum electronics, there are many nonlinear strong coupling physical problems. In order to solve the problem of electron beam–wave interaction in cylindrical Traveling wave tube (TWT) with symmetrical structure, a multi particle simulation algorithm for beam circuit is designed. The algorithm allows aperiodic time input, nonuniform linearity and large space diagnosis for different particles. In this algorithm, the ﬁeld of coupled slow-wave transmission line is simulated by ﬁnite difference method. Assuming that there is strong coupling between the beam and the circuit, the space center equation of transmission along the line is obtained, and the space charge ﬁeld is modeled considering the space charge effect, which can easily be ignored. The Particle In Cell (PIC) method of frog leaping step scheme is adopted to evaluate the electric ﬁeld of each particle center, determine the circuit and space charge ﬁeld, and design the termination part to compensate for the loss in order to avoid self-excited agitation. Finally, a simple numerical simulation is carried out for the electromagnetic problem and the accuracy of the code is checked against the electromagnetic simulator CHPIC. Therefore, the algorithm can be used to solve the problem of beam–wave interactions in a ﬁxed structure (cylindrical) in multiple ﬁelds and can accurately record the data in the process.


Introduction
As the best combination of bandwidth and gain in microwave tube, the traveling wave tube (TWT) is still ahead of solid-state amplifier in bandwidth and efficiency. TWT has the advantages of high power, high efficiency, high gain, wide bandwidth, large dynamic range and low noise [1]. It is also widely used in radar, electronic countermeasures and satellite communication. In the era of the rapid development of computer technology, computer numerical simulation technology is also developing rapidly [2,3]. In terms of the problem of scientific research and practical application being difficult to link, the computer numerical simulation method can conduct numerical modeling of the studied system and then simulate from a given initial state and obtain the whole simulation process and meaningful results, which is a good solution [4][5][6]. The numerical simulation results can also be compared with the theoretical calculation results and experimental results to study the essence of the problem.
Particle simulation method is an excellent computer numerical simulation method, which can be used to study the interaction process of charged particles with electric field and magnetic field [7][8][9]. It plays an irreplaceable role in the application of electronic signal amplifier, space astrophysics, plasma and vacuum electronics and has important military application prospects [10,11]. The particle simulation method can fully consider the various factors of particle motion, truly reflect the particle motion, and obtain better results than the experiment [12][13][14][15]. At the same time, in the process of simulation calculation, all motion data of each simulated particle will be recorded in the computer, and then detailed data information will be obtained for observation and analysis.
The interaction between the magnetic field generated by the rapid movement of the electron beam in the aircraft and the electron beam body can accumulate enough energy to release, thus causing damage to the aircraft [16][17][18]. For example, the electrons moving to the space around the aircraft gather on the surface of the aircraft, which leads to surface electrification [19,20]. This charge and related magnetic field will lead to surface arc discharge, electronic blowout, enhanced pollution and the movement of the electrical ground of the aircraft. The continuous flow of electric charges entering and exiting the aircraft surface constitutes a current, which may lead to electric leakage inside or outside the aircraft and become a potential safety hazard [21][22][23][24][25]. Therefore, it is of great significance to study the electromagnetic radiation generated during the launch and movement of the aircraft, analyze the electromagnetic characteristics of the aircraft surface potential change in time and frequency domain, and then effectively protect and shield its impact [26][27][28]. Because of the background of high current electron beam and electromagnetic static field, many physical problems are nonlinear, and there are strong coupling problems [29,30]. It is difficult to obtain accurate results only by traditional analytical methods and linear analysis. The physical process must be simulated by the electromagnetic particle algorithm. Therefore, it is very necessary to design the electromagnetic particle algorithm for beamwave interactions.
In this algorithm, the finite difference method is used to simulate the field of the coupled slow-wave transmission line. The coupling between the beam and the transmission line is based on the finite difference equation proposed by Brillouin (1949) [31,32]. Based on the difference principle, it directly starts from Maxwell's curl equation, which summarizes the general law of electromagnetic field, converts it into difference equations and samples the data of the continuous electromagnetic field at a certain volume and a certain period of time. Therefore, it is the most basic, essential and complete numerical simulation of electromagnetic field problems and has the widest applicability. It is also based on the characteristics of the FDTD algorithm, which it is mostly used as the time domain algorithm of electromagnetic field in electromagnetic PIC particle simulation. The electron beam emitted from the cathode of TWT is accelerated by the beam-wave interaction in the highfrequency system and emits high power electromagnetic waves. The study of beam-wave interaction in TWT is basically to solve Maxwell equation with a source (current source formed by electron beam) and the dynamic equation of electron motion.

Coupling between Beam and Circuit
It is assumed that the electron beam and the circuit will have a strong coupling effect. All beam charges in the traveling wave tube in Figure 1 generate charges on the equivalent circuit. nal amplifier, space astrophysics, plasma and vacuum electronics and has important military application prospects [10,11]. The particle simulation method can fully consider the various factors of particle motion, truly reflect the particle motion, and obtain better results than the experiment [12][13][14][15]. At the same time, in the process of simulation calculation, all motion data of each simulated particle will be recorded in the computer, and then detailed data information will be obtained for observation and analysis.
The interaction between the magnetic field generated by the rapid movement of the electron beam in the aircraft and the electron beam body can accumulate enough energy to release, thus causing damage to the aircraft [16][17][18]. For example, the electrons moving to the space around the aircraft gather on the surface of the aircraft, which leads to surface electrification [19,20]. This charge and related magnetic field will lead to surface arc discharge, electronic blowout, enhanced pollution and the movement of the electrical ground of the aircraft. The continuous flow of electric charges entering and exiting the aircraft surface constitutes a current, which may lead to electric leakage inside or outside the aircraft and become a potential safety hazard [21][22][23][24][25]. Therefore, it is of great significance to study the electromagnetic radiation generated during the launch and movement of the aircraft, analyze the electromagnetic characteristics of the aircraft surface potential change in time and frequency domain, and then effectively protect and shield its impact [26][27][28]. Because of the background of high current electron beam and electromagnetic static field, many physical problems are nonlinear, and there are strong coupling problems [29,30]. It is difficult to obtain accurate results only by traditional analytical methods and linear analysis. The physical process must be simulated by the electromagnetic particle algorithm. Therefore, it is very necessary to design the electromagnetic particle algorithm for beam-wave interactions.
In this algorithm, the finite difference method is used to simulate the field of the coupled slow-wave transmission line. The coupling between the beam and the transmission line is based on the finite difference equation proposed by Brillouin (1949) [31,32]. Based on the difference principle, it directly starts from Maxwell's curl equation, which summarizes the general law of electromagnetic field, converts it into difference equations and samples the data of the continuous electromagnetic field at a certain volume and a certain period of time. Therefore, it is the most basic, essential and complete numerical simulation of electromagnetic field problems and has the widest applicability. It is also based on the characteristics of the FDTD algorithm, which it is mostly used as the time domain algorithm of electromagnetic field in electromagnetic PIC particle simulation. The electron beam emitted from the cathode of TWT is accelerated by the beam-wave interaction in the high-frequency system and emits high power electromagnetic waves. The study of beam-wave interaction in TWT is basically to solve Maxwell equation with a source (current source formed by electron beam) and the dynamic equation of electron motion.

Coupling between Beam and Circuit
It is assumed that the electron beam and the circuit will have a strong coupling effect. All beam charges in the traveling wave tube in Figure 1 generate charges on the equivalent circuit.  I N−1/2 is the current between nodes N − 1 and N; V N is the voltage at node N; Q N is the charge on the capacitor at node N; q N is the line-deposited; q N is the beam-deposited; and Q N = q N + q N . Using Brillouin notation, the following spatial center equation transmitted along the route can be obtained: However, in our proposed algorithm, the beam charge q N is only a small fraction of the beam space G charge in the guide section and depends on the wavenumber of the space charge wave. The capacitor charge is shown in Equation (2).
Beam-circuit coupling coefficient κ(k) ≤ 1 reflects the nature of the space charge coupling constant of a finite-diameter traveling wave tube, where beam motion generates displacement currents, which in turn generate conduction currents in slow waveguides. The functional dependence of κ(k) on k is determined by the relative diameter of the electron beam and slow waveguide, as well as the transverse field distribution for the different modes.

Space Charge Effect
Some early analysis models ignored the effect of space charge, which may be acceptable for wavelet amplitude, but it cannot be ignored for large amplitude signals close to saturation. The early space charge model follows the wavelength of a disk or a ring and usually only has an approximate space charge field. The total force acting on the electron is the sum of the forces generated by the circuit field and the space charge field. However, in our proposed algorithm, PIC technology (i.e., space grid) is used to model the space charge field, as shown in Figure 2. Q q q = + . Using Brillouin notation, the following spatial center equation transmitted along the route can be obtained: However, in our proposed algorithm, the beam charge ' N q is only a small fraction of the beam space G charge in the guide section and depends on the wavenumber of the space charge wave. The capacitor charge is shown in Equation (2).
Beam-circuit coupling coefficient ( ) 1 k κ ≤ reflects the nature of the space charge coupling constant of a finite-diameter traveling wave tube, where beam motion generates displacement currents, which in turn generate conduction currents in slow waveguides.
The functional dependence of ( ) k κ on k is determined by the relative diameter of the electron beam and slow waveguide, as well as the transverse field distribution for the different modes.

Space Charge Effect
Some early analysis models ignored the effect of space charge, which may be acceptable for wavelet amplitude, but it cannot be ignored for large amplitude signals close to saturation. The early space charge model follows the wavelength of a disk or a ring and usually only has an approximate space charge field. The total force acting on the electron is the sum of the forces generated by the circuit field and the space charge field. However, in our proposed algorithm, PIC technology (i.e., space grid) is used to model the space charge field, as shown in Figure 2. In order to realize the difference calculation of spatial coordinates and considering the orthogonal and cross-linked relationship of electromagnetic fields in space, in the spatial grid, the field components in each coordinate axis direction are separated by half a grid space step, so the same field components are separated by one space step: the electric field and the magnetic field are separated by half a time step in time sequence, so that In order to realize the difference calculation of spatial coordinates and considering the orthogonal and cross-linked relationship of electromagnetic fields in space, in the spatial grid, the field components in each coordinate axis direction are separated by half a grid space step, so the same field components are separated by one space step: the electric field and the magnetic field are separated by half a time step in time sequence, so that Maxwell's equation can form an explicit difference equation after being dispersed, and then the electromagnetic problem can be solved iteratively in time after the initial value is given.
Assume that the radial distribution of the perturbed space charge field variable (such as Ex) is of the form J 0 (k vt r), where k vt = 2.4/r b , r b is the beam radius. This mode indicates that there is a conductor at the edge of the beam. Then, we use Poisson's equation to calculate the disturbing space charge potential φ, density ρ and the cylinder is shown in Formula (3): In the formula φ(x, r, θ) = φ(x)J 0 . The next section discusses the finite difference decomposition of this equation using the PIC technique.
In Equation (3), choosing to propagate as e j(kx−ωt) , one can obtain This equation shows the usual space charge reduction factor, where the effective plasma frequency is W q = RW q , This coefficient gives a simple explanation for the reduction of the axial field and the presence of the transverse field. The "best" choice of k vt depends on the type of slow-wave circuit chosen. As mentioned above, if the slow-wave circuit is a drift tube located at the edge of the beam, we choose to use k vt , which is probably the best choice for a coupled-cavity circuit.

PIC Method
The wave-equation finite-difference time-domain method (WEFDTD) is one of the important methods to simulate electromagnetic wave propagation. Its calculation step is a time-stepping, that is, frog-leaping iterative calculation carried out along the time axis. Therefore, the calculation steps of WEFDTD can also be spatially stepped, i.e., a frog leaping iterative calculation along a certain-spatial axis can be performed. Obviously, the two algorithms have their own advantages, and each has its own best problem to solve, so the PIC method of the frog-leaping step scheme is adopted. Each electron advances at each time step through the discrete form of the equation of motion. The acceleration a, velocity v and position equations used in the specification are similar to the following equations: In it, t n+1 = t n + Ar, ∆t is the time step in seconds, the subscript "Ar" represents the average of the variable between time t n and time t n+1 . However, there are two differences between this equation and the equation used in the algorithm; first, the electron velocity and position are evaluated at different times, separated by v ar , so if ∆t is small enough, v(t n + ∆t/2) will be close to v ar , and the same is true for a ar . Second, the algorithm uses normalized units, so x c = x/∆x and v c = v(∆t/∆x), where ∆x is the cell width in meters (∆x = Tube length, L/ number of cells, N C ) and v c = v(∆t/∆x).
For electric potential and electric fields, where e is the magnitude of the electron charge and m is the electron mass. The equation of motion used in the algorithm is on the right (E is derived from q c = −e): where "m" represents the particle and "t" represents the time step.
Variables are evaluated at the boundary or center of the N C unit in the simulation. Approximate the space charge density ρ at the cell boundaries by assigning the charge on each electron to the two nearest cell boundaries by linear interpolation (linear weighting or intracellular particles). If particle m is located between grid points i and i + 1, then the charge Q m on particle m will be distributed so that the charge ∆x is assigned to (i + 1) grid point. Figure 3 shows the weights. After weighing all the particles in the tube, normalize the space charge to the standard or the number of electrons injected per ∆t and per particle N E . A uniform positive ionic space charge is then added to yield a net charge per unit length. Since Q is the charge per cell, it means the integral of the radial dimension. Therefore, the difference in the radial density distributions of the RF and DC components of the space charge does not change Q i due to charge conservation.
where " m " represents the particle and " t " represents the time step.
Variables are evaluated at the boundary or center of the C N unit in the simulation.
Approximate the space charge density ρ at the cell boundaries by assigning the charge on each electron to the two nearest cell boundaries by linear interpolation (linear weighting or intracellular particles). If particle m is located between grid points i and 1 i + , then the charge m Q on particle m will be distributed so that the charge assigned to the i grid point, and Figure 3 shows the weights. After weighing all the particles in the tube, normalize the space charge to the standard or the number of electrons injected per Δt and per particle E N . A uniform positive ionic space charge is then added to yield a net charge per unit length. Since Q is the charge per cell, it means the integral of the radial dimension. Therefore, the difference in the radial density distributions of the RF and DC components of the space charge does not change i Q due to charge conservation.  A similar weighting method is used to approximate the beam current I b ; in the same way as the circuit current, I b is obtained at the center of each particle, at the (i + 1/2) − th grid point and half the time (t − 1/2)∆t. At same as speed, each electron supplies a current to the two nearest cell centers via bilinear interpolation. If at time (t − 1/2)∆t, particle m is located between grid points (i − 1/2) and (i + 1/2), the current produced by that particle is: The weights are given in Figure 4. After the contributions of all electrons are accumulated, the current is normalized to the unit of the injected beam current.
The space charge potential is found by solving a diagonal matrix given by the finite difference form of Equation (3): Due to the continuity of the beam charge, different drive terms can be used, Symmetry 2022, 14, 2119 The weights are given in Figure 4. After the contributions of all electrons are accumulated, the current is normalized to the unit of the injected beam current. The space charge potential is found by solving a diagonal matrix given by the finite difference form of Equation (3): Due to the continuity of the beam charge, different drive terms can be used, In our proposed algorithm, the telegraph operator equation has been transformed into a finite difference equation, which can also be solved by leap-frog time stepping. Use the following: In our proposed algorithm, the telegraph operator equation has been transformed into a finite difference equation, which can also be solved by leap-frog time stepping. Use the following: The equations used in the algorithm are: Alternatively, other driver items can be used: Figure 5 shows the overall model in time and space. The wave phase velocity v p is determined by ∆x/∆t, so Figure 6 shows the model of transmitted beam in TWT. Due to the use of the finite differential, there may be chromatic dispersion in the transmission line. Remove the driving term from Equation (19) and assume that the propagation of V C and J C is e j(kx−ωt) .
Alternatively, other driver items can be used: The wave phase velocity p v is determined by Figure 6 shows the model of transmitted beam in TWT. Due to the use of the finite differential, there may be chromatic dispersion in the transmission line. Remove the driving term from Equation (19) and assume that the propagation of C V and C J is ( )   The wave phase velocity p v is determined by Figure 6 shows the model of transmitted beam in TWT. Due to the use of the finite differential, there may be chromatic dispersion in the transmission line. Remove the driving term from Equation (19) and assume that the propagation of C V and C J is ( )  In the latter, the subscript of r b = r bm /x, Q b,i indicates that it is the beam space charge, not the charge in the transmission line, and ω 0 is the electron plasma frequency of the beam: Both the circuit and the space charge field are determined by the following finite difference method: Among them, the last is used in the algorithm and the same is used for φ, each variable has a corresponding scale. The area sum is given by: The field E m for each electron is then obtained from the two nearest particle centers E i−1/2 and E i+1/2 using linear weighting, so: This is the field used to move electrons in the next time step. Finally, the boundary conditions for the particles are the source and collector absorption. For example, if a particle passes the collector coordinates, it will be removed from the array that stores the particle's position and velocity, and the number of electrons will be reduced by one. The beam particles are injected into the source uniformly in time. Furthermore, the space charge potentials of both the source and collector are fixed to zero.

Transmission Line Algorithms
The circuit in Figure 1 can be written with loop and nodal equations, resulting in the telegraph operator's equation plus the driving term, under the constraints of small ∆x and ∆t: At the source location and collector location: where However, these terminations are matched (reflection free) only if there is no beam circuit coupling. The greater the coupling between the beam and the circuit, the greater the reflected signal, which pushes the loop gain beyond unity and the tube becomes an oscillator. To avoid self-oscillation, a segment of the transmission line is lossily compensated using the circuit segment shown in Figure 7. There are two options included in the algorithm. The first scheme has a smooth section located near the center of the line, starting from grid point 0 N , the spatial variation of the resistance is as follows: In Formula (29), This loss is to attenuate the reflected signal before it reaches the input of the tube, while reducing the gain by a small amount. As the reflected wave approaches the lossy cross-section, the wave reflected from the collector end of the tube (which may be up to 10% of the incident signal) becomes larger relative to the forward (growing) wave and these two waves produce interesting effects in the lossy section the interferogram. To overcome these limitations, a nearly completely absorbing or non-reflective termination section was designed. The termination is a lossy line at the pipe end of length . In this section, the coupling between the beam and the circuit is also reduced in a tapered manner. It is not possible to abruptly terminate the coupling between the beam and the circuit, as this would also introduce reflections. The current decreasing loss form is as follows: where x x = Δ and t t = Δ , and Equations (18) and (19) become: There are two options included in the algorithm. The first scheme has a smooth section located near the center of the line, starting from grid point N 0 , the spatial variation of the resistance is as follows: In Formula (29), θ = 2π i−N 0 N C −2N 0 and N 0 < i < N C − N. This loss is to attenuate the reflected signal before it reaches the input of the tube, while reducing the gain by a small amount. As the reflected wave approaches the lossy cross-section, the wave reflected from the collector end of the tube (which may be up to 10% of the incident signal) becomes larger relative to the forward (growing) wave and these two waves produce interesting effects in the lossy section the interferogram.
To overcome these limitations, a nearly completely absorbing or non-reflective termination section was designed. The termination is a lossy line at the pipe end of length N 1 units, where where R t ≤ 10 −5 , γ ≤ 0.2 and i > N C − N 10 . In this section, the coupling between the beam and the circuit is also reduced in a tapered manner. It is not possible to abruptly terminate the coupling between the beam and the circuit, as this would also introduce reflections. The current decreasing loss form is as follows: where x = ∆x and t = ∆t, and Equations (18) and (19) become: In the above formula, Ω = ω sin c(ω∆t/2) and K = k sin c(k∆x/2)(sin cy ≡ sin y/y). The elimination of V C and I C produces transmission line dispersion relations: This equation shows two results. First, it should be written as: The right-hand side of the equation must be less than 1 for ω to be correct; therefore, for a stable solution, we must make ∆t ≤ (LC) 1/2 ∆x as a condition. Formula (5) is then: This is the case if and only if v p = ∆x/∆t, v p = (LC) −1/2 .

Termination and Transmission Line Loss
The transmission line is terminated with a resistor and a voltage source at each end. Since the input and output source voltages V i and V o , respectively, are user-defined functions of time, only the updated circuit current needs to be calculated. The passive components connected to the transmission line are resistors R i and R o , which are input and output, respectively, and an inductor, L 0 /2, is connected in series with the input and output, respectively. The resulting equation for the second half is: However, when N C = 300, a gain of about 60 dB is achievable before the reflected signal becomes comparable to the input signal. The typical parameter values used are N 1 = 80, R t = 10 −6 and γ = 0.1.

Case Simulation
The code is mainly developed for beam-wave interaction analysis in cylindrical TWT with symmetrical structure using MATLAB software. Because the applicable structure of this algorithm is fixed, it does not have the simulation function for irregular TWT, and the fixed structure makes its simulation speed faster.
Next, the electromagnetic solution algorithm in TWT is tested, and the electron beam with beam voltage of 20 kV and 50 kV and input power of 100 W is added to the cylindrical TWT with symmetrical structure and center frequency of 2 × 10 11 Hz for simulation. The same input conditions are set and the relatively mature CHPIC electromagnetic simulation software for simulation analysis and comparison are used.
As shown in Figure 8, when the beam voltage in the algorithm is 20 kV, the circuit electric field distribution diagram and CHPIC code results generated at different positions in the traveling wave tube are compared.
However, if the beam voltage is increased to 50 kV, the electric field distribution law has changed greatly. As shown in Figure 9, when the beam voltage is 50 kV, the circuit electric field distribution diagram and CHPIC code results generated at different positions in the traveling wave tube are compared.
When the beam voltage in the algorithm is 20 kV, Figure 10 show the electron tracking using the space charge field and circuit field. It can be seen intuitively that the track of 20 kV electrons with beam voltage changes with time compared with the CHPIC code results.
with beam voltage of 20 kV and 50 kV and input power of 100 W is added to the cylindrical TWT with symmetrical structure and center frequency of 2 × 10 11 Hz for simulation. The same input conditions are set and the relatively mature CHPIC electromagnetic simulation software for simulation analysis and comparison are used.
As shown in Figure 8, when the beam voltage in the algorithm is 20 kV, the circuit electric field distribution diagram and CHPIC code results generated at different positions in the traveling wave tube are compared. However, if the beam voltage is increased to 50 kV, the electric field distribution law has changed greatly. As shown in Figure 9, when the beam voltage is 50 kV, the circuit electric field distribution diagram and CHPIC code results generated at different positions in the traveling wave tube are compared. When the beam voltage in the algorithm is 20 kV, Figure 10 show the electron tracking using the space charge field and circuit field. It can be seen intuitively that the track of 20 kV electrons with beam voltage changes with time compared with the CHPIC code results.    When the beam voltage in the algorithm is 20 kV, Figure 10 show the electron tracking using the space charge field and circuit field. It can be seen intuitively that the track of 20 kV electrons with beam voltage changes with time compared with the CHPIC code results.      Figure 11 also shows the electron tracking trajectory of space charge field and circuit field in the calculation example when the beam voltage is 50 kV, and the comparison effect with CHPIC code. Figure 12 shows the simulation results of output voltage changes with different positions in TWT when the beam voltage is 20 kV, and the results are compared with the simulation results of CHPIC code. Table 1 compares the algorithm test results and CHPIC code results in detail, the output voltage value generated at the TWT inlet, and the maximum and minimum output voltage values corresponding to different positions in the TWT. Figure 13 shows the simulation results of output voltage changes with different positions in TWT when the beam voltage is 50 kV, and the results are compared with the simulation results of CHPIC code. Table 2 compares the algorithm test results and CHPIC code results in detail, the output voltage value generated at the TWT inlet, and the maximum and minimum output voltage values corresponding to different positions in the TWT.  Figure 11 also shows the electron tracking trajectory of space charge field and circuit field in the calculation example when the beam voltage is 50 kV, and the comparison effect with CHPIC code. Figure 11. Electronic tracking (blue part) and CHPIC code generation results (purple part) generated by 50 kV RF voltage simulation in an algorithm test. Figure 12 shows the simulation results of output voltage changes with different positions in TWT when the beam voltage is 20 kV, and the results are compared with the simulation results of CHPIC code. Table 1 compares the algorithm test results and CHPIC code results in detail, the output voltage value generated at the TWT inlet, and the maximum and minimum output voltage values corresponding to different positions in the TWT.   Figure 13 shows the simulation results of output voltage changes with different positions in TWT when the beam voltage is 50 kV, and the results are compared with the simulation results of CHPIC code. Table 2 compares the algorithm test results and CHPIC code results in detail, the output voltage value generated at the TWT inlet, and the maximum and minimum output voltage values corresponding to different positions in the TWT.     Figure 13 shows the simulation results of output voltage changes with different positions in TWT when the beam voltage is 50 kV, and the results are compared with the simulation results of CHPIC code. Table 2 compares the algorithm test results and CHPIC code results in detail, the output voltage value generated at the TWT inlet, and the maximum and minimum output voltage values corresponding to different positions in the TWT.    Figure 14 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 20 kV, and the results are compared with the CHPIC code simulation results. Table 3 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.  Figure 14 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 20 kV, and the results are compared with the CHPIC code simulation results. Table 3 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.   Figure 15 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 50 kV, and the results are compared with the CHPIC code simulation results. Table 4 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.   Figure 15 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 50 kV, and the results are compared with the CHPIC code simulation results. Table 4 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.  Figure 14 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 20 kV, and the results are compared with the CHPIC code simulation results. Table 3 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.   Figure 15 shows the simulation results that the output power caused by beam-wave action changes with different positions in the TWT when the beam voltage is 50 kV, and the results are compared with the CHPIC code simulation results. Table 4 compares the algorithm test results and CHPIC code results in detail, the output power value generated at the TWT inlet, and the maximum and minimum output power values corresponding to different positions in the TWT.  It can be seen from Figures 8-11 that the electric field distribution produced by the proposed algorithm and the commercial CHPIC code under the beam-wave action of 20 kV and 50 kV RF voltage coincides well, and the consistency of electron trajectory changes is good. Tables 1 and 2 show some significant data of the output voltage shown in Figures 12 and 13. No matter the voltage at the head of the TWT, or the highest and lowest voltage values generated at different locations, they are all in good agreement. The same is true for the output power data shown in Figures 14 and 15 and given in Tables 3 and 4.

Conclusions
In order to solve many nonlinear and strong coupling problems in physics based on the background of high current electron beam and electromagnetic static field, a nonlinear beam-wave analysis method in the frequency domain is proposed for analyzing the electron beam-wave problem of cylindrical traveling wave tube. The basic working equation of the coupling between the beam and the circuit is given and considering the space charge effect caused by the large-amplitude signal close to saturation, the electric field at the center of each particle is given by the PIC method using the leap-frog step scheme. The specific steps for evaluating and determining the circuit and space charge field are presented, and the design principle of the termination part of the algorithm for lossy compensation in order to avoid self-excitation is introduced. This algorithm code generates the distribution diagram of electric field, electron trajectory, output voltage and output power variables in TWT, providing data for solving problems in physics. The design of the algorithm only uses a single cylindrical structure. Although it speeds up the simulation, the simulation of irregular structures is still lacking and needs further improvement.