# IIR Filter 3dB Frequency and Amplitude and Phase of output for given input signal

I have some troubles in calculating the 3dB-Frequency and the output signal of an IIR Filter with a given transfer function

$$H(z) = \frac{1-z^{-1}}{1+0.5z^{-1}}$$

Second question is to calculate amplitude and phase of $$y(n)$$ if $$x(n)= \sin(\pi n/3)$$

I've found a solution for a FIR-Filter and put it into a new picture. I tried to use this together with a general approach I found, but still I'm not able to come to a solution with a similar form as the one for the FIR.

As I wrote before, I think the equation for $$y(n)$$ of the IIR should also look something like

$$y(n)=\sin(\frac{\pi}{3}-x)\cdot \text{Amplitude}$$

• This sounds a lot like a homework assignment. What have you tried and where are you stuck? Also, please format your equations using (MathJax)[math.meta.stackexchange.com/questions/5020/… Commented May 22, 2022 at 11:04
• Hi thanks for your quick reply. I've put a picture of my approach as an attachment but cos(Omega) =-0.125 is nonsense. For the amplitude and phase I'm completely lost. Commented May 22, 2022 at 11:53

You got a wrong step here:

\begin{align} \dfrac{\color{red}2(1-\cos{\Omega})}{\dfrac54+\cos{\Omega}}&=\dfrac{1}{\color{red}2} \\ \color{red}{2\cdot2}\cdot(1-\cos{\Omega})&=\dfrac54+\cos{\Omega} \end{align}

You simplified $$2$$ instead of multiplying it. You should be able to take it from here.

You shouldn't keep on modifying the OP as that risks changing the question.

Since it seems you can calculate the output for a FIR, then the only thing left is the recursion: at $$n=0$$, $$y[0]=0$$, so $$y[1]=x[1]+x[0]+y[0]=x[1]+x[0]$$, at $$n=1$$ it's $$y[2]=x[2]+x[1]+y[1]=x[2]+x[1]+x[1]+x[0]$$, and so on. If you substitute the terms for actual values, you should get the correct result, which looks like this (left LTspice, right Octave):

(LTspice shows a slight discrepancy for the "flat" top region -- that's because it can't sample starting with zero)

• Thank you I've changed the picture now to the corrected one. Commented May 22, 2022 at 17:21
• @Ziegi I've updated the answer. Don't modify your question, anymore. If you have anything new, better make a new question, instead. Wait a while to see if there aren't any other answers. Whichever answer solves your problem, select it with the green check mark. That tells future people, searching for similar problems, that there is a question with an answer. Commented May 22, 2022 at 21:30
• Thank you for your help, can you also give my a hint how to get a analytical solution for the IIR. A approach more like that one I already have for the FIR. I get lost when I replace e^-Omega with Pi/3 and try to get to a point where I can to something like in the fourth row of the FIR where I can substitute e^pi/6 + e^pi/6 with 2*sin(pi/6) Commented May 23, 2022 at 14:39
• @Ziegi I'd suggest not using complex exponentials for this and sticking to a generic $\sin(ak)$ (you can replace $a=\pi/3$ later). Use this with a symbolic approach and notice the pattern that forms. You should end up with a sum. After that, try to simplfy the sum to a more generic formula. Commented May 23, 2022 at 18:42