PACOSYT: A Passive Component Synthesis Tool Based on Machine Learning and Tailored Modeling Strategies Towards Optimal RF and mm-Wave Circuit Designs

In this paper, the application of regression-based supervised machine learning (ML) methods to the modeling of integrated inductors and transformers is examined. Different ML techniques are used and compared to improve accuracy. However, it is demonstrated that none of the ML techniques considered provided good results unless a smart modeling strategy, tailored to the specific design problem, is used. Taking advantage of these modeling strategies, high accuracy can be obtained when compared to full-wave electromagnetic (EM) simulations (less than 2% error) and experimental measurements (less than 5% error). The most accurate model, obtained by the appropriate combination of an ML technique and modeling strategy, has been integrated into a tool called PACOSYT. The tool uses optimization algorithms to allow the designer to obtain an inductor/transformer with optimal performances in just seconds while keeping the accuracy of EM simulations. Furthermore, the tool provides the passive component S parameter description file for seamless use in circuit simulations. The tool can be used standalone or integrated with design frameworks, like Cadence Virtuoso or AIDASoft, a framework for circuit optimization. To illustrate the different usages of the tool, several passive devices are synthesized, and hundreds of millimeter-wave power amplifiers are synthesized using AIDASoft together with PACOSYT. The tool has been developed using open-source Python frameworks and does not use any closed-source licenses. PACOSYT, which also allows other designers to create their models for different technologies, is made publicly available.

and transformers [5], [6], [7]. However, such models do not provide the desired accuracy, especially in the multi-gigahertz frequency range. For instance, the lumped-element p-model for inductors reported in [3] can predict the performances of the passive structures with acceptable accuracy, but only up to a couple of GHz. A more complex 2p-model was also applied to inductors in [4]; however, its parameters are derived from analytical equations and fitting parameters, and thus, such models are not easily scalable. On the other hand, the modeling of transformers is significantly more challenging than inductor modeling because, in addition to the interaction between windings, there is also the interaction between the transformer's primary and secondary coils. Models with higher complexity have been developed for transformers [5], [6], [7], but these still have some deficiencies: either they do not take into account some magnetic coupling effects between the windings (hence losing accuracy), or they need prior fabrication to extract the model parameters (hence complicating the modeling process). Moreover, the accuracy of these models is always evaluated against a few inductor/transformer samples and without a detailed error analysis. Also, most analytical models are only valid in a quite limited region of the design space (i.e., range of geometrical parameters of the inductor/transformer), compromising simulation accuracy outside those regions. Furthermore, lumped-element analytical models struggle to be wideband (e.g., from around DC up to multi-GHz), and, therefore, their usage in RF and/or mm-Wave circuit design may be limited.
In the past two decades, surrogate modeling, a kind of supervised machine learning, has emerged as a possible solution to the problem of how to accurately evaluate passive components in substantially shorter execution times than EM simulations [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25], [26], [27]. Moreover, a very extensive survey of recent advances in the area is available in [28]. The work presented here studies the performance of several ML regression techniques for generating surrogate models of inductors and transformers. It also demonstrates how the use of different modeling strategies that exploit specific knowledge of the RF design problem is necessary to improve the accuracy of such models, although leading to different accuracy results depending on the ML technique used. The models developed in this work aim to support RF/mm-Wave IC designers and, therefore, an open-source tool named PACOSYT was created. It allows the user to design/synthesize inductors and transformers and create other models for different component topologies or technologies. The tool can be used standalone or integrated with design frameworks, such as Cadence Virtuoso [29] for manual circuit design or AIDASoft [30], [31], a framework for circuit optimization. The tool was developed in Python coding language using only open-source libraries. PACOSYT is available online in [32].
The remainder of this paper is organized as follows. Section II briefly defines the problem by outlining the main inductor/transformer design parameters and performances. Section III explains how surrogate models are generated, discussing the different approaches to create them, and introducing the ML techniques used in this work. In Section IV, different strategies are applied to the modeling of inductors and transformers in two different technologies, and the most effective combination of modeling strategy and ML regression technique is identified and selected for usage in the remainder of the paper. In Section V, PACOSYT's capabilities and graphical user interface (GUI) are presented. In Section VI, hundreds of mm-Wave power amplifiers (PA) working at 28 GHz are automatically designed using AIDAsoft and PA-COSYT. Finally, in Section VII, conclusions are drawn.

