Method and Device for Associating a State to a New Value Output by a Drifting Sensor

20170344894 · 2017-11-30

Assignee

Inventors

Cpc classification

International classification

Abstract

The present invention relates to a method of associating at least one state in a plurality of states to a new value output by a drifting sensor, the method comprising: /a/ receiving a signal from the sensor, said signal comprising a plurality of values; /b/clustering the values of said signal into a number of clusters equal to the number of the plurality of states, each cluster being associated with a respective state in the plurality of states; /c/ for the new value of the signal, associating at least one state in said plurality of states or a probability rating representing the probability to be associated with one state in said plurality of states for said new value of the signal, the associated state or the associated probability rating being determined based on at least distances (d.sub.H, d.sub.L) of said new value of the signal to respective clusters.

Claims

1. A method of associating at least one state in a plurality of states to a new value output by a drifting sensor, the method comprising: /a/ receiving a signal from the sensor, said signal comprising a plurality of values; /b/ clustering the values of said signal into a number of clusters equal to the number of the plurality of states, each cluster being associated with a respective state in the plurality of states; /c/ for the new value of the signal, associating at least one state in said plurality of states or a probability rating representing the probability to be associated with one state in said plurality of states for said new value of the signal, the associated state or the associated probability rating being determined based on at least distances (d.sub.H, d.sub.L) of said new value of the signal to respective clusters.

2. The method according to claim 1, wherein, prior to step /b/, the signal is compressed into a compressed signal having compressed values, the compressed values of the compressed signal being used as the values of the signal in step /b/, and wherein said compressing comprises: /d/ initializing an average value to a first value of the signal, /e/ for each second value in a plurality of second values of the signal output after the first value from the sensor: /θ1/ if a distance (ΔV) between the second value and the average value is greater than a predetermined threshold, storing the average value as a compressed value into a memory and setting the average value to the second value, /e2/ otherwise, updating the average value to a new average value as a function of the second value and the average value.

3. The method according to claim 2, wherein, in the step /e/ and prior to the test /e2/, another test is executed: /e3/ if a number of second values used to determine the average value is greater than a predetermined threshold, setting the average value to the second value.

4. The method according to claim 3, wherein, in test /e3/, storage of the average value into a memory is performed prior to setting the average value to the second value.

5. The method according to claim 2, wherein, in step /e/, the average value is stored along a number of second values used for the determination of the average value after a previous storage of the average value.

6. The method according to claim 2, wherein each of the second value is associated with a respective time, and wherein in step /e/, the average value is stored along a minimum time among all the times associated with a second value used for the determination of the average value after a previous storage of the average value.

7. The method according to claim 1, wherein the clustering of step /b/ comprises the use of a k-means algorithm.

8. The method according to claim 1, wherein the clustering of step /b/ comprises the use of an unsupervised clustering algorithm.

9. The method according to claim 2, wherein the clustering of step /b/ comprises a weighting of the values of the signal by a number of second values used for the determination of the average value after a previous storage of the average value.

10. The method according to claim 1, wherein step /c/ comprises the use of a forward algorithm.

11. The method according to claim 1, wherein step /c/ comprises the use of a decision tree.

12. A non-transitory computer readable storage medium, having stored thereon a computer program comprising program instructions for associating at least one state in a plurality of states to a new value output by a drifting sensor, the computer program being loadable into a data-processing unit and adapted to cause the data-processing unit to carry out, when the computer program is run by the data-processing device: /a/ receiving a signal from the sensor, said signal comprising a plurality of values; /b/ clustering the values of said signal into a number of clusters equal to the number of the plurality of states, each cluster being associated with a respective state in the plurality of states; /c/ for the new value of the signal, associating at least one state in said plurality of states or a probability rating representing the probability to be associated with one state in said plurality of states for said new value of the signal, the associated state or the associated probability rating being determined based on at least distances of said new value of the signal to respective clusters.

13. A device comprising: a sensor for outputting a signal, said signal comprising a plurality of values; a memory; a circuit for clustering the values of said signal into a number of clusters equal to the number of a plurality of states, each cluster being associated with a respective state in the plurality of states; a circuit for associating at least one state in said plurality of states or a probability rating representing the probability to be associated with one state in said plurality of states for a new value of the signal, the associated state or the associated probability rating being determined based on at least distances of said new value of the signal to respective clusters.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The present invention is illustrated by way of example, and not by way of limitations, in the figures of the accompanying drawings, in which like reference numerals refer to similar elements and in which:

[0052] FIG. 1 is an example of a drifting output value of a sensor;

[0053] FIG. 2a is an example of a “compression” of a signal into a piecewise function in a possible embodiment of the invention at a first time;

[0054] FIG. 2b is an example of a “compression” of a signal into a piecewise function in a possible embodiment of the invention at a second time after the first time;

[0055] FIG. 2c is an example of a “compression” of a signal into a piecewise function in a possible embodiment of the invention at a third time after the second time;

[0056] FIG. 2d is an example of a “compression” of a signal into a piece wise function in a possible embodiment of the invention at a fourth time after the third time;

[0057] FIG. 3 is an example of “clustering” of a signal in a possible embodiment of the invention;

[0058] FIG. 4 is an example of a determination of a cluster associated with a new event in the signal in a possible embodiment of the invention;

[0059] FIG. 5 is a flow chart describing a possible embodiment of the present invention;

[0060] FIG. 6 is a possible embodiment for a device that enables the present invention.

DETAILED DESCRIPTION OF THE DISCLOSURE

[0061] FIG. 2 is an example of “compression” of a signal into a piecewise function in a possible embodiment of the invention.

[0062] A signal output by a sensor is often a high frequency sampled set of values. For instance, said of values may be derived from a continuous signal after a sampling of 5 Hz to 50 Hz or may be generated by measures made by the sensor at 5 Hz to 50 Hz.

[0063] Therefore, the signal may comprise a large number of values and it can be a problem for electronic devices with limited computing capabilities and/or memory capabilities.

[0064] Most of the time for small electronic devices (e.g. home connected devices), the whole signal cannot be stored in a memory and the manipulation of said signal may be difficult.

[0065] In order to avoid storing unneeded information, the following process may be executed.

[0066] Upon receiving a new value v.sub.200 (FIG. 2(a), 200) of the signal at time t.sub.0, it is determined if an average value 210 (namely V) is defined.

[0067] If not, the average value is initialized: the average value V is then defined to a value equal to the new value V.sub.200 of the signal (FIG. 2(a)) i.e. V=V.sub.0=V.sub.200.

[0068] In addition, a number of point N.sub.points is initialized to 1 and a starting time t.sub.start is set to t.sub.0.

[0069] Upon receiving a new value v.sub.201 (FIG. 2(b), 201) of the signal at time t.sub.1, and if the average value v defined/initialized, said average value V is updated to a new value V.sub.1 function of the old average value V and the new value V.sub.201. For instance, it is possible to compute:

[00001] V _ V _ .Math. N points + V 201 N points + 1

[0070] In addition, it is possible to update the number of points:


N.sub.points←N.sub.points+1

[0071] Upon receiving a new value V.sub.302 (FIG. 2(c), 202) of the signal at time t.sub.2, the same process described in relation of FIG. 2(b) is executed: as the average value V is defined, said average value V is updated to a new value V.sub.2 function of the old average value V and the new value V.sub.202. For instance, it is possible to compute:

[00002] V _ V _ .Math. N points + V 202 N points + 1

[0072] In addition, it is possible to update the number of points:


N.sub.points←N.sub.points+1

[0073] Nevertheless, it is possible to add further conditions for the updating of the average value V.

[0074] For instance, if the number of points N.sub.points is greater than a predetermined threshold, the set of the average value V, the starting timt.sub.start and the number of points N.sub.points may be stored in a memory to represent the compressed signal.

[0075] Then, the average value V may be unset (or set to “undefined”).

[0076] To further compress the signal, it is also possible to skip the storing step (for this condition) and only set the average value V to the next received value of the signal/the last received value of the signal without unsetting the average value V: by doing so, the starting time t.sub.start and the number of points N.sub.points are kept without being resetting. It is equivalent to setting all the previous “pieces” of the compressed piecewise signal to the new current average value V (e.g. searching all the consecutive and previous storage in the memory where the difference between the stored average value and the current average value is below a predetermined threshold and reset all the found stored average value to the current average value).

