Help on xlating frequency

Hi All,

i tried out to delete some antialiasing and the middle signal
of the FFT-Plot. Therefor i use this filter:

VARIABLE

#At adc_rate=64MS/s and decim=64 we get an usrp_rate of 1 MS/s
self.decim=64
self.usrp_rate=1e6

FILTER

self.firdes_filt_coeffs = gr.firdes.low_pass(1,
self.usrp_rate,
self.usrp_rate0.5,
self.usrp_rate
0.001,
gr.firdes.WIN_RECTANGULAR)
self.chan_filt = gr.freq_xlating_fir_filter_ccf (self.chanfilt_decim,
self.firdes_filt_coeffs,
self.usrp_freq,
self.usrp_rate)

SOURCE

As source i use:
self.usrp_source = usrp.source_c(which=0, decim_rate=self.decim)

SINNK

And as sink i use an FFT-sink-Plot:
self.wxgui_fftsink2 = fftsink2.fft_sink_c(
self.GetWin(),
baseband_freq = self.usrp_freq,
y_per_div = 10,
y_divs = 8,
ref_level = 0,
sample_rate = self.usrp_rate,
fft_size = 512*2,
fft_rate = 30,
ref_scale=11885000.0,# 11885000.0 oder 32768.0 ?
average = True,
avg_alpha = None,
title = “FFT Plot”,
size=(1024, 600),
peak_hold = False,
)

CONNECT

Then i connect this all together:
self.connect((self.usrp_source, 0), (self.chan_filt, 0))
self.connect((self.chan_filt, 0), (self.wxgui_fftsink2, 0))

But the antialiasing still exist and the middle signal of the FFT-Plot
too. There comes the next problem, that my spectrum in the
FFT-Plot will be shifted.

Can i use the usrp_rate in the source as well as for the xlating element
?
Or do i have to use another decimation value ?
Which rate must i use for the FFT-Plot ?
Why is the low cut off frequency limited to usrp_rate/2 ?
From which point starts the low cut-off frequency and to
which direction ?
Why must i use the transition width>0 by the WIN_RECTANGULAR ?
How can the shifting of the spectrum in my FFT-Plot corrected ?
Any Hints ?

Regards Markus

See ‘usrp_am_mw_rcv.py’ for an example. Look for the code relating to
these
lines in particular:

    if self.use_IF:
      # Turn If to baseband and filter.
      self.chan_filt = gr.freq_xlating_fir_filter_ccf 

(chanfilt_decim,
chan_filt_coeffs, self.IF_freq, usrp_rate)

Paul M.

Paul M. schrieb:

See ‘usrp_am_mw_rcv.py’ for an example. Look for the code relating to these
lines in particular:

    if self.use_IF:
      # Turn If to baseband and filter.
      self.chan_filt = gr.freq_xlating_fir_filter_ccf (chanfilt_decim,

chan_filt_coeffs, self.IF_freq, usrp_rate)
hI pAUL,

i used this example as possible as i can, but this
frequency translating filter has one important difference
to my application, the FFT-Plot-sink which is connected to this
xlating filter is staticly.
I have a slider to change my baseband to the wished spectrum, so
my xlating filter it is dynamically.

I still doesn’t know whether to use a low_pass is usefull
or a band_pass. The low_pass doesn’t delete the middle
signal in the FFT-Plot in my tryings.

Further on i doesn’t know which conditions have to be made to
let my application work fluidly ?
Which decimation ?
Which rate is useful ? Should it use the same rate, than
the element before ?
Which is the centerpoint from which the low_pass_cutoff
and the high_pass_cutoff frequency will be counted ?
I tried it out, but still doesn’t know how it works.

Regards Markus

Paul M. schrieb:

See ‘usrp_am_mw_rcv.py’ for an example. Look for the code relating to these
lines in particular:

    if self.use_IF:
      # Turn If to baseband and filter.
      self.chan_filt = gr.freq_xlating_fir_filter_ccf (chanfilt_decim,

chan_filt_coeffs, self.IF_freq, usrp_rate)
hI pAUL,

i used this example as possible as i can, but this
frequency translating filter has one important difference
to my application, the FFT-Plot-sink which is connected to this
xlating filter is staticly.
I have a slider to change my baseband to the wished spectrum, so
my xlating filter it is dynamically.

I still doesn’t know whether to use a low_pass is usefull
or a band_pass. The low_pass doesn’t delete the middle
signal in the FFT-Plot in my tryings.

Further on i doesn’t know which conditions have to be made to
let my application work fluidly ?
Which decimation ?
Which rate is useful ? Should it use the same rate, than
the element before ?
Which is the centerpoint from which the low_pass_cutoff
and the high_pass_cutoff frequency will be counted ?
I tried it out, but still doesn’t know how it works.

Regards Markus

As in the example, a common practice is to signal process like this:

USRP tuning w/ hardware decimation --> freq translating channel filter
–>
demodulator --> additional filtering

AFAIK, you haven’t told us what sort of signal you’re trying to receive,
so
it’s not possible to recommend specific values for anything.
Here’s the flowgraph backbone that I use for 900 MHz ASK signals with
important modulation products in the low kHz range (adapted from
‘usrp_am_mw_rcv.py’):

    ################# Build main flowgraph ##################

    self.u = usrp.source_c()                    # usrp is data 

source

    adc_rate = self.u.adc_rate()                # 64 MS/s
    usrp_decim = 64
    self.u.set_decim_rate(usrp_decim)
    usrp_rate = adc_rate / usrp_decim           # 1000 kS/s
    chanfilt_decim = 32
    demod_rate = usrp_rate / chanfilt_decim     # 32 kHz
    audio_decimation = 1
    audio_rate = demod_rate / audio_decimation  # 32 kHz

    chan_filt_coeffs = optfir.low_pass (1,          # gain
                                        usrp_rate,  # sampling rate
                                        10e3,       # passband 

cutoff
12e3, # stopband
cutoff
1.0, # passband
ripple
60) # attenuation

    self.chan_filt = gr.fir_filter_ccf (chanfilt_decim,

chan_filt_coeffs)
if self.use_IF:
# Turn IF to baseband and filter combo.
self.chan_filt = gr.freq_xlating_fir_filter_ccf
(chanfilt_decim,
chan_filt_coeffs, self.IF_freq,
usrp_rate)
else:
self.chan_filt = gr.fir_filter_ccf (chanfilt_decim,
chan_filt_coeffs)

    self.am_demod = gr.complex_to_mag()

    audio_filt_coeffs = gr.firdes.band_pass (1,     # gain
                                        demod_rate, # sampling rate
                                        4e3,        # low pass 

cutoff
10e3, # high pass
cutoff
1000) # transition
width
# WIN_HAMMING) # window type

    self.audio_filt = gr.fir_filter_fff(audio_decimation,

audio_filt_coeffs)

    # Wire it all together.
    self.connect (self.u, self.chan_filt, self.am_demod,
                  self.audio_filt)  #, self.volume_control, 

audio_sink)

I chose an IF value of 32 kHz, which puts the IF well above the signal
spectrum. Works for me.
Paul M.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs