Method for detecting and discriminating breathing patterns from respiratory signals
11896388 ยท 2024-02-13
Assignee
Inventors
Cpc classification
A61B5/145
HUMAN NECESSITIES
A61B5/7232
HUMAN NECESSITIES
G16H50/70
PHYSICS
International classification
Abstract
A Cheyne-Stokes (CS) diagnosis system classifies periods of CS-like breathing by examining a signal indicative of a respiratory parameter. For example, nasal flow data is processed to classify it as unambiguously CS breathing or nearly so and to display the classification Processing may detect and display: apnoeas, hypopnoeas, flow-limitation and snore. The signal may be split into equal length epochs and event features are extracted. Statistics are applied to these primary feature(s) to produce secondary feature(s) representing the entire epoch. Each secondary feature is grouped with other feature(s) extracted from the entire epoch rather than from the epoch events. This final group of features is the epoch pattern. The epoch pattern is classified to produce a probability for possible event classes (e.g., Cheyne-Stokes breathing, OSA, etc.). The epoch is assigned to the class with the highest probability, which may both be reported as an indication of disease state.
Claims
1. A method for a controlled ventilatory apparatus to automatically determine an absence or a presence of Cheyne-Stokes breathing in a person, the method comprising: accessing, with one or more processors, a signal indicative of respiration of a person derived from a sensor; detecting, with the one or more processors, a plurality of events from the signal, wherein each one of the detected events comprises an apnea or a hypopnea, followed by a hyperpnoea; deriving, with the one or more processors, a jump feature for each one of the detected events, wherein the deriving comprises calculating, for each one of the detected events, a maximum increase from multiple increases of the respective hyperpnoea, and wherein each one of the multiple increases is determined from a predetermined time interval in a period of the respective hyperpnoea between its beginning and its maximum; determining, with the one or more processors, a peak in a frequency spectrum of the signal; determining, with the one or more processors and a trained classifier, the absence of Cheyne-Stokes breathing based on a first jump feature of the plurality of derived jump features, wherein the trained classifier is of a supervised machine learning type, and wherein the trained classifier was provided with a data set during training that comprised a plurality of jump features and corresponding diagnoses; determining, with the one or more processors and the trained classifier, the presence of Cheyne-Stokes breathing based on a combination of the peak in the frequency spectrum and a second jump feature of the plurality of derived jump features, wherein the first jump feature is greater than the second jump feature such that the first jump feature characterizes a hyperpnoea typical of obstructive sleep apnea and the second jump feature characterizes a hyperpnoea typical of Cheyne-Stokes breathing; and issuing a report based on probability of an epoch being assigned to a class based on the determined absence or presence of Cheyne-Stokes breathing.
2. The method of claim 1, wherein the signal indicative of respiration is a ventilation signal.
3. The method of claim 2 further comprising processing, with the one or more processors, the ventilation signal to derive an envelope of the ventilation signal during a hyperpnoea of one of the detected events.
4. The method of claim 3, wherein the envelope is derived by a droopy-peak detector.
5. The method of claim 4 further comprising interpolating, with the one or more processors, the envelope.
6. The method of claim 5, wherein at least one of the plurality of jump features is derived from the envelope.
7. The method of claim 3, wherein deriving the jump feature for each one of the detected events further comprises scaling the respective maximum increase by a mean value of the ventilation signal.
8. The method of claim 2, wherein the ventilation signal is an absolute value of a nasal flow signal.
9. The method of claim 1, wherein the signal indicative of respiration comprises oxygen saturation.
10. The method of claim 1, wherein determining the peak in the frequency spectrum of the signal comprises calculating a spectrogram of the signal and determining the peak from the spectrogram.
11. The method of claim 1 further comprising determining, with the one or more processors, whether the peak is in a frequency range of 0 Hz to 0.075 Hz.
12. The method of claim 1, wherein determining the peak in the frequency spectrum of the signal comprises calculating a Fourier transform of the signal.
13. The method of claim 1 further comprising calculating, with the one or more processors, a shape of the signal and utilizing the shape as an indication of central apnea.
14. The method of claim 1, wherein issuing the report comprises generating an output as a display on an epoch-by-epoch basis that represents the determined absence and/or presence of Cheyne-Stokes breathing.
15. The method of claim 1, wherein the predetermined time interval is on an order of time of a breath.
16. The method of claim 1, wherein the predetermined time interval is a two second time interval.
17. A system for automatically detecting an absence or a presence of Cheyne-Stokes breathing in a person, the system comprising: a sensor for sensing a signal indicative of respiration of a person; and one or more processors configured to: (a) determine a peak in a frequency spectrum of the signal; (b) detect a plurality of events from the signal, wherein each one of the detected events comprises an apnea or a hypopnea followed by a hyperpnoea; (c) derive a jump feature for each one of the detected events, wherein the deriving comprises calculating, for each one of the detected events, a maximum increase from multiple increases of the respective hyperpnoea, and wherein each one of the multiple increases is determined from a predetermined time interval in a period of the respective hyperpnoea between its beginning and its maximum; (d) determine, with a trained classifier, the absence of Cheyne-Stokes breathing based on a first jump feature of the plurality of derived jump features, wherein the trained classifier is of a supervised machine learning type, and wherein the trained classifier was provided with a data set during training that comprised a plurality of jump features and corresponding diagnoses; (e) determine, with the trained classifier, the presence of Cheyne-Stokes breathing based on a combination of the peak in the frequency spectrum and a second jump feature of the plurality of derived jump features, wherein the first jump feature is greater than the second jump feature such that the first jump feature characterizes a hyperpnoea typical of obstructive sleep apnea and the second jump feature characterizes a hyperpnoea typical of Cheyne-Stokes breathing; and (f) issue a report based on probability of an epoch being assigned to a class based on the determined absence or presence of Cheyne-Stokes breathing.
18. The system of claim 17, wherein the sensor is a respiratory pressure sensor, and wherein the signal indicative of respiration is a ventilation signal.
19. The system of claim 18, wherein the one or more processers are further configured to process the ventilation signal to derive an envelope of the ventilation signal during a hyperpnoea of one of the detected events, and wherein at least one of the plurality of jump features is derived from the envelope.
20. The system of claim 18, wherein deriving the jump feature for each of the detected events further comprises scaling the respective maximum increase by a mean value of the ventilation signal.
21. The system of claim 18, wherein the ventilation signal is an absolute value of a nasal flow signal.
22. The system of claim 17, wherein the sensor is a pulse oximeter, and wherein the signal indicative of respiration comprises oxygen saturation.
23. The system of claim 17, wherein the predetermined time interval is on an order of time of a breath.
24. The system of claim 17, wherein the predetermined time interval is a two second time interval.
25. The system of claim 17, wherein the data set further comprised hypopnea lengths, hyperpnoea lengths, and shape features.
26. The system of claim 17, wherein the trained classifier comprises a discriminant function that generates a probability estimate for a class representing presence of Cheyne-Stokes breathing and a class representing absence of Cheyne-Stokes breathing.
27. The system of claim 17, wherein a portable device comprises the sensor, and wherein the sensor is a respiratory pressure sensor or a pulse oximeter.
28. The system of claim 27, wherein issuing the report comprises generating an output a display on an epoch-by-epoch basis that represents the determined absence and/or presence of Cheyne-Stokes breathing.
29. The system of claim 27, wherein the portable device further comprises a nasal cannula, and wherein the sensor is a respiratory pressure sensor.
30. The system of claim 27, wherein the portable device is a hand-held device that is battery powered.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
DETAILED DESCRIPTION
Process Description
(14)
(15) Preferably, the signal is initially pre-processed. For example, the signal is filtered to remove unwanted noise and, where appropriate, the baseline is zeroed. The signal may also be linearised depending on the transducer used to detect the respiration.
(16) In the next stage the signal is divided into n epochs of equal length. The epoch length can be as long as the entire record or as short as is practicable to enable detection of respiratory patterns. In one preferred embodiment the epoch length is 30 minutes.
(17)
Determination of Shape Features
(18) Each hyperpnoea is further processed to derive four so-called shape features. These features indicate different shaped hyperpnoeas (bell-shaped versus triangle-shaped for example). The shape features are calculated using singular value decomposition of the hyperpnoea ventilation signal as follows: First, the hyperpnoea is extracted from the respiratory signal and the absolute value is taken of the respiratory signal, giving a ventilation signal. The ventilation signal is scaled by its mean value to give a vector of values V.sub.hyperp. For mathematical convenience the time base of the hyperpnoea [0 . . . T], where T is the end of the hyperpnoea, is mapped to the interval [0 . . . 2]. A set of four orthogonal functions are calculated and arranged as a 4m matrix (where m is the number of values in the hyperpnoea signal). A convenient set of orthonormal function are:
(19)
where t is the time base over the hyperpnoea from 0 to 2. The basis functions are shown plotted in
F.sub.P(14)=V.sub.hyperpPseudoInverse(M.sub.Basis),
and are normalized by:
(20)
where L.sub.2 is the L2 or Euclidean norm,
(21)
(22) The pseudoinverse M.sup.+ of a matrix M is a generalization of a matrix inverse, and exists for any (m,n) matrix M (for convenience assume m>n). If such a matrix M has full rank (n) one defines: M.sup.+=(M.sup.TM).sup.1M.sup.T. The solution of Mx=b is then x=M.sup.+b. (Pseudoinverses are useful because of a general theorem stating that F=M.sup.+v is the shortest length least squares solution to the problem MF=v.)
Jump Determination
(23) Since sudden jumps in the ventilation/flow at the beginning of an hyperpnoea are characteristic of OSA, (see
(24)
where e[i] is the approximate envelope, f.sub.s is the sampling frequency and v[i] is the ventilation signal. The envelope is interpolated over a new two-second time base (chosen to be roughly the time-length of a breath) to give e.sub.1 (between non-breathing intervals). The maximum positive difference e.sub.1e.sub.1(i-1) (over the two second interval) is found in the interpolated signal in the interval between the beginning of the envelope and the point at which the envelope attains its maximum value. Finally, the maximum difference is scaled by the mean value of the ventilation signal to give the jump feature.
Secondary Feature Determination
(25) Secondary features are calculated from primary features using the (measure of variation) statistics detailed below. (Note log denotes the logarithm to base e.) First we define the standard deviation as:
(26)
For length measures (e.g. hypopnoea length) and the jump feature the four features are:
(27)
(28) For hyperpnoea shape features the four features are:
(29)
Additional Feature Determination
(30) Additional features can be calculated using the entire (e.g. 30 minute) epoch signal. One such feature is derived from the spectrogram of the epoch signal and determining that Cheyne-Stokes breathing is present if the spectrogram indicates that the signal has a peak. This feature is calculated as follows: First, the mean of the respiratory signal is calculated and subtracted from the respiratory signal and the resulting signal is chopped into n slices which overlap each other by exactly half the slice length. Each slice is next windowed, preferably using a Hanning window (to reduce edge effects).
(31) The use of a Hanning window to prepare the data for a FFT is as follows: The FFT function treats the N samples that it receives as though they formed the basic unit of a repetitive waveform: It assumes that if one took more samples they would repeat exactly, with the (N+1) sample being identical to the first sample, and so on. The usual case is that if one's N samples start at one point in a cycle, they end at some other point, so that if one really did play these back in a loop one would get a discontinuity between the last sample and the first. Hence one tapers both ends of the set of samples down to zero, so they always line up perfectly if looped. The formal name for this process is windowing, and the window function is the shape that we multiply the data by. When the window function is the raised cosine 1+cos t the window is termed a Hanning window. Other periodic functions can be used, yielding other windows.
(32) Next, since CS data appears periodic, a fast Fourier transform is applied to each windowed slice, yielding a complex vector result for each slice. The absolute value is taken of each complex result yielding a real valued vector per slice. The mean is taken of the resulting vectors to yield one vector. The natural log is taken of the subsequent vector and the values in the frequency range 0 Hz to 0.075 Hz are extracted to form a sub-vector, which is then de-trended. Cheyne-Stokes behavior is present if the spectrogram indicates the signal has a peak in the range 0 Hz to 0.075 Hz.
(33) Briefly, the method of detrended fluctuation analysis is useful in revealing the extent of long-range correlations in time series, where the time series is a vector of data pairs (t.sub.i, x.sub.i), where t represents time and x represents the variable being measured. De-trending consists of subtracting from the x values, values that have been calculated using a polynomial of order n that has been fitted to the data. For example, for order zero the polynomial is simply the mean of all the x values, and that mean is subtracted from the original values. For order one, the polynomial is simply a linear fit to the data (t.sub.i, x.sub.i). Values calculated using the best linear fit are then subtracted from the original values (so removing any linear trend). For order two the fitted polynomial is a quadratic, for order three a cubic etc.
(34) The feature is then calculated as the maximum minus the mean of the de-trended vector. Alternatively one could calculate the entropy of the FFT instead of its peak.
(35) Additional features can be derived by applying wavelet analysis to each epoch. In this case wavelet coefficients or statistics derived from wavelet coefficients are used as features for the epoch. This yields the location of the peak in time. In wavelet analysis a wave packet, of finite duration and with a specific frequency, is used as a window function for an analysis of variance. This wavelet has the advantage of incorporating a wave of a certain period, as well as being finite in extent. A suitable wavelet (called the Morlet wavelet) is a sine wave multiplied by a Gaussian envelope.
Classification
(36) A subset of features is then selected for use by the classifier. It is known that a particular subset of features can provide more accurate classification than the full set of features. This is caused in part by the so-called curse of dimensionality, whereby the required number of training samples increases with the number of features used. The curse of dimensionality causes networks with lots of irrelevant inputs to behave relatively badly: Where the dimension of the input space is high, the network uses almost all its resources to represent irrelevant portions of the space.
(37) An algorithm is employed to select the best subset based on the training data. Ideally every subset of features should be tested for accuracy and the best subset chosen. The number of subsets is 2.sup.n-1 where n is the number of features. Unless there is a small number of features the exploration of all subsets is impractical and, in any case, accuracy measures tend to be noisy which further hampers the search for the best subset. Alternative algorithms that enable selection of good feature subsets include best first, remove worst, random start with add and remove, simulated annealing and genetic algorithms.
(38) A method often used to measure accuracy is 10-fold cross-validation. The training data are split into ten groups or folds and ten different accuracy tests are performed. In each case 9 tenths of the folds are used for training and the resulting classifier is tested for accuracy on the remaining tenth. Statistics are performed on the 10 results to give a measure of accuracy.
Training the Classifier
(39) Once a feature subset is chosen, the classifier is trained using the entire training data set. A number of classifier types are available including: Baysean maximum likelihood linear and quadratic discriminants, neural networks and support vector machines. In each case a discriminant function is calculated which, when applied to features calculated from new data to be classified, provides probability estimates for different classes. The data (epoch) is assigned to the class with the highest probability.
(40) In one particular embodiment the discriminant function includes or preferably consists of two weight vectors (of the same length as the feature subset) and two constants. When the desired feature subset has been extracted from the respiratory epoch, the discriminant functions and probability are calculated as follows:
(41)
(42) where W.sub.1, W.sub.2 are vectors and C.sub.1, C.sub.2 are constants.
(43) The probability cutoff may be set at 0.5 in which case a probability of 1.0 would equate to class A and a probability of 0.0 to class B. The cutoff can be adjusted to suit the desired sensitivity and specificity. This is a two-way classification. With suitable training data, a three-way classification is also possible as are even higher n-way classifications.
(44) In one particular embodiment the classification of each epoch could be displayed in a bar chart as in
Cheyne-Stokes Classifier Based on a Flow Signal or an SpO2 Signal or Both
(45) The ApneaLink device is capable of measuring an estimate of a patient's flow signal which can be used as an input to the algorithm described herein. Equally there are similar portable devices that can measure and log SpO2, the saturation of oxyhemoglobin in the blood as estimated by pulse oximetry. Pulse oximetry is a simple non-invasive method of monitoring the percentage of haemoglobin (Hb) which is saturated with oxygen. The pulse oximeter consists of a probe attached to the patient's finger or ear lobe which is linked to a computerised unit.
(46) SpO2 is typically reported as a percentage, values above 95% being normal and those below 95% indicating some degree of hypoxia (lack of oxygen in the blood). Should a patient undergo an apnoea or hypopnoea, it is usual for the SpO2 signal to fall concomitantly with the ventilation, albeit after some delay. During Cheyne-Stokes breathing the SpO2 signal will undergo the classic waxing and waning pattern also characteristic of the ventilation.
(47) Hence, it is conceivable that the algorithm described herein might use a flow signal estimate (ventilation) or an SpO2 signal or both signals to classify breathing patterns as being typical of Cheyne-Stokes, OSA, mixed apnoeas etc.
(48)
Example 1
(49) A set of data for testing the ability of flow data to be classified into OSA and CS instances consisted of 90 patient studies of approximately 8 hours each. For purposes of the test, both nasal pressure, flow and two effort signals (abdomen & thorax) were recorded, making a confirming diagnosis of the underlying disease possible. The set was divided into 3 groups of 30 patients: OSA (obstructive apnoea), CS and Mixed. The data were further classified (initially) on a 30-minute time-bin basis. The time periods were classified into the following categories: No apnoeas or hypopnoeas (<5) within the time period; Primarily CS breathing (>90%); Primarily OSA (>90%); Primarily (>90%) apnoeas and hypopnoeas of mixed type (i.e. having a central component followed by a number of obstructed breaths); A combination of different events, typically brief periods of CS or mixed apnoeas interspersed between OSA; Patient is moving and the signal is of too low a quality to be useable.
(50) Typically if CS disease is present, CS breathing will occur in large blocks of at least 20-30 minutes. The data set contained very few periods of pure mixed apnoeas. Rather, the mixed group of 30 patients contained periods of OSA, CS breathing or a mixed picture.
Feature Analysis
(51) All features were analyzed by calculating distributions for the different groups (OSA, Mixed, and CS). The distribution was normalized by application of an appropriate function, for example
Cluster Analysis
(52) Both k-means and fuzzy k-means clustering techniques were utilized to visualize feature separation power. The features were first averaged on a per-patient basis and then cluster analysis was used to demonstrate a natural clustering into correct groups.
Feature Temporal Averaging
(53) The training of a classifier using patterns assigned to individual events is problematical. Temporal averaging was used to reduce the amount of calculation, while also (potentially) increasing statistical power. A 30-minute time-bin was chosen as a best first-guess. After temporal averaging, a new set of per-time-bin patterns is created. The raw features used (visible separation of groups) were: hypopnoea length; hyperpnoea length; 1.sup.st Fourier shape feature; 2.sup.nd Fourier shape feature; and normalized max jump. The time-averaged 30-minute bin features tested were (std=standard deviation, meansq=mean of square of values, sqrt=square root, shift=allows calculation of temporal difference).
Classifier Training and Testing
(54) Once the data had been processed and the expert diagnosis made, a group of 1440 30-minute bins was available for classifier training (90 patients16 bins).
Classifier Selection
(55) Numerous statistical methods exist for the training of a classifier from n-dimensional data, e.g.: nearest neighbor, neural nets, cluster analysis. However, because the data appeared linearly separable, Bayesian decision theory was used. This theory (which relies on underlying normal probability density functions) uses the minimization of the Bayes error to calculate a discriminant surface. Such a surface separates the data into one of n categories (in this case 2). Both linear and quadratic discriminant functions were utilized. The former separates the data with a hyperplane in m dimensions (where m is the number of features) while the latter separates the data with a hyperquadric. A hyperplane discriminant is always preferred (assuming accuracy of the same order), as it will tend to be well behaved in areas of minimal data coverage.
Over-Optimistic Train and Test
(56) The classifier was trained using the training set and then the classifier was tested using the same data. This results in over-optimistic values of sensitivity and specificity, as one would intuitively expect. However, again this is an insightful process and one can use a minimal features set (3 features) in order to visualize the result.
Results
(57) During each test the accuracy, sensitivity and specificity were noted as was the current features set (or group of feature sets) with the best accuracy. Estimates of accuracy, sensitivity and specificity resulted of the order of 91%, 91% and 96% respectively.
Example 2
Flow Filtering
(58) The flow is filtered first to remove unwanted and uninteresting high-frequency content. The filter used is a digital FIR (finite impulse response) filter designed using the Fourier method using a rectangular window. The filter has a pass-band from 0 to 0.9 Hz, a transition band from 0.9 to 1.1 Hz and a stop band above 1.1 Hz. The number of terms in the filter varies with sampling frequency. The flow signal is filtered by convolving the time series point-wise with a filter vector.
Ventilation Calculation
(59) A long-term ventilation signal y.sub.long is calculated using a simple (first order) low-pass filter applied to the flow signal. A time constant of 200 seconds is used (longer than the longest possible cycle of Cheyne-Stokes breathing). In order to measure ventilation (and not mean flow), the filter is applied to the square of the flow signal and the square root is taken of the filter output. Next, a ten-second ventilation y.sub.10 is calculated (a more recent measure). This measure is created by convolving the square of the flow signal with a 10-second square wave with an area of one, i.e. a 10-second-long moving average, and then taking the square-root of the result. This filter will have a five second delay constant over the frequency range of interest. For this reason the signal is shifted left by five seconds so that it lines up with the original signal for timing purposes.
Event Detection from Ventilation Signals
(60) The 10-second ventilation signal is used to create low and high thresholds for detection of events (hypopnoea-hyperpnoea sequences). The thresholds are:
thresh.sub.low=0.5y.sub.long;
thresh.sub.high=0.75y.sub.long;
The timing of events is calculated using the following algorithm:
1. Find all points where y.sub.10<thresh.sub.low.
2. Find all contiguous sections of the above points. These are provisional hypopnoeas.
3. Find all points where y10>thresh.sub.high.
4. Iterate over all of the hypopnoeas identified in step 2. If no points identified in step 3 (hyperpnoeas) fall between hypopnoea n and hypopnoea n+1, then the hypopnoeas n & n+1 are joined together (because no hyperpnoea has been identified between them) to form one hypopnoea. Repeat for all iterations.
5. The hypopnoeas are now confirmed. All inter-hypopnoea regions are considered hyperpnoeas. Each hypopnoea-hyperpnoea event constitutes one possible Cheyne-Stokes cycle. E.g. in
Calculate Event Timings
(61) Event timings are calculated for each event as follows:
.sub.hypopnoea=t(end_of_hypopnoea)t(beginning_of_hypopnoea);
.sub.cycle=t(beginning_of_next_hypopnoea)t(beginning_of_hypopnoea);
.sub.hyperpnoea=t.sub.cyclet.sub.hypopnoea;
(62) Obviously the above events will include some unwanted garbage. For example, a one-hour-long period of normal breathing bracketed on each side by Cheyne-Stokes breathing will look like a one-hour-long hyperpnoea! (y10 always greater than threshold). Hence, the following sensible limits are applied to the events:
.sub.hypopnoea: minimum=10 seconds, maximum=100 seconds,
.sub.cycle: minimum=15 seconds, maximum=250 seconds,
.sub.hyperpnoea: minimum=5 seconds.
(63) All events outside these limits are rejected and not processed. We now have event timings and the ability to extract parts of the flow waveform for further analysis. For example, we can iterate over all the events and select out those parts of the flow waveform that correspond to hyperpnoeas.
(64) While the invention has been described in connection with what are presently considered to be the most practical and preferred embodiments, it is to be understood that the invention is not to be limited to the disclosed embodiments, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the invention.