# The Online Identification of the Behaviour of Pollutants inside the Tunnel Tube
## 3 Methods of Recursive Identification  
Recursive identification methods, or online methods, construct a system model based on past observations to the present moment. In terms of describing changes in concentrations of harmful substances within a tunnel tube, it is appropriate to create a model of this system for predicting and designing optimal ventilation control using the developed model. Since online identification is employed, it must also be appropriately automated. The algorithm must select an appropriate model form (time delay, order of differential equations, etc.), determine the initial parameters, compute the residuals, and assess the degree of agreement between the system and the model. Utilizing a larger volume of data will create more accurate models.  
The recursive algorithm must have initial conditions set for \(\theta(0)=0\) and \(P(0)=cl\), where \(c\) is an arbitrary constant (e.g., \(10^{5}\)), and \(I\) is an identity matrix.  
Identification algorithms designed for'real-time systems' serve multiple purposes, including monitoring time-varying parameters, enabling adaptive control, supporting filtering, prediction, signal processing, detection, and diagnostics. However, many data-driven identification methods still need to be improved for real-time applications, necessitating appropriate algorithmic reformulation to achieve an efficient procedure. According to the literature [24; 25], the recursive identification method can be expressed in the following form:  
\[\begin{split}&\varepsilon(k+1)=y(k+1)-w^{T}(k+1)\cdot\hat{ \theta}(k)\\ &\hat{\theta}(k+1)=\hat{\theta}(k)+P(k)\cdot w(k)\cdot\varepsilon( k)\\ & P(k+1)=P(k)-\frac{P(k)\cdot w(k+1)\cdot w^{T}(k+1)\cdot P(k)}{1+w^{T}(k+1) \cdot P(k)\cdot w(k+1)}.\end{split} \tag{1}\]  
Identifying a system is the capability of an identification method to find unbiased parameter estimates. We assume that the structure of the identified system aligns with the model structure. The capacity to identify the system for model creation depends on the  
Figure 2: System identification block diagram.  
invertibility of the covariance matrix and the type of input signal \(u(k)\). For the covariance matrix, the following relationship holds:  
\[P^{-1}(k)=\sum_{i=1}^{k}w(i)w^{T}(i). \tag{2}\]  
From the provided Equation (2), it is evident that if \(k\geq n\), where \(n\) is the dimension of the data matrix (data vector), the covariance matrix will be invertible. This inequality is a necessary but not sufficient condition because the vector \(w(k)\) may not be what is known as 'identification-rich'. An ARX model described by the equation in the form of (4) is considered for elucidation.  
\[y(k)=-\sum_{i=1}^{n}a_{i}y(k-i)+\sum_{i=1}^{n}b_{i}u(k-i)+\varsigma(k). \tag{3}\]  
The conditions for the convergence of parameters in the recursive least squares method are as follows [24]:  
* Polynomials A and B are coprime;
* The system is stable;
* The input \(u(k)\) is information-rich, of at least order \(2n\).  
For unstable systems, stabilization via a controller is required first. In the case of a closed-loop control system, information richness is not met because \(u(k)\) is generated as a linear combination of the data vector \(w(k)\). Therefore, parameter convergence may not be guaranteed. Convergence can be ensured by adding an external signal \(v(k)\) to the input signal \(u(k)\). The external signal must be information rich, with a minimum order of \(4n\).  
The primary recursive identification method (Equation (1)) cannot be applied to systems with changing parameters, such as models describing the behaviour of harmful substance concentrations in a tunnel tube. For this purpose, we modify the algorithm by introducing a parameter denoted as the symbol \(\lambda\) for exponential and directional forgetting.