[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] problem with audio extraction in NTSC
From: |
Achilleas Anastasopoulos |
Subject: |
[Discuss-gnuradio] problem with audio extraction in NTSC |
Date: |
Tue, 15 Feb 2005 19:59:45 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
Dear all,
I am working on extracting the audio FM signal from the NTSC
signal, and experimenting with the data file
ntsc-short-complex-baseband-8MS.dat
The idea seems simple: recenter the audio carrier to 0 frequency,
LPF and decimate and then do standard fm demod.
This is done in the attached file.
Unfortunately, although I hear something like
"winter storm will still going to stick around..."
the signal seems highly distorted as if the audio
carrier is very unstable.
I tried to fix this by tracking the video carrier,
but the problem gets worse.
One possible reason for this is that the local oscilator used to
generate the IQ signal is not stable, which unfortunately cannot be fixed...
Can someone verify this problem and/or suggest any solution.
Thanks
Achilleas
#!/usr/bin/env python
from gnuradio import gr
from gnuradio import audio_oss as audio
from gnuradio.wxgui import stdgui
from gnuradio.wxgui import fftsink, oldfftsink, oldfftsink_linear, scopesink
import wx
import math
class test_app_flow_graph (stdgui.gui_flow_graph):
def __init__(self, frame, panel, vbox, argv):
stdgui.gui_flow_graph.__init__ (self, frame, panel, vbox, argv)
# build our flow graph
input_rate = 8.00e6
fm_decim = 25
fm_rate = input_rate / fm_decim # 320 kHz
audio_decimation = 10
audio_rate = fm_rate / audio_decimation # 32 kHz
filename = "ntsc-short-complex-baseband-8MS.dat"
src = gr.file_source (gr.sizeof_short, filename,True)
conv = gr.interleaved_short_to_complex ()
# Pilot extraction:
#Ap= 100.0
#p_width = 100e3
#pilot_coefs = gr.firdes.band_pass (2/Ap, input_rate, 1.75e6-p_width/2,
1.75e6+p_width/2, p_width, gr.firdes.WIN_HAMMING)
#pilot_filter = gr.fir_filter_ccf(1, pilot_coefs)
#real = gr.complex_to_real()
#imag = gr.complex_to_imag()
#neg = gr.multiply_const_ff(-1.0)
#conj = gr.float_to_complex()
# FM signal extraction
#correction = gr.multiply_cc()
fm_coeffs =
gr.firdes.low_pass(1.0,input_rate,100e3,50e3,gr.firdes.WIN_HAMMING)
fmc = gr.freq_xlating_fir_filter_ccf (fm_decim,fm_coeffs,-2.75e6,
input_rate)
peak_amp = 1.0
fm_demod_gain = 1.0 / (2 * math.pi * 75e3 / peak_amp / fm_rate)
volume = 0.4
fm_demod = gr.quadrature_demod_cf (volume*fm_demod_gain)
# L+R processing: LPF + decimation
# compute FIR filter taps for audio filter
width = 1e3
audio_coefs = gr.firdes.low_pass (1.0, fm_rate, 15e3, width,
gr.firdes.WIN_HAMMING)
audio_filter_lpr = gr.fir_filter_fff (audio_decimation, audio_coefs)
audio_sink = audio.sink (int (audio_rate))
block1, fft_win1 = oldfftsink.make_fft_sink_c (self, panel, "Data",
1024, input_rate)
block2, fft_win2 = oldfftsink.make_fft_sink_c (self, panel, "Data",
512, fm_rate)
block3, fft_win3 = oldfftsink.make_fft_sink_f (self, panel, "Data",
256, audio_rate)
self.connect (src, conv)
#self.connect (conv, pilot_filter)
#self.connect (pilot_filter,real)
#self.connect (pilot_filter,imag)
#self.connect (imag,neg)
#self.connect (real,(conj,0))
#self.connect (neg,(conj,1))
#self.connect (conv,(correction,0))
#self.connect (conj,(correction,1))
#self.connect (correction, fmc)
self.connect (conv, fmc)
self.connect (fmc,fm_demod)
self.connect (fm_demod,audio_filter_lpr)
self.connect (audio_filter_lpr,audio_sink)
self.connect (conv, block1)
self.connect (fmc, block2)
self.connect (audio_filter_lpr, block3)
vbox.Add (fft_win1, 1, wx.EXPAND)
vbox.Add (fft_win2, 1, wx.EXPAND)
vbox.Add (fft_win3, 1, wx.EXPAND)
def main ():
app = stdgui.stdapp (test_app_flow_graph, "FFT Sink Test App")
app.MainLoop ()
if __name__ == '__main__':
main ()
- [Discuss-gnuradio] problem with audio extraction in NTSC,
Achilleas Anastasopoulos <=
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, Chuck Swiger, 2005/02/15
- Message not available
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, Achilleas Anastasopoulos, 2005/02/16
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, Matt Ettus, 2005/02/16
- [Discuss-gnuradio] Scope and Spectrum Analyzer using WCK, Thomas Traber, 2005/02/16
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, David Carr, 2005/02/16
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, Eric Blossom, 2005/02/17
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, David Carr, 2005/02/17
- Re: [Discuss-gnuradio] problem with audio extraction in NTSC, Berndt Josef Wulf, 2005/02/17