## 3 Concept of an Adaptive Algorithm of Proportional Gain Change
### Computational Complexity of the Adaptive Algorithm  
Computational complexity of the soft sensor was determined in accordance with the diagram shown in Figure 2. Tables 1 and 2 provide details on signal calculation and the complexity of these calculations. Detailed computational complexity of the algorithms results from the following parameters and operations: dimension of system vector--\(n\); matrix multiplication--O(\(n^{3}\)); matrix transpose--O(\(n^{2}\)); matrix inversion--O(\(n^{3}\)); additions, subtractions, and assignments--O(n); and multiplication of matrix and vector--O(\(n^{2}\)).  
The largest complexity in the adaptive algorithm comes from the multiplication of the matrix and the vector, and this is the complexity of order O(\(n^{2}\)).  
For special algorithms, the computational complexity of matrix multiplication is \(O\big{(}n^{2.373}\big{)}\)[21].  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Calculation** & **Specificity of Calculations** & **Complexity** \\ \hline
1 & Equation solution & \(\frac{d}{dt}\hat{x}=A\hat{x}+K_{A}[y-C\hat{x}]\) & \(2n^{2}+4n\) \\
2 & Adaptation error & \(\varepsilon=y-C\hat{x}\) & \(n^{2}+2n\) \\
3 & Gain correction & \(\Delta K=k_{p}\varepsilon\) & \(2n\) \\
4 & Gain value & \(K_{A}=K_{S}+\Delta K\) & \(2n\) \\  & & **Total:** & \(3n^{2}\;+\;10n\;\in\;O\big{(}n^{2}\big{)}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Computational complexity of the adaptive algorithm.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Calculation** & **Specificity of Calculations** & **Complexity** \\ \hline
1 & The Riccati equation 1 & \(\frac{d}{dt}\mathbf{p}=\mathbf{AP}+\mathbf{PA}^{T}-\) & \(8n^{3}+3n^{2}+4n\) \\  & solution & \(\mathbf{PC}^{T}\mathbf{V}^{-1}\mathbf{CP}+\mathbf{DWD}^{T}\) & \(8n^{3}+3n^{2}+4n\) \\
2 & Gain value & \(K_{F}=\mathbf{PC}^{T}\mathbf{V}^{-1}\) & \(3n^{3}+n^{2}+n\) \\
3 & Equation solution & \(\hat{x}=A\hat{x}+K_{F}[y-C\hat{x}]\) & \(2n^{2}+4n\) \\  & & **Total:** & \(11n^{3}+6n^{2}+9n\;\in\;O\big{(}n^{3}\big{)}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Computational complexity of the Kalman filter algorithm.  
Figure 2: Scheme of the soft sensor algorithm.  
In the Kalman filter algorithm, the greatest complexity results from the multiplication and inversion of the matrix, which in effect gives the complexity of the order O(\(n^{3}\)). The adaptive approach used only simple calculations; hence, a lower order of computational complexity was obtained compared with the Kalman filter algorithm.  
The algorithm presented in this article is characterized by lower computational complexity in relation to the classical approach (i.e., the Kalman filter) because there is no need to determine the gain coefficient by solving the Riccati nonlinear differential equation [7; 9; 16; 22; 23].  
The approach to generating signals realized with artificial neural networks has been shown in [10]. In this case, there is comparable computational complexity, but it does not guarantee obtaining the correct signal quality. It results from the necessity of carrying out the learning process for cases representing the most characteristic extortion, which is a difficult issue. In addition, the computational complexity of the network learning process is greater than the normal network operation, although it is done offline.