[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr.firdes_hilbert () usage
From: |
cswiger |
Subject: |
Re: [Discuss-gnuradio] gr.firdes_hilbert () usage |
Date: |
Wed, 24 Nov 2004 15:55:10 -0500 (EST) |
On Wed, 24 Nov 2004, Matt Ettus wrote:
>
>
> Feed a real signal to the hilbert filter to form the Q part of a complex
> signal.
> Feed a delayed version of the original signal to the I part. The delay
> should be equal to .5*(number of taps of the hilbert filter - 1)
>
Thanks Matt - Apologies if this is off topic theory but I do want to
implement a phasing ssb detector in gnuradio. I can see gr.firdes_hilbert
generated taps for gr.fir_filter_fff does create a 90deg phase shift
for all frequencies. However what I can't see is the theory part about
shifting positive frequencies by +90 and negative frequencies by -90.
Trying this block diagram:
LO Cos
|
|-----(X)------[Hilbert 37]---|
| |
signal in ----| (+)------ signal out
| |
|-----(X)------[delay 18]-----|
|
LO Sin
If my LO is 455Khz and my signal in is 455.5Khz I get a nice 500Hz output.
However if the signal is 454.5Khz there's also 500Hz out, so I'm getting
both sidebands. Expecting USB only. Nice clean detection tho!
Anyway I'll study it closer and see what's going on / missing.
def build_graph ():
local_osc = 455e3
signal = 454.5e3 # 500hz lower sideband
sample_rate = 8e6
fg = gr.flow_graph ()
src = gr.sig_source_f (sample_rate,gr.GR_SIN_WAVE,signal,1.0,0)
lo_90 = gr.sig_source_f \
(sample_rate,gr.GR_COS_WAVE,local_osc,1.0,0)
lo_0 = gr.sig_source_f \
(sample_rate,gr.GR_SIN_WAVE,local_osc,1.0,0)
hilbert_coeffs = \
gr.firdes_hilbert ( 37, gr.firdes.WIN_HAMMING)
hilbert = gr.fir_filter_fff (1, hilbert_coeffs)
del_taps = [0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
delay = gr.fir_filter_fff (1, del_taps)
mixq = gr.multiply_ff ()
mixr = gr.multiply_ff ()
sum = gr.add_ff ()
dst = gr.file_sink (gr.sizeof_float, "ssb_out.dat")
fg.connect (src, (mixr, 0))
fg.connect (lo_0, (mixr, 1))
fg.connect (mixr, delay)
fg.connect (src, (mixq, 0))
fg.connect (lo_90, (mixq, 1))
fg.connect (mixq, hilbert)
fg.connect (hilbert, (sum, 0))
fg.connect (delay, (sum, 1))
fg.connect (sum, dst)
return fg
--Chuck
- [Discuss-gnuradio] gr.firdes_hilbert () usage, cswiger, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Matt Ettus, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage,
cswiger <=
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Dan Gisselquist, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, cswiger, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Matt Ettus, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Dan Gisselquist, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Matt Ettus, 2004/11/24
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Eric Blossom, 2004/11/25
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Chuck Swiger, 2004/11/26
- Re: [Discuss-gnuradio] gr.firdes_hilbert () usage, Matt Ettus, 2004/11/26
- Re: [Discuss-gnuradio] Weaver SSB (was: gr.firdes_hilbert () usage), cswiger, 2004/11/26
- Re: [Discuss-gnuradio] Weaver SSB (was: gr.firdes_hilbert () usage), Matt Ettus, 2004/11/26