CPU time (h:min:sec)—simulation of the circuit depicted in Figure 3.

## Abstract

This chapter is devoted to the discussion of a hybrid frequency-time CAD tool especially designed for the efficient numerical simulation of nonlinear electronic radio frequency circuits operating in an aperiodic slow time scale and a periodic fast time scale. Circuits driven by envelope-modulated signals, in which the baseband signal (the information) is aperiodic and has a spectral content of much lower frequency than the periodic carrier, are typical examples of practical interest involving such time evolution rates. The discussed method is tailored to take advantage of the circuits and signals heterogeneity and so will benefit from the time-domain latency of some state variables in the circuits. Because the aperiodic slowly varying state variables are treated only in time domain, the proposed method can be seen as a hybrid scheme combining multitime envelope transient harmonic balance based on a multivariate formulation, with a purely time-step integration scheme.

### Keywords

- partial differential equations
- numerical simulation
- radio frequency circuits
- time-frequency analysis

## 1. Introduction

In the last two decades, radio frequency (RF) and microwave system design has been found as a significant part of the electronic semiconductor industry’s portfolio. Over the years, the necessity of continuously providing new wireless systems’ functionalities and higher transmission rates, as also the need to improve transmitters’ efficiency, has been gradually reshaping wireless architectures. Heterogeneous circuits combining baseband blocks, digital blocks, and RF blocks, in the same substrate, are commonly found today. Hence, RF and microwave circuit simulation has been conducted to an increasingly challenging scenario of heterogeneous broadband and strongly nonlinear wireless communication circuits, presenting a wide variety of slowly varying and fast changing state variables (node voltages and branch currents). Thus, RF and microwave design has been an important booster for numerical simulation and device modeling development.

In general, waveforms processed by wireless communication systems can be expressed by a high-frequency RF carrier modulated by some kind of slowly varying baseband aperiodic signal (the information signal). Therefore, the evaluation of any relevant information time window requires the computation of thousands or millions of time instants of the composite modulated signal, turning any conventional numerical time-step integration of the circuits’ systems of differential algebraic equations highly inefficient. However, if the waveforms do not require too many harmonic components for a convenient frequency-domain representation, this category of circuits can be efficiently simulated with hybrid time-frequency techniques. Handling the response to the slowly varying baseband information signal in the conventional time step by time step basis, but representing the reaction to the periodic RF carrier as a small set of Fourier components (a harmonic balance algorithm for computing the steady-state response to the carrier), hybrid time-frequency techniques are playing an important role in RF and microwave circuit simulation.

Beyond overcoming the signals’ time-scale disparity, the partitioned time-frequency technique discussed in Section 3.2 is also able to efficiently simulate highly heterogeneous RF networks, by splitting the circuits into different subsets (blocks) and computing their state variables with distinct numerical schemes.

## 2. Theoretical background material

### 2.1. Mathematical model of an electronic circuit

Dynamic behavior of an electronic circuit can be modeled by a system of differential algebraic equations (DAE) involving electric voltages, currents and charges, and magnetic fluxes. The DAE system can, in general, be formulated as

*∈*b (t)

*stands for the excitation vector (independent voltage or current sources) and*ℝ

^{n}

*∈*x (t)

*represents the state variable vector (node voltages and branch currents).*ℝ

^{n}

**(·) models the memoryless elements of the circuit, as is the case of linear or nonlinear resistors, linear or nonlinear controlled sources, etc.**f

**(·) models the dynamic elements, as capacitors or inductors, represented as voltage-dependent electric charges or current-dependent magnetic fluxes, respectively.**q

This system of (1) can be constructed from a circuit description using, for example, nodal analysis, which involves applying Kirchhoff currents’ law to each node in the circuit, and applying the constitutive or branch equations to each circuit element. Hence, it represents the general mathematical formulation of lumped problems. However, as reviewed in [1], this DAE circuit model formulation can also include linear distributed elements. For that, the distributed devices are substituted by their lumped-element equivalent circuit models, or are replaced, as whole sub-circuits, by reduced order models derived from their frequency-domain characteristics. It must be noted that the substitution of distributed devices by lumped-equivalent models is especially reasonable when the size of the circuit elements is small in comparison to the wavelengths, as is the case of most emerging RF technologies integrating digital high-speed CMOS baseband processing and RFCMOS hardware in the same substrate.

