0
$\begingroup$

background: Trying to filter out all other signal frequencies except -> signal whose frequency can be in multiple's of 16Hz {16,32,48.......160].

so started experimenting with a single tone [no noise] at 16 Hz and i get weird output spectrum.

Input: single tone waveform at 16Hz. enter image description here

enter image description here Filter: multi-bandpass filter design using kaiserord

output enter image description here

Issue: I followed Mathworks page of kaiserord and also this example, however the output is not expected. No noise added, just plain $e^{j2\pi ft}$ with $f=16$ fed into this kaiserord filter and I get the weird spectrum. Code uses signal_filtered = filtfilt(hh, 1, input_signal);

question: Filter design looks correct and so is input signal. Is there anything wrong in my approach/design? please teach me if I am missing anything obvious or overlooked anything?

$\endgroup$
3
  • 1
    $\begingroup$ 1. Are you sure your input signal is correctly synthesized? Maybe add the code used to synthesize it to your question. 2. Use a real input (replace exp() with sin()) $\endgroup$
    – Jdip
    Sep 5, 2023 at 21:33
  • 1
    $\begingroup$ Please post your entire code. We can't tell by you words and a few snippets what exactly is happening. $\endgroup$
    – Hilmar
    Sep 5, 2023 at 22:06
  • $\begingroup$ I uploaded the code at pastebin.com/ES6MSzJU $\endgroup$ Sep 30, 2023 at 15:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.