Waveform after AM demodulation looks weird

Hi, you can find in attach AM demodulator grc file. Everything is
straight
forward with demod but audio file generated looks weird. Only positive
values of amplitude. In FFT i do see symmetric picture. I
enabled/disabled
DC offset option in osmosdr block, but it did not help.
Originally file is generated as raw audio and after processed with sox
(-t
raw -r 16k -b 16 -e signed-integer). I have also tried to use wav sink
block - the same result.

Find wav file in attach.

On Fri, Apr 25, 2014 at 04:14:30PM +0400, Anton K. wrote:

Hi, you can find in attach AM demodulator grc file. Everything is
straight forward with demod but audio file generated looks weird. Only
positive values of amplitude.

The particular definition of “amplitude” adopted by GNU Radio (and
pretty much everyone else in SDR as far as I know) is “absolute value”.
It is correct for it to always be positive.

But when we have only positive values that means in fact we have 0.5 DC
offset, and that is bad. Moreover i’ve made test recording with GQRX -
waveform is fine! Looking into the code, nothing special, am
demod->low-pass->wav-sink.


public PGP key

On Fri, Apr 25, 2014 at 05:25:54PM +0400, Anton K. wrote:

But when we have only positive values that means in fact we have 0.5
DC offset, and that is bad. Moreover i’ve made test recording with
GQRX - waveform is fine! Looking into the code, nothing special, am
demod->low-pass->wav-sink.

See “DC removal”:

https://github.com/csete/gqrx/blob/master/dsp/rx_demod_am.cpp#L54


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually I’m a little confused - Is seeing an AGC in an AM demodulator
something you usually do?
Especially the feedforward AGC should be rather err jumpy with a scope
of but 256 samples, unless I’m missing something; f_sample seems to be
1024ksps, thus 256 samples max search and rescaling should behave very
badly if there are baseband signal contents below 4kHz – and that
should be the case for audio, usually?

Greetings,
Marcus

On 25.04.2014 16:03, Marcus L. wrote:

– public PGP key pkey - Pastebin.com
The particular definition of “amplitude” adopted by GNU Radio (and

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
Discuss-gnuradio Info Page

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTWn5MAAoJEBQ6EdjyzlHtWSEIAKSNLkujZEL/lpmy/CBrK76+
144zh4QY9QkAd9jgYHE/lSp6oAP2EEIXI7xQw1AC+2c2c2+pcG92ydJs/2/pvEa3
zfyVUtSr5e8qByokifDCq1HeMFG4q5Uis/cNgWlQPBeWR5My6ngnE3xC4TmMhGO6
WCYFqyrf7dz+P/cXClRs9jIVv4HKPLCZky9qdmG/9rXFxovQt369boaXDdvtc6Ga
dnNswR2zXh63IH+ZWaARTiB61GJ/oPw/yh1jL9inVOFhioZstUFK0xS1ACxFZBiY
P1nHuixHkGXmIp6jp1QXo6H9QAqVZ5z/H4Tngd8EM+i+KsqxaJncvzGW7MVgaQA=
=XADd
-----END PGP SIGNATURE-----

Marcus, w/o AGC audio sometimes is creapy. I have tested AGC2, tried to
play with attack and decay, but at last when there is a plane in the
vicinity dongle overloads and sound become very loud. Then i tested FAGC
and it fits well! 1024M/64 gives 16k and 256 samples equals - 62 ms of
signal. Works ok for me.

Thanks a lot. It does work!


public PGP key

When I looked into the attached graphical flowgraph in the first email,
the
signal was multiplied by zero (constant multiplier) before feeding into
file sink and audio sink. In this case what you get was probably
amplified
noise.
Was it zero or something else?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A shoot, I overlooked the 64 decimation rate… Sorry about that.

On 25.04.2014 17:36, Anton K. wrote:

Actually I’m a little confused - Is seeing an AGC in an AM

An AM demodulator is a squaring function. It can only

The particular definition of “amplitude” adopted by GNU Radio
(and pretty much everyone else in SDR as far as I know) is
“absolute value”. It is correct for it to always be
positive.


_______________________________________________ Discuss-gnuradio

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
Discuss-gnuradio Info Page

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEbBAEBAgAGBQJTWoU1AAoJEBQ6EdjyzlHtQAYH+KNwTI+XPjKFyb+kId+Y9fxv
uthK+LH7CTAm85j9gb4mIeGe7Wpe2gZZ0sqvDgyXL594urUSvfbmyCy/p0GI7WfC
evmwyX4HBZIuXBdqIkj0NdhvwpaBHBYUE1R2JfVIK1ZqaApNtGVxoKpOyI38XCg1
m68tsU3HASfVQxIWfuJS0mBgwPo8wSCTXLOoUqc1YTVXd+tXNNAVLbFEDUOgVuib
irkUhUYdNi85SwO3ildun/9xEwXB3g4FeB3Hq66TccE5M7zvZsOBa4oF/uKITRoG
cvOc/EuBRCG+u1lI2owwQXsUuGWmHhN+xcjtkzn4Qa+2b+zR9bPPGS70ru45vQ==
=+L1B
-----END PGP SIGNATURE-----

This, is a squelch, variable changes between 0 and positive gain value.


public PGP key