### 2.2. Transient simulation

Obtaining the solution of (1) over a specified time interval _{0}* )*=

x

_{0}is what is usually known as an

*, and evaluating such solution is frequently referred to as*initial value problem

*. The most natural way to compute*transient analysis

*(*x

*) is to numerically time-step integrate (1) directly in time domain. So, it should be of no surprise that this straightforward technique was used in the first digital computer programs of circuit analysis and is still nowadays widely used. It is present in all SPICE (which means simulation program with integrated circuit emphasis) or SPICE-like computer programs [2]. In order to numerically time-step integrate the DAE system of (1) commercial tools use initial value solvers, such as linear multistep methods (LMM) [3–5], or one-step methods, i.e., Runge-Kutta (RK) methods [3–5]. Either LMM or RK families can offer a great diversity of explicit and implicit (iterative) numerical schemes, suitable to compute the numerical solution of different types of initial value problems with a desired accuracy.*t

### 2.3. Steady-state simulation

Although SPICE-like computer programs (which were initially conceived to compute the transient response of electronic circuits) are still widely used nowadays, RF and microwave designers’ interest normally resides on the steady-state response. The reason for that is some properties of the circuits are better described, or simply only defined, in steady-state (e.g., harmonic or intermodulation distortion, noise, power, gain, impedance, etc.). Initial value solvers, as linear multistep methods, or Runge-Kutta methods, which were tailored for finding the circuit’s transient response, are not adequate for computing the steady-state because they have to pass through the lengthy process of integrating all transients, and expecting them to vanish.

Computing the periodic steady-state response of an electronic circuit can be formulated as finding out a starting condition (left boundary), (

t

_{0}), for the DAE system modeling the circuit that leads to a solution obeying the final condition (right boundary)

x (t

_{0}

*=*)

x (t

_{0}+

*, with*T)

*being the period. In mathematics, these problems are usually known as*T

*. Taking into account the formulation of (1), these problems will have here the following form,*periodic boundary value problems

x (t

_{0}

*=*)

x (t

_{0}+

*is known as the*T)

*.*periodic boundary condition

In order to numerically solve (2), a solution that simultaneously satisfies the differential system and the two-point periodic boundary condition has to be computed. A particular technique has been found especially useful for RF circuit simulation: the * harmonic balance*(HB) [6–8] method.

### 2.4. Harmonic balance

Harmonic balance (HB) [6–8] handles the circuit, its excitation and its state variables in the frequency-domain. Because of that, it benefits from allowing the direct inclusion of distributed devices (like dispersive transmission lines), or other circuit elements described by frequency-domain measurement data. Frequency-domain methods differ from time-domain steady-state techniques in the way that, instead of representing waveforms as a collection of time samples, they represent those using coefficients of sinusoids in trigonometric series. As a consequence, under moderate nonlinearities, the steady-state solution is typically achieved much more easily in the frequency domain than in the time domain.

In periodic steady-state, any stimulus _{s}(* t*) or state variable

x

_{v}(

*) can be expressed as a Fourier series*t

*is the order adopted for a convenient harmonic truncation. The HB method consists in converting the DAE system of (2) into the frequency domain, to obtain the following*K

*(2*n

*+1) algebraic equations system*K

x

_{v}(

*).*t

**and Q are vectors containing the Fourier coefficients of**F

**(**f

*(*x

*)) and*t

**(**q

*(*x

*)), respectively, and*t

**and**G

**denote the**C

*=*g(x)

*and*df(x)/dx

*=*c(x)

*.*dq (x )/dx

*is the imaginary unit and Ω is a diagonal matrix defined as*j

The system of (4) can be rewritten as

*, and the*harmonic balance system

*of the error function*Jacobian matrix

**(**H

**). This system of (9) is iteratively solved according to (8), until a sufficiently accurate solution**X

X

^{[f]}is achieved, i.e., until

*is the allowed residual size, and*δ

**(•).**H

### 2.5. Multivariate formulation

