6.1. Example of Solution Direct Problem
In this example, a direct problem with the following data is considered:
and the initial condition and the condition on the right boundary are as follows:
The additional term on the right side of the Equation (
5) is the following function:
For the presented data, the exact solution is known
. All numerical computations were carried out in double precision using a fully self-implemented code written in C#. The simulations were performed on a desktop computer equipped with an Intel(R) Core(TM) i7-8550U CPU (1.80 GHz) and 20 GB RAM, running a 64 bit Windows 10 operating system. At each time step, a linear system of algebraic equations arising from the spatial discretization is assembled and solved. In the present implementation, the resulting linear systems are solved using a direct Gaussian elimination method.
Table 1 shows the mean and maximum errors of approximation and computation time depending on the size of the used mesh. For the
mesh, the mean error is
, while resizing the mesh to
reduced the mean error to
. We can also see that increasing the mesh size relative to space reduces the errors, while increasing the mesh size over time does not significantly reduce the error.
Figure 4 presents the approximate solution (left part of the figure) and the errors of this approximation (right part of the figure) for the entire domain in the case of calculations for a
grid.
Figure 5 shows the exact and approximate solution (
a) and the error of this solution for the final moment
(
b). As can be seen in both figures, the largest errors are on the left side of
x.
To assess the convergence properties of the proposed numerical scheme for the direct problem, the observed orders of accuracy were computed based on the mean error
(see
Table 1). For two successive meshes with characteristic mesh sizes
and
, the convergence order
p was estimated using the standard formula
where
denotes the corresponding numerical error.
The numerical results (see
Table 2 and
Table 3) indicate approximately first-order convergence with respect to the spatial discretization, while refining the temporal mesh alone does not significantly improve the accuracy. This suggests that the overall error is dominated by the spatial discretization.
Figure 6 presents an empirical assessment of the convergence behavior. For the spatial variable, an approximate convergence rate of 0.74 is observed, whereas for the temporal variable, the estimated rate is close to 0.14. The theoretical orders are expected to be valid only for sufficiently small step sizes
and
. Hence, the discrepancies between the theoretical predictions and the observed estimates can most likely be attributed to relatively large discretization steps and the resulting approximation errors.
6.2. Inverse Problem–Benchmark Example
This section presents a computational example of the inverse problem using the algorithm described in
Section 5. In the considered inverse problem, the fractional boundary condition (
8) on the right boundary is unknown and must be identified. In general, these types of inverse problems are considered difficult to solve and require special attention. The following numerical data is assumed in the (
5)–(
8) model:
The fractional boundary condition (
8) is given by the function
. This example (benchmark) is intended to test the proposed algorithm; hence, the sought function
is known and has the following form:
Writing the
function in numerical form, the following is obtained:
Hence, the sought function
has the following form:
where parameters
are unknown. The following search space is adopted in the task:
,
,
,
and
. The measurement data for the inverse problem are the values of the
u state function collected from three separate control points
(right edge),
and
(center). This data is obtained as a result of solving the direct problem for a grid size of
. While the algorithm of the inverse problem is running, a grid size of
is assumed. The measurement data were also distorted by pseudo-random errors of
. This approach aims to test the proposed algorithm and examine its stability depending on the accuracy of the measurement data as well as the location of the measurement point.
GTOA, described in
Section 5, is used to search for the minimum of the functional (
19) describing the error of the approximate solution. Due to the fact that the described algorithm belongs to the group of probabilistic methods, it was decided to repeat the calculations for each case five times. Moreover, the following parameters were adopted in GTOA: population_size
; number_of_iteration
. As a result of the calculations, it is observed that number_of_iteration could be reduced in many cases without any significant harm to the final result. However, the value of 70 used in the examples guaranteed the stability of the obtained results, as evidenced by the low value of standard deviation in
Table 4.
Table 4 presents the identified values of unknown parameters
for the control point
. In most cases, they are close to the reference values. The relative errors of identification
are very low. The largest errors were obtained for the coefficient
, but it should be mentioned here that the last two coefficients
have the smallest impact on the identified function
(
30). As the disturbances of the measurement data increase, in general, the reconstruction results are slightly worse, although the exception is the case of disturbances with the
error, where the errors turned out to be the highest. However, in this case, the errors are also at a satisfactory level. It is also natural to increase the value of the objective function
J if the disturbance of the measurement data increases.
Another indicator of the quality of the obtained solution is the errors of estimation
function occurring in the boundary condition. These errors are calculated from the following formulas:
where
is the exact value of
function and
denotes the estimated
, while
is the final time, which in the example is 400. The relative errors in reproducing the
are minimal (see the results in
Table 5). For the largest disturbances of
of the measurement data, the relative error is
.
Figure 7a shows the plot of the exact
function (marked with the orange solid line) and the identified value of the
function for data perturbed by the
error (black dots). As can be seen in
Figure 7a, the fit is very good. The situation is similar in the case of other input data disturbances.
Figure 7b presents the distribution of errors in reproducing the
function depending on the disturbances in the measurement data. The nature of this distribution is similar in each case, with the largest errors at the end of the considered interval.
Another indicator of the quality of the obtained solution is the impact of the
reconstruction errors on the values of the
u function at the measurement point—in other words, how, after substituting the identified boundary condition into the model, the values of the
u state function at the measurement point are adjusted to the measurement data.
Figure 8a shows the exact (orange dots) and reconstructed (black dots) values of the
u state function in the control point
in the case of data disturbed by the
error.
Figure 8b presents errors distribution in measurement point
for identified boundary condition depending on different noise level of measurement data. The results are consistent with expectations, i.e., the smallest errors are for accurate measurement data (undisturbed by errors), and the greater the noise in the data, the greater the error when reproducing these data. However, it should be emphasized that, in each case, these errors are small and the results obtained are satisfactory.
The next step in the research is to test the algorithm by changing the position of the measurement point. For this purpose, we changed the control point to
and
(in the middle of the considered area), while all other aspects of the experiment remained unchanged. The results restored the parameters
to a similar level as in the case of the measurement point
. Also, in the case of other control points, the largest errors were for the coefficient
and the smallest for
, as shown in
Table 6 and
Table 7. In
Table 7, you can see large errors in the identification of
for the case of
noise. Another significant difference is the value of the objective function. The closer the measurement point is to the center of the considered domain, the smaller the value of the objective function. For example, for measurement data distorted by an error of
, the values of the objective function for measurement points 1, 0.8, and 0.5, respectively, are approximately 1681, 703, and 201. It can be said that the presented algorithm is resistant to changes in the location of the measurement point.
Table 8 shows the
function identification errors. In all but one case, the relative errors were less than
. Only in the case of point
and
noise in the measurement data did the relative error exceed
, which is a lower value than the noise in the measurement data.
Similarly to the description of the results obtained for control point
,
Figure 9 and
Figure 10 present graphs of the identified functions
(part (a)) and the errors in this identification (part (b)) for measurement points
and
. As in the case of
, the largest errors are found at the end of the considered time interval. A noticeable difference is the significantly larger maximum error in the case of noisy data with the
error. However, if we look at
Table 5 and
Table 8 and compare the relative errors for this case (measurement points
and
), these differences are not significant—
for
and
for
. In the case of measurement point
and
noise, the reconstruction error of
is clearly larger than in any other case. These figures confirm the data contained in
Table 8.
In the end of this example, we also present the errors in reconstruction of the
u state function and its fit with the measurement data.
Figure 11 shows the match between the reconstruction of the
u function at measurement point
in the case of noise with error
(a) and the reconstruction errors of
u for various measurement data with different levels (b). It can be seen that the largest errors of fit with the measurement data in the case of the point
are obtained for the noise level
. The smallest errors are obtained for exact measurement data. Analogous plots for the case
and noise
are presented in
Figure 12. In all cases, the fit of the identification
u state function to the measurement data is very good.