From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph from power spectrum and butterworth filter

Solved!
Go to solution

Hi,

 

I am newbie in labview, I want to see the power spectrum from the samples sound, I want to see if there are some pattern in those samples.

I use spectral measurement, and then I filtered the samples with butterworth filter. For the output I using waveform graphs.

Before filtered the signal, I got in the x axis the graph between 0-22500 and the data mostly in 0-2500.

I have tried to filtered using these values (fs=1000hz, fl=0.125hz, and fh=500hz) and the graphs almost the same but the axis of the graph is between 0-0,5.

 

questions:

what is the properties of the x axis? why is different but the graphs are the same?

Do I make the mistake with the program?

Download All
0 Kudos
Message 1 of 6
(3,837 Views)
Solution
Accepted by topic author limavolt

Hi Limavolt,

You are having problem with Bandpass filter VI, this VI generates only the signal value i.e. DBL array. The signal is a cluster.

 

solution 1: you have to calculate 'dt' using sampling frequency and use the build waveform VI to build a signal is proper scaling. 

Normally, dt=Sampling frequency/no. of samples

 

solution 2: replace butterworth filter VI with filter express VI, this will produce signal which does not require scaling.

 

Screen Shot 2014-06-11 at 19.59.55.png

157+ CLDs & 9 CLA Trained
LabVIEW Training resources
0 Kudos
Message 2 of 6
(3,809 Views)

Here is an example of the solution 1 of ramktamu.

 

I generally try to avoid the Express VIs because they hide so much of what they are doing, but in this case they should be fine.

 

Lynn

0 Kudos
Message 3 of 6
(3,786 Views)

Thank you both of you, you saved my days

 

I have to learn a lot about this software.

 

regards

 

limavolt

0 Kudos
Message 4 of 6
(3,779 Views)

For the first solution if you consider using build waveform VI. you can calculate dt as,

 

For low pass and high pass filter.

dt=fs/fc, where fc=cutoff frequency and fs=sampling frequency

 

and for bandpass and band stop filter.

dt=fs/((flc+fhc)/2)

157+ CLDs & 9 CLA Trained
LabVIEW Training resources
0 Kudos
Message 5 of 6
(3,759 Views)

Ram,

 

Where did you get those formulas? 

 

dt = 1/fs

 

It does not depend on the filter bandwidth. It is the interval between samples and thus depends only on the sample rate.

 

Lynn

0 Kudos
Message 6 of 6
(3,746 Views)