II. MODELING PROBLEM DEFINITION
For both inductors and transformers, the designer is usually interested in obtaining a given coil inductance at the operation frequency (ƒ0), with the highest quality factor and the smallest area. Additionally, the coupling factor must also be considered for transformers. Therefore, the objective of an inductor/ transformer model should be the capability of providing the component performances of interest given a particular geometry. In this section, the main geometrical parameters that define both inductor and transformer devices are presented as well as their main performances. Fig. 1(a) shows an octagonal symmetric inductor, and Fig. 1(b) shows an octagonal symmetric transformer. The design space of inductors is given by its geometry, which is usually defined by four geometric parameters: the number of turns (N), inner diameter (Din), turn width (w), and spacing between turns (s). For the transformers, eight geometric parameters are used: the number of turns of primary (NP) and secondary (NS), the inner diameter of the primary (DinP) and secondary (DinS), the turn width of the primary (wP) and secondary (wS) and finally, the spacing between turns of the primary (sP) and secondary (sS). In this work, the spacing between turns is kept constant for all devices at the minimum value allowed by the technology because the highest quality factors are usually obtained in such a way.

B. INDUCTOR AND TRANSFORMER PERFORMANCE PARAMETERS
The inductance, L, and the quality factor, Q, are the most relevant inductor performances. In Fig. 2, a plot of L and Q as a function of the frequency is shown. Similarly, for the transformers, the performances of interest are the inductance of the primary and secondary coils, LP and LS, respectively, and the quality factor of the primary and secondary coils, QP and QS, respectively. Also, the coupling factor k between coils is an important design parameter for the transformers, especially for mm-Wave circuit design. These performance figures can be calculated from the S-parameters and depend on how the inductor/ transformer is excited (e.g., single-ended or differential excitation) [33]. Another important parameter is the self-resonance frequency, SRF, which is defined as the frequency at which the behavior of the inductor/transformer changes from inductive to capacitive. Therefore, if the inductor operates close to the SRF, its inductance value can change significantly due to process variability (see the inductance curve in Fig. 2 near the SRF). Hence, the SRF is not a design goal per se, but designers are usually interested in knowing its frequency location to stay away from it. There are two selfresonance frequencies in the specific case of transformers (one for each coil): the primary SRFP and the secondary SRFS.
In this work, the S-parameter real and imaginary parts are modeled. The advantages of modeling the S-parameters instead of the performance parameters (i.e., L and Q) are the following: 1) The model becomes general and valid for both singleended and differential excitation; 2) The model can be directly used to create S-parameter files that can be used in modern circuit simulators seamlessly. However, since inductance, quality factor and coupling factor are the meaningful measures the designer is searching for, the error evaluation of the modeling techniques in the next section is performed in the performance parameters for the differential excitation case. For an inductor, which is a 2-port structure, it is necessary to first convert the 2-port structure to a 1-port differential structure [34]. Correspondingly, for a transformer, a 4-port structure (6-port if we consider the center taps) the first step in calculating the performances is to convert from a 4-port S-parameter description to a 2-port differential S-parameter description [34], Then, the equivalent impedance representation can be obtained and from it, the inductor/transformer performances can be obtained.

