Menu

- You did not low pass filter your signal, you suffer from aliasing.
- You did not sample integer number of cycles, you suffer from spectral leakage.
- You did not add strobe period in tran sim, you suffer from interpolation error.

Your signal might have infinite frequencies in it but you cannot have infinite sampling rate to capture them. Decide maximum frequency (\(f_{max}\)) you are interested in, and set sampling rate (\(f_{s}\)) twice of that. Say, \(f_{max} = 10 MHz\)

$$ f_{s} = 2\times f_{max} = 2 \times 10 MHz = 20 MHz$$

$$ T_s = \frac{1}{f_s} = \frac{1} {20MHz} = 50 nS$$

Your sampling period (\( T_s \)) will be your strobe period (\( T_{strobe} \)) in Cadence tran simulations. Strobe period defines step size in tran simulations, and you want to make sure the points you are going to be sampling at (which are \( T_s \) apart) are actually simulated, not interpolated. To err on side of caution, I make sure my \(T_{strobe} \) is 10 times lower than \( T_s \) (maybe an overkill if your simulation time explodes).

Leave rest of the options default that is no fancy window (just plain Rectangular Window); no Smoothing Factor or Coherent Gain since we use Rectangular Window (other windows changes the signal’s amplitude, you use coherent gain to correct that); no ADC span (specifies the peak saturation level of the FFT waveform. When specified the magnitude of the input waveform is divided by adc span value before computing FFT).

Convert the output to dB using dB20( ) if you would like. Final expression would look like:

- Our filter’s corner frequency is 10MHz, so it is adding 3dB attenuation as you approach 10MHz
- Filter is not really brick-wall, 11MHz harmonic is only getting 17dB attenuation, so it will fold and corrupt 9MHz. What do we do now? Increase sampling rate. Say you really want to see precise magnitude of 10MHz, then you can double sampling rate, thereby also doubling filter cutoff. This way 10MHz won’t have aliasing or filter attenuation but 20MHz would (Have you grown sudden care for 20MHz now?)

$$f_{res} = f_{GCD}$$

Say we are doing IM3 test. We excite our circuit with 2 tones (1MHz,1.1MHz), our IM3 tones will fall at (0.9MHz,1.2MHz). The tones we are interested in measuring correctly are (0.9MHz,1MHz,1.1MHz,1.2MHz). GCD of these tones is 0.1MHz. If you sample 0.1MHz coherently (meaning sample integer number of cycles), you will be sampling all these (0.9MHz,1MHz,1.1MHz,1.2MHz) coherently as well. And now to sample 0.1MHz coherently, you need to set \(f_{res}\) to 0.1MHz.

We had 1MHz \(f_{res}\) before which gave us 1uS sim time, but now with 0.1MHz \(f_{res}\), sim time has increased to 10uS, that is the price we paid. To get around this, consider changing your input frequencies to say (1MHz,2MHz). Now GCD is 1MHz, so your \(f_{res}\) won’t have to change.

- Increase sampling rate, if you see differences, there is still some aliasing at play.
- Reduce frequency resolution, if you see differences, there is still some spectral leakage at play.
- Decrease strobe period beyond sampling period, if you see differences, there is something wrong with simulation accuracy or things in your circuit which are modelled in frequency domain (like s-parameters, low pass filter model described above etc.)
- Done everything, still see spectral leakage? Time to start applying windows. Start with Hamming, Hanning and Blackman windows. Observe how windows are changing your FFT. Things that don’t change with windows are very likely real. Things that change were likely FFT artifacts. Small changes in amplitudes, here and there, are expected with windows, we are looking for big changes.

Sponsors

aclr (3)
ADS (1)
amplifier (1)
balun (2)
bandwidth (1)
cadence (8)
design (1)
EM (1)
evm (1)
fft (1)
ideal (1)
ideal low pass filter (2)
inductor (2)
intermodulation (4)
IQ calibration (1)
linearity (12)
loadline (1)
LO leakage (1)
matching network (8)
math (6)
mixer (4)
mmwave (1)
noise (3)
product (1)
quality factor (7)
specs (2)
transformer (1)
tx (17)
verilog (1)