From 515e40039e614ac86fb4c7be8dc4d067aa2bd9a3 Mon Sep 17 00:00:00 2001 From: Andy Walls <awalls@md.metrocast.net> Date: Wed, 30 Mar 2016 09:15:45 -0400 Subject: gr-analog: Add safety and default for FM preemphasis filter The FM preemphasis filter design now precludes the user from inducing a pole on the unit circle at z = -1.0 and z = 1.0. A pole at either of these locations makes the filter unstable and useless: feeding back "+/-inf" into an IIR filter has no good recovery. Also provide a reasonable, maximally safe default of 0.925*fs/2.0 for the high frequency corner, fh. This keeps the slope of the preemphasis filter looking reasonable sane in the whole band; at least for tau=75e-6 and fs=48000. --- gr-analog/examples/fmtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-analog/examples/fmtest.py') diff --git a/gr-analog/examples/fmtest.py b/gr-analog/examples/fmtest.py index 22448e6428..7ed08cafbe 100755 --- a/gr-analog/examples/fmtest.py +++ b/gr-analog/examples/fmtest.py @@ -48,8 +48,8 @@ class fmtx(gr.hier_block2): gr.io_signature(1, 1, gr.sizeof_float), gr.io_signature(1, 1, gr.sizeof_gr_complex)) - fmtx = analog.nbfm_tx(audio_rate, if_rate, max_dev=5e3, tau=75e-6, - fh=0.0) + fmtx = analog.nbfm_tx(audio_rate, if_rate, max_dev=5e3, + tau=75e-6, fh=0.925*if_rate/2.0) # Local oscillator lo = analog.sig_source_c(if_rate, # sample rate -- cgit v1.2.3