Skip to content
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

Improved AGC logic. #54

Open
luigifcruz opened this issue Jan 8, 2024 · 1 comment
Open

Improved AGC logic. #54

luigifcruz opened this issue Jan 8, 2024 · 1 comment
Labels
dsp Digital signal processing is needed enhancement New feature or request help wanted Extra attention is needed

Comments

@luigifcruz
Copy link
Owner

The current implementation of the AGC is sub-optimal. New implementation should retain good parallelization characteristics and correctly implement averaging.

@luigifcruz luigifcruz added enhancement New feature or request help wanted Extra attention is needed dsp Digital signal processing is needed labels Jan 8, 2024
@Paulo-D2000
Copy link
Contributor

Paulo-D2000 commented Jan 10, 2024

I've had some good results using a simple control loop like:

T agc_work(T input,  float agc_target = 1.0f, float agc_gain = 1e-4f , float agc_max = 655635.0f) {
  T output = input * gain;
  float error = agc_target - std::abs(T); // absolute magnitude of signal
  gain += error * agc_gain;
  // Optional ? Gain limit...
  if(agc_max > 0.0f && gain > agc_max){
    gain = agc_max;
  }
  return output;
}

I have one AGC and some other blocks partially implemented on my other machine local repo... I could open one PR later and we can finish them... I'm on vacation and don't have acess to the machine right now :\

Some refs / implementations...

WirelessPi AGC
Gnuradio AGC F32
Gnuradio AGC CF32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dsp Digital signal processing is needed enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants