How to calculate the frequency of a signal without knowing the sampling frequency using Matlab

I have a signal and I am using Matlab command pwelch to calculate the frequency of the signal, but the frequency I obtained is changed as I change the sampling frequency.

For example, when using sampling frequency equal to 8000[samples/sec], the frequency appears to be 1 Khz, while using 16000 sampling frequency the frequency of the signal appear to be 2 Khz.

Which is the correct frequency? And is there other method to calculate the frequency of a signal without a prior knowledge of the sampling frequency?

• Without sampling frequency all you have is a set of values. If they switch from one to another faster(i.e. different sampling frequency) they describe a faster sinusoid => higher frequency. – user16827 Aug 2 '15 at 7:55
• Nope - it's impossible. – jojek Aug 2 '15 at 12:49

If you do not have the information about the sampling frequency $$F_s$$ of your digital data, the best option is to talk about dimensionless relative frequencies $$f$$, or reduced frequency. The frequencies you observe on periodograms will be $$f = F/F_s$$, where $$F$$ would be the true frequency (hoping you have no aliasing). This amounts to saying that your sampling period is $$1$$ (dimensionless) and that the maximum observable frequency in your signal is $$1/2$$.

However, it is likely that the actual sampling frequency can be obtained from the data file, the experiment or sensor, a recorded phenomenon with known frequency (like the 50 or 60 Hz power) or the person who gave you that signal.

Do you know what is the duration of each signal? If you are using known freqs you can try to distinguish between them without calculating the exact frequency

using Zero Crossing Rate method

It counts the number of zero crosses through value 0. As more crosses the frequency is higher.

• And how exactly is that going to help? – jojek Aug 2 '15 at 12:48
• Maybe he means he wants to distinguish between freqs on a defined time – axcelenator Aug 2 '15 at 13:30
• I think that this method help only with signal of single frequency – Serwan Bamerni Aug 2 '15 at 17:19