Optimization of Butterworth and Bessel Filter Parameters with Improved Tree-Seed Algorithm

Filters are electrical circuits or networks that filter out unwanted signals. In these circuits, signals are permeable in a certain frequency range. Attenuation occurs in signals outside this frequency range. There are two types of filters: passive and active. Active filters consist of passive and active components, including transistors and operational amplifiers, but also require a power supply. In contrast, passive filters only consist of resistors and capacitors. Therefore, active filters are capable of generating signal gain and possess the benefit of high-input and low-output impedance. In order for active filters to be more functional, the parameters of the resistors and capacitors in the circuit must be at optimum values. Therefore, the active filter is discussed in this study. In this study, the tree seed algorithm (TSA), a plant-based optimization algorithm, is used to optimize the parameters of filters with tenth-order Butterworth and Bessel topology. In order to improve the performance of the TSA for filter parameter optimization, opposition-based learning (OBL) is added to TSA to form an improved TSA (I-TSA). The results obtained are compared with both basic TSA and some algorithms. The experimental results show that the I-TSA method is applicable to this problem by performing a successful prediction process.


Introduction
Optimization techniques are used to solve real-world problems that are difficult or complex to solve [1].Optimization means reaching the best possible result by using the available possibilities [2].Meta-heuristic algorithms, which are generally inspired by nature, are used in the literature to solve engineering problems that are often complex [3].Optimal solutions of the solved problems are estimated based on the methods used [4].According to the No Free Lunch theory, there is no single algorithm for solving optimization problems [5].For this reason, there are many meta-heuristic algorithms in the literature for optimum solutions to real-world engineering problems [6][7][8].In this study, parameter adjustment was the aim for Butterworth and Bessel active filters, which is one of the realworld problems.A filter is a device that passes electrical signals at certain frequencies or frequency ranges while blocking the passage of others.Jiang et al. [9] proposed the clonal selection algorithm for selecting the optimal components for the Butterworth filter design.It has been said that the experimental results are much more successful than the studies in the literature.Shakoor et al. [10] presented a genetic algorithm-based optimization approach for the parameter optimization of active filters.They said that it can be used to design all kinds of active filters according to the analysis results.De et al. [11] proposed a particle swarm optimization algorithm for the design of active filters.According to the test results, it is stated that the design error of active filters is minimized thanks to this proposed method.Temurtas [12] made some improvements to the charged system search algorithm (CSS).Both the CSS and the proposed method are used to determine the named I-TSA.I-TSA was compared with both the basic TSA and the results of PSO and CSS algorithms.In addition, I-TSA and TSA were analyzed separately according to the ST parameters.Convergence plots, box plots and gain plots, obtained as a result of all of these analyses, are presented in the relevant sections.
The following sections of the study are designed as follows.In Section 2, the TSA method is explained.In Section 3, the improved TSA method is explained.In Section 4, the design of the filters is mentioned.In Section 5, the experimental results obtained according to the filter types are given.In the last chapter (Section 6), the conclusion and suggestions are given.

Tree Seed Algorithm
The TSA, inspired by nature, was proposed by Kıran in 2015 [26].The TSA is formed from the interaction of the positions of trees and seeds in the search space.The best tree in the population or randomly selected tree position is used for each seed production.The most important parameter of the TSA method is the ST control parameter.This parameter ensures the diversity of seed production.This diversity is realized using the formulas in Equations ( 1) and ( 2) [27].Here, if the randomly selected number is less than the ST parameter value, the first equation is used, and if it is larger, the second equation is used.
where S i,j refers to the seeds produced.T i,j refers to the tree of the specified size.α i,j is a random number generated between −1 and 1. B j denotes the best tree.T r,j denotes a tree randomly selected from the population.At the beginning of the search space, the initial population (tree locations), which is specified as possible solutions in optimization problems, is obtained using Equation (3) [28].
where L j,min and H j,max are the lower and upper bounds of the search space, respectively.r i,j is a randomly generated value between 0 and 1.To select the best solution from the population, a function f is defined, which is used in Equation ( 4) [29].
where N stands for the trees in the population.The working diagram of the TSA is given in Figure 1 [30].Here, trees are first planted in the search space (a), then seed production is performed for each tree (b), and finally seed selection is performed (c).The pseudo code of the TSA is given in Algorithm 1 [31].
Biomimetics 2023, 8, x FOR PEER REVIEW 3 of 21 and effectiveness.In this study, the TSA was improved by the OBL method and applied to the filter design problem.The improved TSA was named I−TSA.I−TSA was compared with both the basic TSA and the results of PSO and CSS algorithms.In addition, I−TSA and TSA were analyzed separately according to the ST parameters.Convergence plots, box plots and gain plots, obtained as a result of all of these analyses, are presented in the relevant sections.
The following sections of the study are designed as follows.In Section 2, the TSA method is explained.In Section 3, the improved TSA method is explained.In Section 4, the design of the filters is mentioned.In Section 5, the experimental results obtained according to the filter types are given.In the last chapter (Section 6), the conclusion and suggestions are given.

