# A Multi-Constrained Optimization Method for THz Backward Wave Oscillators
## 3 Optimization Method
### Optimization for Global Optimum  
As for the global search, more than one local optimum could be found. The optimization method for searching local optimum from given starting point has been established. If enough starting points can be provided, local optimums will be found from these starting points, respectively. Then, the global optimum is obtained from these local optimums.  
Apparently, to find few but enough starting points is important for searching the global optimum effectively. It is always difficult to try all possible starting points. One reasonable method is to find new starting points based on the first-obtained local optimum (FOLO).  
Figure 6: Flow chart of the local search algorithm.  
Let the FOLO be denoted as \(\overset{\rightarrow}{s}_{op}=(q_{1},q_{2}\ldots,q_{k})\). The local solutions near the FOLO can be given using Equation (5) as  
\[\left\{\begin{array}{l}\overset{\rightarrow}{S}_{loc,i}=\overset{\rightarrow }{S}_{op}\cdot\left(1+\delta\left((a_{i,1},\ldots,a_{i,k})-\frac{v+1}{2}\right) \right)\\ 1\leq i\leq v^{2}\end{array}\right. \tag{9}\]  
Successive moves from the FOLO can be performed for new starting points. From Equation (9), the successive moves, i.e., series of solutions, can be written as  
\[\left\{\begin{array}{l}\overset{\rightarrow}{X}_{i}=\overset{\rightarrow }{S}_{loc,i}\cdot\left(1/q_{1},1/q_{2},\ldots,1/q_{k}\right)\\ \overset{\rightarrow}{S}_{i,j+1}^{\prime}=\overset{\rightarrow}{S}_{i,j}^{ \prime}\cdot\overset{\rightarrow}{X}_{i}\\ \overset{\rightarrow}{S}_{i,1}^{\prime}=\overset{\rightarrow}{S}_{loc,i}\\ 1\leq i\leq v^{2}\\ j=1,2,\ldots,j_{\text{max},i}-1\end{array}\right. \tag{10}\]  
where \(\overset{\rightarrow}{S}_{i,j}^{\prime}\) is the \(i\)th series; \(j_{\text{max},i}\) is defined as the last solution in the \(i\)th series, which breaks the specific constraints and can be solved during the iteration processes; \(\overset{\rightarrow}{X}_{i}\) is the'moving direction' for the \(i\)th series; other variables have been defined; \((q_{1},\ldots,q_{k})\) is \(\overset{\rightarrow}{S}_{op}\).  
It can be known from Equation (10) that the successive moves have \(v^{2}\) different 'directions' corresponding to the local solutions near the FOLO. The uniformity of these directions is guaranteed by the uniformity of these local solutions that are obtained by orthogonal design as described in Section 3.2.1. Therefore, at the ends of the successive moves from the FOLO along these 'directions', \(v^{2}\) new starting points can be found which are fully-spreading and located near the boundary of the parameter space of feasible solutions. It should be mentioned that all these 'directions' are not the same as the 'gradient direction'. Therefore, the greedy procedure to find new starting points is different from the iteration procedure in a gradient descent algorithm.  
Figure 7 shows the flow chart of the global search algorithm. To avoid an endless loop, the maximum number of LOs is limited by \(k_{\text{max}}=1000\). However, the search for the global optimum will commonly end due to the failure to find new LOs.  
It should be mentioned that it is very time-consuming to search the global optimum from all \(v^{2}\) new starting points. The search, in practice, typically needs only several new starting points because the iterations from different beginnings always end at an approximately same solution. An example will be described in detail in Section 4.2.