[0077] Alternatively or in addition, if a distance between the new value V.sub.203 (FIG. 2(d), 203) of the signal at time t.sub.3 and the average value V is greater than a predefined threshold (e.g. if ΔV=|V.sub.203−V| is greater than a predefined threshold), the set of the average value V, the starting time t.sub.start and the number of points N.sub.points may be stored in a memory to represent the compressed signal.

[0078] Then, the average value V may be unset (or set to “undefined”). The value V.sub.203 is thus processed as the value V.sub.230 in FIG. 2(a) and a new average value V is created (220) equal to V.sub.203.

[0079] Therefore, the “compressed” signal comprises a number of “pieces” of piecewise signal, each piece being defined by a start (e.g. a starting time t.sub.start), a length (e.g. a number of points N.sub.points) and a value (e.g. an average value V).

[0080] The pseudo-code for this compressing may be:

TABLE-US-00001 foreach (new_signal_value) then if (isset(average_value)) then if (|new_signal_value−average_value|>thres_val1) then store(average_value, nb_value, time_start) ; average_value = new_signal_value ; nb_value = 1 ; time_start = get_time(new_signal_value) ; else if (nb_value>thres_val2) then average_value = new_signal_value ; else average_value = (new_signal_value+average_value* nb_value)/(nb_value+1) ; nb_value ++ ; endif end if else average_value = new_signal_value ; nb_value = 1 ; time_start = get_time(new_signal_value) ; end if end if

[0081] Alternatively, the pseudo code may be also:

TABLE-US-00002 foreach (new_signal_value) then if (isset(average_value)) then if (|new_signal_value−average_value|>thres_val1) then store(average_value, nb_value1, time_start) ; average_value = new_signal_value ; nb_value1 = 1 ; nb_value2 = 1 ; time_start = get_time(new_signal_value) ; else if (nb_value2>thres_val2) then average_value = new_signal_value ; nb_value2 = 1 ; else average_value = (new_signal_value+average_value* nb_value2)/(nb_value2+1) ; nb_value1 ++ ; nb_value2 ++ ; endif end if else average_value = new_signal_value ; nb_value1 = 1 ; nb_value2 = 1 ; time_start = get_time(new_signal_value) ; end if end if

[0082] In the latter pseudo code, the variable nb_value has been split into two variables i.e. nb_value1 and nb_value2. Indeed, nb_value1 represents the number of values used since the last storing of the average value while nb_value2 represents the number of values used since the resetting of the average value. This splitting increases the impact of a new value on the average value.

[0083] FIG. 3 is an example of “clustering” of a signal in a possible embodiment of the invention.

[0084] “Cluster analysis” or “clustering” is the task of grouping a set of objects (here the values of the signal) in such a way that objects in the same group (called a cluster) are “closer” to each other than to those in other groups (clusters). The number of clusters may be set to any number greater or equal to 2. “Closer” may be understood as “closer according to a given mathematical distance”. Any mathematical distance may be used.

[0085] This clustering is possible on the raw signal (i.e. the high frequency sampled signal) but it is advantageous to perform this clustering on a compressed signal (for instance, based on the method described in FIG. 2) as the memory and the processing means of the device may be limited.

[0086] If the signal is not compressed (i.e. the signal is sampled at a given/constant frequency), a clustering algorithm may be applied to the values of the signal without weighting.

[0087] If the signal is compressed, a clustering algorithm may be applied to the values of the compressed signal (i.e. V according to FIG. 2) with a weighting (i.e. each current point may be weighted by the length/the number of points N.sub.points associated with the current point).

