Home > Community > Blogs > RF Design > measuring 2 tone intermodulation using envelope following analysis
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more convenient.

Register | Membership benefits
Get email delivery of the RF Design blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Measuring 2-Tone Intermodulation Using Envelope-Following Analysis

Comments(2)Filed under: RF design, RF Block Simulation, wireless integrated circuit verification, RF designer, Virtuoso Spectre Simulator GXL, Spectre, Spectre RF, Harmonic Balance, spectreRF, RFIC, MMSIM, RF Simulation, Analog Simulation, ADE, RF, RF spectre spectreRF, envelope, simulation, fast envelope, spectre spectreRF, analog, HB, analog/RF, SpectreRF tutorials

From time to time, SpectreRF users simulate very large, extracted-view circuits in 2+ tone QPSS. In many of those cases, memory requirements exceed the available resources. When that happens and small-signal approximations aren’t applicable, the user is typically stuck.

The solution below and attached database describe a technique that achieves an order-of-magnitude reduction in memory requirements by converting an N-tone QPSS problem to an equivalent (N-1)-tone envelope-following analysis.

Basic Idea

This is a 2-tone signal in the common HB representation:


We can also look at this as a modulated carrier, with the modulation function:


We run an envelope analysis to compute the modulations at each node and harmonic and calculate the multi-tone representation using DFT.


* Numerically, envelope simulation is similar to HB simulation repeated at each time step.

* By looking at a 2-tone signal as a modulated carrier, we convert a 2-tone problem to many smaller 1-tone problems.

* In general, we can convert an N-tone HB analysis to a series of N-1 tone analyses.

* For very large circuits with huge memory requirements, this can reduce the required memory by an order of magnitude effectively, the same problem is now computed using much smaller, N-1 tone systems.

Basic Approach in Virtuoso:

* Use a Verilog-A module and transient simulation to generate I/Q components of the 2-tone modulation function

* Apply the I/Q components using the PORT element’s Modulation parameters and run an envelope simulation

* Run envelope analysis over N periods (the period is just the inverse of a half of the frequency spacing); this lets all transients expire (we are looking to reach the envelope steady-state)

* Use adaptive step envelope for best simulation accuracy, but use equally spaced strobe output for best postprocessing accuracy using DFT.


* This currently works with 2-tone simulation.

* This should also work with 3+ tones, but currently does not. CCR 979403 has been filed for this issue. Once fixed, you will be able to apply this to 3+ tones.

just set the power of one of the 2 tones to 0 and the other to something suitably small. In theory, this technique uses less memory than PAC.


In this example, you wil see:

* Creating the IQ signal

* Running envelope simulation

* Postprocessing

* Results comparison

Creating the IQ signal

Use the attached database testcase.tar.gz.   This is available on Cadence Online Support in Solution 11774216.

Open library test_2t_env.

Simulate the cell generate_envelope from state spectre_state1.




Generating the 2-tone Envelope

The ADE setup lets you specify tone spacing, power in each tone, the number of samples per period (N) and the number of periods (cycles) to store.

You get something like this:



This now represents the envelope of our two-tone signal, and we’ll run and envelope analysis with it as the source next.

Verifying the Source Signal

First, we’ll run a very simple example, just to make sure that we get what we expect.

Open the test_port schematic view and observe the port’s relevant settings.



Port Edit Properties form:




Running the Simulation:

Open test_port->spectre_state1 and simulate.

Plot the ‘right’ and ‘left’ outputs: (Note that 'right' and 'left' are defined below).



What are 'right' and 'left'??

* ‘Right’/’Left’ is what you would see to the right/left of the carrier when you look at the spectrum analyzer.

* This is just an artifact of how we post-process the envelope (to be explained later).

* Since the ViVA DFT works on purely real waveforms, ‘left’ is really the image of the negative frequency spectrum.

* So, we have a -20 dBm tone, offset 1 MHz from the carrier, and another of equal power, offset -1 MHz from the carrier. This is exactly what you’d expect.


Running a 2-tone HB Simulation for Reference

Open test_hb_2tone, which is just a behavioral LNA simulation.

Run test_hb_2tone, which is the excitation we saw in the above paragraphs, applied in an HB simulation.



Running an Envelope Simulation on the LNA

Run test_env_2tone->spectre_state1.

This is the same as the previous example, except that uses envelope simulation with the PORT element as set up earlier.

Since the LNA has no memory and the excitation is symmetric, ‘left’ and ‘right’ are the same.



Comparison Summary

HB and envelope give nearly identical results!




Post Processing Background

* To calculate the spectrum, we would ideally take the complex DFT of the waveform and convert to dBm. The formula goes like:


* Since there is no complex DFT in ViVA, we do something like:

  Right Spectrum = dbm(DFT(real(X(t)/2)+j*DFT(imag(X(t)/2))

  Left Spectrum = dbm(conj(DFT(real(X(t)/2)))-j*conj(DFT(imag(X(t)/2))))

* Note that, in all cases, we want to process only the last cycle of the waveform (when the steady-state is reached).

* The expressions are a bit messy. They are shown only for reference below. Use the ADE state as a bench rather than attempting to enter the expression from scratch.

Spectrum Post Processing Expressions 'Right'

(10 * log10((pow(abs(((dft(real(harmonic(v("/out" ?result "envlp_fd") '1)) ((pv("/cycles" "value" ?result "variables") - 1) / pv("/deltaf2" "value" ?result "variables")) (pv("/cycles" "value" ?result "variables") / pv("/deltaf2" "value" ?result "variables")) pv("/N" "value" ?result "variables") "Rectangular" 1 "default") + (sqrt(-1) * dft(imag(harmonic(v("/out" ?result "envlp_fd") '1)) ((pv("/cycles" "value" ?result "variables") - 1) / pv("/deltaf2" "value" ?result "variables")) (pv("/cycles" "value" ?result "variables") / pv("/deltaf2" "value" ?result "variables")) pv("/N" "value" ?result "variables") "Rectangular" 1 "default"))) / 2)) 2) * 10)))

Spectrum Post Processing Expressions 'Left'

(10 * log10((pow(abs(((dft(real(harmonic(v("/out" ?result "envlp_fd") '1)) ((pv("/cycles" "value" ?result "variables") - 1) / pv("/deltaf2" "value" ?result "variables")) (pv("/cycles" "value" ?result "variables") / pv("/deltaf2" "value" ?result "variables")) pv("/N" "value" ?result "variables") "Rectangular" 1 "default") - (sqrt(-1) * dft(imag(harmonic(v("/out" ?result "envlp_fd") '1)) ((pv("/cycles" "value" ?result "variables") - 1) / pv("/deltaf2" "value" ?result "variables")) (pv("/cycles" "value" ?result "variables") / pv("/deltaf2" "value" ?result "variables")) pv("/N" "value" ?result "variables") "Rectangular" 1 "default"))) / 2)) 2) * 10)))

Have fun simulating!

Best Regards,




By Frank Wiedmann on May 21, 2012
An alternative possibility for weakly nonlinear circuits are the Rapid IP2 and Rapid IP3 analyses, which are special analysis options to the AC analysis (for amplifiers) and to the PAC analysis (for mixers). The algorithms behind these methods are described in US Patent 7774176.

By Tawna on May 21, 2012
Hi Frank,   I agree that rapid IP2 and IP3 are suitable for small signal situations.   The original post is specifically for those situations where Rapid IP2/IP3 are not appropriate (small signal approximations are not valid).   best regards,     Tawna

Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.