-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use KFR v6 for all ARCH #25
base: main
Are you sure you want to change the base?
Conversation
Hey, been testing this out. Everything compiles fine, but the actual decimation doesn't seem to work at least on ARM (RPi 4). When I tried increasing the decimation to 2, and FIR to 32, the output data appears to be -inf. And hence the spectrum and DOA pages don't work. Any ideas? |
@krakenrf It might not be related to KFR6. What I noticed during my testing is that after setting the same decimator parameters as you mentioned and clicking |
I did try refreshing and checking the VFO freq, but everything is fine there. Even if I restart the software from scratch with decimation set to 2 and FIR set to 30, it doesn't work. But the same parameters with NE10 do work. |
@krakenrf I also noticed somewhat unexpected behavior when Heimdall-side decimation is invoked, in particular, the |
That's expected, because when you decimate you're collecting less samples per second, to the maintain the same buffer size, the data block length increases. So the GUI is set to automatically show what the new length will be. |
Aha, that's a bit counterintuitive for me as I was expecting |
Yeah the CPI calculation should probably be set to maintain the block length when other parameters are changed. It's also most efficient to keep CPI a power of 2 as well, so maybe that should be restricted. Regarding DSP-side decimation, do you mean DAQ-side decimation instead? The DAQ side is handed by NE10/KFR and DSP-side handled in Python. I have noticed that Python scipy seems to be at least as efficient as these lower level decimation libraries. I can't remember the exact reason but Tamas did say there was a good reason to use these libraries for the DAQ side decimation. Maybe @petotamas can recall the reason we need to use NE10 and KFR instead of Python scipy for DAQ side decimation? |
Hi, As far as I remember, we did several test using a python implementation and at the end it came out that the C based implementation is faster. It was not just about the decimation but there were other circumstances.
In the early version this fir filtering and decimation processing was implemented in the delay_synchronizer module in python using the scipy, numpy and numba libraries but the type conversion was slow, and also (I am not sure about this but as far as I can recall), we didn't find a FIR implementation that would be optimized for decimation and would be able to calculate only those samples that will be kept after the decimation. |
I did eventually end up finding an efficient way to do decimation with Scipy which is how decimation is implemented on the DSP side. I suspect Scipy and KFR/NE10 have very similar processing speeds when decimation is implemented efficiently with Scipy, but the type conversion could still be an additional bottleneck. Probably should investigate if that is still the case or if we need to stick to C libraries. |
KFR made new version v6 and C API is supported in both Intel and ARM kfrlib/kfr#196 (comment)
I remember that on the forum we discussed that it would be good to get rid of NE10 and use a unified approach.