3. Univariate time-domain partitioned simulation engines

### 3.1. Time-domain latency

As highlighted in the Introduction of this chapter, dynamic regimes of operation of some electronic systems may involve signals (voltages and currents) presenting widely distinct time evolution rates. Typical examples of that are coupled analog-digital systems or combined technologies of baseband analog, digital and RF blocks, in the same circuit. In these examples, very fast signals and slowly varying signals cohabit in the same framework. This property, the one of having in the same problem signals presenting rapid time rates of change, while others evolve in a very slow way (or remain approximately constant within a certain time window) is usually denoted as time-domain latency. It must be pointed out that time-domain latency is a phenomenon that is not restricted to heterogeneous circuits. For instance, regimes of operation of pure digital electronic systems typically present a set of variables remaining practically constant within a specific time interval, while others evidence quick variations (fast transitions) in that interval.

In Section 2, we have seen that SPICE-like simulation engines (which are based on time-step integration schemes) are widely used for computing the numerical solution of electronic systems. However, when dealing with circuits presenting time-domain latency, that is, containing node voltages and brunch currents evolving at very different rates, traditional SPICE simulators become inefficient because they expend unnecessary work on the computation of the slowly varying components. This is so because classic initial value solvers (as LMM or RK schemes) integrate all the DAE, or ODE, unknowns with the same step size.

### 3.2. Partitioned algorithms for time-step integration

To deal with the earlier described time-domain latency in an effective way, some modern partitioned algorithms for univariate time-step integration have been proposed in the recent years in the scientific literature [8–10]. These powerful techniques, denoted as multirate Runge-Kutta (MRK) schemes, split the ODE system of (5) into coupled fast and slow (latent) subsystems, obtaining

$$\begin{aligned} \frac{d\boldsymbol{y}\_{\mathcal{F}}(t)}{dt} &= \boldsymbol{f}\_{\mathcal{F}}(t, \boldsymbol{y}\_{\mathcal{F}}, \boldsymbol{y}\_{L}), \quad \boldsymbol{y}\_{\mathcal{F}}(t\_{0}) = \boldsymbol{y}\_{\mathcal{F},0} \\ \frac{d\boldsymbol{y}\_{L}(t)}{dt} &= \boldsymbol{f}\_{L}(t, \boldsymbol{y}\_{\mathcal{F}}, \boldsymbol{y}\_{L}), \quad \boldsymbol{y}\_{L}(t\_{0}) = \boldsymbol{y}\_{L,0^{\prime}} \end{aligned} \tag{19}$$

with

$$\mathbf{y} = \begin{bmatrix} \mathbf{y}\_F \\ \mathbf{y}\_L \end{bmatrix}, \quad \mathbf{y}\_F \in \mathbb{R}^{n\_F}, \quad \mathbf{y}\_L \in \mathbb{R}^{n\_L}, \quad n\_F + n\_L = n,\tag{20}$$

From this definition we can attest that numerical coupling between fast and slow differential

We must be aware that circuit-block partition into fast and slow subsystems can possibly change during the time-step integration process. Hence, it will be very helpful if the simulator is capable of automatically detect the slow and fast variables in the circuit. This automatic classification can be achieved using embedded RK methods [2] and error estimates usually evaluated for step size control and stiffness detection [3]. Fast-slow partitioning strategies, step size control tools, number of microsteps within a macrostep, stiffness detection stratagems and many other technical details of MRK code implementation are thoroughly addressed in [8–10] and also in [11].

Finally, it must be pointed out that significant efficiency gains in computation speed for the simulation of several illustrative examples have been reported in the scientific literature, which demonstrate an effective reduction on the MRK computational cost in comparison to tradi-

This section is devoted to briefly review some advanced circuit-block partitioning numerical simulation techniques operating in a multivariate time-domain framework. Section 4.1 introduces the multivariate formulation theory, in which the 1-D time is converted into a set of artificial time variables. Section 4.2 addresses some fundamental aspects of the numerical simulation algorithms. Finally, Section 4.3 describes some techniques for automatic circuit-block partition.

The multivariate formulation is a useful stratagem that plays an important role in the EDA scientific community, especially in the RF and microwave areas. It was initially introduced in 1996 [12] as a sophisticated derivation of quasi-periodic HB, and it has been adopted by other researchers (e.g., [13–19]), which have demonstrated that it can be an efficient strategy when dealing with electronic circuits operating on widely distinct time scales. The success of multivariate formulation relies on the fact that voltages and currents containing components that evolve themselves at two, or more, widely separated rates of variation can be represented much more efficiently if we define them as functions of two, or more, time variables (artificial time scales). With this stratagem all signals (stimuli and responses) will be represented as multivariate functions, which will imply that dynamic behavior of the circuits will no longer be modeled by DAE, or ODE, systems formulated in the 1-D time. It will be described by partial differential systems. In order to provide a simple and illustrative mathematical description of the multivariate formulation let us consider the classical example of a generic nonlinear RF circuit driven by

L,i and <sup>Y</sup><sup>~</sup> F,i. Effective stratagems for computing these intermediate

http://dx.doi.org/10.5772/intechopen.75490

31

Numerical Simulation of Electronic Systems Based on Circuit-Block Partitioning Strategies

subsystems is achieved by Y~ <sup>λ</sup>

stage values are proposed in [8, 9].

tional SPICE simulation engines.

4.1. Multivariate formulation

an envelope modulated signal of the form

4. Multitime partitioned simulation engines

3.3. Circuit-block partitioning strategy

where y<sup>F</sup> is the vector containing the fast-varying signals and y<sup>L</sup> is the vector holding the slowly varying (latent) ones. The former will be integrated with a small step length h (microstep), whereas the latter will be integrated with a large step size H (macrostep). The number of microsteps within each macrostep is an integer that we will denote by m. Hence, H ¼ m � h. The generic formulation of a MRK scheme is given in the following [8, 9].

Consider two Runge-Kutta methods of s and s stages represented by their Butcher tableaus [2] ð Þ <sup>b</sup>; <sup>A</sup>; <sup>c</sup> and <sup>b</sup>; <sup>A</sup>; <sup>c</sup> � �,

ð21Þ

The MRK method conceived for efficiently computing the numerical solution of the partitioned differential system of (19), using a microstep h for integrating the fast unknowns and a macrostep H for integrating the latent unknowns, is defined as follows [8, 9].

The fast-varying vector is obtained by

$$\begin{aligned} \mathfrak{z}\_F(t\_0 + \lambda h + h) \simeq \mathfrak{z}\_{F, \lambda+1} &= \mathfrak{z}\_{F, \lambda} + h \sum\_{i=1}^s b\_i \mathbb{k}\_{F, i\prime}^{\lambda} \\ \lambda = 0, 1, \ldots, m - 1, \end{aligned} \tag{22}$$

$$\begin{aligned} \mathbf{k}\_{\mathrm{F},i}^{\lambda} &= \mathbf{f}\_{\mathrm{F}} \left( t\_0 + \lambda h + c\_i h, \mathbf{y}\_{\mathrm{F},\lambda} + h \sum\_{j=1}^{s} a\_{ij} \mathbf{k}\_{\mathrm{F},j}^{\lambda}, \hat{\mathbf{Y}}\_{\mathrm{L},i}^{\lambda} \right), \\ \mathbf{i} &= 1, 2, \dots, \mathbf{s}\_{\prime} \end{aligned} \tag{23}$$

with Y~ <sup>λ</sup> L,i ≃yLð Þ t<sup>0</sup> þ λh þ cih :

The slowly varying vector is given by

$$\|\mathcal{Y}\_{L}(t\_0 + H) \simeq \mathcal{Y}\_{L,1} = \mathcal{Y}\_{L,0} + H \sum\_{i=1}^{\tilde{s}} \tilde{b}\_i \mathbf{k}\_{L,i} \tag{24}$$

$$\begin{aligned} \mathbf{k}\_{\mathbf{L},i} &= \mathbf{f}\_L \left( t\_0 + \overline{\mathbf{c}}\_i H, \tilde{\mathbf{Y}}\_{\overline{\mathbf{r}},i}, \mathbf{y}\_{\mathbf{L},0} + H \sum\_{j=1}^5 \overline{a}\_{ij} \mathbf{k}\_{\mathbf{L},j} \right), \\ \mathbf{i} &= 1, 2, \dots, \overline{\mathbf{s}}\_i \end{aligned} \tag{25}$$

with <sup>Y</sup><sup>~</sup> F,i <sup>≃</sup>yFð Þ <sup>t</sup><sup>0</sup> <sup>þ</sup> ciH .

