02-13-2010 02:56 PM
Hello. I'm trying to analyze joint sounds to determine characteristics of pre-arthritis based on the magnitude range. If it is between 0 and 30 db, the result is no arthritis, if it is 30 - 60 dB, then it is pre-arthritis and if it is above 60 dB, then it is arthritic. I want to find all the peak amplitudes in dB and its frequency components between 20 - 10 kHz in the frequency domain. And, also observe the relationship between time, frequency and magnitude so I want to graph these parameters in a 3D surface plot. Unfortunately, I do not have the Sound and Vibration toolkit to use its express VIs. However, I've created a VI (which I've attached) to take in a signal removing the 60 Hz noise and filtering it using a bandpass filter (20 - 10 kHz). Then, I want to plot this graph in the front panel (first tab). Second, I used spectral measurements to create a power spectrum of the signal with a linear averaging mode to remove random noise without distoring the peak signals. And, I want to display this plot in a second tab on the front panel. I would also like the find all the peaks and its frequency components and output them on the front panel in the second tab. Then, in the third tab, I want to display the relationship between time, frequency and magnitude (dB).
Any help or direction would greatly be appreciated. Thank you!
02-15-2010 11:09 AM
Hi AG2,
You can put down a tab control and add all of your graphs to it. No problem with that at all. You can just leave your tab control off to the side of your block diagram, unless you want to create events relating to tab control value changes. Then you need to include the tab control in the loop.
Your filter has the cutoff frequencies backwords, so you will need to switch that. Also, I have included a link to ni.com/code, where there are a few peak picking VIs available to download. The top two are probably your best choices depending on your criteria.
NI Code Exchange Results
If you want to compare your time and frequency components with reference to the time domain (I think that is what you are trying to do; correct me if I am wrong) you will need to window your time domain signal. You basically cut your time domain signal into small bins and analyze them individually. That way you know when frequency anamolies happen based on bin number.
What are you using to acquire your signal? Without the S&V Toolkit I think you will likely need to convert from linear data to dB manually, by establishing a baseline and doing the conversion with math VIs.
Nick Keel
Applications Engineering
National Instruments
02-18-2010 10:33 AM
Thank you for the reply, Nick! I want to find the corresponding frequencies for every peak in the frequency spectrum and output all of these values in a separate tab on the front panel. And, create a 3D plot to show the time, frequency and magnitude relationships. I'm having a hard time implementing the 3D plot at this point. I'm using the 3D surface graph. I tried to insert the results from the time domain and frequency domain into arrays that can be fed into the z matrix of the 3d surface graph.
For the dB conversion, would just selecting the dB option in the spectral measurements not be sufficient? As for as data acquisition goes, I'm using a microphone to acquire sounds from the joints.
Thanks in advance!
AG
02-19-2010 01:25 PM
Hi AG2,
The code that I gave you should give you the peaks you are looking for. There are even more examples at ni.com/code. The 3D suface graph can be a little tricky to work with. The 2D Z-matrix basically defines the origin for your surface plot and the X and Y arrays define the departure from the Z axis in their respective directions. You may want to put the time and frequencies in the X and Y and then put the associated magnitudes for those values in Z. This is still going to be hard to implement because time and frequency are in different domains. It is really apples and oranges, so you will have a hard time creating any sort of relationship between the two on the same graph (and be able to comprehend anything from the graph).
You are definitely right about the db option from spectral measurements. That would definitely do the trick for the frequency domain.
I hope this helps!
02-21-2010 05:31 PM
Thank you Nick.
I also encountered a filtering issue with my VI. Currently, I used the averaging filter (10) in the spectral measurements VI and a bandpass filter to attenuate frequencies outside of 20 - 10kHz. However, I am not able to reduce the random noise in the power spectrum, which I can then proceed to use the power and frequency peak estimater to determine the peaks and its corresponding locations of the spectrum. I used a test signal (wav file), which had an invalid extension for this post.
Thank you, you have been incredibly helpful.
AG
02-22-2010 11:57 AM
02-22-2010 05:08 PM
02-22-2010 05:08 PM
02-23-2010 02:53 PM
Hi AG,
The noise that you are seeing in the power spectrum isn't actually noise; you are taking the power spectrum of the entire signal, so you are of course going to be seeing this much "noise". What you would need to do is actually split up the signal into about 2000 sample "chunks" (i.e., windowing), and do the power spectrum on this to get those frequency components that you are looking for. Once you do that, you should be getting something better looking than the power spectrum that you have now.
As for the peak detection, have you gotten the chance to look at any of those examples or look at picking out those peaks for your analysis?
Cheers,
03-03-2010 06:58 PM
Hi Marti,
I got a 30 day evaluation CD for the sound and vibration tool, which I was playing around with yesterday. I've updated my VI using the zoom FFT specturm and also using the peak search VI in order to find the max peaks. I did look at the examples you provided me. (thank you) But, while running the Zoom FFT spectrum, I'm getting the following error
Possible reason(s):
Sound & Vibration: start frequency should be greater than or equal to f0, and stop frequency should be less than or equal to the greatest frequency in the input spectrum
I'm trying it from 20 - 10 kHz. I've attached my VI and wave file I used for this.
Thanks,
AG