III. SURROGATE MODELS
The objective of a surrogate model is to mimic the output response of a given system based on some inputs. To create a surrogate model, it must first learn how the system behaves from a set of input samples (known as the training samples or training set); and then, it will be able to predict the behavior of new samples. Hence, three steps must be performed to create a surrogate model: design of experiments (DOE), model creation, and model validation. First, in the DOE, the design space is sampled to create the training set from which the model will learn. Ideally, models should learn from the most accurate evaluation possible, which in this case are full-wave EM simulations performed with ADS Momentum [35]. Second, the model is created with a given technique (i.e., Gaussian process, artificial neural networks, radial basis function, among others), and third, in the end, the model is validated using a test set (with different samples from the ones used for training).
The first decision to make is selecting the modeling approach to follow, that is, which type of model the specific problem at hand requires: a global model or a local model built with surrogate-assisted approaches. Some authors propose the creation of a global model that is valid and accurate in the entire design space of the passive component under study and can later be used as a performance predictor or as a performance evaluator in optimization procedures [9], [17], [24]. In those approaches, the training samples are generated a priori covering the entire design space, and the model is built based on those training samples. The generation of the training samples may also be considered part of the approach. Such generation is time-consuming and knowing a priori the number of necessary samples to develop accurate models is by no means trivial. Therefore, adaptive sampling algorithms have been proposed [10]. The main idea of such algorithms is to create a small number of training samples, create the model and assess its accuracy. Then, more samples are added iteratively to the training set while assessing the model's accuracy until the desired accuracy is reached.
Instead of creating a model valid for the entire design space, other authors prefer to design a component with a set of performances within an optimization loop, i.e., these strategies are intended for designing a device with some specific performances instead of obtaining a widely applicable model. The model is simultaneously constructed during the design process and only creates an (hopefully) accurate model around the optimal region (i.e., the model is local). In this category, we include the surrogate-assisted (SA) models [11], [23] or space-mapping techniques with adaptive surrogate models [8]. A coarse model using a few training points is first built on them. Then, this coarse model is coupled with an optimization algorithm, and promising solutions (typically one) are electromagnetically simulated at each iteration of the optimization loop. The data from this EM simulation is used to update the model, improving its accuracy in the region where new simulation points are added while moving towards the presumed optimal structure. However, there are two fundamental limitations to these approaches. First, the promising solutions found at the different iterations constrain the search space, and the constructed model is accurate only in that space. Second, the success of such surrogate-assisted approaches comes from the basic assumption that the optimal point of the coarse and the fine models are not far away in the design space. However, this assumption only holds when the coarse model is accurate enough.
In this work, since the objectives of the developed model are to be used by designers in a design framework (e.g., Cadence Virtuoso), similarly as models provided by a foundry process design kit (PDK) would be used, as well as be used as a performance evaluator in circuit optimization, the model must be valid in the entire design space. Therefore, the global approach will be considered for the model creation.
Finally, regarding the second choice, the problem-specific modeling strategy, it is crucial to understand the modeling problem at hand to develop a strategy that improves model accuracy. The strategy encompasses the selection of the adequate input parameters and any specific behavior of the components under study that can be used to improve its accuracy further. Several strategies will be considered in the following Section, and applied to create surrogate models using the six ML techniques proposed before. A comprehensive one is proposed that, combined with the appropriate ML technique, provides highly accurate modeling.

IV. INDUCTOR AND TRANSFORMER MODELING STRATEGIES
This work aims to get a model for circuit designers that can be used in several applications. Therefore, the goal is to develop a model that is: r Highly accurate; r Valid in the entire design space of interest so that it can generally be used in typical design procedures (e.g., as the PDK models from semiconductor foundries) and also usable for automated synthesis procedures; r Wideband (valid from DC up to the mm-Wave regime); r Capable of being used in electrical circuit simulation; r Valid for single-ended and differential excitations.
In this paper, for the inductors, a 0.35-µm technology was considered, and for the transformers, a 65-nm technology was considered. However, the techniques presented in this work are technology agnostic. The range for each input variable (geometric parameters of inductors/transformers) is defined as shown in Table 1. This design space was sampled using a Quasi-Monte-Carlo technique [36]. To create the models, 500 training samples are used for inductors, and 3000 training samples are used for transformers. More samples are used to train the transformer model because these structures have twice the input parameters, which considerably increases the size of their design space. For the statistical validation of the models, a test set was generated with new samples of the same design space: 150 samples for the inductors and 300 for the transformers.
Throughout this section, the considered strategies go from more general approaches to more tailored ones, improving the model error and finally reaching a combination of technique and strategy which can provide a model that complies with all the above points. All experiments in this paper were conducted in an Intel i7 Quad-Core with 32GB of RAM.

