# A Phase Angle-Modulated Bat Algorithm with Application to Antenna Topology Optimization
## 3 Phase Angle Modulated Bat Algorithm (P-AMBA)
### P-Amba  
In AMBA, after each iteration of the four-dimensional parameters, the richness of the discrete search space mapped by the trigonometric generating function is not enough to meet the optimization requirements. To maximize the impact of the parameter changes  
Figure 2: Generating function plotted with default values (\(a=0\), \(b=1\), \(c=0.5\), and \(d=0\)). on the generating function, the P-AMBA proposed in this paper adds a phase adjustment to the cosine wave and an amplitude adjustment to the sine wave. P-AMBA can increase the global search ability of the optimization process to a certain extent. The generating function is described as follows:  
\[g(x)=e\times sin(2\pi(x-a)\times b\times cos(2\pi(x-a)\times c)+g)+d. \tag{12}\]  
When \(x\) takes the number of equal intervals from 1 to \(n\) dimensions, the function g(\(x\)) will generate the corresponding value. By converting \(g(x)(x=0,1,2,\cdots,n)\) into a 0/1 bit string through the conversion of Equation (12), we can achieve a mapping relationship. The rule of the conversion function is to take 0 when \(g(x)\leq 0\) and to take 1 when \(g(x)>0\). \[g(x)=\left\{ \begin{array}{cc}0&g(x)\leq 0\\ 1&g(x)>0\end{array} \right. (x=0,1,2,\cdots,n) \tag{13}\]  
The original generating function lacks the control of the amplitude of the sine wave, so that the update of the vertical displacement \(d\) has less influence on the function curve. To make up for the lack of amplitude, the parameter \(e\) that controls the amplitude of the sine wave is added. Similarly, the cosine wave lacks phase adjustment. Adding a parameter \(g\) after the cosine wave can increase the fluctuation ability of the function near the zero points. The improved function adds two parameters, so the individual bat in the bat algorithm is six-dimensional:  
\[X=(a,b,c,d,e,g)\in[-1,1]. \tag{14}\]  
A comparison of the figures for the generating function between P-AMBA and AMBA is represented in Figure 3. It can be seen from the figure that when a parameter \(e\) is added, the parameter \(d\) that controls the phase of the entire function has a greater impact on the up and down positions of the function. This can better control the position of the function and obtain the desired 0/1 solution set. At the same time, by adding the parameter \(g\) to control the phase of the cosine wave, the function is more complicated. Each iterative update of the value of the six-dimensional parameter will result in a greater change in the overall mapping relationship of the function, and it will further enrich the exploration of possible solutions. P-AMBA has more parameters than BBA and AMBA, which may increase the complexity of the algorithm in the optimization process. However, the operation of adding new parameters can significantly improve the optimization ability in the high-dimensional binary search space. After introducing the idea of angle modulation, the optimization process is essentially a continuous optimization process applied under binary demand. The key step is to  
Figure 3: Generating function plotted with default values (\(a=0,b=0.5,c=0.8,d=0.5,e=0.4,\) and \(g=0.2\)). substitute six parameters into the trigonometric generating function to generate an \(n\)-dimensional bit string and then to calculate the fitness function. The pseudo-code of the P-AMBA is shown in Algorithm 2.