The present application claims priority to and the benefit of German patent application no. 10 2013 227 183.2, which was filed in Germany on Dec. 27, 2013, the disclosure of which is incorporated herein by reference.
The present invention relates in general to engine control units, in which function models are implemented as data-based function models. In particular, the present invention relates to methods for determining a sparse Gaussian process model from provided supporting point data.
The use of data-based function models is provided for the implementation of function models in control units, in particular engine control units for internal combustion engines. Parameter-free data-based function models are frequently used, since they may be prepared without specific specifications from training data, i.e., a set of training data points.
One example of a data-based function model is represented by the so-called Gaussian process model, which is based on the Gaussian process regression. The Gaussian process regression is a multifaceted method for database modeling of complex physical systems. Regression analysis is typically based on large quantities of training data, so that it is advantageous to use approximate approaches, which may be analyzed more efficiently.
For the Gaussian process model, the possibility exists of a sparse Gaussian process regression, during which only a representative set of supporting point data is used to prepare the data-based function model. For this purpose, the supporting point data must be selected or derived in a suitable way from the training data.
The publications by E. Snelson et al., “Sparse Gaussian Processes using Pseudo-inputs”, 2006 Neural Information Processing Systems 18 (NIPS) and Csató, Lehel; Opper, Manfred, “Sparse On-Line Gaussian Processes”; Neural Computation 14: pages 641-668, 2002, discuss a method for ascertaining supporting point data for a sparse Gaussian process model.
Other methods in this regard are discussed in Smola, A. J., Schölkopf, W., “Sparse Greedy Gaussian Process Regression”, Advances in Neural Information Processing Systems 13, pages 619-625, 2001, and Seeger, M., Williams, C. K., Lawrence, N. D., “Fast-Forward Selection to Speed up Sparse Gaussian Process Regression”, Proceedings of the 9th International Workshop on Artificial Intelligence and Statistics, 2003.
Furthermore, control modules having a main computing unit and a model calculation unit for calculating data-based function models in a control unit are known from the related art. Thus, for example, the publication DE 10 2010 028 259 A1 describes a control unit having an additional logic circuit as a model calculation unit which is configured for calculating exponential functions to assist in carrying out Bayesian regression methods, which are required in particular for calculating Gaussian process models.
The model calculation unit is configured as a whole for carrying out mathematical processes for calculating the data-based function model based on parameters and supporting points or training data. In particular, the functions of the model calculation unit are implemented solely in hardware for efficient calculation of exponential and summation functions, so that it is made possible to calculate Gaussian process models at a higher computing speed than may be carried out in the software-controlled main computing unit.
According to the present invention, a method for determining a sparse Gaussian process model according to the description herein, as well as a model calculation unit, a control unit, and a computer program according to the further descriptions herein are provided.
Other advantageous embodiments are specified in the further description herein.
According to a first aspect, a method is provided for determining a sparse Gaussian process model to be carried out in a solely hardware-based model calculation unit, including the following steps:
The above-described method provides a possibility of preparing a sparse Gaussian process model based on a number of predefined virtual supporting point data points in a simple way.
Sparse Gaussian process models are substantially more memory-efficient than conventional Gaussian process models, since only M<<N supporting point data points must be stored. One-fourth of the supporting point data points or less are frequently sufficient. Therefore, more data-based function models may be stored in a physical model calculation unit. In addition, the analysis of the individual, smaller Gaussian process models may be carried out more rapidly.
Furthermore, the method may include the further following steps:
The method may include the further following steps:
It may be provided that parameter vector Qy* for the sparse Gaussian process model is ascertained as Qy*=Lm−TLm−1+KMN(Λ+σn2I)−1Y, LM corresponding to the Cholesky decomposition of intermediate variable QM.
In particular, a jitter may be applied to hyperparameter vector Qy* for the sparse Gaussian process model.
According to another aspect, a model calculation unit for carrying out a calculation of a sparse Gaussian process model is provided, the sparse Gaussian process model being calculated based on the hyperparameters ascertained according to the above method for the sparse Gaussian process model, derived parameter vector Qy*, and the virtual supporting point data points.
Specific embodiments will be explained in greater detail hereafter on the basis of the appended drawings.
The use of nonparametric, data-based function models is based on a Bayesian regression method. The fundamentals of Bayesian regression are described, for example, in C. E. Rasmussen et al., “Gaussian Processes for Machine Learning,” MIT Press 2006. Bayesian regression is a data-based method which is based on a model. To prepare the model, measuring points of training data and associated output data of an output variable to be modeled are required. The preparation of the model is carried out based on the use of supporting point data, which entirely or partially correspond to the training data or are generated therefrom. Furthermore, abstract hyperparameters are determined, which parameterize the space of the model functions and effectively weight the influence of the individual measuring points of the training data on the later model prediction.
The abstract hyperparameters are determined by an optimization method. One possibility for such an optimization method is an optimization of a marginal likelihood p(Y|H, X). Marginal likelihood p(Y|H, X) describes the plausibility of model parameters H, given the measured y values of the training data, represented as vector Y and the x values of the training data, represented as matrix X. In model training, p(Y|H, X) is maximized by searching for suitable hyperparameters which result in a curve of the model function determined by the hyperparameters and the training data and which image the training data as precisely as possible. To simplify the calculation, the logarithm of p(Y|H, X) is maximized, since the logarithm does not change the consistency of the plausibility function.
The calculation of the Gaussian process model takes place according to the calculation specification below. Input values {tilde over (x)}d for a test point x (input variable vector) are first scaled and centered, specifically according to the following formula:
In this formula, mx corresponds to the mean value function with respect to a mean value of the input values of the supporting point data, sx corresponds to the variance of the input values of the supporting point data, and d corresponds to the index for dimension D of test point x.
The following equation is obtained as the result of the preparation of the nonparametric, data-based function model:
Model value v thus ascertained is scaled with the aid of an output scaling, specifically according to the following formula:
{tilde over (v)}=vs
y
+m
y.
In this formula, v corresponds to a scaled model value (output value) at a scaled test point x (input variable vector of dimension D), {tilde over (v)} corresponds to a (non-scaled) model value (output value) at a (non-scaled) test point ũ (input variable vector of dimension D), xi corresponds to a supporting point of the supporting point data, N corresponds to the number of the supporting points of the supporting point data, D corresponds to the dimension of the input data/training data/supporting point data space, and Id and σf correspond to the hyperparameters from the model training, namely the length scale and the amplitude factor. Vector Qy is a variable calculated from the hyperparameters and the training data. Furthermore, my corresponds to the mean value function with respect to a mean value of the output values of the supporting point data and sy corresponds to the variance of the output values of the supporting point data.
Modeling system 2 furthermore carries out a method for processing the ascertained or provided training data, to provide the data-based function model with the aid of hyperparameters and supporting point data, which represent a subset of the training data. In this way, a so-called sparse Gaussian process model is prepared.
These supporting point data and hyperparameters are transferred into a control unit 4 and stored therein. Control unit 4 is connected to a physical system 3, for example, an internal combustion engine, which is operated with the aid of the data-based function model.
Main computing unit 42, which is provided as a microcontroller, is configured to calculate function values of the provided data-based function model with the aid of a software-determined algorithm. To accelerate the calculation and to relieve microcontroller 42, it is provided that model calculation unit 43 is used. Model calculation unit 43 is completely implemented in hardware and is capable only of carrying out a certain calculation specification, which is essentially based on repeated calculations of an addition function, a multiplication function, and an exponential function. Fundamentally, model calculation unit 43 is thus essentially hardwired and is accordingly not configured to execute a software code, as in the case of main computing unit 42.
Alternatively, an approach is possible in which model calculation unit 43 provides a restricted, highly specialized command set for calculating the data-based function model. However, a processor is not provided in model calculation unit 43 in any specific embodiment. This enables resource-optimized implementation of such a model calculation unit 43 or an area-optimized setting in an integrated construction.
In such a control unit 4, in addition to conventional Gaussian process models, sparse Gaussian process models may also be calculated. Since, in the case of sparse Gaussian process models, the quantity of supporting point data is significantly less than in conventional Gaussian process models, the storage capacity to be provided of storage unit 41 for storing the supporting point data may be reduced or multiple data sets of training data of multiple sparse Gaussian process models may be stored in storage unit 41.
A conventional Gaussian process regression uses the given supporting point data points/training data points for calculating the covariant matrix. The model prediction is obtained in the form
where kxT, QyεRN applies. It is to be emphasized that kxT represents the covariant vector between query point x and the supporting point data points. This is calculated by the “squared exponential” core as
In the case of sparse Gaussian process models, the essential idea is to replace the given supporting point data, which are formed by the “real” supporting point data points, with “virtual”, i.e., artificially generated supporting point data points. M artificial points are generated and suitably positioned by an optimizer in such a way that the model prediction of a sparse Gaussian process model using the virtual supporting point data points corresponds as exactly as possible to that of the Gaussian process model using the original supporting point data points. By integrating out the artificial y data, it is only necessary to optimize M virtual X positions
The model prediction for the sparse Gaussian process model results as
y=k
*
T
Q
M
−1
K
MN(Λ−σn2I)−1Y,
where k*TεRM, QMεRM×M, KMNεRM×N, Λ is an N-dimensional diagonal matrix, and Y is the vector of the y values of the original supporting point data points.
In the formula, k*T is again the covariant vector, but calculated this time between query point x and the M-dimensional vector of virtual supporting point data points The vector multiplied therein as a scalar product is provided, however, by the expression
Q
y
*=Q
M
−1
K
MN(Λ−σn2I)−1Y
The same form as for the prediction of conventional Gaussian processes is thus obtained:
if suitable values are used for parameter vector and the virtual supporting point data points.
The essential step in the preparation of the sparse Gaussian process model in the form of the algorithm available on model calculation unit 43 is the calculation of vector Qy*. Multiple possibilities exist for this purpose; before they are described, however, some notation must firstly be introduced.
i ∈ RD
In addition, the Cholesky method for solving equation systems having a positive defined square matrix is also used.
For a positive defined square matrix K, a Cholesky decomposition L may always be calculated, so that L is an upper triangular matrix with the property
L
T
L=K.
To solve the equation system K·x=v, the expression K−1v must be calculated. This is carried out with the aid of the Cholesky decomposition as follows:
K
−1
v=(LTL)−1v=L−1L−Tv.
In the formula, L−T=(L−1)T denotes the transposed inverse. Since L is an upper triangular matrix, the expression may be calculated by a forward substitution and a reverse substitution.
Expressions of the form vTK−1v for a positive defined matrix K and a vector v may be represented with the aid of the Cholesky decomposition as follows:
v
T
K
−1
v=vT(LLT)−1v=(L−1v)T(L−1v)=∥L−1v∥22.
In conjunction with Gaussian processes, K is typically a covariant matrix and therefore square and positively-semi-definite. For the positive-definite case, the above equations may thus be used. If the matrix is positive-semi-definite, a jitter (for example, a value of 10−6) is thus typically added to the diagonal of matrix K, to obtain a positive-definite matrix.
Two methods for determining vector Qy* will be explained hereafter.
The direct conversion of Qy*=QM−1+KMN(Λ−σn2I)−1Y is one possible procedure. If possible, the Cholesky decomposition is used to avoid direct calculations of inverse matrices. The calculation of Qy* is carried out according to the following steps, which will be explained in conjunction with
In step S1, matrices KM, KN, and KMN are calculated.
Subsequently, in step S2, Λ=diag(KMNTKM−1KMN) is determined using the Cholesky decomposition of KM (with a jitter).
In step S3, (Λ+σn2I)=1 is calculated, Λ+σn2I corresponding to a diagonal matrix which may simply be inverted element by element.
In step S4, QM is determined.
In step S5, the Cholesky decomposition LM=chol(QM) of QM is calculated. In this case, as in step S2, a jitter is added to QM. This corresponds to the procedure as if matrix KM were provided with a jitter and then used for calculating QM.
Qy*=Lm−TLm−1+KMN(Λ+σn2I)−1Y then results, a forward or reverse substitution being necessary in each case. Y are the y values of the original training data, i.e., the same y values as are used for the normal training of the Gaussian process model. (The reduction of the dimension takes place with the multiplication of KMN from the left).
A second procedure includes the use of a matrix factorization.
Firstly, new variables are introduced:
L=chol(KM)T
V1=L−1KMN
V2=Vjσn√Λ+σn2I−1
y2=σn√Λ+σn2I−1Y
Lm=chol(σn2I+V2V2T)T
lst=L−1k*
lmst=Lm−1lst=Lm−1L−1k*
β=Lm−1(V2y2)
Since Λ is a diagonal matrix, √{square root over (Λ+σn2I)} is the Cholesky decomposition of Λ+σn2I.
Matrix QM may be represented as
Therefore, QM−1 results as
Q
M
−1=L
Under the consideration that Λ+σn2I is a diagonal matrix, it follows that
with formula 1, it results that
Q
M
−1=σn2L−T(σn2I+V2V2T)−1L−1=σn2L−T(LmLmT)−1L−1. Formula 2
For further observation, the expression V2y2 must still be considered. In the rearrangement, the fact is again utilized that Λ+σn2I is a diagonal matrix:
The model prediction then results as
y=k
*
T
Q
M
−1
K
MN(Λ+σn2I)−1Y
By inserting formula 2, the following formula results
=k+TL−T(LmLmT)−1L−1σn2KMN(Λ+σn2I)−1Y
By inserting formula 3, the following formulas result
In the model analysis, expression lmst may be determined. βT is calculated beforehand off-line and stored. To determine lmst, two forward substitutions are to be calculated, which is relatively time-consuming and therefore not possible on model calculation unit 43.
The only possibility for calculating this form of the model analysis using the process provided on model calculation unit 43 is according to Formula 4. With the proviso
Q
y
*=L
−T
L
m
−T
L
m
−1
V
2
y
2.
the model prediction may be carried out according to the formula
which is implemented on model calculation unit 43.
Number | Date | Country | Kind |
---|---|---|---|
10 2013 227 183.2 | Dec 2013 | DE | national |