A. FREQUENCY-DEPENDENT MODEL
Inductors and transformers are components whose performances are inherently frequency-dependent (FD). Therefore, the first strategy (Strategy I) employed is to build the models with the frequency as an input of the model (as well as the component geometrical parameters). Accordingly, its input parameters, x m , are: where f is the frequency, and d is the length of the design variables' vector, x v , e.g., for the inductor model x v is composed of N, Din and w, whereas for the transformer, x v is composed of NP, NS, DinP, DinS, wP, and wS. The output parameters of the model, y m , correspond to a set of values:  where t is the total number of S-parameter components of the different passive devices. The creation of this model is illustrated in Fig. 3(a). FD models were created using the technique described in Section VII. To have a complete frequency description of the passive components, the objective was to model from 1 MHz up to 200 GHz using 200 frequency points. The results can be seen in Table 2. Although the model is created for the entire frequency range, regarding the error evaluation, only two frequency points were chosen: 5 GHz for the inductors and 28 GHz for the transformers. It is possible to observe in Table 2 that both the maximum error (ME) and the mean absolute percentage error (MAPE) are catastrophic for every technique, with errors of more than 25000% for some techniques. Notice that although a specific sample could show a reduced modeling error, the ME and MAPE metrics are calculated statistically over hundreds of devices and are therefore, representative of the global applicability of the model.
Apart from the significant error reported, the GPR and KRR models were unable to be created. This happened as all 200 frequency points are used as inputs to the model (to have a decent frequency description of the passive), and therefore the dataset becomes extremely large. Hence, the GPR and KRR techniques require a considerable amount of memory (e.g., 3.6 Terabytes of memory for the KRR technique), and it becomes impossible to build FD models using such techniques (in these conditions). Logically, the number of frequency points and/or the maximum frequency could be decreased to reduce the dataset size but at the expense of losing precision in the frequency behavior of the component. However, this fact would impact the accuracy later on during circuit simulation. Since the model must be wideband and usable in circuit simulations, this is already a downside of the FD strategy if a model such as GPR or KRR is to be used.
Since the model cannot be built with some techniques, and the trainable one's present huge errors, it is possible to conclude that using the frequency as an input variable is not a viable strategy to model inductors and transformers accurately. Also, the training time of the FD models is high (in the range of hours for some techniques).

B. FREQUENCY-INDEPENDENT MODEL
The following strategy (Strategy II) is to remove the frequency from the models' input and train η frequency-independent (FI) sub-models, one for each frequency point sampled during EM simulation, i.e., 200 in the current trial. Accordingly, the set of inputs for the η sub-models are: Similarly, the output parameters of the η models are: This strategy is illustrated in Fig. 3(b). The model errors are shown in Table 3. It is possible to conclude that all techniques can be used by removing the frequency from the inputs. The ME improves in all techniques by at least an order of magnitude, proving that this strategy is more effective than the FD models. The NN is the only technique that maintains its errors because the model is built using the nearest training sample, which does not change from Strategy I to Strategy II. Some techniques present very low MAPEs (e.g., RBF), which could be considered a reasonable accuracy. However, the MEs of such techniques are still too high to consider these models usable for circuit design, and therefore another strategy must be explored. The training time of the FI models is less than the previous technique but still time-consuming (in the range of tens of minutes).

