Method and apparatus for feature extraction of time series and generating synthetic time series based on the extracted features

DE102024201468A1Pending Publication Date: 2025-08-21ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102024201468
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-16
Publication Date
2025-08-21

Smart Images

  • Figure 00000009_0000
    Figure 00000009_0000
Patent Text Reader

Abstract

Method for determining descriptive features of a time series originating from a repetitive production process. The method begins by providing the time series along with a number of nodes and a degree for a spline approximation. The nodes serve to define the splines used to approximate the time series. Next, the nodes are distributed over the range of observed times. After the nodes have been distributed, the time series is approximated using the splines. Finally, the spline coefficients for the nodes are stored as descriptive features.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a method for determining descriptive features of a time series and their use for generating a synthetic time series that is as realistic as possible. State of the art

[0002] For time series of repeatable processes, especially manufacturing processes, descriptive statistics of a time series instance can be extracted as features.

[0003] Feature extraction is a well-known technique, particularly in machine learning and data analytics, in which relevant features are identified and extracted from raw data. These features are used to create a more informative dataset that can be used for various tasks such as classification, prediction, regression, anomaly detection, forecasting, or clustering.

[0004] Feature extraction aims to reduce data complexity (often referred to as "data dimensionality") while retaining as much relevant information as possible. This helps improve the performance and efficiency of machine learning algorithms and simplify the analysis process.

[0005] In general, a feature is a property that characterizes a data point or sequence of data points. Relevant features have a correlation or influence on the use case of a model.

[0006] Manufacturing processes generally tend to produce time series data with highly imbalanced label distributions. For example, there are typically significantly more processes / parts labeled "OK" than "NOK." Classification and anomaly detection models trained on such time series often tend to favor the overrepresented class. Time series augmentation is one approach to reduce such imbalances. Well-known time series augmentation approaches aim to generate new synthetic time series using specialized Generative Adversarial Networks (GAN) architectures.

[0007] However, these methods are very data-intensive and struggle to replicate smoothness for real-world data. They work primarily well with classical time series that are stationary (after correcting for potential drift and seasonality). Advantages of the invention

[0008] A method is proposed that enables the extraction of particularly meaningful features from a time series. This makes it possible to obtain a low-dimensional representation of a time series instance in which a particularly small number of features are sufficient to represent the time series instance. Depending on the specific application, it is thus possible to use 282 relevant features instead of the standard tsfresh settings, achieving the same downstream performance as with the six features according to the invention.

[0009] Furthermore, the extracted features are explainable, i.e. the essence of the time series can be reconstructed from the features and each feature corresponds to the value range of the time series at specified intervals. If the (tabular) downstream model can generate a score per feature (e.g. local or global feature importance or marginal anomalous scores for each feature), these can be transferred back to the time domain. Since each extracted feature is associated with a spline, and each of these splines only covers a certain value range, we can map this score to this value range. In areas where the spline supports overlap, the scores are aggregated accordingly. This way, for example, in the downstream task of a classification, one receives information about which areas of the curve contributed to the curve being classified in this way.

[0010] Furthermore, the method is proposed for generating synthetic time series. Compared to comparable methods, which are usually based on synthetic time series generation methods based on GANs, the use of this method has the following advantages: Less data is required (even one observation is sufficient). Furthermore, the method is not a black box and thus highly interpretable. Furthermore, GANs are often unable to produce realistic-looking time series (or require extensive hyperparameter tuning to achieve realism), whereas the method generates realistic time series. Disclosure of the invention

[0011] In a first aspect of the invention, a method according to claim 1 is proposed which fits one or more smooth curves as closely as possible to sections of a time series instance and uses the coefficients of these functions as extracted features. In detail, it is proposed to approximate each time series by a linear combination of (base) splines. Splines as such are well known and can be used to approximate any continuous function as closely as desired. The coefficients of the splines are the extracted features. This is advantageous because it has been found that these features represent a form of the time series curve very well and are therefore meaningful features. Surprisingly, this approach is particularly suitable for time series that depict repetitive processes.

[0012] It should be noted that the features can be used in addition to the features typically known for time series. Extraction can generally also be performed using a rolling window approach to deal with longer, non-repeatable time series.