From this definition we can attest that numerical coupling between fast and slow differential subsystems is achieved by Y~ <sup>λ</sup> L,i and <sup>Y</sup><sup>~</sup> F,i. Effective stratagems for computing these intermediate stage values are proposed in [8, 9].

## 3.3. Circuit-block partitioning strategy

with

ð Þ <sup>b</sup>; <sup>A</sup>; <sup>c</sup> and <sup>b</sup>; <sup>A</sup>; <sup>c</sup> � �,

with Y~ <sup>λ</sup>

The fast-varying vector is obtained by

L,i ≃yLð Þ t<sup>0</sup> þ λh þ cih : The slowly varying vector is given by

with <sup>Y</sup><sup>~</sup> F,i <sup>≃</sup>yFð Þ <sup>t</sup><sup>0</sup> <sup>þ</sup> ciH .

kλ

<sup>y</sup> <sup>¼</sup> <sup>y</sup><sup>F</sup> yL � �

30 Numerical Simulations in Engineering and Science

generic formulation of a MRK scheme is given in the following [8, 9].

, <sup>y</sup><sup>F</sup> <sup>∈</sup> <sup>R</sup>nF , <sup>y</sup><sup>L</sup> <sup>∈</sup> <sup>R</sup>nL , nF <sup>þ</sup> nL <sup>¼</sup> n, (20)

Xs i¼1 bik<sup>λ</sup> F,i ,

aijk<sup>λ</sup> F,j ; Y~ <sup>λ</sup> L,i

1 A,

bikL,i, (24)

Xs j¼1

i¼1

Xs j¼1

aijkL,j

1 A, ð21Þ

(22)

(23)

(25)

where y<sup>F</sup> is the vector containing the fast-varying signals and y<sup>L</sup> is the vector holding the slowly varying (latent) ones. The former will be integrated with a small step length h (microstep), whereas the latter will be integrated with a large step size H (macrostep). The number of microsteps within each macrostep is an integer that we will denote by m. Hence, H ¼ m � h. The

Consider two Runge-Kutta methods of s and s stages represented by their Butcher tableaus [2]

The MRK method conceived for efficiently computing the numerical solution of the partitioned differential system of (19), using a microstep h for integrating the fast unknowns

and a macrostep H for integrating the latent unknowns, is defined as follows [8, 9].

<sup>y</sup>Fð Þ <sup>t</sup><sup>0</sup> <sup>þ</sup> <sup>λ</sup><sup>h</sup> <sup>þ</sup> <sup>h</sup> <sup>≃</sup> <sup>y</sup>F,λþ<sup>1</sup> <sup>¼</sup> <sup>y</sup>F,<sup>λ</sup> <sup>þ</sup> <sup>h</sup>

<sup>y</sup>Lð Þ <sup>t</sup><sup>0</sup> <sup>þ</sup> <sup>H</sup> <sup>≃</sup>yL,<sup>1</sup> <sup>¼</sup> <sup>y</sup>L, <sup>0</sup> <sup>þ</sup> <sup>H</sup>X<sup>s</sup>

<sup>k</sup>L,i <sup>¼</sup> <sup>f</sup> <sup>L</sup> <sup>t</sup><sup>0</sup> <sup>þ</sup> ciH; <sup>Y</sup><sup>~</sup> F,i; <sup>y</sup>L,<sup>0</sup> <sup>þ</sup> <sup>H</sup>

0 @

i ¼ 1, 2, …,s,

F,i ¼ f <sup>F</sup> t<sup>0</sup> þ λh þ cih; yF,<sup>λ</sup> þ h

λ ¼ 0, 1, …, m � 1,

0 @

i ¼ 1, 2, …s,

We must be aware that circuit-block partition into fast and slow subsystems can possibly change during the time-step integration process. Hence, it will be very helpful if the simulator is capable of automatically detect the slow and fast variables in the circuit. This automatic classification can be achieved using embedded RK methods [2] and error estimates usually evaluated for step size control and stiffness detection [3]. Fast-slow partitioning strategies, step size control tools, number of microsteps within a macrostep, stiffness detection stratagems and many other technical details of MRK code implementation are thoroughly addressed in [8–10] and also in [11].

Finally, it must be pointed out that significant efficiency gains in computation speed for the simulation of several illustrative examples have been reported in the scientific literature, which demonstrate an effective reduction on the MRK computational cost in comparison to traditional SPICE simulation engines.
