11-01-2011 05:46 AM
Hello,
I need some idea's about how to know the strength of a signal or something else, when the amplitude of the signal is fluctuating consistently. Currently, I used to calculate the strength of the signal, so, I can differentiate signal when it is fluctuating. At the same time I am looking for any other ideas that can improve my code efficiency to tell about fluctuations.
I don't want to use any amplitude thresholds or limits.
11-01-2011 11:48 AM
It's kind of hard to advise you on how to improve code efficiency without seeing your code. Also is the signal naturally varying in spectral content over time, like say the output of a modem? Is the output varying due to noise? Is the time-domain signal being sampled appropriately with adequate anti-aliasing filters?
Depending on what the signal is, you could address the problem in a number of ways. You could do a running average in the frequency-domain to reduce the effect of noise. You could do an envelope function to capture the peak values - we had to do that when measuring the output of modems.
Mike...
11-01-2011 11:54 AM
Yes, it is varying due to noise. I am currently using running average method in my code and looking for any other idea to get much efficient along with averaging method.
11-01-2011 11:56 AM
What is the maximum frequency that you are interesed in? What is your current sample rate? What sort of anti-aliasing filters do you have?
MIke...
11-01-2011 12:01 PM
My sampling frequency is 5K and I am using USB 6008 to acquire the TDMS signal. I converted the acquired signal into frequency spectrum by use VI's. I am not using any anti-aliase filters. My spectrum range is about 0 to 2.5kHz with overall magnitudes less than 0.2.
11-01-2011 12:18 PM
High-frequency noise could be a problem. For best results you need to filter off anything above the nyquist frequency before the data is sampled. You can not do this filtering in software - once a high-frequency source is aliased into you data you are hosed - there is no way of removing the artifacts after the fact.
In your case you need a hardware lowpass filter that rolls off at 5kHz. The kind of filter butterworth, bessel, etc depends on whether you are interesed in the phase information in your signal. There are filter architectures that can give you very sharp cut-offs but do evil things to the phase relationships of the signal.
Mike...
PS: Also be on the look out for in-band noise sources. 50- or 60-Hz can be common depending on where you are in the world. In-band noise is dealt with using appropriate signal terminations, grounding and shielding.