The multivariate formulation is a powerful strategy that emerged in the late 1990s, playing an important role in RF circuit simulation today. It was first introduced by Brachtendorf et al. [10] as a sophisticated derivation of quasi-periodic harmonic balance, followed by Roychowdhury [11], who demonstrated that the multivariate formulation can be an efficient strategy to analyze circuits running on distinct time scales. The multivariate formulation uses multiple time variables (artificial time scales) to describe the multirate behavior of the circuits. Thus, it is suitable to describe typical multirate regimes of operation present in RF and microwave systems, as is the case of circuits handling amplitude and/or phase-modulated signals, quasiperiodic signals, or any other kind of multirate signals containing a periodic component.

The main achievements of the multivariate formulation are due to the fact that multirate signals can be represented much more efficiently if they are defined as functions of two or more time variables (artificial time scales), i.e., if they are defined as multivariate functions [11–16]. Therefore, as we see in Section 2.5.2, circuits will be no longer described by ordinary differential algebraic equations in the one-dimensional time * t*, but, instead, by partial differential algebraic systems.

#### 2.5.1. Multivariate representations

The multivariate (multidimensional) strategy is easily illustrated by applying it to a bi-dimensional problem (two distinct time scales). So, let us consider, for example, an amplitude-modulated RF carrier of the form

*(*e

*) is the envelope (a slowly varying signal), while*t

Consider now the following bidimensional definition for * b*(

*),*t

t

_{E}is the slow envelope time scale and

t

_{C}is the fast carrier time scale. In this particular case,

t

_{C}but not to

t

_{E}, i.e.,

The univariate form, * b*(

*), with*t

*(*b

*), thus allowing a more compact representation with fewer samples. Furthermore, due to the periodicity of*t

t

_{C}, we know that its plot repeats over the rest of this time axis. Thus, the bivariate form plotted in Figure 2 contains all the information necessary to recover the original univariate form depicted in Figure 1.

#### 2.5.2. Multirate partial differential algebraic equations’ systems

Let us consider a general nonlinear RF circuit described by the differential algebraic equations’ system of (1), and let us suppose that this circuit is driven by the envelope-modulated signal of (12). Considering the above stated, we are able to reformulate the excitation (

*) and the state variables*t

**(**x

*) vectors as bidimensional entities, in which*t

*is replaced by*t

t

_{E}for the slowly varying parts (the envelope time scale) and by

t

_{C}for the fast-varying parts (the RF carrier time scale). This bidimensional formulation converts the DAE system of (1) into the following

*(MPDAE) system [11]:*multirate partial differential algebraic equations’

The mathematical relation between (1) and (15) establishes that if (

*) may be retrieved from its bivariate form*t

t

_{E}=

t

_{C}=

*. Consequently, if one wants to obtain the univariate solution in the generic [0,*t

t

_{Final}] interval, due to the periodicity of the problem in the

t

_{C}dimension we will have

*mod*t

T

_{C}represents the remainder of division of

*by*t

T

_{C}. The main advantage of this MPDAE approach is that it can result in significant improvements in simulation speed when compared to DAE-based alternatives.

#### 2.5.3. Initial and boundary conditions for envelope-modulated regimes

Dynamical behavior of RF circuits driven by stimuli of the form of (12) can be described by the MPDAE system of (15) together with a set of initial and periodic boundary conditions. In fact, bivariate forms of the circuits’ state variables can be achieved by computing the solution of the following initial periodic-boundary value problem

*(·) is a given initial-condition function defined on [0,*i

T

_{C}], satisfying

*=*i (0)

*, and*i (

_{TC})=x(0)

*=*(t

_{E}0)

*is the periodic boundary condition due to the periodicity of the problem in the*(t

_{E},T

_{C})

t

_{c}fast carrier time scale.

The reason why bivariate envelope-modulated solutions do not need to be evaluated on the entire _{C}time axis. The way how univariate solutions are recovered from their multivariate forms was already defined above by (16).

## 3. Hybrid time-frequency techniques for computing the solution of MPDAEs

In this section, we will finally discuss the hybrid time-frequency numerical techniques that can be used to evaluate the solution of MPDAEs describing the operation of nonlinear electronic radio frequency circuits running in an aperiodic slow time scale and a periodic fast time scale. Section 3.1 addresses an efficient technique often referred to as * multitime envelope transient harmonic balance*(multitime ETHB). Then, Section 3.2 presents an advanced partitioned time-frequency technique, which is an improved version of multitime ETHB and has demonstrated to be even more efficient than this technique.

