MEASURING DEVICE FOR MEASURING THE DISTANCE OF A USER, AND RELATED MEASURING METHOD

Provided is a measuring device for measuring a distance between the measuring device and a user. The measuring device includes a distance sensor configured to generate a distance signal indicative of the distance, an IR radiation sensor configured to generate a temperature signal indicative of the IR radiation emitted by the user, and a control unit. The control unit is configured to: in a calibration mode, acquire the distance signal and the temperature signal respectively through the distance sensor and the IR radiation sensor and, on the basis of the distance signal and the temperature signal, generate a calibration curve which associates to each other values of the temperature signal with respective value of the distance; and in a calibrated mode, acquire the temperature signal through the IR radiation sensor and, on the basis of the temperature signal and the calibration curve, determine the distance.

BACKGROUND

Technical Field

The present disclosure relates to a measuring device for measuring the distance of a user. Furthermore, it relates to an electronic apparatus comprising the measuring device, to a measuring method implemented by the measuring device and to a related computer program product.

Description of the Related Art

As known, energy consumption is a critical parameter to be assessed in the design of electronic equipment such as PCs, soundbars, smart appliances, IoT apparatuses, where it is required to minimize energy consumption yet without reducing the functionality that these electronic equipments may offer.

Consequently, these electronic apparatuses are often automatically controlled as a function of some external factors, such as the presence of a user in proximity of the electronic apparatuses, in order to minimize energy consumptions. For example, the screen of a PC may be automatically activated or deactivated on the basis of whether or not the user is in proximity to the PC and in particular whether or not he/she is in a use position of the PC (i.e., within a predefined range of distance from the PC and in front of the screen). In this manner, the time in which the PC screen remains on without the PC being actually used is minimized and this allows the overall energy consumption of the PC to be reduced.

Several known solutions are available to automatically control such electronic apparatuses on the basis of measurements of distance, or at least of presence/absence, of the user from the same electronic apparatuses.

For example, using “Thermal MOS,” TMOS, sensors is known to detect the presence of the user in a predetermined zone.

The TMOS sensor is a known infrared sensor suitable for detecting the presence and movement of the user. In particular, the TMOS detects the intensity of the infrared, IR, radiation, emitted by a hot body (for example, the user of the electronic apparatus) present in a field of view (FoV) of the TMOS. The TMOS has low energy consumption (e.g., about 20 μA) and a wide field of view (e.g., with a detection angle of about 80°) but cannot generally be used for measuring the distance of the person from the sensor since the intensity of the IR radiation does not solely depend on the distance of the user from the sensor, but rather also depends on external factors such as environmental temperature and humidity and is subject to drift over time. In general, this is due to the fact that this IR sensor is not capable of measuring the absolute distance of the user from the TMOS sensor but may rather detect the intensity of the IR radiation generated by the bodies emitting IR radiation (which is indicative of their temperature and is correlated to their distance from the TMOS sensor).

For this reason, the TMOS is not used in applications that require accurate measurements of the distance of the user but is rather used to detect the presence or absence of the user within a predefined distance range.

A sensor that is instead commonly used to measure the distance of objects or people is a Time of Flight (ToF) sensor. The ToF sensor may be based on different technologies, such as ultrasonic technology or optical technology.

In the exemplary case of the ultrasonic ToF sensor, it comprises an emitter configured to emit ultrasounds towards the body to be detected, and a receiver configured to receive the ultrasounds which, after being emitted by the emitter, have been reflected by the body to be detected. The ultrasonic ToF sensor measures the time of flight of the ultrasounds (i.e., the time interval elapsing between the emission of the ultrasounds by the emitter and their reception by the receiver) and calculates the distance of the body with respect to the ToF sensor on the basis of the time of flight measured. The operating principle of the optical ToF sensor is completely similar to that of the ultrasonic ToF sensor but, instead of being based on the emission and reception of ultrasonic waves, it is based on the emission and reception of light radiation (e.g., the emitter may include a “Single Photon Avalanche Diode,” SPAD).

Consequently, the ToF sensor allows the distances of bodies (for example a person) present in the field of view of the ToF sensor to be measured. The ToF sensor has a high precision in measuring the distance of the user from the sensor but also has high energy consumption (e.g., about 20 mA) and a very narrow field of view (e.g., with a detection angle of about 25°).

For these reasons, the ToF sensor is generally used for measuring distance, although the previously listed issues do not make its use optimal in several applications (e.g., low-power applications).

The need is therefore felt to detect the distance of the user from the electronic equipment (e.g., a PC) with high precision and without high energy consumptions, in order to automatically control the functionalities of the electronic equipment (for example for automatically turning the PC screen on and off on the basis of the user's presence).

BRIEF SUMMARY

According to the present disclosure, a measuring device, an electronic apparatus, a measuring method and a computer program product are provided.

In particular, the Figures are shown with reference to a triaxial Cartesian system defined by an X axis, a Y axis and a Z axis, orthogonal to each other.

In the following description, elements common to the different embodiments have been indicated with the same reference numbers.

DETAILED DESCRIPTION

FIG.1shows an electronic apparatus10usable by a user (shown inFIG.2with the reference11).

FIG.1shows the illustrative and non-limiting case wherein the electronic apparatus10is a PC (therefore hereinafter also indicated with the reference10). In the following, this exemplary case is considered, nonetheless other types of electronic apparatuses10may be similarly considered. For illustrative and non-limiting purposes, the electronic apparatus10may also be a soundbar, a smart appliance, an IoT apparatus, a tablet, etc.

The PC10comprises a measuring device20better described hereinbelow and configured to measure the distance of the user11from the PC10.

In particular, the measuring device20extends at a main surface12of the PC10which the user11faces when the latter is present and is in a use position (or interest position, predefined position) of the PC10.

In detail, the use position is the position, or more generally the set of positions, in which the user11may use the PC10. For example, the use position is identified by the fact that the user11is placed in front of the PC10and is distant from PC10by a distance lower than a threshold distance. In greater detail, the distance (shown inFIG.2with the reference D) between the user11and the measuring device20may be considered as the distance between the user11and the PC10and the threshold distance may be, for illustrative and non-limiting purposes, equal to about 80 cm.

For example, the PC10comprises a screen14which defines part of the main surface12and, as shown inFIG.1, the measuring device20may extend on the screen14, for example laterally to a video camera16of the PC10.

In this manner, when the user11is in the use position of the PC10, the user11faces the measuring device20which may therefore measure the distance D present between it and the user11.

With reference toFIG.2, the measuring device20is now described in more detail.

The measuring device20comprises a control unit22, a distance sensor24and an infrared, IR, radiation sensor26. Hereinafter, the IR radiation sensor26is also more simply called IR sensor26.

According to an exemplary embodiment, the control unit22(such as a microprocessor, a microcontroller or a dedicated calculation unit) is an electronic control unit which may comprise, coupled to each other, a data storage unit (not shown, such as a memory, e.g., a non-volatile memory) for storing acquired data and a processing unit (not shown) for processing acquired data. In a manner not shown and known per se, the control unit may also comprise one or more of the following components: an electrical energy storage module (e.g., a battery), a power management module for managing the electrical energy, a digital front-end interface module with the distance sensor24and the IR sensor26, a communication module (e.g., a radio communication module based on Bluetooth technology).

The distance sensor24and the IR sensor26are coupled (e.g., electrically coupled) to the control unit22. For example, the distance sensor24and the IR sensor26are coupled to the control unit22through the digital front-end interface module of the control unit22, of a per se known type.

For example, the distance sensor24and the IR sensor26may optionally be of micro electro-mechanical systems, MEMS, type. In other words, they may be made using known micromanufacturing techniques for processing semiconductor materials, such as for example silicon. Nonetheless, other technologies may be similarly considered.

The distance sensor24is a distance sensor of known type, configured to measure the distance D between the user11and the measuring device20when the user11is in a field of view24′ of the distance sensor24.

In particular, the distance sensor24is a time of flight (ToF) sensor, for example an ultrasonic or optical ToF sensor.

Hereinafter, the case wherein the distance sensor24is an optical ToF sensor is exemplarily considered, however other types of ToF sensors (e.g., ultrasonic sensors) or distance sensors may be considered.

In use, the distance sensor24generates a distance signal Sdwhich is received by the control unit22and is indicative, when the user11is in the field of view24′, of the distance D of the user11from the distance sensor24(i.e., from the measuring device10).

The IR sensor26is an IR radiation sensor configured to detect the IR radiation emitted by an emitting body (i.e., a hot body and in particular the user11) when the latter is in a field of view26′ of the IR sensor26.

In particular, the IR sensor26is a “Thermal MOS”, TMOS, sensor, of known type and which operates as a detector of the IR radiation emitted by the user11.

In particular, the TMOS is a field effect transistor device of known type and typically used in sensor applications to determine the amount of radiation (in detail IR radiation) emitted by an emitting body, here the user11. The emitting body is any hot body that emits IR radiation, such as a person or an animal. The radiation, emitted by the emitting body and received by the TMOS, causes the generation of charge carriers at the conductive channel of the TMOS and, therefore, a corresponding variation in the output current of the TMOS; the latter may be related to the extent of the radiation emitted by the object under examination, in such a way as to have a measure of the radiation emitted by the emitting body.

In general, the TMOS allows the presence or absence of the user11to be detected in its field of view26′.

According to an embodiment exemplarily considered hereinbelow, the TMOS present in the measuring device10is the Infrared Temperature Sensor TMOS marketed by STMicroelectronics with the reference code STHS34PF80 (further details may be found at the address https://www.st.com/en/mems-and-sensors/infrared-ir-sensors.html).

In particular, the TMOS sensor (in detail STMicroelectronics' STHS34PF80) is capable of generating one temperature signal correlated to the presence or absence of the user11in the field of view26′.

The temperature signal is a signal indicative of the temperature of the entities (living beings such as people or inanimate but hot objects such as heating apparatuses) present in the field of view26′ of the IR sensor26.

Consequently, the temperature signal is determined as a function of both the IR radiation emitted by the user11present in the field of view26′ of the TMOS sensor, and the IR radiation which may normally be present in the environment wherein the TMOS sensor is placed even in the absence of living beings. In other words, the temperature signal has a baseline which depends on the amount of environmental IR radiation that the TMOS sensor measures in the absence of the user11in the field of view26′ (e.g., due to electromagnetic noise of the environment wherein the TMOS sensor is present, at the temperature of the air surrounding the TMOS sensor, etc.), and may vary with respect to this baseline when the TMOS sensor detects the IR radiation emitted by the user11, which adds to the environmental IR radiation already present. Consequently, peaks of the temperature signal of the TMOS sensor with respect to its baseline are indicative of the presence of the user11in the field of view26′ of the IR sensor26.

In particular, the TMOS sensor may be of temperature-compensated type, in a per se known manner.

In the embodiment here considered wherein the TMOS sensor is the STMicroelectronics' STHS34PF80, the temperature signal corresponds to the signal Tobject(or even Tobj) indicated in the datasheet of the TMOS sensor. For this reason, hereinafter the temperature signal is indicated with the reference Tobject.

Therefore, in use, the IR sensor26generates the temperature signal Tobjectwhich is received by the control unit22and is indicative, when the user11is in the field of view26′, of the intensity of the IR radiation emitted by the user11and detected by the IR sensor26. Considering that the IR radiation detected by the IR sensor26is directly proportional to the intensity of the IR radiation emitted by the emitting body but is also inversely proportional to the distance between the IR sensor26and the emitting body, the temperature signal Tobjectis correlated to the distance D of the user11from the IR sensor26(i.e., from the measuring device10). Consequently, and as better described hereinbelow, the distance D may be measured starting from the temperature signal Tobject.

In particular,FIG.3shows an example of the temperature signal Tobjectas the distance of the user11from the measuring device10varies. The curve shown inFIG.3is better described hereinbelow.

For example, in the present application the TMOS sensor may operate with an “output data rate” (ODR) equal to about 8 Hz.

As shown inFIG.2, the distance sensor24and the IR sensor26extend at the main surface12in such a way as to face the user11when the latter is in the use position of the PC10.

For example, the distance sensor24and the IR sensor26are lateral to each other with respect to the main surface12.

The fields of view24′ and26′ of the distance sensor24and the IR sensor26are superimposed on each other at the use position of the PC10. In other words, the fields of view24′ and26′ have a superimposition region28which comprises the use position of the PC10, so that the user11is detected by both the distance sensor24and the IR sensor26when he/she is in the use position of the PC10.

For example, the field of view24′ of the distance sensor24has a detection angle (or opening angle) α1equal to about 25° and the field of view26′ of the IR sensor26has a respective detection angle (or opening angle) α2equal to about 80°.

Considering that the distance sensor24and the IR sensor26have a mutual distance (not shown) which is substantially negligible (e.g., which may be lower than a few cm), as a result the superimposition region28is almost equal in extension to the smaller of the fields of view24′ and26′ (here the field of view24′). For this same reason, it may be considered that the distance between the user11and the distance sensor24and the distance between the user11and the IR sensor26are substantially equal to each other and that they define the distance D between the user11and the PC10. It has been verified that this is especially true when a high mutual superimposition of the fields of view24′ and26′ is present, as previously described. However, it remains apparent that an exact value of the distance D between the user11and the PC10may be calculated starting from the distance between the user11and the distance sensor24and/or from the distance between the user11and the IR sensor26, on the basis of the actual arrangement of the distance sensor24and/or the IR sensor26in the PC10and of known trigonometric techniques.

In use, the control unit22implements a measuring method50now described with reference toFIG.4.

In particular, in use, the control unit22determines the distance D between the user11and the measuring device20on the basis of the temperature signal Tobjectacquired by the IR sensor26.

The measuring method50identifies a calibration mode50a, a calibrated mode50b, and a calibration update mode50cof the measuring device20.

When the measuring device20is turned on or is provided with a measurement start signal, the measuring device20is initially operated in the calibration mode50ain order to be calibrated. As better described below, during calibration the distance signal Sdand the temperature signal Tobjectare acquired and, on the basis of these signals, a calibration curve (in particular, an example is shown inFIG.3with the reference Cc) is generated wherein the values of the temperature signal Tobjectare associated with respective values of the distance D in such a way that the distance D may be determined on the basis of the temperature signal Tobject. Consequently, in this mode both the distance sensor24and the IR sensor26are always active.

After the calibration mode50a, the measuring device20is operated in the calibrated mode50b. In the calibrated mode50b, the temperature signal Tobjectis acquired, and on the basis of this signal and the calibration curve Cc, the distance D is determined. Furthermore, in this mode it is periodically verified whether a calibration update condition is confirmed which implies the need for an update of the calibration previously performed in the calibration mode50a. In particular and as better described hereinbelow, both the temperature signal Tobjectand, periodically, the distance signal Sdare acquired and, on the basis of these signals, the calibration update condition is verified. Consequently, in this mode the IR sensor26is always active and the distance sensor24is only periodically active.

When the calibration update condition is confirmed, the measuring device20is operated in the calibration update mode50c. In the calibration update mode50c, the measuring device20is calibrated again to obtain an updated calibration curve Cc, on the basis of the newly acquired values of the distance signal Sdand the temperature signal Tobject. In particular, the calibration of the measuring device20may be updated following variations in the environmental conditions of the place where the PC10is present (e.g., turning on an air conditioner or a heating system which modifies the temperature of the air surrounding the PC10), which impact the measurements of the IR sensor26and/or the distance sensor24, making them inaccurate and therefore requiring new calibration. Consequently, in this mode both the distance sensor24and the IR sensor26are always active.

Following the update of the calibration curve Cc, the measuring device20is operated again in the calibrated mode50b, on the basis of the updated calibration curve Cc.

FIG.4shows in detail an embodiment of the measuring method50.

At a step S10of the calibration mode50a, the control unit22acquires the distance signal Sdthrough the distance sensor24and the temperature signal Tobjectthrough the IR sensor26. In particular, at the time instant considered there are acquired respective values of the distance signal Sdand of the temperature signal Tobject, also indicated hereinafter respectively as Sd,iand Tobject,iwhere i is the index corresponding to the time instant considered. In other words, this pair of values correspond to measurements performed simultaneously. These values Sd,iand Tobject,iare respectively indicative of the distance D of the user11from the measuring device20measured by the distance sensor24, and of the IR radiation emitted by the user11and detected by the IR sensor26. For example, these values Sd,iand Tobject,imay be electrical quantities (e.g., electric voltage or electric current values) indicative of the distance D measured by the distance sensor24and of the IR radiation emitted by the user11and detected by the IR sensor26, or they may correspond respectively to the information of the distance D measured by the distance sensor24and of the IR radiation emitted by the user11and detected by the IR sensor26.

At a step S12of the calibration mode50a(consecutive to step S10), the control unit22calculates a minimum distance signal difference Sd,mindiston the basis of the measured value Sd,iof the distance signal Sdand stored values Sbuffer,kof the distance signal Sdwhich have been stored, in particular in a buffer (e.g., present in the data storage unit of the control unit22).

As better described hereinbelow, the buffer is configured to store a number K (e.g., about 20) of pairs of values Sd,iand Tobject,i, i.e., K values Tobject,iand K corresponding values Sd,ieach indicative of a respective value Diof distance D of the user11from the measuring device20.

The minimum distance signal difference Sd,mindistis defined as the minimum difference between the differences (in absolute value) calculated between the measured value Sd,iacquired at the instant i considered and each of the stored values Sbuffer,kpresent in the buffer. In particular, the minimum distance signal difference Sd,mindistis a distance value that may be obtained by converting into distance the minimum difference value (e.g., electrical quantity) calculated starting from the stored values Sbuffer,kand the measured value Sd,i(e.g., electrical quantities) or which may be obtained by converting into distances the stored values Sbuffer,kand the measured value Sd,i(e.g., electrical quantities) and then calculating the minimum difference thereof. In other words, the minimum distance signal difference Sd,mindistis calculated according to the following mathematical expression:

Consequently, the minimum distance signal difference Sd,mindistis indicative of the proximity of the measured value Sd,ito the stored values Sbuffer,k.

At a step S14of the calibration mode50a(consecutive to step S12), the control unit22verifies whether the minimum distance signal difference Sd,mindistcalculated for the value Sd,iis greater than a minimum threshold difference Sd,th(for example, a distance equal to about 30 mm).

If the minimum distance signal difference Sd,mindistis not greater than the minimum threshold difference Sd,th, the measuring method50returns to step S10and the pair of values Sd,iand Tobject,iis not stored in the buffer because it is too close and similar to a pair of values already stored in the buffer, i.e., it refers to a value Diof distance D which is too close to the values of the distance D having the respective pairs of values already stored in the buffer corresponding thereto.

If the minimum distance signal difference Sd,mindistis greater than the minimum threshold difference Sd,th, the method proceeds to a step S16of the calibration mode50a(consecutive to step S14) wherein the buffer is updated by storing the new pair of measured values Sd,iand Tobject,itherein, since this pair of values is sufficiently distant and therefore different from the pairs of values already stored in the buffer, i.e., it refers to a value Diof distance D which is sufficiently distant from the values of the distance D having the respective pairs of values already stored in the buffer corresponding thereto.

At the first iteration of the measuring method50wherein the buffer is empty, the first pair of measured values Sd,iand Tobject,iis stored in the buffer. At subsequent iterations the new pairs of measured values Sd,iand Tobject,iare stored in the buffer only if they meet the condition of step S14.

At a step S18of the calibration mode50a(consecutive to step S16), the control unit22verifies whether the buffer is complete, i.e., whether it is full and therefore whether K pairs of values Sd,iand Tobject,iare stored therein.

If the buffer is not complete, the measuring method50returns to step S10so as to be able to continue to fill the buffer.

If the buffer is complete, the method proceeds to a step S20of the calibration mode50a(consecutive to step S18) wherein the calibration curve Ccpreviously described and shown inFIG.3is calculated.

In particular, starting from the values of the distance signal Sdwhich have been stored in the buffer (also indicated hereinafter with the reference Sbuffer,kwith k=1, . . . , K) respective values Dbuffer,kof the distance D are determined, in a per se known manner (e.g., through known transfer functions). Alternatively, in case the values Sbuffer,kof the distance signal Sdwhich have been stored in the buffer are already distance information, this intermediate step may be omitted since the distance information is already available (in this case, Sbuffer,k=Dbuffer,k).

Thanks to the data stored in the buffer, each value Dbuffer,kcalculated starting from the respective value Sbuffer,kis coupled to a respective value of the temperature signal Tobjectstored in the buffer (also indicated hereinafter with the reference Tbuffer,kwith k=1, . . . , K). In this manner, a set of pairs of values Dbuffer,kand Tbuffer,kassociated with each other is defined.

As shown inFIG.3, each of these pairs of values Dbuffer,kand Tbuffer,kmay be graphically represented as a respective point in a two-dimensional plot which has the distance D measured through the distance sensor24on the abscissa axis and the temperature signal Tobjectmeasured by the IR sensor26on the ordinate axis.

The control unit22then determines the calibration curve Ccby interpolating the points of this set, i.e., by interpolating the pairs of values Dbuffer,kand Tbuffer,k. This allows a function, in particular a biunivocal function, between the distance D measured through the distance sensor24and the temperature signal Tobjectmeasured through the IR sensor26to be obtained. Consequently, the calibration curve Ccassociates each value of the distance D measured through the distance sensor24with a respective value of the temperature signal Tobjectmeasured by the IR sensor26, and vice versa.

This interpolation may be carried out on the basis of several known mathematical functions. For example, the interpolating function may be an exponential function, a first-degree polynomial function, a second-degree polynomial function or a third-degree polynomial function. Nonetheless, other known interpolating functions may be used. In particular, it has been verified that the second- and third-degree polynomial functions are those that allow achieving the best interpolation accuracy among the interpolating functions mentioned herein.

The interpolating function may be chosen in the design step of the measuring device20and therefore may be predefined and fixed, or it may be chosen in real time and adaptively from among multiple predefined interpolating functions depending on the set of the pairs of values Dbuffer,kand Tbuffer,k. In this second case, among the interpolating functions previously described the one that best interpolates the values Dbuffer,kand Tbuffer,kof the stored set may be selected. The selection of the curve with optimized interpolation occurs in a per se known manner.

The calibration mode50atherefore ends with the calculation of the calibration curve Ccat step S20. At this point, in fact, the measuring device20is calibrated, since the means are available to accurately measure the distance D starting from the temperature signal Tobjectacquired by the IR sensor26.

After step S20, the measuring method50proceeds with the calibrated mode50bof the measuring device20.

In particular, at a step S22of the calibrated mode50b(consecutive to step S20) the control unit22acquires a new value Tobject,iof the temperature signal Tobjectthrough the IR sensor26. This new value Tobject,iis correlated, as previously described, to the new value Diof distance D of the user11from the measuring device20. Consequently, at step S22the distance sensor24is inactive, i.e., it is not performing any measurement.

At a step S24of the calibrated mode50b(consecutive to step S22), the control unit22determines the new value Diof distance D on the basis of the new value Tobject,iof the temperature signal Tobjectand the calibration curve Cc. In particular, the new value Diis the value of distance D which, in the calibration curve Cc, corresponds to the new measured value Tobject,iof the temperature signal Tobject.

After determining the new distance D on the basis of the measurement carried out by the IR sensor26, the measuring method50proceeds to a step S26of the calibrated mode50b(consecutive to step S24), wherein the control unit22verifies whether performing a calibration control (also called periodic calibration control) is needed to verify the reliability of the calibration curve Ccpreviously calculated.

The calibration control is performed periodically, i.e., whenever a calibration control interval has elapsed since the last calibration control performed. For example, the calibration control interval may be equal to about 5 seconds.

Consequently, at step S26it is verified whether the calibration control interval has elapsed since the last time it was checked whether performing a calibration control is needed.

If the calibration control interval has not elapsed, the measuring method50proceeds to a step S34of the calibrated mode50b, better described hereinbelow.

Conversely, if the calibration control interval has elapsed, the measuring method50proceeds to a step S28of the calibrated mode50b(consecutive to step S26) wherein the control unit22acquires a new value Sd,iof the distance signal Sdthrough the distance sensor24. Consequently, at step S28the distance sensor24is active.

At a step S30of the calibrated mode50b(consecutive to step S28), the control unit22calculates a distance signal error Derr.

The distance signal error Derris calculated on the basis of the values of distance D obtained starting from the new measured values Tobject,iand Sai of the temperature signal Tobjectand the distance signal Sd(i.e., the values obtained at the latest execution of steps S22and S28).

In particular, to calculate the distance signal error Derr, an estimated value Dobject,iof the distance D is determined as a function of the calibration curve Ccand the measured value Tobject,iof the temperature signal Tobjectacquired at step S22(similarly to what is done at step S24). Furthermore, a value Dd,iof the distance D is determined as a function of the value Sd,iof the distance signal Sdacquired at step S28(similarly to what is done at step S10).

Since the distance sensor24has a measurement accuracy of the distance D greater than the IR sensor26, it is assumed here that the value Dd,icoincides with the actual distance D at the instant of the iteration considered, i.e., that it is one correct and realistic measurement thereof. Consequently, the correct or anomalous operating state of the IR sensor26is determined as regards the measurement carried out by the distance sensor24, in such a way that the anomalous operation corresponds to a substantial relative offset of the distance measurements obtained from the IR sensor26(through the application of the calibration curve Cc) and from the distance sensor24.

The distance signal error Derris therefore defined as the difference, in absolute value, between the estimated value (or estimated distance value) Dobject,iobtained through the IR sensor26and the value (or measured distance value) Dd,iobtained through the distance sensor24. In other words, the distance signal error Derris calculated according to the following mathematical expression:

Consequently, the distance signal error Derris indicative of the difference between the measurements of the distance D operated by the IR sensor26and the distance sensor24, where the measurement of the distance sensor24is used as a reference for the measurement of the actual distance D.

At a step S32of the calibrated mode50b(consecutive to step S30), the control unit22verifies a first unreliability condition of the calibration curve Ccused to calculate the value Dobject,i. The first unreliability condition corresponds to an anomaly in the calibration detected through a verification on the data of the distance sensor24(for simplicity it is therefore also called anomaly of the distance sensor24).

In particular, it is checked whether the distance signal error Derris greater than a distance signal threshold error Derr,th(e.g., equal to about 200 mm). When this condition is verified, the calibration curve Ccused to calculate the value Dobject,iis potentially unreliable and therefore going to the calibration update mode50cis needed for further checks and, if after these checks the need thereof is detected, for updating the calibration curve Cc.

Consequently, if the first unreliability condition of the calibration curve Ccis confirmed and therefore the calibration curve Ccis potentially unreliable, the measuring method50proceeds to a step S50of the calibration update mode50c, better discussed hereinbelow.

Conversely, if the first unreliability condition of the calibration curve Ccis not confirmed, the measuring method50proceeds to a step S34of the calibrated mode50b(consecutive both to step S32through its output “N” and to step S26through its output “N”).

At step S34, the control unit22calculates a minimum temperature signal difference Tobject,mindist.

The minimum temperature signal difference Tobject,mindistis calculated on the basis of the measured value Tobject,iof the temperature signal Tobject, previously acquired at the latest execution of step S22, and the stored values Tbuffer,kof the temperature signal Tobjectwhich have been stored in the buffer. In particular, the minimum temperature signal difference Tobject,mindistis defined as the minimum difference between the differences (in absolute value) calculated between the measured value Tobject,iacquired at step S22and each of the stored values Tbuffer,kpresent in the buffer. In other words, the minimum temperature signal difference Tobject,mindistis calculated according to the following mathematical expression:

Consequently, the minimum temperature signal difference Tobject,mindistis indicative of the proximity of the measured value Tobject,ito the stored values Tbuffer,k.

At a step S36of the calibrated mode50b(consecutive to step S34), the control unit22verifies a second unreliability condition of the calibration curve Ccused to calculate the value Dobject,i. The second unreliability condition corresponds to an anomaly in the calibration detected through a verification on the data of the IR sensor26(for simplicity it is therefore also called anomaly of the IR sensor26). In detail, the detection of the second unreliability condition is based on a check of the proximity of the measured value Tobject,ito the stored values Tbuffer,k, as the calibration curve Ccmight not be accurate for the calculation of the value Dobject,iin case the temperature datum Tobject,iwas too distant from the data Tbuffer,kpreviously used for the calculation of the calibration curve Cc.

In particular, at step S36it is checked whether the minimum temperature signal difference Tobject,mindistis greater than a minimum temperature signal threshold difference Tobject,th(e.g., equal to about 250 LSB). When this condition is verified, the measurement Tobject,iof the IR sensor26is too distant from the data Tbuffer,kpreviously used for the calculation of the calibration curve Ccand therefore going to the calibration update mode50cis needed for updating the calibration curve Cc.

Consequently, if the second unreliability condition is verified and therefore the measured value Tobject,iis too distant from the data Tbuffer,kpreviously used for the calculation of the calibration curve Cc, the measuring method50proceeds to a step S54of the calibration update mode50c, better discussed hereinbelow.

Conversely, if the second unreliability condition is not verified and therefore the measured value Tobject,iis sufficiently close to the data Tbuffer,kpreviously used for the calculation of the calibration curve Cc, the measuring method50returns to step S22.

In general, the conditions checked at steps S32and S36define the calibration update condition previously described, which is needed to understand whether the measurement of the distance D performed at step S24is reliable or whether, instead, it is not and therefore going to the calibration update mode50cis needed for a possible calibration update.

At a step S38of the calibration update mode50c, the control unit22acquires new values Sd,iand Tobject,iof the distance signal Sdand the temperature signal Tobjectthrough the distance sensor24and the IR sensor26, similarly to what has been described in step S10.

At a step S40of the calibration update mode50c(consecutive to step S38), the control unit22determines the new value Diof distance D. For example, this may be done on the basis of the measurement made by the IR sensor26at step S38, similarly to what has been described in step S24. Nonetheless and as better described below, this determination may also be made in a different manner, for example on the basis of the value Sai of the distance signal Sdacquired at step S38.

At a step S42of the calibration update mode50c(consecutive to step S40), the control unit22calculates again the distance signal error Derron the basis of the new values Sd,iand Tobject,iacquired at step S38, similarly to what has been described in step S30.

At a step S44of the calibration update mode50c(consecutive to step S42), the control unit22verifies again, in a manner similar to what has been described in step S32, the anomaly condition of the distance sensor24(i.e., the first unreliability condition) on the basis of the distance signal error Derrcalculated at step S42. In particular, it is checked whether the distance signal error Derris greater than the distance signal threshold error Derr,th.

If the anomaly condition of the distance sensor24of step S44is not confirmed, the measuring method50proceeds to a step S46of the calibration update mode50c(consecutive to step S44).

At step S46, the control unit22updates the value of a count index n by reducing its value by one unit.

In particular, the count index n is initialized to an initial value (e.g., 0) every time that the method goes from calibrated mode50bto calibration update mode50c. The count index n is updated during the calibration update mode50cand may vary between a predefined minimum value (e.g., the initial value) and a predefined maximum value (or predefined number) N (e.g.,15).

At a step S48of the calibration update mode50c(consecutive to step S46), the control unit22verifies whether a first update condition (or minimum update condition) is confirmed.

In particular, the first update condition is confirmed if the count index n assumes the predefined minimum value (e.g., 0).

If the first update condition is confirmed, the measuring method50returns to step S22of the calibrated mode50bsince the detected anomaly of the distance sensor24did not last sufficiently to be indicative of a real lack of reliability of the calibration curve Ccsuch as to require a new calibration (i.e., it has not been detected for N time instants).

Conversely, if the first update condition is not confirmed, the measuring method50returns to step S38.

Conversely, if the anomaly condition of the distance sensor24of step S44is confirmed, the measuring method50proceeds to step S50of the calibration update mode50c(which is therefore consecutive both to step S44through the output “S” and to step S32through the output “S”).

At step S50, the control unit22updates the value of the count index n by increasing its value by one unit.

In particular, since in case of confirmation of the anomaly condition of the distance sensor24at step S32the method goes directly to step S50(i.e., this step is the first that is performed when entering the calibration update mode50c), the count index n is increased by one unit immediately after being initialized to the initial value. This avoids the possibility that, at step S46, the count index n is updated to a value lower than the initial value and therefore that count errors arise.

At a step S52of the calibration update mode50c(consecutive to step S50), the control unit22verifies whether a second update condition (or maximum update condition) is confirmed.

In particular, the second update condition is confirmed if the count index n assumes the predefined maximum value N (e.g.,15), i.e., if the anomaly lasted sufficiently to be indicative of a real lack of reliability of the calibration curve Ccsuch as to require a new calibration (i.e., if it has been detected for N time instants).

If the second update condition is not confirmed, the measuring method50returns to step S38.

Conversely, if the second update condition is confirmed, the measuring method50proceeds to step S54of the calibration update mode50c(consecutive both to step S52through the output “S” and to step S36through the output “S”).

In other words, steps S38-S52allow verifying whether the anomaly condition of the distance sensor24is confirmed for the predefined number N of time instants successive to each other (not necessarily consecutive to each other), therefore whether it lasted sufficiently to be indicative of a real lack of reliability of the calibration curve Ccsuch as to require a new calibration.

At step S54, the control unit22updates the buffer by storing therein a new pair of measured values Sd,iand Tobject,i, as a replacement for the least recent pair of values (i.e., the oldest pair of values stored in the buffer).

This new stored pair may be, in the case of an anomaly of the distance sensor24, the last acquired pair and thus the pair of values Sd,iand Tobject,iacquired at the latest execution of step S38. Alternatively, in the case of an anomaly of the IR sensor26, the new stored pair may be a new pair of values Sd,iand Tobject,iwhich are acquired at this step. In other words, in this second case step S54may comprise the acquisition of a new pair of values Sd,iand Tobject,i, similarly to what has been previously described in steps S10and S38, and the subsequent storage of this new pair of values in the buffer.

At a step S56of the calibration update mode50c(consecutive to step S54), the control unit22updates the calibration curve Ccon the basis of the buffer that has been updated at step S54. This occurs in a manner completely similar to what has been previously described in step S20.

After step S56, the measuring method50returns to step S22as the measurement device20is calibrated again.

Furthermore, and in a manner not shown inFIG.4, the measuring device20may generate an output signal indicative of the value of the distance D. The output signal may be received by the PC10(or by external apparatuses operatively coupled to the measuring device20) and may be used to control one or more functionalities of the PC10(or of the external apparatuses). For example, the screen of the PC10may be automatically activated or deactivated as a function of the distance D measured between the user11and the PC10.

In particular, the output signal may be equal at any instant to the value Dobject,icalculated at the last step performed between steps S24and S40(therefore still using the IR sensor26). Alternatively, the output signal may be equal to the value Dobject,icalculated at the last step performed between steps S24and S40when the distance sensor24is not active, and instead be equal to the value Dd,iobtained at the last step performed between steps S30and S42when the distance sensor24is active: in this case, the output signal is generally equal to the measurement obtained using the IR sensor26, except for when the measurement of the distance sensor24(which still has higher accuracy) is available.

The measuring method50previously described may be implemented by the control unit22through a corresponding computer program product.

From an examination of the characteristics of the disclosure made according to the present disclosure, the advantages that it affords are evident.

The measuring device20and the measuring method50allow the distance D between the user11and the measuring device20to be measured with high accuracy and low electrical consumption.

In fact, the measurement of the distance D is performed through the IR sensor26(which has low energy consumption), while the distance sensor24(with accurate measurement but high energy costs) is used only to calibrate the measurement of the IR sensor26, to periodically verify whether there are anomalies in the measurements carried out and, if necessary, to recalibrate the measurement of the IR sensor26.

In particular, since the calibration curve Ccprovides an association between the measurements of the IR sensor26and the measurements of the distance sensor24, the distance D on the basis of the IR sensor26with measurement accuracy substantially comparable to the known case wherein the distance sensor24is used to perform this measurement may be measured. Furthermore, since the measurement is performed with the IR sensor26, the electrical consumption is substantially reduced with respect to the known case wherein the distance sensor24is used (e.g., up to about 1000 times).

Furthermore, the calibration update mode50censures that, in case the value measured by the IR26sensor differs too much from the values previously stored in the buffer and used for the calculation of the calibration curve Cc, the calibration is updated so as to bring the measurement of the measuring device20back to the desired levels of accuracy.

Furthermore, in case of detection at step S32of a potential unreliability of the calibration curve Cc, the calibration update is performed if the anomaly is confirmed for N samples successive to each other, so that any isolated and transient anomalous results do not cause an unnecessary update of the calibration. This allows the energy consumption of the measuring device20to be further reduced.

Furthermore, it has been verified that the measurement of the measuring device20allows the presence of the user11to be discriminated with respect to other bodies such as inanimate objects present in the fields of view24′ and26′. In this manner, the measurement performed is selective to the user11.

Finally, it is clear that modifications and variations may be made to the disclosure described and illustrated herein without thereby departing from the scope of the present disclosure. For example, the different embodiments described may be combined with each other to provide further solutions.

Furthermore, the periodic check and the consequent updating of the calibration curve Ccdescribed in steps S26-S56may be omitted, to further reduce the energy consumption of the measuring device20.

Furthermore, although the case in which the value Sd,iof the distance signal Sdis indicative of a respective value Dd,iof the distance D and therefore the steps S30and S42comprise the determination of the value Dd,istarting from the value Sai has previously been described, it is however apparent that the value Sd,imay already directly correspond to the value of the distance D and therefore the determination of the value Dd,imay be omitted. In other words, in this case the distance sensor24directly generates at output the information on the distance D, which is used for the calculation of the distance signal error Derrin a manner similar to what has been previously described.

Furthermore, when entering the calibration update mode50cfollowing the detection at step S32of the anomaly condition of the distance sensor24, the count index n may also be initialized to a value greater than the predefined minimum value (in particular, a value equal to one unit more than the predefined minimum value and therefore here exemplarily 1) and proceed directly to step S38. In other words, through this different initialization carrying out steps S50and S52before going to step S38is not needed and therefore the method may proceed directly with the actions of step S38. This further simplifies the measuring method50.

A measuring device (20) for measuring a distance (D) between the measuring device (20) and a user (11), the measuring device (20) may be summarized as including: a distance sensor (24), configured to measure the distance (D) when the user (11) is in a field of view (24′) of the distance sensor (24), and to generate a distance signal (Sd) indicative of the distance (D); an infrared, IR, radiation sensor (26), configured to detect the IR radiation emitted by the user (11) when the user (11) is in a respective field of view (26′) of the IR radiation sensor (26), and to generate a temperature signal (Tobject) indicative of the IR radiation detected and correlated to the distance (D) of the user (11), the field of view (24′) of the distance sensor (24) and the field of view (26′) of the IR radiation sensor (26) being at least partially superimposed on each other; and a control unit (22), coupled to the distance sensor (24) and the IR radiation sensor (26) and configured to: in a calibration mode (50a) of the measuring device (20), acquire the distance signal (Sd) and the temperature signal (Tobject) respectively through the distance sensor (24) and the IR radiation sensor (26) and, on the basis of the distance signal (Sd) and the temperature signal (Tobject), generate a calibration curve (Cc) which associates to each other values of the temperature signal (Tobject) with respective values of the distance (D); and in a calibrated mode (50b) of the measuring device (20), acquire the temperature signal (Tobject) through the IR radiation sensor (26) and, on the basis of the temperature signal (Tobject) and the calibration curve (Cc), determine the distance (D).

The control unit (22) may be further configured to: in the calibrated mode (50b) of the measuring device (20), periodically acquire the distance signal (Sd) through the distance sensor (24) and, on the basis of the distance signal (Sd) and the temperature signal (Tobject) acquired in the calibrated mode (50b), verify a calibration update condition; and if the calibration update condition is confirmed, in a calibration update mode (50c) of the measuring device (20) update the calibration curve (Cc) on the basis of the distance signal (Sd) and the temperature signal (Tobject).

The IR radiation sensor (26) may be a “Thermal MOS”, TMOS, and wherein the distance sensor (24) may be a time-of-flight sensor.

An electronic apparatus (10) usable by a user (11) and may be summarized as including a measuring device (20).

The field of view (24′) of the distance sensor (24) and the field of view (26′) of the IR radiation sensor (26) may be at least partially superimposed on each other at a use position of the user (11) wherein the electronic apparatus (10) may be usable by the user (11).

The electronic apparatus (10) may be configured to control a functionality of the electronic apparatus (10) as a function of the distance (D) measured by the measuring device (20).

A measuring method (50) for measuring a distance (D) between a measuring device (20) and a user (11), the measuring device (20) may be summarized as including: a distance sensor (24) to measure the distance (D) when the user (11) is in a field of view (24′) of the distance sensor (24), and to generate a distance signal (Sd) indicative of the distance (D); an infrared, IR, radiation sensor (26) to detect the IR radiation emitted by the user (11) when the user (11) is in a respective field of view (26′) of the IR radiation sensor (26), and to generate a temperature signal (Tobject) indicative of the IR radiation detected and correlated to the distance (D) of the user (11), the field of view (24′) of the distance sensor (24) and the field of view (26′) of the IR radiation sensor (26) being at least partially superimposed on each other; and a control unit (22) coupled to the distance sensor (24) and the IR radiation sensor (26); the measuring method (50) being performed by the control unit (22) and including the steps of: in a calibration mode (50a) of the measuring device (20): acquiring (S10) the distance signal (Sd) and the temperature signal (Tobject) respectively through the distance sensor (24) and the IR radiation sensor (26); and on the basis of the distance signal(S) and the temperature signal (Tobject), generating (S12-S20) a calibration curve (Cc) which associates to each other values of the temperature signal (Tobject) with respective values of the distance (D); and in a calibrated mode (50b) of the measuring device (20): acquiring (S22) the temperature signal (Tobject) through the IR radiation sensor (26); and on the basis of the temperature signal (Tobject) and the calibration curve (Cc), determining (S24) the distance (D).

The step of generating (S12-S20) the calibration curve (Cc) may include, for each pair of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) which are acquired at a time instant considered: calculating (S12) a respective minimum distance signal difference (Sd,mindist) indicative of a minimum difference between a plurality of differences calculated in absolute value between the value (Sd,i) of the distance signal (Sd) and a respective plurality of stored values (Sbuffer,k) of the distance signal (Sd), which are stored in a buffer; verifying (S14) whether the respective minimum distance signal difference (Sd,mindist) is greater than a minimum threshold difference (Sd,th); if the minimum distance signal difference (Sd,mindist) is greater than the minimum threshold difference (Sd,th), updating (S16) the buffer by storing the pair of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject); verifying (S18) whether a predefined number (K) of pairs of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) are stored in the buffer; and if the predefined number (K) of pairs of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) are stored in the buffer, calculating (S20) the calibration curve (Cc) through interpolation performed on the basis of the pairs of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) stored in the buffer.

The step of calculating (S20) the calibration curve (Cc) may include selecting, on the basis of the pairs of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) stored in the buffer, an interpolating function among a plurality of predefined interpolating functions to perform the interpolation.

The measuring method (50) may further include the steps of: in the calibrated mode (50b) of the measuring device (20): periodically acquiring (S26, S28) the distance signal (Sd) through the distance sensor (24); and on the basis of the distance signal (Sd) and the temperature signal (Tobject) acquired in the calibrated mode (50b), verifying (S30-S36) a calibration update condition; and if the calibration update condition is confirmed, in a calibration update mode (50c) of the measuring device (20): updating (S54-S56) the calibration curve (Cc) on the basis of the distance signal (Sd) and the temperature signal (Tobject).

The step of periodically acquiring (S26, S28) the distance signal (Sd) may include: verifying (S26) whether a calibration control interval has elapsed since the last verification of the calibration update condition; and acquiring (S28) the distance signal (Sd) if the calibration control interval has elapsed.

The step of verifying (S30-S36) the calibration update condition may include: if the calibration control interval has elapsed, verifying (S30, S32) an anomaly condition of the distance sensor (24) on the basis of the distance signal (Sd) and the temperature signal (Tobject) acquired in the calibrated mode (50b); and if the calibration control interval has not elapsed or if the anomaly condition of the distance sensor (24) is not confirmed, verifying (S34, S36) an anomaly condition of the IR radiation sensor (26) on the basis of the temperature signal (Tobject) acquired in the calibrated mode (50b), wherein, if the anomaly condition of the distance sensor (24) has been confirmed, the measuring method (50) may further include, in the calibration update mode (50c) of the measuring device (20), verifying (S38-S52) whether the anomaly condition of the distance sensor (24) is confirmed for a predefined number (N) of time instants successive to each other, and wherein the step of updating (S54-S56) the calibration curve (Cc) is performed if the anomaly condition of the distance sensor (24) is confirmed for the predefined number (N) of time instants successive to each other or if the anomaly condition of the IR radiation sensor (26) is confirmed.