[0013] A time series can be understood as a plurality of sensor measurements over time, each recorded at specified points in time. The time series can be a single-dimensional or multi-dimensional time series. Preferably, the time series is recorded during a repeatable manufacturing process (e.g., a pressing or screwing process). Alternatively, the time series can be recorded from a repeatable physical or chemical process, e.g., vehicle sensor measurements.

[0014] In a second aspect of the invention, it is proposed that the method of the first aspect of the invention is used to generate synthetic time series.

[0015] First, each observed time series from a real data set is approximated using (base) splines. The coefficients of the splines are stored according to the method of the first aspect of the invention, which can also be referred to as features according to the first aspect of the invention, as well as residuals resulting from the difference between the original time series and the approximation. According to the second aspect of the invention, it is proposed to modify coefficients in the coefficient space in order to generate time series that are as realistic as possible. A first method of the second aspect of the invention consists in adding random noise to the coefficients. A multivariate normal noise with an expected value of zero and a covariance matrix can be used, where the covariance matrix of the noise is proportional to the covariance matrix of the real coefficients.A second method involves using a weighted combination between two closely spaced observed coefficients. The modified coefficients are then transferred back into the time series space according to the first or second method, preferably by converting the coefficients into splines.

[0016] To account for roughness in the time series, the residuals of the donor instance from which the original coefficients originate are added. This allows preserving the characteristic features of the time series while generating new coefficients that capture variation and roughness.

[0017] According to a further aspect of the invention, a method for generating synthetic time series according to the second aspect of the invention is used to extend a training data set of training time series, wherein the extended training data set is used to train a machine learning model.

[0018] The present invention also provides a method for training a machine learning model for classification or anomaly detection, particularly in production processes. The method comprises the steps of: providing an extended training dataset of training time series, which is extended by synthetically generated time series according to the present method for generating synthetic time series; training the machine learning model based on the extended training dataset; and providing the trained machine learning model for classification or anomaly detection, particularly in production processes.

[0019] This article also proposes an inference method for classification or anomaly detection, particularly in production processes. The inference method comprises the following steps: Providing time series data collected by a sensor; and classifying the provided time series data and / or detecting anomalies in the provided time series data by a previously trained machine learning model.

[0020] The present inference method can also be used for the analysis of sensor data. A sensor can capture measurements of the environment in the form of sensor signals. These sensor signals can comprise one- or multi-dimensional time series, for example, from a repeatable process (e.g., a pressing or screwing operation).

[0021] The present inference method and / or the generation method can also be used to detect anomalies in a technical system. For example, synthetic time series can be generated to augment an existing dataset of time series in order to increase the size and / or balance the dataset (e.g., "OK" / "NOK" time series). Training the machine learning model to detect anomalies based on the augmented dataset leads to improved model performance compared to training based only on the originally acquired time series.

[0022] In further aspects, the invention relates to a device and a computer program, each of which is configured to carry out the above methods, and to a machine-readable storage medium on which this computer program is stored.

[0023] Embodiments of the invention are explained in more detail below with reference to the accompanying drawings. In the drawings: Fig. 1 schematically shows a flow diagram of a first embodiment of the invention; Fig. 2 schematically shows a flow diagram of a second embodiment of the invention; Fig. 3 schematically shows an apparatus for carrying out the invention. Description of the embodiments

[0024] In production environments, many processes record a measurement over time, i.e., sensor data acquired during a production operation is compiled into a time series. The production operation may be a pressing process, where an applied force, but also other sensor data such as torque, pressure, temperature, angle, ...) was recorded as a time series. These measurement curves often have an expected shape, around which the measurements vary. Measurements of NOK parts often show a different shape of the curve. The invention can be used to extract features from these time series to be used in downstream tasks such as classification, regression, clustering, and / or anomaly detection of the produced part.

[0025] Fig. Figure 1 shows a flowchart of a method for determining meaningful features of a time series. In other words, low-dimensional embeddings of a time series are extracted from the time series. These embeddings can be used for many different downstream tasks by training state-of-the-art tabular machine learning models on these embeddings. It is also conceivable, however, that the features are used for a virtual sensor, i.e., based on the features, information about the manufactured product during the acquired time series, which was encoded in the features, can be determined using a synthetic sensor value.

