AD-Vega / rtl-power-fftw

Power spectrum for RTLSDR dongles.
GNU General Public License v3.0
157 stars 38 forks source link

Create baseline #28

Open mfalkvidd opened 1 year ago

mfalkvidd commented 1 year ago

Hi.

Is there any documentation on how to create a baseline (to use with --baseline)? Maybe it could be added to https://github.com/AD-Vega/rtl-power-fftw/blob/master/doc/rtl_power_fftw.1.md#baseline-and-window-function-data ?

I am not sure, but I think the process would be something like this:

  1. Connect a 50 ohm terminator to the RTLSDR.
  2. Run rtl_power_fftw with the same parameters (gain and number of bins) you expect to run for the real measurement, but without the full measurement length. Example: rtl_power_fftw -f 144100000:146100000 -g 350 -m baseline. Wait for the baseline measurement to complete.
  3. Disconnect the 50 ohm terminator and connect the antenna instead.
  4. Now run the real measurement: rtl_power_fftw -f 144100000:146100000 -g 350 -e 5m --baseline baseline.bin - myscanfilename
alajovic commented 1 year ago

The notion of a "baseline" depends on the context. If the aim is to correct for the nonlinear frequency response of the receiver, then the method you have described seems sensible. But there are also other ways to use the baseline feature.

For example, to measure the frequency response of a passive network (filter), you could first attach a wide-band noise source to the receiver and acquire the baseline measurement, then insert the passive network between the source and the receiver, and measure again using the basline recorded in the previous step. Such a procedure cancels out any inherent frequency responses of the source and the receiver, and leaves you with the pure characteristic of the network under test.

Then there is again a different example use-case in radioastronomy. In a radiotelescope, you typically want to normalize the measurements with the frequency response of not only the receiver, but the entire receiving chain. In such a case, you cannot simply connect a termination to the input, as this would eliminate one significant component – the antenna feed! We have measured the baseline of such a system by pointing the radio telescope at a very "dark" (radio-wise) part of the sky where the emissions are expected to be relatively flat.

As you can see, there are many – quite disparate – ways to use the baseline correction, so there is no single "right" one. We as the authors of the software are only providing the tool, and we are relying on the users to know how to use it for their own purpose.

mfalkvidd commented 1 year ago

Excellent, thanks for explaining! This is exactly the type of information that could be useful in at https://github.com/AD-Vega/rtl-power-fftw/blob/master/doc/rtl_power_fftw.1.md#baseline-and-window-function-data