### 3.1. Multitime envelope transient harmonic balance

Let us consider the initial-boundary value problem of (17) and let us define a semi-discretization of the rectangular domain _{E}slow time dimension described by the following general non uniform grid

K

_{E}represents the total number of steps in

t

_{E}and

h

_{E,i}denotes the grid size at each time step

*. If we replace the derivatives of the MPDAE in*i

t

_{E}with a finite-differences approximation (e.g., a backward differentiation formula, the modified trapezoidal rule, etc.), then we obtain for each slow time instant

t

_{E,i}, from

*= 1 to*i

*=*i

K

_{E}, a periodic boundary value problem in

t

_{C}. For simplicity, and clarity, let us suppose that the Backward Euler rule is used. In such a case, we obtain

*. Thus, once*(t

_{E,i},t

_{C})

K

_{E}periodic boundary value problems if we want to obtain the solution

t

_{E,i}, the resultant HB system is the

*(2*n

*+ 1) algebraic equation system defined by*K

t

_{E}=

t

_{E,i}.

*(·) and*f

*(·) in the time domain and then calculating their Fourier coefficients. Ω is the diagonal matrix (6), and the*q

*= 1,…,*v

*, is a (2*n

*+1)×1 vector defined as*K

The HB system of (20) can be rewritten as

t

_{E}=

t

_{E,i}. In general, the nonlinear algebraic system of (24) is iteratively solved using Newton’s method

*(2*n

*+ 1) equations at each iteration*K

*to compute the new estimate*r

*is the allowed residual size.*δ

The system of (25) requires the computation of the Jacobian matrix

This matrix has a block structure, consisting of * n*×

*square submatrices (blocks), each one with dimension (2*n

*+ 1). The general block of row*K

*and column*m

*can be expressed as*l

### 3.2. Partitioned time-frequency technique

Although multitime ETHB can take advantage of the signals’ time rate disparity, it does not take into account the circuit’s heterogeneities, i.e., it uses the same numerical algorithm to compute all the circuit’s state variables. Thus, if the circuit evidences some heterogeneity (e.g., modern wireless architectures combining RF, baseband analog circuitry, and digital components in the same circuit), this tool cannot benefit from such a feature. This lack of ability to perform some distinction between nodes or blocks within the circuit had already been identified by Rizzoli et al. [17] and is the main limitation of multitime ETHB. To cope with this deficiency, the partitioned time-frequency technique separates the circuit’s state variables (node voltages and branch currents) into fast (* active*) and slowly varying (

*) subsets. That implies the MPDAE system of (15) to be first considered as coupled active-latent MPDAE subsystems*latent

x

_{A}(

*) and*t

x

_{L}(

*) are the vectors containing, respectively, the fast-varying and the slowly varying state variables. As we will see, with this partition stratagem, fast-varying state variables can be computed with multitime ETHB, while slowly varying ones are being evaluated with a unidimensional time-step integration scheme. This tactic also allows the moderate nonlinearities to be treated in the frequency domain, while severe nonlinearities are appropriately evaluated in the time domain [16].*t

With the purpose of providing an elucidatory explanation of the partitioned time-frequency technique, let us consider a typical wireless system, composed of RF and baseband blocks. In such a case, the state variables in the RF block can be described as fast carrier envelope modulated waveforms defined as

In (30), _{k,v}(* t*) represents the Fourier coefficients of

x

_{A,v}(

*), which are slowly varying in the baseband time scale, and*t

f

_{C}is the high-frequency carrier. As stated above, signals of the form

x

_{A,v}(

*) will be denoted as active, whereas signals of the form*t

x

_{L,v}(

*) will be designated as latent. The latency (slowness) of*t

x

_{L,v}(

*) indicates that these variables belong to a circuit block where there are no fluctuations dictated by the fast carrier. Thus, it is straightforward to conclude that all of the*t

x

_{L,v}(

*) can be efficiently represented with much less sample points than any of the*t

x

_{A,v}(

*). Moreover, since the*t

x

_{L,v}(

*) state variables do not evidence any periodicity, they cannot be evaluated in the frequency domain. In contrast, if the number of harmonics*t

