4
$\begingroup$

EDITED AND UPDATED:

My signal is an impulse response. In the following figure:

Frequency spectrum of the signal

  • The frequency spectrum of the impulse response (original signal) is shown by blue line.

  • The original signal is corrected using an amplitude correction term shown by orange line.

  • The corrected signal is represented with a green line. The line above 700 Hz is flat because of the correction term.

I need to extract the corrected signal within frequency bounds 0 -700 Hz. I am using a IIR low-pass filter with filter order 10 implemented in MATLAB to get the frequency response within the required bounds. Please see the code to generate low pass filter.

    fCross = 1360;
    aPass = 0.1;
    nFfT = 524288;

    lpFilt = designfilt('lowpassiir',...
        'FilterOrder',10,...
       'PassbandFrequency', fCross, ...
       'PassbandRipple', aPass, ...
       'SampleRate', nFft);

When I perform the time-domain transformation of the signal, I get a time signal with ringing artifacts, shown in the figure below:

Time signal

If I first convert the signal to time-domain and apply a low pass filter the ringing still persists (as shown in figure below), I am also not sure if the artefacts at the end are the time-shifted samples at the beginning of impulse response (onset of the IR).

Low-pass filter applied after time domain conversion

I have the following questions:

  1. Why do I see the ringing artifacts after the decay of the impulse response and why are they pronounced at the end of the signal?
  2. How do I further process my signal (zero-padding, circular shifting) in order to minimize ringing?
  3. Are there any other filters that can be used instead of low pass filter?

Please note: the signal will be used for audio purposes so truncating it will cause information loss. Hence, that is not an option.

Thanks in advance!

$\endgroup$
3
  • $\begingroup$ Source code would be helpful but, is your LP Butterworth type filter (as by your plot, magnitude of the corrected signal (green line) starts go upwards above 700Hz...) ? $\endgroup$
    – Juha P
    Nov 8, 2023 at 12:40
  • $\begingroup$ I have added the source code and updated my question. The green line is flat due to the correction term. $\endgroup$ Nov 13, 2023 at 15:17
  • $\begingroup$ If code is copied from your source code plots are done then there's maybe a typo in designfilt() command ... shouldn't it be 'SampleRate', nFFT but there is 'SampleRate', nFft . $\endgroup$
    – Juha P
    Nov 13, 2023 at 21:36

1 Answer 1

4
$\begingroup$

Why do I see the ringing artifacts after the decay of the impulse response and why are they pronounced at the end of the signal?

DFT based frequency domain multiplication corresponds to circular (not linear) convolution in the time domain. What you are seeing is time domain aliasing.

How do I further process my signal (zero-padding, circular shifting) in order to minimize ringing?

If this is really just an IIR filter: apply it directly in the time domain and stay away from the frequency domain. If you absolutely MUST implement this in the frequency domain

  1. Make sure that the correction curve has a causal phase: ideally a minimum phase
  2. Read up on "overlap-add" or "overlap-save" algorithm

All of this assumes that your filter is time invariant. Time variant filters add a significant level of complexity

$\endgroup$
5
  • $\begingroup$ So, this means artefacts at the end of the signal are the few starting samples of the IR which appear at the end due to aliasing? $\endgroup$ Nov 8, 2023 at 9:25
  • $\begingroup$ The filter needs to be applied in frequency domain since signal between 0-700Hz needs to be extracted , however it MIGHT NOT be an IIR filter. It can be any filter. I tried Blackmann window sinc filter in frequnency domain, although it is highly accurate in frequency domain, I am getting ringing artefacts in time domain with time shifted samples. $\endgroup$ Nov 8, 2023 at 9:36
  • $\begingroup$ You can implement a windowed sinc in the time domain as an FIR. My answer still stands though: the filter must be causal (which is a function of its phase) and you need to implement overlap-add $\endgroup$
    – Hilmar
    Nov 8, 2023 at 10:10
  • $\begingroup$ ” The filter needs to be applied in frequency domain since signal between 0-700Hz needs to be extracted”: I’m confused about this being the reason for frequency domain processing? You can implement a low pass filter that will “extract” signal from $0$ to $700 \tt{Hz}$ in the time domain. $\endgroup$
    – Jdip
    Nov 8, 2023 at 15:00
  • $\begingroup$ @Hilmar@Jdip, I applied the filter in time domain and there are ringing artefacts. How do I get rid of them? $\endgroup$ Nov 13, 2023 at 15:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.