0
$\begingroup$

I'm a bit new into DSP and when performing the FFT of a step filtered with a Notch filter I realized the frequency components arround the design filter frequency were attenuated (as expected), BUT the minimum frecuency increases arround tha design filter frequency. ¿WHY does this happen? These points are marked with an arrow and I believe it's just a matter of not fully understanding FFT. I would very much appreciate if someone could give me a hand with this. FFT of a step and a Step filtered with a Notch filter and Zoomed

I also include the time domain response of the filter (blue is the input, and red the output), and for more details about the filter it is defined as:

$$ N(z) = \frac{z^2 - 1.939 z + 0.9469}{z^2 - 1.868 z + 0.8764} $$

(with a lot more decimals for better accuracy).

With a sampling period of 200 microseconds

enter image description here

$\endgroup$
  • $\begingroup$ Welcome to DSP.SE! I think you have a nice question, but we might need a few more details before we can answer it properly: what are the red and the blue plots? Are both plots in the frequency domain? If so, what signals are they plotting (which is the input to the notch filter and which is the output?). Why does the top plot have two blue graphs? $\endgroup$ – Peter K. Sep 8 '15 at 13:11
  • $\begingroup$ The blue plot is a step. so in a simulation of 100s, the signal is 0 untill t=50s, then the signal becomes 1until t=100s where it goes back to zero again. The red plot is the same signal after a Notch filter. Both are in the frqcuancy domain and on the top plot there is only one blue and one red graph. $\endgroup$ – Miguel Sep 8 '15 at 15:22
  • $\begingroup$ OK, that's starting to make more sense. One more question: I don't understand what you mean by "BUT the minimum frequency increases around the design filter frequency" ? Do you mean that the frequency components on either side of the design frequency are increased in magnitude? $\endgroup$ – Peter K. Sep 8 '15 at 15:47
  • 1
    $\begingroup$ No, I mean that if you take a look for example at 64Hz the filter has attenuated the signal, but if you take a look at 63Hz, it seems like the filter's output is greater than the filter's input, so instead of attenuating it has intensified the signal for this frequency. Am I interpreting the result right? $\endgroup$ – Miguel Sep 8 '15 at 16:00
  • $\begingroup$ It would help if you provided an exact (or at least more exact) representation of the filter coefficients. $\endgroup$ – Matt L. Sep 8 '15 at 16:22
0
$\begingroup$

So taking your filter and looking at its magnitude response we see that the magnitude close to zero will increase but all other magnitudes (on the other side of the dip) should be approximately unity gain (no magnification / increase in amplitude).

The fact that the DC gain of the filter is 0.94 means that the steady-state output for a step input will be 0.94, not 1. That may be the effect that you're seeing.

Also, the notch is not very deep. You may want to redesign the filter to make it attenuate more.

enter image description here

$\endgroup$
  • 1
    $\begingroup$ I'm confused with what I see in the question and in your plot. The filter's DC gain must be the sum of the numerator coefficients divided by the sum of the denominator coefficients. Since we only have the truncated coefficients we get an approximation, but its value is $(1−1.939+0.9469)/(1-1.868+0.8764)=0.94048$, so it's neither $1.2$ nor $1.0$. Not sure what's going on here ... $\endgroup$ – Matt L. Sep 8 '15 at 16:37
  • $\begingroup$ Aha! I've mistyped the last coefficient in the denominator. $\endgroup$ – Peter K. Sep 8 '15 at 17:05
  • $\begingroup$ Thank you for the answer, however that didn't fully answer my question. Are you saying that only the "peaks" of the FFT should be taken into account for frequency analysis?like the ones in 64Hz 64.4Hz 64.8Hz .... What about the "valeys"? like the ones in 63Hz 63.4Hz 63.8Hz (where the arrow is pointing).... I'm talking about the zoomed lower image of the top picture. $\endgroup$ – Miguel Sep 9 '15 at 6:33
  • $\begingroup$ The "peaks" and "valleys" you are seeing (away from the origin) are just the effect of interpolation (adding zeros to the FFT to get more points in the spectrum). They don't really tell you much about the signal at all. Why would you expect them to? The step function (even filtered) will have almost all of its energy in the DC (zero frequency) component. $\endgroup$ – Peter K. Sep 9 '15 at 11:46
  • 1
    $\begingroup$ Thanks, that is what I was looking for. making the step longer or shorter will modify the fft representation but obviously not the filter, thanks $\endgroup$ – Miguel Sep 9 '15 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.