# Convolving complex exponential with box function (discrete)

If I have $$x[n] = u[n] - u[n-4]$$ where $u[n]$ is the unit step function, and $$h[n] = e^{-i\frac{\pi}{2}n}$$

does $x[n] * h[n] = 0$?

I tried doing the convolution sum and I got: $1 - i - 1 + i = 0$ and I also just tried plotting points and think I got 0 also, but I'm not sure if I did either of these correctly. Is there any easier or intuitive way to think about convolving a discrete complex exponential with a function, or (if it's easier the other way around), convolving a discrete box with another function?

The discrete-time Fourier transform (DTFT) of a length $N$ "discrete box" sequence starting at $n=0$ is

$$\sum_{n=0}^{N-1}e^{-jn\omega}=e^{-j(N-1)\omega/2}\frac{\sin\left(\frac{N\omega}{2}\right)}{\sin\left(\frac{\omega}{2}\right)}\tag{1}$$

The numerator of $(1)$ has zeros at frequencies

$$\omega_{0,k}=\frac{2k\pi}{N}\tag{2}$$

You can interpret the convolution as filtering the signal $x[n]=e^{-jn\pi /2}$ with a filter with its frequency response given by $(1)$. With $N=4$ you get zeros of the frequency response at $\omega_{0,k}=k\pi /2$, so the complex exponential with frequency $\omega=-\pi/2$ is completely suppressed because the filter's frequency response has a zero at exactly that frequency.

• Thanks very much. Is the exponent in the second half of the first equation missing the frequency component? Sep 12 '16 at 15:01
• @Jake: That's right, I corrected it. Sep 12 '16 at 15:33

You can use the convolution theorem to convert the convolution to the product of Fourier transforms of the given signals. $$h[n]*x[n]=\mathcal{F}^{-1}\{X(\omega)H(\omega)\}$$

$$H(\omega)=\mathcal{F}\{h[n]\}=\delta(\omega-\frac{\pi}{2})$$ $$X(\omega)=\mathcal{F}\{x[n]\}=e^{-j\frac{3 \omega}{2}}X_r(\omega)$$ where $$X_r(\omega)=\left\{\begin{matrix} \frac{\sin(2\omega)}{\sin(\omega/2)} &\omega\neq 0 \\ 4 & \omega=0 \end{matrix}\right.$$

However since $X(\omega)\delta(\omega-\frac{\pi}{2})=X(\frac{\pi}{2})\delta(\omega-\frac{\pi}{2})$ and $X(\frac{\pi}{2})=e^{-j\frac{3\pi}{4}}\frac{\sin(2\pi/2)}{\sin(\pi/4)}=0$, the inverse Fourier transform and therefore the covolution is zero.

You can also assume $x[n]$ is the impulse response of an LTI system and $h[n]$ is an input signal. Since the complex exponential is eigenfunction of the system, the output whould be an scaled version of the input i.e. $Ah[n]$ where $A=X(\frac{\pi}{2})$ and $X$ is the FT of $x[n]$.

• The result of the convolution is indeed zero. The mistake is in the length of the discrete box. You used a length of $3$ samples, but it is actually $4$ samples. Sep 12 '16 at 7:24