Patent Description:
According to ultrasonic TOF estimate principles, an ultrasonic signal (hereinafter, ultrasonic source signal) is generated and transmitted by the TOF device towards a target body, a corresponding ultrasonic signal (hereinafter, ultrasonic echo signal) originated from the target body by reflection of the ultrasonic source signal hitting the target body is received at the TOF device, and the TOF estimate is determined as the time elapsed from the transmission of the ultrasonic source signal and the reception of the ultrasonic echo signal.

In typical applications, e.g. in applications for obstacle detection, the TOF device may be configured to determine, e.g. based on the TOF estimate, a distance estimate indicative of a distance between the TOF device and the target body.

The output of the TOF device may be the distance estimate, and/or the distance estimate may be part of an additional information based on the distance estimate, such as displacement information, level information, material information, structure information, vibration information, and medical diagnostic information.

According to a known implementation, the TOF estimate is based on Kalman Filter, which is an algorithm that, given a set of measures, generates an optimal estimate of desired quantities through a recursive processing.

Extended Kalman Filter is also known, which applies to non-linear systems. Basically, the Extended Kalman Filter provides for a linearization of a non-linear system through Jacobian computation.

Unscented Kalman Filter is also known, which also applies to non-linear systems. Basically, the Unscented Kalman Filter provides for a linearization of probabilistic distributions of an error.

Nowadays, TOF estimate based on the Unscented Kalman Filter is a preferred choice.

Article "<NPL> relates to distance or level measurements based on ultrasonic time-of-flight estimation, through unscented Kalman filter.

Document <CIT> relates to methods and devices for automatically characterizing one or more echoes contained in an ultrasonic signal.

The Applicant has understood that TOF estimate based on the Unscented Kalman Filter has some drawbacks.

Particularly, the Applicant has understood that the performances of the Unscented Kalman Filter are closely related to an efficient calibration of a large number of parameters (including parameters associated with an acquisition of the ultrasonic echo signal and parameters of the Unscented Kalman Filter).

Due to the large number of parameters to be calibrated and since the calibration of these parameters is almost always done by hand according to designer experience, the performances of the Unscented Kalman Filter may often be below expectations.

Moreover, the Applicant has also understood that, during TOF device lifetime, the TOF estimates may also be affected by external conditions (such as environmental conditions). Particularly, changes in air temperature, humidity, air pressure, air turbulence, external noise may heavily affect an ultrasonic signal acquisition, so that parameter calibration could result inadequate as a result of changed external conditions.

Last but not least, the Applicant has understood that high computational complexity of current TOF estimate methods does not allow efficient implementation in available microcontrollers.

The Applicant has faced the above-mentioned issues, and has devised a method for TOF estimate and a corresponding TOF device that allows easily and dynamically tuning (i.e., adjusting or updating or refining or calibrating) the parameters associated with the processing of the acquired ultrasonic echo signal and the parameters of the Unscented Kalman Filter.

One or more aspects of the present invention are set out in the independent claims, with advantageous features of the same invention that are indicated in the dependent claims, whose wording is enclosed herein verbatim by reference (with any advantageous feature being provided with reference to a specific aspect of the present invention that applies mutatis mutandis to any other aspect).

More specifically, an aspect of the present invention relates to a method for providing an estimate of a time-of-flight between an ultrasonic signal emitted by a device and an ultrasonic echo signal returned by a target object hit by the ultrasonic signal and received at the device. The method may comprise acquiring the ultrasonic echo signal thereby obtaining an electric echo signal. The method may comprise determining a noise power of the electric echo signal. The method may comprise determining an envelope signal indicative of an envelope of the electric echo signal. The method may comprise determining a portion of the envelope signal based on at least one operative parameter; said at least one operative parameter may be determined according to Particle Swarm Optimization. The method may comprise processing the portion of the envelope signal and the noise power of the echo ultrasonic signal according to an Unscented Kalman Filter to obtain an estimate of the envelope signal; the estimate of the envelope signal may be a regenerated version of the envelope signal being regenerated from the portion of the envelope signal; said processing may for example be based on at least one Unscented Kalman Filter parameter (UKFPK) determined according to the Particle Swarm Optimization. The method may comprise providing said estimate of the time-of-flight according to the estimate of the envelope signal.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, the method comprises determining an estimate error. The Particle Swarm Optimization may be based on said estimate error.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments said determining an estimate error comprises determining a difference between the estimate of envelope signal and the envelope signal.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, the method comprises, based on said estimate of the time-of-flight, determining a distance estimate indicative of a distance between the target object and the device. Said determining an estimate error may comprise determining a difference between the distance estimate and said distance.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, said determining an envelope signal comprises performing a Hilbert transformation on the echo ultrasonic signal.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, the portion of the envelope signal is centered about a maximum value of the envelope signal.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, said processing the operative portion of the envelope signal comprises providing a regenerated envelope signal.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, said at least one operative parameter comprises at least one among:.

According to an embodiment, whose features are additional or alternative to one or more features of any of the previous embodiments, said at least one Unscented Kalman Filter parameter comprises at least one among:.

Another aspect of the present invention relates to a device for providing an estimate of a time-of-flight between an ultrasonic signal emitted by the device and an ultrasonic echo signal returned by a target object hit by the ultrasonic signal and received at the device. The device may comprise a conditioning and conversion system for acquiring the ultrasonic echo signal thereby obtaining an electric echo signal. The device may comprise a module for determining a noise power of the electric echo signal. The device may comprise a module for determining an envelope signal indicative of an envelope of the electric echo signal. The device may comprise a module for determining a portion of the envelope signal based on at least one operative parameter; said at least one operative parameter may be determined according to Particle Swarm Optimization. The device may comprise a module for processing the portion of the envelope signal and the noise power of the echo ultrasonic signal according to an Unscented Kalman Filter to obtain an estimate of the envelope signal; the estimate of the envelope signal may be a regenerated version of the envelope signal being regenerated from the portion of the envelope signal; said processing may be based on at least one Unscented Kalman Filter parameter determined according to the Particle Swarm Optimization. The device may comprise a module for providing said estimate of the time-of-flight according to the estimate of the envelope signal.

A further aspect of the present invention relates to an electronic system comprising such a device (or more thereof).

These and other features and advantages of the present invention will be made apparent by the following description of some exemplary and non-limitative embodiments thereof; for its better intelligibility, the following description should be read making reference to the attached drawings, wherein:.

With reference to the drawings, <FIG> schematically shows a device (hereinafter, TOF device) <NUM> for providing an ultrasonic time-of-flight estimate (hereinafter, TOF estimate), according to an embodiment of the present invention. The TOF device <NUM> is configured to implement a method (hereinafter, TOF method) for providing the TOF estimate.

In the following, when one or more features of the TOF device and of the TOF method are introduced by the wording "according to an embodiment", they are to be construed as features additional or alternative to any features previously introduced, unless otherwise indicated and/or unless there is evident incompatibility among feature combinations.

In the following, only components of (and TOF method steps performed by) the TOF device <NUM> deemed relevant for the understanding of the present invention will be shown and discussed, with other well-known components of (and TOF method steps performed by) the TOF device <NUM> that will be intentionally omitted for the sake of conciseness.

According to ultrasonic time-of-flight estimate principles, an ultrasonic signal (hereinafter, ultrasonic source signal) USS is generated and transmitted by the TOF device <NUM> towards a target body T (the target body being eternal to, i.e. not part of, the TOF device <NUM>), a corresponding ultrasonic signal (hereinafter, ultrasonic echo signal) UES originated from the target body T by reflection of the ultrasonic source signal USS hitting the target body T is received at the TOF device <NUM>, and the TOF estimate is determined (by the TOF device <NUM>) as the time elapsed from the transmission of the ultrasonic source signal USS and the reception of the ultrasonic echo signal UES.

According to an embodiment, the TOF device <NUM> is configured to determine, e.g. based on the TOF estimate, a distance estimate DEST indicative of a distance DACT between the TOF device <NUM> and the target body T.

According to an embodiment, the TOF device <NUM> may be configured to further determine, e.g. based on the TOF estimate and/or on the distance estimate DEST, one or more additional information. According to an embodiment, as better discussed in the following, the TOF device <NUM> may be part of an electronic system aimed at determining the additional information based on the TOF estimate and/or on the distance estimate DEST provided by the TOF device <NUM>.

Examples of additional information include, but are not limited to, displacement information, level information, material information, structure information, vibration information, and medical diagnostic information.

For the purposes of the present disclosure, the target body T (which is not part of the TOF device <NUM>) comprises a physical object with mass. Examples of target bodies include, but are not limited to, living beings (such as persons, animals and trees) or parts thereof, and inanimate objects (such as buildings and vehicles) or parts thereof.

According to an embodiment, the TOF device <NUM> comprises an ultrasonic transducer <NUM>. According to an embodiment, the ultrasonic transducer <NUM> comprises a piezoelectric ultrasonic transducer or a capacitive ultrasonic transducer.

According to an embodiment, the ultrasonic transducer <NUM> is configured to transduce an electric source signal ESS (e.g., a pulse-width modulated pulse train) into the ultrasonic source signal USS, and to transduce the ultrasonic echo signal UES from the target body T to obtain a corresponding electric echo signal EES.

According to an embodiment, the electric source signal ESS and the electric echo signal EES are digital signals, the ultrasonic transducer <NUM> for example comprising a conditioning and conversion system (not shown) for obtaining (from the (digital) electric source signal ESS) an analog ultrasonic source signal to be transduced into the electric echo signal EES, and for obtaining the (digital) electric echo signal EES from the transduced ultrasonic echo signal.

According to an embodiment, the TOF device <NUM> comprises a processing unit <NUM> (for example, a microcontroller and/or a microprocessor) electrically coupled to the ultrasonic transducer <NUM> for providing the electric source signal ESS thereto and for receiving the electric echo signal EES therefrom.

In the following, only relevant modules of the processing unit <NUM> that are deemed pertinent for the understanding of the present invention will be discussed, with well-known and/or obvious variants of the relevant modules that are omitted for the sake of conciseness.

The term "module" is herein intended to emphasize functional (rather than implementation) aspects thereof. Indeed, without losing generality, each module, according to its function, may be implemented by software, hardware, and/or a combination thereof. Moreover, the modules (or at least a subset thereof) may also reflect, at least conceptually, the physical structure of the processing unit. In any case, it will be appreciated that one or more of the illustrated modules may be integrated together in a single electronic unit.

According to an embodiment, the processing unit <NUM> comprises a module <NUM> for determining a noise power NP (or an indication thereof) associated with the electric echo signal EES.

According to an embodiment, in order to determine the noise power NP (or an indication thereof) associated with the electric echo signal EES, the module <NUM> is configured to process the electric echo signal EES according to Fourier transform (reason why, in the following, the module <NUM> will be referred to as Fourier module <NUM>).

According to an embodiment, the processing unit <NUM> comprises a module <NUM> for determining an envelope signal EESENV indicative of an envelope (e.g., a profile) of the echo ultrasonic signal.

According to an embodiment, in order to determine the envelope signal EESENV, the module <NUM> is configured to process the electric echo signal EES according to Hilbert transform (reason why, in the following, the module <NUM> will be referred to as Hilbert module <NUM>).

Since the frequency of the envelope signal EESENV is lower than the frequency of the electric echo signal EES, the envelope signal EESENV can be appropriately decimated in terms of sample/s without violating Nyquist requests. Thus, the Hilbert module <NUM> performs a first signal "dilution" without loss of information content, which determines low computational requests for the processing unit <NUM>. Just as an example, the frequency of the electric echo signal EES may be about <NUM> and the frequency of the envelope signal EESENV may be about <NUM>.

According to an embodiment, the processing unit <NUM> comprises a module <NUM> for determining a portion of the envelope signal EESENV (reason why, in the following, the module <NUM> will be referred to as portion module <NUM> and the portion of the envelope signal EESENV will be referred to as envelope signal portion EESENV,p).

According to an embodiment, the envelope signal portion EESENV,p comprises a portion of the envelope signal EESENV comprising a maximum value of the envelope signal EESENV , i.e. comprises a portion of the envelope signal EESENV at the left of the maximum value (hereinafter, left portion of the envelope signal EESENV) and a portion of the envelope signal EESENV at the right of the maximum value (hereinafter, right portion of the envelope signal EESENV). The left portion of the envelope signal EESENV and the right portion of the envelope signal EESENV may have same time lengths (i.e., said portion of the envelope signal EESENV is centered around said maximum value of the envelope signal EESENV) or may have different time lengths (i.e., said portion of the envelope signal EESENV is not centered around said maximum value of the envelope signal EESENV).

As the envelope signal portion EESENV,p is a portion of the envelope signal EESENV, the envelope signal portion EESENV,p can be quickly processed by the following modules of the processing unit <NUM> (so as to obtain a fast TOF estimate, and hence a fast distance estimate DEST). Thus, the portion module <NUM> performs a second signal "dilution" without loss of information content, which determines low computational requests for the processing unit <NUM>.

Thanks to the low computational requests for the processing unit <NUM>, the processing unit <NUM> may be a conventional microcontroller available on the market.

According to an embodiment, the envelope signal portion EESENV,p is determined based on one or more operative parameters.

Examples of operative parameters comprise, but are not limited to:.

In the following, when distinguishing among the first, second, third and fourth operative parameters is not relevant for understanding the invention the operative parameters will be globally denoted by OPk, wherein k denotes the iteration of the TOF method - indeed, as better discussed in the following, according to an embodiment the operative parameters, or at least a subset thereof, are tuned or adjusted or updated at each iteration of the TOF method.

According to an embodiment, the operative parameters, or a subset thereof, are determined according to Particle Swarm Optimization (as better discussed in the following).

According to an embodiment, the portion module <NUM>, better discussed in the following, is configured to determine the envelope signal portion EESENV,p by applying to the envelope signal EESENV the first and second operative parameters Perc_l, Perc_u at a first phase, and the third and fourth operative parameters Coeffl, Coeff2 at a second phase (following the first phase) aimed at optimizing the length of the envelope signal portion EESENV,p.

According to an embodiment, the processing unit <NUM> comprises a module <NUM> for processing the envelope signal portion EESENV,p and the noise power NP of the electric echo signal EES according to an Unscented Kalman Filter (reason why, in the following, the module <NUM> will be referred to as UKF ("Unscented Kalman Filter") module <NUM>).

Kalman filter is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe.

The Kalman filter keeps track of the estimated state of the system and the variance or uncertainty of the estimate. The estimate is updated using a state transition model and measurements.

The algorithm works in a two-step process. In a prediction step, the Kalman filter produces estimates of the current state variables, along with their uncertainties. Once the outcome of the next measurement (necessarily corrupted with some amount of error, including random noise) is observed, these estimates are updated using a weighted average, with more weight being given to estimates with higher certainty. The algorithm is recursive. It can run in real time, using only the present input measurements and the previously calculated state and its uncertainty matrix; no additional past information is required.

Unscented Kalman filter is a generalization of the Kalman filter which works on nonlinear systems. In the UKF, the probability density is approximated by a deterministic sampling of points which represent the underlying distribution as a Gaussian. The nonlinear transformation (referred to as unscented transformation) of these points are intended to be an estimate of the posterior distribution, the moments of which can then be derived from the transformed samples.

According to an embodiment, the UKF module <NUM> is configured to process the envelope signal portion EESENV,p and the noise power NP of the echo ultrasonic signal based on one or more UKF parameters (the UKF parameters, or a subset thereof, being determined according to the Particle Swarm Optimization, as better discussed in the following).

Examples of UKF parameters comprise, but are not limited to an evaluation parameter ("to_md_capture") providing a first, rough evaluation of the TOF estimate (so as to provide a good starting point to the UKF module <NUM>), a control parameter ("Kappa_p") for controlling the spread of the sigma points around the mean state value, and a correction parameter ("powerNoiseCorr") providing a correction on the noise power NP (the correction parameter being for example an additive correction factor to be added to the noise covariance matrix associated with the electric echo signal EES). In other words, the "to_md_capture" parameter is indicative of an approximate estimation of the time-of-flight used as a starting point for the time-of-flight calculation and is proportional to x_max_inv - 3σ, the x_max_inv being described in the following and the σ being a predefined value linked to the standard deviation of a Gaussian curve approximating the envelope signal portion EESENV,p, and the "Kappa_p" parameter is indicative of the spread of the sigma points around a mean value of the state variable of the UKF.

In the following, the UKF parameters will be globally denoted by UKFPk, wherein k denotes the iteration of the TOF method (indeed, as better discussed in the following, according to an embodiment the UKF parameters are tuned or adjusted or updated at each iteration of the TOF method).

According to an embodiment, the UKF module <NUM> is configured to process the envelope signal portion EESENV,p and the noise power NP of the electric echo signal EES to obtain an estimate of the envelope signal EESENV (hereinafter referred to as envelope signal estimate EESENV,est). According to an embodiment, the envelope signal estimate EESENV,est is a regenerated version of the envelope signal EESENV being regenerated from the envelope signal portion EESENV,p (see, for example,<NPL>).

According to an embodiment, the processing unit <NUM> comprises a module (hereinafter, evaluation module) <NUM> for determining the TOF estimate according to the envelope signal estimate EESENV,est.

According to an embodiment, the TOF estimate is based on the following discrete-time expression modelling the ultrasonic signal envelope (see, for example, <NPL>): <MAT> wherein:.

According to an embodiment, the evaluation module <NUM> is configured to determine, according to the TOF estimate, the distance estimate DEST between the target object T and the TOF device <NUM>.

According to an embodiment, the processing unit <NUM> comprises a module (hereinafter, error module) <NUM> for determining an estimate error ε. As better discussed in the following, the operative parameters OPk (or a subset thereof) and the UKF parameters UKFPk (or a subset thereof) are determined according to the Particle Swarm Optimization receiving the estimate error ε as input).

According to an embodiment, the estimate error ε determined at the error module <NUM> comprises a difference between the distance estimate DEST and the distance DACT (i.e., the actual distance) between the TOF device <NUM> and the target body T. As will be better understood from the following discussion, this embodiment allows iteratively adjusting, tuning, updating or refining the operative parameters OPk (or a subset thereof) and the UKF parameters UKFPk at a preliminary or calibrating phase of the TOF device <NUM> (i.e., a phase that precedes the use of the TOF device <NUM> as a meter, e.g. as a distance meter). As better discussed in the following, this preliminary or calibrating phase of the TOF device <NUM> is obtained through an embodiment of the TOF method (hereinafter referred to as "offline TOF method"), in which a known target body T placed at a known distance DACT is used to set the operative parameters OPk and the UKF parameters UKFPk to be subsequently used by the TOF device <NUM> when used as a meter (e.g., a distance meter).

According to an embodiment, the estimate error ε determined at the error module <NUM> comprises a difference between the envelope signal estimate EESENV,est and the envelope signal EESENV. As will be better understood from the following discussion, this embodiment allows iteratively adjusting, tuning, updating or refining a subset of the operative parameters OPk and a subset of the UKF parameters UKFPk in real-time during the use of the TOF device <NUM> as a meter (e.g. as a distance meter). As better discussed in the following, this is obtained through an embodiment of the TOF method (hereinafter referred to as "online TOF method").

According to an embodiment, the TOF device <NUM> may be configured to implement the offline TOF method (in which case the distance estimate DEST and the distance DACT are received at the error module <NUM>), or the online TOF method (in which case the envelope signal EESENV and the envelope signal estimate EESENV,est are received at the error module <NUM>), or both the offline and online TOF methods (for example, with the online TOF method that may follow the offline TOF method): the possibility of implementing the offline TOF method and/or the online TOF method is conceptually represented in <FIG> by dashed arrows associated the distance estimate DEST, the distance DACT, the envelope signal EESENV and the envelope signal estimate EESENV,est being input to the error module <NUM>.

According to an embodiment, the processing unit <NUM> comprises a module (hereinafter, Swarm module) <NUM> for determining the operative parameters OPk (or the subset of operative parameters OPk) and the UKF parameters UKFPk (or the subset of UKF parameters UKFPk) according to the Particle Swarm Optimization and based on the estimate error ε received as input by the error module <NUM>.

Particle Swarm Optimization is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. It solves a problem by having a population of candidate solutions, called particles, and moving these particles around in the search-space according to simple mathematical formulae over the particle's position and velocity. Each particle's movement is influenced by its local best known position, but is also guided toward the best known positions in the search-space, which are updated as better positions are found by other particles.

The main equations of the Particle Swarm Optimization are the following: <MAT> <MAT> <MAT> <MAT> wherein:.

<FIG> shows an activity diagram of an offline TOF method <NUM>A according to embodiments of the present invention.

According to an embodiment, the offline TOF method <NUM>A is implemented by proper software instructions stored in or accessible by the TOF device <NUM>, and/or by proper hardware/firmware of the TOF device <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises acquiring the ultrasonic echo signal UES thereby obtaining the corresponding electric echo signal EES (action node <NUM>). According to an embodiment, the acquisition of the ultrasonic echo signal UES to obtain the corresponding electric echo signal EES is performed at the conditioning and conversion system (not shown) of the ultrasonic transducer <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises determining the noise power NP of the electric echo signal EES (action node <NUM>). According to an embodiment, the noise power NP of the electric echo signal EES is determined at the Fourier module <NUM> of the processing unit <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises determining the envelope signal EESENV (action node <NUM>). According to an embodiment, the envelope signal EESENV is determined at the Hilbert module <NUM> of the processing unit <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises determining the envelope signal portion EESENV,p (action node <NUM>). According to an embodiment, the envelope signal portion EESENV,p is determined at the portion module <NUM> of the processing unit <NUM>. According to an embodiment, the envelope signal portion EESENV,p is determined based on the operative parameters OPk resulting from Particle Swarm Optimization performed at the previous ((k-<NUM>)-th) iteration before the current (k-th) iteration. According to an embodiment, at a first running of the offline TOF method <NUM>A (k=<NUM>), in which no operative parameter tuning based on Particle Swarm Optimization has yet taken place, the operative parameters OPk are at default values, the default values being for example determined at manufacturer side, e.g. based on design experience.

According to an embodiment, the offline TOF method <NUM>A comprises determining the envelope signal estimate EESENV,est according to the envelope signal portion EESENV,p and the noise power NP (action node <NUM>). According to an embodiment, the envelope signal portion EESENV,p is determined at the UKF module <NUM> of the processing unit <NUM>, as better discussed in the following with reference to <FIG>. According to an embodiment, the envelope signal estimate EESENV,est is determined based on the UKF parameters UKFPk resulting from Particle Swarm Optimization performed at the previous ((k-<NUM>)-th) iteration before the current (k-th) iteration. According to an embodiment, at a first running of the offline TOF method <NUM>A (k=<NUM>), in which no UKF parameters tuning based on Particle Swarm Optimization has yet taken place, the UKF parameters UKFPk are at default values, the default values for example being determined at manufacturer side, e.g. based on designer experience.

According to an embodiment, the offline TOF method <NUM>A comprises determining the TOF estimate according to the envelope signal estimate EESENV,est and the distance estimate DEST according to the TOF estimate (action node <NUM>). According to an embodiment, the TOF estimate and the distance estimate DEST are determined at the evaluation module <NUM> of the processing unit <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises determining the estimate error ε as the difference between the distance estimate DEST and the distance DACT (action node <NUM>A). According to an embodiment, the estimate error ε is determined at the error module <NUM> of the processing unit <NUM>.

According to an embodiment, the offline TOF method <NUM>A comprises iteratively adjusting and refining the operative parameters OPk and the UKF parameters UKFPk (or a subset thereof) as long as the estimate error ε is higher than a threshold estimate error εTH. According to an embodiment, if the estimate error ε is higher than the threshold estimate error εTH (exit branch N of decision node <NUM>), the following iteration starts (k=k+<NUM>, action node <NUM>), and the operative parameters OPk and the UKF parameters UKFPk are adjusted at the Swarm module <NUM> of the processing unit <NUM> based on the estimate error ε received as input by the error module <NUM> and on the Particle Swarm Optimization.

According to an embodiment, nodes <NUM>-<NUM> are repeated as such as long as the estimate error ε is higher than the threshold estimate error εTH.

Back to decision node <NUM>, according to an embodiment, if the estimate error ε is lower than the threshold estimate error εTH (exit branch Y of decision node <NUM>), which means that the operative parameters OPk and the UKF parameters UKFPk have been optimized, the optimized operative parameters OPk and the optimized UKF parameters UKFPk are properly stored (action node <NUM>) to be used for the following running of the offline TOF method <NUM>A (or for the subsequent running of the online TOF method), then the offline TOF method <NUM>A ends.

The offline TOF method may be useful in the design phase, in which the TOF estimate is determined with great accuracy from a set of signals in a supervised manner and with known measurement conditions. The Applicant has experimentally ascertained that a TOF device with operative and UKF parameters optimized through the offline TOF method is capable of managing a very large number of shapes of ultrasonic echo signals for distances within <NUM> to <NUM>, with a mean accuracy lower than <NUM>.

<FIG> shows an activity diagram of an online TOF method <NUM>B according to embodiments of the present invention.

According to an embodiment, the online TOF method <NUM>B is implemented by proper software instructions stored in or accessible by the TOF device <NUM>, and/or by proper hardware/firmware of the TOF device <NUM>.

According to an embodiment, the online TOF method <NUM>B comprises acquiring the ultrasonic echo signal UES thereby obtaining the corresponding electric echo signal EES (action node <NUM>). According to an embodiment, the acquisition of the ultrasonic echo signal UES to obtain the corresponding electric echo signal EES is performed at the conditioning and conversion system (not shown) of the ultrasonic transducer <NUM>.

According to an embodiment, the online TOF method <NUM>B comprises determining the noise power NP of the electric echo signal EES (action node <NUM>). According to an embodiment, the noise power NP of the electric echo signal EES is determined at the Fourier module <NUM> of the processing unit <NUM>.

According to an embodiment, the online TOF method <NUM>B comprises determining the envelope signal EESENV (action node <NUM>). According to an embodiment, the envelope signal EESENV is determined at the Hilbert module <NUM> of the processing unit <NUM>.

According to an embodiment, the online TOF method <NUM>B comprises determining the envelope signal portion EESENV,p (action node <NUM>). According to an embodiment, the envelope signal portion EESENV,p is determined at the portion module <NUM> of the processing unit <NUM>. According to an embodiment, the envelope signal portion EESENV,p is determined based on the subset of the operative parameters OPk resulting from Particle Swarm Optimization performed at the previous ((k-<NUM>)-th) iteration before the current (k-th) iteration. According to an embodiment, at a first running of the online TOF method <NUM> (k=<NUM>), in which no operative parameter tuning based on Particle Swarm Optimization has yet taken place, the subset of the operative parameters OPk are at default values, the default values being for example determined at manufacturer side, e.g. based on designer experience, or at an offline TOF method (such as the offline TOF method <NUM>A) performed before the online TOF method <NUM>B.

According to an embodiment, the subset of the operative parameters OPk comprise, but are not limited to, the third and fourth operative parameters Coeff1, Coeff2 (i.e., the operative parameters indicative of optimized lengths of the left and right portions of the envelope signal EESENV, and hence of an optimized overall length of the envelope signal portion EESENV,p over the abscissae axis). Indeed, the Applicant has experimentally ascertained that the first and second operative parameters Perc_l, Perc_u, especially when they are tuned during an offline TOF method (such as the offline TOF method <NUM>A) preceding the online TOF method <NUM>B, are valid enough to allow identifying (together with the third and fourth operative parameters Coeffl, Coeff2 tuned during the online method <NUM>B) the best envelope signal portion EESENV,p.

According to an embodiment, the online TOF method <NUM>B comprises determining the envelope signal estimate EESENV,est according to the envelope signal portion EESENV,p and the noise power NP (action node <NUM>). According to an embodiment, the envelope signal portion EESENV,p is determined at the UKF module <NUM> of the processing unit <NUM>, as better discussed in the following with reference to <FIG>. According to an embodiment, the envelope signal estimate EESENV,est is determined based on the subset of the UKF parameters UKFPk resulting from Particle Swarm Optimization performed at the previous ((k-<NUM>)-th) iteration before the current (k-th) iteration. According to an embodiment, at a first running of the online TOF method <NUM> (k=<NUM>), in which no UKF parameters tuning based on Particle Swarm Optimization has yet taken place, the subset of the UKF parameters UKFPk are at default values, the default values being for example determined at manufacturer side, e.g. based on designer experience.

According to an embodiment, the subset of the UKF parameters UKFPk comprise, but are not limited to, the evaluation parameter and the control parameter. Indeed, the Applicant has experimentally ascertained that some parameters, such as the correction parameter, do not affect (or do not substantially affect) the TOF estimate. Therefore, according to an embodiment, the correction parameter, especially when it is tuned during an offline TOF method (such as the offline TOF method <NUM>A) preceding the online TOF method <NUM>B, is not tuned again during the online TOF method <NUM>B.

According to an embodiment, the online TOF method <NUM>B comprises determining the estimate error ε as the difference between the envelope signal estimate EESENV,est and the envelope signal EESENV (action node <NUM>B). According to an embodiment, the estimate error ε is determined at the error module <NUM> of the processing unit <NUM>.

According to an embodiment, the online TOF method <NUM>B comprises iteratively adjusting and refining the subset of the operative parameters OPk and the subset of the UKF parameters UKFPk as long as the estimate error ε is higher than a threshold estimate error εTH. According to an embodiment, if the estimate error ε is higher than the threshold estimate error εTH (exit branch N of decision node <NUM>), the following iteration starts (k=k+<NUM>, action node <NUM>), and the subset of the operative parameters OPk and the subset of the UKF parameters UKFPk are adjusted at the Swarm module <NUM> of the processing unit <NUM> based on the estimate error ε received as input by the error module <NUM> and on the Particle Swarm Optimization.

Back to decision node <NUM>, according to an embodiment, if the estimate error ε is lower than the threshold estimate error εTH (exit branch Y of decision node <NUM>), which means that the subset of the operative parameters OPk and the subset of the UKF parameters UKFPk have been optimized, the TOF estimate is determined according to the envelope signal estimate EESENV,est (i.e., the envelope signal estimate EESENV,est determined based on the optimized subset of the operative parameters OPk and the optimized subset of the UKF parameters UKFPk) and the distance estimate DEST is determined according to the TOF estimate (action node <NUM>). According to an embodiment, the TOF estimate and the distance estimate DEST are determined at the evaluation module <NUM> of the processing unit <NUM>.

According to an embodiment, the optimized subset of the operative parameters OPk and the optimized subset of the UKF parameters UKFPk are properly stored (action node <NUM>) to be used for the following running of the online TOF method <NUM>B.

The online TOF method provides a TOF estimate that dynamically and automatically adapts to different external conditions.

As an example, the offline TOF method <NUM>A and the online TOF method <NUM>B are carried out on a training dataset comprising, for example, <NUM> ultrasonic echo signals (e.g., <NUM> used for the offline tuning and <NUM> used for testing the online tuning) indicative of distances between the target object T and the TOF device <NUM> ranging between about <NUM> and about <NUM> and acquired at a sampling rate of about 400kS/s. In particular, the <NUM> ultrasonic echo signals used for testing the online tuning are acquired under various operative conditions (e.g., variable temperature, humidity, wind speed, etc.).

Referring now to <FIG>, it shows a simplified block diagram of an electronic system <NUM> (i.e., a portion thereof) comprising the TOF device <NUM> (or more thereof) according to an embodiment of the present invention.

According to an embodiment, the electronic system <NUM> is suitable for use in electronic apparatus.

According to an embodiment, the electronic system <NUM> comprises a controller <NUM> (for example, one or more microprocessors and/or one or more microcontrollers).

According to an embodiment, the electronic system <NUM> comprises an input/output device <NUM> (for example, a keyboard and/or a screen). The input/output device <NUM> may for example be used to generate and/or receive messages. The input/output device <NUM> may for example be configured to receive/supply a digital signal and/or an analog signal.

According to an embodiment, the electronic system <NUM> comprises a wireless interface <NUM> for exchanging messages with a wireless communication network (not shown), for example by means of radio frequency signals. Examples of a wireless interface may include antennas and wireless transceivers.

According to an embodiment, the electronic system <NUM> comprises a power supply device (for example, a battery <NUM>) for powering the electronic system <NUM>.

According to an embodiment, the controller <NUM> (or one or more dedicated computing units, not shown) may be configured to determine additional information (such as displacement information, level information, material information, structure information, vibration information, and medical diagnostic information) based on the distance information provided by the TOF device <NUM>.

According to an embodiment, the electronic system <NUM> comprises one more communication channels (bus) <NUM> to allow the exchange of data between the TOF device <NUM>, the controller <NUM> (when provided), the input/output device <NUM> (when provided), the wireless interface <NUM> (when provided), and the power supply device <NUM> (when provided).

<FIG> shows an activity diagram of a signal cutting method <NUM> according to embodiments of the present invention. The signal cutting method <NUM> allows, during use of the TOF device <NUM>, to determine the envelope signal portion EESENV,p by applying the operative parameters to the envelope signal EESENV.

According to an embodiment, the signal cutting method <NUM> is implemented by proper software instructions stored in or accessible by the TOF device <NUM>, and/or by proper hardware/firmware of the TOF device <NUM>. In particular, the signal cutting method <NUM> is implemented by the portion module <NUM>.

In details, the signal cutting method <NUM> comprises determining the maximum of the envelope signal EESENV (action node <NUM>) according to per se known techniques, i.e. comprises calculating a maximum value max_inv of the envelope signal EESENV and a first temporal position x_max_inv (over the abscissae axis, i.e. over time; also called first time instant x_max_inv) in the envelope signal EESENV of said maximum value max_inv.

The signal cutting method <NUM> comprises calculating, through the first and the second operative parameter Perc_l, Perc_u, respectively a first threshold value thresh1 and a second threshold value thresh2 of the envelope signal EESENV (action node <NUM>), which are lower than the maximum value max_inv. In details, the first threshold value thresh1 is a threshold for the envelope signal EESENV that is related to a maximum length of the left portion of the envelope signal EESENV, and the second threshold value thresh2 is a threshold for the envelope signal EESENV that is related to a maximum length of the right portion of the envelope signal EESENV. In other words, the left portion of the envelope signal EESENV comprises values of the envelope signal EESENV ranging between the first threshold value thresh1 and the maximum value max_inv, and the right portion of the envelope signal EESENV comprises values of the envelope signal EESENV ranging between the maximum value max_inv and the second threshold value thresh2. In further details, the first threshold value thresh1 and the second threshold value thresh2 are calculated based on (in particular, dependent on the product of) the maximum value max_inv of the envelope signal EESENV and the first and, respectively, the second operative parameter Perc_l, Perc_u. In particular, thresh1 = Perc_l · max_inv and thresh<NUM> = Perc_u · max_inv.

The signal cutting method <NUM> further comprises determining a second temporal position x_thresh1 (over the abscissae axis, i.e. over time; also called second time instant x_max_inv) of the first threshold value thresh1 and a third temporal position x_thresh2 (over the abscissae axis, i.e. over time; also called third time instant x_max_inv) of the second threshold value thresh2 in the envelope signal EESENV (action node <NUM>), the second and third temporal position x_thresh1, x_thresh2 being related to a maximum length of the left and, respectively, right portion of the envelope signal EESENV. The first and second temporal positions x_thresh1, x_thresh2 are the temporal positions of the envelope signal EESENV at which the envelope signal EESENV assumes the first and, respectively, the second threshold values thresh1, thresh2 and are positioned prior to and, respectively, following the first temporal position x_max_inv (i.e., are at left and, respectively, at right of the first temporal position x_max_inv on the time scale). In other words, x_thresh1 = x_max_inv - Δ1 and x_thresh2 = x_max_inv - Δ2, where Δ1 and Δ2 are respective time intervals whose lengths correspond to the maximum time lengths of the left and, respectively, right portions of the envelope signal EESENV. Therefore, the left portion of the envelope signal EESENV ranges at most between the second temporal position x_thresh1 and the first temporal position x_max_inv, and the right portion of the envelope signal EESENV ranges at most between the first temporal position x_max_inv and the third temporal position x_thresh2.

Therefore, according to an embodiment, the envelope signal portion EESENV,p includes (in details, coincides with) the portion of the envelope signal EESENV comprised between the second temporal position x_thresh1 and the third temporal position x_thresh2.

Optionally, according to a different embodiment, the signal cutting method <NUM> further comprises optimizing the envelope signal portion EESENV,p by calculating, through the third and fourth operative parameters Coeffl, Coeff2, a fourth temporal position x_opt1 (over the abscissae axis, i.e. over time; also called fourth time instant x_max_inv) and a fifth temporal position x_opt2 (over the abscissae axis, i.e. over time; also called fifth time instant x_max_inv) of the envelope signal EESENV (action node <NUM>). The fourth temporal position x_opt1 is greater than the second temporal position x_thresh1 and depends on the second temporal position x_thresh1 and the third operative parameter Coeffl, and the fifth temporal position x_opt2 is lower than the third temporal position x_thresh2 and depends on the third temporal position x_thresh2 and the fourth operative parameter Coeff2. In the present embodiment, the envelope signal portion EESENV,p includes (in details, coincides with) the portion of the envelope signal EESENV comprised between the fourth temporal position x_opt1 and the fifth temporal position x_opt2. In other words, the fourth temporal position x_opt1 and the fifth temporal position x_opt2 are indicative of an optimized length of the left and, respectively, of the right portion of the envelope signal EESENV. In particular, x_thresh1 < x_opt1 < x_max_inv and x_max_inv < x_opt2 < x_thresh2. In further details, the third and fourth operative parameters Coeffl, Coeff2 are indicative of respective time offsets to be applied respectively to the second and third temporal positions x_thresh1, x_thresh2 to obtain the fourth and fifth temporal position x_opt1, x_opt2. In other words, x_opt1 = x_thresh1 + Coeff1 and x_opt2 = x_thresh2 - Coeff2, where Coeff1 < Δ1 and Coeff2 < Δ2. Therefore, in the present case the optimized left portion of the envelope signal EESENV ranges between the fourth temporal position x_opt1 and the first temporal position x_max_inv, and the optimized right portion of the envelope signal EESENV ranges between the first temporal position x_max_inv and the fifth temporal position x_opt2.

<FIG> shows an activity diagram of a time-of-flight estimation method <NUM> according to embodiments of the present invention. The time-of-flight estimation method <NUM> allows to estimate the time-of-flight between the ultrasonic signal emitted by the TOF device <NUM> and the ultrasonic echo signal returned by the target object T hit by the ultrasonic signal and received at the TOF device <NUM>.

According to an embodiment, the time-of-flight estimation method <NUM> is implemented by proper software instructions stored in or accessible by the TOF device <NUM>, and/or by proper hardware/firmware of the TOF device <NUM>.

According to an embodiment, the time-of-flight estimation method <NUM> comprises acquiring the ultrasonic echo signal UES thereby obtaining the corresponding electric echo signal EES (action node <NUM>). According to an embodiment, the acquisition of the ultrasonic echo signal UES to obtain the corresponding electric echo signal EES is performed at the conditioning and conversion system (not shown) of the ultrasonic transducer <NUM>.

According to an embodiment, the time-of-flight estimation method <NUM> comprises determining the noise power NP of the electric echo signal EES (action node <NUM>). According to an embodiment, the noise power NP of the electric echo signal EES is determined at the Fourier module <NUM> of the processing unit <NUM>.

According to an embodiment, the time-of-flight estimation method <NUM> comprises determining the envelope signal EESENV (action node <NUM>). According to an embodiment, the envelope signal EESENV is determined at the Hilbert module <NUM> of the processing unit <NUM>.

According to an embodiment, the time-of-flight estimation method <NUM> comprises determining the envelope signal portion EESENV,p (action node <NUM>) according to the previously described signal cutting method <NUM>. According to an embodiment, the envelope signal portion EESENV,p is determined at the portion module <NUM> of the processing unit <NUM> based on the operative parameters OPk resulting from the offline TOF method <NUM>A or the online TOF method <NUM>B.

According to an embodiment, the time-of-flight estimation method <NUM> comprises determining the envelope signal estimate EESENV,est according to the envelope signal portion EESENV,p and the noise power NP (action node <NUM>). According to an embodiment, the envelope signal portion EESENV,p is determined at the UKF module <NUM> of the processing unit <NUM> based on the UKF parameters UKFPk resulting from the offline TOF method <NUM>A or the online TOF method <NUM>B.

According to an embodiment, the time-of-flight estimation method <NUM> comprises determining the TOF estimate according to the envelope signal estimate EESENV,est and the distance estimate DEST according to the TOF estimate (action node <NUM>). According to an embodiment, the TOF estimate and the distance estimate DEST are determined at the evaluation module <NUM> of the processing unit <NUM>.

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

The signal cutting method <NUM> reduces the computational cost required for estimating the time-of-flight through the time-of-flight estimation method <NUM>, in particular by reducing the computation cost of the UKF module <NUM>.

The envelope signal portion EESENV,p outputted by the action node <NUM> is already optimized for the UKF module <NUM>. Nevertheless, calculating the envelope signal portion EESENV,p according to the action node <NUM> allows to further reduce the computational cost and improve the time-of-flight estimation accuracy.

The optimized subset of the operative parameters OPk and the optimized subset of the UKF parameters UKFPk are calculated through the offline TOF method <NUM>A. Moreover, the third and fourth operative parameters Coeffl, Coeff2 can be further optimized through the online TOF method <NUM>B.

Claim 1:
Method (<NUM>A; <NUM>B; <NUM>) for providing an estimate of a time-of-flight between an ultrasonic signal emitted by a device (<NUM>) and an ultrasonic echo signal returned by a target object (T) hit by the ultrasonic signal and received at the device, the method comprising:
- acquiring (<NUM>; <NUM>) the ultrasonic echo signal thereby obtaining an electric echo signal;
- determining (<NUM>; <NUM>) a noise power of the electric echo signal;
- determining (<NUM>; <NUM>) an envelope signal indicative of an envelope of the electric echo signal;
- determining (<NUM>; <NUM>) a portion of the envelope signal based on at least one operative parameter (OPK), said at least one operative parameter being determined according to Particle Swarm Optimization;
- processing (<NUM>; <NUM>) the portion of the envelope signal and the noise power of the echo ultrasonic signal according to an Unscented Kalman Filter to obtain an estimate of the envelope signal, wherein the estimate of the envelope signal is a regenerated version of the envelope signal being regenerated from the portion of the envelope signal, said processing being based on at least one Unscented Kalman Filter parameter (UKFPK) determined according to the Particle Swarm Optimization, and
- providing (<NUM>; <NUM>) said estimate of the time-of-flight according to the estimate of the envelope signal.