Help needed to obtain AM Depth of Modulation

Status
Not open for further replies.

mattcooper

Member
Joined
May 10, 2017
Messages
5
Hi guys!

I am trying to calculate the Depth of Modulation of an AM signal using GNU Radio, but I just can't make it work.

To test, I am using a Rode & Schwarz SMB100M signal generator connected to a USB SDR receiver. The connection between them is via cable.

- In the signal generator, I'm using these settings.
- In GNU Radio, I'm using this diagram.

I know the diagram is wrong (it's illustrative only), but it's exactly here where I need you help. What I'm trying to achieve is to obtain in GNU Radio the same depth of modulation as the one set in the signal generator. For instance, if the generator is set to a depth of 56% (just like in the first image), I'd like to get that exact(ish) same number in a GNU Radio sink.

As you may have realised at this point, I'm not even near to be an expert in signal processing and I have not been able to find anything about this googling around.

Any help will be highly appreciated.
Thanks!
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
The AM demodulator converts complex to magnitude so the additional complex to magnitude stage seems unnecessary.

The AM demodulator has a decimation factor of 8 but the RTL source is 1 Msps so the sample rate out of the AM demodulator would be 125 khz, not 15.625 khz.

The additional band pass filter adds another decimation factor of 4 - but that yields 31.250 khz - not the 15.625 in your diagram.

Try this:

[RTL source] -> [Complex low pass decimating FIR] -> [AM demodulator] -> [optional low pass filter]
 

mattcooper

Member
Joined
May 10, 2017
Messages
5
Great!

I'll check that out and let you know how it goes.
Thanks for your explanation. I'm learning as I go, and answers like yours are the ones that truly help me.
 

majoco

Member
Joined
Dec 25, 2008
Messages
3,719
Location
New Zealand
Huh? The KISS principle. Display the received AM signal. Measure the amplitude of the carrier. Measure the amplitude of one sideband. Double the sideband amplitude. Divide the amplitude of the carrier by the amplitude of the doubled sideband. Multiply by 100. Done.
 

mattcooper

Member
Joined
May 10, 2017
Messages
5
That sounds very good! But I don't even know where tos start implementing that on GNU Radio.
Any ideas?

Sorry for my newbieness though

I've been doing some tests, and something strange is happening:

- If I set the generator at 50% modulation depth and I simply plot the source input, I get this result, which is different from the graph from Wikipedia; in my graph the peaks and valleys of the envelope at the top are not "synced" with the ones of the bottom envelope. Any ideas of why can this be happening?

- Also, if I convert the source from complex to magnitude, I get a strange waveform, but the peaks at the bottom envelope correspond inversely to the modulation depth set in the generator. For instance, if I set the depth to 30%, the peaks reach 0.7 in amplitude. If I set the depth to 80%, the peaks reach 0.2 in amplitude. This might be useful for me! Is there a way I can use this information as a number output to get the modulation depth ratio in real time?

Thanks for your help!
 
Last edited by a moderator:

slicerwizard

Member
Joined
Sep 19, 2002
Messages
6,784
Location
Toronto, Ontario
- If I set the generator at 50% modulation depth and I simply plot the source input, I get this result, which is different from the graph from Wikipedia; in my graph the peaks and valleys of the envelope at the top are not "synced" with the ones of the bottom envelope. Any ideas of why can this be happening?
I don't see any downsampling. Is it done automagically? If not, are you just plotting the raw 2 Msps I/Q stream? If so, you're not looking at 50 ms worth of signal. More like 390 microseconds (1/2560 sec)
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
If I set the generator at 50% modulation depth and I simply plot the source input, I get this result, which is different from the graph from Wikipedia; in my graph the peaks and valleys of the envelope at the top are not "synced" with the ones of the bottom envelope. Any ideas of why can this be happening?
The signal generator is too strong. Reduce the gain or attenuate the generator's output.
 

mattcooper

Member
Joined
May 10, 2017
Messages
5
I don't see any downsampling. Is it done automagically? If not, are you just plotting the raw 2 Msps I/Q stream? If so, you're not looking at 50 ms worth of signal. More like 390 microseconds (1/2560 sec)
The downsampling is being done by the graph block. It's samp_rate/decim (2M / 128).
 
Status
Not open for further replies.
Top