C. FREQUENCY-INDEPENDENT PER-TURN MODEL
Since the number of turns in a passive device is a discrete value, typically with very few choices, and, additionally, it drastically changes the component's behavior, removing the number of turns as input of the model is a tempting strategy. Therefore, the next strategy (Strategy III) is to create a submodel for each different number of turns (or combination of turns for transformers, for instances different models for e.g., 2:1 or 1:2 turn combination). Starting with the FI sub-models of (3) and (4), η×ur per-turn sub-models are trained, with ur being the amount of number of turns possible for a given passive device, e.g., 1-turn, 2-turns, etc., for inductors. The models' input is: with u being the number of turn-related variables on x v for each passive device, i.e., for the inductor previously described in Section II is one, N, whereas for the transformer are two, NP and NS. Accordingly, the η × ur models' output parameters are: This approach is illustrated in Fig. 3(c), and the results obtained by it can be observed in Table 4. It is possible to perceive that this strategy allows to highly reduce the inductor MEs and MAPEs, with some modeling techniques attaining MEs lower than 1% for inductors with a lower number of turns and also 1:1 transformers. However, when the number of turns increases (i.e., N=5 inductors or 1:2 transformers) the errors are still too high to consider this strategy usable since ME values up to 30% still occur for some modeling techniques. Regarding the training time of the FI per-turn models, it is extremely fast for all techniques (in the range of seconds).

D. FREQUENCY-INDEPENDENT PER-TURN SRF-FILTERED MODEL
As previously said, when the number of turns increases, both the ME and MAPE increase. However, it is impossible to perform further design space partition by creating more submodels straightforwardly. Therefore, the specific behavior of the component under study plays a vital role in improving the model accuracy.
The error increase for components with a high number of turns can be explained because some passives from the training set have their SRF (SRFP or SRFS for transformers) below or around the frequency where the error is being evaluated. Most ML techniques assume smooth behaviors, i.e., if an input variable changes by a small amount, the output varies smoothly. However, this is not the case for the S-Parameters (and consequently L and Q) if the training inductors/transformers have their SRF close to the operation frequency (Fig. 2). Thus, using these inductors/transformers in the model construction dramatically decreases the model's accuracy for test inductors/ transformers with SRF above the frequency of operation. Potentially useful inductors/transformers have their SRF sufficiently above the frequency of operation. The accuracy estimation of inductance and quality factor of these useful devices is dramatically increased if only devices with SRF sufficiently above the operating frequency are used for model training. Therefore, the strategy proposed here (Strategy IV) is outlined in Algorithm 1 and based on a two-step method: Generate models capable of predicting the SRF values (for each number of turns) using all training inductors, and SRFP and SRFS using all training transformers (line 8 of Algorithm 1); To generate highly accurate models for the S-parameters, only those components from the training set whose SRF (or SRFP and SRFS) is sufficiently above the operating frequency, f0, are used (line 7 of Algorithm 1). For example, if the operating frequency is 5 GHz, only components with SRF>6 GHz ( f = 1 GHz) are used to generate the Sparameter models.
Consequently, with this methodology, whenever a test component is going to be evaluated, its SRF value is predicted first (line 15 of Algorithm 1). If the predicted SRF is below e.g., 6 GHz, the component is discarded since it is not useful for the selected operating frequency. Otherwise, its inductance and quality factor are calculated using the S-parameter models. The creation of the models using the proposed strategy is illustrated in Fig. 3(d).
The accuracy of the results using this strategy can be seen in Table 5 It can be concluded that it is possible to achieve very low ME and MAPE for several techniques, some of them with ME lower than 5% and MAPE lower than 2% when compared to full-wave EM simulations, which proves to be a highly accurate modeling strategy. Regarding the SRF models, the most accurate technique is the RBF, which achieves MAPEs of around 2% for inductors and around 4.4% for transformers. Regarding the training time of these models, it is similar to the previous strategy (in the range of seconds for most techniques).

E. MODELING ACCURACY COMPARISON
Regarding the strategy, it is easy to conclude that the most accurate one is Strategy IV, the FI per-turn SRF-filtered modeling strategy. Perhaps the strategy accuracy enhancement is more visible if a comparison is made for the error of the NN technique (the most basic technique) between the initial strategy presented in Table 2 and the final strategy presented in Table 5. It is possible to conclude that it was possible to reduce the error in several orders of magnitude, from around 25000% to 36% ME, which is a huge improvement when considering that the modeling technique is the same, but only the strategy changed. Regarding the RBF technique (one of the most accurate ones), the improvements are from around 1700% to 0.57% ME, with MAPEs going from 70% to 0.15% between both strategies. Regarding the model technique, three models have proven to have the best accuracy: the GPR, KRR and RBF. Although they have comparable accuracy, it appears that the RBF showed the lowest MAPE for the overall set of different components. Therefore, in summary, the RBF   technique together with Strategy IV showed the best accuracy and complies with all bullet points described at the beginning of Section V. Therefore, this combination of technique and strategy is the one embedded in PACOSYT for the following experiments conducted on this paper.