[0026] It is also conceivable that the features of the time series could be used for classification. For example, the features could be used to detect anomalies in sensor data, whereby the data could be classified (e.g., into different error types).

[0027] It is also conceivable, however, that the time series characteristics could be used for regression. This means that the characteristics can be used to determine one or more continuous values, i.e., to conduct a regression analysis.

[0028] It is also conceivable that the features of the time series could be used for prediction. In this application, the features can be used to predict future values ​​of the given time series according to a rolling window approach.

[0029] In the following, Fig. 1, a method for determining features of repeatable time series instances is presented. The method comprises the following steps: Selection (S11) of a number of nodes and a maximum degree for a spline approximation of the respective time series. The user can specify the number of nodes and the degree to be used for the spline approximation.

[0030] Obtaining (S12) the observed time steps of the time series instances.

[0031] Distribution (S13) of the nodes across the range of observed times to define the splines used. The nodes are preferably distributed uniformly across the range of observed times. These nodes implicitly define the splines used to approximate the time series instances.

[0032] Evaluation (S14) of all base splines, preferably at each observed time step. This evaluation provides the spline values ​​at the respective time points.

[0033] In a preferred further development of the method, the following steps can be carried out after step S14: Learning (S15) a linear regression. A linear regression is learned for a time series, whereby the regression uses the evaluated splines to predict the observed value of the time series as a linear combination of the spline values. The learned regression parameters correspond to the coefficients of the spline approximation. That is, the coefficients of the spline approximation are the coefficients of the linear regression. In other words, n basis splines f i used. At time t, the time series value x is described as follows: x = a1 * f1(t) + ··· + a n * f n (t).

[0034] This formula is determined for all observations x for the respective observation period t. First, the values ​​f i(t). The spline coefficients are then obtained as a linear regression from the equation above.

[0035] Save the learned regression coefficients as extracted features.

[0036] Fig. Figure 2 shows a flowchart of a method for generating synthetic time series. In this way, the method according to Fig. 2 contribute to obtaining a more balanced training set and thus improving the generalization capabilities of machine learning systems. The machine learning systems can be trained for any task. One advantage of this is that the method according to Fig. 2 can also be useful to supplement real training datasets for which data collection is difficult or expensive.

[0037] A particular advantage of the procedure according to Fig. 2 is that it is able to generate synthetic time series based only on a small sample of real time series and is thus very data efficient.

[0038] The method according to Fig. 2 is used to generate synthetic data from a given time series dataset to increase its size and / or make it more balanced (i.e., "OK" / "NOK" time series). Training the classification model on the augmented dataset often improves its performance compared to training only on the real-time time series.

[0039] In a first embodiment of the Fig. 2, one or more synthetic time series are generated by modifying the coefficients of the splines using additive noise.

[0040] The method begins with a first step S21. One or more time series are provided as a real data set.

[0041] In the subsequent step S22, the following substeps are carried out for each time series instance of the real data set: Extracting the spline coefficients obtained according to the method of Fig. 1 and storing these coefficients.

[0042] After step S22, the time series instance is reconstructed in step S23 based on the stored coefficients. Subsequently, a difference between the time series instance and the reconstructed time series is determined using the splines; these differences are referred to below as residuals. Furthermore, in step S23, these residuals are stored with the corresponding coefficients of the time series from the data set.

[0043] This is followed by the actual generation of new synthetic time series. In step S24, the following substeps are performed: First, a number of synthetic time series to be generated and optionally a temperature between 0 and 1 are specified.

[0044] Generate a noise, where the noise is generated from a multivariate normal distribution with zero mean and covariance matrix. The covariance matrix can be calculated as follows: temperature × cov (stored coefficients).

[0045] Selecting a “donor instance” from the data set and thus a set of stored coefficients and adding the noise to the coefficients.

[0046] Transferring the coefficients back into the time series space as a new synthetic smoothed time series.

[0047] Adding the stored residual of the donor instance to the new synthetic smoothed time series.

[0048] Preferably, step S24 is repeated until the desired number of synthetic time series has been generated.