Tree Seed Algorithm
The TSA, inspired by nature, was proposed by Kıran in 2015 [26].The TSA is formed from the interaction of the positions of trees and seeds in the search space.The best tree in the population or randomly selected tree position is used for each seed production.The most important parameter of the TSA method is the ST control parameter.This parameter ensures the diversity of seed production.This diversity is realized using the formulas in Equations ( 1) and ( 2) [27].Here, if the randomly selected number is less than the ST parameter value, the first equation is used, and if it is larger, the second equation is used.
where  , refers to the seeds produced. , refers to the tree of the specified size. , is a random number generated between −1 and 1.   denotes the best tree. , denotes a tree randomly selected from the population.At the beginning of the search space, the initial population (tree locations), which is specified as possible solutions in optimization problems, is obtained using Equation (3) [28].
, =  ,min +  , ( ,max −  ,min ) where  ,min and  ,max are the lower and upper bounds of the search space, respectively. , is a randomly generated value between 0 and 1.To select the best solution from the population, a function  is defined, which is used in Equation (4) [29].
where  stands for the trees in the population.The working diagram of the TSA is given in Figure 1 [30].Here, trees are first planted in the search space (a), then seed production is performed for each tree (b), and finally seed selection is performed (c).The pseudo code of the TSA is given in Algorithm 1 [31].

END IF END FOR END FOR
Select the best seed and compare it with the tree.If the seed location is better than the tree location, the seed substitutes for this tree.

END FOR Step 3: Selection of the best solution
Select the best solution of the population.If new best solution is better than the previous best solution, new best solution substi-tutes for the previous best solution.
Step 4: Testing the termination condition

Improved Tree Seed Algorithm
Since the initial population is randomly distributed in the search space of the TSA, initial solutions are generated randomly.Instead, by using the opposition-based learning (OBL) method [32], the TSA can obtain a better initial population and by continuing the process, the TSA can produce successful solutions.The OBL method was first introduced in 2005 and has been used in many studies.Thus, the OBL method aims to improve the performance of the algorithm.In this study, the OBL method evaluates the solution of the problem while at the same time generating an opposing solution so that the TSA will have the chance to produce a solution closer to the global optimum in the search space [33].According to the OBL method, when a and b are real numbers, the value of x is calculated as in Equation (5).

Filter Design Problem
A filter is a device that passes electrical signals in a certain frequency range without undergoing any change and prevents signals from other frequencies from passing [34].There are two types of filter designs.The first is the passive filter, and the second is the active filter.Passive filter design incorporates resistors, capacitors and coils as circuit elements, whereas semiconductor circuit elements, like transistors, are added to the circuit along with passive circuit elements for active filter design.In this study, lowpass active Butterworth and Bessel filters (LPAFs) and high-pass active Butterworth and Bessel filters (HPAFs) were designed by connecting five filters in succession and increasing to the 10th order in Sallen-Key topology, which is an electronic filter topology with a second-order active filter.In this study, resistors suitable for the E24 series were used.All nominal resistance values of the E24 series resistors are given in Table 1.The E24 series comprises preferred resistor values enabling electronic component designers and manufacturers to select from a practical range of values.This set was developed to simplify the design process.

Design and Equations of LPAF
The second order in Sallen-Key topology and the tenth order in Sallen-Key topology circuit diagrams for the LPAF are given in Figures 2 and 3, respectively.sistance values of the E24 series resistors are given in Table 1.The E24 series comprises preferred resistor values enabling electronic component designers and manufacturers to select from a practical range of values.This set was developed to simplify the design process.

