This will try to be a program to correct the effects of the frequency response of a scope in the signal. The main idea is that it should correct the amplitude attenuation and the phase shifts of each frequency in the frequency domain and reconstruct a more correct and real representation of the signal in the time domain.
The majority of the scopes don't have a flat amplitude response, it is an increasing amplitude attenuation with frequency, but each frontend design as it's own curve.
There is also a phase-shift that increases with the increase in frequency. Both are not linear, they are not a simple graph with a straight line.
Don't forget that any signal like for example a slow wave of a person talking wiggling up and down (in the time domain Voltage vs time) can be decomposed into the many sinusoidal functions of different amplitudes, that if summed up at a synchronized instant (time) can recreate the original signal wiggling up and down.
Remember the case of a square wave that is made of the fundamental sinusoidal wave frequency and of greater odd harmonics at higher frequency. But the same general principal of decomposition into sinusoidals is true for any form or shape of signal.
The FFT (Fast Fourier Transform) can separate a time domain signal (Voltage vs time) into a frequency domain signal (amplitude vs frequency and phase vs frequency at the bin central frequencies).
If with a PC program connected to the scope you grab the buffer from the scope, then you can process it on the PC and recreate a more correct (more truth to the real) signal that the sampled signal by the scope, because it will inverting the transfer function of the analog system made by the combined effect of the band limited probe or coaxial cable, analog low noise amplifier anti-aliasing filter and the ADC characteristics.
The bandwidth frequency of a scope ex: 100 MHz (where the signal as a -3dB attenuation), isn't a brick wall, it starts affecting the scope precision well before it's specified value of -3 dB (that's the -3dB point for a 1 Volt real signal that means you will see on the scope only a 0.707 Volts signal if you inject a pure sinusoidal signal). The effects are bigger as you go over the frequency of ex: 100 MHz -3 dB limit and go all the way to the limit were you cannot see the signal because of even greater attenuation ex: 400MHz to 500 MHz for a 1 G sample scope. But you can possibly correct for a 100 MHz scope example in the interval of 0Hz to 400MHz. So the analog frequency response isn't a brick wall (not a step down) at the scope bandwidth limit, but a slow increasing attenuation and phase-shift curve, that deteriorates the signal. Something close related to a low pass filter in terms of amplitude attenuation and phase-shift.
There are differences between channels of the same scope and naturally between scopes of the same brand, but they are much smaller then between amplitude and phase corrected (complex equalized) and a not corrected one.
For example in an entry level 100 MHz scope from many manufactures, one can see signals even at higher frequencies like 300 MHz or 400 MHz, and because normally they have a 1 Giga Sample / second ADC the Nyquist theoretical frequency limit is the 500 MHz.
The actual limit that you stop to see signal depend of the combination of the signal original amplitude, it depending on the probe bandwidth, on the scope low noise amplifier, on the band limit filter / anti-aliasing filter and the ADC analog characteristics.
But all this can be measured and corrected for.
This is called FDE - Frequency Domain Equalization and is used for example in MIMO WIFI Routers, in SC-FDE (single carrier FDE), in 5G (for equalizing the effects of multi-path reflections), and I think that in OFDM systems.
A continues time varying signal (wiggling voltage) is sampled by the ADC into a discreet buffer of samples equally distant time between them.
1 - This buffer can be obtained by a PC program at least for Siglent, Rigol, Hantek and many others (for example with the lib PyVisa).
2 - You can make a FFT (ex: Python) of the signal buffer (sequence of real values in the time domain) and obtain the sequence of complex values (in the frequency domain. Normally one uses a window applied to the signal ex: Hanning to change same proprieties of the mapping of from the frequency domain, fatter with vs amplitude vs leakage of other bins, and for removing the discontinuities of the start and finish signal.
3 - In the frequency domain, you will have each bin with a central frequency and it has a direct method of calculating the corresponding amplitude and the phase for that frequency bin. You can directly make the correction to the amplitude and the phase for each central frequency of each bin. it's a little more complicated for the case that you have a frequency component of the signal in between the FFT bins. The simple approach will generate some error that can be quantified. But that can be mitigated by one of two options, first by having more bins (bigger buffer ex: 1 Meg to 200 Meg), by having zero padding and by choosing a different window function and the second option by making the numerical mapping between the FFT output buffer and measured amplitude attenuation and phase-shift interpolated values for frequencies in ex: 50 MHz increments (ex: for a 1 GHz Nyquist limit) to the input buffer of a signal reconstruction IFFT (inverse FFT). Using a learned function mapping with a Machine Learning method, like for example a Neural Network. The training and test data can be easily automatically generated and it can be designed to be valid for all frequency bin with any valid used range of amplitude attenuation and phase-shifting. This mapping would only have to be done once for each profile and used for the normal measurements and for each type, Prob_A 100 MHz, Probe_B 200MHz, Coaxial cable and others.
4 - The IFFT (the inverse FFT is applied) and the time domain corrected (complex equalized) signal is reconstructed.
5 - The signal is shown on the PC.
6 - The signal is sent to the REF_A of the scope, via LAN or USB, for comparison against other signals.
For this to happen one needs a way to measure the amplitude attenuation of the scope with a good signal generator like for example a Marconi with an error much lower than the +-3dB. This should be made by a kind soul that would share it in the forum.
One also needs to measure the phase-shift with something like the moded cheap PlutoSDR that can generate signals from 46 MHz up to 1 GHz. The phase shift is calculated between the average off all samples on all it's internal buffer. So, even if it starts coming with a 25 ppm clock an is moded to an 0.5 ppm clock, because the method of detecting the phase-shift (explained in the version 3 post that follows somewhere below) uses the phase shift of the two distant bin centered tones over all the buffer samples. The error is averaged out by the plus and minus change in the error, giving a much more exact value of phase shift. By calculating that after the FFT she gives that averaging to us for free.
Both this methods can be made for a scope, call it a general or a specific calibration and used for any scope owner with the program.
In the process you can also calibrate the amplitude of PlutoSDR, with the frequency, after calibrating the scope.
I will try to make the
open source program generic so that anyone can apply the calibration for any scope, but I will try to do this for the two scopes that I have the 100MHz entry level
Rigol DS1104Z (maybe 0 Hz to 300 MHz or 400 MHz) and the
Siglent SDS2104X Plus (0 Hz up to 950 Mhz). And maybe, for a friends
Rigol DS1052E (50 MHz), a friends
Siglent SDS1104X-E 100MHz and other friends
Hantek 100 MHz.
Any signal can be affected by this way that the scopes work, it can exist on any signal that is acquired that is apparently a slow signal but that as high frequency content (not only single tone high frequency signals or square waves, steps, or fast impulses), it will be attenuated in same parts and phase shifted in other parts, or more rounded, I give a small example in a scope image in the following posts.
The following are posts were I started thinking about this, from the "Siglent SDS2104X Plus" thread that I moved to this thread.
https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-coming/msg3090482/#msg3090482Note 1: This is nothing new and is a simple idea that I don't understand why the manufacturers don't do on their entry level scopes. I think that some high end scopes do this inside them in hardware.
Note 2: I created this new thread on recommendation of senior members of the forum.
Thank you.
Best regards,
João Carvalho