Gain from Difference Equation (Revised)

Calculus Level 3

Consider a discrete infinite-impulse-response (IIR) filter, described by the following difference equation:

y k = a x k + b x k 1 + c y k 1 \large{y_k = a \, x_k + b \, x_{k-1} + c \, y_{k-1}} In the above equation, y y is the filter output signal and x x is the filter input signal. The ( k ) (k) subscript denotes a value from the present processing interval, and the ( k 1 ) (k-1) subscript denotes a value from the previous processing interval.

The filter coefficients are ( a , b , c ) = ( 3 , 2 , 1 2 ) (a,b,c) = (3,2,\frac{1}{2}) .

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 1 kHz 1 \, \text{kHz} , and that the input signal frequency is 60 Hz 60 \, \text{Hz} ? 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.


The answer is 8.68556.

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.

1 solution

Steven Chase
Jan 12, 2018

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 \large{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 Y = a \, X + b z^{-1} X + c \, z^{-1} Y

Consolidating Y Y and X X terms and forming the transfer function:

Y ( 1 c z 1 ) = X ( a + b z 1 ) Y X = ( a + b z 1 ) ( 1 c z 1 ) Y (1 - c \, z^{-1}) = X (a + b z^{-1}) \\ \frac{Y}{X} = \frac{(a + b z^{-1})}{(1 - c \, z^{-1})}

Subsitution for z:

z = e j ω T j = 1 ω = 2 π f = 2 π ( 60 ) T = 1 1000 z = e^{j \omega T} \\ j = \sqrt{-1} \\ \omega = 2 \pi f = 2 \pi (60) \\ T = \frac{1}{1000}

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.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...