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,
Example:
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:
Spectrum=dbm(DFT(X(t)))
* 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,
Tawna