From 2e90edbf390b5ba3d49b70ecb039165ab8df2622 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 1 Jan 2016 20:55:00 -0800 Subject: [PATCH] Add 30Hz high-pass IIR filter for wideband FM. --- firmware/baseband/dsp_iir_config.hpp | 6 ++++++ firmware/baseband/proc_wfm_audio.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/baseband/dsp_iir_config.hpp b/firmware/baseband/dsp_iir_config.hpp index 171a8969..7e99ed03 100644 --- a/firmware/baseband/dsp_iir_config.hpp +++ b/firmware/baseband/dsp_iir_config.hpp @@ -24,6 +24,12 @@ #include "dsp_iir.hpp" +// scipy.signal.butter(2, 30 / 24000.0, 'highpass', analog=False) +constexpr iir_biquad_config_t audio_hpf_30hz_config { + { 0.99722705f, -1.99445410f, 0.99722705f, }, + { 1.00000000f, -1.99444641f, 0.99446179f, } +}; + // scipy.signal.butter(2, 300 / 24000.0, 'highpass', analog=False) constexpr iir_biquad_config_t audio_hpf_300hz_config { { 0.97261390f, -1.94522780f, 0.97261390f, }, diff --git a/firmware/baseband/proc_wfm_audio.hpp b/firmware/baseband/proc_wfm_audio.hpp index b4aa41bd..6b0fed88 100644 --- a/firmware/baseband/proc_wfm_audio.hpp +++ b/firmware/baseband/proc_wfm_audio.hpp @@ -49,7 +49,7 @@ private: const fir_taps_real<64>& audio_filter_taps = taps_64_lp_156_198; dsp::decimate::FIR64AndDecimateBy2Real audio_filter { audio_filter_taps.taps }; - IIRBiquadFilter audio_hpf { audio_hpf_config }; + IIRBiquadFilter audio_hpf { audio_hpf_30hz_config }; }; #endif/*__PROC_WFM_AUDIO_H__*/