[0088] Many clustering algorithm may be used such as an unsupervised clustering algorithm (e.g. k-means algorithm, see “Algorithm AS 136: A K-Means Clustering Algorithm” at

[0089] http://www.labri.fr/perso/bpinaud/userfiles/downloads/hartigan_1979_kmeans.pdf).

[0090] For instance, if two clusters are searched, a clustering algorithm may determine that the values of signal 300 may be split into two clusters 301 and 302.

[0091] It is advantageous to use a clustering algorithm that supports update mechanisms: when the clusters are determined and when a new value is received in the signal at a time t.sub.c, the cluster may be easily updated without re-computing the whole clusters.

[0092] For instance, when a point of the signal is newly received, this point may be associated with the closest cluster (e.g. the cluster whose barycenter is the closest).

[0093] FIG. 4 is an example of a determination of a cluster associated with a new event in the signal in a possible embodiment of the invention.

[0094] In said example, it is assumed that two clusters have been previously determined and that C.sub.H is a barycenter of one of the clusters and that C.sub.L is a barycenter of the other cluster.

[0095] Upon the reception of a new point 403 of the signal 400 at a time it is determined the distance d.sub.H of said point 403 to C.sub.H (line 401) and the distance d.sub.L of said point 403 to C.sub.L (line 402).

[0096] Based on said determined distances (and possible other parameters), it is possible to compute a value representing the probability the new value 403 represents an event of the first cluster (e.g. the user is present in the bed in the case the sensor is detecting a pressure in the bed) or of the second cluster (e.g. the user is not present in the bed in the case the sensor is detecting a pressure in the bed). This probability may be a binary probability (e.g. 0 or 1 only) or a “more complex” probability (e.g. a real value between 0 and 1).

[0097] For instance, the probability P.sub.H that the new value 403 represents an event of the first cluster (whose barycenter is C.sub.H) may be:

[00003] P H = d H d H + d L or .Math. P H = intval ( d H d H + d L )

[0098] where intval represents a function that returns the closest integer value.

[0099] P.sub.H may also be function of the previous values of the signal.

[0100] In addition, P.sub.H may be determined based on a learning process (e.g. with a neural network for instance). Therefore, a decision tree may be used to limit the use of memory during the determination of P.sub.H. Hysteresis thresholding or forward algorithm may also be used for such determination.

[0101] FIG. 5 is a flow chart describing a possible embodiment of the present invention. Part of this flow chart can represent steps of an example of a computer program which may be executed by an electronic device.

[0102] Upon receiving 501 a signal (e.g. a high frequency sampled signal), it is possible to compress it (step 502) as detailed in relation of FIG. 2. The reception of said signal may be in one “block” (i.e. receiving a single set of data containing the whole signal) but may also be “on the fly” (i.e. receiving the data as soon as it is generated by the sensor).

[0103] The compression (step 502) is optional. The signal may be already compressed or it has been determined that the memory/processing means of the devices are not a limit for processing the data.

[0104] It is thus possible to compute (step 503) two or more clusters based on the signal (step 503) as detailed in relation of FIG. 3.

[0105] For each point of the signal (and especially the last received point if the signal is received on the fly), it is possible to determine a probability rating (step 504) as detailed in relation of FIG. 4.

[0106] Finally, this probability rating (505) may be output. Alternatively or in parallel, an indication to which state (i.e. cluster) the point is related may be output.

[0107] FIG. 6 is a possible embodiment for a device that enables the present invention.

[0108] In this embodiment, the device 600 comprise a computer, this computer comprising a memory 605 to store program instructions loadable into a circuit and adapted to cause circuit 604 to carry out the steps of the present invention when the program instructions are run by the circuit 604.

[0109] The memory 605 may also store data and useful information for carrying the steps of the present invention as described above.

[0110] The circuit 604 may be for instance: [0111] a processor or a processing unit adapted to interpret instructions in a computer language, the processor or the processing unit may comprise, may be associated with or be attached to a memory comprising the instructions, or [0112] the association of a processor/processing unit and a memory, the processor or the processing unit adapted to interpret instructions in a computer language, the memory comprising said instructions, or [0113] an electronic card wherein the steps of the invention are described within silicon, or [0114] a programmable electronic chip such as a FPGA chip (for custom-characterField-Programmable Gate Arraycustom-character).

[0115] This computer comprises an input interface 603 for the reception of the signal according to the invention and an output interface 606.

[0116] To ease the interaction with the computer, a screen 601 and a keyboard 602 may be provided and connected to the computer circuit 604.

[0117] Expressions such as “comprise”, “include”, “incorporate”, “contain”, “is” and “have” are to be construed in a non-exclusive manner when interpreting the description and its associated claims, namely construed to allow for other items or components which are not explicitly defined also to be present. Reference to the singular is also to be construed in being a reference to the plural and vice versa.

[0118] A person skilled in the art will readily appreciate that various parameters disclosed in the description may be modified and that various embodiments disclosed may be combined without departing from the scope of the invention.