The following difference equation describes a discrete second-order Butterworth low-pass filter.
The quantity x is the input signal (which in this case consists of sine wave samples). The quantity y is the filter output, which is a filtered version of the input signal. The filter processes at a rate of 1 0 5 samples per second ( 1 0 0 kHz ) .
y k = a 1 b 1 x k + b 2 x k − 1 + b 3 x k − 2 − a 2 y k − 1 − a 3 y k − 2 b 1 = 0 . 0 0 2 6 b 2 = 0 . 0 0 5 3 b 3 = 0 . 0 0 2 6 a 1 = 1 a 2 = − 1 . 8 4 9 2 a 3 = 0 . 8 5 9 8
The k subscript denotes the present processing interval, the k − 1 subscript denotes the previous processing interval, and the k − 2 subscript denotes two processing intervals ago.
At what input signal frequency (in Hz ) is the gain of the filter 2 1 ? In other words, at what input frequency does the output have a magnitude approximately 0 . 7 0 7 times that of the input? This is known as the filter cutoff frequency.
Hints:
1)
The answer is an integer multiple of
1
0
0
Hz
2)
If all else fails, just build the filter and try different input frequencies
3)
When observing the gain, we are looking for the peak value of the output sinusoid, in relation to the peak value of the input sinusoid
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.
Very nice solution, thanks. I am also getting 1684 as the actual number, with the given coefficients. I think this is because I didn't give the coefficients with enough decimal places. But I designed the filter for 1700 Hz.
Thanks for the problem and for the clarification
Problem Loading...
Note Loading...
Set Loading...
Another good problem on frequency domain analysis..
Let us consider the given difference equation:
y ( k ) = a 1 b 1 x ( k ) + b 2 x ( k − 1 ) + b 3 x ( k − 2 ) − a 2 y ( k − 1 ) − a 3 y ( k − 2 )
By Rearranging:
a 1 y ( k ) + a 2 y ( k − 1 ) + a 3 y ( k − 2 ) = b 1 x ( k ) + b 2 x ( k − 1 ) + b 3 x ( k − 2 )
Now, from here, we establish a relation between input and output by deriving the transfer function. We do so by taking the Z-transform on both sides assuming no initial conditions. Doing so, and simplifying, we get:
G ( z ) = X ( z ) Y ( z ) = a 1 z 2 + a 2 z + a 3 b 1 z 2 + b 2 z + b 3
Here, Y ( z ) and X ( z ) are the z-transforms of the signals y ( k ) and x ( k ) respectively. I have applied the rules of Z transform to compute the same for the time-delayed terms according to the this link: https://en.wikipedia.org/wiki/Z-transform
Having obtained the transfer function, I will highlight a bit of theory. For a linear difference or differential equation establishing some kind of input-output relation, a sinusoidal input of a known frequency gives a sinusoidal output of the same frequency but of a different amplitude and phase.
The ratio of the amplitudes of the output and input is given by the modulus of the following complex number:
M = ∣ G ( z ) ∣
Where: z = e 2 π f T j , j = − 1 , T is the sampling time; T = 1 0 − 5 s (Recall that 100,000 samples are taken per second), and f is the frequency in Hz.
The goal of the question is to compute the frequency at which the magnitude ratio (M) is 0.707. To accomplish this, I have chosen to use a computer program here. By using a simple loop, the magnitude ratios can be computed for a large range of frequencies. A plot of the magnitude ratio vs. frequency can be seen as follows:
By inspecting the frequency and magnitude ratio arrays, it was found that for a frequency of 1684 Hz, the magnitude ratio is 0.7071. I entered the answer as 1700 Hz (approximating based on the hint), and it turned out to be correct. If the answer was supposed to be exactly 1700 Hz, I would want to know my mistake.