1. Introduction
Tuberculosis, the highly infectious disease caused by the bacterium Mycobacterium tuberculosis (MTB), remains a significant health challenge worldwide, particularly in developing countries. This contagious disease is a major cause of mortality and continues to pose a serious threat to public health. MTB can easily spread via respiratory contact as an infected individual coughs, sneezes, spits, or speaks. The disease is characterized by various symptoms, including high fever accompanied by chills, chronic cough, night sweats, nail clubbing, weight loss, and fatigue. As TB is a life-threatening disease, it is crucial to identify and treat the illness at an early stage, to prevent further transmission and improve patient outcomes. The current global situation demands greater efforts towards TB awareness, prevention, and treatment strategies, particularly in countries with high incidence rates.
TB is a highly prevalent infectious disease and is responsible for a significant number of deaths worldwide. It is considered the second leading cause of death caused by an infectious disease globally. Only in 2019, almost 1.2 million people died from TB, and more than 10.3 million people were infected worldwide. The disease primarily affects the lungs, but it can also spread to other parts of the body, such as the circulatory system, central nervous system, genital–urinary system, joints, bones, and skin. Hence, it is important to diagnose and treat TB promptly, to prevent the spread of the disease and mitigate its impact on affected individuals.
Studying disease dynamics remains crucial. TB exhibits complex dynamics, such as latency periods, super-spreading events, and the development of drug resistance. Thus, modeling the disease spread provides us with an understanding of these complex processes. Having gained knowledge about the dynamics, this could be used for predicting the spread within a population over time. Needless to say, this could help public health authorities formulate appropriate strategies to control the spread. What is more, using models, the effect of various interventions on disease dynamics could be assessed, including vaccination, treatment, quarantine, etc. All these factors motivated us to perform the current study, where we formulate a compartmental ODE model, suggest an algorithm to calibrate it, and we fit the model to real-world data.
One of the most powerful approaches for modeling and subsequently controlling such a disease is mathematical modeling. A large class of models focus on transmission dynamics, which explain how waves develop, spread, and evanesce. Mathematical models, as important tools in the study of infectious diseases, provide valuable insights into disease transmission and control. Researchers have developed numerous models to study the dynamics of TB. These models can help to identify effective strategies for preventing the spread of TB and reducing its impact on public health. By analyzing data on TB transmission and disease progression, mathematical models can also help to predict future trends in TB incidence and guide public health interventions. These models are essential for understanding the complex dynamics of TB and developing evidence-based policies to combat the disease.
The SIR (susceptible-infected-removed) compartment model, first suggested in 1927 [
1], is considered the first contemporary attempt to model the spread of an infectious disease. Later, many extensions and generalizations were developed. Compartment models are heavily used in modeling epidemics [
2,
3]. We mention a small part of these studies, dedicated primarily to tuberculosis. In 1962, a TB model was suggested by [
4], and a couple of years later, a compartment model was proposed in [
5]. In [
6], the authors developed a two-stratum model for TB dynamics, distinguishing between fast and slow progressors to active disease. This model highlighted the importance of latency in TB transmission dynamics. An age-structured model was used to differentiate between primary infection and reinfection in TB transmission in [
7]. The study underlined the significance of age-related factors and reinfection in TB epidemiology. In the paper in [
8], the authors used a compartmental ODE model to simulate the spread of TB under different treatment strategies. They concluded that the WHO’s DOTS strategy could significantly reduce TB incidence and mortality. In the study in [
9], the authors used a stochastic compartmental model to demonstrate the potential impact of treating latent TB infection. This work underscored the importance of considering latency in TB control efforts. The authors of [
10] incorporated drug resistance into a TB model, showing that less fit drug-resistant strains can persist and eventually predominate under standard treatment policies, which was an important contribution to understanding the dynamics of drug-resistant TB. In [
11], a compartmental model was used to simulate the spread of extensively drug-resistant TB in South African hospitals. They found that implementing infection control measures could greatly reduce transmission. A complex multi-compartment model that included HIV co-infection and various forms of drug-resistant TB was used in [
12]. This model was used to analyze different control strategies, demonstrating the necessity of including these factors in models used in high-burden settings. The authors of [
13] used compartmental models to inform policy decisions related to TB control in South Africa. They demonstrated the potential of model-based analysis for guiding resource allocation and intervention planning in a high-burden setting. In [
14], the authors developed a model to estimate the global burden of latent multidrug-resistant TB. They found that the number of individuals with latent MDR-TB is substantial and increasing, highlighting the need for new tools and strategies for diagnosing and treating latent MDR-TB. The study in [
15] presented a six-compartment deterministic model, to analyze the effects of vaccination on TB dynamics within a population, establishing local asymptotic stability when the effective reproduction number is less than one. The results underscored the significance of reducing contact with infected individuals and increasing the vaccination rate with an effective vaccine, demonstrating these as key strategies for decreasing the TB burden in a population. A random differential equation system was applied to a mathematical model of tuberculosis transmission in [
16], investigating the randomness of disease spread by analyzing expected compartment sizes and coefficients of variations. The sensitivity of the basic reproduction number to parameter changes was also explored, using the forward normalized sensitivity index, with simulations conducted to assess random dynamics of disease transmission.
A more detailed review of mathematical approaches to the modeling and control of TB disease performed over the past century can be found in [
17]. Some of the recent studies include [
18], where seasonal effects are included, and [
19], where a fractional-order TB model with age structure was considered. TB models with vaccination effectiveness were considered in [
20].
In the study of [
21], a mathematical model was studied for the co-infection of tuberculosis and COVID-19 using the Atangana–Baleanu fractal–fractional operator, considering compartments for recovery from both diseases. They confirmed the existence and uniqueness of a model solution through a fixed-point approach, investigated the Ulam–Hyers stability, and validated the model using Lagrange interpolation polynomial in a numerical scheme, comparing different values of fractional and fractal orders. In [
22], the authors proposed a mathematical model for investigating the impact of COVID-19 on TB, providing evidence that TB patients have a higher chance of contracting SARS-CoV-2. Using stability analysis, optimal control theory, and sensitivity analysis, they highlighted the system’s endemic equilibrium point, bifurcation behavior, and the key role of the transmission rate in controlling the dynamics of both diseases, confirming that controlling this rate can mitigate COVID-19 and TB infections. In [
23], a deterministic mathematical model for the co-infection of COVID-19 and TB was formulated and analyzed, to understand the co-dynamics and impact of each disease within a population, while considering factors such as vaccine efficacy and vaccination rate. Obviously, when the basic reproduction numbers for both diseases are below one, the population reaches a stable disease-free state; however, the authors also found that, while COVID-19 incidence decreases with co-infection prevalence, the burden of tuberculosis on the human population increases, emphasizing the importance of controlling both diseases for community health. In many studies, besides co-infection with COVID-19, the co-dynamics of TB with HIV, diabetes, smoking, etc. was considered
TB progresses through two main mechanisms: primary infection, which occurs when the disease develops after the initial infection; and endogenous reactivation, which happens when the disease emerges many years after the initial infection [
24]. In cases of primary infection, progressive TB can either arise as a continuation of the initial infection or as an endogenous reactivation of a latent focus. The prolonged latency period associated with TB infection creates additional uncertainty about when the disease may become active. As a result of endogenous reactivation, the disease transitions from the latent to the infectious compartment.
Individuals who have been previously infected with TB and are in a latent state could become infected again through a process known as exogenous reinfection, where they contract the disease from another infectious individual [
25]. This is particularly common in individuals with compromised immune systems. In this case, the infection is caused by organisms that are not normally present in the body but that have entered from the environment. Therefore, the two key factors in a tuberculosis model that contribute to new infections are the rates of endogenous reactivation and exogenous reinfection. These terms are crucial for understanding the spread of the disease and its impact on the population.
Moreover, in mathematical models, the time lag or delay is a crucial factor that determines the duration of the latent period and the time taken to identify individuals with active TB and start treatment. Delays in the treatment of latent TB can arise due to a variety of factors related to the patient’s clinical and demographic characteristics, as well as the healthcare system. In order to ensure timely diagnosis and treatment of active TB, both the healthcare system and the patient must play a role in identifying and managing the disease. The healthcare system should develop effective case finding strategies, to reduce delays in the diagnosis of active TB, while patients should be aware of the symptoms of TB and seek medical attention promptly if they suspect they might have the disease. A model accounting for treatment was proposed in [
26]. The effects of treatment were also discussed in [
27].
We follow models of endogenous reactivation and exogenous reinfection [
28] and treatment [
29], and their fractional-order counterparts [
30,
31], respectively.Commonly, mathematical models utilize integer-order derivatives to describe the dynamics of systems. However, these conventional models have certain drawbacks, as they do not take into account the learning process and memory effects. On the other hand, fractional models are more suitable, as they can accurately capture these factors and produce more realistic outcomes. This is because fractional derivatives enable models to account for non-local interactions and long-range memory effects that are often present in natural systems. Therefore, incorporating fractional derivatives into models can provide a better understanding of the real-world phenomena being studied. In recent years, there has been a growing interest in non-integer-order biological systems, which are better suited to natural phenomena compared to integer-order systems, as they can account for the memory and hereditary properties of dynamical systems. Fractional-order models, unlike integer-order models, can capture nonlocal relations in time and space through power-law memory kernels. This is due to the fact that the fractional-order derivative provides a greater degree of freedom and is consistent with the reality of interactions, allowing for an exact expression of nonlinear phenomena. Many biological systems involve long-range space interactions and/or temporal memory, and the presence of both fractional order and time delay in a mathematical model can significantly increase the complexity of the observed behavior.
Not many papers, however, have discussed the question of the proper calibration of the proposed models, especially with real data [
32]. In [
33,
34] we calibrated SIR-type fractional-order epidemiological models with time-dependent parameters, fitted to real COVID-19 data. Here, we adopt a different approach.
Motivated by the aforementioned studies, we enhanced the described models with endogenous reactivation, exogenous reinfection and treatment compartment, equipping them with fractional-order derivatives and a time lag. This is one of the two main novelties of the study. The resulting models are described in the next section.
Section 3 covers some basic concepts of the fractional calculus required for the following exposition.
Section 4 is dedicated to the solution to the direct problem and a basic analysis. The inverse problem is thoroughly described in
Section 5, which is the second main novelty. The numerical computations are given in
Section 6, while the last section concludes the paper.
5. Numerical Solution to the Inverse Problem
Here, we present the numerical approach to solving the inverse problem Equations (
4)–(
7).
The new temporal grid
Equation (
17) is as follows:
The nodes
designate each point in which a measurement Equation (
7) is available. Unfortunately, in general, data are collected on an annual basis, in contrast to COVID-19 statistics, for example, where the data are updated daily. Thus,
are the moments at the end of every year, where the annual data are reported [
36].
The point of minimum
of the functional
Equation (
8) is called a
nonlinear least squares estimator (LSE). To find it, or to minimize
, we use the Levenberg–Marquardt algorithm.
To assess the performance of the estimator , we utilize various metrics to validate its convergence. These metrics are divided into two categories: those associated with the estimator itself, and those that gauge the goodness of fit.
The norm of the step
is the first metric used to measure the difference between two consecutive iterations of the minimizer
and
:
The second metric is the relative change in the cost function
, which is defined as follows:
where
and
is the cost function at iteration
k.
To ensure that the iterative procedure for obtaining
is reliable, it is necessary to have an appropriate stopping criterion. One such criterion is expressed as
Here,
is a tolerance value set by the user. If the condition in Equation (
18) is satisfied, the iterative procedure terminates at the
th iteration, and the estimated value of the nonlinear LSE is returned as
.
Various metrics are used to validate the convergence of the estimator
, including the
norm of the step , which measures the difference between the previous and current iterations of the estimator. The
relative change in the cost function is another metric that measures the degree of convergence of the algorithm. The
first-order optimality measure is also used to evaluate how closely the estimator
approximates the true minimum of Equation (
8). This measure is calculated as the infinity norm of the gradient of the objective function
evaluated at LSE, which corresponds to the maximum absolute value of the partial derivatives of
with respect to the parameter vector
:
Furthermore, to assess the performance of the model in fitting the data, we calculate several metrics after obtaining the nonlinear LSE. These metrics are associated with the goodness of fit and include the variance of the residuals, root mean squared error (RMSE), and coefficient of determination:
The variance of the residuals and RMSE are metrics where lower values indicate a better model fit to the data. On the other hand, the coefficient of determination assesses how well the model fits the data mean and is a metric where higher values indicate a better model fit, but not greater than one. The mean value of the experimental data is denoted by
.
If the residuals
,
are distributed normally or the number of observations
K is large enough, it is possible to estimate the covariance matrix of the nonlinear LSE
using Equation (
19). This equation uses the sensitivity or Jacobian matrix, denoted as
, which is calculated at the value of
:
where
The sensitivity matrix
indicates how much the values of
change with variations in
. A sensitivity analysis provides insights into the importance of the measurements for parameter estimation [
44]. The covariance matrix in Equation (
19) is used to compute the
standard error (SE), which is related to the accuracy of the nonlinear LSE
in the parameter recovery. The standard error is defined as follows:
6. Computational Experiments
In this section, we provide a variety of computational simulations, implemented in MATLAB®, to test the suggested approach. First, we solve the direct problem, and the solution to the inverse problem readily follows. We conclude the section with an experiment with real data.
The inverse problem is solved in a synthetic data framework. This means that the values of the parameters
are set, and then the direct problem is solved with these parameters. Later, this solution is used to generate the observations Equation (
7). Next, the inverse problem is solved with these measurements. The advantage of this is simple, the
implied values of
can be compared with the true ones, which are a priori known in this setting.
In reality, however, these values are unknown, so we need a different approach. The true values of the parameters cannot be assessed, but this is not the case with the implied functions and ; i.e., the solution to the direct problem with the derived parameter values can be compared to the observed values. For that purpose, the residual measure is introduced later.
6.1. Direct Problem
Let us begin by setting
,
,
,
,
. Then
. Let
be the delay and the fractional order
. A population of 2000 people is considered, and
,
,
and
. The considered time period is 200 years, in order for the system to approach the equilibrium state.When
is low and
, then there is no epidemic (
Figure 2). On the contrary, for
and
, the disease persists in the society (
Figure 3).
6.2. Inverse Problem
Now, we solve the inverse problem Equations (
4)–(
7). Let
and the regarded period in
years. All the parameters stay the same as in the direct problem setting, except that
are not known. However, Equation (
7) are provided for each year. The initial approximations of the parameters are
.
The experiment with exact observations is plotted in
Figure 4, while the results are given in
Table 2.
The recovered . It can be observed that the parameters were accurately recovered with small absolute and relative errors.
Next, we perform a test with perturbed measurements. In reality, sometimes the statistics are inexact, due to a number of reasons, thus such an experiment is meaningful. In order to simulate the perturbation, we introduce Gaussian noise to the observations Equation (
7). This means that we are 95% confident that any individual measurement’s bias will not exceed 5%. We conducted this test with such a high level of noise, in order to confirm the algorithm’s robustness. The results are displayed in
Figure 5 and
Table 3.
The recovered . The errors were slightly higher but still acceptable.
The relative errors (REs) in parameters and functions are further defined as
where
are the implied solutions for
using
, and
is the nonlinear LSE, obtained with the perturbed data.
In our case, and for . The relative errors are small, which again implies the advantages of the algorithm.
The gof metric for both cases are given in
Table 4. For very little computational effort, the algorithm achieved a sufficient accuracy.
6.3. Calibration to Real Data
Here, we fit the model to real data [
36]. We chose Pakistan for two reasons: it is one of the countries most influenced by TB in the world, and the results could be compared to [
29,
31]. We considered the period 2000–2019, due to the data availability. As discussed, the statistics for infectious and those deceased were presented on an annual basis.
To obtain the measurement for , we multiplied the incidence rate by the population in the respective year. Since both the birth and mortality rates were high, it was important to do so, otherwise we would have arrived at a flat curve. Considering the deceased from TB, we accumulated the deaths during the years, to obtain the measurement for , , .
We kept the same settings, except that
and
. To measure the gof, we used the residuals
It also helped us to determine the optimal fractional order. Empirically, we deduced that
, since this yielded the smallest residual norm Equation (
21)
. The derived basic reproduction number was
, and the implied parameters were
, which are close to those in [
31].
Finally, the calibration is visualized in
Figure 6, and the gof quantities are given in
Table 5.
The high values of and unequivocally demonstrate that TB has not disappeared in Pakistan.
6.4. Discussion
In this study, we constructed model Equations (
4)–(
6) to account for endogenous reactivation and exogenous reinfection, incomplete treatment, slow and fast contagion, as well as short and long memory effects, all of which are typical of TB dynamics. First, we tested the approach in a quasi-real setting. This allowed us to compare the implied values of the parameters with the actual ones. All the parameters, except
, were precisely recovered. This further allowed making a reliable estimate of the basic reproduction number
. These conclusions remained true, even in the case of the presence of noise in the observations, which demonstrated the robustness of the algorithm.
The reason why the error in the reconstruction of was higher than in the others was that the model was, to a large extent, insensitive to this parameter. This fact hindered the identification of , but on the other hand, this value was not crucial for the implied TB dynamics. Even with a large error in this value, the system would behave identically, thus reconstructing is of small importance.
In the real world, however, we do not know the "fair" values of the parameters, so we cannot directly assess the quality of their recovery. This is why we introduced the residual measure Equation (
21). If the solution to the direct problems with the implied parameters mimics the observed dynamics, we can be confident in the parameter estimates. This is what we carried out in the real-world application with public data from Pakistan [
36]. Measurements were only available for the currently infected people and those who had died from TB. From the 2000–2019 data, we arrived at a high transmission rate
and
. This means that the current measures were insufficient to turn the tide. The strategies that were most efficient and have the minimal cost could be deduced with an optimal control approach.
This study contributed to the available knowledge in the manner in which the proposed model accounts for the distinctive features of the TB dynamics, without introducing unnecessary complexity, as well as being able to be successfully calibrated. Its ability to cope well with real data might be very beneficial in modeling, simulating, and forecasting the spread of TB, which are useful tools in fighting the disease.
7. Conclusions
This study dealt with a TB epidemic model. The whole population was divided into five compartments: susceptible, infected but not yet infectious, infectious, treated, and recovered, along with vital dynamics. The immunity gained is not lifelong and decays with time. Furthermore, the considered mechanisms for contracting the infection include slow and fast contamination due to mass action, endogenous reactivation, and exogenous reinfection. Furthermore, those treated and recovered could again become exposed or infectious, due to an incomplete treatment or waning immunity.
This new model extends the previous ones twofold. The two types of memory incorporated—the time lag for short memory and the fractional order of the derivatives for long memory—make the model better adjustable to real data. It is clear that the current level of infectiousness depends, not only to the immediately preceding number of infected, but also on a long history due to the latent period. Thus, applying fractional-order derivatives is suitable for epidemiological modeling in general.
Along with suggesting a population dynamics model and conducting a basic analysis, the other aim of this study was to propose a robust algorithm to recover important parameters. We noted that statistics are usually collected only for the (detected) infectious and people deceased from TB. This information was included in a quadratic cost functional, which was minimized to find the optimal values of the unknown parameters that mimic the empirical disease dynamics as much as possible.
The model was calibrated with real-world data, and the results indicated that it could accurately capture the behavior of the disease under different scenarios. Such studies highlight the crucial role of mathematical modeling in controlling the spread of infections and for taking appropriate measures to prevent and treat the disease. This model can be used as a tool to assess the effectiveness of different interventions, such as vaccination programs and screening policies. We believe that this work will contribute to the ongoing efforts to combat tuberculosis and improve public health worldwide.
There are many ways in which this investigation could be continued. Probably the most straightforward way to further develop this study would be to implement an optimal control framework. This would give insights into the proper control strategies to employ, while keeping the resources used at an acceptable level.
Moreover, the model parameters could be considered as time- and space-dependent function instead of constants. In addition, stochastics could be involved in the dynamics. More compartments could be included for vaccinated or hospitalized people. Furthermore, TB often interacts with other diseases, most notably HIV, and recently COVID-19. It would be interesting and useful to employ a model that encompasses such a relation. What is more, population heterogeneities such as age structure, spatial discrepancy, and others would be worth studying. Such approaches, combined with various advanced numerical methods, are useful in many fields of science besides epidemiological modeling.