# Harmonics of 50 Hz

I have a signal which clearly shows harmonics of 25 Hz (or 50 Hz?), this is actually my question.

I do not think the 50Hz resonance comes from the power supply leakage, since my power supplies works at some tens of kHz. I also do not have an explanation for the 25 Hz peak, I rather think it could be a manifestation of the 50Hz which probably comes from the power line, however the 25Hz magnitude is dominating...

Have you ever faced a spectra like this?

Since I am filtering my data with a notch digital filter, I would like to know the optimal way to reject the frequency with major influence. A 25Hz and 50Hz centered notch work, however I would like to understand what could be the cause of this noise resonances.

Thanks! • First check you calculated the values on the axes correctly. Also, please provide more context: what signal is this (and what device you used to measure it)? To see what a filter does, calculate its frequency response. You probably want to use a series of basic IIR notch filters (that is, a comb filter) to remove the interference.
– mmh
Sep 7, 2015 at 20:16
• It is almost certainly from the mains power. Even if your power supply is switching at a high frequency you can still pick up interference on the probes or sensor or other circuitry. Get a long electrical lead and go outside and see if the problem persists. Sep 8, 2015 at 0:18
• Can we see the signal itself ?
– user7657
Sep 8, 2015 at 18:51
• You really need to add the code that generates that plot -- there's to much uncertainty about what we're looking at! Sep 9, 2015 at 9:58

It is almost certainly from the mains power. Even if your power supply is switching at a high frequency you can still pick up interference on the probes or sensor or other circuitry. Get a long electrical lead and go outside and see if the problem persists. – geometrikal

what @geometrikal said. Even if you have a really good power supply, some -60dB of what happens on the grid side will leak to your internal supply power. Now, guessing from your diagram ($f_\text{max} \approx 2\,\text{kHz}$, $\Delta_f = 2\,\text{Hz}$) I'd say I'm looking at a signal sampled at 4kHz, which has been subjected to a 2048-point FFT, abs(), semilogx plot.

So the plot contains half a second of information, and yet your highest peak is around $10^{-9}$. (By the way, I'm assuming that the base of this plot are processed samples, which don't directly represent the full ADC span as $[-1;+1]$. If it is, you should probably use an amplifier -- I don't think you have a ADC with a dynamic voltage range of 220dB -- that would be unusual.)

So, especially if the observed phenomena might be shorter than half a second, the relative strength of the power line harmonics might simply be caused by them being there throughout the whole measurement. This all comes down to you explaining (and maybe understanding) the nature of the signals you're visualizing. As a side note, I'd say the plot doesn't do a very good job at that -- you can barely see how the power in the highest frequencies seems to be higher than in the rest of the spectrum, and all I can say from this plot is "over the 100Hz to 2kHz range, power varies", which is not really much information.

• Thank you very much for your useful answers. They help me to learn and understand better the underlying noise of my data. The 7000 data-points signal are sampled at 2kHz to which the DFT was computed for 7000 points. A loglog(Hz, abs()) plot is shown. If those frequency resonances come from the power line, which is 50 Hz, and I assume this is my fundamental frequency, 25Hz cannot be an harmonic of it. How is manifested then? I thought the logarithmic scale would lead to a better frequency information. How I could plot the power spectra so that it is more meaningful?
– Nacu
Sep 8, 2015 at 12:24
• They can't be sampled at 2000Hz, because the highest frequency in your plot is > 1000Hz, and that violates Nyquist. Something is wrong with your plot. What your plot needs to show depends on what you want to see -- I can't help you with that, @Nacu! Sep 8, 2015 at 13:34
• Yes, intrinsically my system violates Nyquist, because my data acquisition system cannot sample at higher rates. In this regard, I do not consider frequencies > 1000Hz that I know they can be aliased. My main concern is in the resonances 25 and 50 Hz.
– Nacu
Sep 8, 2015 at 14:57
• Hm, I'm still confused how your program generated the plot -- could you explain why there are elements in the plot between 1kHz and 2kHz? Sep 8, 2015 at 16:01
• You are right, I used a code which did not specified the FFT length. Thank you for pointing it out. I have replaced it.
– Nacu
Sep 8, 2015 at 17:05