-
Notifications
You must be signed in to change notification settings - Fork 119
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
Always similar graph output? Center freq. spike? #94
Comments
@nocarryr yeah I've seen that issue but is there anything that I can do? (Programmatically) |
There are algorithms you can implement to estimate the error and then compensate. Not sure if Python implementations exist anywhere. |
https://gist.github.com/itdaniher/7ac96d5e6f477b3d0e4bb03f6df466dd I don't have source for this excerpt, but had it saved in my "interesting bits of SDR code" folder. Might be of use here. see also: https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms1-ebz/iq_correction |
@itdaniher that gist is quite interesting! I'll have to find some time to study it. I wonder though, because of this: # scale Q to have unit amplitude (remember we're assuming a single input tone) Is the input assumed to be mostly periodic? If the input were uncorrelated noise, would the result still be reasonable, at least for spectral estimation? (I really regret not getting a college education) |
There's also "a stochastic solver to optimize frequency dependent amplitude and phase imbalance" |
Wow, looks very adaptive. I wonder how the |
@nocarryr I wouldn't fret about the college edu - learned less relevant stuff from my ECE professors than I did from ie) https://dspguide.com/ / wikipedia. I would like to think it works with uncorrelated / whitenoise, but I'm not willing to speak authoritatively as of yet. Fundamentally you're just trying to solve for the... 2x2 offset/rotation matrix - also expressible as phase/amplitude error. It varies at least a little bit with regards to time, temperature, frequency, etc (all the things ADCs can vary with, and then some!), which is maybe / probably why some folks use iterative approaches. two pdfs to call out
|
Thanks! I'll add those to my library give them a read |
Thanks for the awesome gist and explanatory sources. But I'm wondering, do you have the same "IQ balancer" implementation in C? Later I might change my mind from Python to C. If you don't have it or don't know any sources, I will rewrite :) |
I imagine it would be fairly straightforward to create a wrapper for airspy so that you can use it in python. There are a few approaches
|
@KeyLo99 I don't have any closed-form implementations of IQ balancing in C handy, definitely easier to do with numpy IMHO. |
@itdaniher I have to implement IQ Correction algorithm in C because I'm using librtlsdr [C]. Another reason is I didn't find any good C implementation except the non-documented and complex ones. So I want to write a clean and simple code that handles IQ Correction and other stuff. |
@KeyLo99 found it the source at https://www.reddit.com/r/RTLSDR/comments/uje3q/sample_python_code_and_results_for_iq_correction/ I don't think "clean and simple" + "DSP in C" is a semantically valid construct.... liquid-dsp might save you some pain, but that's not likely to result in an implementation that could be upstreamed into librtlsdr. |
Knew that code looked familiar 😂 |
Hahaha, I didn't notice that at first @roger- |
Okay, I kinda solved the problem with playing with the antenna and cables, changing the receiver position. Central peak disappeared but it looks like I/Q data that I get from device still needs some fixing and balance. I will try to apply any filter/algorithm to my raw I/Q and FFT [out] data to fix this imbalance issue. I'm open to your suggestions :) |
time-average that some, but it looks okay to me! Seems like you're seeing the 200KHz BW WBFM signal around... 99.9FM? |
Yeah looks like so... |
Please do! |
Alright, there you go: https://github.com/KeyLo99/rtl_map Waiting for feedbacks :) |
I'm trying to implement FFT and plot samples that I get from RTL-SDR device. But I'm always getting the similar output and a spike at the center of the graph even though I change the center frequency.
The code that I'm using is test.py which is provided at this repository. Is this problem related to my device?
The text was updated successfully, but these errors were encountered: