MODEL CALCULATING UNIT AND CONTROL UNIT FOR CALCULATING A NEURAL LAYER OF A MULTILAYER PERCEPTRON MODEL
20210295133 · 2021-09-23
Inventors
- Andre Guntoro (Weil der Stadt, DE)
- Ernst Kloppenburg (Ditzingen, DE)
- Heiner Markert (Stuttgart, DE)
- Martin Schiegg (Korntal-Muenchingen, DE)
Cpc classification
G06N7/01
PHYSICS
F02D41/266
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
F02D2041/1433
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
International classification
F02D41/26
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
Abstract
A model calculating unit for calculating a neural layer of a multilayer perceptron model having a hardwired processor core developed in hardware for calculating a definitely specified computing algorithm in coupled functional blocks. The processor core is designed to calculate, as a function of one or multiple input variables of an input variable vector, of a weighting matrix having weighting factors and an offset value specified for each neuron, an output variable for each neuron for a neural layer of a multilayer perceptron model having a number of neurons, a sum of the values of the input variables weighted by the weighting factor, determined by the neuron and the input variable, and the offset value specified for the neuron being calculated for each neuron and the result being transformed using an activation function in order to obtain the output variable for the neuron.
Claims
1-8. (canceled)
9. A model calculating unit for calculating a layer of a multilayer perceptron model, comprising: a hardwired processor core configured in hardware to calculate a definitely specified computing algorithm in coupled functional blocks, the processor core being configured to calculate an output variable for each neuron for a neural layer of the multilayer perceptron model having a number of neurons as a function of: (i) one or multiple input variables of an input variable vector, (ii) a weighting matrix having weighting factors, and (iii) an offset value specified for each of the neurons, a sum of the values of the input variables, weighted by a weighting factor determined by the neuron and the input variable, and the offset value specified for the neuron being calculated for each neuron, and a result being transformed using an activation function to obtain the output variable for the neuron.
10. The model calculating unit as recited in claim 9, wherein the processor core includes a state machine, a memory to store the one or multiple input variables of the input variable vector, the weighting matrix, the offset values specified for each neuron, and the output variables for each neuron, and one or multiple computing operation blocks, the computing operating blocks including a MAC block, and an activation function calculation block.
11. The model calculating unit as recited in claim 9, wherein the processor core is configured to select, as a function of a selection variable, a type of activation function for the multilayer perceptron model and/or to select, with the aid of another selection variable whether a Gaussian process model or an RBF model or a neural layer of the perceptron model is to be calculated.
12. The model calculating unit as recited in claim 9, wherein the activation function includes a kink function, or a sigmoid function, or a hyperbolic tangent function, or a linear function.
13. The model calculating unit as recited in claim 9, wherein the processor core is developed in a surface area of an integrated chip.
14. A control unit, comprising: a microprocessor; and one or multiple model calculating units for calculating a layer of a multilayer perceptron model, each of the model calculating units including a hardwired processor core configured in hardware to calculate a definitely specified computing algorithm in coupled functional blocks, the processor core being configured to calculate an output variable for each neuron for a neural layer of the multilayer perceptron model having a number of neurons as a function of: (i) one or multiple input variables of an input variable vector, (ii) a weighting matrix having weighting factors, and (iii) an offset value specified for each of the neurons, a sum of the values of the input variables, weighted by a weighting factor determined by the neuron and the input variable, and the offset value specified for the neuron being calculated for each neuron, and a result being transformed using an activation function to obtain the output variable for the neuron.
15. The control unit as recited in claim 14, wherein the control unit is developed as an integrated circuit.
16. The control unit as recited in claim 14, wherein the control unit is a control unit configured to control an engine system in a motor vehicle.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Specific embodiments are explained in greater detail below on the basis of the figures.
[0018]
[0019]
[0020]
[0021]
DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS
[0022]
[0023] Model calculating unit 22 is essentially hardwired and is accordingly not designed like microprocessor 21 to execute a software code and thereby to execute a variable function specified by software. In other words, no processor is provided in model calculating unit 22 so that the latter is not able to be operated by a software code. Focusing on a specified model function allows for a resource-optimized implementation of such a model calculating unit 22. In an integrated structural design, the model calculating unit 22 may be implemented in surface area-optimized fashion, which additionally allows for fast calculations.
[0024] Control unit 2 is essentially used to process sensor signals S or sensor variables, which are recorded by a sensor system in internal combustion engine 3, and/or external inputs V, and to apply, cyclically at definitely specified time intervals of e.g. 1-100 ms or in angular synchronous manner as a function of a crankshaft angle of an operated internal combustion engine, values of one or multiple corresponding control variables A to internal combustion engine 3 so that the latter may be operated in a manner known per se.
[0025]
[0026] With the aid of state machine 11, values of input variables stored in an input variable memory area of memory 12 may be calculated by repeated loop calculations in order to obtain intermediate variables or output variables that are written into a corresponding output variable memory area of memory 12.
[0027] State machine 11 is designed to calculate an individual neural layer of a multilayer perceptron model. State machine 11 may be described according to the following pseudocode:
TABLE-US-00001 /* input transformation */ for (k=0; k<p7; k++) { ut[k] = u[k] * p1[k] + p2[k]; } /* loop calculation */ for (j=p8; j<p6; j++) { i = j * p7; t = P3[j]; for (k=0; k<p7; k++) { t += V[i+k] * ut[k]; } y[j] = act(t); } /* output transformation */ for (k=0; k<p6; k++) { z[k] = y[k] * p4[k] + p5[k]; }
[0028] where
[0029] p7: maximum index value for the input variables of the input variable vector
[0030] p8: minimum index value or initial value for the number of neurons
[0031] p6: maximum index value for the number of neurons
[0032] p3: offset value
[0033] p1, p2: variables for the input transformation
[0034] p4, p5: variables for the output transformation
[0035] With the aid of the above pseudocode, it is possible to perform the following calculation for each neuron of the neural layer to be calculated:
y[j]−act(p3[j]+Σ.sub.k=0.sup.p7−1v.sub.j,k*ut[k]) for j=0 . . . p6−1
[0036] This represents a calculation for a neural layer of a multilayer perceptron model, as shown in
[0037]
[0038] The sums of the weighted values of the input variable vector ut.sub.0 . . . ut.sub.p6−1 respectively have an offset value O.sub.0 . . . O.sub.p6−1 applied to them, in particular applied in an additive manner. The result is transformed using a specified activation function “act”. As a result, one obtains a corresponding value of an output variable vector y.sub.0 . . . y.sub.p6−1. The provision of the offset value for each neuron provides another degree of freedom for the model formation.
[0039] Defining the controlled variables p6 makes it possible to set the number of neurons 20 of the neural layer to be calculated.
[0040] By using the values of the output variable vector y.sub.0 . . . Y.sub.p6−1 of a neural layer as input variable vector for calculating a subsequent neural layer, a multilayer perceptron model may be used in model calculating unit 22 so that the number of neural layers of the multilayer perceptron model may be implemented by repeatedly calling the function according to the above pseudocode or by repeatedly calling the model calculating unit 22 with accordingly changed parameters.
[0041] An input and/or output transformation of the input variables of the input variable vector and, respectively, of the output variables of the output variable vector may be performed with the aid of scaling variables pl and p2, and, respectively, p4 and p5, specified for each neuron.
[0042] The layerwise calculation of the MLP model allows for a slim design of model calculating unit 22 so that its surface area requirement in an integrated structural design is low. Model calculating unit 22 nevertheless allows for a calculation of a multilayer perceptron model in a simple manner by returning or redefining the values of the output variables of the output variable vector as input variables of an input variable vector for the calculation of a further neural layer.
[0043] As activation function “act,” one of several activation functions may be provided, which may be calculated by the activation function calculation block 14 of model calculating unit 22. The activation functions may be for example a kink function, a sigmoid function, a hyperbolic tangent function or a linear function, as shown respectively in
[0044] The single-layer design of the neural model, which is implemented by the above pseudocode, additionally makes it possible to calculate, in addition to a neural layer of an MLP model, also a Gaussian process model or an RBF model (RBF: Radial Basis Function). For this purpose, the weighting values are not applied multiplicatively onto the values of the input variable, but rather additively or subtractively. Furthermore, the quadratic distance is calculated, which is weighted using specified length scales L[k]. Furthermore, an exponential function is selected as activation function for the RBF model. This makes it possible to calculate a Gaussian process model in accordance with
y=Σ.sub.j=0.sup.p6−1p3[j].Math.exp(−Σ.sub.k=0.sup.p7−1L[k].Math.(−v.sub.j,k+ut[k]).sup.2)
[0045] selectively by a modification of the pseudocode as follows.
TABLE-US-00002 /* input transformation */ for (k=0; k<p7; k++) { ut[k] = u[k]*p1[k] + p2[k]; } /* loop calculation */ for (j=p8; j<p6; j++) { i = j * p7; t = (cfg_mlp) ? p3[j] : 0.0f; // init with bias for MLP for (k=0; k<p7; k++) { if (cfg_mlp) { t += V[i+k] * ut[k]; } else { d = V[i]k − ut[k]; d = d * d; t += L[k] * d } } if (cfg_mlp) { switch (cfg_activation_function) { case 1: e = (t>=0.0f) ? t : 0.0f; // kink function break; case 2: // sigmoid function e = sigmoid(t); break; case 3: // tanh function e = tanh(t); break; default: // linear function e = t; } y[j] = e; } else { // for Gaussian process model/RBF model e = exp(-t); y[0] += p3[j] * e; } /* output transformation */ j = (cfg_mlp) ? p6 : 1; for (k=0; k<j; k++) { z[k] = y[k] * p4[k] + p5[k]; }
[0046] It may be seen that in the execution of the loop function it is possible to perform a case distinction using variable cfg mlp. At cfg_mlp=1, the calculation of the neural layer is selected and using cfg activation function=0 . . . 3 the type of the activation functions described above may be selected.
[0047] At cfg_mlp=0, a Gaussian process model or an RBF model is calculated. Here a selection of the activation function is not necessary since it may always be calculated using the exponential function. In this manner, it is possible to use model calculating unit 22 both for calculating Gaussian process models and RBF models as well as for calculating a neural layer of an MLP model and to require in the process only a small surface area in an integrated construction of the state machine.