how to get N point FIR filter( convolution) output when input and impulse response are both N points ? ideally convolution results in length N+N-1

x[n] -> Input Signal of length N h[n] -> Impulse response of length N y[n] = x[n]*h[n] (convolution to get the output of this FIR filter) Ideally length of y[n] should be N+N-1 but is it possible to get only N point sequence for y[n] , if yes how ?

• You mean truncate, discard samples? Commented Jun 6, 2021 at 9:42

but is it possible to get only N point sequence for y[n] ,

Not without losing information. You can truncate the "tail" of the convolution but this does create an error.

In most practical cases of convolution, the signal is much longer than the impulse response and it's often acceptable to discard the extra samples, but that really depends on your application.

For example, let's look at Matlab. You can implement time domain convolution using either conv() or filter(). Let's assume the length of you signal is $$N_x$$ and the length of the impulse response is $$N_h$$. conv() will return the "correct" answer of length $$N_x+N_h-1$$ whereas filter will return a vector of length $$N_x$$ truncating the output to the same length as the input.

If the input is a stream than it will be chopped up into frames and each frame will be convolved. filter() has a means to mitigate the effect of the truncation and carry over the so called "overlap" into the next frame. This allows artifact free coevolution of continuous streams.

• Conv() accepts a string argument that is either ‘full’, ‘same’ or ‘valid’. Commented Aug 22, 2021 at 18:45

The answer will particularly depend on the application and the class of signals being used. In general, the following cases are of interest:

1. If $$x[n]$$ and $$h[n]$$ have zero padding; that is if $$x[n]= [1,2,3,4,0,0]$$ and $$h[n] = [5,6,7,0,0,0]$$ then $$N=6$$ and the output $$y[n] = h[n] \ast x[n]$$ will be having an effective size of $$6$$

2. If $$x[n]$$ and $$h[n]$$ are periodic sequences, then the circular convolution is of interest. More on circular convolution can be read here

3. In certain applications where there is symmetry of the signal $$x[n]$$ and the filter $$h[n]$$, a truncated representation may be acceptable. E.g if $$x[n] = [1,2,1]$$ and $$h[n]=[2,2]$$ then $$y[n] = [2,6,6,2]$$. In this case using a truncated representation $$y_T[n] = [2,6,6]$$ would suffice for reconstucting $$y[n]$$.