0

I have problem with how achieving the compensation (reduction) for the output signal emission that occurs when change abruptly the coefficients of the digital filters. for the better compensation,Is it possible to conduct experiments for different signals?

  • you simply can't change the coefficients abruptly. Any mitigation technique will just amount to smoothing out that transition between coefficients. – Marcus Müller Dec 31 '21 at 21:16
  • Thank you for your response! Actually, the abruptly method is only suggested for the completely compensation for the output signal emission. Please, do you meaned by 'any mitigation technique' is the the increments for compensation can be multiplied by a weighting factor of 0<w<1? – hussein alkarawi Dec 31 '21 at 21:31
  • Can you be more specific with an example of what you are trying to do and where you are stuck? Also I am not sure what you mean by "of the first order" since the order of an FIR filter is one less than the number of coefficients. Plots and formulas would help if possible. – Dan Boschen Dec 31 '21 at 21:32
  • Thank you for reply, ok,I specified my question with little edits to be cleared. – hussein alkarawi Dec 31 '21 at 21:39
  • @husseinalkarawi do you really mean "FIR filter of the first order"? Because, then we're talking about FIR filters with exactly two taps only. And sadly, it's not clear what you want to experiment with. Hint: we understand mathematical formulas very exactly... language is very soft, blurry. – Marcus Müller Dec 31 '21 at 23:42
  • For example, in published article, when they are presenting the results of a study of the Butterworth low-pass filter with the 5th order and a sampling frequency of 10 kHz. At the moment n = 200, the filter was rebuilt from a cutoff frequency of 2 kHz to 2.5 kHz. Moreover, the transition process that occurs due to the change of coefficients at the moment n = 200 is designated in the program as y_outu. The transient process with compensation is designated as yk_out, and is shown by a small dotted line. – hussein alkarawi Jan 01 '22 at 09:16
  • The output signal that has been established after the adjustment is shown as a large dotted line and is indicated by yust_outn. In this case, compensation allows you to reduce the duration of the transition process by 30% and lower the level of fluctuations by 45%. – hussein alkarawi Jan 01 '22 at 09:18
  • Sorry, this all makes little sense. If you refer to a paper, please add add a reference here. Your title says "non-recursive FIR" but than you mention Butterworth which is clearly a recursive IIR filter. – Hilmar Jan 01 '22 at 13:11

1 Answers1

1

From the OP's original question and the subsequent comments I suspect that he is interested in creating an FIR filter from a truncated impulse response (for example the impulse response of a Butterworth filter by using only the first 200 samples). The compensation used is commonly done with "windowing" and this refers to the windowing process for FIR filter design.

This is introduced simply as follows: If select a finite duration from a much longer (or even infinitely long as is the case for a Butterworth filter) impulse response in time by selecting $N$ samples simply as their values from $0$ to $N-1$, this is identical to multiplying that time domain impulse response with a rectangular function. Multiplication in the time domain is convolution in the frequency domain. Since the Fourier Transform of a rectangular function is an Sinc function, we are therefore equivalently convolving our desired frequency transfer function of the filter (as the Fourier Transform of the original impulse response) with a Sinc function. The issue is that a Sinc function decays in frequency relatively slowly: the peaks of each sidelobe only go down at a rate of $1/f$, so this significantly smears the original frequency response, significantly reducing stopband rejection and increasing passband ripple (more distortion).

I demonstrate this in the graphic below for the case of an ideal brickwall filter, showing the convolution with the Sinc function given by a rectangular window in time used to select a finite number of samples from the ideal impulse response needed. (This graphic also shows the number of coefficients in the filter needed to complete the transition band, in this case to the first null of the filter. Given the high sidelobes of the Sinc function, the stopband beyond this point will not have significant rejection).

Rectangular Window

The "compensation" the OP refers to is windowing. By using alternate windows than the rectangular window, ones that transition more smoothly in the selection of the original impulse response and weigh each sample accordingly, we can achieve much less distortion but this will always be at the expense of filter length needed to complete the transition band- but in this case we can have significantly better stopband rejection and significantly smaller passband ripple. This is demonstrated in the similar graphic below:

windowing method

For the design of FIR filters, some of the best windows to use are the Kaiser window and DPSS window, providing the best performance in terms of distortion with the minimum number of filter coefficients. These windows come close to the optimum performance of solving for the coefficients using the least squares algorithm, which provides the optimum solution in a least squares sense (lowest rms error from ideal). More details on windowing vs the least squares algorithm are provided at this post. Below is a graphic showing the comparative Discrete Time Fourier Transforms (DTFT) of a rectangular window (which is approximately a Sinc function, and specifically the "Dirichlet Kernel) and the Kaiser Window whose DTFT is the "Kaiser Kernel". We clearly see here the very long and slow decay of the sidelobes of the Dirichlet Kernel, which is what would convolve with our desired frequency response if we only use a rectangular window; and in comparison the significant side-lobe rejection for the Kaiser window used.

Kaiser Kernel

In summary to use the window method, select a finite duration of samples from the ideal impulse response of the filter, and then multiply these by a window of identical duration. This will then be the properly compensated coefficients for the FIR filter implementation. Review the frequency response and adjust the filter duration as needed to meet objective requirements. Caution: Be very careful if estimating the time domain impulse response using the inverse FFT- this would be the "Frequency Sampling" approach to FIR filter design and is inferior if affected by time domain aliasing as detailed further here. The impulse response should be derived from the inverse Fourier Transform and this can be estimated from the inverse FFT if a significantly longer number of samples is used than will be used in the final filter to allow the time response to sufficiently decay before aliasing.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135