From 7b13a1930850fb0eaf84432c4d795cd27fe54a06 Mon Sep 17 00:00:00 2001 From: Adrien Michel Date: Sun, 1 Dec 2024 02:08:21 +0100 Subject: [PATCH] gr-analog : improve the filter quality of wfm_tx block The resulting filter has much more stop band attenuation. This filter will reduce the interpolation replicas. Plus, the filter complexity is less (approx 2 times less coefficients). The benefits can be seen on the example fm_tx.grc: - the sprectrum adajacent channels are cleaner - the output fm signal in time is smoother. Signed-off-by: Adrien Michel --- gr-analog/python/analog/wfm_tx.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gr-analog/python/analog/wfm_tx.py b/gr-analog/python/analog/wfm_tx.py index 70e91f82616..eab16fe9b9a 100644 --- a/gr-analog/python/analog/wfm_tx.py +++ b/gr-analog/python/analog/wfm_tx.py @@ -51,13 +51,10 @@ def __init__(self, audio_rate, quad_rate, tau=75e-6, max_dev=75e3, fh=-1.0): if do_interp: interp_factor = quad_rate // audio_rate - interp_taps = filter.optfir.low_pass(interp_factor, # gain - quad_rate, # Fs - 16000, # passband cutoff - 18000, # stopband cutoff - 0.1, # passband ripple dB - 40) # stopband atten dB - + interp_taps = filter.firdes.low_pass(interp_factor, # gain + quad_rate, # Fs + 19000, # cutoff_freq + 4000) # transition_width print("len(interp_taps) =", len(interp_taps)) self.interpolator = filter.interp_fir_filter_fff( interp_factor, interp_taps)