Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Fourier Analysis and other mathematical analysis of data
#1
Surprised 
Fourier Analysis and other mathematical analysis of data
I have been doing some mathematical analysis of the flow data taken from my APAP. The purpose is to understand my sleep apneas and COPD a little better and to communicate this to my doctors. Even though I hate writing papers (despite having well over 100 scientific publications), who knows? I might even publish on this.

I started with Fourier Analysis and now moving to a wavelet analysis. I will also probably be doing some system identification and time series analysis before I am done with the effort.

So far I will recap the effort as most of this was published in a private forum:

The data has come from a ***.005 file of a Philips Respironics Series 60 APAP. Initially, I was interested in characterizing the periodic breathing that I observe at various times throughout my sleep. Such a pattern is shown:

[Image: lQTKN91.jpg]

I started by using FFT which is very good for identifying dominant frequencies. This produced the following information:

[Image: xHEL5FX.jpg]

My interpretation is that the largest peak is my breathing frequency (near 15 cycles/minute), the peaks to the right that appear to be harmonics and the peak I am interested in is the small one near 2 cycles/minute.

Since I was interested in low frequency information, I zoomed to that region:

[Image: L41emFz.jpg]

What surprises me is that the low frequency peak is so small and indicates that periodic breathing is not as prevalent in the data I thought it was.

Below is a spectrogram of the data. The horizontal scale is time and the vertical scale is frequency. The lowest dark line horizontally across the spectrogram corresponds to my breathing frequency:

[Image: PTlD9ef.jpg]

What is noticeable is how the breathing frequency is disrupted by the event clusters. However the definition of the spectrogram is not fine enough for me to draw any conclusions at this point.

I did do some analysis of a few cycles but I don't think that it gave more information than I already had.

So now I am moving into developing wavelet forms but am not yet at point where I want to publish that yet.

Walter W. Olson, Ph.D., P.E.
Mechanical Engineering
Professor Emeritus, Professional Engineer
Post Reply Post Reply
#2
RE: Fourier Analysis and other mathematical analysis of data
I've been reading your posts in the Sleepyhead forum.
Looks like your software is MATLAB?
Over there, you spoke of sampling at 5 per second.
If I understand your goal, you wish to look at many cycles to get the rise and fall of periodic breathing.
However, do you not need more samples per second when inhalation is about 1.33 sec and exhalation 2.66 sec with fine structure to an individual breaths?
How do you prevent aliasing of the higher frequency components that make up a single breath cycle? Are you essentially implementing a filter in software to exclude exceeding Nyquist?
Admin Note:
JustMongo passed away in August 2017
Click HERE to read his Memorial Thread

~ Rest in Peace ~
Post Reply Post Reply
#3
RE: Fourier Analysis and other mathematical analysis of data
(01-23-2016, 04:04 PM)justMongo Wrote: I've been reading your posts in the Sleepyhead forum.
Looks like your software is MATLAB?
Over there, you spoke of sampling at 5 per second.
If I understand your goal, you wish to look at many cycles to get the rise and fall of periodic breathing.
However, do you not need more samples per second when inhalation is about 1.33 sec and exhalation 2.66 sec with fine structure to an individual breaths?
How do you prevent aliasing of the higher frequency components that make up a single breath cycle? Are you essentially implementing a filter in software to exclude exceeding Nyquist?


No, I am using Mathematica. I have Matlab but prefer Mathematica. However, Matlab has better Systen Identification Tools and I may later use it. I also have some tools in Mathematica that we have never released, mainly because I was too lazy to write them up. (These basically, NARMAX methods.)

"However, do you not need more samples per second when inhalation is about 1.33 sec and exhalation 2.66 sec with fine structure to an individual breaths?"

I clearly would like a better sampling rate but I have what I have. Obviously, I have to get fine structure from wavelet analysis, not FFT's.

"How do you prevent aliasing of the higher frequency components that make up a single breath cycle? Are you essentially implementing a filter in software to exclude exceeding Nyquist ?"

That is why the limitation exists on the division of frequency in the FFT. You just cannot go finer than this without experiencing high frequency aliasing. So, in effect, I am filtering. As you know, this (digital filter theory) can get quite complex. I am ignoring these complexities as at this point, tacetly assuming that the complexities are in the noise level.

The roughness of the computations indicate that FFT is not the direction to go in. There really is nothing that I can see that pops out of the FFT's at this point. I can nothing predictive in the frequency space other than the frequency is disrupted by apnea events which should not surprise anyone. If there were frequency space events that preceded the disruption, now we might have something. But nothing is really popping.


Walter W. Olson, Ph.D., P.E.
Mechanical Engineering
Professor Emeritus, Professional Engineer
Post Reply Post Reply
#4
RE: Fourier Analysis and other mathematical analysis of data
(01-23-2016, 03:28 PM)wolson Wrote: So now I am moving into developing wavelet forms but am not yet at point where I want to publish that yet.

