-1
$\begingroup$

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 ?

$\endgroup$
1
  • $\begingroup$ You mean truncate, discard samples? $\endgroup$ Commented Jun 6, 2021 at 9:42

2 Answers 2

0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Conv() accepts a string argument that is either ‘full’, ‘same’ or ‘valid’. $\endgroup$
    – Knut Inge
    Commented Aug 22, 2021 at 18:45
0
$\begingroup$

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]$.

$\endgroup$

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.