# 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 problem of automated synthesis of bond graphs involves two basic searches: the search for a good topology and the search for good parameters for each topology, in order to be able to evaluate its performance. Building upon [PERSON]'s work on automated synthesis of electronic circuits [41], we created a developmental GP system for open-ended synthesis of mechatronic systems represented as bond graphs [2]. It includes the following major components: (1) an embryo bond graph with modifiable sites at which further topological operations can be applied to grow the embryo into a functional system, (2) a GP function set, composed of a set of topology manipulation and other primitive instructions which will be assembled into a GP tree by the evolutionary process (the execution of this GP program leads to topological and parametric manipulation of the developing embryo bond graph), and (3) a fitness function to evaluate the performance of candidate solutions. Choosing a good function set for bond graph synthesis is not easy. In our earliest work [43], a basic GP function set was used for evolutionary synthesis of analog filters. In that approach, the GP functions for topological operation included (Insert_J0/J1, Add_C/I/R, and Replace_C/I/R), which allowed evolution of a large variety of bond graph topologies. The shortcoming of this approach is that it tended to evolve redundant and sometimes causally ill-posed bond graphs [48]. Later, we used a causally well-posed modular GP function set to evolve more concise bond graphs with much less  
Figure 1: A bond graph and its equivalent electrical circuit. The dotted boxes in the left bond graph indicate modifiable sites at which further topological manipulations can be applied (to be explained in the next section). Figure 2: The bond graph structure of a lowpass filter evolved by the GPBG method with 500,000 function evaluations. This filter has 39 components without counting the embryo components. (Component sizing values are omitted in the figure for simplicity). redundancy [45]. However, that encoding had a strong bias toward a chain-type topology and thus may have limited the scope of topology search [46]. In this paper, we used the following hybrid function set approach to reduce redundancy while enjoying the flexibility of topological exploration. \[\text{F}=\{\text{Insert\_JOE, Insert\_J1E, Add\_C/I/R, EndNode, EndBond, ERC}\}.\]  
Details of this GP function set for bond-graph-based analog filter synthesis are available in [46; 49]. Figure 3 shows a GP tree that develops an embryo bond graph into a complete bond graph solution. Our comparison experiments [46] showed that this function set is more effective on both an eigenvalue and an analog filter test problem, so the new set was used in this paper. In this study, two types of analog filters including lowpass and highpass filters were synthesized. In such GPBG-based filter design problems [43], a bond-graph-represented analog filter composed of capacitors, resistors, and inductors is evolved such that the magnitude of its frequency response approximates a specified filter frequency response specification. An embryo bond graph and its equivalent circuit are illustrated in Figure 1 and are used in all experiments. Note that the 0-junction is the initial modifiable site, where further topological developments can proceed as instructed by a GP program tree. The voltage at this 0-junction is the output signal. Instead of using the sophisticated SPICE simulation program as used in the existing analog filter synthesis [13; 50], the frequency response of a bond graph can be simulated in a more convenient way: first, a state equation of a bond graph is derived automatically from the model, which generates the A, B, C, and D matrices [44]. These state space models can then be simulated on Linux PCs using C++ simulation code generated from Matlab Compiler 3.0.