Fascinating - can't wait to see your wavelet results Smile
Post Reply Post Reply
#5
RE: Fourier Analysis and other mathematical analysis of data
last time I did FFT's we were trying to decide if the blip was a single aircraft or several. In this case we had lots of data and it was data regarding everything we needed.

Would sure be nice to EKG and EEG data along with the data that sleepyhead can provide. You may or may not be able to get predictive information, but can you also know what is causing the predictive event.
Post Reply Post Reply
#6
RE: Fourier Analysis and other mathematical analysis of data
(01-24-2016, 06:51 PM)PoolQ Wrote: last time I did FFT's we were trying to decide if the blip was a single aircraft or several. In this case we had lots of data and it was data regarding everything we needed.

Would sure be nice to EKG and EEG data along with the data that sleepyhead can provide. You may or may not be able to get predictive information, but can you also know what is causing the predictive event.


i absolutely agree. We can only model our data based on the flow rate, s aime time series. I sure would be nice to have the other values as well.

Walt
Walter W. Olson, Ph.D., P.E.
Mechanical Engineering
Professor Emeritus, Professional Engineer
Post Reply Post Reply
#7
RE: Fourier Analysis and other mathematical analysis of data
After considerable different ways of looking at the data including multiresolution analyses, I have come tot he conclusion that there are no obvious prevent clues that an event is about to occur. The easiest information to understand is in the time domain.

In normal sleep, my breathing patterns are remarkedly stable and have dominant shape:

[Image: svYExH4.jpg]

Immediately ( the breath before the event/instability starts) there is nothing significantly different than normal sleep patterns:

[Image: Ae7WWxt.jpg]

But during the event, the total pattern is one of instability:

[Image: JwFUVEE.jpg]



Walter W. Olson, Ph.D., P.E.
Mechanical Engineering
Professor Emeritus, Professional Engineer
Post Reply Post Reply
#8
RE: Fourier Analysis and other mathematical analysis of data
Interesting, but not surprised. Question, is the data you are using taken from the CPAP with the settings in a useful range? Is the CPAP reacting to what you might be looking for and treating it so you cannot see it stand out? I am not sure what settings you would select to not treat apnea's and yet still be able to collect the data you want, maybe true CPAP with a pressure too low to prevent apnea?

From what I have read, CPAP does not try and stop or correct an apnea that has already started, but instead tries to prevent another one from happening. ASV machines on the other hand do indeed treat centrals by trying to trigger a breath that has been or is being missed.

If this is the case you should be able to detect the prelude to that first triggering apnea, the same as the CPAP machine does. Both major suppliers have significant patent positions and there should be a clue in what exactly they are detecting.
Post Reply Post Reply
#9
RE: Fourier Analysis and other mathematical analysis of data
(01-30-2016, 03:20 PM)PoolQ Wrote: Interesting, but not surprised. Question, is the data you are using taken from the CPAP with the settings in a useful range? Is the CPAP reacting to what you might be looking for and treating it so you cannot see it stand out? I am not sure what settings you would select to not treat apnea's and yet still be able to collect the data you want, maybe true CPAP with a pressure too low to prevent apnea?
.

Yes, this has crossed my mind too. I think with the baseline pressure (7 cm H20) CPAP may already be opening the airway enough to prevent and hide precursors. I don't think flow rate is the full story though. I would like actually airway pressure, EKG and blood gases to know where to look for precursors. Of course, I am not going to be able get these.

There is still some room for further exploration here: I think the next place to look is to integrate the flowrates over the breaths as well as look at the rate of changes in the flowrate over a period. This may provide a lead to some useful results.
Walter W. Olson, Ph.D., P.E.
Mechanical Engineering
Professor Emeritus, Professional Engineer
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Question Oscar Help - Analysis after 3 Weeks, Improvements! ef8mk 7 325 03-24-2024, 03:43 PM
Last Post: ef8mk
  New and in Need OSCAR Analysis Well Marbled 1 65 1,427 03-23-2024, 12:34 PM
Last Post: Sleeprider
  Newbie kindly asking for OSCAR analysis ash630 5 206 03-20-2024, 02:08 PM
Last Post: Sleeprider
  Help with Oscar Analysis SleepyinMD 0 148 03-07-2024, 10:04 AM
Last Post: SleepyinMD
  Screenshot analysis yankees123 10 370 01-31-2024, 05:40 PM
Last Post: yankees123
  erqq - CPAP Analysis erqq 16 869 01-29-2024, 02:31 PM
Last Post: BoxcarPete
  Clementine39 - Therapy Analysis Clementine39 2 256 01-26-2024, 11:32 AM
Last Post: Crimson Nape


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.