# Effect of low pass filter on the time domain

Consider an ideal (rectangular profile in frequency domain) low-pass filter (LPF) which simply sets to zero all the frequencies beyond a certain cut-off frequency. Let $x$ be a discrete-time signal of duration $N$ in time domain, i.e., $x=[x_1,x_2,\ldots,x_N]$. Apply $x$ as input to the LPF and let $y=[y_1,y_2,\ldots,y_N]$ be the corresponding output signal in time domain. I have checked the spectrum of input and output signals and I can confirm the filter works well and also the input and output signals make sense.

From simulations, I can see that the following condition holds: $$\sum_{t=1}^{N} x_t = \sum_{t=1}^{N} y_t.$$ My question is why this condition should hold. Is it there a general rule? I can think of an example where it holds. If I filter every frequency except the DC component, then the output signal in time is the mean value of the input signal and indeed the condition above is verified since $$\frac{\sum_{t=1}^{N}x_t}{N}=\bar{x},$$ where $\bar{x}$ denotes the mean value of signal $x$. If $y_t=\bar{x}$, $\forall t$, then $$\sum_{t=1}^{N}y_t = \sum_{t=1}^{N}\bar{x} = N \bar{x} = \sum_{t=1}^{N}x_t.$$

For example, I know that by Parseval's Theorem the energy of the output signal will be different from the energy of the input signal (and this occurs) but I am not sure why the condition above should hold. Thank you very much in advance.

You have a finite length sequence $x[n]$, $n=0,1,\ldots, N-1$, with the discrete Fourier transform (DFT) given by

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi nk/N}\tag{1}$$

and its inverse DFT (IDFT) given by

$$x[n]=\frac{1}{N}\sum_{k=0}^{N-1}X[k]e^{j2\pi nk/N}\tag{2}$$

From $(1)$ it is clear that

$$X[0]=\sum_{n=0}^{N-1}x[n]\tag{3}$$

If you compute another sequence by multiplying the DFT $X[k]$ by some sequence $H[k]$ and then applying the IDFT

$$y[n]=\frac{1}{N}\sum_{k=0}^{N-1}Y[k]e^{j2\pi nk/N}\tag{4}$$

with $Y[k]=X[k]H[k]$, then from $(3)$ it's clear that

$$\sum_{n=0}^{N-1}y[n]=Y[0]=X[0]H[0]=\sum_{n=0}^{N-1}x[n]\cdot H[0]\tag{5}$$

So as long as $H[0]=1$ you will always have the equality

$$\sum_{n=0}^{N-1}y[n]=\sum_{n=0}^{N-1}x[n]\tag{6}$$

• Very clear and complete explanation, thanks a lot! – user27243 Mar 13 '17 at 21:12

If you sample a pure sinewave for an integer number of periods, the samples will sum to zero (it will have equal "ups" and "downs"). If you zero an FFT bin, that's the same as subtracting a sinewave of the same magnitude and phase as was in that bin, or identically, adding a pure sinewave of the same magnitude but opposite phase. So zeroing bins is the same as adding sinewaves that are exactly periodic in FFT aperture (as those are the basis vectors of a DFT). So zeroing any set of bins (other than the DC or 0 Hz bin) adds samples than sum to zero, thus having no effect on the total sum of the time domain samples after the modification.

Your proposed condition is NOT true as written. What would be true is $$\sum_{t=-\infty}^{\infty}x_t = \sum_{t=-\infty}^{\infty}y_t$$ or $$\sum_{t=1}^{N}x_t = \sum_{t=-\infty}^{\infty}y_t$$

The sum simply represents the DC component the value of the Fourier Transform at $\omega = 0$. If the value of transfer function of your lowpass filter at $\omega = 0$ is $H(0) = 1$, than the DC components will be the same.

However, the impulse response of an ideal lowpass filter is a sinc function. The output of the filter is therefore non-causal and of infinite length. The output of the filter is NOT limited in time to t = 1...N but it goes from -$\infty$ to $\infty$

• Thanks for your answer Hilmar. I understand that the output is not limited in time. However, by: 1) taking the fft of the input signal $x[n]$ (I should use the discrete-time notation actually); 2) setting manually to zero the "unwanted" frequencies in the frequency domain; 3) taking the real part of the inverse fft, I obtainded a signal of the same length of the input signal (I use Matlab). Going back to the original question, why is it so that $\sum{x[n]}=\sum{y[n]}$ also occurs for cut-off frequencies other than $0$? Thanks. – user27243 Mar 13 '17 at 16:49
• Frequency domain multiplication implements circular convolution in the time domain, not linear convolution. Circular convolution preserves DC. You get a time domain signal but it's NOT output that you would get by filtering the input signal with an ideal lowpass filter – Hilmar Mar 13 '17 at 20:21

$\sum_n x[n]$ is the Fourier transform of $x$ at frequency $\theta = 0$:

$$X(e^{j0}) = \sum_n x[n] e^{-jn0} = \sum_n x[n]$$

So, if your filter has frequency response 1 at $\theta = 0$, then your assumption holds.

In general, $\sum_n y[n] = H(e^{j0}) \sum_n x[n]$.

• Not exactly. Depends on the exact summing indices. In general the output for finite length signal is longer than the input. – Hilmar Mar 13 '17 at 16:22