04-15-2020 05:35 PM
Hello all,
I obtained a breathing signal with myRIO audio in port, and I'm trying to find power in specific frequency range over total power to indicate wheezing in the breathing sound. I plotted the spectrum of my signal using Spectral Measurements vi but I couldn't reach what I want, your help is much appreciated.
04-15-2020 09:58 PM
Until you attach your code (not a picture of the code, but the actual VI or VIs), we can only guess that "you did something wrong" ...
I can think of two ways to do this, one with a Filter, one without. What do you know about Signals, signal analysis, Frequency Spectra, etc.?
Bob Schor
04-16-2020 01:54 AM
Oh, sorry about that,
I assumed that because my code is dependent on myRIO device, and it just contains spectral measurement VI, there's is no need to upload anything.
anyway, I attached the code concerning the spectral analysis of my data, there's also time analysis, but it has nothing to do with the frequency, so there's no common VIs between the two other than the data acquisition.
I don't know much about the frequency analysis to be honest, i just know the Nyquist frequency, the wheezing occurs above 200 Hz, and the sampling frequency is 1kHz.
What I need at the end is to find the ratio of power above certain frequency over the total power of the signal, and based on that, I will determine the wheezing event.
Thank you
04-16-2020 09:01 AM
My fault -- I should have asked you to compress the folder containing your entire Project and attach that. Your target is, of course, your myRIO, so we would need to open it on the Remote Target (or a simulated one), in particular because you are using Express VIs that refuse to "open up" so we can see how you are using them.
So now that you have explained what you want to do in a bit more detail, and have given some hints about how you are planning to do it (which I think may be not the ideal way to approach the "what" goal), I'll make some comments that might help you ...
To answer the question raised by your title, simply read up a bit about the Power Spectrum of a signal and what it means, which should enable you to figure out how to do that part.
Bob Schor
04-16-2020 09:58 AM
thank you for your answer,
I do not care about the time of the wheezing event, it's just a yes or no question.
regarding the sampling, i had a problem when sampling at 10kHz inside the timed loop, the number of samples in my x-axis was not related to the actual time of recording, i'm not having this problem at 1k sampling, i tried to search for the reason and i couldn't find anything, so if you can help me with that, i would really appreciate it.