Method and apparatus for determining a smoothed data point within a stream of data points
Abstract
A method and an apparatus for determining at least one smoothed data point (t k , s k ) within a stream of data points {t i , s i } with 1≦i≦z, k<z is disclosed. Herein, the stream of data points {t i , s i } is consecutively acquired in a manner that a data point (t i , s i ) is acquired after an acquisition of a preceding data point (t i-1 , s i-1 ), wherein each data point (t i , s i ) comprises a valid value or an invalid value or a missing value for the signal s i at a time t i . Herein, the signal s i at the time t i comprises physical, chemical, biological, environmental, and/or technical data acquired by means of a technical set-up. According to the method, a set of data points is provided, wherein for each smoothed data point (t k , s k ) a smoothing set is created. For each smoothed data point (t k , s k ), trailing data resulting from large gaps are removed until it is verified whether the smoothing set comprises a minimal number of data points. Thereafter, for each smoothed data point (t k , s k ) an initial slope set is calculated, on which at least one exponential smoothing is applied, in which cause an at least once modified slope set is determined. By integrating the at least once modified slope set, a value for the smoothed data point (t k , s k ) is determined and returned. The method provides a good degree of smoothing without introducing any lag time and with minimal distortions, and is capable of reporting derivatives for the set of smoothed data points at the same time. The method is particularly suited in real-time or nearly real-time measurements which may comprise large gaps within the stream of data points.
Claims
exact text as granted — not AI-modified1 - 19 . (canceled)
20 . A method for determining at least one smoothed data point (t k , s k ) within a stream of data points {t i , s i } with 1≦i≦z, k<z, wherein i, z, and k are integers, wherein the stream of data points {t i , s i } comprises a measurement series which is consecutively recorded by a sensor for determining at least one body function, wherein the stream of data points {t i , s i } is consecutively acquired in a manner that a data point (t i , s i ) is acquired by the sensor after a time interval Δt after an acquisition of a preceding data point (t i-1 , s i-1 ), wherein each data point (t i , s i ) in the stream of data points {t i , s i } either comprises
a valid value for a signal s i at a time t i , wherein the valid value for the signal s i is recorded at the time t i , or
an invalid value for the signal s i at the time t i , wherein the invalid value for the signal s i is recorded at the time t i and considered as invalid, or
a missing value for the signal s i at the time t i , wherein the missing value for the signal s i is missing at an expected time t i ,
wherein the recording of the signal s i at the time t i comprises acquiring physical, chemical, biological, environmental, or technical data,
wherein the method comprises the following steps:
a) Providing a set of data points which comprises the stream of data points {t i , s i } with 1≦i≦z, k≦z or a specific set which is selected from the stream of data points {t i , s i } or from a set of smoothed data points {t k , s k };
b) For each smoothed data point (t k , s k ), creating a smoothing set, wherein the smoothing set comprises a subset of data points {t l , s l }, wherein the subset of data points {t l , s l } is taken from the set of data points provided during the preceding step with
( k +offset−smoothing window+1)< l <( k +offset), (1)
wherein offset is a numerical value which comprises an offset number which defines a number of data points (t i , s i ) with t i >t k which are acquired prior to creating the smoothing set for the data point (t k , s k ) and which comprise a valid value, wherein the numerical value offset is chosen from an interval [1, 4], and wherein the smoothing window is a numerical value which defines a length of the smoothing set, wherein the numerical value smoothing window is chosen from an interval [7, 40];
c) For each smoothed data point (t k , s k ), verifying whether a first condition is fulfilled, wherein the first condition requires that in each pair of two adjacent data points {(t l-1 , s l-1 ), (t l , s 1 )} in the smoothing set the condition
( t l −t l-1 )≦gap length (2)
is fulfilled, wherein gap length is a numerical value which defines a maximum time difference which is admitted between the two adjacent data points within the smoothing set, wherein the numerical value gap length is chosen from an interval [5 Δt, 30 Δt];
if the first condition is not fulfilled for a certain l 0 , the data points (t l , s l ) with l<l 0 are removed from the smoothing set;
d) For each smoothed data point (t k , s k ), verifying whether a second condition is fulfilled, wherein the second condition requires that a numerical value n equals at least a numerical value minimal window, wherein n is a numerical value which equals a number of data points which remain in the smoothing set {t l , s l } after the preceding step, wherein minimal window is a numerical value which equals a number of data points which are required to remain in the smoothing set {t l , s l } after the preceding step, wherein the numerical value minimal window is chosen from an interval [5, 20];
if the second condition is not fulfilled, no value for the smoothed data point (t k , s k ) is determined and no smoothed data point (t k , s k ) or an error flag is returned;
if the second condition is fulfilled, proceeding with the subsequent step;
e) For each smoothed data point (t k , s k ), calculating a slope set {t l , s l ′} corresponding to the smoothing set with 1≦l≦n;
f) For each smoothed data point (t k , s k ), applying at least one exponential smoothing step to the slope set {t l , s l ′}, in which course an at least once modified slope set {t l , s l ′*} is determined;
g) For each smoothed data point (t k , s k ), integrating the at least once modified slope set {t l , s l ′*} determined in the preceding step, in which course the value for the smoothed data point (t k , s k ) is determined and returned;
wherein prior to step b) for each data point in the set of data points provided according to step a), or after step b) for each data point provided in the smoothing set according to step b), a criterion is applied in a verifying step to the data point to deciding whether the data point is retained or discarded.
21 . The method of claim 20 , wherein the criterion comprises the verifying step whether the data point (t j , s j ) comprises a valid value, or an invalid value, or a missing value, wherein the data point (t j , s j ) which comprises a valid value is retained, where the data point (t j , s j ) which comprises one of an invalid value or a missing value is discarded.
22 . The method of claim 20 , wherein an additional condition is verified whether at least one data point with a valid value exists in an offset, wherein the offset comprises offset number of data points (t i , s i ) with t i >t k acquired ahead of the smoothed data point (t k , s k ) for which step b) is currently performed, after having removed a number of data points from the smoothing set during the verifying step; if the additional condition is not fulfilled, no value for the smoothed data point (t k , s k ) is determined and no smoothed data point (t k , s k ) or an error flag is returned.
23 . The method of claim 20 , wherein the numerical value offset is chosen as 2; wherein the numerical value smoothing window is chosen from an interval [15, 25]; wherein the numerical value gap length is chosen from an interval [5 Δt, 15 Δt]; and wherein the numerical value minimal window is chosen from an interval [5, 10].
24 . The method of claim 20 , wherein the specific set provided in step a) is selected by taking every p-th item, whereby p is a numerical value chosen from an interval [2, 6].
25 . The method of claim 24 , wherein p subsets are selected, whereby the q-th subset comprises a number of items (t i , s i ) with i=q, p+q, 2p+q, . . . and with q≦p, as long as the item comprises a value which is valid, wherein the p subsets are merged after smoothing.
26 . The method of claim 20 , wherein the data point (t i , s i ) is acquired after the preceding data point (t i-1 , s i-1 ) comprises a value which is invalid or missing.
27 . The method of claim 26 , wherein the data point (t i , s i ) is acquired at a point of time t i which is prior to the end of the specific time interval Δt=(t i − i-1 ).
28 . The method of claim 20 , wherein the specific set is selected by retaining items at data points with t 0 , t 0 +Δt, t 0 +2r·Δt, . . . with 0<r and with r being an integer, or an adjacent item.
29 . The method of claim 20 , wherein step e) comprises the following sub-steps:
e1) Defining a numerical value SlopeRange as a number of data points employed to calculate a slope of each data point (t l , s l ), wherein the numerical value SlopeRange is chosen from an interval [3, 6]; e2) Assign a differentiation set {t m , s m } to each data point (t l , s l ), using the following procedure:
if SlopeRange is an odd number, selecting (SlopeRange−1)/2 data points before and (SlopeRange−1)/2 data points after each data point (t l , s l ), as long as the selected data points exist in the smoothing set; if a data point (t l , s l ) does not exist at an end of the smoothing set, working with the data points which do exist;
if SlopeRange is an even number, selecting SlopeRange/2 data points before and (SlopeRange/2−1) data points after each data point (t l , s l ), as long as the selected data points exist in the smoothing set; if a data point (t l , s l ) does not exist at an end of the smoothing set, working with the data points which do exist;
e3) Calculating the slope set {t l , s l ′} corresponding to the smoothing set according to the formula
s
′
=
d
∑
m
=
1
d
t
m
s
m
-
∑
m
=
1
d
t
m
∑
m
=
1
d
s
m
d
∑
m
=
1
d
t
m
2
-
∑
m
=
1
d
t
m
∑
m
=
1
d
t
m
(
3
)
where the sums Σ are calculated over the data points in the differentiation set {t m , s m } with d either being equal to SlopeRange or smaller if data points did not exist at the ends of the smoothing set, and the calculation is performed for each point in the smoothing set, 1≦l≦n.
30 . The method of claim 20 , wherein step f) comprises the following sub-steps:
f1) Applying a first forward exponential smoothing to the slope set {t l , s l ′} acquired in step e) in an ascending order 1, 2, . . . , n−1, n with
s 1 ′*=s 1 ′ and
s l ′*=W f1 ·s l ′+(1− W f1 )· s l-1 ′ for 1< l≦n, (4)
wherein is a first weight adapted for the first forward exponential smoothing, wherein the first weight W f1 is chosen from an interval [0.3, 0.6];
f2) Applying a reverse exponential smoothing to the slope set {t l , s l ′*} modified in the preceding sub-step in a descending order n, n−1, . . . , 2, 1 with
s n ′**=s n ′* and
s l ′**=W r ·s l ′*+(1− W r )· s l-1 ′* for 1≦ l<n, (5)
wherein W r is a second weight adapted for the reverse exponential smoothing, wherein the second weight W r is chosen from an interval [0.2, 0.5];
f3) Applying a second forward exponential smoothing to the slope set {t l , s l ′*} modified in the preceding sub-step in an ascending order 1, 2, . . . , n−1, n with
s 1 ′***=s 1 ′** and
s l ′***=W f2 ·s l ′**+(1− W f2 )· s l-1 ′** for 1< l≦n, (6)
wherein W f2 is a third weight adapted for the second forward exponential smoothing, wherein the third weight W f2 is chosen from an interval [0.3, 0.6].
31 . The method of claim 20 , wherein step g) comprises the following sub-steps:
g1) Calculating an average orig mean of the values s l with 1≦l≦n within the smoothing set prior to step e); g2) Numerically integrating the at least once modified slope set (t l , s l ′*) with
integral 1 =0 and
integral l =integral l-1 +[(1− w i )· s l ′***+w i ·s l-1 ′***]˜[t l −t l-1 ] for 1< l≦n, (7)
wherein w i is a fourth weight adapted for integrating, wherein the fourth weight w i is chosen from an interval [0.25, 0.75]; thereby creating an integrated set;
g3) Calculating an average new mean of the values integral i , with 1≦i≦n within the integrated set; g4) Calculating an integration constant int const by applying a formula
int const=orig mean−new mean; (8)
g5) Calculating the smoothed value of
s k =integral k +int const (9)
and return the value for the smoothed data point (t k , s k ) with k=n−offset.
32 . The method of claim 20 , wherein at least one triple data point (t k , s k , s k ′) is returned, wherein the triple data point (t k , s k , s k ′) includes a value s k ′ for the slope of the smoothed value s k .
33 . The method of claim 20 , wherein the sensor is adapted for recording the signal s i at the time t i which is related to a concentration of a substance in a volume, wherein the sensor is an optical sensor adapted for determining the concentration of the substance in the body fluid.
34 . An apparatus for determining at least one smoothed data point (t k , s k ) within a stream of data points {t i , s i } with 1≦i≦m, k<m, comprising
an instruction device for instructing a sensor to record a series of signals s i at a time t i and to deliver a stream of data points {t i , s i }, wherein the sensor is adapted for recording the signal s i at the time t i , wherein the recording of the signal s i at the time t i comprises acquiring physical, chemical, biological, environmental, or technical data, wherein at least some of the data points (t i , s i ) in the stream of data points {t i , s i } comprise a valid value for the signal s i at the time t i ;
a receiving and storing device for receiving and subsequently storing the stream of data points {t i , s i };
a calculating device for determining the at least one smoothed data point (t k , s k ) within the stream of data points {t i , s i } with 1≦i≦m,
which are configured to perform any steps according to claim 20 , wherein the apparatus is an analytical device for determining at least one body function, further comprising at least one sensor for recording at least one body function.
35 . The apparatus of claim 34 , wherein the at least one sensor is selected from the group consisting of: a sensor for measuring an analyte concentration of at least one analyte in a body tissue or a body fluid of the user; a cardiac sensor for determining at least one cardiac function of the user; a pulse sensor; a blood pressure sensor; an ECG; an EEG.
36 . The apparatus of claim 34 , wherein the apparatus is separated into at least two separate parts, wherein the instruction device is coupled to the sensor, wherein the instruction device comprises a wireless sending device, and wherein the receiving and storing device and the calculating device are coupled together.
37 . The method of claim 20 , for measuring an analyte concentration of at least one analyte in a body tissue or a body fluid of the user, determining at least one cardiac function of the user, determining a pulse of the user, determining a blood pressure of the user, recording an ECG, or recording an EEG.
38 . A computer program including computer-executable instructions for performing the method of claim 20 , when the program is executed on a computer or computer network.
39 . A computer-readable data carrier, on which the computer program of claim 38 , is stored.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.