Maximum frequency in a discrete signal

Status
Not open for further replies.

nadal1991

Newbie level 4
Joined
Jul 11, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
61
Hi,

In purpose of a project, I am interested with Adaptive Sampling Approaches for "Sensors".

I decide to implement this approach, which could be found here : http://info.iet.unipi.it/~anastasi/papers/tim09.pdf
This general idea of this approach is to compute the maximum frequency of the discrete sensed signal (for example Temperature), and then determine the appropriate Sampling frequency for the sensor (with using the Shannon theorem : Sampling_frequency >= 2*Maximum_frequency).
I have no problems for understanding the approach and the algorithm used for adapt sampling frequency (it's quiet logical).

My problem is with the computation of the maximum frequency. According to the approach, we must compute an initial maximum frequency at the beginning after a first set of samples (for example the W= 500 first samples). And after that we must compute the maximum frequency after every new acquired sample (always wit a window length of W).

I try to use the Fast Fourier transform to find the Maximum Frequency of the discrete signal, i proceed like this with Matlab:

Code:
Fs = 1/15;  % Sampling frequency in Hz
t = 0:1/Fs:7500-15;  % Time vector
nfft=500;   % Number of samples

X = 30 + (30-35).*rand(1,500);  % our signal
signal = X - mean(X);

Y = fft(signal,nfft);
Y = Y(1:nfft/2);
mx = abs(Y);
f = (0:nfft/2-1)*Fs/nfft;
figure(2);
plot(f,mx);
title('FFT Random discret dataset');
xlabel('Frequency (Hz)');
ylabel('Power');

[maxVal,maxInd] = max(mx);
maxFreq = maxInd * Fs / nfft;
maxFreq               % Maximum frequency

I don't have a real temperature Dataset, so i generate a random Dataset of 500 samples between 30 & 35.

I obtained a value for the maximum frequency. And for testing the approach, i add new samples with very different values from the precedent ones to the signal for generating a strong variation and so increase the maximum frequency ! But here, i don't get an increase on the maximum frequency but instead i obtained a decrease.

I don't think this is logical ? In my thought, if i generate strong variations in the acquired signal, so the maximum frequency of the signal will increase and then the Sampling frequency of the sensor will increase too in order to capture all the dynamic and variations of the phenomenon ?

I wanted to know if my thinking is correct ? and if so, why the result i obtained are like this (problem with the computation of the frequency, the fft, or the random dataset used) ?

I am in a computer science specialty, so my lack of knowledge in the signal processing theory limit me to understand all this problematic.

Thank you in advance for all the time you could use to study my questions.

Nad.
 

Pseudo random noise has no meaningful frequency spectrum, despite of some accidental maxima and minima. The setup can be summarized as "garbage in - garbage out".

Generally, I don't think that a Nyquist related "maximum frequency" is a suitable parameter for all kinds of sensor signals. Strictly spoken, it only applies if the signal carries a frequency domain information. Even then, "maximum frequency" is only significant for a clearly band limted signal. For the more realistic case of a gradually decreasing spectral density, you have to refer to maximum acceptable aliasing signal power or similar criteria.

For measurements that are primarly analyzed in time domain, e.g. a temperature series, maximum error bounds criteria would be more important. Although they can be related to fequency domain representation somehow, I presume there's a more straightforward way to determine a suitable sampling rate in this case.
 

Thank you for this quick answer. I only have some questions :

1 -What would you means with "Maximum error bounds criteria" ? a web-link to help me to know more about that ?
2- I think you understand my objective with this "Adaptive sampling approach". But for explain more : I need a criteria which could resume (summarize) a set of acquired samples and than after every new acquired sample could said me if there is a variation and give me the degree of this variation ! and then with this degree of variation it will be possible to set a new sampling frequency for the sensor according to the dynamic of the phenomenon.
The scientific paper (link in my first post) propose to use the maximum frequency for this purpose. I think that "theoretically" it seems to be a logic idea. But if you have in mind another idea, another criteria, or a possible solution feel free to explain it to me. I don't search an optimal approach of adaptive sampling, but only a possible and practicable solution for my problem of adaptive sampling frequency.

Thank you.
Nad.
 


Hi, In addition to my last questions (in quote above). I wanted to ask an other question : i get an information so we can determine the maximum frequency in the signal with identifying the "frequency" in the spectrum which divide the spectrum into two part "the signal information" (the lower part) and "the noise" (the upper part). !
I wanted to know if in your thought this is practicable on my problem ?

Thank you.
Nad.
 

I'm referring to signals that don't have a clear maximum frequency rather than a continuously decreasing spectral density versus frequency. You may decide that spectral components above a specific frequency don't belong to the signal, but it's an arbitrary decision. Obviously it depends on the nature of the signal if the components above the frequency limit are redundant or carry information. It can happen, that the components aren't redundant but the information is lost in noise though.
 


Thank you for your answer.

Another thing linked to my problem. I wanted to know how to compute the temporal correlation between "a value of the signal" and "another group of values in the same signal, but acquired previously". I found this formula https://mathoverflow.net/questions/101380/estimation-of-temporal-correlation-of-signal on another topic on web but I don't understand it at all.

With this, I wanted to have opinion about if the using of the temporal correlation could help me to get a simple and practical solution to my problem (which i already talk about) and i summary here :
"" I wanted to detect in real time if the new acquired sample from the physical phenomenon (e.g., Temperature) presents a variation (strong or weak) in comparison with the previously acquired samples. My primary goal is to detect in real time when there is variation in the signal and then increase the sampling frequency to have more samples and so have a higher resolution of the signal. This known as "Adaptive Sampling". ""

Thank's in advance.
Nad.
 


Hi,

Sorry, But I just make a last "UP" for my thread & question, in the case that someone could give me an idea for my problem of "adaptive sampling"

Thank's
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…