# If I have a signal that switches between 5MHz and 4MHz faster than the sample rate of the ADC on a spectrum analyzer

Basically, what happens if your signal is switching between frequencies faster than the sample rate of the ADC in the spectrum analyzer? I have been curious as to what would happen in this case, would aliasing from sampling occur?

From what I understand about spectrum analyzers is that they use RF mixer magic and a band pass filter to bring an extremely high frequency signal into a frequency range that can be sampled by a relatively “cheap” and “slow” ADC. From what I understand, I don’t think that magic works to also bring down the switching rate of a signal switching between two frequencies.

A follow up question would be if the amplitude of a 5MHz signal is changing from lets say 10dB to 50dB every 10ns, would an ADC on a spectrum analyzer that samples every 25ns be able to capture the event without aliasing?

From what I understand about sampling is that aliasing would occur and you need a faster ADC (probably a time interleaved ADC) in your spectrum analyzer to capture the event where a signal is switching frequencies or amplitudes faster than the sample rate of the ADC.

If it is possible can you explain how it works?

• if your understanding calls something "magic", it's probably not really deserving of the term "understanding" ;) Most classic spectrum analyzers don't work like you describe it. What you describe is a radio receiver with a mixer. We, however, can't tell you how all spectrum analyzers work. Also, I've never seen a spectrum analyzer (and the oldest one I've worked with is > 40 years old) for which 5 MHz would be a high frequency. So, I think you might be thinking of a very specific device that you forget to mention? Jan 9, 2021 at 21:58
• If a signal is changing by 40 dB every 10 ns then it is not a 5 MHz signal. Jan 9, 2021 at 22:40
• “RF mixer magic” was my way of skipping over a part I didn’t deem relevant, but maybe it is. I understand that SAs use like a tunable LO to sweep the frequency spectra of the incoming signal and then upmix and downmix it to a fixed BPF who’s frequency is around something usable for a an ADC. I was looking at the Keysight white paper AN150. I don’t understand how that process works for a signal who’s frequency spectra is constantly changing faster than the ADC used in the SA. Do you have to like put the output through another SA? Maybe I don’t understand something more fundamental. Jan 9, 2021 at 22:43
• @MarcusMüller I dunno -- I think it's a reasonable description. Most spectrum analyzer block diagrams that I've seen look pretty much like superheterodyne receivers up to the end of the IF chain, except with a swept LO, selectable IF filters, and detectors that are considerably different from a "regular" radio. Jan 9, 2021 at 22:56
• Analog Devices article on Oversampling and Undersampling ADCs Jan 10, 2021 at 0:06

If the signal is changing faster than the bandwidth of the bandpass filter, then the following circuitry won't see the effect as the signal changing -- they'll see the effect in the frequency domain.

For instance, if the signal is changing between 5MHz and 4MHz, randomly every 500ns, but staying phase coherent (meaning that there's no time-domain jump discontinuities in the signal), then the signal is MSK modulated, and when you look at it with a spectrum analyzer that's set up correctly, you'll see a classic MSK spectrum like this one from Wikimedia Commons.

In this case "properly set up" would mean that you want an IF bandwidth that is much less than the modulation rate (i.e., less than 200kHz), and a sweep rate that's low enough that the filter bandwidth doesn't distort the signal (although you don't have to worry about that anymore -- a spectrum analyzer with a computer in it won't let you make that mistake).

In the case of your signal at 5MHz that's being "switched between 10dB and 50dB every 20ns", you reformulate that statement to say that the signal is being chopped at 25MHz. In that case what a properly set up spectrum analyzer would show you peaks at 5MHz, 20MHz, 30MHz, then 70MHz & 80MHz, then 120MHz & 130MHz, repeating every 50MHz. -- basically you'd see peaks at $$\(25\mathrm{MHz})(2n - 1) \pm 5\mathrm{MHz}\$$ for all $$\n \in \mathbb{I}\$$.

Google "frequency mixing", "mixer" or "heterodyning" for more details. The hand-wavy answer is that when you multiply two sine waves together in the time domain, in the frequency domain you get signals at the sum and difference of their frequencies -- so a 5MHz sine wave multiplied by 25MHz gives you tones at 20MHz and 30MHz. A 25MHz square wave can be decomposed into sine waves at 25MHz, 75MHz, 125MHz, etc. -- so you get this sine wave multiplication effect at all of those frequencies.

A more comprehensive answer has to do with the properties of the Fourier transform (a spectrum analyzer is basically an analog computer dedicated to finding the Fourier transform of its input -- sorta kinda). I can't really go into that here, but if you're interested in this stuff you probably want to pick up a book on signal processing and start studying.

• “No time domain jumps” By that do you mean jump discontinuities in the signal? Jan 10, 2021 at 5:33
• Also could you elaborate on why in the case of the 5MHz signal that's being switched between 10dB and 50dB every 20ns would end up showing peaks on the SA at 5MHz, 20MHz, 30MHz, 45MHz, etc.? From my understanding of Fourier analysis that the signal should just be jumping up and down at that frequency. I am not familiar with signal frequency chopping and could be missing something in my understanding of Fourier spectral analysis. Jan 10, 2021 at 6:01

It all starts with an understanding of bandwidth. Technically, the bandwidth of a pure AC carrier is zero. The carrier could be 2 GHz, but if it is not modulated, then the bandwidth is still zero.

A signal starts to have bandwidth when the carrier is modulated. AM signals do not have zero bandwidth even though the frequency of the carrier is constant, because amplitude modulation increases the frequency content (bandwidth) of the signal. A simple rule is this: Any signal which is not a pure sinusoid (or DC) has bandwidth.

Many of the signals you described have much higher bandwidth than you realize because of the modulation.

It is kind of complicated to estimate the bandwidth of a modulated signal, and it depends on many details. So I am not going to go into it. But just kind of generally you should think of the carrier frequency as being much much higher than the modulation frequency. Your examples flaunt that idea.

Anyway if you know the bandwidth of a signal, then you know the minimum sample rate that is required to capture it without aliasing. If you have a 1MHz bandwidth signal which spans from 2 GHz to 2.001 GHz, you can use RF magic (down conversion mixers) to shift the signal down so that it runs from DC to 1 MHz. Then you can sample it with > 2 MHz sample rate.

I would say the main error in your thinking is not understanding the effect of modulation on signal bandwidth.

One last thing. In many cases, modulation may lead to a situation where frequency content extends to infinitely high frequencies with vanishingly small amplitudes. Bandwidth usually is defined to be the frequency range necessary to capture most of the signal energy, but not all of it.