5.1. Exact Models
According to (
3), the inner multiport
is described by its admittance matrix:
The most straightforward implementation well suited for the SPICE-like circuit simulators consists of a dependent current source at each
i-th port,
, with the current equal to:
The absence of a minus sign in (
27) is due to the direction of the underlying current (see
Figure 2). The part of such a model connected to the
i-th port is shown in
Figure 11. According to Equation (
27), the voltage-controlled current source depends linearly on
N voltages. In most simulation programs, such a source can be implemented as a parallel connection of
N conventional dependent current sources controlled by a single voltage. Such a connection does not introduce any additional internal nodes to the model and, therefore, does not increase the size of the system matrix.
It should be emphasized that although the presented model is conceptually simple since the trans-admittances of the controlled sources for are numerically equal to the scattering parameters, the model parameters are frequency-dependent and usually provided in a tabular form. This fact necessitates the use of behavioral sources, which have two drawbacks:
The generic SPICE program does not provide behavioral sources, so one has to resort to one of the modified SPICE versions. Some allow for the direct use of SnP or CITI files (e.g., in the HSPICE program via the TSTONEFILE or CITIFILE keywords, respectively). Others allow for the convenient inclusion of tabulated data (e.g., in the LTSPICE and PSPICE programs using the FREQ keyword and the .include directive).
The analysis of circuits containing behavioral sources that use tabulated data is recognized as slow (see [
29] and the timing data provided in
Section 7 in the present paper.
As a final note concerning the exact behavioral models, let us consider the following modification of the author’s model presented above. Firstly, we will assume that all reference impedances are positive real:
. Secondly, we will withdraw the assumption that the scaling resistance
is globally defined for the whole multiport
and instead define individual scaling resistances for each
i-th port as
. The chain matrix (
12) of the transforming two-port (in the case of pseudo-waves) takes the form:
This matrix has a determinant equal to one. It can, therefore, be synthesized as a reciprocal circuit in the form of the inverted-
-type two-port, consisting of the series impedance
followed by the shunt impedance
. If we employ such a two-port
in the model depicted in
Figure 11 and then convert the parallel connection of the latter (shunt) impedance and the current source to the Thévenin equivalent, we will obtain the widely cited model presented in Figure 21 of [
2]. This model, which is defined in [
2] only for a two-port with equal reference impedances of both ports, contains a controlled voltage source with an electromotive force equal to
, that can be implemented as a series connection of
N conventional dependent voltage sources controlled by a single voltage. The advantage of voltage sources is that their coefficients are dimensionless, so they can be directly identified with the scattering parameters without resorting to the scaling resistance
. However, the series connection of
N voltage sources introduces
extra internal nodes of the model (
N sources for each of
N ports), dramatically increasing the dimensions of the system matrix and, as a consequence, the analysis time. The experiments described in
Section 7 of the present paper will confirm this observation.
In conclusion, the proposed exact model of the inner multiport does not introduce any internal model nodes and necessitates the use of behavioral voltage-controlled current sources.
5.2. Approximate Models
One potential reason for the extended analysis time of models incorporating behavioral sources defined by tabulated frequency-dependent parameters is the time required for table lookup and interpolation. To test this hypothesis, an investigation was conducted into approximate models, where the frequency dependence is defined in terms of the rational approximation of the tabulated data in the Laplace (s-variable) domain. Several SPICE program variants permit the description of behavioral sources in terms of the rational function in the s variable, using the LAPLACE keyword. In such instances, the number of terms in the partial fraction expansion of the rational approximation is typically fewer than the number of frequency points in the table.
It should be noted that the approximation of the
matrix as a whole is required, i.e.,
functions of the Laplace variable
s are needed. As a simplifying assumption, we will use the same denominator (and thus the same set of poles) for all
functions. The elements of the approximated
matrix will differ only by their numerators (or, equivalently, residues). This approach is widely employed as evidenced by the so-called MIMO structure in [
30] or [
31]. It arises from the fact that when converting any multiport matrix (e.g., chain, impedance and admittance) to the scattering matrix using formulas such as those in [
32,
33] or [
34], one obtains a common denominator of all scattering parameters.
Among the various techniques for approximating a family of complex frequency functions in MIMO structure (e.g., see a comparison in [
35]), the most prevalent is the vector-fitting method [
30] (Chapter 7). The newly introduced AAA algorithm (adaptive Antoulas–Anderson) has recently garnered increasing interest. The free code for the MIMO version of the AAA algorithm can be downloaded from the repository pointed to in [
36] (Footnote 1 in Section 4).
It is, therefore, assumed that the
P poles
,
are common for all scattering parameters, with the residues
individually assigned to each scattering parameter
:
where
is a direct term of the partial fraction expansion. Among these
P poles, let there be
real poles and
pairs of complex conjugated poles:
. Let the poles be ordered so that the complex conjugated pairs come first, and within the pair, the pole with the positive imaginary part comes first:
where
These conditions imply the ordering of the corresponding residues
of the scattering parameter
, for
. Consequently, we obtain:
By inserting the approximation (
29) into (
27), we obtain:
The form of this formula suggests the method of implementing it. Since in the MIMO structure, the denominators of the rational approximations of all scattering parameters are the same, the same grounded subcircuit
should be created for each port. The role of this subcircuit is to sample the voltage
without drawing any current and to generate a set of
P proportional voltages corresponding to individual partial fractions (see
Figure 12). To ensure that the circuit is identical for all ports, it is necessary to replace the partial fractions numerators (residues
) with simple constants of the appropriate physical dimension. Given that the poles and residues have the dimension of angular frequency [
/
] and that the trans-admittance of the controlled sources should be expressed in [
], it is necessary to introduce a scaling capacitance
, common to the entire modeled multiport
, with a unit value (e.g.,
or
, according to the desired frequency range). The dimensionless direct term
should then be divided by the previously introduced scaling resistance
. As the subcircuit
is identical for all ports, it can be conveniently implemented as a macro-model (using the SPICE
.subckt directive).
A scaled partial fraction in (
33) corresponding to the single pole
can be expressed in the form:
The first braced factor can be interpreted as a voltage transfer function
of the two-port that is a part of the subcircuit
connected to the
j-th port. The implementation of the two-port
is straightforward (see
Figure 13a). The two-port retrieves the voltage
with a dependent current source of the trans-admittance equal to
, connected to the standard RC cell. The resistor utilized has the conductance
as indicated in
Table 2, which is positive for the pole on the left real semi-axis. The second braced factor in (
34) represents a trans-admittance
of the current source connected to the
i-th port and controlled by the voltage
(see
Figure 13b).
In the case of a pair of complex conjugate poles, it is necessary to consider both corresponding partial fractions simultaneously. By taking into account (
31) and (
32), we obtain:
where
. The first braced factor in both terms can be interpreted as the voltage transfer function
or
of the three-port that is a part of the subcircuit
connected to the
j-th port. The second braced factor in both terms is the trans-admittance
or
of the dependent current source connected to the
i-th port and controlled by voltage
. Implementing this three-port is more complex than before (see
Figure 14). The comparison with the real-pole case reveals that the corresponding circuit has doubled the trans-admittance of the dependent source sampling the input voltage
and duplicated RC cells coupled with a gyrator. The resistors utilized have the conductance
as indicated in
Table 2, which is positive for the poles in the left half plane. The formula for the gyration conductance
is provided in
Table 2 as well. Alternatively, one can reverse the gyration direction and the dependent source
.
Following the replacement of the gyrator with a pair of controlled sources as illustrated in
Figure 15, the circuits from
Figure 13 and
Figure 14 become very similar to models based on state equations in [
30] (Figures 11.8 and 11.9) and [
31] (the middle part of Figure 5). However, the approach proposed in this work is more suitable to the requirements set out in
Section 1 and the specificity of the SPICE program due to the method of implementing the residues. In the book [
30], the trans-admittances of controlled sources depend on the square roots of the reference impedances, so in the general case, they are complex and frequency-dependent. The article [
31] employs trans-admittances dependent on the reference impedance and current-controlled current sources, which have more complicated SPICE models than those required by the author’s approach. In the present work, all current sources that implement residues are voltage-controlled, and their trans-conductances are constants independent of the reference impedance.
We elected to place a gyrator in the schematics presented in
Figure 14 instead of a pair of controlled sources as in
Figure 15, to illustrate an alternative implementation of a pair of conjugated complex poles. This alternative implementation is, in fact, primary to the one presented above. Namely, considering the impedance transformation by the gyrator (a positive-impedance inverter), the circuit shown in
Figure 14 is equivalent (up to the rightmost node voltage scaling) to the circuit shown in
Figure 16. The latter can be regarded as a parallel resonant circuit with lossy reactance elements exhibiting the same individual quality factors at the resonant frequency. In this case, Formula (
35) becomes:
where
is a quality factor of the resonant circuit. The conductance
remains unchanged. The inductance value is
, and the resistance value is
. As before,
for the poles in the left half plane. Preliminary experiments have demonstrated that the model of
Figure 16 yielded virtually identical analysis times to those for the model of
Figure 14, although with marginally worse numerical errors. Therefore, it was not investigated in detail further.
The direct term has a straightforward implementation that does not require a figure. It is implemented as a single current source at the i-th port, controlled by the voltage of the j-th port, with transconductance equal to . In practice, this term appears rarely, as for many circuits, for high frequencies.
The insertion of (
34) and (
35) into (
33) yields:
for
. This formula and the accompanying
Figure 12,
Figure 13,
Figure 14 and
Figure 15 give insight into the complexity of the proposed approximate model of the inner multiport
. Including the direct terms
, the model introduces
internal model nodes and requires
resistors,
capacitors, and
conventional (not behavioral) voltage-controlled current sources with constant trans-admittances.
An analysis of
Table 2 reveals that if the scaling capacitance
is unity (such as
), all the (trans-)conductances are numerically equal to the real or imaginary part of the pole or residue. Consequently, the model element values directly relate to the partial fraction expansion, resulting in a simple model construction. However, it should be noted that the resistors in
Figure 13 and
Figure 14 are defined by their conductance
, not resistance. SPICE does not feature conductances as primary elements. Consequently, one must numerically invert the conductance to provide the resistance
, thereby destroying the direct relationship between the element values and partial fraction coefficients. Alternatively, it is possible to simulate the conductance as a dependent current source with transconductance
, controlled by its self-voltage. However, in such a case, one must provide an extra dummy resistor of a huge resistance in parallel to each mentioned source to guarantee the direct current path to the corresponding inner model node (as SPICE requires).