Martin, thanks for responding. See my follow ups below: --- On Thu, 1/13/11, Marcus D. Leech <mle...@ripnet.com> wrote:
> From: Marcus D. Leech <mle...@ripnet.com> > Subject: Re: [Discuss-gnuradio] grc amplitude demodulation questions > To: discuss-gnuradio@gnu.org > Date: Thursday, January 13, 2011, 4:26 PM > > Hello- > > > > I am using GRC 3.3 to create a flow graph using the > USRP2 and a LFRX to do amplitude demodulation. I have > a few questions. > > > > 1) What are good values for "Audio Pass" and "Audio > Stop" within the "AM Demod" block? > > > > 2) I observe a DC offset at the output of the > demodulation. Is this expected, and what is the best > way to remove it? I am currently using a high-pass > filter. My incoming signal is a 27 kHz sine modulated > at 1 kHz. > There will always be a certain amount of DC offset in an AM > demodulator, since it's just a power detector, and since the > RF chain always > produces at least *some* noise, the detected version > of that noise results in a small residual DC offset. You can > null it out with an > an "ADD" block. I've tried an ADD block, but I noticed that if my decimation is not a power of 2, the offset changes. > > > 3) I am sending the result to an FFT sink. I > instituted a variable slider to control the decimation > within the AM Demod block, but when I change that > decimation, the displayed fft trace does not adjust > correctly to the new sample rate. In fact, the fft > trace remains in a fixed position; the only thing that > changes in the plot is the x-axis, ie frequency. I > have a second slider for the usrp2 decimation which does > change the displayed spectrum correctly, so that the peaks > move to the correct position. Any thoughts? > The FFT sink isn't psychic. It needs to be told what > the current sample rate is, so if you change decimation on > the fly, you'll need to > arrange for the FFT sink to know about the new > sample rate. I believe the code is already doing this. Here are code segments for 2 fft guis. The first shows the fft of the raw output of the USRP2. This gui responds correctly. Notice the line: "sample_rate=100e6/usrp2_decim", so I assume that as I dynamically adjust usrp2_decim, this value is being updated. However, with the second fft, while there is a similar line: "sample_rate=100e6/usrp2_decim/sw_decim" that includes the software decimation value, this fft gui does not correct the position of the fft when I dynamically change sw_decim. The x-axis DOES change, but the peaks in the spectrum just stay fixed in their relative positions. Any thoughts? 1st FFT: self.wxgui_fftsink2_0 = fftsink2.fft_sink_c( self.notebook_0.GetPage(1).GetWin(), baseband_freq=0, y_per_div=20, y_divs=10, ref_level=10, ref_scale=2.0, sample_rate=100e6/usrp2_decim, fft_size=1024, fft_rate=10, average=False, avg_alpha=None, title="Total Signal FFT", peak_hold=False, ) 2nd FFT: self.wxgui_fftsink2_1 = fftsink2.fft_sink_f( self.notebook_0.GetPage(3).GetWin(), baseband_freq=0, y_per_div=20, y_divs=10, ref_level=10, ref_scale=2.0, sample_rate=100e6/usrp2_decim/sw_decim, fft_size=1024, fft_rate=10, average=False, avg_alpha=None, title="Demodulated FFT Plot", peak_hold=False, > > > -- Marcus Leech > Principal Investigator > Shirleys Bay Radio Astronomy Consortium > http://www.sbrac.org > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio