LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

filter problem

Hello, I'm trying to filter signals. I put a photo of an example of a square signal of 50Hz. I have done the FFT to confirm bandwidth. I use frequency_sample=150Hz>frequency_high. frequency_high=60Hz and frequency_low=40Hz and I haven`t results?
Can you help me? I can't understand what I'm not doing ok. I send you my file and a photo of the result.
Thank you very much.
Download All
0 Kudos
Message 1 of 7
(2,999 Views)
Hi!!!!

  What are you filtering your signal???? Do you want to subtract DC component, or high freq. components? Because it seems to me that the output signal you get, is actually  the 50 Hz square wave filtered!!

  Let me know!

graziano
0 Kudos
Message 2 of 7
(2,995 Views)
I want to eliminate high frequencies, but I can't undestand how.Please, help me.Thanks.
Luz
0 Kudos
Message 3 of 7
(2,994 Views)
OK!
   So you have to use a lowpass filter! Try with Chebyshev, if you like it, low-pass, where you have to specify only one cut-off frequency!

   Let me know if this helps....

graziano
0 Kudos
Message 4 of 7
(2,984 Views)
Luz,

1. Set the sampling frequency of your filter to the same rate as the data acquisition sampling (25000 Hz in your VI).

2. As Graziano suggested, use a low pass filter. A pure square wave has only odd harmonics (as your spectral graph shows) so a cutoff frequency of about 100 Hz should be a good starting point.

3. You are reading the DAQ buffer about 5 times per second. If the data changes very much during that time a user might have a difficult time observing the changes. Often it is useful to have two loops in parallel. One does the data acquisition and the other does the processing and display. The data can be transferred from one to the other via a queue or a functional global. If the data is saved in a buffer or file, the user can display it at a rate which is different from the rate at whiich it is acquired.

Lynn
Message 5 of 7
(2,965 Views)
Hi!
   I wrote a rapid answer... of course, johnsold's answer is more complete!

  To complete your DSP, I can only add: never forget to low-pass filter the signal you'are acquiring!!!!, if sampling rate is 25000, it can be good to put a lowpass filter with cf=20 kHz, unless you will obtain aliasing! I don't know if DAQ board you're using has one built-in....  Smiley Very Happy

graziano

0 Kudos
Message 6 of 7
(2,957 Views)

Thanks both,

Luz

0 Kudos
Message 7 of 7
(2,955 Views)