*is not too large, the fast carrier oscillation components of*K

x

_{A,v}(

*) can be efficiently computed with harmonic balance. Taking the above into account we can easily conclude that distinct numerical strategies will be required if we want to simulate, in an efficient way, circuits having such signal format disparities.*t

In the following we provide a brief theoretical description of the partitioned time-frequency technique fundamentals. For that, let us now consider the bivariate forms of _{A,v}(* t*) and

x

_{L,v}(

*), denoted by*t

t

_{E}and

t

_{C}are, respectively, the slow envelope time dimension and the fast carrier time dimension. As can be seen, since the

t

_{c}, they have no fluctuations in the fast time axis. The reason is that they belong to a circuit block where there are no carrier frequency oscillations. As a result, for each slow time instant

t

_{E,i}defined on the grid of (18), each of the

*= 0 component. Therefore, there is no necessity to perform the conversion between time and frequency domains for*k

t

_{Ei}, each of the

*= −*k

*,…,*K

*, i.e., each of the*K

*+ 1 harmonic components for a convenient frequency domain representation. In summary, while active state variables have to be represented by a set of 2*K

*+ 1 Fourier coefficients arranged in (2*K

*+ 1)×1 vectors of the form*K

By considering this, we can easily deduce that the size of the * k*= 0 order Fourier coefficient

X

_{v,0}(

t

_{E,i}) is exactly the same as the constant

t

_{C}time value

Considerable Jacobian

With the state variable

## 4. Efficiency of the partitioned time-frequency technique

The effectiveness of the multitime ETHB technique is nowadays widely recognized by the RF and microwave community. The efficiency of the partitioned time-frequency simulation technique described in the previous section was also already established, as a consequence of the considerable reductions in the computational effort required to obtain the numerical solution of several RF circuits with distinct topologies and levels of complexity [16]. Even so, a brief comparison between this method, the previous state-of-the-art multitime ETHB and a conventional univariate time-step integration scheme (SPICE-like simulation), is included in this section. This will help the reader to get a perception of the potential of the partitioned hybrid technique. For that, we considered the RF mixer (frequency translation device) depicted in Figure 3 as the illustrative application example. The circuit was simulated in MATLAB with three different techniques: (i) the partitioned time-frequency simulation technique, (ii) the multitime ETHB, and (iii) the Gear-2 multistep method [5] (a time-step integrator commonly used by SPICE-like commercial simulators).

Numerical computation times for simulations in the [0, 1.0 * μ*s] and [0, 10.0

*s] intervals are presented in Table 1. For simplicity, in the hybrid time-frequency techniques we assumed a uniform grid in the*μ

t

_{E}slow time scale (we have chosen

h

_{E}= 10 ns as the step size in that dimension) and we considered

*= 11 as the maximum harmonic order for the HB evaluations in the*K

t

_{C}fast carrier time scale.

By comparing the CPU times obtained with the methods, we can attest the superiority of the partitioned time-frequency method. Indeed, speedups of more than two times were obtained with this method in comparison to multitime ETHB. We can also attest the inefficiency of univariate time-step integration when dealing with RF problems. Finally, it must be noted that the efficiency gain of the partitioned time-frequency technique was achieved without compromising accuracy. Indeed, the maximum discrepancy between solutions computed with this technique and multitime ETHB was in the order of 10^{−7} for all the state variables of the circuit.

[0, 1.0 μs] | 00:00:04.9 | 00:00:11.3 | 00:19:21 |

[0, 10.0 μs] | 00:00:39.6 | 00:01:35.1 | 02:47:33 |

## 5. Conclusions

In this chapter, we have presented a partitioned time-frequency numerical technique especially designed for the efficient simulation of RF circuits operating in a periodic fast time scale and an aperiodic slow time scale. This technique can be viewed as a wise combination of multitime ETHB based on a multivariate formulation, with a conventional univariate time-step integration scheme. With this technique fast changing (active) state variables are computed in a bivariate mixed time-frequency domain, whereas slowly varying (latent) state variables are evaluated in the natural one-dimensional time domain. By partitioning the circuits into active and latent parts and exploiting the fact there is no obligation to perform conversion between time and frequency for latent blocks, considerable reductions in the computational effort can be achieved without compromising the accuracy of the results. Although the speedups obtained with the simulation of the illustrative application example presented in Section 4 are already notable, it must be noted that higher efficiency gains should be expected when simulating RF networks containing a number of latent blocks larger than the active ones.

