On 11/17/2013 11:01 AM, Robert James wrote: > I'm trying to demodulate AM (I know there are existing blocks to do > that, but I'd like to learn how to do it on my own). > > In a real world analog circuit, I would find the envelope by first > rectifying the signal (using a diode), and then using a low pass > filter - that would give me the envelope. > > How can I rectify with GNU Radio?
In GNU Radio, one is typically dealing with complex baseband I/Q signals, where a "real valued" passband signal has had its carrier shifted down to zero and what remains is the complex envelope represented by I and Q. There are many resources indexed by Google to help you learn more about this. To demodulate a passband AM signal represented at baseband, simply take the magnitude of the I/Q representation, i.e., sqrt(I^2 + Q^2). GNU Radio has a block to do this, gr::blocks::complex_to_mag, which you can also access in Python as blocks.complex_to_mag(), or from GRC under "Type Converters/Complex to Mag". It is a synchronous block that accepts a complex signal stream at an arbitrary sample rate and outputs the magnitude of that signal as a float stream at the same sample rate. Depending on what the original signal was that went into the AM modulator on the transmitter (such as audio like in AM broadcast radio), you may need to further process the signal in order to use it, such as removing DC offset, filtering, amplification, or changing the sampling rate. -- Johnathan Corgan, Corgan Labs SDR Training and Development Services http://corganlabs.com
<<attachment: johnathan.vcf>>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio