LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter error message

Solved!
Go to solution

I'm having a problem with a badpass filter saying Fc>0.5 fs or something similar it's come up before for other people and they said to do the sampleing rate and set that as the dt for the wave so i built a wave with that as the dt but i'm getting the same error message? i cant seem to solve this all the old forum posts i've gone on, im using a daq assistant but i've uploading a read file with the data attached and the daq is reading 10,000 samples at a rate of 1000. 

 

Thanks for your time.

 

0 Kudos
Message 1 of 8
(2,999 Views)

The sampling rate is 1000 Samples/second. The dt is 0.001. By the way you should read the dt from the file rather than relying on the user to enter it.

 

You have the filter set for cutoff frequencies of 9000 Hz and 11000 Hz. 

 

The Nyquist criterion says that at a sampling rate of 1 kHz, you can accurately represent signals with frequency components up to 499.999.. Hz (< 1000/2). Since 9000 and 11000 (fc) are greater than 500 (fs/2), you will get the error.

 

If your signal has energy at frequencies higher than 11 kHz, then you need to sample at rates > 22 kHz. And if you are filtering with 11 kHz cutoff, it seems likely the original signal may have components well above 11 kHz, meaning that the sampling rate must be even higher.

 

What is the source of the original signal? What is the highest frequency of the noise or interfering signals in that original (not just the desired signal)?

 

Lynn

0 Kudos
Message 2 of 8
(2,978 Views)

I just looked at the data and am convinced that your sampling rate is so slow that your results are severely compomised.

 

Expand the x-axis of Waveform Graph to show  2 ms of the signal. Change the plot to show the actual data points. Notice that the signal does not change smoothly but jumps to extremes. This strongly suggests undersampling (fs < f signal).

 

Lynn

 

Aliased.png

0 Kudos
Message 3 of 8
(2,974 Views)

Dear lynn, 

 

The orignal source was a hammer on some wood, which is giving a frequency of around 10,000Hz trying to represent a gun shot. 

 

I have tryed changing the sample rate to 22k and reading samples at 10k? 

however the same error message occured although i agree with what you said 

 

I even tried ranges of 5k 6k 20k and changing the number of samples up to 100,000 

 

Sorry about this new to labview 

0 Kudos
Message 4 of 8
(2,957 Views)
Solution
Accepted by topic author SheepJust

The Nyquist criterion is a strict inequality. Setting the samping rate to 22001 should get rid of the error.  Actually my cleaned up version of your VI will run without generating that error at 22000.  Interesting! When I look at the error message it says fc <= fs.

 

The number of samples you read at a time has nothing to do with the error. 

 

Do you have an oscilloscope to look at the waveform with a much higher samping rate? With a scope you may be able to get a much better idea of what the highest frequency components are in the original signal.

 

Lynn

Message 5 of 8
(2,945 Views)

I do have an occissloscope, and i will try that ! Although I'm not sure why the VI i sent will run when the Fs is changed to 22001 and not 22000, but using the daq assistant and reading new inputs the rate has to be changed past 30,000 for the error message to go, away which is curious with out altering anything on the filter it's self. 

 

Once i get it under the occissloscope next time i can find lab hours i will see if i can find a more accurate freqency of our sound source orginally it was found by looking at the power specturem produced in labview to see where we got a large responce in which frequnecy range. 

 

Thank you for your help the programme runs for now and i can look into it in the mean time it might be something mundane and obvious in the end but the filter works and that's all i needed ! 

 

 

0 Kudos
Message 6 of 8
(2,925 Views)

Even though your filter was set to fc = 11000, most likely there are components at higher frequencies, such as 13000-15000 Hz. Although the program has no way to know about those. Maybe there is something else in your acquisition VI which requires the higher fs.

 

Lynn

0 Kudos
Message 7 of 8
(2,914 Views)

Thanks for the tip, i think if there is an error it will in in the daq assisant input values because the rest of the VI dosent require to the frequency other then the filters which is why i had never given the freqency much thought untill recently. 

 

This is a project ongoing under my NI account for acoustic sound localization so it is composed of a few VI's which will have to be checked over now ^^ but thank you 

0 Kudos
Message 8 of 8
(2,911 Views)