Consider a discrete infinite-impulse-response (IIR) filter, described by the following difference equation:
In the above equation, is the filter output signal and is the filter input signal. The subscript denotes a value from the present processing interval, and the subscript denotes a value from the previous processing interval.
The filter coefficients are .
What is the magnitude of the filter transfer function (ratio of output sinusoid magnitude to input sinusoid magnitude), assuming that the filter is processed at a rate of , and that the input signal frequency is ? This could also be referred to as the filter gain.
Note: I have revised this problem since the first posting. The original filter coefficients caused the filter to be unstable.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are two strategies for solving this problem. Both yield the same result:
1) Apply z-transforms and complex substitution for z
2) Simulate the difference equation to verify the gain
Z-transform method:
Difference equation:
y k = a x k + b x k − 1 + c y k − 1
Applying the z-transform and using the time-shift property:
Y = a X + b z − 1 X + c z − 1 Y
Consolidating Y and X terms and forming the transfer function:
Y ( 1 − c z − 1 ) = X ( a + b z − 1 ) X Y = ( 1 − c z − 1 ) ( a + b z − 1 )
Subsitution for z:
z = e j ω T j = − 1 ω = 2 π f = 2 π ( 6 0 ) T = 1 0 0 0 1
Plugging in numbers, we get a complex number which contains both the magnitude and phase responses. The magnitude of the transfer function (gain) is equal to 8.68556.
Simulation method:
The simulation is easy to perform using a computer. Applying a unit-magnitude sinusoid yields an output sinusoid with the same magnitude calculated in the formal solution.