[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] AGC
From: |
Johnathan Corgan |
Subject: |
Re: [Discuss-gnuradio] AGC |
Date: |
Thu, 01 Jun 2006 13:39:54 -0700 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060522) |
Matt Ettus wrote:
> I don't have the agc code in front of me, but the definition
> of the setpoint in important. Assuming you make the setpoint 1,
> and that the agc is setting the average (of either I or Q) to
> the setpoint, the amplitude will go from 0 to 2, since this is AM.
> You will need to subtract 1 so that you get a signal of +/- 1 for
> the audio sink.
>From gri_agc_cc.h:
gr_complex scale (gr_complex input){
gr_complex output = input * _gain;
_gain += (_reference -
sqrt(output.real()*output.real()+output.imag()*output.imag())) * _rate;
}
or _gain += reference - |output| * _rate
This looks like then that _gain would asymptotically approach a point
where the RMS output value (not average value) would equal the reference
value.
Is that the case? My brain can't seem to wrap around simple concepts today.
Time to learn gr.wxgui and scopesink ...
-Johnathan