How to find the fundamental frequency of a noisy periodic signal?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
The periodic signal can have fundamental frequency can range from 1 Hz to 15000hz.
Lets say a periodic signal of 50hz is generated. To this we add noise.
So this is our input: Noisy periodic signal.
Goal: We need to extract the fundamental frequency of this signal. There is only one harmonic. Please let me know how to go about it?
Accepted Answer
Image Analyst
on 22 Jan 2019
1 vote
Use fft(). Then use the second return argument of max() to find the index of the highest signal. That's your fundamental frequency's index.
12 Comments
Sindhu Jettira Chengappa
on 27 Jan 2019
Edited: Sindhu Jettira Chengappa
on 4 Feb 2019
Use fft(). Then use the second return argument of max() to find the index of the highest signal. That's your fundamental frequency's index.
@imageanalyst: Sorry for late response. i was away.
Regarding this , why should i take second return argument? i noticed it. I am getting 2 peaks. Whay is that?
Image Analyst
on 27 Jan 2019
The amplitude in the time domain doesn't matter. All that matters is the amplitude in the frequency domain. If there is more noise in a frequency range than your signal (which might or might not be in a different frequency range) then you would not know which is the signal if interest. For example, if you had huge spikes at 15 kHz and 75 kHz, who's to say which is the signal and which is the noise, without additional information or assumptions?
Sindhu Jettira Chengappa
on 28 Jan 2019
Yeah so taking fft and max of it and getting the index of it wont work if we have a very high noise signal addd to signal.
so my problem statement is : Etimating fundamental frequency of a noisy periodic signal is a typical parameter estimation task. Additive noise is of unkown type.
Provide a program to estimate fundamental frequency of such noisy and sampling frequency fs is known.
sample values are given .
can you let me know how to go about it?
Image Analyst
on 28 Jan 2019
You can try a lock-in amplifier. It's perfect for situations where you have a periodic signal in a very noisy environment. It can find the "true" signal in cases where the noise is a million times bigger than the true signal.
I'm not saying the original fft idea won't work. If you have broadband noise, then chances are there won't be very much power at exactly the same frequency of your signal, so your signal will probably still be the highest power. It's only a problem if you have a lot of power in your noise that's concentrated at a narrow frequency band, like you have a 60 Hz line noise/tone superimposed on your signal. In that case you can turn off your signal and figure out where the noise tone is and use a notch filter to get rid of it. Or you can try a Wiener filter to get rid of the noise. The key is to get the noise signal alone, in absence of any signal.
Bjorn Gustavsson
on 28 Jan 2019
For this case I think we can simplify Image Analyst's answer a bit more - if we know the frequency band of our signal of interest we can still use the raw fft and then look for the peak spectral power inside our frequency band of interest - compare with a ordinary radio-receiver.
Sindhu Jettira Chengappa
on 28 Jan 2019
the frequency range is not known.
Sindhu Jettira Chengappa
on 28 Jan 2019
@image analyst , i should write a matlab program to read in noisy signal which ill be provided as sampled values and i need to calculate fundamental frequency. but its difficult to implement weiner filter. can you help with this program hy giving some logic to calculate fundamental frequency?
Image Analyst
on 28 Jan 2019
Attach some data and tell us where the frequency is expected to be. Like I said, we can just find the max in the fft, most likely. Also, can you attach a signal with no pure frequency combined with it, so that the signal is all just noise?
Sindhu Jettira Chengappa
on 29 Jan 2019
This is a task given by my professor. He asked us to find the fundamental frequency . He wont tell us the bounds of frequency( range of fundamental frequency). He will just give a noisy signal sampled values and fundamental frequency. Thats it. This is a tough process.
Not know: Frequency range,which type of noise.
Very much stuck here
Bjorn Gustavsson
on 29 Jan 2019
Well, at least you ought to know the sampling frequency? Or at the very minimum the number of samples. Is it even regularly sampled?
What have you tried so far? Had a go at Image analyst's suggestions about looking at the fft?
If you have a very long time-series, you could have a go with spectrogram and possibly get some information about time-variations of the spectral content. Have a look at the help of spectrogram and try to apply one of the examples there to your data set.
HTH
Sindhu Jettira Chengappa
on 4 Feb 2019
Edited: Sindhu Jettira Chengappa
on 4 Feb 2019
Use fft(). Then use the second return argument of max() to find the index of the highest signal. That's your fundamental frequency's index. I am thinking of using this method.
@imageanalyst and @bjon: Sorry for late response. i was away.
Regarding this , why should i take second return argument? i noticed it. I am getting 2 peaks. Whay is that ? What is contributing to the first peak at index 1?
Image Analyst
on 4 Feb 2019
Look up max() in the help. The first value is the max value and the second value is the index where that max value occurs at.
[maxValue, indexOfMaxValue] = max(fftSignal);
More Answers (0)
Categories
Find more on Spectral Measurements in Help Center and File Exchange
See Also
on 22 Jan 2019
on 4 Feb 2019
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)