[0049] In a second embodiment of the Fig. 2, the coefficients are modified depending on a combination of coefficients from other real time series. For the second embodiment, steps S21 to S23 are the same as for the first embodiment. However, in step S24, the following substeps are now executed to generate one or more new synthetic time series: To generate synthetic time series, first, a number of time series to be generated and a temperature between 0 and 1 are provided. Subsequently, a "donor instance" is selected from the data set from step S21, in particular at random, and thus its associated set of stored coefficients.

[0050] Subsequently, additional donor instances, referred to as nearest neighbors of the initial donor instance, are determined from the dataset. For this purpose, a subset of time series can be selected from the entire dataset or randomly drawn. Preferably, the neighbors are a subset of the time series. Preferably, the subset is determined based on temperature. The corresponding coefficient of one of the nearest neighbors is then randomly selected. A random number a between 0.5 and 1 is then generated.

[0051] The new coefficient is determined by a weighting dependent on the random number of the donor instance's coefficient and the randomly drawn coefficient. Preferably, the new coefficient is calculated using the formula a × donor coefficient + (1 - a) × selected neighbor coefficient.

[0052] The coefficients are then transferred back as a new synthetic smoothed time series. To complete the synthetic time series, the stored residual of the donor instance is added to the new synthetic smoothed time series.

[0053] Preferably, step S24 is repeated until the desired number of synthetic time series has been generated.

[0054] The procedure according to Fig. 2 can be useful wherever a time-series machine learning model suffers from imbalanced training data. The invention is particularly valuable for classification in production processes that provide time-series sensor data (e.g., temperature, pressure, force, torque, ...) with a strong mismatch between "OK" and "NOK" (anomalous) parts. Indeed, classification models tend to miss the subtle differences between "OK" and "NOK" time series when trained primarily on "OK" instances.

[0055] In an optional step S25, the generated synthetic time series can be used to be added to a training dataset or used to train a machine learning system.

[0056] Fig. 3 schematically shows a device 500 for carrying out the method according to Fig. 1 or Fig.2. The methods executed by the device 500 can be implemented as a computer program stored on a machine-readable storage medium 54 and executed by a processor 55.

[0057] The term "computer" encompasses any device capable of executing specific computational instructions. These computational instructions can be in the form of software, hardware, or a combination of both software and hardware.

Claims

[1] Method for determining descriptive characteristics of a time series, wherein the time series was recorded during a repetitive process, in particular a production process, comprising the following steps: Obtaining (S11) the time series and a number of nodes and a degree for a spline approximation; Distribution (S12) of the nodes over the range of the time series; Approximating (S13) the time series using splines; and Storing (S14) coefficients of the splines for the knots as descriptive features. [2] Method according to claim 1, wherein in each case a linear regression based on function values ​​of the splines for the accounts on the recorded values ​​of the time series at the respective node is determined (S15) and coefficients of the regression are stored as the descriptive features. [3] The method of claim 2, wherein lasso regression is used. [4] Method according to claim 1 for use in generating a synthetic time series, wherein based on the stored coefficients a smoothed time series is reconstructed by splines, wherein a residual between the obtained time series and the reconstructed time series is determined, wherein noise is generated from a multivariate normal distribution, wherein modified coefficients are determined by adding the noise to the coefficients, wherein the synthetic time series is reconstructed from the modified coefficients and the residual is added to the synthetic time series. [5] Method according to claim 4, wherein the noise is determined from a multivariate normal distribution with zero expected value and covariance matrix depending on a weighted covariance of stored coefficients of further time series. [6] Method according to claim 4, wherein a data set with real time series is provided and for all time series of the data set the coefficients are stored according to the method according to claim 1, wherein coefficients of a first time series are selected, wherein coefficients of further time series are randomly selected from the data set and the modified coefficient is determined by a weighted addition of coefficients of the first time series with coefficients of the random time series. [7] Method according to one of claims 4 to 6, wherein a machine learning system, in particular for classification or anomaly detection, is trained with the synthetic time series. [8] Device which is arranged to carry out the method according to one of the preceding claims. [9] A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method according to claims 1 to 7. [10] Machine-readable storage medium on which the computer program according to claim 9 is stored.