F. VALIDATION OVER PHYSICAL PROTOTYPES
The ultimate validation of any modeling technique is the experimentation on physical prototypes. Previous sections have already shown the accuracy of the model vs. the reference EM simulation. In this section, further validation is pursued by using fabricated devices; in particular four different inductors (two of them shown in Fig. 4) have been fabricated in a 0.35µm CMOS technology. On-wafer characterization was performed using a Cascade Microtech M150 probe station and an Agilent N5230A network analyzer. Fig. 5(a)-(d) show the inductor performance parameters (inductance and quality   factor) comparison between the full-wave EM simulation (LEM and QEM), the experimental (LE and QE) and the model predictions (LM and QM), for the fabricated inductors. It is possible to observe that an exceptional matching between measurements and model predictions is achieved for the entire measured frequency range (up to 20 GHz). Table 6 provides a more detailed analysis of the inductor performances at 5 GHz. In this Table, the fourth, ninth and fourteenth columns represent the error between the full-wave EM simulation and experimental measurements (EM-E (%)). The sixth, eleventh and sixteenth columns represent the error between the model and experimental measurements (M-E (%)) for L, Q and SRF, respectively. By observing such results, it is reasonable to conclude that the model provides an exceptionally reliable estimation of the inductor performance parameters: the model deviates less than 5% in L and Q (at 5 GHz) with respect to experimental measurements. The discrepancies attained are almost the same as the errors between full-wave EM simulations and measurements, suggesting that these small discrepancies are caused more by manufacturing variations than by significant errors in the model. Regarding the SRF model prediction, it is, to the best of the authors' knowledge, the most accurate inductor SRF predictor available in the literature (with less than 3% error when compared to measurements).

G. STATE-OF-THE-ART COMPARISON
In Table 7 it is possible to observe a comparison against other inductor and transformer models available in the literature. Regarding the general applicability of the model, this work is the only one to successfully apply the same modeling technique and strategy to both inductors and transformers. Furthermore, regarding the design space modeled, it is the one that covers the wider design space for transformers (and the only one which covers 1:2 and 2:1 transformers) and a considerably wider design space than most approaches for inductors, while reaching higher frequencies than other works (200 GHz). This is a huge advantage of this model as it allows a wider design space search during component optimization and by being wideband and valid up to 200 GHz it allows accurate mm-Wave circuit simulations. Concerning model accuracy, this work provides the most accurate global model for both inductors and transformers. Also, this work is the only one to provide experimental data of physical prototypes. Apart from the other advantages mentioned in Table 7 (e.g., automated training data generation, having the layout readily available, not needing more EM data after model generation, etc.) two of the most important features are that the model developed in this work does not need any dedicated framework or closed-source licenses, and, therefore, it is possible to develop an open-source tool for the RF and mm-Wave design community to use.