Design and Equations of HPAF
The second order in Sallen-Key topology and tenth order in Sallen-Key topology circuit diagrams for the HPAF are given in Figures 4 and 5, respectively.
The second order in Sallen-Key topology and tenth order circuit diagrams for the HPAF are given in Figures 4 and 5, resp  The equations for the transfer function of the circuit, stand effect are given in Equations ( 9), ( 10) and (11), respectively [12,35 The second order in Sallen-Key topology and tenth order in Sallen-Key topology circuit diagrams for the HPAF are given in Figures 4 and 5, respectively.The equations for the transfer function of the circuit, standard form and amplitude effect are given in Equations ( 9), ( 10) and (11), respectively [12,[35][36][37][38].

Cost Function Errors
The total error calculation of the designed filter was calculated using Equations ( 12) and ( 13).This formula is obtained by summing the cost function errors of FSF values and Q values.The equations for the transfer function of the circuit, standard form and amplitude effect are given in Equations ( 9)-( 11), respectively [12,[35][36][37][38].

Cost Function Errors
The total error calculation of the designed filter was calculated using Equations ( 12) and ( 13).This formula is obtained by summing the cost function errors of FSF values and Q values.

Experimental Results
The proposed I-TSA was used to estimate the parameters of the Butterworth and Bessel filter problem.Parameter optimization was also performed on the ST parameter of the I-TSA method, and the ST parameter was determined as 0.1, 0.5 and 0.9, respectively.The estimation results obtained for both Butterworth and Bessel filters are given in the tables, and the gain graphs are shown in the figures.The performance of the proposed I-TSA was also compared with the results of both the basic TSA and PSO and CSS algo-rithms.Convergence and box plots are also presented.All results are presented under the relevant headings.

LPAF
The results obtained by applying the I-TSA method to the LPAF problem are given in this section.The values obtained as a result of the least error value obtained using the I-TSA method are given in Table 2. R1 (kΩ), R2 (kΩ), C1 (nF) and C2 (nF) values for each stage are shown in Table 2.In Table 3, the FSF values and Q values estimated using the I-TSA method are given.It has been observed that the results obtained with the proposed method are very close to the targeted results.Especially when the ST value is 0.1, it has achieved a better performance in terms of FSF and Q values.In Table 4, the parameter of the LPAF problem is the error value obtained as a result of the estimation with the I-TSA method.For the LPAF problem, the I-TSA, TSA, PSO and CSS was run 30 times, and the best, mean, worst and standard deviation values obtained are given in the table.When the table is examined, it is seen that the I-TSA method has the least error value when the ST value is 0.1.Therefore, it can be said that the parameter values in cases where the ST value is 0.1 are robust.When analyzed according to all ST conditions of the I-TSA, TSA, PSO and CSS, the graphs in Figure 6 are obtained.In Figure 6a, it is seen in the MaxFEs graph that when the ST value is 0.1, I-TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 6b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 6c,d, respectively.

HPAF
The results obtained by applying the I-TSA method to the HPAF problem are given in this section.The values of the minimum error value result obtained according to the ST values of the I-TSA method are given in Table 5. R1, R2, C1 and C2 values for each stage are shown in Table 5.
Biomimetics 2023, 8, x FOR PEER REVIEW 8 of 21 has the least error value when the ST value is 0.1.Therefore, it can be said that the parameter values in cases where the ST value is 0.1 are robust.When analyzed according to all ST conditions of the I−TSA, TSA, PSO and CSS, the graphs in Figure 6 are obtained.In Figure 6a, it is seen in the MaxFEs graph that when the ST value is 0.1, I−TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 6b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 6c,d, respectively.

HPAF
The results obtained by applying the I−TSA method to the HPAF problem are given in this section.The values of the minimum error value result obtained according to the ST values of the I−TSA method are given in Table 5. R1, R2, C1 and C2 values for each stage are shown in Table 5.In Table 6, the FSF values and Q values estimated using the I−TSA method are given.It has been observed that the results obtained with the proposed method are very close to the targeted results.The closest value in terms of FSF and Q values was obtained with an ST value of 0.1.It was observed that the ST value of 0.1 was closer to the FSF and Q values.In Table 6, the FSF values and Q values estimated using the I-TSA method are given.It has been observed that the results obtained with the proposed method are very close to the targeted results.The closest value in terms of FSF and Q values was obtained with an ST value of 0.1.It was observed that the ST value of 0.1 was closer to the FSF and Q values.In Table 7, the parameter of the HPAF problem is the error value obtained as a result of the estimation with the I-TSA method.For the HPAF problem, the I-TSA, TSA, PSO and CSS method was run 30 times, and the best, mean, worst, and standard deviation values obtained are given in the table.When the table is examined, it is seen that the I-TSA method has the least error value when the ST value is 0.1.Therefore, it can be said that the parameter values in cases where the ST value is 0.1 are robust.When analyzed according to all algorithms, the graphs in Figure 7 are obtained.In Figure 7a, it is seen in the MaxFEs graph that when the ST value is 0.1, I-TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 7b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 7c,d, respectively.

LPAF
The results obtained by applying the I-TSA method to the LPAF problem are given in this section.The values obtained because of the least error value obtained by the I-TSA method are given in Table 8.R1, R2, C1 and C2 values for each stage are shown in Table 8.

LPAF
The results obtained by applying the I−TSA method to the LPAF problem are given in this section.The values obtained because of the least error value obtained by the I−TSA method are given in Table 8.R1, R2, C1 and C2 values for each stage are shown in Table 8.Table 9 shows the FSF values and Q values estimated using the I-TSA method.It is seen that the results obtained with the proposed method are very close the targeted results.The closest value in terms of the FSF value was obtained when the ST value was 0.1.The closest value in terms of the Q value was obtained when the ST value was 0.1.In Table 10, the parameter of the LPAF problem is the error value obtained as a result of the estimation with the I-TSA, TSA, PSO and CSS method.For the LPAF problem, the I-TSA, TSA, PSO and CSS method was run 30 times, and the standard deviation values obtained are given in the table.When the table is examined, it is seen that the I-TSA method has the least error value when the ST value is 0.1.Therefore, it can be said that the parameter values in cases where the ST value is 0.1 are robust.When analyzed according to all algorithms, the graphs in Figure 8 are obtained.In Figure 8a, it is seen in the MaxFEs graph that the ST value is 0.1, I-TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 8b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 8c,d, respectively.

HPAF
The results obtained by applying the I-TSA method to the HPAF problem are given in this section.R1, R2, C1 and C2 values for each stage are shown in Table 11, the FSF and Q values are given in Table 12 and the finally, a comparison among the swarm intelligence algorithms have been given in in Table 13.When analyzed according to all algorithms, the graphs in Figure 8 are obtained.In Figure 8a, it is seen in the MaxFEs graph that when the ST value is 0.1, I−TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 8b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 8c,d

HPAF
The results obtained by applying the I−TSA method to the HPAF problem are given in this section.R1, R2, C1 and C2 values for each stage are shown in Table 11, the FSF and Q values are given in Table 12 and the finally, a comparison among the swarm intelligence algorithms have been given in in Table 13.Table 12 shows the FSF values and Q values estimated using the I-TSA method.It is seen that the results obtained with the proposed method are very close to the targeted results.The closest value in terms of the FSF value was obtained when the ST value was 0.5 and 0.9.In terms of the Q value, the closest value was obtained when the ST value was both 0.1 and 0.9.
In Table 13, the parameter of the HPAF problem is the error value obtained as a result of the estimation with the I-TSA method.For the HPAF problem, the I-TSA, TSA, PSO and CSS method was run 30 times, and the standard deviation values obtained are given in the table.When the table is examined, it is seen that the TSA method has the least error value when the ST value is 0.1.Therefore, it can be said that the parameter values in cases where the ST value is 0.1 are robust.
When analyzed according to all algorithms, the graphs in Figure 9 are obtained.In Figure 9a, it is seen in the MaxFEs graph that when the ST value is 0.1, I-TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 9b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 9c,d, respectively.
When analyzed according to all algorithms, the graphs in Figure 9 are obtained.In Figure 9a, it is seen in the MaxFEs graph that when the ST value is 0.1, I−TSA achieves a more stable convergence and reaches the minimum error value.The box plots obtained from here are given in Figure 9b.In addition, the gain and gain (dB) graphs based on the minimum error value according to the ST values are given in Figure 9c,d

Conclusions
The TSA method has become an alternative method for many real world problems.In this study, the I−TSA method, which is constructed by improving the TSA, is used for the first time in the literature to estimate the parameters of Butterworth and Bessel filters.For this study, I−TSA and TSA methods were analyzed for three different values of the ST parameter.These values are 0.1, 0.5 and 0.9, respectively.In the LPAF problem for

Conclusions
The TSA method has become an alternative method for many real world problems.In this study, the I-TSA method, which is constructed by improving the TSA, is used for the first time in the literature to estimate the parameters of Butterworth and Bessel filters.For this study, I-TSA and TSA methods were analyzed for three different values of the ST parameter.These values are 0.1, 0.5 and 0.9, respectively.In the LPAF problem for Butterworth filter design, the I-TSA outperforms both the basic TSA and other algorithms with the least error value when the ST value of the I-TSA is 0.1.At the same time, in the HPAF problem, the least error value was obtained when the ST value of the I-TSA was 0.1.For Bessel filter design, in both the LPAF and HPAF problems, the I-TSA was more successful than other algorithms by obtaining the least error value when the ST value was 0.1.The success of the I-TSA was analyzed according to the ST values, and it was concluded that it achieved the best result at a value of 0.1.In addition, convergence graphs, box plots and gain graphs were drawn for all ST values in the I-TSA method.When these graphs are analyzed, it is seen that the I-TSA converges more successfully and produces more stable results than other algorithms when the ST value is 0.1 in all problems.As a result, the performance of the I-TSA is improved by contributing to the good results of the proposed OBL method for the TSA in the filter design problem.
In future studies, it is planned to use different plant-based algorithms in the filter design problem.It is also recommended to use the proposed I-TSA in different problems.

Figure 1 . 1 .
Figure 1.Working diagram of basic TSA (a) Initialization (b) Seed production (c) Seed selection Figure 1.Working diagram of basic TSA (a) Initialization (b) Seed production (c) Seed selection.

Figure 6 .
Figure 6.Plots for in the BWF: (a) convergence graphs of I-TSA, TSA, PSO and CSS; (b) box plots of I-TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I-TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I-TSA, TSA, PSO and CSS.

Figure 7 .
Figure 7. Plots for HPAF in the BWF: (a) convergence graphs of I−TSA, TSA, PSO and CSS; (b) box plots of I−TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I−TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I−TSA, TSA, PSO and CSS.

Figure 7 .
Figure 7. Plots for HPAF in the BWF: (a) convergence graphs of I-TSA, TSA, PSO and CSS; (b) box plots of I-TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I-TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I-TSA, TSA, PSO and CSS.

Figure 8 .
Figure 8. Plots for LPAF in the BF: (a) convergence graphs of I−TSA, TSA, PSO and CSS; (b) box plots of I−TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I−TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I−TSA, TSA, PSO and CSS.

Figure 8 .
Figure 8. Plots for LPAF in the BF: (a) convergence graphs of I-TSA, TSA, PSO and CSS; (b) box plots of I-TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I-TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I-TSA, TSA, PSO and CSS.

Figure 9 .
Figure 9. Plots for HPAF in the BF: (a) convergence graphs of I−TSA, TSA, PSO and CSS; (b) box plots of I−TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I−TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I−TSA, TSA, PSO and CSS.

Figure 9 .
Figure 9. Plots for HPAF in the BF: (a) convergence graphs of I-TSA, TSA, PSO and CSS; (b) box plots of I-TSA, TSA, PSO and CSS; (c) frequency and gain graphs of I-TSA, TSA, PSO and CSS; (d) frequency and gain (dB) graphs of I-TSA, TSA, PSO and CSS.

Table 1 .
E24 series resistance and capacitors values.

Table 1 .
E24 series resistance and capacitors values.

Table 2 .
The best component values obtained for LPAF in the BWF.

Table 3 .
Parameter values obtained for LPAF in the BWF.

Table 4 .
Error value obtained for LPAF in the BWF.

Table 4 .
Error value obtained for LPAF in the BWF.

Table 5 .
The best component values obtained for HPAF in the BWF.

Table 5 .
The best component values obtained for HPAF in the BWF.

Table 6 .
Parameter values obtained for HPAF in the BWF.

Table 7 .
Error value obtained for HPAF in the BWF.

Table 8 .
The best component values obtained for LPAF in the BF.

Table 9 .
Parameter values obtained for LPAF in the BF.

Table 10 .
Error value obtained for LPAF in the BF.

Table 11 .
The best component values obtained for HPAF in the BF.

Table 12 .
Parameter values obtained for HPAF in the BF.

Table 13 .
Error value obtained for HPAF in the BF.