On Thu, Dec 9, 2021 at 9:01 AM Fabien PELLET <fpellet.f4...@free.fr> wrote:

> Maybe it could be a track to follow also... I read it very quickly.
>
> I go down to 1e-9 and there is no influence on the attack  behaviour.
>
> I try difference sampling rate (200e3 and 1e6 for output on a USRP) and it
> influences decay and attack as expected.
>
> I come back to AGC instead of AGC2 and the rate value has an influence on
> both attack and decay behaviour as expected.
>
> Hope this will help.
>
> If I would like to play on the code of AGC2, how can I recompile only this
> module and not all gnuradio ?
>
You could create your own OOT module, copy much of the code, and try new
algorithms there. There is no good way to recompile only one block.

> Le 09/12/2021 à 14:52, Jeff Long a écrit :
>
> Maybe "tmp" should be compared to 0, not to gain. It does look suspicious.
> Not sure what algorithm the author had in mind.
>
> On Thu, Dec 9, 2021 at 8:41 AM Fabien PELLET <fpellet.f4...@free.fr>
> wrote:
>
>> Maybe I'm wrong but at line 141, it should be a division and not a
>> difference ??? I'm telling that because in line 143, the result "tmp" is
>> compared to the gain. There is a unit problem here I think : amplitude
>> (result of the difference) can't be compared to a gain which do not have
>> unit by definition....
>>
>> I will try wider value for attack.
>> Le 09/12/2021 à 13:23, Jeff Long a écrit :
>>
>> The change in gain is also proportional to the difference between the
>> reference level and the signal level. So it probably is having some
>> influence but it reacts more quickly. Try a smaller value for attack. Take
>> a look at the source here
>>
>>
>> https://github.com/gnuradio/gnuradio/blob/35a242f1cd4b724be0c4708d8690f82c804aafd8/gr-analog/include/gnuradio/analog/agc2.h#L64
>>
>> for more info. It may just not be a great algorithm, or may not work for
>> the rates and changes in signal you have.
>>
>> On Thu, Dec 9, 2021 at 7:07 AM Fabien PELLET <fpellet.f4...@free.fr>
>> wrote:
>>
>>> Thanks for the explanation.
>>>
>>> Do you have any idea on why the attack as no influence ?
>>> Le 09/12/2021 à 12:58, Jeff Long a écrit :
>>>
>>> Attack and decay are unitless per-sample multipliers, so 1.0e-2 gives
>>> you a time "on the order of" 100 samples. It's really an exponential attack
>>> and decay, but that gives you an idea. So, your observation is correct - a
>>> smaller value gives you a longer attack/decay.
>>>
>>> On Thu, Dec 9, 2021 at 4:33 AM Fabien PELLET <fpellet.f4...@free.fr>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm trying to work with the module AGC2 but I have some trouble using
>>>> it.
>>>>
>>>> First problem is : what is the unit of the parameters attack and decay
>>>> ?
>>>> I thought initially that it was in second but after some test it is
>>>> clearly not in that unit. Indeed, if I increase the value of the decay
>>>> for example, the time of the increase of the gain at the end of a
>>>> signal
>>>> will go down where it should go up.
>>>>
>>>> Second problem (maybe in relation with the first) : the attack value
>>>> have absolutly no influence.... From 10-6 to 10-2, I can't see any
>>>> changes on the output signal.
>>>>
>>>> Does someone have any explanation ?
>>>>
>>>> Best regards,
>>>>
>>>> Fabien, F4CTZ.
>>>>
>>>>
>>>>

Reply via email to