Finding the Frequency Response Analytically
Given an LTI difference equation describing a filter, it is easy to analytically find an expression for the frequency response. Recall that if the input x is a complex exponential, then the output y will be the same complex exponential scaled by the frequency response evaluated at the frequency of the complex exponential.
Consider a filter given by
Let the input x be given by, for all integers n,
Then the output y must be given by, for all integers n,
where H(ω) is the frequency response evaluated at the frequency ω. Plugging the form of the input and output into the difference equation we get
= b1 e jωn + b2 e jω(n-1) + b3 e jω(n-2).
This can be factored as follows,
= e jωn (b1 + b2 e -jω + b3 e -2jω).
This can be solved for the frequency response,
This form of the frequency response can be generalized to LTI difference equations with an arbitrary number of terms.