V. PACOSYT: A PASSIVE COMPONENT SYNTHESIS TOOL
The architecture of the proposed tool, PACOSYT, is illustrated in Fig. 6. It comprises three main operation modes: model generation, passive component synthesis and passive component evaluation. The model generation mode allows the user to create models for different topologies or technologies beyond the ones already provided and shown in this work. For this, the user only has to provide a DOE for the new topology/ technology. The passive component synthesis mode is available because, typically, the design of such components can be seen as an optimization problem (e.g., the designer is looking for an inductor/transformer with a given L, with the maximum Q possible and the lowest area). PACOSYT uses an optimization algorithm to perform inductor/transformer automated design (i.e., synthesis), where the designer inputs the   desired inductance, and the component with the highest quality factor and lowest area is outputted by PACOSYT. Also, the component geometry (i.e., layout) is readily available. On the other operation mode (passive component evaluation), PACOSYT allows the user to input the component geometrical parameters (e.g., N, DIN, w for inductors), and the tool outputs the performances (L, Q, etc.) and the S-parameter file for circuit simulation. This mode is similar to how a designer would use a foundry PDK model. However, PACOSYT has the advantage of being useful up to higher frequencies (i.e., 200 GHz) than typical PDK models (e.g., 20/30 GHz), has EM accuracy (less than 2% error when compared to full-wave EM simulations), and is faster to evaluate components than an EM simulation (in milliseconds rather than minutes), as will be shown in this section.
The developed tool, PACOSYT has its GUI shown in Fig. 7. Moreover, Fig. 7 also shows how the tool is integrated into Cadence Virtuoso for seamlessly use by circuit designers. However, the tool itself runs standalone and does not require any closed-source license to operate. In the next two sub-Sections, both modes used to synthesize/design components are illustrated.

A. PASSIVE COMPONENT EVALUATION
By integrating PACOSYT into a design framework, it can be used as any PDK model, and since the tool provides the S-parameter file immediately, it can be directly used in circuit simulations. In this example, the inductor with the following geometry was simulated in the tool: N=2, Din=110µm, w=7µm. The simulation of the inductor took approximately 0.2 seconds and its performances can be seen directly in the tool (as shown in Fig. 7). As a model validation process, the inductor was simulated electromagnetically to evaluate the error between the model and the EM simulation. The comparison is shown in Fig. 8(the inductor layout can also be seen) where it is possible to observe an excellent accuracy up to 200GHz, even achieving a perfect matching after the second SRF frequency (at 5GHz the relative error is 0.38% in L and 0.31% in Q). The EM simulation of this inductor took approximately 24 minutes to run. Since the model took 0.2 seconds to evaluate the same inductor in the same frequency points, it is an efficiency improvement of 12000%. This efficiency improvement can be even superior if the inductor has a higher number of turns, as the EM simulation time exponentially increases with the complexity of the component and the model evaluation time is the same for every structure.

B. PASSIVE COMPONENT OPTIMIZATION
Another advantage of the tool is that it provides the possibility to perform inductor/transformer synthesis using an optimization algorithm. Hence, the designer can just define the desired inductance and the tool finds the passive component with the highest quality factor or smallest area.
As an example, a transformer optimization is formulated as:

Maximize Q p and Q S @28GHz
Such that  In PACOSYT, the optimization algorithm implemented is a version of the selection-based differential evolution [38] in Python. The optimization was executed with 50 individuals and 200 generations, and the obtained transformer had the following parameters: NP=NS=1, DinP=140µm, DinP=82µm, wS=5µm and wS=13.5µm. The comparison between the model and the EM simulation of the same transformer is shown in Fig. 9 for all the performances of interest (the transformer layout can also be seen). It can be observed that a perfect matching is achieved for all performances from low frequencies up to 200GHz, with an exceptional accuracy across the entire frequency range and even managing to accurately model the second SRF point for both the primary and secondary. Moreover, the relative error at 28 GHz is 0.21% in LP, 0.15% in QP, 0.14% in LS, 0.26% in QS and 0.19% in k. It can be concluded that this is a suitable model for circuit simulations, due to its wideband capacity. Even if the designer is working with an operating frequency of 28 GHz, it is crucial to have models valid up to two or three times the operating frequency for circuits where the second and third harmonics are important.
The entire optimization took around 4 minutes to evaluate 10000 transformers and reach an optimal one. The time needed to simulate electromagnetically only one transformer (the one obtained in the optimization) was 16 minutes. Therefore, if the EM simulator was used as a performance evaluator in the optimization instead of the model, the time needed to perform the optimization (simulating 10000 transformers) would be around 160000 minutes, approximately 111 days. Therefore, it is clear the advantage of using the model during the design stage, as the accuracy is maintained but allied with efficiency.
From the experiments in this section, it can be concluded that when designing optimal passives in an automated synthesis process using optimization algorithms (where thousands of transformers are evaluated), using an EM simulator is simply unbearable. Hence, the surrogate model becomes the only solution.

