# A Novel Evolutionary Algorithm for Designing Robust Analog Filters
## 3 Methods: A Robust Analog Filter Design Using Evolutionary Algorithms
### Analog Filter Design using Bond Graphs and GP
#### 3.1.2 Evolving Analog Filters Using Bond Graphs and GP: The GPBG Framework
The detailed specifications of the three analog filter synthesis problems are as follows:  
* The lowpass filter synthesis problem is extracted from [13], in which the frequency response performance of a candidate filter is defined as the weighted sum of deviations from an ideal frequency response magnitude over 101 points: \[F_{koza}(t)=\sum_{i=0}^{100}\left[W(d(f_{i}),f_{i})\times d(f_{i})\right]\] (1) where \(f_{i}\) is the sampling frequency, \(d(x)\) is the absolute deviation of candidate frequency response from target response at frequency \(x\), and \(W(x,y)\) is the weight function specifying the penalty  
Figure 3: An example of a GP tree, composed of topology operators applied to an embryo, generating a bond graph after depth-first execution (numeric ERC nodes are omitted). Note that the 010 and 001 are the flag bits showing the presence or absence of attached C/I/R components. level for a given frequency response at a specified frequency range. The sampling points range from 1 Hz to 100 KHz, evenly distributed on a logarithmic scale. If the deviation from the ideal magnitude is less than 0.03 V, the weight \(W\) is 1. If the deviation is more than 0.03 V, the weight \(W\) is 10. The pass band is [1, 1K] Hz, and the stop band is [2K, 10K] Hz. A \"don't care\" band between 1 and 2 KHz neglects any deviation from the target response there. * The highpass filter synthesis problem has a similar configuration to the lowpass filter except for the complementary definitions of the pass and stop bands. The pass band is now defined as [2K, 10K] Hz, while the stop band is [1, 1K] Hz. To evolve an analog filter without considering robustness, the fitness function is defined as follows. First, we calculate the raw fitness defined as the average absolute deviation between the frequency response magnitude of the candidate solution and the target frequency response over all 101 sampling frequencies:  
\[f_{raw}=\frac{1}{101}\cdot F_{koza}(t)=\frac{1}{101}\cdot\sum_{i=0}^{100}{[W( d(f_{i}),f_{i})\times d(f_{i})]}. \tag{2}\]  
Note that this \(f_{raw}\) definition differs from [PERSON]'s raw fitness definition in Equation (1) by a multiplier equal to the number of sampling frequencies. We use the average deviation rather than sum of deviations to remove the influence of the number of sampling points. The raw fitness of a candidate solution is then normalized as follows:  
\[f_{norm}=\frac{NORM}{NORM+f_{raw}}. \tag{3}\]  
where \(NORM\) is a normalization term aiming to adjust the \(f_{norm}\) into the range of [0, 1]. This transformation also serves to convert the minimization of deviation from the target frequency response into the maximizing of fitness process used by our GP system. Since tournament selection is used as the selection operator, the normalization term can be arbitrary positive numbers. Here, the tournament selection operator is used due to its capability of achieving a good balance between exploiting and exploration and is widely used in GP [51]. For the lowpass and highpass filter problems here, NORM is set to 10, which gives a fitness range of [0, 1]. In this paper, a standard strongly-typed multi-population generational GP enhanced with the above features is used to evolve analog filters represented as bond graphs. The running parameters are specified in Section 4.