The step of verifying (S30, S32) the anomaly condition of the distance sensor (24) may include: calculating (S30), on the basis of the values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) acquired in the calibrated mode (50b), a distance signal error (Derr) indicative of a difference in absolute value between an estimated distance value (Dobject,i), determined starting from the value (Tobject,i) of the temperature signal (Tobject), and a measured distance value (Dd,i) correlated to the value (Sd,i) of the distance signal (Sd); and verifying (S32) whether the distance signal error (Derr) is greater than a distance signal threshold error (Derr,th), wherein the step of verifying (S34, S36) the anomaly condition of the IR radiation sensor (26) may include: calculating (S34), on the basis of the value (Tobject,i) of the temperature signal (Tobject) acquired in the calibrated mode (50b), a minimum temperature signal difference (Tobject,mindist) indicative of a minimum difference between a plurality of differences calculated in absolute value between the value (Tobject,i) of the temperature signal (Tobject) and a respective plurality of stored values (Tbuffer,k) of the temperature signal (Tobject), which are stored in the buffer; and verifying (S36) whether the minimum temperature signal difference (Tobject,mindist) is greater than a minimum temperature signal threshold difference (Tobject,th), wherein the step of verifying (S38-S52) whether the anomaly condition of the distance sensor (24) may be confirmed for the predefined number (N) of time instants may include: a. acquiring (S38) new values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) respectively through the distance sensor (24) and the IR radiation sensor (26), determining (S40) the distance (D) again on the basis of the new value (Tobject,i) of the temperature signal (Tobject) and the calibration curve (Cc), calculating (S42) the distance signal error (Derr) again on the basis of the new values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject); b. verifying (S44) whether the new distance signal error (Dem) is greater than the distance signal threshold error (Derr,th); c. if the new distance signal error (Derr) is not greater than the distance signal threshold error (Derr,th), updating (S46) a count index (n) by reducing its value and verifying (S48) whether the count index (n) assumes a predefined minimum value; d. if the count index (n) does not assume the predefined minimum value, repeating steps a-d; e. if the new distance signal error (Derr) is greater than the distance signal threshold error (Derr,th), updating (S50) the count index (n) by increasing its value and verifying (S52) whether the count index (n) assumes a predefined maximum value correlated to the predefined number (N); and f. if the count index (n) does not assume the predefined maximum value, repeating steps a-f, and wherein the step of updating (S54-S56) the calibration curve (Cc) may be performed if the count index (n) assumes the predefined maximum value.

The step of updating (S54-S56) the calibration curve (Cc) may include: storing (S54) in the buffer a new pair of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) as a replacement for the oldest pair of values (Sd,i, Tobject,i) present in the buffer; and recalculating (S56) the calibration curve (Cc) through interpolation performed on the basis of the pairs of values (Sd,i, Tobject,i) of the distance signal (Sd) and the temperature signal (Tobject) stored in the updated buffer.

A computer program product storable in a control unit (22) of a measuring device (20), the computer program may be designed such that, when executed, the control unit (22) becomes configured to implement a measuring method (50).