06-27-2012 09:09 PM
I tried to use DAQmx to acquire a signal(with some noise) whose frequency could be above 500KHz. I used filter to get the real signal but when the sampling freq is about 200KHz, the filter turns wrong. The wrong code is -20020 and the analysis is Cut-off freq fc must be met: 0<=fc<=fs/2.
Could anyone please help me? Thanks in advance.
06-27-2012 09:16 PM
The filter requirement simply states that your cutoff frequency be below Nyquist (Sampling Frequency / 2). If your sampling frequency is 200kHz then you cannot have a filter above 100kHz. You need to increase your sample rate or decrease your filter. If your frequency of interest goes up to 500kHz, then you need to always sample with a MINIMUM of 1MHz sample clock.
Charles Chickering
06-27-2012 09:29 PM
Sure,the sampling freq is below Nyquist. For example,the signal freq changes,sampling freq also changes and at any time sampling freq which i set is always at least four times than the signal freq.
06-28-2012 08:34 AM
Ok, your frequency is below Nyquist but what about your cutoff filter frequency?
06-28-2012 10:16 AM
My lowpass and highpass filter cutoff freq are both 2Hz...Is this the key to the problem?
06-28-2012 10:51 AM
The low pass must be higher than the high pass otherwise you filter out everything...
06-28-2012 09:45 PM
Thanks,but i am sorry i don't understand your reply. Is it ture that the high pass must be beyond the low pass?
06-28-2012 10:05 PM
Sure,I tried it again and i found when lowpass cutoff freq is higher than highpass,the warning which number is -20023 and analysis is 0 < f_low <= f_high <= fs/2 turned out again
06-28-2012 10:12 PM
06-28-2012 10:16 PM - edited 06-28-2012 10:16 PM
@J Zx wrote:
Sure,I tried it again and i found when lowpass cutoff freq is higher than highpass,the warning which number is -20023 and analysis is 0 < f_low <= f_high <= fs/2 turned out again
Notice this new warning is 0 < f_low not 0 <= f_low. I got bit by this the other day. Make sure you are choosing a number for f_low that is greater than 0, and not 0.