# Frequency response of an LTI system described by the diagram below

I am trying to solve the below problem: To begin with the frequency response of the ideal low pass filter with $$\omega_c= \pi/4$$ is given by $$H(\omega) = \begin{cases} 1 & \text{if -\pi/4 \le |\omega| \le \pi/4;}\\ 0 & \text{otherwise.} \end{cases}$$

Proceeding to solve , we have

$$w(n) = h(n) * \left[(-1)^n\cdot x(n) \right]= \sum_{k=-\infty}^\infty h(k)\cdot(-1)^\left(n-k\right)\cdot x(n-k)$$

Therefore $$y(n) = (-1)^nw(n) = (-1)^n \cdot \left[\sum_{k=-\infty}^\infty h(k)\cdot(-1)^\left(n-k\right)\cdot x(n-k)\right]$$

bringing the $$(-1)^n$$ term in to the bracket:

$$y(n) = \left[\sum_{k=-\infty}^\infty h(k)\cdot(-1)^n\cdot(-1)^\left(n-k\right)\cdot x(n-k)\right]$$

Now this is where I am stuck. I don't know how to generalize the value of $$(-1)^\left(2n-k\right)$$ inside the bracket, the solution in the book I am referring goes forth as below which I don't agree with but however someone can help understand how this can be right.

Using the fact that $$(-1)^\left(n-k\right) = (-1)^\left(k-n\right)$$" the sum becomes $$y(n) = \left[\sum_{k=-\infty}^\infty h(k)\cdot(-1)^k\cdot x(n-k)\right] = \left[(-1)^nh(n) * x(n)\right]$$ Thus the unit sample response of the system is $$(-1)^nh(n)$$ and the frequency response is is $$DTFT\left[(-1)^nh(n)\right] = H(e^\left(j(\omega-\pi)\right) = \begin{cases} 1 & \text{if 3\pi/4 > \le |\omega| \le \pi;}\\ 0 & \text{otherwise.} \end{cases}$$

1. First case of disagreement is: how can $$(-1)^\left(n-k\right) = (-1)^\left(k-n\right)$$, it really depends on whether $$k$$ is $$\lt$$ or $$\gt$$ $$n$$ is it not?

2. The second disagreement stems from the the last expression, i.e. $$H(e^\left(j(\omega-\pi)\right)) = \begin{cases} 1 & \text{if 3\pi/4 \le |\omega| \le \pi;}\\ 0 & \text{otherwise.} \end{cases}$$ I think frequency shifting the frequency response of the low pass filter by $$\pi$$, the pass band of this system (in the diagram above) should be from $$-\pi/4+\pi$$ to $$\pi/4+\pi$$, so should have been $$3\pi/4$$ to $$5\pi/4$$ ,but the solution says 3$$\pi/4$$ to $$\pi$$.

The frequency response is periodic over $$2\pi$$: whatever response is observed over the frequency range of $$-\pi$$ to $$\pi$$ repeats from $$\pi$$ to $$3\pi$$ and again from $$3\pi$$ to $$5\pi$$, etc where $$\pi$$ corresponds to the Nyquist frequency of half the sampling rate.

The operation of multiplying in time by $$(-1)^n$$ does indeed circularly rotate the frequency response by $$\pi$$, converting a low pass filter to a high pass filter. The result of the rotation of the low pass response extending from $$-\pi/4$$ to $$+\pi/4$$ once we add $$\pi$$ due to the rotation becomes $$3\pi/4$$ to $$5\pi/4$$ in the unique range extending from $$0$$ to $$2\pi$$, which is the same as $$-\pi$$ to $$-3\pi/4$$ and $$3\pi/4$$ to $$\pi$$ if we consider the unique frequency range extending from $$-\pi$$ to $$\pi$$.

This is depicted in the frequency spectrums below, where the top spectrum shows the frequency response of the low pass filter, with the unique frequency span of $$\pm \pi$$ shaded but also showing the periodicity in frequency if we were to extend the frequency axis to $$\pm \infty$$. Similarly in the second graphic we see how $$(-1)^n$$ is an impulse at $$\pm \pi$$, representing the highest possible discrete time frequency, as an impulse that would be right at half the sampling rate. This is completely intuitive if you consider sampling a sine wave at its highest possible rate: we would get 1, -1, 1, -1 ...). Similar to the top graphic, we see the periodicity in frequency if we extended this frequency axis to $$\pm \infty$$. The multiplication in time is a convolution in frequency, and convolutions with impulses result in a simple shift, thus the bottom graphic is the top graphic shifted by $$\pi$$ (or equivalently shifted by $$-\pi$$). So functionally in the case of the complete block diagram the OP has shown; if $$h[n]$$ is a low pass filter, the first multiplier will flip the incoming spectrum within the frequency range of DC to half the sampling rate, shifting the low frequency content in that range to the higher frequencies and the higher frequency content to the lower frequencies. After the filter the second multiplier flips the spectrum back restoring the frequency positions of the input. Thus the combination of the low pass filter with the two multipliers is identical to a high pass filter.

As JDip has articulated more concisely in the comments, $$(-1)^{n-k}=(-1)^{k-n}$$ as the result is 1 for $$k-n$$ even, and -1 for $$k-n$$ odd, whether $$k-n$$ is positive or negative. So for example, with $$k=3$$ and $$n=4$$ we would have $$(-1)^{k-n} = (-1)^{3-4}=(-1)^{-1} = -1$$. This is the same as $$(-1)^{n-k} = (-1)^{4-3}=(-1)^{1} = -1$$.

A side observation of possible interest is that we could instead multiply the coefficients of the filter $$h[n]$$ by $$(-1)^n$$ to also convert the filter from a low pass filter to a high pass filter.

• To add to your answer, and answer one of the OP's point of confusion, you can indeed show (there are other ways to show this of course): $$(-1)^{n-k} = (-1)^{-(k-n)} = \frac{1}{(-1)^{(k-n)}}=(-1)^{k-n}$$
– Jdip
Apr 9 at 17:35
• @Jdip nice! You mean $=(-1)^{n-k}$? Oh I see… $1/(-1)= -1$, so they are equivalent either way Apr 9 at 17:39
• Thanks for your answers DanBoschen and @Jdip . Apr 10 at 6:46
• @DanBoschen , Hi , what tool do you use for creating those images , are they copied from somewhere or created using any tool , even I want to learn the tool if used ,the image quality and shading ( to highlight the frequency band) is very good . Thanks. Apr 10 at 12:11
• @MadavanViswanathan That is all done in PowerPoint. It’s just a shaded block and sent to the back in the layers. Apr 10 at 12:34