# Evolution of Hemodynamic Parameters Simulated by Means of Diffusion Models
## 3 Theoretical Model and Calculation  
The Fokker-Planck equation with one variable (here, variable x denotes the TFC value) has the following form [15]:  
\[\frac{\partial P}{\partial t}=\left[-\frac{\partial}{\partial x}\;D^{(1)}(x)+ \frac{\partial^{2}}{\partial x^{2}}\;D^{(2)}(x)\right]\;P \tag{1}\]  
In this equation, \(D^{(2)}\) (x) > 1 is the diffusion coefficient, and \(D^{(1)}\) (x) is called the drift coefficient. In general, both coefficients may also depend on time. The equation describes  
Figure 1: Values of TFC slots filled with the number of measurements. Figure 2: Stepped registration of TFC values in measurement intervals denoted as t in the figure. behavior \(P(x,t)\), i.e., the \(P(x,t)\) is distribution of probability. We assumed stochastic process characterizes the linear drift coefficient, and the diffusion coefficient is constant. \[\frac{\partial P}{\partial t}=\gamma\frac{\partial(xP)}{\partial x}+D\frac{ \partial^{2}}{\partial x^{2}}\;P \tag{2}\]  
In our experiment, drift \(\gamma x\) is present due to therapy data registration, so drift presence is necessary. Diffusion describes the transition between slots of parameter values measured. A solution of Equation (2) is of the form [15]:  
\[P\big{(}x,t\big{|}x^{\prime},t\big{)}=\sqrt{\frac{\gamma}{2\pi D\big{(}1-e^{-2 \gamma(t-t^{\prime})}\big{)}}}\;exp\left(-\frac{\gamma\Big{(}x-x^{\prime}e^{- \gamma(t-t^{\prime})}\Big{)}^{2}}{2D\big{(}1-e^{-2\gamma(t-t^{\prime})}\big{)} }\right) \tag{3}\]  
Green function (3) of Equation (2) is one of the basic ways for system dynamic description [15; 16]. The stationary solution for \(\gamma>0\) and a sufficiently long-period \(\gamma(t-t^{\prime})>>1\) takes the following form:  
\[W(x)=\sqrt{\frac{\gamma}{2\pi D}}exp\left(\frac{-\gamma x^{2}}{2D}\right) \tag{4}\]  
For \(\gamma\leq 0\), no stationary solutions exist. Formal mathematical procedures enable us to find coefficients \(\gamma\) and \(D\) with a normalization condition and a boundary condition. Due to the existence of a stationary shape of \(W(x)\) distribution obtained in the experiment, we can assume that the boundary conditions are properly fulfilled despite not being fully established in the formal way. In such a situation, the assumption that coefficients \(\gamma\) and \(D\) are well-matched by means of conjugated gradient algorithm and, simultaneously, to minimize root mean square error (RMSE) between the experiment data and the theoretical model (4) is permissible. The set of solutions for \(W(x)\) is placed in Table 1, where local and global minima have been shown for the illustrative subset of \(\gamma\) and \(D\). The shape for stationary distribution with \(\gamma\) and \(D\) for the global minimum is presented in Figure 3.  
The results obtained with the conjugated gradient solution are placed in Table 1. The global minimum is placed in the first row of Table 1.  
The green function of FPE with adjusted \(\gamma\) and \(D\) values, and stationary distribution \(W(x^{\prime})\) is applied to determine \(P(x,t)\) distribution in accordance with:  
\[P(x,t)=\int\;P\big{(}x,t\big{|}x^{\prime}-x_{0}\big{)}W\big{(}x^{\prime}-x_{0 }\big{)}dx^{\prime} \tag{5}\]  
Distribution \(P(x,t)\) allows us to verify if the calculated and measured evolution of TFC values is statistically convergent by conducting an \(\chi^{2}\) test. Item \(x_{0}\) is commonly the maximum observed value of \(W(x^{\prime})\) or may also be the boundary point. A comparison of the theoretical \(P(x,t)\) with the experiment's results is presented in Table 2, and the outcomes of statistical tests are shown in Figure 1:0 \begin{table}
\begin{tabular}{c c c} \hline \hline
**RMSE** & \(\gamma\) & \(D\) \\ \hline
0.09810952 & 0.4 & 11.99 \\ \hline
0.09838436 & 0.06 & 1.75 \\ \hline
0.09811257 & 0.2 & 5.99 \\ \hline
0.09811050 & 0.3 & 8.99 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Illustrative values of RMSE, with the global minimum highlighted in bold print obtained by means of conjugated gradient algorithm.