Closed bigalnz closed 2 months ago
@bigalnz it is definitely possible to add a Python wrapper around VOLK. I suggest to use the same library that GR uses: pybind11.
I assume you refer to center frequencies from 160.12MHz to 161.11MHz, i.e. 1MHz of bandwidth with 100 channels.
Looking at your example code, I assume your implementation works as follows:
First off, I assume this is only example code and all the taps generation etc. is done once during initialization and re-used. Thus, the only line of code that you need to execute repeatedly is:
y = signal.convolve(y, h, 'same') <--- ouch!
You probably want to go the polyphase filterbank channelizer route here: https://wiki.gnuradio.org/index.php/Polyphase_Channelizer
Further, you probably want to apply some downsampling. This will reduce your computational burden significantly. Since you're using scipy.signal
, smth like https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.resample_poly.html might come in handy.
fred harris is well known for his multirate work. Googling yielded https://s3.amazonaws.com/embeddedrelated/user/124841/fbmc_book_ch_6_text_5_61615.pdf
The theory on multirate systems is a bit broader than just the polyphase filter. You might stumble across name spelling oddities in the GR codebase, like fred hARRIS
. This is intentional.
Another reference: https://www.dsprelated.com/thread/7758/understanding-the-concept-of-polyphase-filters
To summarize my comments:
Closing this issue. I suppose all the questions are resolved.
I am looking at the possibility of using VOLK with my Python wildlife tracker project - and hope one of the contributing team might be able to help a little.
The project involved counting CW beeps on frequencies starting at 160.120Mhz and going in 10khz channel spacings up to 161.110Mhz.
My hardware is a AirspyHF+ with python code runs on a RPi5 can only process about 6 channels at once due to my scipy.firwin and about 501 taps consuming a lot of processing power.
I wonder if VOLK could be used with ctypes to be more efficient - despite the overhead of ctypes.