Computer-implemented method for reducing computing time when determining an inverse matrix from a symmetric input matrix
By decomposing large covariance matrices into block diagonal matrices based on correlation, the method efficiently reduces computing time and maintains accuracy for Kalman filter applications.
Patent Information
- Application Number
- DE102024203136
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-05
- Publication Date
- 2025-10-09
AI Technical Summary
The inversion of large covariance matrices in Kalman filters is computationally intensive, particularly for matrices with many dimensions, leading to significant computing time and potential loss of accuracy in existing methods.
The method involves decomposing the input matrix into block diagonal matrices, where each block is formed from entries that are highly correlated, allowing for the inversion of these blocks separately, thereby reducing computational requirements.
This approach significantly reduces computing time for matrix inversion while maintaining sufficient accuracy for Kalman gain determination, especially in systems with complex correlations.
Smart Images

Figure 00000000_0002_ABST 
Figure 00000000_0000_ABST 
Figure 00000000_0001_ABST
Abstract
Description
[0001] The invention relates to a computer-implemented method for reducing the computing time when determining an inverse matrix. The invention thus relates to the field of computer-aided matrix inversion, as required, for example, when using Kalman filters. State of the art
[0002] The covariance matrix, also known as the variance-covariance matrix or occasionally as the scatter matrix or dispersion matrix, generalizes the variance of a one-dimensional random variable to a multidimensional random variable, namely a random vector. The diagonal elements of the covariance matrix correspond to the individual variances, while all other elements represent the covariances.
[0003] The Kalman filter is a mathematical tool for the step-by-step estimation of parameters that describe the system states. The filter allows for the estimation of quantities that cannot be directly measured while simultaneously attempting to minimize measurement errors.
[0004] By integrating mathematical models as constraints, dynamic aspects can also be taken into account. For example, equations of motion can be used to precisely estimate the positions and velocities of moving objects.
[0005] The special mathematical structure of the Kalman filter enables its use in real-time systems for a variety of technical applications. These range from tracking moving objects using radar signals or GNSS data to controlling electronic systems such as radio or mobile communications, as well as controlling electric bicycles.
[0006] Covariance matrices play a central role in the use of Kalman filters. When merging two multidimensional correlated Gaussian processes, a matrix inversion is often performed. This inversion can be computationally demanding, especially with very many dimensions (>>3) and thus large covariance matrices.
[0007] A new corrected or fused covariance matrix P k can be calculated using the Kalman gain K k from the previous covariance matrix Pk− with Pk=(I−KkHk)Pk− where I is the identity matrix and H k the observation matrix. The Kalman gain K k is previously calculated from a quotient whose denominator is the sum of the previous covariance matrix Pk− and the covariance matrix R k of the measurement noise. Kk=Pk−HkTHkPk−HkT+Rk.
[0008] Calculating this quotient can take a lot of computing time for large matrices.
[0009] From Ambikasaran et al., "Fast Direct Methods for Gaussian Processes," 2015, it is known how a matrix to be inverted is first decomposed into a product of several matrices, and then the inversion is performed with significantly less computation time. The factor matrices have zero matrices in the off-diagonals. The loss of accuracy results from the generation of low-rank off-diagonal matrices. However, the generation of low-rank off-diagonal matrices is complex and therefore requires considerable computation time.
[0010] The invention is therefore based on the object of proposing a method by which the computing time for forming an inverse of a matrix is reduced, wherein the loss of accuracy relative to conventional matrix inversion should be as small as possible.
[0011] The problem is solved by the subject matter of the independent claims. Disclosure of the invention
[0012] According to a first aspect of the invention, this object is achieved by a computer-implemented method for reducing computing time when determining an inverse matrix from a symmetric input matrix comprising n rows and n columns.
[0013] The procedure includes the following steps: - Forming i blocks with m i lines and m i Columns, where m i is smaller than n and where i is greater than or equal to 2, where the i blocks are each composed of the entries of the main diagonal that are most strongly correlated with each other, and m i entries of the secondary diagonals are formed in the same rows and columns as the entries of the main diagonal; - Creating a block diagonal matrix from the i blocks; and - Generate a matrix inverse to the input matrix by inverting the blocks in the block diagonal matrix.
[0014] The invention exploits the fact that the inverse of a block diagonal matrix is itself a block diagonal matrix consisting of the inverses of the individual blocks. The input matrix is therefore first converted into a block diagonal matrix that satisfies this criterion.
[0015] A block matrix is a special type of matrix in which the individual elements can be matrices themselves, not just numbers. These blocks are usually represented in a rectangular array, with the dimensions of the blocks chosen so that the block matrix maintains a rectangular shape. A block diagonal matrix, in turn, is a special type of block matrix in which the non-zero blocks are located only on the main diagonal, while all other blocks are zero.
[0016] The number i of blocks depends on the size of the input matrix. The larger the input matrix, the more blocks it can be broken down into for maximum effect. The number of blocks i is greater than 2, since a block matrix consisting of only one block would be identical to the input matrix, and the method would therefore have no advantage.
[0017] The size of the blocks can be uniform, so that m i is the same for each block i. Alternatively, blocks of different sizes can be used, so that m i is not always the same and is different for each block. In any case, the blocks each have the same number of rows and columns, so they are square matrices.
[0018] The off-diagonals of the block matrix are zero. This represents a simplification of the input matrix, since the off-diagonal entries in the input matrix, although often very small, are very rarely zero. The generated inverse thus represents an approximation to the mathematically correct inverse of the input matrix, which is nevertheless sufficient for the purpose of a Kalman gain. This is especially the case when the computation time required to determine this inverse is taken into account.
[0019] The block diagonal matrix can be generated such that the blocks on the main diagonal do not exceed a certain size, for example, 1x1, 2x2, or 3x3, or in special cases, 4x4, 5x5, or 6x6. By generating block diagonal matrices with very small blocks, the computing power required to invert the matrix can be drastically reduced. This is because, for fully populated matrices, the computing power required is roughly halved with each reduced dimension, while the resulting error is relatively small. Decomposing a 10x10 matrix into a block diagonal matrix with two 2x2 and two 3x3 block matrices, followed by inversion, requires only slightly more than 2% of the computing power required to invert the 10x10 matrix.
[0020] The blocks are determined from entries in the input matrix that are particularly strongly correlated with each other. The correlation strength can be determined, for example, using the Pearson correlation factor.
[0021] Once the block diagonal matrix is formed, the individual blocks can be inverted with far less computing time than the entire input matrix. Overall, this reduces the computing time required for the computer-implemented determination of an inverse matrix, thus achieving the object of the invention.
[0022] In one embodiment, determining the most highly correlated entries for forming the i-th block comprises: - Determine the largest entry in the secondary diagonals and determine the m i -2 next largest entries in the same row as the largest entry, if m i-2 is greater than zero in magnitude, whereby the entries thus determined in this row are the first entries or determining the largest sum of amounts of the m i -1 entries within a row in the secondary diagonals, where these m i -1 largest entries in terms of amount are the first entries; - Assigning the first entries to two entries of the main diagonal, where one of the entries of the main diagonal is the entry in the same row and the other of the entries of the main diagonal is the entry in the same column; - Determining second entries, where the second entries are the entries in the columns of the first entries and in the rows of the main diagonals associated with the first entries; and - Selecting the first entries, the second entries, the symmetrical entries in the respective mirrored secondary diagonals and the entries on the main diagonal and setting the remaining entries in the columns and rows of the first entries, the second entries and the entries on the main diagonal assigned to the first entries to zero, whereby further blocks are formed from the entries which are not zero and whereby the preceding steps are repeated for each of these blocks.
[0023] The entries on the secondary diagonals of the input matrix reflect how strongly the entries on the main diagonal in the respective row and column correlate with each other. A high entry on a secondary diagonal close to 1 indicates that the entries on the main diagonal in the same column and row are strongly correlated. If the entry is close to zero, the two entries on the main diagonal are not correlated or only very weakly correlated. For very small values close to -1, there is a negative correlation between the values on the main diagonal.
[0024] In the first step to determine the most strongly correlated entries, the strongest correlation, i.e., the largest value of the off-diagonal, is determined. A single largest entry is then determined as the single first entry if m i = 2, or m i-1 = 1. In other words, a single value is determined when the formed block is a 2x2 matrix.
[0025] If the block to be formed is larger, for example, a 3x3 or 4x4 matrix, several values must be determined that are most strongly correlated. There are at least two ways to do this.
[0026] The first possibility is to determine the largest entry from all entries of the secondary diagonal and the m i -2 next larger entries from which the m i xm i large block is generated. That is, block i contains the m i -1 most strongly correlated entries of the secondary diagonal within a row of the input matrix. These rows are no longer available for subsequent blocks. In this way, the blocks are ordered according to the most strongly correlated entries of the main diagonal.
[0027] The second possibility involves the sums of m i -1 entries of each row are formed, and the row in which the largest sum is found is selected. The main diagonal entry in the same row and the main diagonal entries in the columns of entries added for this sum form the most highly correlated entries in this case. This method of determining the most highly correlated entries is more complex than the first method. However, it takes into account the correlation between multiple parameters and is therefore more accurate.
[0028] This will be illustrated with an example. Consider a 6x6 matrix A that is to be divided into two 3x3 blocks. The rows and columns of matrix A are numbered from top to bottom and from left to right, respectively. A=(111414121521113314453131121322414123)
[0029] According to the first possibility, the largest entry in the secondary diagonal would be determined. This is 5 in the second row and fourth column. The second largest entry in the same row would be 2 in the fifth column. These two entries form the first entries. The first entries are assigned to the entries whose row number corresponds to the column number of the first entries. For example, the 5 in the fourth column is assigned to the 1 on the main diagonal in the fourth row. The 2 in the fifth column is assigned to the 2 on the main diagonal in the fifth column. Furthermore, every entry on the main diagonal of the same row is assigned to the first entries.
[0030] Next, the second entries are determined. These are the entries that are in the same columns as the first entries and the rows of the corresponding entries on the main diagonal. In the example, for the first entry, 5 in the fourth column, this would be the 3 in row five. For the other first entry, 2 in the fifth column, this would be the 3 in the fourth row.
[0031] The remaining entries in the columns and rows of the first entries, the second entries, and the associated entries on the main diagonal are set to zero. This means that in the second, fourth, and fifth columns, as well as in the second, fourth, and fifth rows, all entries that are not the first entries, the second entries, or the entries on the main diagonal are set to 0. Anull,1=(101004020520103004050130020320404003)
[0032] The second block is now determined by the remaining entries whose entries are not zero. The block matrix A' would then look as follows, where the rows and columns of each block are combined. A'=(25251302321140134443)
[0033] For larger matrices, the above procedure can be repeated until no more entries remain.
[0034] If matrix A'' were created using the second method described, it would look different. In this case, the largest sum would be formed by two entries within a column, which would then define the first block. The largest sum would be formed by the entries in the fourth and sixth columns in the third row, with 3 + 4 = 7. Matrix A'' would therefore look as follows. Anull,2=(110010120020003304003101120020414103);A"=(33431104131110122122)
[0035] For blocks of size 2x2, the first option would require m i -2 = 0 next larger entries are determined, which is of course not possible. For the second possibility, a sum of m i -1 = 1 entries, which means that the largest entry is determined. Determining second entries is not necessary for blocks of this size.
[0036] This embodiment advantageously optimizes and simplifies the formation of blocks. Furthermore, the complexity of calculating an inverse matrix depends not on the values of the entries, but on the number of entries. The proposed embodiment takes into account entries that have a particularly high correlation with each other. Entries with low correlations, on the other hand, are neglected in favor of increased computation speed.
[0037] In one embodiment, mi determined dynamically, where m i initial is 2 and is determined with the following steps: - Determine the largest entry of the secondary diagonal; - Determine the row y of the input matrix containing the largest entry; and - Determine the next smallest entry within row y from the secondary diagonals and increase m i by 1 for each next smallest entry in row y that meets a criterion of the strength of the correlation.
[0038] The criterion of correlation strength indicates a relationship between two entries in a row. For example, if a first value A has a correlation of >0.9 with a second value B, and at the same time A has a correlation of >0.85 with a third value C, then it is obvious that B and C are also strongly correlated. In this case, it may be useful to combine the three values A, B, and C into a block. i would be 3.
[0039] The criterion of correlation strength can include fixed rules. These rules could, for example, be that the difference or ratio of two correlation values must not exceed or fall below a threshold. Furthermore, a scale can be used, in which all correlation values above a first threshold form the first block, all correlation values above a second threshold form the second block, and so on.
[0040] According to this embodiment, the method can be applied particularly advantageously when the correlation strength between the entries cannot be estimated in advance and the block size cannot be specified. This can be the case, for example, when the input matrix represents a system state, new sensors are used to acquire new parameters, and the correlation of the new parameters with the measured values of existing sensors cannot be estimated.
[0041] Advantageously, this embodiment ensures that, if necessary, several entries from the input matrix can be combined into one block if the criterion of the strength of the correlation allows this.
[0042] In one embodiment, m i less than or equal to a defined boundary block size.
[0043] In particular, when the method is used with dynamic block sizes, the maximum block size should be limited. The larger the blocks, the more complex it is to determine the inverse of these blocks. For example, if a 7x7 matrix is decomposed into a 6x6 block and a block comprising one entry, the advantageous effect of the invention is less than if the same matrix were decomposed into a 3x3 block and two 2x2 blocks. This is due to the fact that the effort required to determine the inverse of a matrix does not increase linearly with the matrix size, but exponentially.
[0044] Advantageously, limiting the block size can reduce the computing time required to determine the inverse of the blocks. The limiting block size is preferably 6, particularly preferably 3 or 2. The smaller the block size, the faster the inverse of the block can be determined and the greater the effect achieved with the invention.
[0045] In one embodiment, the input matrix is assigned a system state with several parameters and the system state is based on a physical model, wherein the physical model describes a physical correlation between the parameters, where m i determined according to the physical correlation between the parameters.
[0046] The system state describes the state of a technical system, such as a production facility, a tool, or a vehicle. Each recorded value, such as the current vehicle speed, the speeds of the individual wheels, the engine speed, the temperature, the pressure in the fuel or hydraulic lines, the voltages of the batteries or electric motors, etc., can be represented by a dimension in the input matrix. The more complex the technical system, the more comprehensive the system state represented by the input matrix can be.
[0047] In technical systems, there is usually a technical relationship between some parameters because individual components of the system interact with each other. For example, in a vehicle, the speeds of individual wheels are linked in that, ideally, all four wheels roll on the same road surface and move with the vehicle. Deviations from this can indicate particularly large slippage, for example. In another case, the position of a working system, such as an excavator bucket, and the pressure in the corresponding hydraulic lines are linked.
[0048] The technical system is therefore based on a physical model that describes the technical relationships within the system. From this model, correlations between individual parameters can be derived, which can be used in the present method. Not only can a quantity mi for the blocks to be formed in the input matrix. Under certain circumstances, the columns whose entries on the main diagonal should form blocks can also be defined.
[0049] Advantageously, this embodiment takes into account the technical interaction of the system represented by the input matrix during block formation, which increases the accuracy of the determined inverse.
[0050] In one embodiment, the method can be used to identify the relationship between measured values from two time series. In this embodiment, two time series with the same number of measured values are represented in a matrix. Each entry in the matrix corresponds to the calculation of a measured value from one time series with a measured value from the other time series. For example, the measured values can be added together, multiplied together, subtracted from each other, or convolved together.
[0051] From the blocks it is then easy to see which measured values correlate particularly strongly with each other and for which this is not the case.
[0052] In a further aspect, the invention relates to a computer-implemented method for determining a Kalman gain for a Kalman filter, wherein determining the Kalman gain comprises inverting at least one nxn matrix, wherein the at least one nxn matrix is inverted as an input matrix using a method as described above.
[0053] A Kalman filter can be used to predict the system state of a technical system or to estimate its future state. This is particularly relevant for systems that must react to their environment in order to interact within or with it. For example, an autonomous vehicle must not only perceive its environment for its own control, but also be able to predict the movements of road users detected within it.
[0054] System health assessment is also important for system monitoring. When multiple parameters are considered together, errors or malfunctions can potentially become apparent much earlier than if only a single parameter were monitored. This allows the system to be maintained more efficiently or repaired early, before damage occurs due to a defect.
[0055] To use the Kalman filter, the Kalman gain must be determined. This, in turn, requires the quotient of two matrices to be determined, which in turn requires the determination of an inverse matrix.
[0056] The proposed method can be used advantageously to reduce the computing resources required for the inversion and shorten the computing time. The input matrix is divided into blocks, each of which then forms its inverse.
[0057] Since the Kalman filter can be used, in particular, to predict the state of a system, it is sufficient if this state is estimated with less precision than would be the case with a mathematically exact inverted matrix. In this case, a reduction in estimation accuracy is accepted in favor of estimation speed.
[0058] In one embodiment, the entries of the main diagonal of the input matrix are each assigned to a system state of a technical system, wherein each column comprises a different system parameter and wherein the entries in the secondary diagonals quantify the correlation between the system parameters assigned to the entries of the main diagonal in the respective row and the respective column.
[0059] The input matrix does not necessarily have to include the parameters of the system state. Within the scope of this embodiment, further operations, in particular convolutions or multiplications with other matrices or system states, can also be performed before applying the method proposed here. The term "assignment" therefore means that the system state is represented in some form by the input matrix and that its entries can be traced back to the parameters of the system state.
[0060] In one embodiment, the Kalman filter is used to estimate the behavior of the system parameters and / or a future system state.
[0061] In one embodiment, the system state is the state of a vehicle, a position sensor, an inertial sensor, or an ultrasonic sensor.
[0062] In a further aspect, the invention relates to a computer program with program code for carrying out a method as described above when the computer program is executed on a computer.
[0063] In a further aspect, the invention relates to a computer-readable data carrier with program code of a computer program for carrying out a method as described above when the computer program is executed on a computer.
[0064] In a further aspect, the invention relates to a system for determining a Kalman gain for a Kalman filter, wherein the system is designed to carry out a method as described above.
[0065] Overall, a method for reducing computing time when determining an inverse matrix, a method for determining a Kalman gain for a Kalman filter, a computer program with program code, a computer-readable data carrier with program code and a system for determining a Kalman gain for a Kalman filter are specified.
[0066] The described designs and further training courses can be combined as desired.
[0067] Further possible embodiments, developments and implementations of the invention also include combinations of features of the invention described previously or below with regard to the embodiments that are not explicitly mentioned. Short description of the drawings
[0068] The accompanying drawings are intended to provide a further understanding of embodiments of the invention. They illustrate embodiments and, in conjunction with the description, serve to explain principles and concepts of the invention.
[0069] Other embodiments and many of the aforementioned advantages will become apparent upon review of the drawings. The elements illustrated in the drawings are not necessarily drawn to scale.
[0070] They show: Fig. 1 schematically shows the sequence of the method according to an embodiment; Fig. 2 a) to h) gradually the Fig. 1 described procedures using an example matrix; Fig. 3 a) to c) different arrangements of entries from which blocks can be formed.
[0071] In the figures of the drawings, the same reference symbols designate the same or functionally equivalent elements, parts or components, unless otherwise stated.
[0072] Fig. 1 schematically shows the sequence of a method according to one embodiment. In parallel, the sequence is described below with the exemplary matrices from the Fig. 2 a) to h).
[0073] The method begins with step S10, which carries out several substeps. First, in step S12a or S12b, the largest entries in the off-diagonals of the input matrix are determined. Steps S12a and S12b represent two alternative methods for determining the largest entries when the size of the blocks to be formed is larger than two.
[0074] In Fig. Figure 2 a) shows an example 6x6 matrix. The elements of the main diagonal are marked with a checkerboard pattern. The blocks to be formed for this matrix should have the size 2x2, so that only one entry needs to be determined as the largest entry in the secondary diagonals. Since the input matrix is a symmetric matrix, the search for the largest entry can be limited to one half of the secondary diagonal elements.
[0075] In this case, the largest entry is searched for in the top right half.
[0076] The largest entry is determined to be the entry in column 6 and row 2, abbreviated (6, 2). This entry is called the first entry.
[0077] In the next step S14, the first entries, if there are several, are each assigned to two entries of the main diagonal. The first of these two entries is in the same row as the first entry just found. In Fig. 2 b) this corresponds to the entry (2, 2). The other entry on the main diagonal is the entry whose number of rows corresponds to the number of columns of the first entry. Fig. 2 b) this corresponds to entry (6,6).
[0078] In step S16, the entries referred to as second entries are determined. The second entries are the entries located in the columns of the first entries and in the respective rows of entries located on the main diagonal and associated with the first entries. For 2x2 blocks, this step can be omitted, since only one first entry has been determined. Therefore, this step is only relevant for larger blocks.
[0079] Next, in step S18, the remaining entries in the columns and rows of the first entries, the second entries, and the entries on the main diagonal are set to zero. Fig. 2 c) this is indicated by a black fill. This affects columns 2 and 6, as well as rows 2 and 6.
[0080] The substeps of step S10 are now repeated for the next blocks until all entries are either part of a block or zero. This is shown in the Fig. 2 d) to f).
[0081] In Fig. 2 d) entry (4, 1) has been determined as the next largest entry. The entries (1, 1) and (4, 4) on the main diagonal are assigned to this entry, which is Fig. 2 e). Finally, the entries in rows 1 and 4 as well as in columns 1 and 4 are set to zero, which were not determined. In Fig. 2 f) there are now four entries left, which, as in Fig. 2 g) are assigned to the last block.
[0082] The blocks thus formed are converted into a block diagonal matrix in step S20. For this purpose, the entries are re-sorted block by block. The Fig. 2 rearranged block diagonal matrix is in Fig. 2 h), where the empty entries are all zero.
[0083] The inverse of this block diagonal matrix can be calculated in step S22.
[0084] With Fig. Figure 3 shows three 6x6 matrices, each divided into two 3x3 blocks. The entries in the blocks can be set to the form Fig. 3 a) are re-sorted. Here, it is clear that more than one entry was found in each row and, consequently, in each column. QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited non-patent literature
[0000] Ambikasaran et al, “Fast Direct Methods for Gaussian Processes”, 2015
[0009]
Claims
[1] Computer-implemented method for reducing computing time when determining an inverse matrix from a symmetric input matrix comprising n rows and n columns, the method comprising the steps of: - Forming i blocks (S10) with m i lines and m i Columns, where m i is smaller than n and where i is greater than or equal to 2, where the i blocks are each composed of the entries of the main diagonal that are most strongly correlated with each other, and m i entries of the secondary diagonals are formed in the same rows and columns as the entries of the main diagonal; - generating a block diagonal matrix (S20) from the i blocks; and - Generating a matrix (S22) inverse to the input matrix by inverting the blocks in the block diagonal matrix. [2] The computer-implemented method of claim 1, wherein determining the most highly correlated entries for forming the i-th block comprises: - Determine the largest entry in the secondary diagonal (S12a) and determine the m i -2 next largest entries in the same row as the largest entry, if m i -2 is greater than zero in magnitude, whereby the entries thus determined in this row are the first entries or determining the largest sum of amounts of the m i -1 entries (S12b) within a row in the secondary diagonals, where these m i -1 largest entries in terms of amount are the first entries; - Assigning the first entries to two entries of the main diagonal (S14), one of the entries of the main diagonal being the entry in the same row and the other of the entries of the main diagonal being the entry in the same column; - determining second entries (S16), the second entries being the entries in the columns of the first entries and in the rows of the main diagonals associated with the first entries; and - selecting the first entries, the second entries, the symmetrical entries in the respective mirrored secondary diagonals and the entries on the main diagonal and setting the remaining entries in the columns and rows of the first entries, the second entries and the entries on the main diagonal assigned to the first entries to zero (S18), whereby further blocks are formed from the entries which are not zero and whereby the preceding steps are repeated for these blocks in each case. [3] Computer-implemented method according to one of the preceding claims, wherein m i is determined dynamically, where m i initial is 2 and is determined with the following steps: - Determine the largest entry of the secondary diagonal; - Determine the row y of the input matrix containing the largest entry; and - Determine the next smallest entry within row y from the secondary diagonals and increase m i by 1 for each next smallest entry in row y that meets a criterion of the strength of the correlation. [4] Computer-implemented method according to one of the preceding claims, wherein m i is less than or equal to a defined boundary block size. [5] Computer-implemented method according to one of claims 1 or 2, wherein the input matrix is assigned a system state with a plurality of parameters and the system state is based on a physical model, wherein the physical model describes a physical correlation between the parameters, wherein m i determined according to the physical correlation between the parameters. [6] A computer-implemented method for determining a Kalman gain for a Kalman filter, wherein determining the Kalman gain comprises inverting at least one nxn matrix, wherein the at least one nxn matrix is inverted as an input matrix using a method according to any one of the preceding claims. [7] A computer-implemented method according to claim 6, wherein the entries of the main diagonal of the input matrix are each assigned to a system state of a technical system, wherein each column comprises a different system parameter, and wherein the entries in the secondary diagonals quantify the correlation between the system parameters assigned to the entries of the main diagonal in the respective row and the respective column. [8] Computer-implemented method according to claim 7, wherein the Kalman filter is used to estimate the behavior of the system parameters and / or a future system state. [9] A computer-implemented method according to any one of claims 7 or 8, wherein the system state is the state of a vehicle, a position sensor, an inertial sensor or an ultrasonic sensor. [10] A computer-implemented method according to any one of claims 6 to 9, wherein entries of the input matrix contain the correlation between two measured values from two time series, each acquired by a sensor. [11] A computer program comprising program code for carrying out a method according to any one of the preceding claims when the computer program is executed on a computer. [12] A computer-readable data carrier comprising program code of a computer program for carrying out a method according to any one of claims 1 to 10 when the computer program is executed on a computer. [13] System for determining a Kalman gain for a Kalman filter, the system being designed to carry out a method according to one of claims 6 to 10.