## Acknowledgments

This work is funded by National Funds through FCT - Fundação para a Ciência e a Tecnologia, under the project UID/EEA/50008/2013.

## References

- 1.
Achar R, Nakhla M. Simulation of high-speed interconnects. Proceedings of the IEEE. 2001; 89 :693–728. DOI: 10.1109/5.929650 - 2.
Nagel L. A Computer Program to Simulate Semiconductor Circuits. Berkeley: Electronics Research Laboratory, University of California. 1975;Memo ERL-M520 - 3.
Hairer E, Nørsett S, Wanner G. Solving Ordinary Differential Equations I: Nonstiff Problems. 1st ed. Berlin: Springer-Verlag; 1987. DOI: 10.1007/978-3-662-12607-3 - 4.
Hairer E, Wanner G. Solving Ordinary Differential Equations II: Stiff and Differential Algebraic Problems. 2nd ed. Berlin: Springer-Verlag; 1996. DOI: 10.1007/978-3-642-05221-7 - 5.
Lambert J. Numerical Methods for Ordinary Differential Systems: The Initial Value Problem. 1st ed. West Sussex: Wiley; 1991. - 6.
Rodrigues P. Computer-Aided Analysis of Nonlinear Microwave Circuits. Norwood, MA: Artech House; 1998. - 7.
Maas S. Nonlinear Microwave and RF Circuits. 2nd ed. Norwood, MA: Artech House; 2003. - 8.
Kundert K, White J, Sangiovanni-Vincentelli A. Steady-State Methods for Simulating Analog and Microwave Circuits. Norwell, MA: Spinger; 1990. - 9.
Pedro J, Carvalho N. Intermodulation Distortion in Microwave and Wireless Circuits. 1st ed. Norwood, MA: Artech House; 2003. - 10.
Brachtendorf H, Welsch G, Laur R, Bunse-Gerstner A. Numerical steady-state analysis of electronic circuits driven by multi-tone signals. Electrical Engineering (Springer-Velag). 1996; 79 (2):103–112. DOI: 10.1007/BF01232919 - 11.
Roychowdhury J. Analyzing circuits with widely separated time scales using numerical PDE methods. IEEE Transactions on Circuits and Systems. 2001; 5 (48):578–594. DOI: 10.1109/81.922460 - 12.
Mei T, Roychowdhury J, Coffey T, Hutchinson S, Day D. Robust stable time-domain methods for solving MPDEs of fast/slow systems. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems. 2005; 24 (2):226–239. DOI: 10.1109/TCAD.2004.841073 - 13.
Zhu L, Christoffersen C. Adaptive harmonic balance analysis of oscillators using multiple time scales. In: 3rd International IEEE Northeast Workshop on Circuits and Systems; 2005; Québec City. 2005. pp. 187–190. DOI: 10.1109/NEWCAS.2005.1496738 - 14.
Oliveira J, Pedro J. An efficient time-domain simulation method for multirate RF nonlinear circuits. IEEE Transactions on Microwave Theory and Techniques. 2007; 55 (11):2384–2392. DOI: 10.1109/TMTT.2007.908679 - 15.
Oliveira J, Pedro J. A multiple-line double multirate shooting technique for the simulation of heterogeneous RF circuits. IEEE Transactions on Microwave Theory and Techniques. 2009; 57 (2):421–429. DOI: 10.1109/TMTT.2008.2011228 - 16.
Oliveira J, Pedro J. Efficient RF circuit simulation using an innovative mixed time-frequency method. IEEE Transactions on Microwave Theory and Techniques. 2011; 59 (4):827–836. DOI: 10.1109/TMTT.2010.2095035 - 17.
Rizzoli et al. Domain-decomposition harmonic balance with block-wise constant spectrum. In: Proceedings of the IEEE MTT-S International Microwave Symposium Digest; June 2006; San Francisco, CA. 2006. pp. 860–863. DOI: 10.1109/MWSYM.2006.249827