06-11-2014 01:35 AM
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?
Solved! Go to Solution.
06-11-2014 09:18 AM - edited 06-11-2014 09:19 AM
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.
06-11-2014 02:49 PM
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
06-11-2014 07:23 PM
Thank you both of you, you saved my days
I have to learn a lot about this software.
regards
limavolt
06-12-2014 02:12 AM
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)
06-12-2014 08:56 AM
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