[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] FIR filter in fsk_tx.py
From: |
Matt Ettus |
Subject: |
Re: [Discuss-gnuradio] FIR filter in fsk_tx.py |
Date: |
Fri, 08 Jul 2005 20:47:30 -0700 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
Sachi wrote:
> Hi, Matt
>
> Thanks so much, your reply is so helpful. Now I think
> I can understand the FSK code well. However, I still
> have some confusions. Hope you or Eric could help me
> solve them.
>
> 1. In gr_simple_correlator.cc, you calculate the
> hamming distance, using
> hamming_dist = gr_count_bits32 (d_shift_reg[d_osi] ^
> GRSF_SYNC);
> Why you choose the threshold as 3? Do you choose it
> from your experiments? If I understand correctly,
> there should be several "osi" when the hamming
> distance is less than 3 and we pick up the center one.
I'm not sure what "osi" is. The threshold is a compromise between false
positives (i.e. we correlate when nothing is actually there), and false
negatives (i.e. we miss real packets). 3 was chosen somewhat arbitrarily.
> 2. In fsk_rx.py, you use:
> u.set_rx_freq (0, -options.cordic_freq)
> Why a negative IF frequency is used here? What happens
> if I use the positive one?
Negative means translate the frequencies lower. So a signal centered at
cordic_freq and then translated by -cordic_freq ends up at DC. If you
had used +cordic_freq, you would have translated whatever is at
-cordic_freq to DC. If you are using a dboard with real sampling, then
this would be a frequency-inverted version of your signal, and ones
would be swapped for zeros and vice versa. If you were using a dboard
with IQ sampling, then your image would be there. You would see a much
weaker spectrum reversed version of your own signal, plus any
interferers at your image frequency.
> 3. In fsk_tx.py, the +1, -1 sequence is interpolated
> by 8 and then processed using a lowpass filter. Why do
> we have to do this in software? Can we directly send
> the +1 -1 sequence to the FM modulator? What's the
> difference?
The lowpass filter gives a cleaner signal, which otherwise would extend
very wide.
> Does it have anything to do with the
> receiving side? If so, why we have to interpolate it
> using FIR lowpass filter? Can we duplicate each +1 or
> -1 8 times? i.e.
> 1 -1 1 1 -1 becomes
> 11111111-1-1-1-1-1-1-1-1111111111111111-1-1-1-1-1-1-1-1
You could do that. That would be the equivalent of filtering with a
boxcar or sinc filter. It would give relatively poor filtering of out
of band interference (about -18dB), but better than nothing.
Matt