You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/280021165

A Comparison Between Envelope Analysis Implementations

Conference Paper · October 2007

CITATIONS READS

0 131

3 authors:

Alexandru Gabriel Gheorghe Florin Constantinescu


Polytechnic University of Bucharest Polytechnic University of Bucharest
76 PUBLICATIONS   194 CITATIONS    153 PUBLICATIONS   281 CITATIONS   

SEE PROFILE SEE PROFILE

Miruna Nitescu
Polytechnic University of Bucharest
121 PUBLICATIONS   256 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

MOBILIS FP6 (2006-2009) View project

All content following this page was uploaded by Alexandru Gabriel Gheorghe on 13 July 2015.

The user has requested enhancement of the downloaded file.


SNET'07

A Comparison Between Envelope Analysis Implementations


Alexandru. G. GHEORGHE, Florin. CONSTANTINESCU, Miruna. NITESCU
Department of Electrical Engineering, Politehnica University, Splaiul Independentei 313, Bucharest,
Romania, e-mail: florin.constantinescu@lce.pub.ro

Abstract. The poor efficiency of the envelope following analysis with respect to the transient
analysis is pointed out. The implementations in SPECTRE RF and PAN are taken into account.
The reasons for this poor efficiency are shown together with some possible solutions for its
improvement.

1 Introduction
The basic idea of the envelope following algorithms is to jump over some carrier periods
diminishing the number of time steps. If the envelope changes slowly relative to the period of the
carrier, then envelope following simulation should be very efficient relative to traditional transient
analysis. The main applications of this kind of simulation in the area of RF circuits could be:
predicting the response of a circuit when it is driven with a complicated digital modulation,
computation of the long-term transient behavior of certain circuits, shortening the simulation of
large-scale circuits, and fast computation of the periodic response [1, 5].
In this paper we show that the efficiency of the envelope following algorithms implemented in
SPECTRE RF [2] and PAN [3] software packages is poor in many cases. Section 2 contains a brief
description of the algorithms, while Section 3 contains an analysis of the reasons of this poor
efficiency. Some possible modifications of the envelope following algorithm are discussed in
Section 4.

2 Algorithms
The envelope following algorithm of Kundert is illustrated in Fig. 1, where T is the carrier
period. This algorithm finds the circuit state at tn+1 so that the circuit state at tn+1 is lying on a
quadratic curve passing through the states at tn-1, tn, and tn+1+T. This method is implemented in
SPECTRE RF [2].

Figure 1: Envelope following algorithm of Kundert

In the first time instant of the envelope following analysis, as well as after each jump attempt
(successful or not), the time step is chosen, for the moderate error option, according to the relation
timestep = MIN( finalTime/50, step )/100, where finalTime is the carrier period, and step is an user
given value; for the conservative error option finalTime is divided by 100.
The time step is modified according to the well known algorithm of SPICE, based on the local
truncation error (LTE). LTE is estimated computing the solution at tn+1=tn+h for a certain h. The
values computed at tn+1 are accepted if

1
107/567
SNET'07

LTE ≤αabs + αrel V (1)


where αabs is an absolute error like vabstol or iabstol, αrel is a relative error like reltol and V is the
value of the unknown at tn+1. If (1) is not true, the values computed at tn+1 are rejected and a new
computation is made with a smaller value of h. If LTE is much smaller than the right hand side in
(2), then the value of h is increased.
The envelope following algorithm of Brambilla and Maffezzoni [4] can be outlined as follows.
Consider the circuit was solved till the m-th period denoted as [t m = mT , t m +1 = (m + 1)T ] , where m is a
positive integer. At the subsequent time instant t n = t m +1 + H , where H = (n − m ) ⋅ T , n > m is a
multiple of T, the state variables can be estimated by adopting a version of the backward Euler
method modified for envelope integration
dy H
yn = ym + H → y n = y m + ( y n +1 − y n )
dt t = t T
n

where ym , y n represent samples of the envelope waveform, and H is the time jump. The value
y n +1 can be determined only by integrating the circuit equations in the interval [t n , t n +1 ] , starting from
the initial conditions y (t n ) . Taking into account that y n +1 = Φ( y n , t n ) where Φ is the state transition
function, the following nonlinear algebraic equation is obtained
T
Γ BE ( y n ) = y n − Φ( y n , t n ) + ( yn − ym ) = 0 (2)
H
which is solved for y n using a predictor and only one Newton iteration. This analysis is
implemented in PAN [3].
PAN, a free of charge software made at Politecnico di Milano, uses a step choice algorithm relying
on energy-based control [4]. An error between the accumulated energy and the numerically
computed absorbed energy is estimated for each dynamic element. In the case of a parallel RC
circuit solved by the Backward Euler method this error is:
∆E c + ∆E p = 12 C[V (t n +1 ) 2 − V (t n ) 2 + CV (t n )[V (t n ) − V (t n +1 )]
where ∆E c is the energy accumulated in the linear capacitor, − ∆E p is the energy absorbed by the
capacitor, and V is the capacitor voltage.
The initial choice of the time step in PAN is similar to SPICE. This time step is modified based on
rules similar to the SPICE ones. The acceptance of the values computed at tn+1 as well as the time
step reduction or increasing are based on the relation
∆Ec + ∆E p ≤ α rel ∆Ec + α abs (3)
where α rel and α abs are user defined errors, similar to those defined in SPICE [6].
As it will be shown in the next section, both envelope analyses of SPECTRE RF and PAN are in
many cases slower than simple transient analysis. There are two possible reasons of this lack of
efficiency:
• inappropriate time step choice algorithm,
• occurrence of transient components after a time jump.

3 Results
The numerical experiments reported in [5] with some benchmark circuits, as those in Figures 2
and 3, with SPICE, SPECTRE, and PAN show that the CPU times of transient analyses in SPICE
and SPECTRE are very close each other while that of PAN may be about one order of magnitude
shorter.

2
108/567
SNET'07

Figure 2: Class C Amplifier

Considering the absolute error values of 10-12 and the relative errors of 10-5 and 10-6 the
envelope following analysis of these two circuits has been performed both with SPECTRE RF and
PAN. Various relative errors for the time jump computation have been taken into account so that a
correct response is computed. When no jump attempt was successful, the simulation time has been
much greater than for the simple transient analysis. Even though when some jump attempts were
successful, the transient analysis was more efficient than envelope following [5].

Figure 3: Mixer ne600p

In order to illustrate the above mentioned reasons of poor efficiency of the envelope following
analysis, the simple linear test circuit in Fig. 4 is used. The independent sources describe an
amplitude modulated signal with carrier frequency fc=1MHz and modulation frequency fm=1KHZ.
The series circuit R1, L1, C1 produces transient components of 100MHz. The response is the node
voltage V(4).
The common error values for all envelope analyses are: reltol=1e-6, iabstol=1e-12, and
vabstol=1e-12 in PAN and SPECTRE RF. All computations considered below lead to results which
don’t depend on the analysis (transient or envelope following) and on the used software (SPECTRE
RF or PAN).
In order to compare the time step evolution for envelope following and transient analyses the errors
have been set as the envelope analyses didn’t lead to any jump. In this case the waveform computed
with the envelope analysis is the same as that computed with transient analysis, and a comparison of
simulation time is relevantly.

3
109/567
SNET'07

Figure 4: Linear test circuit

The maximum value of the time jump relative error (corresponding to envlteratio=1000) for
which no jump is made being considered, the time step values in Fig.5 have been obtained with
SPECTRE RF. It follows that even though the average time step for transient analysis is only about
50% greater than that corresponding to envelope following, the simulation time for envelope
following is about nine time greater. This result can be explained both by unsuccessful jump
attempts and by the drastic time step reduction at the beginning of each “minimum jump” period
(this value has been set to the carrier period). The setting errpreset=conservative, involving that the
maximum step is carrierperiod/100 has been used in Fig. 5. With errpreset=moderate,
corresponding to a maximum step of carrierperiod/50, an average time step slightly closer to that of
the transient analysis is obtained.

Figure 5: Time step for transient and envelope following analyses in SPECTRE RF

Using a similar setting of the parameters in PAN envelope analysis (ereltol=1e-6) the result in
Fig. 6 has been obtained. The minimum time step in this analysis is not set in this case, even though
PAN allows this magnitude to be given by the user; both the minimum and the maximum time step
are computed by the PAN algorithm for this example. In this case the simulation time of the
envelope analysis is about two times greater than that of the transient analysis. In the above
mentioned conditions the simulation time of SPECTRE RF envelope analysis is about 17 times
greater than that of PAN envelope, while the simulation time of SPECTRE RF transient analysis is
about four times greater that that of PAN transient analysis.

4
110/567
SNET'07

Figure 6: Time step for transient and envelope following analyses in PAN

This result is illustrated by the time step evolution in the two envelope analyses, given in Fig. 7.

Figure 7: Time step for envelope following analyses in SPECTRE RF and PAN

The maximum time step in the envelope analysis of PAN is computed depending on the
minimum time jump Hm. The minimum time step hmin can be given by the user, but it is better to
leave the program to do this job. These aspects are illustrated in Table I and Fig. 8. Table I gives the
CPU time and the maximum jump during an analysis of 100us.
TABLE I. THE INFLUENCE OF HMIN AND HM IN PAN ENVELOPE ANALYSIS
hmin Hm=1us Hm=2us

CPU time (s) max jump (x Hm) CPU time (s) max jump (x Hm)
4. 00e-09 0.41 1 0.25 1
2.00e-09 0.62 0 0.21 1
1.00e-11 0.12 7 0.09 13
1.00e-12 0.09 24 0.10 10
chosen by PAN 0.10 21 0.11 10

The dependence of hmax on Hm (denoted by period) for PAN envelope analysis is shown in Fig.
8. A detail of the time step evolution at the beginning of a carrier period showing a lot of very small
time

5
111/567
SNET'07

steps is given in Fig. 9.


The transients having spectral components above carrier frequency lead to time step reduction.
The detail given in Fig. 10 shows this kind of components produced by the series circuit R1, L1,
C1. The instant t =0 in this figure corresponds to t=3e-6 in Fig. 5, where the time step is relatively
small. This kind of behavior may occur after an erroneous jump too.

Figure 8: Time step in envelope following analysis for various Hm (PAN)

Figure 9: Detail of the time step evolution

4 Conclusions
In this paper the efficiency of the envelope following algorithms implemented in SPECTRE RF
and PAN has been compared with that of the transient analysis. The following aspects, which lead
to a poor efficiency of these envelope following analyses, have been pointed out:
• The time step of the envelope following analyses is smaller than that of the transient
analysis both for SPECTRE RF and PAN, the main reason being that the solution computation in
each interval corresponding to a possible jump is considered as a new transient analysis with a
drastic time step reduction at its beginning. Moreover, this time step reduction is performed even
though the jump is not actually made.
• For similar error conditions PAN computes a maximum time step corresponding to 200
points in the above mentioned interval, while SPECTRE RF computes a maximum time step
corresponding to 100 points.

6
112/567
SNET'07

• The unsuccessful jump attempts have a stronger influence on the CPU time in PAN than in
SPECTRE RF.
• .PAN’s envelope analysis can be faster than SPECTRE RF’s one due to the grater efficiency
of the transient analysis.
• In certain cases the SPECTRE RF algorithm makes no jumps while the algorithm of PAN.
makes small jumps.
• We appreciate that the jump procedure of SPECTRE RF is better, while the transient
analysis of PAN is more efficient.
We are working on a new implementation of the envelope following analysis in the SPICE3
sources, including a new algorithm for the choice of the time step, avoiding the above mentioned
drawbacks of SPECTRE RF and PAN implementations, and elimination of some transient
components using windowing techniques [7] when the periodic response has to be computed.

References

[1] K. Kundert, “Introduction to RF Simulation and its Application”; Journal of the Solid State Circuits,
1999, updated on January, l, 2004, www.designers-guide.com
[2] K. Kundert, “A User’s Guide to Envelope Following Analysis”, CADENCE, 2002.
[3] PAN User’s Guide, http://brambilla.elet.polimi.it.
[4] A. Brambilla and P. Maffezzoni, “Envelope-Following Method to Compute Steady-State Solutions
of Electrical Circuits”; IEEE Transactions On Circuits And Systems – I: Fundamental Theory And
Applications, vol. 50, no. 3, march 2003.
[5] F. Constantinescu, A.-G. Gheorghe, M. Nitescu, “Large signal analysis of RF circuits – an
overview”, Proceedings of the International Conference on Advanced Topics in Electrical
Engineering, Politehnica University, Bucharest, Romania, November 24-25, 2006.
[6] A. Brambilla, private communication, March 2007.
[7] BORES Signal Processing, Introduction to DSP, www.bores.com/courses/
[8] J. White, S. B. Leeb, An envelope following approach to switching power converter simulation,
IEEE Trans. on Power Electronics, vol. 6, No. 2, pp. 303-307.

Acknowledgment - The authors would like to thank professor Angelo Brambilla, “Politecnico
di Milano”, Italy for helpful discussions.

7
113/567

View publication stats

You might also like