If the cause of phantom harmonics is a low samplerate
We're not seeing "phantom harmonics", but aliasing. The test case you're looking at is much too complex to see this easily though.
A better example is to set a sine wave to a frequency near e.g. slightly below 1/3 of the sample rate, and tune the frequency up until slightly above 1/3 of the sample rate.
For example:
fft stop frequency 2.4MHz has the RTB choose a sample rate f_sample=6.25MSa/s. Let's look at signals around f_signal=f_sample/3=2.0833MHz. I attach a sequence of screenshots with a sine wave of f_signal=2.077MHz, 2.080MHz, 2.083MHz, 2.086MHz 2.089MHz. You can see how the aliasing artefacts move in and then out again around f_sample/3. In the time domain you can also see the aliasing very clearly as beating.
When you chose a more complex waveform, the harmonics of the wave have the same aliasing, at the same absolute frequency differences, but this results in different relative frequency differences. The result is a nice comb of the harmonics folded down around our base frequency:
I'm not quite certain yet why we see aliasing for a band-limited waveform entirely below the Nyquist frequency (f_Nyquist=3.125MHz and f_signal=2.089MHz in our example), when we place the signal frequency close to an integer fraction of the sampling frequency. Has been some time since I ran the math myself or played around in octave, I have to admit...
Is this fundamental? Due to finite record lengths (but windowing doesn't really improve it)? Are we effectively downsampling somewhere? Some weird harmonics creating signal components above f_Nyquist? I have to think a bit more about it, but if somebody can already see the solution, let us know :-)
What's clear is that f_sample of 6.25MSa/s is less than ideal for signals around 2MHz. Just to give a gut-feeling, here is the situation in time domain, without interpolation:
I think it's pretty obvious this samplerate is not the best basis for a good analysis...
The question now is, why is the samplerate so low?
On RTB2000 you cannot control the samplerate in FFT mode. Scope chooses samplerate himself depending on the center frequency, span and RBW settings.
If the cause of phantom harmonics is a low samplerate, then the scope is choosing it incorrectly for current span/RBW and this is an error in any case.
No. You are analysing a signal with the wrong settings. The samplerate is sufficient to fulfill the Nyquist criteria for the FFT settings.
@Nico, you're right, the samplerate is sufficient to fulfil Nyquist at the FFT settings. But we still clearly see aliasing.
And max is right as well: the RTB2k does not give the option to choose a different sample rate. Actually, this is infuriating:
The sample rate is chosen automatically to sit a step or two above Nyquist for the chosen stop frequency. Even without this weird aliasing, there are situations where you
know you have frequency components above the automatically chosen Nyquist, but you're zooming the FFT to look at a lower frequency component. You
cannot avoid downconverting some stuff into your lower-freq fft band of interest in that scenario!
Unless I just missed how to set the sample-rate. @Nico: how does this work in the RTM?