LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spectrum separation

You need to be patient.  We are all volunteers who participate because we want to help other people.

 

Your last VI works for me.  No broken arrows.  You said you get a wrong result.  What are you expecting?

0 Kudos
Message 11 of 20
(1,935 Views)
I don't get any broken arrows. But, the amplitude of your signal is in the range of 2.5E-13 to -2.5E-13. Not what you expected, I'm sure.
 
In the signal generator, the sampling info  Fs must be greater than two times the desired desired frequency. At Fs=2 times the desired frequency, a signal with a frequency approaching zero Hz is produced.
 
For the filters: 
The sampling freq: fs is not connected in the upper-most filter in your VI. This will default to 1.0Hz.
 
If low cutoff freq: fl is less than or equal to 0 or greater than half the value of sampling freq: fs, the VI sets Filtered X to an empty array and returns an error.
 

When filter type is 2 (Bandpass) or 3 (Bandstop), high cutoff freq: fh must be greater than low cutoff freq: fl and observe the Nyquist criterion. The sampling frequency needs to be  two times the high cutoff frequency. 

 

JohnCS

0 Kudos
Message 12 of 20
(1,919 Views)

I am totally confused about filters working method in labview. If I connect more than three filter for a input signal results broken arrow. Anyway, I am trying to blank my existing sharp peaks at certain frequencies and excited to see the remaining whole spectrum. I can say, I have more or less 8 peaks available on the spectrum and the remaining is noise. So, I started to eliminate these peaks by bandstop but it was not work well.

 

Even though, I used three bandstop filters to eliminate three peaks but after that I got some more peaks on my spectrum which I did not see before. I though it was due to transition band of filter but I am not sure.

 

So, how can I do eliminate my peaks now. The filters are not allowing me to use more than 3 and though after this filters I am getting some extra peaks which does not existed before.

0 Kudos
Message 13 of 20
(1,905 Views)

Please post the VI you just described.

 

JohnCS

0 Kudos
Message 14 of 20
(1,899 Views)

here you go.

0 Kudos
Message 15 of 20
(1,895 Views)

There are no broken arrows when I run the VI. However, there is also no output to the AfterBS indicator.

 

In the third filter in the chain, the low cutoff frequency is greater than the high cutoff frequency. This is an error condition per my previous post.

 

To get the output of the Power Spectrum VI for the "AfterBS" case to scale correctly, you need to scale the input waveform with the delta t from the original signal. Otherwise the spectrum will appear to be in the normalized form.

 

If you put the filter in a loop and the filter coefficients in an control array you can deal with as many peaks as necessary.  See the attached VI.

 

JohnCS

0 Kudos
Message 16 of 20
(1,880 Views)

Hello,

               The given VI is also not working and it not showing the sprectrum in "after BS". I have more problems that when i run it in highlight mode, i saw the filter coeficients transferring right way to the filter but it is not indicating in the indicatior. It always shows zero in the indicator of low cutoff frequency.

 

I have some other doubts related to sampling rate of DAQ. Now, i am acquring data at the rate of 5K. How to decide which rate is sutable in case of unknown hightest frequency componet in the time signal. I know that sampling frequency must be two times greater than highest frequency component but in my case, i don't know the highest frequency componet.

 

Thanks to the NI forum.

0 Kudos
Message 17 of 20
(1,852 Views)

I can't open your VI since I only have LV2010 at the lab I'm in right now. But. I do see that I reversed the cutoff coefficients for the 760-715 case on the front panel control. The high frequency should be first  i.e. {5000,760,715}.  Try that.

 

Does your Original display show the expected signal? If not, have you changed the physical channel in the DAQ Assistant to match the DAQcard and connections you have? The current configuration matches my last test of this VI with a PCI-6024 physical channel Dev1/AI0. 

 

I wouldn't worry about the sampling rate until you get these filters working the way you want.  USB 6008 will only go to 10k s/sec which will take your max output to 5kHz so you're kind of limited anyway. 

 

JohnCS

 

0 Kudos
Message 18 of 20
(1,843 Views)

Thank you so much for your consistant support.

 

Though, it wan't working. My guess is, If i use three filters then te output is coming. If i increse filters morethan 3 , then couldn't able get graph.

0 Kudos
Message 19 of 20
(1,840 Views)

There should be no limit on the number of filters in a case like this.

 

Did you change the coefficients as I suggested and save  with the values as defaults?

 

I've made up a variation of the VI using your data as the input and it creates an output on AfterBS that is consistent with the filter coefficients. I also synchronized the Yscales of the two graphs so that the AutoScale Y doesn't jump all over the place.

 

JohnCS

0 Kudos
Message 20 of 20
(1,836 Views)