VI. POWER AMPLIFIER AUTOMATED SYNTHESIS
In this Section, PACOSYT was integrated with AIDAsoft, an optimization tool capable of automatically tackling circuit  sizing and layout, including process variability [39], [40]. In this tool, the user selects the desired circuit objectives and constraints, and using a multi-objective optimization algorithm, the tool searches for the best circuit sizing solutions that comply with selected specifications. Multi-objective optimization algorithms allow to simultaneously consider several design objectives during the optimization, and the result of the optimization is a set of solutions, the Pareto optimal front (POF), exhibiting the best trade-offs between these objectives. In this example, the objective was to optimize the PA of Fig. 10, operating in the band of 26.5∼30 GHz in a 65 nm CMOS technology and using a supply voltage VDD=1.2V.
The PA uses 3 transformers evaluated during the circuit optimization using the models in PACOSYT. The optimization was performed with 300 individuals and 150 generations with the specifications shown in the first two columns of Table 8. The design objectives of the optimization were: maximization of the maximum power-added efficiency (PAEMAX) and maximum output power (POUT_MAX) and minimization of the power consumption at DC (PDC). The circuit optimization took 56 hours to complete. Its output, i.e., the POF, comprises 300 different PAs, and is shown in Fig. 11. Each dot of this figure represents the performances of a different PA with its sizing fully defined and the transformers evaluated with PA-COSYT.
From the 300 achieved designs, one was selected for simulation in Cadence Virtuoso. The selected PA has a saturated output power of 18.11dBm, a peak PAE of 38% and 18.8dB small-signal gain, which are very good performances when compared to the state-of-the-art for the single path power PA topologies in similar technology nodes [41].  All tools (AIDAsoft, PACOSYT, and Cadence Virtuoso) are completely integrated, so transferring a design between AIDAsoft and Virtuoso is immediate. To inspect the PA performance deviations due to the PACOSYT model errors, all the transformers in the chosen PA design were EM simulated, and the PA was re-simulated. The performance deviations between using PACOSYT or using a full-wave EM simulator are depicted in Fig. 12 and detailed in columns three to five of Table 8 for the frequency of 28 GHz. It is possible to conclude that these deviations are negligible (below 0.23%), demonstrating that PACOSYT provides an extremely fast and accurate simulation model for circuit design and optimization. Hence, it is possible to remove the EM simulator for the design of passive components, making the design stage much more efficient. Furthermore, in this optimization 135000 transformers were simulated (i.e., 300 individuals × 150 generations × 3 transformers per circuit), something that is completely impossible to perform with an EM simulator, as it would amount to approximately 467 days of optimization time (assuming that each transformer takes around 15 minutes to simulate electromagnetically). Therefore, in this section, the value of the developed model and tool is proven once again both for efficiency and accuracy.
Moreover, in mm-Wave circuits, the layout highly depends on the passive components. Since, with PACOSYT, the geometry of the passives is readily available, having a floorplan for the desired circuit is immediate. Fig. 13 shows the floorplan of the circuit with the performances shown in Fig. 12(without the active stages).

VII. CONCLUSION
In this work, the application of different supervised ML techniques and modeling strategies for integrated inductors and transformers was examined. It was possible to develop an extremely accurate model using the RBF technique together with smart modeling strategies, resulting in performance values with less than 2% error when compared to full-wave electromagnetic simulations and also less than 5% when compared to experimental measurements. A tool, named PACOSYT, was developed enabling user-friendly model creation and evaluation. It also integrates the model and an optimization algorithm which allows synthesizing passive components in minutes with electromagnetic accuracy and optimal performances. The tool was also integrated into Cadence Virtuoso and AIDASoft for circuit design and optimization. With such a range of tools, it is possible to design hundreds of circuits in a couple of days with optimal performances and excellent accuracy in the passive design from an initial design stage. This fact highly helps to reduce the design iterations and aims at a first-pass fabrication success. All the data presented in this work, as well as the PACOSYT tool, is available online in a public repository.